function lsShowNotice(lsobj,issue,ver){var el;if(typeof lsobj=="string")el=jQuery("#"+lsobj);else if(typeof lsobj=="object")el=lsobj;var errorTitle,errorText;switch(issue){case "jquery":errorTitle="multiple jQuery issue";errorText='It looks like that another plugin or your theme loads an extra copy of the jQuery library causing problems for LayerSlider to show your sliders. \x3cstrong\x3ePlease navigate on your WordPress admin area to the main page of LayerSlider and enable the "Put JS includes to body" option within the Troubleshooting \x26 Advanced Settings box.\x3c/strong\x3e'; break;case "oldjquery":errorTitle="old jQuery issue";errorText="It looks like you are using an old version ("+ver+') of the jQuery library. LayerSlider requires at least version 1.7.0 or newer. Please update jQuery to 1.10.x or higher. Important: Please do not use the jQuery Updater plugin on WordPress and do not update to 2.x version of jQuery because it is not compatible with older browsers like IE 7 \x26 8. \x3ca href\x3d"//support.kreaturamedia.com/faq/4/layerslider-for-wordpress/#group-13\x26entry-60"\x3eYou can read more about updating jQuery by clicking here.\x3c/a\x3e'; break}el.addClass("ls-error");el.append('\x3cp class\x3d"ls-exclam"\x3e!\x3c/p\x3e');el.append('\x3cp class\x3d"ls-error-title"\x3eLayerSlider: '+errorTitle+"\x3c/p\x3e");el.append('\x3cp class\x3d"ls-error-text"\x3e'+errorText+"\x3c/p\x3e")} (function($){$.fn.layerSlider=function(options){var reqVer="1.7.0";var curVer=$.fn.jquery;var el=$(this);var checkVersions=function(v1,v2){var v1parts=v1.split(".");var v2parts=v2.split(".");for(var i=0;iparseInt(v2parts[i]))return false;else return true}if(v1parts.length!=v2parts.length)return true;return true};if(!checkVersions("1.8.0",curVer))el.addClass("ls-norotate"); if(!checkVersions(reqVer,curVer))lsShowNotice(el,"oldjquery",curVer);else if((typeof options).match("object|undefined"))return this.each(function(i){new layerSlider(this,options)});else if(options=="data"){var lsData=$(this).data("LayerSlider").g;if(lsData)return lsData}else return this.each(function(i){var lsData=$(this).data("LayerSlider");if(lsData){if(!lsData.g.isAnimating&&!lsData.g.isLoading)if(typeof options=="number"){if(options>0&&options0)sl=$(this).children();var _w=sl.width();var _h=sl.height();if(sl[0].style.width&&sl[0].style.width.indexOf("%")!=-1)_w=sl[0].style.width;if(sl[0].style.height&&sl[0].style.height.indexOf("%")!=-1)_h=sl[0].style.height;sl.data("originalWidth", _w);sl.data("originalHeight",_h);sl.data("originalPaddingLeft",sl.css("padding-left"));sl.data("originalPaddingRight",sl.css("padding-right"));sl.data("originalPaddingTop",sl.css("padding-top"));sl.data("originalPaddingBottom",sl.css("padding-bottom"));var _o=typeof parseFloat(sl.css("opacity"))=="number"?Math.round(parseFloat(sl.css("opacity"))*100)/100:1;$(this).data("originalOpacity",_o);if(sl.css("border-left-width").indexOf("px")==-1)sl.data("originalBorderLeft",sl[0].style.borderLeftWidth); else sl.data("originalBorderLeft",sl.css("border-left-width"));if(sl.css("border-right-width").indexOf("px")==-1)sl.data("originalBorderRight",sl[0].style.borderRightWidth);else sl.data("originalBorderRight",sl.css("border-right-width"));if(sl.css("border-top-width").indexOf("px")==-1)sl.data("originalBorderTop",sl[0].style.borderTopWidth);else sl.data("originalBorderTop",sl.css("border-top-width"));if(sl.css("border-bottom-width").indexOf("px")==-1)sl.data("originalBorderBottom",sl[0].style.borderBottomWidth); else sl.data("originalBorderBottom",sl.css("border-bottom-width"));sl.data("originalFontSize",sl.css("font-size"));sl.data("originalLineHeight",sl.css("line-height"))});if(document.location.hash)for(var dl=0;dl<$(el).find(".ls-slide").length;dl++)if($(el).find(".ls-slide").eq(dl).data("deeplink")==document.location.hash.split("#")[1])ls.o.firstSlide=dl+1;$(el).find('*[class*\x3d"ls-linkto-"]').each(function(){var lClasses=$(this).attr("class").split(" ");for(var ll=0;ll2){ls.o.firstSlide=="random";ls.o.twoWaySlideshow=false}else ls.o.randomSlideshow=false;if(ls.o.firstSlide=="random")ls.o.firstSlide=Math.floor(Math.random()*ls.g.layersNum+1);ls.o.fisrtSlide=ls.o.fisrtSlide1)$("body").bind("keydown",function(e){if(!ls.g.isAnimating&&!ls.g.isLoading)if(e.which==37){ls.o.cbPrev(ls.g); ls.prev("clicked")}else if(e.which==39){ls.o.cbNext(ls.g);ls.next("clicked")}});if("ontouchstart"in window&&$(el).find(".ls-slide").length>1&&ls.o.touchNav){var touchChangeSize=45;var currentUserAgent=navigator.userAgent;if(currentUserAgent.indexOf("Android")!=-1)touchChangeSize=10;$(el).find(".ls-inner").bind("touchstart",function(e){var t=e.touches?e.touches:e.originalEvent.touches;if(t.length==1)ls.g.touchStartX=ls.g.touchEndX=t[0].clientX});$(el).find(".ls-inner").bind("touchmove",function(e){var t= e.touches?e.touches:e.originalEvent.touches;if(t.length==1)ls.g.touchEndX=t[0].clientX;if(Math.abs(ls.g.touchStartX-ls.g.touchEndX)>touchChangeSize)e.preventDefault()});$(el).find(".ls-inner").bind("touchend",function(e){if(Math.abs(ls.g.touchStartX-ls.g.touchEndX)>touchChangeSize)if(ls.g.touchStartX-ls.g.touchEndX>0){ls.o.cbNext(ls.g);$(el).layerSlider("next")}else{ls.o.cbPrev(ls.g);$(el).layerSlider("prev")}})}if(ls.o.pauseOnHover==true&&$(el).find(".ls-slide").length>1)$(el).find(".ls-inner").hover(function(){ls.o.cbPause(ls.g); if(ls.g.autoSlideshow){ls.g.paused=true;ls.stop();if(ls.g.barTimer)ls.g.barTimer.stop();if(ls.g.circleTimer)if(ls.g.cttl)ls.g.cttl.pause();ls.g.pausedSlideTime=(new Date).getTime()}},function(){if(ls.g.paused==true){ls.start();ls.g.paused=false}});ls.resizeSlider();if(ls.o.yourLogo)ls.g.yourLogo=$("\x3cimg\x3e").addClass("ls-yourlogo").appendTo($(el)).attr("style",ls.o.yourLogoStyle).css({visibility:"hidden",display:"bock"}).load(function(){var logoTimeout=0;if(!ls.g.yourLogo)logoTimeout=1E3;setTimeout(function(){ls.g.yourLogo.data("originalWidth", ls.g.yourLogo.width());ls.g.yourLogo.data("originalHeight",ls.g.yourLogo.height());if(ls.g.yourLogo.css("left")!="auto")ls.g.yourLogo.data("originalLeft",ls.g.yourLogo[0].style.left);if(ls.g.yourLogo.css("right")!="auto")ls.g.yourLogo.data("originalRight",ls.g.yourLogo[0].style.right);if(ls.g.yourLogo.css("top")!="auto")ls.g.yourLogo.data("originalTop",ls.g.yourLogo[0].style.top);if(ls.g.yourLogo.css("bottom")!="auto")ls.g.yourLogo.data("originalBottom",ls.g.yourLogo[0].style.bottom);if(ls.o.yourLogoLink!= false)$("\x3ca\x3e").appendTo($(el)).attr("href",ls.o.yourLogoLink).attr("target",ls.o.yourLogoTarget).css({textDecoration:"none",outline:"none"}).append(ls.g.yourLogo);ls.g.yourLogo.css({display:"none",visibility:"visible"});ls.resizeYourLogo()},logoTimeout)}).attr("src",ls.o.yourLogo);$(window).resize(function(){ls.g.resize=true;if(!ls.g.isAnimating){ls.makeResponsive(ls.g.curLayer,function(){if(ls.g.ltContainer)ls.g.ltContainer.empty();ls.g.resize=false});if(ls.g.yourLogo)ls.resizeYourLogo()}}); ls.g.showSlider=true;if(ls.o.animateFirstSlide==true){if(ls.o.autoStart){ls.g.autoSlideshow=true;$(el).find(".ls-nav-start").addClass("ls-nav-start-active")}else $(el).find(".ls-nav-stop").addClass("ls-nav-stop-active");ls.next()}else ls.imgPreload(ls.g.curLayer,function(){ls.g.curLayer.fadeIn(1E3,function(){ls.g.isLoading=false;$(this).addClass("ls-active");if(ls.o.autoPlayVideos)$(this).delay($(this).data("delayin")+25).queue(function(){$(this).find(".ls-videopreview, video, audio").click();$(this).dequeue()}); ls.g.curLayer.find(' \x3e *[class*\x3d"ls-l"]').each(function(){if($(this).data("showuntil")>0){var cursub=$(this);cursub.data("showUntilTimer",setTimeout(function(){ls.sublayerShowUntil(cursub)},cursub.data("showuntil")))}})});ls.changeThumb(ls.g.curLayerIndex);if(ls.o.autoStart){ls.g.isLoading=false;ls.start()}else $(el).find(".ls-nav-stop").addClass("ls-nav-stop-active")});ls.o.cbInit($(el))};ls.start=function(){if(ls.g.autoSlideshow)if(ls.g.prevNext=="prev"&&ls.o.twoWaySlideshow)ls.prev();else ls.next(); else{ls.g.autoSlideshow=true;if(!ls.g.isAnimating&&!ls.g.isLoading)ls.timer()}$(el).find(".ls-nav-start").addClass("ls-nav-start-active");$(el).find(".ls-nav-stop").removeClass("ls-nav-stop-active")};ls.timer=function(){if($(el).find(".ls-active").data("ls"))var sD=ls.st.slideDelay;else var sD=ls.o.slideDelay;var delaytime=$(el).find(".ls-active").data("slidedelay")?parseInt($(el).find(".ls-active").data("slidedelay")):sD;if(!ls.o.animateFirstSlide&&!$(el).find(".ls-active").data("slidedelay")){var tempD= $(el).find(".ls-slide:eq("+(ls.o.firstSlide-1)+")").data("slidedelay");delaytime=tempD?tempD:sD}clearTimeout(ls.g.slideTimer);if(ls.g.pausedSlideTime){if(!ls.g.startSlideTime)ls.g.startSlideTime=(new Date).getTime();if(ls.g.startSlideTime>ls.g.pausedSlideTime)ls.g.pausedSlideTime=(new Date).getTime();if(!ls.g.curSlideTime)ls.g.curSlideTime=delaytime;ls.g.curSlideTime-=ls.g.pausedSlideTime-ls.g.startSlideTime;ls.g.pausedSlideTime=false;ls.g.startSlideTime=(new Date).getTime()}else{ls.g.curSlideTime= delaytime;ls.g.startSlideTime=(new Date).getTime()}ls.g.curSlideTime=parseInt(ls.g.curSlideTime);ls.g.slideTimer=setTimeout(function(){ls.g.startSlideTime=ls.g.pausedSlideTime=ls.g.curSlideTime=false;ls.start()},ls.g.curSlideTime);if(ls.g.barTimer)ls.g.barTimer.animate({width:ls.g.sliderWidth()},ls.g.curSlideTime,"linear",function(){$(this).css({width:0})});if(ls.g.circleTimer){var ct1=ls.g.circleTimer.find(".ls-ct-right .ls-ct-rotate");var ct2=ls.g.circleTimer.find(".ls-ct-left .ls-ct-rotate");if(ls.g.circleTimer.css("display")== "none"){ct1.css({rotate:0});ct2.css({rotate:0});ls.g.circleTimer.fadeIn(350)}if(!ls.g.cttl){ls.g.cttl=new TimelineLite;ls.g.cttl.add(TweenLite.fromTo(ct1[0],delaytime/2E3,{rotation:0},{ease:Linear.easeNone,rotation:180,onReverseComplete:function(){ls.g.cttl=false}}));ls.g.cttl.add(TweenLite.fromTo(ct2[0],delaytime/2E3,{rotation:0},{ease:Linear.easeNone,rotation:180}))}else ls.g.cttl.resume()}};ls.stop=function(){ls.g.pausedSlideTime=(new Date).getTime();if(ls.g.barTimer)ls.g.barTimer.stop();if(ls.g.circleTimer)if(ls.g.cttl)ls.g.cttl.pause(); if(!ls.g.paused&&!ls.g.originalAutoSlideshow){$(el).find(".ls-nav-stop").addClass("ls-nav-stop-active");$(el).find(".ls-nav-start").removeClass("ls-nav-start-active")}clearTimeout(ls.g.slideTimer);ls.g.autoSlideshow=false};ls.forcestop=function(){clearTimeout(ls.g.slideTimer);ls.g.autoSlideshow=false;clearTimeout(ls.g.t1);clearTimeout(ls.g.t2);clearTimeout(ls.g.t3);clearTimeout(ls.g.t4);clearTimeout(ls.g.t5);if(ls.g.barTimer)ls.g.barTimer.stop();if(ls.g.circleTimer)if(ls.g.cttl)ls.g.cttl.pause(); $(el).find("*").stop(true,false).dequeue();$(el).find(".ls-slide \x3e").each(function(){if($(this).data("tr"))$(this).data("tr").pause()});if(!ls.g.paused&&!ls.g.originalAutoSlideshow){$(el).find(".ls-nav-stop").addClass("ls-nav-stop-active");$(el).find(".ls-nav-start").removeClass("ls-nav-start-active")}};ls.restart=function(){$(el).find("*").stop();clearTimeout(ls.g.slideTimer);ls.change(ls.g.curLayerIndex,ls.g.prevNext)};ls.ieEasing=function(e){if($.trim(e.toLowerCase())=="swing"||$.trim(e.toLowerCase())== "linear")return e.toLowerCase();else return e.replace("easeinout","easeInOut").replace("easein","easeIn").replace("easeout","easeOut").replace("quad","Quad").replace("quart","Quart").replace("cubic","Cubic").replace("quint","Quint").replace("sine","Sine").replace("expo","Expo").replace("circ","Circ").replace("elastic","Elastic").replace("back","Back").replace("bounce","Bounce")};ls.prev=function(clicked){if(ls.g.curLayerIndex<2)ls.g.nextLoop+=1;if(ls.g.nextLoop>ls.o.loops&&ls.o.loops>0&&!clicked){ls.g.nextLoop= 0;ls.stop();if(ls.o.forceLoopNum==false)ls.o.loops=0}else{var prev=ls.g.curLayerIndex<2?ls.g.layersNum:ls.g.curLayerIndex-1;ls.g.prevNext="prev";ls.change(prev,ls.g.prevNext)}};ls.next=function(clicked){if($(".backstage-inner-frontendpreview").length);if(!ls.o.randomSlideshow){if(!(ls.g.curLayerIndexls.o.loops&&ls.o.loops>0&&!clicked){ls.g.nextLoop=0;ls.stop();if(ls.o.forceLoopNum==false)ls.o.loops=0}else{var next=ls.g.curLayerIndex 0)timeOut=ls.g.v.fi;ls.imgPreload(ls.g.nextLayer,function(){ls.animate()})};ls.imgPreload=function(layer,callback){if(!!!layer||!layer.length)return;ls.g.isLoading=true;if(ls.g.showSlider)$(el).css({visibility:"visible"});if(ls.o.imgPreload){var preImages=[];var preloaded=0;if(layer.css("background-image")!="none"&&layer.css("background-image").indexOf("url")!=-1&&!layer.hasClass("ls-preloaded")&&!layer.hasClass("ls-not-preloaded")){var bgi=layer.css("background-image");bgi=bgi.match(/url\((.*)\)/)[1].replace(/"/gi, "");preImages[preImages.length]=[bgi,layer]}layer.find("img:not(.ls-preloaded, .ls-not-preloaded)").each(function(){if(ls.o.lazyLoad===true)$(this).attr("src",$(this).data("src"));preImages[preImages.length]=[$(this).attr("src"),$(this)]});layer.find("*").each(function(){if($(this).css("background-image")!="none"&&$(this).css("background-image").indexOf("url")!=-1&&!$(this).hasClass("ls-preloaded")&&!$(this).hasClass("ls-not-preloaded")){var bgi=$(this).css("background-image");bgi=bgi.match(/url\((.*)\)/)[1].replace(/"/gi, "");preImages[preImages.length]=[bgi,$(this)]}});if(preImages.length==0){$(".ls-thumbnail-wrapper, .ls-nav-next, .ls-nav-prev, .ls-bottom-nav-wrapper").css({visibility:"visible"});ls.makeResponsive(layer,callback)}else{if(ls.g.ie78)ls.g.li.css("display","block");else ls.g.li.delay(400).fadeIn(300);for(x=0;x1024){ready.call(img);onready.end=true}};onready();img.onload=function(){!onready.end&&onready();load&&load.call(img);img=img.onload=img.onerror=null};if(!onready.end){list.push(onready);if(intervalId===null)intervalId=setInterval(tick, 40)}}}();ls.makeResponsive=function(layer,callback){layer.css({visibility:"hidden",display:"block"});if(ls.g.showShadow)ls.g.showShadow();ls.resizeSlider();if(ls.o.thumbnailNavigation=="always")ls.resizeThumb();layer.children().each(function(){var sl=$(this);var ol=sl.data("originalLeft")?sl.data("originalLeft"):"0";var ot=sl.data("originalTop")?sl.data("originalTop"):"0";if(sl.is("a")&&sl.children().length>0){sl.css({display:"block"});sl=sl.children()}var ow="auto";var oh="auto";if(sl.data("originalWidth"))if(typeof sl.data("originalWidth")== "number")ow=parseInt(sl.data("originalWidth"))*ls.g.ratio;else if(sl.data("originalWidth").indexOf("%")!=-1)ow=sl.data("originalWidth");if(sl.data("originalHeight"))if(typeof sl.data("originalHeight")=="number")oh=parseInt(sl.data("originalHeight"))*ls.g.ratio;else if(sl.data("originalHeight").indexOf("%")!=-1)oh=sl.data("originalHeight");var opl=sl.data("originalPaddingLeft")?parseInt(sl.data("originalPaddingLeft"))*ls.g.ratio:0;var opr=sl.data("originalPaddingRight")?parseInt(sl.data("originalPaddingRight"))* ls.g.ratio:0;var opt=sl.data("originalPaddingTop")?parseInt(sl.data("originalPaddingTop"))*ls.g.ratio:0;var opb=sl.data("originalPaddingBottom")?parseInt(sl.data("originalPaddingBottom"))*ls.g.ratio:0;var obl=sl.data("originalBorderLeft")?parseInt(sl.data("originalBorderLeft"))*ls.g.ratio:0;var obr=sl.data("originalBorderRight")?parseInt(sl.data("originalBorderRight"))*ls.g.ratio:0;var obt=sl.data("originalBorderTop")?parseInt(sl.data("originalBorderTop"))*ls.g.ratio:0;var obb=sl.data("originalBorderBottom")? parseInt(sl.data("originalBorderBottom"))*ls.g.ratio:0;var ofs=sl.data("originalFontSize");var olh=sl.data("originalLineHeight");if(ls.g.responsiveMode||ls.o.responsiveUnder>0){if(sl.is("img")&&!sl.hasClass("ls-bg")&&sl.attr("src")){sl.css({width:"auto",height:"auto"});if((ow==0||ow=="auto")&&typeof oh=="number"&&oh!=0)ow=oh/sl.height()*sl.width();if((oh==0||oh=="auto")&&typeof ow=="number"&&ow!=0)oh=ow/sl.width()*sl.height();if(ow=="auto")ow=sl.width()*ls.g.ratio;if(oh=="auto")oh=sl.height()*ls.g.ratio; sl.css({width:ow,height:oh})}if(!sl.is("img"))sl.css({width:ow,height:oh,"font-size":parseInt(ofs)*ls.g.ratio+"px","line-height":parseInt(olh)*ls.g.ratio+"px"});if(sl.is("div")&&sl.find("iframe").data("videoSrc")){var videoIframe=sl.find("iframe");videoIframe.attr("width",parseInt(videoIframe.data("originalWidth"))*ls.g.ratio).attr("height",parseInt(videoIframe.data("originalHeight"))*ls.g.ratio);sl.css({width:parseInt(videoIframe.data("originalWidth"))*ls.g.ratio,height:parseInt(videoIframe.data("originalHeight"))* ls.g.ratio})}sl.css({padding:opt+"px "+opr+"px "+opb+"px "+opl+"px ",borderLeftWidth:obl+"px",borderRightWidth:obr+"px",borderTopWidth:obt+"px",borderBottomWidth:obb+"px"})}if(!sl.hasClass("ls-bg")){var sl2=sl;if(sl.parent().is("a"))sl=sl.parent();var slC=0;if(ls.o.layersContainer)slC=ls.o.layersContainer>0?(ls.g.sliderWidth()-ls.o.layersContainer)/2:0;else if(ls.o.sublayerContainer)slC=ls.o.sublayerContainer>0?(ls.g.sliderWidth()-ls.o.sublayerContainer)/2:0;slC=slC<0?0:slC;if(ol.indexOf("%")!=-1)sl.css({left:ls.g.sliderWidth()/ 100*parseInt(ol)-sl2.width()/2-opl-obl});else if(slC>0||ls.g.responsiveMode||ls.o.responsiveUnder>0)sl.css({left:slC+parseInt(ol)*ls.g.ratio});if(ot.indexOf("%")!=-1)sl.css({top:ls.g.sliderHeight()/100*parseInt(ot)-sl2.height()/2-opt-obt});else if(ls.g.responsiveMode||ls.o.responsiveUnder>0)sl.css({top:parseInt(ot)*ls.g.ratio})}else{var inner=$(el).find(".ls-inner");sl.css({width:"auto",height:"auto"});ow=sl.width();oh=sl.height();ow=sl.data("ls-img-real-width")?sl.data("ls-img-real-width"):ow;oh= sl.data("ls-img-real-height")?sl.data("ls-img-real-height"):oh;var or=ls.g.ratio;if(ls.g.sliderOriginalWidth.indexOf("%")!=-1)if(ls.g.sliderWidth()>ow){or=ls.g.sliderWidth()/ow;if(ls.g.sliderHeight()>oh*or)or=ls.g.sliderHeight()/oh}else if(ls.g.sliderHeight()>oh){or=ls.g.sliderHeight()/oh;if(ls.g.sliderWidth()>ow*or)or=ls.g.sliderWidth()/ow}var newMarginTop=inner.height()/2-oh*or/2;if(Math.abs(newMarginTop)<1)newMarginTop=0;sl.css({width:ow*or,height:oh*or,marginLeft:inner.width()/2-ow*or/2,marginTop:newMarginTop})}}); layer.css({display:"none",visibility:"visible"});ls.resizeShadow();callback();$(this).dequeue()};ls.resizeShadow=function(){if(ls.g.shadowImg){var resizeShadow=function(){if(ls.g.shadowImg.height()>0)if(ls.g.shadowBtmMod>0)ls.g.shadow.css({height:ls.g.shadowImg.height()/2});else ls.g.shadow.css({height:ls.g.shadowImg.height(),marginTop:-ls.g.shadowImg.height()/2});else setTimeout(function(){resizeShadow()},50)};resizeShadow()}};ls.resizeSlider=function(){if(ls.o.responsiveUnder>0)if($(window).width()< ls.o.responsiveUnder){ls.g.responsiveMode=true;ls.g.sliderOriginalWidth=ls.o.responsiveUnder+"px"}else{ls.g.responsiveMode=false;ls.g.sliderOriginalWidth=ls.g.sliderOriginalWidthRU;ls.g.ratio=1}if(ls.g.responsiveMode){var parent=$(el).parent();$(el).css({width:parent.width()-parseInt($(el).css("padding-left"))-parseInt($(el).css("padding-right"))});ls.g.ratio=$(el).width()/parseInt(ls.g.sliderOriginalWidth);$(el).css({height:ls.g.ratio*parseInt(ls.g.sliderOriginalHeight)})}else{ls.g.ratio=1;$(el).css({width:ls.g.sliderOriginalWidth, height:ls.g.sliderOriginalHeight})}if($(el).closest(".ls-wp-fullwidth-container").length){$(el).closest(".ls-wp-fullwidth-helper").css({height:$(el).outerHeight(true)});$(el).closest(".ls-wp-fullwidth-container").css({height:$(el).outerHeight(true)});$(el).closest(".ls-wp-fullwidth-helper").css({width:$(window).width(),left:-$(el).closest(".ls-wp-fullwidth-container").offset().left});if(ls.g.sliderOriginalWidth.indexOf("%")!=-1){var percentWidth=parseInt(ls.g.sliderOriginalWidth);var newWidth=$("body").width()/ 100*percentWidth-($(el).outerWidth()-$(el).width());$(el).width(newWidth)}}$(el).find(".ls-inner, .ls-lt-container").css({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()});if(ls.g.curLayer&&ls.g.nextLayer){ls.g.curLayer.css({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()});ls.g.nextLayer.css({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()})}else $(el).find(".ls-slide").css({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()})};ls.resizeYourLogo=function(){ls.g.yourLogo.css({width:ls.g.yourLogo.data("originalWidth")* ls.g.ratio,height:ls.g.yourLogo.data("originalHeight")*ls.g.ratio});if(ls.g.ie78)ls.g.yourLogo.css("display","block");else ls.g.yourLogo.fadeIn(300);var oL=oR=oT=oB="auto";if(ls.g.yourLogo.data("originalLeft")&&ls.g.yourLogo.data("originalLeft").indexOf("%")!=-1)oL=ls.g.sliderWidth()/100*parseInt(ls.g.yourLogo.data("originalLeft"))-ls.g.yourLogo.width()/2+parseInt($(el).css("padding-left"));else oL=parseInt(ls.g.yourLogo.data("originalLeft"))*ls.g.ratio;if(ls.g.yourLogo.data("originalRight")&&ls.g.yourLogo.data("originalRight").indexOf("%")!= -1)oR=ls.g.sliderWidth()/100*parseInt(ls.g.yourLogo.data("originalRight"))-ls.g.yourLogo.width()/2+parseInt($(el).css("padding-right"));else oR=parseInt(ls.g.yourLogo.data("originalRight"))*ls.g.ratio;if(ls.g.yourLogo.data("originalTop")&&ls.g.yourLogo.data("originalTop").indexOf("%")!=-1)oT=ls.g.sliderHeight()/100*parseInt(ls.g.yourLogo.data("originalTop"))-ls.g.yourLogo.height()/2+parseInt($(el).css("padding-top"));else oT=parseInt(ls.g.yourLogo.data("originalTop"))*ls.g.ratio;if(ls.g.yourLogo.data("originalBottom")&& ls.g.yourLogo.data("originalBottom").indexOf("%")!=-1)oB=ls.g.sliderHeight()/100*parseInt(ls.g.yourLogo.data("originalBottom"))-ls.g.yourLogo.height()/2+parseInt($(el).css("padding-bottom"));else oB=parseInt(ls.g.yourLogo.data("originalBottom"))*ls.g.ratio;ls.g.yourLogo.css({left:oL,right:oR,top:oT,bottom:oB})};ls.resizeThumb=function(){ls.bottomNavSizeHelper("on");var sliderW=ls.g.sliderOriginalWidth.indexOf("%")==-1?parseInt(ls.g.sliderOriginalWidth):ls.g.sliderWidth();$(el).find(".ls-thumbnail-slide a").css({width:parseInt(ls.o.tnWidth* ls.g.ratio),height:parseInt(ls.o.tnHeight*ls.g.ratio)});$(el).find(".ls-thumbnail-slide a:last").css({margin:0});$(el).find(".ls-thumbnail-slide").css({height:parseInt(ls.o.tnHeight*ls.g.ratio)});var tn=$(el).find(".ls-thumbnail");var originalWidth=ls.o.tnContainerWidth.indexOf("%")==-1?parseInt(ls.o.tnContainerWidth):parseInt(sliderW/100*parseInt(ls.o.tnContainerWidth));tn.css({width:originalWidth*Math.floor(ls.g.ratio*100)/100});if(tn.width()>$(el).find(".ls-thumbnail-slide").width())tn.css({width:$(el).find(".ls-thumbnail-slide").width()}); ls.bottomNavSizeHelper("off")};ls.changeThumb=function(index){var curIndex=index?index:ls.g.nextLayerIndex;$(el).find(".ls-thumbnail-slide a:not(.ls-thumb-"+curIndex+")").children().each(function(){$(this).removeClass("ls-thumb-active").stop().fadeTo(750,ls.o.tnInactiveOpacity/100)});$(el).find(".ls-thumbnail-slide a.ls-thumb-"+curIndex).children().addClass("ls-thumb-active").stop().fadeTo(750,ls.o.tnActiveOpacity/100)};ls.scrollThumb=function(){if(!$(el).find(".ls-thumbnail-slide-container").hasClass("ls-thumbnail-slide-hover")){var curThumb= $(el).find(".ls-thumb-active").length?$(el).find(".ls-thumb-active").parent():false;if(curThumb){var thumbCenter=curThumb.position().left+curThumb.width()/2;var mL=$(el).find(".ls-thumbnail-slide-container").width()/2-thumbCenter;mL=mL<$(el).find(".ls-thumbnail-slide-container").width()-$(el).find(".ls-thumbnail-slide").width()?$(el).find(".ls-thumbnail-slide-container").width()-$(el).find(".ls-thumbnail-slide").width():mL;mL=mL>0?0:mL;$(el).find(".ls-thumbnail-slide").animate({marginLeft:mL},600)}}}; ls.bottomNavSizeHelper=function(val){if(ls.o.hoverBottomNav&&!$(el).hasClass("ls-hover"))switch(val){case "on":ls.g.thumbsWrapper.css({visibility:"hidden",display:"block"});break;case "off":ls.g.thumbsWrapper.css({visibility:"visible",display:"none"});break}};ls.animate=function(){if($(el).find(".ls-slide").length>1)ls.g.isAnimating=true;ls.g.isLoading=false;clearTimeout(ls.g.slideTimer);clearTimeout(ls.g.changeTimer);ls.g.stopLayer=ls.g.curLayer;ls.o.cbAnimStart(ls.g);if(ls.o.thumbnailNavigation== "always"){ls.changeThumb();if(!("ontouchstart"in window))ls.scrollThumb()}ls.g.nextLayer.addClass("ls-animating");var curLayerLeft=curLayerRight=curLayerTop=curLayerBottom=nextLayerLeft=nextLayerRight=nextLayerTop=nextLayerBottom=layerMarginLeft=layerMarginRight=layerMarginTop=layerMarginBottom="auto";var curLayerWidth=nextLayerWidth=ls.g.sliderWidth();var curLayerHeight=nextLayerHeight=ls.g.sliderHeight();var prevOrNext=ls.g.prevNext=="prev"?ls.g.curLayer:ls.g.nextLayer;var chooseDirection=prevOrNext.data("slidedirection")? prevOrNext.data("slidedirection"):ls.o.slideDirection;var slideDirection=ls.g.slideDirections[ls.g.prevNext][chooseDirection];if(slideDirection=="left"||slideDirection=="right"){curLayerWidth=curLayerTop=nextLayerWidth=nextLayerTop=0;layerMarginTop=0}if(slideDirection=="top"||slideDirection=="bottom"){curLayerHeight=curLayerLeft=nextLayerHeight=nextLayerLeft=0;layerMarginLeft=0}switch(slideDirection){case "left":curLayerRight=nextLayerLeft=0;layerMarginLeft=-ls.g.sliderWidth();break;case "right":curLayerLeft= nextLayerRight=0;layerMarginLeft=ls.g.sliderWidth();break;case "top":curLayerBottom=nextLayerTop=0;layerMarginTop=-ls.g.sliderHeight();break;case "bottom":curLayerTop=nextLayerBottom=0;layerMarginTop=ls.g.sliderHeight();break}ls.g.curLayer.css({left:curLayerLeft,right:curLayerRight,top:curLayerTop,bottom:curLayerBottom});ls.g.nextLayer.css({width:nextLayerWidth,height:nextLayerHeight,left:nextLayerLeft,right:nextLayerRight,top:nextLayerTop,bottom:nextLayerBottom});var curDelay=ls.g.curLayer.data("delayout")? parseInt(ls.g.curLayer.data("delayout")):ls.o.delayOut;var curDuration=ls.g.curLayer.data("durationout")?parseInt(ls.g.curLayer.data("durationout")):ls.o.durationOut;var curEasing=ls.g.curLayer.data("easingout")?ls.g.curLayer.data("easingout"):ls.o.easingOut;var nextDelay=ls.g.nextLayer.data("delayin")?parseInt(ls.g.nextLayer.data("delayin")):ls.o.delayIn;var nextDuration=ls.g.nextLayer.data("durationin")?parseInt(ls.g.nextLayer.data("durationin")):ls.o.durationIn;var nextEasing=ls.g.nextLayer.data("easingin")? ls.g.nextLayer.data("easingin"):ls.o.easingIn;var curLayer=function(){ls.g.curLayer.delay(curDelay+curDuration/15).animate({width:curLayerWidth,height:curLayerHeight},curDuration,curEasing,function(){curLayerCallback()})};var curLayerCallback=function(){ls.g.stopLayer.find(' \x3e *[class*\x3d"ls-l"]').each(function(){if($(this).data("tr"))$(this).data("tr").kill();$(this).css({filter:"none"})});ls.o.cbAnimStop(ls.g);ls.g.curLayer=ls.g.nextLayer;ls.g.curLayerIndex=ls.g.nextLayerIndex;$(el).find(".ls-slide:eq("+ (ls.g.curLayerIndex-1)+") .asl-txt-typewriter").each(function(item,index){var typeSpeed=$(this).data("typespeed");$(this).typewriter(typeSpeed);$(this).removeClass("typewriterNone")});if(ls.o.imgPreload&&ls.o.lazyLoad){var preLayerIndex=ls.g.curLayerIndex==ls.g.layersNum?1:ls.g.curLayerIndex+1;$(el).find(".ls-slide").eq(preLayerIndex-1).find("img:not(.ls-preloaded)").each(function(){$(this).load(function(){$(this).addClass("ls-preloaded")}).error(function(){var imgURL=$(this).data("src").substring($(this).data("src").lastIndexOf("/")+ 1,$(this).data("src").length);if(window.console)console.log('LayerSlider error:\r\n\r\nIt seems like the URL of the image or background image "'+imgURL+'" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your images used in the slider.');else alert('LayerSlider error:\r\n\r\nIt seems like the URL of the image or background image "'+imgURL+'" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your images used in the slider.'); $(this).addClass("ls-not-preloaded")}).attr("src",$(this).data("src"))})}$(el).find(".ls-slide").removeClass("ls-active");$(el).find(".ls-slide:eq("+(ls.g.curLayerIndex-1)+")").addClass("ls-active").removeClass("ls-animating");$(el).find(".ls-bottom-slidebuttons a").removeClass("ls-nav-active");$(el).find(".ls-bottom-slidebuttons a:eq("+(ls.g.curLayerIndex-1)+")").addClass("ls-nav-active");if(ls.g.autoSlideshow)ls.timer();ls.g.isAnimating=false;if(ls.g.resize==true)ls.makeResponsive(ls.g.curLayer, function(){ls.g.resize=false})};var curSubLayers=function(sublayersDurationOut){ls.g.curLayer.find(' \x3e *[class*\x3d"ls-l"]').each(function(){if(!$(this).data("transitiontype"))ls.transitionType($(this));$(this).removeClass("ls-videohack");var curSubSlideDir=$(this).data("slidedirection")?$(this).data("slidedirection"):slideDirection;var lml,lmt;switch(curSubSlideDir){case "left":lml=-ls.g.sliderWidth();lmt=0;break;case "right":lml=ls.g.sliderWidth();lmt=0;break;case "top":lmt=-ls.g.sliderHeight(); lml=0;break;case "bottom":lmt=ls.g.sliderHeight();lml=0;break;case "fade":lmt=0;lml=0;break}if($(this).data("transitiontype")==="new")var curSubSlideOutDir="new";else var curSubSlideOutDir=$(this).data("slideoutdirection")?$(this).data("slideoutdirection"):false;switch(curSubSlideOutDir){case "left":lml=ls.g.sliderWidth();lmt=0;break;case "right":lml=-ls.g.sliderWidth();lmt=0;break;case "top":lmt=ls.g.sliderHeight();lml=0;break;case "bottom":lmt=-ls.g.sliderHeight();lml=0;break;case "fade":lmt=0; lml=0;break;case "new":if($(this).data("offsetxout"))if($(this).data("offsetxout")==="left")lml=ls.g.sliderWidth();else if($(this).data("offsetxout")==="right")lml=-ls.g.sliderWidth();else lml=-parseInt($(this).data("offsetxout"));else lml=-ls.lt.offsetXOut;if($(this).data("offsetyout"))if($(this).data("offsetyout")==="top")lmt=ls.g.sliderHeight();else if($(this).data("offsetyout")==="bottom")lmt=-ls.g.sliderHeight();else lmt=-parseInt($(this).data("offsetyout"));else lmt=-ls.lt.offsetYOut;break}var curSubRotate= curSubRotateX=curSubRotateY=curSubScale=curSubSkewX=curSubSkewY=curSubScaleX=curSubScaleY="none";curSubRotate=$(this).data("rotateout")?$(this).data("rotateout"):ls.lt.rotateOut;curSubRotateX=$(this).data("rotatexout")?$(this).data("rotatexout"):ls.lt.rotateXOut;curSubRotateY=$(this).data("rotateyout")?$(this).data("rotateyout"):ls.lt.rotateYOut;curSubScale=$(this).data("scaleout")?$(this).data("scaleout"):ls.lt.scaleOut;curSubSkewX=$(this).data("skewxout")?$(this).data("skewxout"):ls.lt.skewXOut; curSubSkewY=$(this).data("skewyout")?$(this).data("skewyout"):ls.lt.skewYOut;if(curSubScale===1){curSubScaleX=$(this).data("scalexout")?$(this).data("scalexout"):ls.lt.scaleXOut;curSubScaleY=$(this).data("scaleyout")?$(this).data("scaleyout"):ls.lt.scaleYOut}else curSubScaleX=curSubScaleY=curSubScale;var too=$(this).data("transformoriginout")?$(this).data("transformoriginout").split(" "):ls.lt.transformOriginOut;for(var t=0;t$(this).outerHeight()?$(this).outerWidth():$(this).outerHeight(); var modX=parseInt(curSubRotate)===0?$(this).outerWidth():wh;var modY=parseInt(curSubRotate)===0?$(this).outerHeight():wh;if(curSubPLevel===-1&&curSubSlideOutDir!=="new"||($(this).data("offsetxout")==="left"||$(this).data("offsetxout")==="right"))if(lml<0)lml=-(ls.g.sliderWidth()-endLeft+(curSubScaleX/2-.5)*modX+100);else{if(lml>0)lml=endLeft+(curSubScaleX/2+.5)*modX+100}else lml=lml*ls.g.ratio;if(curSubPLevel===-1&&curSubSlideOutDir!=="new"||($(this).data("offsetyout")==="top"||$(this).data("offsetyout")=== "bottom"))if(lmt<0)lmt=-(ls.g.sliderHeight()-endTop+(curSubScaleY/2-.5)*modY+100);else{if(lmt>0)lmt=endTop+(curSubScaleY/2+.5)*modY+100}else lmt=lmt*ls.g.ratio;if(curSubPLevel===-1||curSubSlideOutDir==="new")var curSubPar=1;else{var curSubParMod=ls.g.curLayer.data("parallaxout")?parseInt(ls.g.curLayer.data("parallaxout")):ls.o.parallaxOut;var curSubPar=curSubPLevel*curSubParMod}if($(this).data("transitiontype")==="new"){var deO=ls.lt.delayOut;var duO=ls.lt.durationOut;var eO=ls.lt.easingOut}else{var deO= ls.o.delayOut;var duO=ls.o.durationOut;var eO=ls.o.easingOut}var curSubDelay=$(this).data("delayout")?parseInt($(this).data("delayout")):deO;var curSubTime=$(this).data("durationout")?parseInt($(this).data("durationout")):duO;var curSubEasing=$(this).data("easingout")?$(this).data("easingout"):eO;if(sublayersDurationOut){curSubDelay=0;curSubTime=sublayersDurationOut}if($(this).data("showUntilTimer"))clearTimeout($(this).data("showUntilTimer"));var css={visibility:"hidden"};var el=$(this);var transition= {rotation:curSubRotate,rotationX:curSubRotateX,rotationY:curSubRotateY,skewX:curSubSkewX,skewY:curSubSkewY,scaleX:curSubScaleX,scaleY:curSubScaleY,x:-lml*curSubPar,y:-lmt*curSubPar,delay:curSubDelay/1E3,ease:lsConvertEasing(curSubEasing),onComplete:function(){el.css(css)}};if(curSubSlideOutDir=="fade"||!curSubSlideOutDir&&curSubSlideDir==="fade"||$(this).data("fadeout")!=="false"&&$(this).data("transitiontype")==="new"){transition["opacity"]=0;css["opacity"]=$(this).data("originalOpacity")}if($(this).data("tr"))$(this).data("tr").kill(); TweenLite.set($(this)[0],{transformOrigin:curSubTransformOrigin,transformPerspective:curSubPerspective});$(this).data("tr",TweenLite.to($(this)[0],curSubTime/1E3,transition))})};var nextLayer=function(){ls.g.nextLayer.delay(curDelay+nextDelay).animate({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()},nextDuration,nextEasing)};var nextSubLayers=function(){if(ls.g.totalDuration)curDelay=0;if(typeof ls.o.cbTimeLineStart==="function")ls.o.cbTimeLineStart(ls.g,curDelay+nextDelay);ls.g.nextLayer.find(' \x3e *[class*\x3d"ls-l"]').each(function(){if(!$(this).data("transitiontype"))ls.transitionType($(this)); if($(this).data("transitiontype")==="new")var nextSubSlideDir="new";else var nextSubSlideDir=$(this).data("slidedirection")?$(this).data("slidedirection"):slideDirection;var lml,lmt;switch(nextSubSlideDir){case "left":lml=-ls.g.sliderWidth();lmt=0;break;case "right":lml=ls.g.sliderWidth();lmt=0;break;case "top":lmt=-ls.g.sliderHeight();lml=0;break;case "bottom":lmt=ls.g.sliderHeight();lml=0;break;case "fade":lmt=0;lml=0;break;case "new":if($(this).data("offsetxin"))if($(this).data("offsetxin")=== "left")lml=-ls.g.sliderWidth();else if($(this).data("offsetxin")==="right")lml=ls.g.sliderWidth();else lml=parseInt($(this).data("offsetxin"));else lml=ls.lt.offsetXIn;if($(this).data("offsetyin"))if($(this).data("offsetyin")==="top")lmt=-ls.g.sliderHeight();else if($(this).data("offsetyin")==="bottom")lmt=ls.g.sliderHeight();else lmt=parseInt($(this).data("offsetyin"));else lmt=ls.lt.offsetYIn;break}var nextSubRotate=nextSubRotateX=nextSubRotateY=nextSubScale=nextSubSkewX=nextSubSkewY=nextSubScaleX= nextSubScaleY="none";nextSubRotate=$(this).data("rotatein")?$(this).data("rotatein"):ls.lt.rotateIn;nextSubRotateX=$(this).data("rotatexin")?$(this).data("rotatexin"):ls.lt.rotateXIn;nextSubRotateY=$(this).data("rotateyin")?$(this).data("rotateyin"):ls.lt.rotateYIn;nextSubScale=$(this).data("scalein")?$(this).data("scalein"):ls.lt.scaleIn;nextSubSkewX=$(this).data("skewxin")?$(this).data("skewxin"):ls.lt.skewXIn;nextSubSkewY=$(this).data("skewyin")?$(this).data("skewyin"):ls.lt.skewYIn;if(nextSubScale=== 1){nextSubScaleX=$(this).data("scalexin")?$(this).data("scalexin"):ls.lt.scaleXIn;nextSubScaleY=$(this).data("scaleyin")?$(this).data("scaleyin"):ls.lt.scaleYIn}else nextSubScaleX=nextSubScaleY=nextSubScale;var toi=$(this).data("transformoriginin")?$(this).data("transformoriginin").split(" "):ls.lt.transformOriginIn;for(var t=0;t$(this).outerHeight()?$(this).outerWidth(): $(this).outerHeight();var modX=parseInt(nextSubRotate)===0?$(this).outerWidth():wh;var modY=parseInt(nextSubRotate)===0?$(this).outerHeight():wh;if(nextSubPLevel===-1&&nextSubSlideDir!=="new"||($(this).data("offsetxin")==="left"||$(this).data("offsetxin")==="right"))if(lml<0)lml=-(endLeft+(nextSubScaleX/2+.5)*modX+100);else{if(lml>0)lml=ls.g.sliderWidth()-endLeft+(nextSubScaleX/2-.5)*modX+100}else lml=lml*ls.g.ratio;if(nextSubPLevel===-1&&nextSubSlideDir!=="new"||($(this).data("offsetyin")==="top"|| $(this).data("offsetyin")==="bottom"))if(lmt<0)lmt=-(endTop+(nextSubScaleY/2+.5)*modY+100);else{if(lmt>0)lmt=ls.g.sliderHeight()-endTop+(nextSubScaleY/2-.5)*modY+100}else lmt=lmt*ls.g.ratio;if(nextSubPLevel===-1||nextSubSlideDir==="new")var nextSubPar=1;else{var nextSubParMod=ls.g.nextLayer.data("parallaxin")?parseInt(ls.g.nextLayer.data("parallaxin")):ls.o.parallaxIn;var nextSubPar=nextSubPLevel*nextSubParMod}if($(this).data("transitiontype")==="new"){var deI=ls.lt.delayIn;var duI=ls.lt.durationIn; var eI=ls.lt.easingIn}else{var deI=ls.o.delayIn;var duI=ls.o.durationIn;var eI=ls.o.easingIn}var nextSubDelay=$(this).data("delayin")?parseInt($(this).data("delayin")):deI;var nextSubTime=$(this).data("durationin")?parseInt($(this).data("durationin")):duI;var nextSubEasing=$(this).data("easingin")?$(this).data("easingin"):eI;var cursub=$(this);var nextSubCallback=function(){if(cursub.hasClass("ls-video-layer"))cursub.addClass("ls-videohack");if(ls.o.autoPlayVideos==true)cursub.find(".ls-videopreview, video, audio").click(); if(cursub.data("showuntil")>0)cursub.data("showUntilTimer",setTimeout(function(){ls.sublayerShowUntil(cursub)},cursub.data("showuntil")))};$(this).css({marginLeft:0,marginTop:0});var css={scaleX:nextSubScaleX,scaleY:nextSubScaleY,skewX:nextSubSkewX,skewY:nextSubSkewY,rotation:nextSubRotate,rotationX:nextSubRotateX,rotationY:nextSubRotateY,visibility:"visible",x:lml*nextSubPar,y:lmt*nextSubPar};var transition={rotation:0,rotationX:0,rotationY:0,skewX:0,skewY:0,scaleX:1,scaleY:1,ease:lsConvertEasing(nextSubEasing), delay:nextSubDelay/1E3,x:0,y:0,onComplete:function(){nextSubCallback()}};if(nextSubSlideDir.indexOf("fade")!=-1||$(this).data("fadein")!=="false"&&$(this).data("transitiontype")==="new"){css["opacity"]=0;transition["opacity"]=$(this).data("originalOpacity")}if($(this).data("tr"))$(this).data("tr").kill();TweenLite.set($(this)[0],{transformPerspective:nextSubPerspective,transformOrigin:nextSubTransformOrigin});$(this).data("tr",TweenLite.fromTo($(this)[0],nextSubTime/1E3,css,transition))})};var selectTransition= function(){if(lsSupport3D($(el))&&(ls.g.nextLayer.data("transition3d")||ls.g.nextLayer.data("customtransition3d")))if(ls.g.nextLayer.data("transition3d")&&ls.g.nextLayer.data("customtransition3d")){var rnd=Math.floor(Math.random()*2);var rndT=[["3d",ls.g.nextLayer.data("transition3d")],["custom3d",ls.g.nextLayer.data("customtransition3d")]];getTransitionType(rndT[rnd][0],rndT[rnd][1])}else if(ls.g.nextLayer.data("transition3d"))getTransitionType("3d",ls.g.nextLayer.data("transition3d"));else getTransitionType("custom3d", ls.g.nextLayer.data("customtransition3d"));else if(ls.g.nextLayer.data("transition2d")&&ls.g.nextLayer.data("customtransition2d")){var rnd=Math.floor(Math.random()*2);var rndT=[["2d",ls.g.nextLayer.data("transition2d")],["custom2d",ls.g.nextLayer.data("customtransition2d")]];getTransitionType(rndT[rnd][0],rndT[rnd][1])}else if(ls.g.nextLayer.data("transition2d"))getTransitionType("2d",ls.g.nextLayer.data("transition2d"));else if(ls.g.nextLayer.data("customtransition2d"))getTransitionType("custom2d", ls.g.nextLayer.data("customtransition2d"));else getTransitionType("2d","1")};var selectCustomTransition=function(){if(lsSupport3D($(el))&&LSCustomTransition.indexOf("3d")!=-1)getTransitionType("3d",LSCustomTransition.split(":")[1]);else if(LSCustomTransition.indexOf("3d")!=-1)getTransitionType("2d","all");else getTransitionType("2d",LSCustomTransition.split(":")[1])};var getTransitionType=function(type,transitionlist){var tr=type.indexOf("custom")==-1?ls.t:ls.ct;var tt="3d",lt,number;if(type.indexOf("2d")!= -1)tt="2d";if(transitionlist.indexOf("last")!=-1){number=tr["t"+tt].length-1;lt="last"}else if(transitionlist.indexOf("all")!=-1){number=Math.floor(Math.random()*lsCountProp(tr["t"+tt]));lt="random from all"}else{var t=transitionlist.split(",");var l=t.length;number=parseInt(t[Math.floor(Math.random()*l)])-1;lt="random from specified"}slideTransition(tt,tr["t"+tt][number])};var slideTransition=function(type,prop){var inner=$(el).find(".ls-inner");var sublayersDurationOut=ls.g.curLayer.find('*[class*\x3d"ls-l"]').length> 0?1E3:0;var carousel=prop.name.toLowerCase().indexOf("carousel")==-1?false:true;var crossfade=prop.name.toLowerCase().indexOf("crossfad")==-1?false:true;var cols=typeof prop.cols;var rows=typeof prop.rows;switch(cols){case "number":cols=prop.cols;break;case "string":cols=Math.floor(Math.random()*(parseInt(prop.cols.split(",")[1])-parseInt(prop.cols.split(",")[0])+1))+parseInt(prop.cols.split(",")[0]);break;default:cols=Math.floor(Math.random()*(prop.cols[1]-prop.cols[0]+1))+prop.cols[0];break}switch(rows){case "number":rows= prop.rows;break;case "string":rows=Math.floor(Math.random()*(parseInt(prop.rows.split(",")[1])-parseInt(prop.rows.split(",")[0])+1))+parseInt(prop.rows.split(",")[0]);break;default:rows=Math.floor(Math.random()*(prop.rows[1]-prop.rows[0]+1))+prop.rows[0];break}if(ls.g.isMobile()==true&&ls.o.optimizeForMobile==true||ls.g.ie78&&ls.o.optimizeForIE78==true){if(cols>=15)cols=7;else if(cols>=5)cols=4;else if(cols>=4)cols=3;else if(cols>2)cols=2;if(rows>=15)rows=7;else if(rows>=5)rows=4;else if(rows>=4)rows= 3;else if(rows>2)rows=2;if(rows>2&&cols>2){rows=2;if(cols>4)cols=4}}var tileWidth=$(el).find(".ls-inner").width()/cols;var tileHeight=$(el).find(".ls-inner").height()/rows;if(!ls.g.ltContainer)ls.g.ltContainer=$("\x3cdiv\x3e").addClass("ls-lt-container").addClass("ls-overflow-hidden").css({width:inner.width(),height:inner.height()}).prependTo(inner);else ls.g.ltContainer.stop(true,true).empty().css({display:"block",width:inner.width(),height:inner.height()});var restW=inner.width()-Math.floor(tileWidth)* cols;var restH=inner.height()-Math.floor(tileHeight)*rows;var tileSequence=[];tileSequence.randomize=function(){var i=this.length,j,tempi,tempj;if(i==0)return false;while(--i){j=Math.floor(Math.random()*(i+1));tempi=this[i];tempj=this[j];this[i]=tempj;this[j]=tempi}return this};for(var ts=0;ts(rows-1)*cols-1?restH:0;var tile=$("\x3cdiv\x3e").addClass("ls-lt-tile").css({width:Math.floor(tileWidth)+rW,height:Math.floor(tileHeight)+rH}).appendTo(ls.g.ltContainer);var curTile,nextTile;if(type=="3d"){tile.addClass("ls-3d-container");var W=Math.floor(tileWidth)+rW;var H=Math.floor(tileHeight)+rH;var D;if(prop.animation.direction== "horizontal")if(Math.abs(prop.animation.transition.rotateY)>90&&prop.tile.depth!="large")D=Math.floor(W/7)+rW;else D=W;else if(Math.abs(prop.animation.transition.rotateX)>90&&prop.tile.depth!="large")D=Math.floor(H/7)+rH;else D=H;var W2=W/2;var H2=H/2;var D2=D/2;var createCuboids=function(c,a,w,h,tx,ty,tz,rx,ry){$("\x3cdiv\x3e").addClass(c).css({width:w,height:h,"-o-transform":"translate3d("+tx+"px, "+ty+"px, "+tz+"px) rotateX("+rx+"deg) rotateY("+ry+"deg) rotateZ(0deg) scale3d(1, 1, 1) translate(50%, 50%)", "-ms-transform":"translate3d("+tx+"px, "+ty+"px, "+tz+"px) rotateX("+rx+"deg) rotateY("+ry+"deg) rotateZ(0deg) scale3d(1, 1, 1) translate(50%, 50%)","-moz-transform":"translate3d("+tx+"px, "+ty+"px, "+tz+"px) rotateX("+rx+"deg) rotateY("+ry+"deg) rotateZ(0deg) scale3d(1, 1, 1) translate(50%, 50%)","-webkit-transform":"translate3d("+tx+"px, "+ty+"px, "+tz+"px) rotateX("+rx+"deg) rotateY("+ry+"deg) rotateZ(0deg) scale3d(1, 1, 1) translate(50%, 50%)","transform":"translate3d("+tx+"px, "+ty+"px, "+tz+ "px) rotateX("+rx+"deg) rotateY("+ry+"deg) rotateZ(0deg) scale3d(1, 1, 1) translate(50%, 50%)"}).appendTo(a)};createCuboids("ls-3d-box",tile,0,0,0,0,-D2,0,0);var backRotX=0;var topRotX=0;var bottomRotX=0;if(prop.animation.direction=="vertical"&&Math.abs(prop.animation.transition.rotateX)>90)createCuboids("ls-3d-back",tile.find(".ls-3d-box"),W,H,-W2,-H2,-D2,180,0);else createCuboids("ls-3d-back",tile.find(".ls-3d-box"),W,H,-W2,-H2,-D2,0,180);createCuboids("ls-3d-bottom",tile.find(".ls-3d-box"),W,D, -W2,H2-D2,0,-90,0);createCuboids("ls-3d-top",tile.find(".ls-3d-box"),W,D,-W2,-H2-D2,0,90,0);createCuboids("ls-3d-front",tile.find(".ls-3d-box"),W,H,-W2,-H2,D2,0,0);createCuboids("ls-3d-left",tile.find(".ls-3d-box"),D,H,-W2-D2,-H2,0,0,-90);createCuboids("ls-3d-right",tile.find(".ls-3d-box"),D,H,W2-D2,-H2,0,0,90);curTile=tile.find(".ls-3d-front");if(prop.animation.direction=="horizontal")if(Math.abs(prop.animation.transition.rotateY)>90)nextTile=tile.find(".ls-3d-back");else nextTile=tile.find(".ls-3d-left, .ls-3d-right"); else if(Math.abs(prop.animation.transition.rotateX)>90)nextTile=tile.find(".ls-3d-back");else nextTile=tile.find(".ls-3d-top, .ls-3d-bottom");var curCubDelay=tileSequence[tiles]*prop.tile.delay;var curCub=ls.g.ltContainer.find(".ls-3d-container:eq("+tiles+") .ls-3d-box");var tl=new TimelineLite;if(prop.before&&prop.before.transition){prop.before.transition.delay=prop.before.transition.delay?(prop.before.transition.delay+curCubDelay)/1E3:curCubDelay/1E3;tl.to(curCub[0],prop.before.duration/1E3,lsConvertTransition(prop.before.transition, prop.before.easing))}else prop.animation.transition.delay=prop.animation.transition.delay?(prop.animation.transition.delay+curCubDelay)/1E3:curCubDelay/1E3;tl.to(curCub[0],prop.animation.duration/1E3,lsConvertTransition(prop.animation.transition,prop.animation.easing));if(prop.after){if(!prop.after.transition)prop.after.transition={};tl.to(curCub[0],prop.after.duration/1E3,lsConvertTransition(prop.after.transition,prop.after.easing,"after"))}}else{var T1=L1=T2=L2="auto";var O1=O2=1;if(prop.transition.direction== "random"){var dir=["top","bottom","right","left"];var direction=dir[Math.floor(Math.random()*dir.length)]}else var direction=prop.transition.direction;if(prop.name.toLowerCase().indexOf("mirror")!=-1&&tiles%2==0)if(pn=="prev")pn="next";else pn="prev";if(pn=="prev")switch(direction){case "top":direction="bottom";break;case "bottom":direction="top";break;case "left":direction="right";break;case "right":direction="left";break;case "topleft":direction="bottomright";break;case "topright":direction="bottomleft"; break;case "bottomleft":direction="topright";break;case "bottomright":direction="topleft";break}switch(direction){case "top":T1=T2=-tile.height();L1=L2=0;break;case "bottom":T1=T2=tile.height();L1=L2=0;break;case "left":T1=T2=0;L1=L2=-tile.width();break;case "right":T1=T2=0;L1=L2=tile.width();break;case "topleft":T1=tile.height();T2=0;L1=tile.width();L2=0;break;case "topright":T1=tile.height();T2=0;L1=-tile.width();L2=0;break;case "bottomleft":T1=-tile.height();T2=0;L1=tile.width();L2=0;break;case "bottomright":T1= -tile.height();T2=0;L1=-tile.width();L2=0;break}ls.g.scale2D=prop.transition.scale?prop.transition.scale:1;if(carousel==true&&ls.g.scale2D!=1){T1=T1/2;T2=T2/2;L1=L1/2;L2=L2/2}switch(prop.transition.type){case "fade":T1=T2=L1=L2=0;O1=0;O2=1;break;case "mixed":O1=0;O2=1;if(ls.g.scale2D==1)T2=L2=0;break}if((prop.transition.rotate||prop.transition.rotateX||prop.transition.rotateY||ls.g.scale2D!=1)&&!ls.g.ie78&&prop.transition.type!="slide")tile.css({overflow:"visible"});else tile.css({overflow:"hidden"}); if(carousel==true)ls.g.curTiles.css({overflow:"visible"});else ls.g.curTiles.css({overflow:"hidden"});if(crossfade==true||prop.transition.type=="slide"||carousel==true){var tileInCur=tile.appendTo(ls.g.curTiles);var tileInNext=tile.clone().appendTo(ls.g.nextTiles);curTile=$("\x3cdiv\x3e").addClass("ls-curtile").appendTo(tileInCur)}else var tileInNext=tile.appendTo(ls.g.nextTiles);nextTile=$("\x3cdiv\x3e").addClass("ls-nexttile").appendTo(tileInNext).css({top:-T1,left:-L1,dispay:"block",opacity:O1}); var curTileDelay=tileSequence[tiles]*prop.tile.delay;var r=prop.transition.rotate?prop.transition.rotate:0;var rX=prop.transition.rotateX?prop.transition.rotateX:0;var rY=prop.transition.rotateY?prop.transition.rotateY:0;if(pn=="prev"){r=-r;rX=-rX;rY=-rY}TweenLite.fromTo(nextTile[0],prop.transition.duration/1E3,{rotation:r,rotationX:rX,rotationY:rY,scale:ls.g.scale2D},{delay:curTileDelay/1E3,top:0,left:0,opacity:O2,rotation:0,rotationX:0,rotationY:0,scale:1,ease:lsConvertEasing(prop.transition.easing)}); if(crossfade==true&&(nextBG.length<1||nextBG.length>0&&(nextBG.attr("src").toLowerCase().indexOf("png")!=-1||(nextBG.width()0?ls.g.totalDuration+nextLayerTimeShift:0;setTimeout(function(){if(ls.g.resize==true){ls.g.ltContainer.empty();curLayer.removeClass("ls-active");ls.makeResponsive(nextLayer,function(){ls.g.resize=false})}nextSubLayers();if(nextLayer.find(".ls-bg").length<1||nextLayer.find(".ls-bg").length>0&&nextLayer.find(".ls-bg").attr("src").toLowerCase().indexOf("png")!=-1)ls.g.ltContainer.delay(350).fadeOut(300,function(){$(this).empty().show()}); nextLayer.css({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()})},nextLayerDelay);if(ls.g.totalDuration<300)ls.g.totalDuration=1E3;setTimeout(function(){ls.g.ltContainer.addClass("ls-overflow-hidden");nextLayer.find(".asl-txt-typewriter").addClass("typewriterNone");nextLayer.addClass("ls-active");if(nextLayer.find(".ls-bg").length){nextLayer.find(".ls-bg").css({display:"none",visibility:"visible"});if(ls.g.ie78){nextLayer.find(".ls-bg").css("display","block");curLayerCallback();setTimeout(function(){}, 500)}else{curLayerCallback();nextLayer.find(".ls-bg").fadeIn(500,function(){})}}else curLayerCallback()},ls.g.totalDuration)};var tType=(ls.g.nextLayer.data("transition3d")||ls.g.nextLayer.data("transition2d"))&&ls.t||(ls.g.nextLayer.data("customtransition3d")||ls.g.nextLayer.data("customtransition2d"))&&ls.ct?"new":"old";if(!ls.g.nextLayer.data("transitiontype"))ls.transitionType(ls.g.nextLayer);if(ls.g.nextLayer.data("transitiontype")==="new")tType="new";if(ls.o.slideTransition)tType="forced";if(ls.o.animateFirstSlide&& !ls.g.firstSlideAnimated){if(ls.g.layersNum==1){var curDelay=0;ls.o.cbAnimStop(ls.g)}else{var nextLayerTimeShift=parseInt(ls.g.nextLayer.data("timeshift"))?parseInt(ls.g.nextLayer.data("timeshift")):0;var d=tType=="new"?0:curDuration;ls.g.t5=setTimeout(function(){curLayerCallback()},d+Math.abs(nextLayerTimeShift))}ls.g.totalDuration=true;nextSubLayers();ls.g.nextLayer.css({width:ls.g.sliderWidth(),height:ls.g.sliderHeight()});if(!ls.g.ie78)ls.g.nextLayer.find(".ls-bg").css({display:"none"}).fadeIn(500); ls.g.firstSlideAnimated=true;ls.g.isLoading=false}else switch(tType){case "old":ls.g.totalDuration=false;if(ls.g.ltContainer)ls.g.ltContainer.empty();curLayer();curSubLayers();nextLayer();nextSubLayers();break;case "new":if(typeof LSCustomTransition!="undefined")selectCustomTransition();else selectTransition();break;case "forced":slideTransition(ls.o.slideTransition.type,ls.o.slideTransition.obj);break}};ls.transitionType=function(el){var ttype=el.data("ls")||!el.data("ls")&&!el.data("slidedelay")&& !el.data("slidedirection")&&!el.data("slideoutdirection")&&!el.data("delayin")&&!el.data("delayout")&&!el.data("durationin")&&!el.data("durationout")&&!el.data("showuntil")&&!el.data("easingin")&&!el.data("easingout")&&!el.data("scalein")&&!el.data("scaleout")&&!el.data("rotatein")&&!el.data("rotateout")?"new":"old";el.data("transitiontype",ttype)};ls.sublayerShowUntil=function(sublayer){if(!sublayer.data("transitiontype"))ls.transitionType(sublayer);sublayer.removeClass("ls-videohack");var prevOrNext= ls.g.curLayer;if(ls.g.prevNext!="prev"&&ls.g.nextLayer)prevOrNext=ls.g.nextLayer;var chooseDirection=prevOrNext.data("slidedirection")?prevOrNext.data("slidedirection"):ls.o.slideDirection;var slideDirection=ls.g.slideDirections[ls.g.prevNext][chooseDirection];var curSubSlideDir=sublayer.data("slidedirection")?sublayer.data("slidedirection"):slideDirection;var lml,lmt;switch(curSubSlideDir){case "left":lml=-ls.g.sliderWidth();lmt=0;break;case "right":lml=ls.g.sliderWidth();lmt=0;break;case "top":lmt= -ls.g.sliderHeight();lml=0;break;case "bottom":lmt=ls.g.sliderHeight();lml=0;break;case "fade":lmt=0;lml=0;break}if(sublayer.data("transitiontype")==="new")var curSubSlideOutDir="new";else var curSubSlideOutDir=sublayer.data("slideoutdirection")?sublayer.data("slideoutdirection"):false;switch(curSubSlideOutDir){case "left":lml=ls.g.sliderWidth();lmt=0;break;case "right":lml=-ls.g.sliderWidth();lmt=0;break;case "top":lmt=ls.g.sliderHeight();lml=0;break;case "bottom":lmt=-ls.g.sliderHeight();lml=0; break;case "fade":lmt=0;lml=0;break;case "new":if(sublayer.data("offsetxout"))if(sublayer.data("offsetxout")==="left")lml=ls.g.sliderWidth();else if(sublayer.data("offsetxout")==="right")lml=-ls.g.sliderWidth();else lml=-parseInt(sublayer.data("offsetxout"));else lml=-ls.lt.offsetXOut;if(sublayer.data("offsetyout"))if(sublayer.data("offsetyout")==="top")lmt=ls.g.sliderHeight();else if(sublayer.data("offsetyout")==="bottom")lmt=-ls.g.sliderHeight();else lmt=-parseInt(sublayer.data("offsetyout"));else lmt= -ls.lt.offsetYOut;break}var curSubRotate=curSubRotateX=curSubRotateY=curSubScale=curSubSkewX=curSubSkewY=curSubScaleX=curSubScaleY="none";curSubRotate=sublayer.data("rotateout")?sublayer.data("rotateout"):ls.lt.rotateOut;curSubRotateX=sublayer.data("rotatexout")?sublayer.data("rotatexout"):ls.lt.rotateXOut;curSubRotateY=sublayer.data("rotateyout")?sublayer.data("rotateyout"):ls.lt.rotateYOut;curSubScale=sublayer.data("scaleout")?sublayer.data("scaleout"):ls.lt.scaleOut;curSubSkewX=sublayer.data("skewxout")? sublayer.data("skewxout"):ls.lt.skewXOut;curSubSkewY=sublayer.data("skewyout")?sublayer.data("skewyout"):ls.lt.skewYOut;if(curSubScale===1){curSubScaleX=sublayer.data("scalexout")?sublayer.data("scalexout"):ls.lt.scaleXOut;curSubScaleY=sublayer.data("scaleyout")?sublayer.data("scaleyout"):ls.lt.scaleYOut}else curSubScaleX=curSubScaleY=curSubScale;var too=sublayer.data("transformoriginout")?sublayer.data("transformoriginout").split(" "):ls.lt.transformOriginOut;for(var t=0;tsublayer.outerHeight()? sublayer.outerWidth():sublayer.outerHeight();var modX=parseInt(curSubRotate)===0?sublayer.outerWidth():wh;var modY=parseInt(curSubRotate)===0?sublayer.outerHeight():wh;if(curSubPLevel===-1&&curSubSlideOutDir!=="new"||(sublayer.data("offsetxout")==="left"||sublayer.data("offsetxout")==="right"))if(lml<0)lml=-(ls.g.sliderWidth()-endLeft+(curSubScaleX/2-.5)*modX+100);else{if(lml>0)lml=endLeft+(curSubScaleX/2+.5)*modX+100}else lml=lml*ls.g.ratio;if(curSubPLevel===-1&&curSubSlideOutDir!=="new"||(sublayer.data("offsetyout")=== "top"||sublayer.data("offsetyout")==="bottom"))if(lmt<0)lmt=-(ls.g.sliderHeight()-endTop+(curSubScaleY/2-.5)*modY+100);else{if(lmt>0)lmt=endTop+(curSubScaleY/2+.5)*modY+100}else lmt=lmt*ls.g.ratio;if(curSubPLevel===-1||curSubSlideOutDir==="new")var curSubPar=1;else{var curSubParMod=ls.g.curLayer.data("parallaxout")?parseInt(ls.g.curLayer.data("parallaxout")):ls.o.parallaxOut;var curSubPar=curSubPLevel*curSubParMod}if(sublayer.data("transitiontype")==="new"){var duO=ls.lt.durationOut;var eO=ls.lt.easingOut}else{var duO= ls.o.durationOut;var eO=ls.o.easingOut}var curSubTime=sublayer.data("durationout")?parseInt(sublayer.data("durationout")):duO;var curSubEasing=sublayer.data("easingout")?sublayer.data("easingout"):eO;var css={visibility:"hidden"};var transition={rotation:curSubRotate,rotationX:curSubRotateX,rotationY:curSubRotateY,skewX:curSubSkewX,skewY:curSubSkewY,scaleX:curSubScaleX,scaleY:curSubScaleY,x:-lml*curSubPar,y:-lmt*curSubPar,ease:lsConvertEasing(curSubEasing),onComplete:function(){sublayer.css(css)}}; if(curSubSlideOutDir=="fade"||!curSubSlideOutDir&&curSubSlideDir=="fade"||sublayer.data("fadeout")!=="false"&&sublayer.data("transitiontype")==="new"){transition["opacity"]=0;css["opacity"]=sublayer.data("originalOpacity")}TweenLite.set(sublayer[0],{transformPerspective:curSubPerspective,transformOrigin:curSubTransformOrigin});TweenLite.to(sublayer[0],curSubTime/1E3,transition)};ls.debug=function(){ls.d={history:$("\x3cdiv\x3e"),aT:function(content){$("\x3ch1\x3e"+content+"\x3c/h1\x3e").appendTo(ls.d.history)}, aeU:function(){$("\x3cul\x3e").appendTo(ls.d.history)},aU:function(content){$("\x3cul\x3e\x3cli\x3e"+content+"\x3c/li\x3e\x3c/ul\x3e").appendTo(ls.d.history)},aL:function(content){$("\x3cli\x3e"+content+"\x3c/li\x3e").appendTo(ls.d.history.find("ul:last"))},aUU:function(content){$("\x3cul\x3e").appendTo(ls.d.history.find("ul:last li:last"))},aF:function(elem){ls.d.history.find("ul:last li:last").hover(function(){elem.css({border:"2px solid red",marginTop:parseInt(elem.css("margin-top"))-2,marginLeft:parseInt(elem.css("margin-left"))- 2})},function(){elem.css({border:"0px",marginTop:parseInt(elem.css("margin-top"))+2,marginLeft:parseInt(elem.css("margin-left"))+2})})},show:function(){if(!$("body").find(".ls-debug-console").length){if(!ls.d.putData){ls.d.aT("Init code");ls.d.aeU();for(var prop in ls.o)ls.d.aL(prop+": \x3cstrong\x3e"+ls.o[prop]+"\x3c/strong\x3e");ls.d.aT("LayerSlider Content");ls.d.aU("Number of slides found: \x3cstrong\x3e"+$(el).find(".ls-slide").length+"\x3c/strong\x3e");$(el).find('.ls-inner .ls-slide, .ls-inner *[class*\x3d"ls-l"]').each(function(){if($(this).hasClass("ls-slide")){ls.d.aU("\x3cstrong\x3eSLIDE "+ ($(this).index()+1)+"\x3c/strong\x3e");ls.d.aUU();ls.d.aL("\x3cstrong\x3eSLIDE "+($(this).index()+1)+" properties:\x3c/strong\x3e\x3cbr\x3e\x3cbr\x3e")}else{ls.d.aU("\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;Layer ( "+$(this).prop("tagName")+" )");ls.d.aF($(this));ls.d.aUU();ls.d.aL("\x3cstrong\x3e"+$(this).prop("tagName")+" layer properties:\x3c/strong\x3e\x3cbr\x3e\x3cbr\x3e");ls.d.aL("distance / class: \x3cstrong\x3e"+$(this).attr("class")+"\x3c/strong\x3e")}$.each($(this).data(),function(name,val){ls.d.aL(name+ ": \x3cstrong\x3e"+val+"\x3c/strong\x3e")})});ls.d.putData=true}var dc=$("\x3cdiv\x3e").addClass("ls-debug-console").css({position:"fixed",zIndex:"10000000000",top:"10px",right:"10px",width:"300px",padding:"20px",background:"black","border-radius":"10px",height:$(window).height()-60,opacity:0,marginRight:150}).appendTo($("body")).css({marginRight:0,opacity:.9}).click(function(e){if(e.shiftKey&&e.altKey)$(this).remove()});var ds=$("\x3cdiv\x3e").css({width:"100%",height:"100%",overflow:"auto"}).appendTo(dc); var dd=$("\x3cdiv\x3e").css({width:"100%"}).appendTo(ds).append(ls.d.history)}},hide:function(){$("body").find(".ls-debug-console").remove()}};$(el).click(function(e){if(e.shiftKey&&e.altKey)ls.d.show()})};ls.load()};var lsConvertEasing=function(e){var t;if(e.toLowerCase().indexOf("swing")!==-1||e.toLowerCase().indexOf("linear")!==-1)t=Linear.easeNone;else if(e.toLowerCase().indexOf("easeinout")!==-1){var ee=e.toLowerCase().split("easeinout")[1];t=window[ee.charAt(0).toUpperCase()+ee.slice(1)].easeInOut}else if(e.toLowerCase().indexOf("easeout")!== -1){var ee=e.toLowerCase().split("easeout")[1];t=window[ee.charAt(0).toUpperCase()+ee.slice(1)].easeOut}else if(e.toLowerCase().indexOf("easein")!==-1){var ee=e.toLowerCase().split("easein")[1];t=window[ee.charAt(0).toUpperCase()+ee.slice(1)].easeIn}return t};var lsConvertTransition=function(t,e,type,undef){if(typeof e==="undefined")var e="easeInOutQuart";var tt={};if(t.rotate!==undef)tt.rotation=t.rotate;if(t.rotateY!==undef)tt.rotationY=t.rotateY;if(t.rotateX!==undef)tt.rotationX=t.rotateX;if(type=== "after")tt.scaleX=tt.scaleY=tt.scaleZ=1;else if(t.scale3d!==undef)tt.scaleX=tt.scaleY=tt.scaleZ=t.scale3d;if(t.delay)tt.delay=type==="after"?t.delay/1E3:t.delay;tt.ease=lsConvertEasing(e);return tt};var lsSupport3D=function(el){var testEl=$("\x3cdiv\x3e"),s3d1=false,s3d2=false,properties=["perspective","OPerspective","msPerspective","MozPerspective","WebkitPerspective"];transform=["transformStyle","OTransformStyle","msTransformStyle","MozTransformStyle","WebkitTransformStyle"];for(var i=properties.length- 1;i>=0;i--)s3d1=s3d1?s3d1:testEl[0].style[properties[i]]!=undefined;for(var i=transform.length-1;i>=0;i--){testEl.css("transform-style","preserve-3d");s3d2=s3d2?s3d2:testEl[0].style[transform[i]]=="preserve-3d"}if(s3d1&&testEl[0].style[properties[4]]!=undefined){testEl.attr("id","ls-test3d").appendTo(el);s3d1=testEl[0].offsetHeight===3&&testEl[0].offsetLeft===9;testEl.remove()}return s3d1&&s3d2};var lsOrderArray=function(x,y,dir){var i=[];if(dir=="forward")for(var a=0;a-1;a--)for(var b=y-1;b>-1;b--)i.push(a+b*x);return i};var lsCountProp=function(obj){var count=0;for(var prop in obj)if(obj.hasOwnProperty(prop))++count;return count};var lsBrowser=function(){uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]|| "",version:match[2]||"0"}};var matched=uaMatch(navigator.userAgent),browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version}if(browser.chrome)browser.webkit=true;else if(browser.webkit)browser.safari=true;return browser};lsPrefixes=function(obj,method){var pfx=["webkit","khtml","moz","ms","o",""];var p=0,m,t;while(p