(function(a){jQuery.fn.extend({lazyLoad:function(){var b=a(window).data("lazyloaders");if(!b){b=[]}this.each(function(){b.push(this)});a(window).data("lazyloaders",b)},showComment:function(){return this.each(function(){var b=this.firstChild;if(b.nodeType===8){this.innerHTML="";a(this).replaceWith(b.nodeValue)}})}});a(document).ready(function(){var b=false;a(window).scroll(function(){if(!b){b=true;setTimeout(function(){var c=a(window).data("lazyloaders");if(!c||!c.length){return}a(c).each(function(b){if(this&&a.inviewport(this,{threshold:0})){a(this).showComment()}});b=false},250)}});a(window).trigger("scroll")});a.belowthefold=function(b,c){var d=a(window).height()+a(window).scrollTop();return d<=a(b).offset().top-c.threshold};a.abovethetop=function(b,c){var d=a(window).scrollTop();return d>=a(b).offset().top+a(b).height()-c.threshold};a.rightofscreen=function(b,c){var d=a(window).width()+a(window).scrollLeft();return d<=a(b).offset().left-c.threshold};a.leftofscreen=function(b,c){var d=a(window).scrollLeft();return d>=a(b).offset().left+a(b).width()-c.threshold};a.inviewport=function(b,c){return!a.rightofscreen(b,c)&&!a.leftofscreen(b,c)&&!a.belowthefold(b,c)&&!a.abovethetop(b,c)};a.extend(a.expr[":"],{"below-the-fold":function(b,c,d){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b,c,d){return a.abovethetop(b,{threshold:0})},"left-of-screen":function(b,c,d){return a.leftofscreen(b,{threshold:0})},"right-of-screen":function(b,c,d){return a.rightofscreen(b,{threshold:0})},"in-viewport":function(b,c,d){return a.inviewport(b,{threshold:0})}})})(jQuery);$(function(){var a=$("#slider1").bxSlider({auto:true,pause:7500,controls:false});$("#go-prev").click(function(){a.goToPreviousSlide();return false});$("#go-next").click(function(){a.goToNextSlide();return false})});window.onload=function(){var a=$("div.sliderGallery");var b=$("ul",a);var c=b.innerWidth()-a.outerWidth();$(".slider",a).slider({min:0,max:c,animate:true,orientation:"horizontal",stop:function(a,c){b.animate({left:c.value*-1},880)},slide:function(a,c){b.css("left",c.value*-1)}})};$(document).ready(function(){$("div.lazy").lazyLoad({effect:"fadeIn"})});$(document).ready(function(){$("#youtubevid").click(function(){$("#youtubevid").html('<iframe width="232" height="342" src="http://www.youtube.com/v/MtOvh2RGw3g&autoplay=1" frameborder="0"></iframe>')})})
