/*! jQuery visible 1.0.0 teamdf.com/jquery-plugins | teamdf.com/jquery-plugins/license */ (function(d){d.fn.visible=function(e,i){var a=d(this).eq(0),f=a.get(0),c=d(window),g=c.scrollTop();c=g+c.height();var b=a.offset().top,h=b+a.height();a=e===true?h:b;b=e===true?b:h;return!!(i===true?f.offsetWidth*f.offsetHeight:true)&&b<=c&&a>=g}})(jQuery); /* ================================= * jQuery parallax v1.2 / Copyright © 2014 Spab Rice * All rights reserved. ================================= */ function moveParallax(e){var t=jQuery(e).visible(true);if(t){var n=jQuery(e).data("imagewidth");var r=jQuery(e).data("imageheight");var i=jQuery(e).data("speed");var s=jQuery(e).width();var o=jQuery(e).offset().left;var u=jQuery(window).width();var a=jQuery(window).height();if(n&&u-200>s){preLeft=o-Math.round(u/2)+Math.round(s/2);leftPos=Math.round((n-u)/2);leftPos=preLeft+ -leftPos+"px"}else{leftPos="50%"}if(r&&r>a){topPos=Math.ceil((r-a)/2)}else{topPos="0"}if(i){}else{i=.3}var f=parseInt(jQuery(e).offset().top);var l=f-jQuery(window).scrollTop();var c=l*i-topPos;var i=leftPos+" "+c+"px";jQuery(e).css({backgroundPosition:i})}}jQuery(window).load(function(){setTimeout(function(){jQuery("html,body").animate({scrollTop:jQuery(window).scrollTop()+1},5,function(){jQuery("html,body").animate({scrollTop:jQuery(window).scrollTop()-1},5)})},2e3)});(function(e){e.fn.extend({parallax:function(e){return this.each(function(){var e=jQuery(this);setTimeout(function(){var t=new Image;t.onload=function(){imgH=this.height;imgW=this.width;e.data("imagewidth",imgW);e.data("imageheight",imgH)};t.src=e.data("parallax-image")},500);if(jQuery(window).width()>1024){e.css({background:"url("+e.data("parallax-image")+") center center","background-attachment":"fixed"});setTimeout(function(){moveParallax(e)},500);jQuery(window).scroll(function(){moveParallax(e)})}else{e.css({background:"url("+e.data("parallax-image")+") center center","background-attachment":"inherit","background-size":"cover"})}})}})})(jQuery);