').attr('src', img).load(function() { $(this).remove(); /* prevent memory leaks */ $this.data('loaded-count',$this.data('loaded-count')+1); if ($this.data('loaded-count') >= bgImgs.length) { settings.afterLoaded.call($this); } }); }); }); }; })(jQuery); jQuery(document).ready(function () { jQuery(".quote_block").each(function () { jQuery(this).removeClass("block").addClass("visable"); }); jQuery(window).on("resize", function () { jQuery(".slider").each(function () { var maxZoneHeight = 0; jQuery(this).children().children().each(function () { var thisHeight = jQuery(this).outerHeight(); if (thisHeight > maxZoneHeight) { maxZoneHeight = thisHeight; } }); jQuery(this).children().children().children().each(function () { jQuery(this).css("minHeight", ""); var thisHeight = jQuery(this).outerHeight(); if (thisHeight > maxZoneHeight) { maxZoneHeight = thisHeight; } }); jQuery(this).css("minHeight", maxZoneHeight); jQuery(this).children().each(function () { jQuery(this).css("minHeight", maxZoneHeight); }); }); }).resize(); jQuery('.fade_bottom').appear(); jQuery(document.body).on('appear', '.fade_bottom', function (e, $affected) { $affected.addClass('visable'); }); jQuery('.bottom_fade').appear(); jQuery(document.body).on('appear', '.bottom_fade', function (e, $affected) { $affected.addClass('visable'); }); jQuery('.fade_in').appear(); jQuery(document.body).on('appear', '.fade_in', function (e, $affected) { $affected.addClass('visable'); }); jQuery('.block').appear(); jQuery('body').on('appear', '.block', function (e, $affected) { $affected.addClass('visable'); }); jQuery('.covered').appear(); jQuery('body').on('appear', '.covered', function (e, $affected) { $affected.addClass('visable'); }); jQuery.force_appear();/* var query = "(-webkit-min-device-pixel-ratio: 2.2), (min-device-pixel-ratio: 2.2), (min-resolution: 220dpi)"; if (matchMedia(query).matches) { var multiplier = 2} else { multiplier = 1} if ( ( window.devicePixelRatio * 100 ) >= 159 * multiplier ) { jQuery('html').addClass("zoomed_in") ; } */ jQuery(window).on("resize", function () { jQuery('body').addClass('notransition'); setTimeout(function () { jQuery('body').removeClass('notransition'); jQuery.force_appear(); /* var query = "(-webkit-min-device-pixel-ratio: 2.2), (min-device-pixel-ratio: 2.2), (min-resolution: 220dpi)"; if (matchMedia(query).matches) { var multiplier = 2} else { multiplier = 1} if ( ( window.devicePixelRatio * 100 ) >= 159 * multiplier ) { if ( ! jQuery('html').hasClass("zoomed_in") ) jQuery('html').addClass("zoomed_in") ; } else { if ( jQuery('html').hasClass("zoomed_in") ) jQuery('html').removeClass("zoomed_in") } */ }, 200); }); jQuery("body").css("opacity", "1"); setTimeout(function () { jQuery('.hld').addClass('loaded');/* * / var $hash = window.location.hash; if ($hash != '') { var headerHeight = jQuery(".nav_holder").height(); var target = $hash, $target = jQuery(target).offset().top - (headerHeight); jQuery('html, body').stop().animate({ 'scrollTop': $target }, 500); } else { jQuery('html, body').stop().animate({ 'scrollTop': '10' }, 10).animate({ 'scrollTop': '0' }, 100); } /* */ // jQuery.dispatchEvent(new Event('scroll')); jQuery.force_appear(); setTimeout(function () { preloadScript(); }, 6000); }, 0); var i = document.location.href.lastIndexOf('?'); var types = document.location.href.substr(i + 1).replace(/price=/g, '').split('&'); jQuery('input[name="fieldname12_1[]"]').prop('checked', function () { return $.inArray(this.value, types) !== -1; }); jQuery('a[href^="#"]').click(function (e) { // var headerHeight = jQuery(".nav_holder").innerHeight(); // var target = this.hash; var $target = jQuery(this.hash).offset().top - jQuery(".nav_holder").innerHeight(); jQuery('html, body').stop().animate({ 'scrollTop': $target }, 1000, function () { }); $target.focus(); e.preventDefault(); }); jQuery(".block").css("opacity", "1"); jQuery("#sticky").sticky({ topSpacing: 0 }); /* * / function mobileMenuClose() { if ( jQuery( '.mnu' ).hasClass( 'close' ) ) { jQuery( '.hld' ).removeClass( 'close' ); jQuery( '.mnu' ).removeClass( 'close' ); jQuery( '.cpy' ).removeClass( 'close' ); jQuery( '.ftr' ).removeClass( 'close' ); jQuery( '.mnu' ).scrollTop( 0 ); jQuery( '.navbar' ).removeClass( 'close' ); jQuery( "body" ).removeClass( 'close' ); jQuery( "html" ).removeClass( 'close' ); } else { window.location = ""; } } function mobileMenu() { // var $this = jQuery(this); // var windowWidth = jQuery(window).width(); // var $thisClass = jQuery( '.hld' ).hasClass( 'close' ); if ( jQuery( '.hld' ).hasClass( 'close' ) ) { mobileMenuClose() } else { jQuery( '.hld' ).addClass( 'close' ); jQuery( '.mnu' ).addClass( 'close' ); jQuery( '.navbar' ).addClass( 'close' ); jQuery( '.ftr' ).addClass( 'close' ); jQuery( "body" ).addClass( 'close' ); jQuery( "html" ).addClass( 'close' ); jQuery( '.cpy' ).addClass( 'close' ); return false; } } */ /* */});/* jQuery(document).ready(function () { jQuery(window).scroll(function () { var scrolled_val = jQuery(document).scrollTop().valueOf(); if (!jQuery('.nav_holder').hasClass('is-sticky')) { if (scrolled_val >= 45) { jQuery('.nav_holder').addClass('is-sticky') } } else if (scrolled_val < 45) { jQuery('.nav_holder').removeClass('is-sticky') } });});/* *//*jQuery('.bt_logo').click(function (e) { mobileMenu(); e.preventDefault();});/** /jQuery('.navbar .dropdown').hover( function (e) { if (jQuery(window).width() > 767) { jQuery(this).children("ul").stop().slideDown(300); // jQuery('ul', this).stop().slideDown(100); } }, function (e) { if (jQuery(window).width() > 767) { jQuery(this).children("ul").stop().slideUp(100); } });*/jQuery(document).ready(function () { if (jQuery('body').hasClass('logged-in')) { jQuery(".image_only[role!='img']").addClass('no_alt'); jQuery("img").addClass('has_alt'); jQuery("[alt='']").addClass('no_alt').removeClass('has_alt'); jQuery(".no_alt.Decorative").removeClass('no_alt'); jQuery(".no_alt.has_alt").addClass('no_alt').removeClass('has_alt'); jQuery("img.has_alt").wrap(""); jQuery(".has_alt_text").each(function () { var placeholder = jQuery(this).children('img').attr("alt"); //alert(placeholder); jQuery(this).attr("data-content", placeholder); }); }/* http://irama.org/web/dhtml/butterfly/ */ if (document.querySelector('.bf_box') !== null) { var options = { closeButton: false, treatAsMedia: true, animateResize: false, captionMode: 'title', lightBoxMargin: '50px', //preloadNextGalleryImage: true, galleryMode: 'rel' } jQuery('.bf_box').butterfly(options);} /* var video_options = { contentDefaultWidth: '868px',contentDefaultHeight: '1080px', closeButton: true, treatAsMedia: true, animateResize: false, lightBoxMargin: '50px', useIframe: 'autodetect', captionMode: 'title' } jQuery('.bf_video').butterfly(video_options); /* */});jQuery(document).ready(function () { jQuery( ".mnu *" ).focusin(function() { // console.log('in'); if ( jQuery('.nav_holder .zone > .bt_menu').is(':visible') && ! jQuery('.hld').hasClass('close') ) { mobileMenu() ;}}); jQuery( ".mnu *" ).focusout(function() { //console.log('out'); if ( jQuery('.nav_holder .zone > .bt_menu').is(':visible') && jQuery('.hld').hasClass('close') && jQuery( ".mnu *" ).not(":focus") ) {mobileMenuClose();}});});/*Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/*/// (function ($) {(function () { var $window = jQuery(window); var windowHeight = $window.height(); $window.resize(function () { windowHeight = $window.height(); }); jQuery.fn.parallax = function (xpos, speedFactor, outerHeight) { var $this = jQuery(this); var getHeight; var firstTop = 0; // var paddingTop = 0; //get the starting position of each element to have parallax applied to it function update() { // put size check here $this.each(function () { firstTop = $this.offset().top ; }); if (outerHeight) { getHeight = function (jqo) { return jqo.outerHeight(true); }; } else { getHeight = function (jqo) { return jqo.innerHeight(); }; } // setup defaults if arguments aren't specified if (xpos === null) xpos = "50%"; if (speedFactor === null) speedFactor = 0.5; if (outerHeight === null) outerHeight = true; // function to be called whenever the window is scrolled or resized var pos = $window.scrollTop(); $this.each(function () { var $element = jQuery(this); var top = $element.offset().top; var height = getHeight($element); // Check if totally above or totally below viewport if (top + height < pos || top > pos + windowHeight) { return; } else { var ypos = Math.round((firstTop - pos) * speedFactor); // if (ypos > 0 ) ypos = 0 $this.css('backgroundPosition', xpos + " " + ypos + "px"); } }); } $window.bind('scroll', update).resize(update); update(); }; })(jQuery);/* //// end parallax */function parallaxInit() { jQuery('.parallax').parallax("center", .2); jQuery('.parallax2').parallax("center", .2); jQuery('.parallax3').parallax("center", .2); jQuery('.parallax4').parallax("center", .2);/* jQuery('.Parallax').parallax("center", .2);/* // jQuery('.ParallaX').parallax("center", -.2); jQuery('.Parallax2').parallax("center", .2); jQuery('.Parallax3').parallax("center", .2); jQuery('.Parallax4').parallax("center", .2); */}jQuery(document).ready(function () { parallaxInit();}); jQuery(document).ready(function () {jQuery("a, button").on("click", function (event) { jQuery(this).blur();});});