您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
本篇内容主要讲解“LAYERSLIDER 5插件怎么破解”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“LAYERSLIDER 5插件怎么破解”吧!
function lsShowNotice(e, t, n) { var r; if (typeof e == "string") { r = jQuery("#" + e) } else if (typeof e == "object") { r = e } var i, s; switch (t) { case "jquery": i = "multiple jQuery issue"; s = '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. <strong>Please navigate on your WordPress admin area to the main page of LayerSlider and enable the "Put JS includes to body" option within the Troubleshooting & Advanced Settings box.</strong>'; break; case "oldjquery": i = "old jQuery issue"; s = "It looks like you are using an old version (" + n + ') 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 & 8. <a href="http://support.kreaturamedia.com/faq/4/layerslider-for-wordpress/#group-13&entry-60">You can read more about updating jQuery by clicking here.</a>'; break } r.addClass("ls-error"); r.append('<p class="ls-exclam">!</p>'); r.append('<p class="ls-error-title">LayerSlider: ' + i + "</p>"); r.append('<p class="ls-error-text">' + s + "</p>") }(function(e) { e.fn.layerSlider = function(n) { var r = "1.7.0"; var i = e.fn.jquery; var s = e(this); var o = function(e, t) { var n = e.split("."); var r = t.split("."); for (var i = 0; i < n.length; ++i) { if (r.length == i) { return false } if (parseInt(n[i]) == parseInt(r[i])) { continue } else if (parseInt(n[i]) > parseInt(r[i])) { return false } else { return true } } if (n.length != r.length) { return true } return true }; if (!o("1.8.0", i)) { s.addClass("ls-norotate") } if (!o(r, i)) { lsShowNotice(s, "oldjquery", i) } else { if ((typeof n).match("object|undefined")) { return this.each(function(e) { new t(this, n) }) } else { if (n === "data") { var u = e(this).data("LayerSlider").g; if (u) { return u } } else if (n === "userInitData") { var a = e(this).data("LayerSlider").o; if (a) { return a } } else if (n === "defaultInitData") { var a = e(this).data("LayerSlider").defaults; if (a) { return a } } else { return this.each(function(t) { var r = e(this).data("LayerSlider"); if (r) { if (!r.g.isAnimating && !r.g.isLoading) { if (typeof n == "number") { if (n > 0 && n < r.g.layersNum + 1 && n != r.g.curLayerIndex) { r.change(n) } } else { switch (n) { case "prev": r.o.cbPrev(r.g); r.prev("clicked"); break; case "next": r.o.cbNext(r.g); r.next("clicked"); break; case "start": if (!r.g.autoSlideshow) { r.o.cbStart(r.g); r.g.originalAutoSlideshow = true; r.start() } break } } } if (n === "redraw") { r.resize() } if ((r.g.autoSlideshow || !r.g.autoSlideshow && r.g.originalAutoSlideshow) && n == "stop") { r.o.cbStop(r.g); r.g.originalAutoSlideshow = false; r.g.curLayer.find('iframe[src*="youtube.com"], iframe[src*="youtu.be"], iframe[src*="player.vimeo"]').each(function() { clearTimeout(e(this).data("videoTimer")) }); r.stop() } if (n == "forceStop") { r.forcestop() } } }) } } } }; var t = function(u, a) { var f = this; f.$el = e(u).addClass("ls-container"); f.$el.data("LayerSlider", f); f.load = function() { f.defaults = t.options; f.o = e.extend({}, f.defaults, a); f.g = e.extend({}, t.global); f.lt = e.extend({}, t.layerTransitions); f.st = e.extend({}, t.slideTransitions); f.g.enableCSS3 = e(u).hasClass("ls-norotate") ? false : true; f.g.originalMarkup = e(u).html(); if (f.g.ie78) { f.o.lazyLoad = false } if (f.o.autoPauseSlideshow === "enabled") { f.o.autoPauseSlideshow = true } if (f.o.autoPauseSlideshow === "disabled") { f.o.autoPauseSlideshow = false } if (typeof layerSliderTransitions !== "undefined") { f.t = e.extend({}, layerSliderTransitions) } if (typeof layerSliderCustomTransitions !== "undefined") { f.ct = e.extend({}, layerSliderCustomTransitions) } if (!f.g.initialized) { f.g.initialized = true; if (e("html").find('meta[content*="WordPress"]').length) { f.g.wpVersion = e("html").find('meta[content*="WordPress"]').attr("content").split("WordPress")[1] } if (e("html").find('script[src*="layerslider"]').length) { if (e("html").find('script[src*="layerslider"]').attr("src").indexOf("?") != -1) { f.g.lswpVersion = e("html").find('script[src*="layerslider"]').attr("src").split("?")[1].split("=")[1] } } if (!f.o.skin || f.o.skin == "" || !f.o.skinsPath || f.o.skinsPath == "") { f.init() } else { e(u).addClass("ls-" + f.o.skin); var n = f.o.skinsPath + f.o.skin + "/skin.css"; cssContainer = e("head"); if (!e("head").length) { cssContainer = e("body") } if (e('link[href="' + n + '"]').length) { r = e('link[href="' + n + '"]'); if (!f.g.loaded) { f.g.loaded = true; f.g.t1 = setTimeout(function() { f.init() }, 150) } } else { if (document.createStyleSheet) { document.createStyleSheet(n); var r = e('link[href="' + n + '"]') } else { var r = e('<link rel="stylesheet" href="' + n + '" type="text/css" />').appendTo(cssContainer) } } r.load(function() { if (!f.g.loaded) { f.g.loaded = true; f.g.t2 = setTimeout(function() { f.init() }, 150) } }); e(window).load(function() { if (!f.g.loaded) { f.g.loaded = true; f.g.t3 = setTimeout(function() { f.init() }, 150) } }); f.g.t4 = setTimeout(function() { if (!f.g.loaded) { f.g.loaded = true; f.init() } }, 1e3) } } }; f.init = function() { e(u).prependTo(e(f.o.appendTo)); if (!e("html").attr("id")) { e("html").attr("id", "ls-global") } else if (!e("body").attr("id")) { e("body").attr("id", "ls-global") } if (f.g.isMobile() === true && f.o.hideOnMobile === true) { e(u).addClass("ls-forcehide"); e(u).closest(".ls-wp-fullwidth-container").addClass("ls-forcehide") } var t = function() { if (f.o.hideOnMobile === true && f.g.isMobile() === true) { e(u).addClass("ls-forcehide"); e(u).closest(".ls-wp-fullwidth-container").addClass("ls-forcehide"); f.o.autoStart = false } else { if (e(window).width() < f.o.hideUnder || e(window).width() > f.o.hideOver) { e(u).addClass("ls-forcehide"); e(u).closest(".ls-wp-fullwidth-container").addClass("ls-forcehide") } else { e(u).removeClass("ls-forcehide"); e(u).closest(".ls-wp-fullwidth-container").removeClass("ls-forcehide") } } }; e(window).resize(function() { t() }); t(); f.g.sliderWidth = function() { return e(u).width() }; f.g.sliderHeight = function() { return e(u).height() }; e(u).find(".ls-layer").removeClass("ls-layer").addClass("ls-slide"); e(u).find('.ls-slide > *[class*="ls-s"]').each(function() { var t = e(this).attr("class").split("ls-s")[1].split(" ")[0]; e(this).removeClass("ls-s" + t).addClass("ls-l" + t) }); if (f.o.firstLayer) { f.o.firstSlide = f.o.firstLayer } if (f.o.animateFirstLayer === false) { f.o.animateFirstSlide = false } if (e(u).find(".ls-slide").length == 1) { f.o.autoStart = false; f.o.navPrevNext = false; f.o.navStartStop = false; f.o.navButtons = false; f.o.loops = 0; f.o.forceLoopNum = false; f.o.autoPauseSlideshow = true; f.o.firstSlide = 1; f.o.thumbnailNavigation = "disabled" } if (e(u).parent().hasClass("ls-wp-fullwidth-helper") && f.o.responsiveUnder !== 0) { e(u)[0].style.width = "100%" } if (f.o.width) { f.g.sliderOriginalWidthRU = f.g.sliderOriginalWidth = "" + f.o.width } else { f.g.sliderOriginalWidthRU = f.g.sliderOriginalWidth = e(u)[0].style.width } if (f.o.height) { f.g.sliderOriginalHeight = "" + f.o.height } else { f.g.sliderOriginalHeight = e(u)[0].style.height } if (f.g.sliderOriginalWidth.indexOf("%") == -1 && f.g.sliderOriginalWidth.indexOf("px") == -1) { f.g.sliderOriginalWidth += "px" } if (f.g.sliderOriginalHeight.indexOf("%") == -1 && f.g.sliderOriginalHeight.indexOf("px") == -1) { f.g.sliderOriginalHeight += "px" } if (f.o.responsive && f.g.sliderOriginalWidth.indexOf("px") != -1 && f.g.sliderOriginalHeight.indexOf("px") != -1) { f.g.responsiveMode = true } else { f.g.responsiveMode = false } if (f.o.fullScreen === true) { f.o.responsiveUnder = 0; f.g.responsiveMode = true; if (f.g.sliderOriginalWidth.indexOf("%") != -1) { f.g.sliderOriginalWidth = parseInt(f.g.sliderOriginalWidth) + "px" } if (f.g.sliderOriginalHeight.indexOf("%") != -1) { f.g.sliderOriginalHeight = parseInt(f.g.sliderOriginalHeight) + "px" } } e(u).find('*[class*="ls-l"], *[class*="ls-bg"]').each(function() { if (!e(this).parent().hasClass("ls-slide")) { e(this).insertBefore(e(this).parent()) } }); e(u).find(".ls-slide").each(function() { e(this).children(':not([class*="ls-"])').each(function() { e(this).remove() }); var t = e("<div>").addClass("ls-gpuhack"); if (e(this).find(".ls-bg").length) { t.insertAfter(e(this).find(".ls-bg").eq("0")) } else { t.prependTo(e(this)) } }); e(u).find('.ls-slide, *[class*="ls-l"]').each(function() { if (e(this).data("ls") || e(this).attr("rel") || e(this).attr("style")) { if (e(this).data("ls")) { var t = e(this).data("ls").toLowerCase().split(";") } else if (e(this).attr("rel") && e(this).attr("rel").indexOf(":") != -1 && e(this).attr("rel").indexOf(";") != -1) { var t = e(this).attr("rel").toLowerCase().split(";") } else { var t = e(this).attr("style").toLowerCase().split(";") } for (x = 0; x < t.length; x++) { param = t[x].split(":"); if (param[0].indexOf("easing") != -1) { param[1] = f.ieEasing(param[1]) } var n = ""; if (param[2]) { n = ":" + e.trim(param[2]) } if (param[0] != " " && param[0] != "") { e(this).data(e.trim(param[0]), e.trim(param[1]) + n) } } } if (f.o.startInViewport === true && f.o.autoStart === true) { f.o.autoStart = false; f.g.originalAutoStart = true } var r = e(this); r.data("originalLeft", r[0].style.left); r.data("originalTop", r[0].style.top); if (e(this).is("a") && e(this).children().length > 0) { r = e(this).children() } var i = r.width(); var s = r.height(); if (r[0].style.width && r[0].style.width.indexOf("%") != -1) { i = r[0].style.width } if (r[0].style.height && r[0].style.height.indexOf("%") != -1) { s = r[0].style.height } r.data("originalWidth", i); r.data("originalHeight", s); r.data("originalPaddingLeft", r.css("padding-left")); r.data("originalPaddingRight", r.css("padding-right")); r.data("originalPaddingTop", r.css("padding-top")); r.data("originalPaddingBottom", r.css("padding-bottom")); var o = typeof parseFloat(r.css("opacity")) == "number" ? Math.round(parseFloat(r.css("opacity")) * 100) / 100 : 1; e(this).data("originalOpacity", o); if (r.css("border-left-width").indexOf("px") == -1) { r.data("originalBorderLeft", r[0].style.borderLeftWidth) } else { r.data("originalBorderLeft", r.css("border-left-width")) } if (r.css("border-right-width").indexOf("px") == -1) { r.data("originalBorderRight", r[0].style.borderRightWidth) } else { r.data("originalBorderRight", r.css("border-right-width")) } if (r.css("border-top-width").indexOf("px") == -1) { r.data("originalBorderTop", r[0].style.borderTopWidth) } else { r.data("originalBorderTop", r.css("border-top-width")) } if (r.css("border-bottom-width").indexOf("px") == -1) { r.data("originalBorderBottom", r[0].style.borderBottomWidth) } else { r.data("originalBorderBottom", r.css("border-bottom-width")) } r.data("originalFontSize", r.css("font-size")); r.data("originalLineHeight", r.css("line-height")) }); if (document.location.hash) { for (var n = 0; n < e(u).find(".ls-slide").length; n++) { if (e(u).find(".ls-slide").eq(n).data("deeplink") == document.location.hash.split("#")[1]) { f.o.firstSlide = n + 1 } } } e(u).find('*[class*="ls-linkto-"]').each(function() { var t = e(this).attr("class").split(" "); for (var n = 0; n < t.length; n++) { if (t[n].indexOf("ls-linkto-") != -1) { var r = parseInt(t[n].split("ls-linkto-")[1]); e(this).css({ cursor: "pointer" }).click(function(t) { t.preventDefault(); e(u).layerSlider(r) }) } } }); f.g.layersNum = e(u).find(".ls-slide").length; if (f.o.randomSlideshow && f.g.layersNum > 2) { f.o.firstSlide == "random"; f.o.twoWaySlideshow = false } else { f.o.randomSlideshow = false } if (f.o.firstSlide == "random") { f.o.firstSlide = Math.floor(Math.random() * f.g.layersNum + 1) } f.o.fisrtSlide = f.o.fisrtSlide < f.g.layersNum + 1 ? f.o.fisrtSlide : 1; f.o.fisrtSlide = f.o.fisrtSlide < 1 ? 1 : f.o.fisrtSlide; f.g.nextLoop = 1; if (f.o.animateFirstSlide) { f.g.nextLoop = 0 } var r = document.location.href.indexOf("file:") === -1 ? "" : "http:"; e(u).find('iframe[src*="youtube.com"], iframe[src*="youtu.be"]').each(function() { e(this).parent().addClass("ls-video-layer"); if (e(this).parent('[class*="ls-l"]')) { var t = e(this); var n = r; e.getJSON(n + "//gdata.youtube.com/feeds/api/videos/" + e(this).attr("src").split("embed/")[1].split("?")[0] + "?v=2&alt=json&callback=?", function(e) { t.data("videoDuration", parseInt(e["entry"]["media$group"]["yt$duration"]["seconds"]) * 1e3) }); var i = e("<div>").addClass("ls-vpcontainer").appendTo(e(this).parent()); e("<img>").appendTo(i).addClass("ls-videopreview").attr("alt", "Play video").attr("src", n + "//img.youtube.com/vi/" + e(this).attr("src").split("embed/")[1].split("?")[0] + "/" + f.o.youtubePreview); e("<div>").appendTo(i).addClass("ls-playvideo"); e(this).parent().css({ width: e(this).width(), height: e(this).height() }).click(function() { if (e(this).data("showuntil") > 0 && e(this).data("showUntilTimer")) { clearTimeout(e(this).data("showUntilTimer")) } f.g.isAnimating = true; if (f.g.paused) { if (f.o.autoPauseSlideshow != false) { f.g.paused = false } f.g.originalAutoSlideshow = true } else { f.g.originalAutoSlideshow = f.g.autoSlideshow } if (f.o.autoPauseSlideshow != false) { f.stop() } f.g.pausedByVideo = true; n = e(this).find("iframe").data("videoSrc").indexOf("http") === -1 ? r : ""; e(this).find("iframe").attr("src", n + e(this).find("iframe").data("videoSrc")); e(this).find(".ls-vpcontainer").delay(f.g.v.d).fadeOut(f.g.v.fo, function() { if (f.o.autoPauseSlideshow == "auto" && f.g.originalAutoSlideshow == true) { var e = setTimeout(function() { f.start() }, t.data("videoDuration") - f.g.v.d); t.data("videoTimer", e) } f.g.isAnimating = false; if (f.g.resize == true) { f.makeResponsive(f.g.curLayer, function() { f.g.resize = false }) } }) }); var s = "&"; if (e(this).attr("src").indexOf("?") == -1) { s = "?" } var o = "&wmode=opaque&html5=1"; if (e(this).attr("src").indexOf("autoplay") == -1) { e(this).data("videoSrc", e(this).attr("src") + s + "autoplay=1" + o) } else { e(this).data("videoSrc", e(this).attr("src").replace("autoplay=0", "autoplay=1") + o) } e(this).data("originalWidth", e(this).attr("width")); e(this).data("originalHeight", e(this).attr("height")); e(this).attr("src", "") } }); e(u).find('iframe[src*="player.vimeo"]').each(function() { e(this).parent().addClass("ls-video-layer"); if (e(this).parent('[class*="ls-l"]')) { var t = e(this); var n = r; var i = e("<div>").addClass("ls-vpcontainer").appendTo(e(this).parent()); e.getJSON(n + "//vimeo.com/api/v2/video/" + e(this).attr("src").split("video/")[1].split("?")[0] + ".json?callback=?", function(n) { e("<img>").appendTo(i).addClass("ls-videopreview").attr("alt", "Play video").attr("src", n[0]["thumbnail_large"]); t.data("videoDuration", parseInt(n[0]["duration"]) * 1e3); e("<div>").appendTo(i).addClass("ls-playvideo") }); e(this).parent().css({ width: e(this).width(), height: e(this).height() }).click(function() { if (e(this).data("showuntil") > 0 && e(this).data("showUntilTimer")) { clearTimeout(e(this).data("showUntilTimer")) } f.g.isAnimating = true; if (f.g.paused) { if (f.o.autoPauseSlideshow != false) { f.g.paused = false } f.g.originalAutoSlideshow = true } else { f.g.originalAutoSlideshow = f.g.autoSlideshow } if (f.o.autoPauseSlideshow != false) { f.stop() } f.g.pausedByVideo = true; n = e(this).find("iframe").data("videoSrc").indexOf("http") === -1 ? r : ""; e(this).find("iframe").attr("src", n + e(this).find("iframe").data("videoSrc")); e(this).find(".ls-vpcontainer").delay(f.g.v.d).fadeOut(f.g.v.fo, function() { if (f.o.autoPauseSlideshow == "auto" && f.g.originalAutoSlideshow == true) { var e = setTimeout(function() { f.start() }, t.data("videoDuration") - f.g.v.d); t.data("videoTimer", e) } f.g.isAnimating = false; if (f.g.resize == true) { f.makeResponsive(f.g.curLayer, function() { f.g.resize = false }) } }) }); var s = "&"; if (e(this).attr("src").indexOf("?") == -1) { s = "?" } var o = "&wmode=opaque"; if (e(this).attr("src").indexOf("autoplay") == -1) { e(this).data("videoSrc", e(this).attr("src") + s + "autoplay=1" + o) } else { e(this).data("videoSrc", e(this).attr("src").replace("autoplay=0", "autoplay=1") + o) } e(this).data("originalWidth", e(this).attr("width")); e(this).data("originalHeight", e(this).attr("height")); e(this).attr("src", "") } }); e(u).find("video, audio").each(function() { var t = typeof e(this).attr("width") !== "undefined" ? e(this).attr("width") : "640"; var n = typeof e(this).attr("height") !== "undefined" ? e(this).attr("height") : "" + e(this).height(); if (t.indexOf("%") === -1) { t = parseInt(t) } if (n.indexOf("%") === -1) { n = parseInt(n) } if (t === "100%" && (n === 0 || n === "0" || n === "100%")) { e(this).attr("height", "100%"); n = "auto" } e(this).parent().addClass("ls-video-layer").css({ width: t, height: n }).data({ originalWidth: t, originalHeight: n }); var r = e(this); e(this).on("ended", function() { if (f.o.autoPauseSlideshow === "auto" && f.g.originalAutoSlideshow === true) { f.start() } }); e(this).removeAttr("width").removeAttr("height").css({ width: "100%", height: "100%" }).click(function(e) { if (!f.g.pausedByVideo) { if (this.paused) { e.preventDefault() } this.play(); f.g.isAnimating = true; if (f.g.paused) { if (f.o.autoPauseSlideshow !== false) { f.g.paused = false } f.g.originalAutoSlideshow = true } else { f.g.originalAutoSlideshow = f.g.autoSlideshow } if (f.o.autoPauseSlideshow !== false) { f.stop() } f.g.pausedByVideo = true; f.g.isAnimating = false; if (f.g.resize === true) { f.makeResponsive(f.g.curLayer, function() { f.g.resize = false }) } } }) }); if (f.o.animateFirstSlide) { f.o.firstSlide = f.o.firstSlide - 1 === 0 ? f.g.layersNum : f.o.firstSlide - 1 } f.g.curLayerIndex = f.o.firstSlide; f.g.curLayer = e(u).find(".ls-slide:eq(" + (f.g.curLayerIndex - 1) + ")"); e(u).find(".ls-slide").wrapAll('<div class="ls-inner"></div>'); if (f.o.showBarTimer) { f.g.barTimer = e("<div>").addClass("ls-bar-timer").appendTo(e(u).find(".ls-inner")) } if (f.o.showCircleTimer && !f.g.ie78) { f.g.circleTimer = e("<div>").addClass("ls-circle-timer").appendTo(e(u).find(".ls-inner")); f.g.circleTimer.append(e('<div class="ls-ct-left"><div class="ls-ct-rotate"><div class="ls-ct-hider"><div class="ls-ct-half"></div></div></div></div><div class="ls-ct-right"><div class="ls-ct-rotate"><div class="ls-ct-hider"><div class="ls-ct-half"></div></div></div></div><div class="ls-ct-center"></div>')) } f.g.li = e("<div>").css({ zIndex: -1, display: "none" }).addClass("ls-loading-container").appendTo(e(u)); e("<div>").addClass("ls-loading-indicator").appendTo(f.g.li); if (e(u).css("position") == "static") { e(u).css("position", "relative") } if (f.o.globalBGImage) { e(u).find(".ls-inner").css({ backgroundImage: "url(" + f.o.globalBGImage + ")" }) } else { e(u).find(".ls-inner").css({ backgroundColor: f.o.globalBGColor }) } if (f.o.globalBGColor == "transparent" && f.o.globalBGImage == false) { e(u).find(".ls-inner").css({ background: "none transparent !important" }) } e(u).find(".ls-slide img").each(function() { e(this).removeAttr("width").removeAttr("height"); if (f.o.imgPreload === true && f.o.lazyLoad === true) { if (typeof e(this).data("src") !== "string") { e(this).data("src", e(this).attr("src")); var t = f.o.skinsPath + "../css/blank.gif"; e(this).attr("src", t) } } else { if (typeof e(this).data("src") === "string") { e(this).attr("src", e(this).data("src")); e(this).removeAttr("data-src") } } }); e(u).find(".ls-slide").on("mouseenter", function(t) { f.g.parallaxStartX = t.pageX - e(this).parent().offset().left; f.g.parallaxStartY = t.pageY - e(this).parent().offset().top }); e(u).find(".ls-slide").on("mousemove", function(t) { var n = e(this).parent().offset().left + f.g.parallaxStartX; var r = e(this).parent().offset().top + f.g.parallaxStartY; var i = t.pageX - n; var s = t.pageY - r; e(this).find("> *:not(.ls-bg)").each(function() { if (typeof e(this).data("parallaxlevel") !== "undefined" && parseInt(e(this).data("parallaxlevel")) !== 0) { e(this).css({ marginLeft: -i / 100 * parseInt(e(this).data("parallaxlevel")), marginTop: -s / 100 * parseInt(e(this).data("parallaxlevel")) }) } }) }); e(u).find(".ls-slide").on("mouseleave", function() { e(this).find("> *:not(.ls-bg)").each(function() { if (typeof e(this).data("parallaxlevel") !== "undefined" && parseInt(e(this).data("parallaxlevel")) !== 0) { TweenLite.to(this, .4, { css: { marginLeft: 0, marginTop: 0 } }) } }) }); if (f.o.navPrevNext) { e('<a class="ls-nav-prev" href="#" />').click(function(t) { t.preventDefault(); e(u).layerSlider("prev") }).appendTo(e(u)); e('<a class="ls-nav-next" href="#" />').click(function(t) { t.preventDefault(); e(u).layerSlider("next") }).appendTo(e(u)); if (f.o.hoverPrevNext) { e(u).find(".ls-nav-prev, .ls-nav-next").css({ display: "none" }); e(u).hover(function() { if (!f.g.forceHideControls) { if (f.g.ie78) { e(u).find(".ls-nav-prev, .ls-nav-next").css("display", "block") } else { e(u).find(".ls-nav-prev, .ls-nav-next").stop(true, true).fadeIn(300) } } }, function() { if (f.g.ie78) { e(u).find(".ls-nav-prev, .ls-nav-next").css("display", "none") } else { e(u).find(".ls-nav-prev, .ls-nav-next").stop(true, true).fadeOut(300) } }) } } if (f.o.navStartStop || f.o.navButtons) { var i = e('<div class="ls-bottom-nav-wrapper" />').appendTo(e(u)); f.g.bottomWrapper = i; if (f.o.thumbnailNavigation == "always") { i.addClass("ls-above-thumbnails") } if (f.o.navButtons && f.o.thumbnailNavigation != "always") { e('<span class="ls-bottom-slidebuttons" />').appendTo(e(u).find(".ls-bottom-nav-wrapper")); if (f.o.thumbnailNavigation == "hover") { var s = e('<div class="ls-thumbnail-hover"><div class="ls-thumbnail-hover-inner"><div class="ls-thumbnail-hover-bg"></div><div class="ls-thumbnail-hover-img"><img></div><span></span></div></div>').appendTo(e(u).find(".ls-bottom-slidebuttons")) } for (x = 1; x < f.g.layersNum + 1; x++) { var o = e('<a href="#" />').appendTo(e(u).find(".ls-bottom-slidebuttons")).click(function(t) { t.preventDefault(); e(u).layerSlider(e(this).index() + 1) }); if (f.o.thumbnailNavigation == "hover") { e(u).find(".ls-thumbnail-hover, .ls-thumbnail-hover-img").css({ width: f.o.tnWidth, height: f.o.tnHeight }); var a = e(u).find(".ls-thumbnail-hover"); var l = a.find("img").css({ height: f.o.tnHeight }); var c = e(u).find(".ls-thumbnail-hover-inner").css({ visibility: "hidden", display: "block" }); o.hover(function() { var t = e(u).find(".ls-slide").eq(e(this).index()); var n; if (f.o.imgPreload === true && f.o.lazyLoad === true) { if (t.find(".ls-tn").length) { n = t.find(".ls-tn").data("src") } else if (t.find(".ls-videopreview").length) { n = t.find(".ls-videopreview").attr("src") } else if (t.find(".ls-bg").length) { n = t.find(".ls-bg").data("src") } else { n = f.o.skinsPath + f.o.skin + "/nothumb.png" } } else { if (t.find(".ls-tn").length) { n = t.find(".ls-tn").attr("src") } else if (t.find(".ls-videopreview").length) { n = t.find(".ls-videopreview").attr("src") } else if (t.find(".ls-bg").length) { n = t.find(".ls-bg").attr("src") } else { n = f.o.skinsPath + f.o.skin + "/nothumb.png" } } e(u).find(".ls-thumbnail-hover-img").css({ left: parseInt(a.css("padding-left")), top: parseInt(a.css("padding-top")) }); l.load(function() { if (e(this).width() == 0) { l.css({ position: "relative", margin: "0 auto", left: "auto" }) } else { l.css({ position: "absolute", marginLeft: -e(this).width() / 2, left: "50%" }) } }).attr("src", n); a.css({ display: "block" }).stop().animate({ left: e(this).position().left + (e(this).width() - a.outerWidth()) / 2 }, 250); c.css({ display: "none", visibility: "visible" }).stop().fadeIn(250) }, function() { c.stop().fadeOut(250, function() { a.css({ visibility: "hidden", display: "block" }) }) }) } } if (f.o.thumbnailNavigation == "hover") { s.appendTo(e(u).find(".ls-bottom-slidebuttons")) } e(u).find(".ls-bottom-slidebuttons a:eq(" + (f.o.firstSlide - 1) + ")").addClass("ls-nav-active") } if (f.o.navStartStop) { var h = e('<a class="ls-nav-start" href="#" />').click(function(t) { t.preventDefault(); e(u).layerSlider("start") }).prependTo(e(u).find(".ls-bottom-nav-wrapper")); var p = e('<a class="ls-nav-stop" href="#" />').click(function(t) { t.preventDefault(); e(u).layerSlider("stop") }).appendTo(e(u).find(".ls-bottom-nav-wrapper")) } else if (f.o.thumbnailNavigation != "always") { e('<span class="ls-nav-sides ls-nav-sideleft" />').prependTo(e(u).find(".ls-bottom-nav-wrapper")); e('<span class="ls-nav-sides ls-nav-sideright" />').appendTo(e(u).find(".ls-bottom-nav-wrapper")) } if (f.o.hoverBottomNav && f.o.thumbnailNavigation != "always") { i.css({ display: "none" }); e(u).hover(function() { if (!f.g.forceHideControls) { if (f.g.ie78) { i.css("display", "block") } else { i.stop(true, true).fadeIn(300) } } }, function() { if (f.g.ie78) { i.css("display", "none") } else { i.stop(true, true).fadeOut(300) } }) } } if (f.o.thumbnailNavigation == "always") { f.g.thumbsWrapper = e('<div class="ls-thumbnail-wrapper"></div>').appendTo(e(u)); var s = e('<div class="ls-thumbnail"><div class="ls-thumbnail-inner"><div class="ls-thumbnail-slide-container"><div class="ls-thumbnail-slide"></div></div></div></div>').appendTo(f.g.thumbsWrapper); f.g.thumbnails = e(u).find(".ls-thumbnail-slide-container"); if (!("ontouchstart" in window)) { f.g.thumbnails.hover(function() { e(this).addClass("ls-thumbnail-slide-hover") }, function() { e(this).removeClass("ls-thumbnail-slide-hover"); f.scrollThumb() }).mousemove(function(t) { var n = parseInt(t.pageX - e(this).offset().left) / e(this).width() * (e(this).width() - e(this).find(".ls-thumbnail-slide").width()); e(this).find(".ls-thumbnail-slide").stop().css({ marginLeft: n }) }) } else { f.g.thumbnails.addClass("ls-touchscroll") } e(u).find(".ls-slide").each(function() { var t = e(this).index() + 1; var n; if (f.o.imgPreload === true && f.o.lazyLoad === true) { if (e(this).find(".ls-tn").length) { n = e(this).find(".ls-tn").data("src") } else if (e(this).find(".ls-videopreview").length) { n = e(this).find(".ls-videopreview").attr("src") } else if (e(this).find(".ls-bg").length) { n = e(this).find(".ls-bg").data("src") } else { n = f.o.skinsPath + f.o.skin + "/nothumb.png" } } else { if (e(this).find(".ls-tn").length) { n = e(this).find(".ls-tn").attr("src") } else if (e(this).find(".ls-videopreview").length) { n = e(this).find(".ls-videopreview").attr("src") } else if (e(this).find(".ls-bg").length) { n = e(this).find(".ls-bg").attr("src") } else { n = f.o.skinsPath + f.o.skin + "/nothumb.png" } } var r = e('<a href="#" class="ls-thumb-' + t + '"><img src="' + n + '"></a>'); r.appendTo(e(u).find(".ls-thumbnail-slide")); if (!("ontouchstart" in window)) { r.hover(function() { e(this).children().stop().fadeTo(300, f.o.tnActiveOpacity / 100) }, function() { if (!e(this).children().hasClass("ls-thumb-active")) { e(this).children().stop().fadeTo(300, f.o.tnInactiveOpacity / 100) } }) } r.click(function(n) { n.preventDefault(); e(u).layerSlider(t) }) }); if (h && p) { var d = f.g.bottomWrapper = e('<div class="ls-bottom-nav-wrapper ls-below-thumbnails"></div>').appendTo(e(u)); h.clone().click(function(t) { t.preventDefault(); e(u).layerSlider("start") }).appendTo(d); p.clone().click(function(t) { t.preventDefault(); e(u).layerSlider("stop") }).appendTo(d) } if (f.o.hoverBottomNav) { f.g.thumbsWrapper.css("display", "none"); if (d) { f.g.bottomWrapper = d.css("display") == "block" ? d : e(u).find(".ls-above-thumbnails"); f.g.bottomWrapper.css("display", "none") } e(u).hover(function() { e(u).addClass("ls-hover"); if (!f.g.forceHideControls) { if (f.g.ie78) { f.g.thumbsWrapper.css("display", "block"); if (f.g.bottomWrapper) { f.g.bottomWrapper.css("display", "block") } } else { f.g.thumbsWrapper.stop(true, true).fadeIn(300); if (f.g.bottomWrapper) { f.g.bottomWrapper.stop(true, true).fadeIn(300) } } } }, function() { e(u).removeClass("ls-hover"); if (f.g.ie78) { f.g.thumbsWrapper.css("display", "none"); if (f.g.bottomWrapper) { f.g.bottomWrapper.css("display", "none") } } else { f.g.thumbsWrapper.stop(true, true).fadeOut(300); if (f.g.bottomWrapper) { f.g.bottomWrapper.stop(true, true).fadeOut(300) } } }) } } f.g.shadow = e('<div class="ls-shadow"></div>').appendTo(e(u)); if (f.g.shadow.css("display") == "block" && !f.g.shadow.find("img").length) { f.g.showShadow = function() { f.g.shadow.css({ display: "none", visibility: "visible" }).fadeIn(500, function() { f.g.showShadow = false }) }; f.g.shadowImg = e("<img>").attr("src", f.o.skinsPath + f.o.skin + "/shadow.png").appendTo(f.g.shadow); f.g.shadowBtmMod = typeof parseInt(e(u).css("padding-bottom")) == "number" ? parseInt(e(u).css("padding-bottom")) : 0 } f.resizeShadow(); if (f.o.keybNav && e(u).find(".ls-slide").length > 1) { e("body").bind("keydown", function(e) { if (!f.g.isAnimating && !f.g.isLoading) { if (e.which == 37) { f.o.cbPrev(f.g); f.prev("clicked") } else if (e.which == 39) { f.o.cbNext(f.g); f.next("clicked") } } }) } if ("ontouchstart" in window && e(u).find(".ls-slide").length > 1 && f.o.touchNav) { e(u).find(".ls-inner").bind("touchstart", function(e) { var t = e.touches ? e.touches : e.originalEvent.touches; if (t.length == 1) { f.g.touchStartX = f.g.touchEndX = t[0].clientX } }); e(u).find(".ls-inner").bind("touchmove", function(e) { var t = e.touches ? e.touches : e.originalEvent.touches; if (t.length == 1) { f.g.touchEndX = t[0].clientX } if (Math.abs(f.g.touchStartX - f.g.touchEndX) > 45) { e.preventDefault() } }); e(u).find(".ls-inner").bind("touchend", function(t) { if (Math.abs(f.g.touchStartX - f.g.touchEndX) > 45) { if (f.g.touchStartX - f.g.touchEndX > 0) { f.o.cbNext(f.g); e(u).layerSlider("next") } else { f.o.cbPrev(f.g); e(u).layerSlider("prev") } } }) } if (f.o.pauseOnHover == true && e(u).find(".ls-slide").length > 1) { e(u).find(".ls-inner").hover(function() { f.o.cbPause(f.g); if (f.g.autoSlideshow) { f.g.paused = true; f.stop(); if (f.g.barTimer) { f.g.barTimer.stop() } if (f.g.circleTimer) { if (f.g.cttl) { f.g.cttl.pause() } } f.g.pausedSlideTime = (new Date).getTime() } }, function() { if (f.g.paused == true) { f.start(); f.g.paused = false } }) } f.resizeSlider(); if (f.o.yourLogo) { f.g.yourLogo = e("<img>").addClass("ls-yourlogo").appendTo(e(u)).attr("style", f.o.yourLogoStyle).css({ visibility: "hidden", display: "bock" }).load(function() { var t = 0; if (!f.g.yourLogo) { t = 1e3 } setTimeout(function() { f.g.yourLogo.data("originalWidth", f.g.yourLogo.width()); f.g.yourLogo.data("originalHeight", f.g.yourLogo.height()); if (f.g.yourLogo.css("left") != "auto") { f.g.yourLogo.data("originalLeft", f.g.yourLogo[0].style.left) } if (f.g.yourLogo.css("right") != "auto") { f.g.yourLogo.data("originalRight", f.g.yourLogo[0].style.right) } if (f.g.yourLogo.css("top") != "auto") { f.g.yourLogo.data("originalTop", f.g.yourLogo[0].style.top) } if (f.g.yourLogo.css("bottom") != "auto") { f.g.yourLogo.data("originalBottom", f.g.yourLogo[0].style.bottom) } if (f.o.yourLogoLink != false) { e("<a>").appendTo(e(u)).attr("href", f.o.yourLogoLink).attr("target", f.o.yourLogoTarget).css({ textDecoration: "none", outline: "none" }).append(f.g.yourLogo) } f.g.yourLogo.css({ display: "none", visibility: "visible" }); f.resizeYourLogo() }, t) }).attr("src", f.o.yourLogo) } e(window).resize(function() { f.resize() }); e(window).on("orientationchange", function() { e(window).resize() }); f.g.showSlider = true; if (f.o.animateFirstSlide == true) { if (f.o.autoStart) { f.g.autoSlideshow = true; e(u).find(".ls-nav-start").addClass("ls-nav-start-active") } else { e(u).find(".ls-nav-stop").addClass("ls-nav-stop-active") } f.next() } else if (typeof f.g.curLayer[0] !== "undefined") { f.imgPreload(f.g.curLayer, function() { f.g.curLayer.fadeIn(f.o.sliderFadeInDuration, function() { f.g.isLoading = false; e(this).addClass("ls-active"); if (f.o.autoPlayVideos) { e(this).delay(e(this).data("delayin") + 25).queue(function() { e(this).find(".ls-videopreview").click(); e(this).find("video, audio").each(function() { if (typeof e(this)[0].currentTime !== 0) { e(this)[0].currentTime = 0 } e(this).click() }); e(this).dequeue() }) } f.g.curLayer.find(' > *[class*="ls-l"]').each(function() { var t = e(this); if ((!t.hasClass("ls-video-layer") || t.hasClass("ls-video-layer") && f.o.autoPlayVideos === false) && t.data("showuntil") > 0) { t.data("showUntilTimer", setTimeout(function() { f.sublayerShowUntil(t) }, t.data("showuntil"))) } }) }); f.changeThumb(f.g.curLayerIndex); if (f.o.autoStart) { f.g.isLoading = false; f.start() } else { e(u).find(".ls-nav-stop").addClass("ls-nav-stop-active") } }) } f.o.cbInit(e(u)) }; f.resize = function() { f.g.resize = true; if (!f.g.isAnimating) { f.makeResponsive(f.g.curLayer, function() { if (f.g.ltContainer) { f.g.ltContainer.empty() } f.g.resize = false }); if (f.g.yourLogo) { f.resizeYourLogo() } } }; f.start = function() { if (f.g.autoSlideshow) { if (f.g.prevNext == "prev" && f.o.twoWaySlideshow) { f.prev() } else { f.next() } } else { f.g.autoSlideshow = true; if (!f.g.isAnimating && !f.g.isLoading) { f.timer() } } e(u).find(".ls-nav-start").addClass("ls-nav-start-active"); e(u).find(".ls-nav-stop").removeClass("ls-nav-stop-active") }; f.timer = function() { if (e(u).find(".ls-active").data("ls")) { var t = f.st.slideDelay } else { var t = f.o.slideDelay } var n = e(u).find(".ls-active").data("slidedelay") ? parseInt(e(u).find(".ls-active").data("slidedelay")) : t; if (!f.o.animateFirstSlide && !e(u).find(".ls-active").data("slidedelay")) { var r = e(u).find(".ls-slide:eq(" + (f.o.firstSlide - 1) + ")").data("slidedelay"); n = r ? r : t } clearTimeout(f.g.slideTimer); if (f.g.pausedSlideTime) { if (!f.g.startSlideTime) { f.g.startSlideTime = (new Date).getTime() } if (f.g.startSlideTime > f.g.pausedSlideTime) { f.g.pausedSlideTime = (new Date).getTime() } if (!f.g.curSlideTime) { f.g.curSlideTime = n } f.g.curSlideTime -= f.g.pausedSlideTime - f.g.startSlideTime; f.g.pausedSlideTime = false; f.g.startSlideTime = (new Date).getTime() } else { f.g.curSlideTime = n; f.g.startSlideTime = (new Date).getTime() } f.g.curSlideTime = parseInt(f.g.curSlideTime); f.g.slideTimer = setTimeout(function() { f.g.startSlideTime = f.g.pausedSlideTime = f.g.curSlideTime = false; f.start() }, f.g.curSlideTime); if (f.g.barTimer) { f.g.barTimer.animate({ width: f.g.sliderWidth() }, f.g.curSlideTime, "linear", function() { e(this).css({ width: 0 }) }) } if (f.g.circleTimer) { var i = f.g.circleTimer.find(".ls-ct-right .ls-ct-rotate"); var s = f.g.circleTimer.find(".ls-ct-left .ls-ct-rotate"); if (f.g.circleTimer.css("display") == "none") { i.css({ rotate: 0 }); s.css({ rotate: 0 }); f.g.circleTimer.fadeIn(350) } if (!f.g.cttl) { f.g.cttl = new TimelineLite; f.g.cttl.add(TweenLite.fromTo(i[0], n / 2e3, { rotation: 0 }, { ease: Linear.easeNone, rotation: 180, onReverseComplete: function() { f.g.cttl = false } })); f.g.cttl.add(TweenLite.fromTo(s[0], n / 2e3, { rotation: 0 }, { ease: Linear.easeNone, rotation: 180 })) } else { f.g.cttl.resume() } } }; f.stop = function() { f.g.pausedSlideTime = (new Date).getTime(); if (f.g.barTimer) { f.g.barTimer.stop() } if (f.g.circleTimer) { if (f.g.cttl) { f.g.cttl.pause() } } if (!f.g.paused && !f.g.originalAutoSlideshow) { e(u).find(".ls-nav-stop").addClass("ls-nav-stop-active"); e(u).find(".ls-nav-start").removeClass("ls-nav-start-active") } clearTimeout(f.g.slideTimer); f.g.autoSlideshow = false }; f.forcestop = function() { clearTimeout(f.g.slideTimer); f.g.autoSlideshow = false; clearTimeout(f.g.t1); clearTimeout(f.g.t2); clearTimeout(f.g.t3); clearTimeout(f.g.t4); clearTimeout(f.g.t5); if (f.g.barTimer) { f.g.barTimer.stop() } if (f.g.circleTimer) { if (f.g.cttl) { f.g.cttl.pause() } } e(u).find("*").stop(true, false).dequeue(); e(u).find(".ls-slide >").each(function() { if (e(this).data("tr")) { e(this).data("tr").pause() } }); if (!f.g.paused && !f.g.originalAutoSlideshow) { e(u).find(".ls-nav-stop").addClass("ls-nav-stop-active"); e(u).find(".ls-nav-start").removeClass("ls-nav-start-active") } }; f.restart = function() { e(u).find("*").stop(); clearTimeout(f.g.slideTimer); f.change(f.g.curLayerIndex, f.g.prevNext) }; f.ieEasing = function(t) { if (e.trim(t.toLowerCase()) == "swing" || e.trim(t.toLowerCase()) == "linear") { return t.toLowerCase() } else { return t.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") } }; f.prev = function(e) { if (f.g.curLayerIndex < 2) { f.g.nextLoop += 1 } if (f.g.nextLoop > f.o.loops && f.o.loops > 0 && !e) { f.g.nextLoop = 0; f.stop(); if (f.o.forceLoopNum == false) { f.o.loops = 0 } } else { var t = f.g.curLayerIndex < 2 ? f.g.layersNum : f.g.curLayerIndex - 1; f.g.prevNext = "prev"; f.change(t, f.g.prevNext) } }; f.next = function(e) { if (!f.o.randomSlideshow) { if (!(f.g.curLayerIndex < f.g.layersNum)) { f.g.nextLoop += 1 } if (f.g.nextLoop > f.o.loops && f.o.loops > 0 && !e) { f.g.nextLoop = 0; f.stop(); if (f.o.forceLoopNum == false) { f.o.loops = 0 } } else { var t = f.g.curLayerIndex < f.g.layersNum ? f.g.curLayerIndex + 1 : 1; f.g.prevNext = "next"; f.change(t, f.g.prevNext) } } else if (!e) { var t = f.g.curLayerIndex; var n = function() { t = Math.floor(Math.random() * f.g.layersNum) + 1; if (t == f.g.curLayerIndex) { n() } else { f.g.prevNext = "next"; f.change(t, f.g.prevNext) } }; n() } else if (e) { var t = f.g.curLayerIndex < f.g.layersNum ? f.g.curLayerIndex + 1 : 1; f.g.prevNext = "next"; f.change(t, f.g.prevNext) } }; f.change = function(t, n) { f.g.startSlideTime = f.g.pausedSlideTime = f.g.curSlideTime = false; if (f.g.barTimer) { f.g.barTimer.stop().delay(300).animate({ width: 0 }, 450) } if (f.g.circleTimer) { f.g.circleTimer.fadeOut(500); if (f.g.cttl) { f.g.cttl.reverse().duration(.35) } } if (f.g.pausedByVideo == true) { f.g.pausedByVideo = false; f.g.autoSlideshow = f.g.originalAutoSlideshow; f.g.curLayer.find('iframe[src*="youtube.com"], iframe[src*="youtu.be"], iframe[src*="player.vimeo"]').each(function() { e(this).parent().find(".ls-vpcontainer").fadeIn(f.g.v.fi, function() { e(this).parent().find("iframe").attr("src", "") }) }); f.g.curLayer.find("video, audio").each(function() { this.pause() }) } e(u).find('iframe[src*="youtube.com"], iframe[src*="youtu.be"], iframe[src*="player.vimeo"]').each(function() { clearTimeout(e(this).data("videoTimer")) }); clearTimeout(f.g.slideTimer); f.g.nextLayerIndex = t; f.g.nextLayer = e(u).find(".ls-slide:eq(" + (f.g.nextLayerIndex - 1) + ")"); if (!n) { if (f.g.curLayerIndex < f.g.nextLayerIndex) { f.g.prevNext = "next" } else { f.g.prevNext = "prev" } } var r = 0; if (e(u).find('iframe[src*="youtube.com"], iframe[src*="youtu.be"], iframe[src*="player.vimeo"]').length > 0) { r = f.g.v.fi } if (typeof f.g.nextLayer[0] !== "undefined") { f.imgPreload(f.g.nextLayer, function() { f.animate() }) } }; f.imgPreload = function(t, n) { f.g.isLoading = true; if (f.g.showSlider) { e(u).css({ visibility: "visible" }) } if (f.o.imgPreload) { var r = []; var i = 0; if (t.css("background-p_w_picpath") != "none" && t.css("background-p_w_picpath").indexOf("url") != -1 && !t.hasClass("ls-preloaded") && !t.hasClass("ls-not-preloaded")) { var s = t.css("background-p_w_picpath"); s = s.match(/url\((.*)\)/)[1].replace(/"/gi, ""); r[r.length] = [s, t] } t.find("img:not(.ls-preloaded, .ls-not-preloaded)").each(function() { if (f.o.lazyLoad === true) { e(this).attr("src", e(this).data("src")) } r[r.length] = [e(this).attr("src"), e(this)] }); t.find("*").each(function() { if (e(this).css("background-p_w_picpath") != "none" && e(this).css("background-p_w_picpath").indexOf("url") != -1 && !e(this).hasClass("ls-preloaded") && !e(this).hasClass("ls-not-preloaded")) { var t = e(this).css("background-p_w_picpath"); t = t.match(/url\((.*)\)/)[1].replace(/"/gi, ""); r[r.length] = [t, e(this)] } }); if (r.length == 0) { e(".ls-thumbnail-wrapper, .ls-nav-next, .ls-nav-prev, .ls-bottom-nav-wrapper").css({ visibility: "visible" }); f.makeResponsive(t, n) } else { if (f.g.ie78) { f.g.li.css("display", "block") } else { f.g.li.delay(400).fadeIn(300) } var o = function() { f.g.li.stop(true, true).css({ display: "none" }); e(".ls-thumbnail-wrapper, .ls-nav-next, .ls-nav-prev, .ls-bottom-nav-wrapper").css({ visibility: "visible" }); if (navigator.userAgent.indexOf("Trident/7") !== -1 || f.g.ie78) { setTimeout(function() { f.makeResponsive(t, n) }, 50) } else { f.makeResponsive(t, n) } }; for (x = 0; x < r.length; x++) { e("<img>").data("el", r[x]).load(function() { e(this).data("el")[1].addClass("ls-preloaded"); if (++i == r.length) { o() } }).error(function() { var t = e(this).data("el")[0].substring(e(this).data("el")[0].lastIndexOf("/") + 1, e(this).data("el")[0].length); if (window.console) { console.log('LayerSlider error:\r\n\r\nIt seems like the URL of the p_w_picpath or background p_w_picpath "' + t + '" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your p_w_picpaths used in the slider.') } else { alert('LayerSlider error:\r\n\r\nIt seems like the URL of the p_w_picpath or background p_w_picpath "' + t + '" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your p_w_picpaths used in the slider.') } e(this).addClass("ls-not-preloaded"); if (++i == r.length) { o() } }).attr("src", r[x][0]) } } } else { e(".ls-thumbnail-wrapper, .ls-nav-next, .ls-nav-prev, .ls-bottom-nav-wrapper").css({ visibility: "visible" }); f.makeResponsive(t, n) } }; f.makeResponsive = function(t, n) { t.css({ visibility: "hidden", display: "block" }); if (f.g.showShadow) { f.g.showShadow() } f.resizeSlider(); if (f.o.thumbnailNavigation == "always") { f.resizeThumb() } t.children().each(function() { var t = e(this); var n = t.data("originalLeft") ? t.data("originalLeft") : "0"; var r = t.data("originalTop") ? t.data("originalTop") : "0"; if (t.is("a") && t.children().length > 0) { t.css({ display: "block" }); t = t.children() } var i = "auto"; var s = "auto"; if (t.data("originalWidth")) { if (typeof t.data("originalWidth") == "number") { i = parseInt(t.data("originalWidth")) * f.g.ratio } else if (t.data("originalWidth").indexOf("%") != -1) { i = t.data("originalWidth") } } if (t.data("originalHeight")) { if (typeof t.data("originalHeight") == "number") { s = parseInt(t.data("originalHeight")) * f.g.ratio } else if (t.data("originalHeight").indexOf("%") != -1) { s = t.data("originalHeight") } } var o = t.data("originalPaddingLeft") ? parseInt(t.data("originalPaddingLeft")) * f.g.ratio : 0; var a = t.data("originalPaddingRight") ? parseInt(t.data("originalPaddingRight")) * f.g.ratio : 0; var l = t.data("originalPaddingTop") ? parseInt(t.data("originalPaddingTop")) * f.g.ratio : 0; var c = t.data("originalPaddingBottom") ? parseInt(t.data("originalPaddingBottom")) * f.g.ratio : 0; var h = t.data("originalBorderLeft") ? parseInt(t.data("originalBorderLeft")) * f.g.ratio : 0; var p = t.data("originalBorderRight") ? parseInt(t.data("originalBorderRight")) * f.g.ratio : 0; var d = t.data("originalBorderTop") ? parseInt(t.data("originalBorderTop")) * f.g.ratio : 0; var v = t.data("originalBorderBottom") ? parseInt(t.data("originalBorderBottom")) * f.g.ratio : 0; var m = t.data("originalFontSize"); var g = t.data("originalLineHeight"); if (f.g.responsiveMode || f.o.responsiveUnder > 0) { if (t.is("img") && !t.hasClass("ls-bg") && t.attr("src")) { t.css({ width: "auto", height: "auto" }); if ((i == 0 || i == "auto") && typeof s == "number" && s != 0) { i = s / t.height() * t.width() } if ((s == 0 || s == "auto") && typeof i == "number" && i != 0) { s = i / t.width() * t.height() } if (i == "auto") { i = t.width() * f.g.ratio } if (s == "auto") { s = t.height() * f.g.ratio } t.css({ width: i, height: s }) } if (!t.is("img")) { t.css({ width: i, height: s, "font-size": parseInt(m) * f.g.ratio + "px", "line-height": parseInt(g) * f.g.ratio + "px" }) } if (t.is("div") && t.find("iframe").data("videoSrc")) { var y = t.find("iframe"); y.attr("width", parseInt(y.data("originalWidth")) * f.g.ratio).attr("height", parseInt(y.data("originalHeight")) * f.g.ratio); t.css({ width: parseInt(y.data("originalWidth")) * f.g.ratio, height: parseInt(y.data("originalHeight")) * f.g.ratio }) } t.css({ padding: l + "px " + a + "px " + c + "px " + o + "px ", borderLeftWidth: h + "px", borderRightWidth: p + "px", borderTopWidth: d + "px", borderBottomWidth: v + "px" }) } if (!t.hasClass("ls-bg")) { var b = t; if (t.parent().is("a")) { t = t.parent() } var w = 0; if (f.o.layersContainer) { w = f.o.layersContainer > 0 ? (f.g.sliderWidth() - f.o.layersContainer) / 2 : 0 } else if (f.o.sublayerContainer) { w = f.o.sublayerContainer > 0 ? (f.g.sliderWidth() - f.o.sublayerContainer) / 2 : 0 } w = w < 0 ? 0 : w; if (n.indexOf("%") != -1) { t.css({ left: f.g.sliderWidth() / 100 * parseInt(n) - b.width() / 2 - o - h }) } else if (w > 0 || f.g.responsiveMode || f.o.responsiveUnder > 0) { t.css({ left: w + parseInt(n) * f.g.ratio }) } if (r.indexOf("%") != -1) { t.css({ top: f.g.sliderHeight() / 100 * parseInt(r) - b.height() / 2 - l - d }) } else if (f.g.responsiveMode || f.o.responsiveUnder > 0) { t.css({ top: parseInt(r) * f.g.ratio }) } } else { var E = e(u).find(".ls-inner"); t.css({ width: "auto", height: "auto" }); i = t.width(); s = t.height(); var S = f.g.ratio; if (f.g.sliderOriginalWidth.indexOf("%") != -1) { if (f.g.sliderWidth() > i) { S = f.g.sliderWidth() / i; if (f.g.sliderHeight() > s * S) { S = f.g.sliderHeight() / s } } else if (f.g.sliderHeight() > s) { S = f.g.sliderHeight() / s; if (f.g.sliderWidth() > i * S) { S = f.g.sliderWidth() / i } } } t.css({ width: i * S, height: s * S, marginLeft: E.width() / 2 - i * S / 2, marginTop: E.height() / 2 - s * S / 2 }) } }); t.css({ display: "none", visibility: "visible" }); f.resizeShadow(); n(); e(this).dequeue() }; f.resizeShadow = function() { if (f.g.shadowImg) { var e = function() { if (f.g.shadowImg.height() > 0) { if (f.g.shadowBtmMod > 0) { f.g.shadow.css({ height: f.g.shadowImg.height() / 2 }) } else { f.g.shadow.css({ height: f.g.shadowImg.height(), marginTop: -f.g.shadowImg.height() / 2 }) } } else { setTimeout(function() { e() }, 50) } }; e() } }; f.resizeSlider = function() { if (f.o.responsiveUnder > 0) { if (e(window).width() < f.o.responsiveUnder) { f.g.responsiveMode = true; f.g.sliderOriginalWidth = f.o.responsiveUnder + "px" } else { f.g.responsiveMode = false; f.g.sliderOriginalWidth = f.g.sliderOriginalWidthRU; f.g.ratio = 1 } } if (e(u).closest(".ls-wp-fullwidth-container").length) { e(u).closest(".ls-wp-fullwidth-helper").css({ width: e(window).width() }) } if (f.g.responsiveMode) { var t = e(u).parent(); if (f.o.fullScreen === true) { e(u).css({ width: "100%", height: e(window).height() }) } else { e(u).css({ width: t.width() - parseInt(e(u).css("padding-left")) - parseInt(e(u).css("padding-right")) }); f.g.ratio = e(u).width() / parseInt(f.g.sliderOriginalWidth); e(u).css({ height: f.g.ratio * parseInt(f.g.sliderOriginalHeight) }) } } else { f.g.ratio = 1; e(u).css({ width: f.g.sliderOriginalWidth, height: f.g.sliderOriginalHeight }) } if (e(u).closest(".ls-wp-fullwidth-container").length) { e(u).closest(".ls-wp-fullwidth-helper").css({ height: e(u).outerHeight(true) }); e(u).closest(".ls-wp-fullwidth-container").css({ height: e(u).outerHeight(true) }); e(u).closest(".ls-wp-fullwidth-helper").css({ width: e(window).width(), left: -e(u).closest(".ls-wp-fullwidth-container").offset().left }); if (f.g.sliderOriginalWidth.indexOf("%") != -1) { var n = parseInt(f.g.sliderOriginalWidth); var r = e("body").width() / 100 * n - (e(u).outerWidth() - e(u).width()); e(u).width(r) } } e(u).find(".ls-inner, .ls-lt-container").css({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }); if (f.g.curLayer && f.g.nextLayer) { f.g.curLayer.css({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }); f.g.nextLayer.css({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }) } else { e(u).find(".ls-slide").css({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }) } }; f.resizeYourLogo = function() { f.g.yourLogo.css({ width: f.g.yourLogo.data("originalWidth") * f.g.ratio, height: f.g.yourLogo.data("originalHeight") * f.g.ratio }); if (f.g.ie78) { f.g.yourLogo.css("display", "block") } else { f.g.yourLogo.fadeIn(300) } var t = oR = oT = oB = "auto"; if (f.g.yourLogo.data("originalLeft") && f.g.yourLogo.data("originalLeft").indexOf("%") != -1) { t = f.g.sliderWidth() / 100 * parseInt(f.g.yourLogo.data("originalLeft")) - f.g.yourLogo.width() / 2 + parseInt(e(u).css("padding-left")) } else { t = parseInt(f.g.yourLogo.data("originalLeft")) * f.g.ratio } if (f.g.yourLogo.data("originalRight") && f.g.yourLogo.data("originalRight").indexOf("%") != -1) { oR = f.g.sliderWidth() / 100 * parseInt(f.g.yourLogo.data("originalRight")) - f.g.yourLogo.width() / 2 + parseInt(e(u).css("padding-right")) } else { oR = parseInt(f.g.yourLogo.data("originalRight")) * f.g.ratio } if (f.g.yourLogo.data("originalTop") && f.g.yourLogo.data("originalTop").indexOf("%") != -1) { oT = f.g.sliderHeight() / 100 * parseInt(f.g.yourLogo.data("originalTop")) - f.g.yourLogo.height() / 2 + parseInt(e(u).css("padding-top")) } else { oT = parseInt(f.g.yourLogo.data("originalTop")) * f.g.ratio } if (f.g.yourLogo.data("originalBottom") && f.g.yourLogo.data("originalBottom").indexOf("%") != -1) { oB = f.g.sliderHeight() / 100 * parseInt(f.g.yourLogo.data("originalBottom")) - f.g.yourLogo.height() / 2 + parseInt(e(u).css("padding-bottom")) } else { oB = parseInt(f.g.yourLogo.data("originalBottom")) * f.g.ratio } f.g.yourLogo.css({ left: t, right: oR, top: oT, bottom: oB }) }; f.resizeThumb = function() { f.bottomNavSizeHelper("on"); var t = f.g.sliderOriginalWidth.indexOf("%") == -1 ? parseInt(f.g.sliderOriginalWidth) : f.g.sliderWidth(); e(u).find(".ls-thumbnail-slide a").css({ width: parseInt(f.o.tnWidth * f.g.ratio), height: parseInt(f.o.tnHeight * f.g.ratio) }); e(u).find(".ls-thumbnail-slide a:last").css({ margin: 0 }); e(u).find(".ls-thumbnail-slide").css({ height: parseInt(f.o.tnHeight * f.g.ratio) }); var n = e(u).find(".ls-thumbnail"); var r = f.o.tnContainerWidth.indexOf("%") == -1 ? parseInt(f.o.tnContainerWidth) : parseInt(t / 100 * parseInt(f.o.tnContainerWidth)); n.css({ width: r * Math.floor(f.g.ratio * 100) / 100 }); if (n.width() > e(u).find(".ls-thumbnail-slide").width()) { n.css({ width: e(u).find(".ls-thumbnail-slide").width() }) } f.bottomNavSizeHelper("off") }; f.changeThumb = function(t) { var n = t ? t : f.g.nextLayerIndex; e(u).find(".ls-thumbnail-slide a:not(.ls-thumb-" + n + ")").children().each(function() { e(this).removeClass("ls-thumb-active").stop().fadeTo(750, f.o.tnInactiveOpacity / 100) }); e(u).find(".ls-thumbnail-slide a.ls-thumb-" + n).children().addClass("ls-thumb-active").stop().fadeTo(750, f.o.tnActiveOpacity / 100) }; f.scrollThumb = function() { if (!e(u).find(".ls-thumbnail-slide-container").hasClass("ls-thumbnail-slide-hover")) { var t = e(u).find(".ls-thumb-active").length ? e(u).find(".ls-thumb-active").parent() : false; if (t) { var n = t.position().left + t.width() / 2; var r = e(u).find(".ls-thumbnail-slide-container").width() / 2 - n; r = r < e(u).find(".ls-thumbnail-slide-container").width() - e(u).find(".ls-thumbnail-slide").width() ? e(u).find(".ls-thumbnail-slide-container").width() - e(u).find(".ls-thumbnail-slide").width() : r; r = r > 0 ? 0 : r; e(u).find(".ls-thumbnail-slide").animate({ marginLeft: r }, 600) } } }; f.bottomNavSizeHelper = function(t) { if (f.o.hoverBottomNav && !e(u).hasClass("ls-hover")) { switch (t) { case "on": f.g.thumbsWrapper.css({ visibility: "hidden", display: "block" }); break; case "off": f.g.thumbsWrapper.css({ visibility: "visible", display: "none" }); break } } }; f.animate = function() { if (e(u).find(".ls-slide").length > 1) { f.g.isAnimating = true } f.g.isLoading = false; clearTimeout(f.g.slideTimer); clearTimeout(f.g.changeTimer); f.g.stopLayer = f.g.curLayer; f.o.cbAnimStart(f.g); if (f.o.thumbnailNavigation == "always") { f.changeThumb(); if (!("ontouchstart" in window)) { f.scrollThumb() } } f.g.nextLayer.addClass("ls-animating"); var t = curLayerRight = curLayerTop = curLayerBottom = nextLayerLeft = nextLayerRight = nextLayerTop = nextLayerBottom = layerMarginLeft = layerMarginRight = layerMarginTop = layerMarginBottom = "auto"; var a = nextLayerWidth = f.g.sliderWidth(); var l = nextLayerHeight = f.g.sliderHeight(); var c = f.g.prevNext == "prev" ? f.g.curLayer : f.g.nextLayer; var h = c.data("slidedirection") ? c.data("slidedirection") : f.o.slideDirection; var p = f.g.slideDirections[f.g.prevNext][h]; if (p == "left" || p == "right") { a = curLayerTop = nextLayerWidth = nextLayerTop = 0; layerMarginTop = 0 } if (p == "top" || p == "bottom") { l = t = nextLayerHeight = nextLayerLeft = 0; layerMarginLeft = 0 } switch (p) { case "left": curLayerRight = nextLayerLeft = 0; layerMarginLeft = -f.g.sliderWidth(); break; case "right": t = nextLayerRight = 0; layerMarginLeft = f.g.sliderWidth(); break; case "top": curLayerBottom = nextLayerTop = 0; layerMarginTop = -f.g.sliderHeight(); break; case "bottom": curLayerTop = nextLayerBottom = 0; layerMarginTop = f.g.sliderHeight(); break } f.g.curLayer.css({ left: t, right: curLayerRight, top: curLayerTop, bottom: curLayerBottom }); f.g.nextLayer.css({ width: nextLayerWidth, height: nextLayerHeight, left: nextLayerLeft, right: nextLayerRight, top: nextLayerTop, bottom: nextLayerBottom }); var d = f.g.curLayer.data("delayout") ? parseInt(f.g.curLayer.data("delayout")) : f.o.delayOut; var v = f.g.curLayer.data("durationout") ? parseInt(f.g.curLayer.data("durationout")) : f.o.durationOut; var m = f.g.curLayer.data("easingout") ? f.g.curLayer.data("easingout") : f.o.easingOut; var g = f.g.nextLayer.data("delayin") ? parseInt(f.g.nextLayer.data("delayin")) : f.o.delayIn; var y = f.g.nextLayer.data("durationin") ? parseInt(f.g.nextLayer.data("durationin")) : f.o.durationIn; if (y === 0) { y = 1 } var b = f.g.nextLayer.data("easingin") ? f.g.nextLayer.data("easingin") : f.o.easingIn; var w = function() { f.g.curLayer.delay(d + v / 15).animate({ width: a, height: l }, v, m, function() { E() }) }; var E = function() { f.g.stopLayer.find(' > *[class*="ls-l"]').each(function() { if (e(this).data("tr")) { e(this).data("tr").kill() } e(this).css({ filter: "none" }) }); f.g.curLayer = f.g.nextLayer; f.g.prevLayerIndex = f.g.curLayerIndex; f.g.curLayerIndex = f.g.nextLayerIndex; f.o.cbAnimStop(f.g); if (f.o.imgPreload && f.o.lazyLoad) { var t = f.g.curLayerIndex == f.g.layersNum ? 1 : f.g.curLayerIndex + 1; e(u).find(".ls-slide").eq(t - 1).find("img:not(.ls-preloaded)").each(function() { e(this).load(function() { e(this).addClass("ls-preloaded") }).error(function() { var t = e(this).data("src").substring(e(this).data("src").lastIndexOf("/") + 1, e(this).data("src").length); if (window.console) { console('LayerSlider error:\r\n\r\nIt seems like the URL of the p_w_picpath or background p_w_picpath "' + t + '" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your p_w_picpaths used in the slider.') } else { alert('LayerSlider error:\r\n\r\nIt seems like the URL of the p_w_picpath or background p_w_picpath "' + t + '" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your p_w_picpaths used in the slider.') } e(this).addClass("ls-not-preloaded") }).attr("src", e(this).data("src")) }) } e(u).find(".ls-slide").removeClass("ls-active"); e(u).find(".ls-slide:eq(" + (f.g.curLayerIndex - 1) + ")").addClass("ls-active").removeClass("ls-animating"); e(u).find(".ls-bottom-slidebuttons a").removeClass("ls-nav-active"); e(u).find(".ls-bottom-slidebuttons a:eq(" + (f.g.curLayerIndex - 1) + ")").addClass("ls-nav-active"); if (f.g.autoSlideshow) { f.timer() } f.g.isAnimating = false; if (f.g.resize == true) { f.makeResponsive(f.g.curLayer, function() { f.g.resize = false }) } }; var S = function(t) { f.g.curLayer.find(' > *[class*="ls-l"]').each(function() { if (!e(this).data("transitiontype")) { f.transitionType(e(this)) } e(this).removeClass("ls-videohack"); var r = e(this).data("slidedirection") ? e(this).data("slidedirection") : p; var i, s; switch (r) { case "left": i = -f.g.sliderWidth(); s = 0; break; case "right": i = f.g.sliderWidth(); s = 0; break; case "top": s = -f.g.sliderHeight(); i = 0; break; case "bottom": s = f.g.sliderHeight(); i = 0; break; case "fade": s = 0; i = 0; break } if (e(this).data("transitiontype") === "new") { var o = "new" } else { var o = e(this).data("slideoutdirection") ? e(this).data("slideoutdirection") : false } switch (o) { case "left": i = f.g.sliderWidth(); s = 0; break; case "right": i = -f.g.sliderWidth(); s = 0; break; case "top": s = f.g.sliderHeight(); i = 0; break; case "bottom": s = -f.g.sliderHeight(); i = 0; break; case "fade": s = 0; i = 0; break; case "new": if (e(this).data("offsetxout")) { if (e(this).data("offsetxout") === "left") { i = f.g.sliderWidth() } else if (e(this).data("offsetxout") === "right") { i = -f.g.sliderWidth() } else { i = -parseInt(e(this).data("offsetxout")) } } else { i = -f.lt.offsetXOut } if (e(this).data("offsetyout")) { if (e(this).data("offsetyout") === "top") { s = f.g.sliderHeight() } else if (e(this).data("offsetyout") === "bottom") { s = -f.g.sliderHeight() } else { s = -parseInt(e(this).data("offsetyout")) } } else { s = -f.lt.offsetYOut } break } var u = curSubRotateX = curSubRotateY = curSubScale = curSubSkewX = curSubSkewY = curSubScaleX = curSubScaleY = "none"; u = e(this).data("rotateout") ? e(this).data("rotateout") : f.lt.rotateOut; curSubRotateX = e(this).data("rotatexout") ? e(this).data("rotatexout") : f.lt.rotateXOut; curSubRotateY = e(this).data("rotateyout") ? e(this).data("rotateyout") : f.lt.rotateYOut; curSubScale = e(this).data("scaleout") ? e(this).data("scaleout") : f.lt.scaleOut; curSubSkewX = e(this).data("skewxout") ? e(this).data("skewxout") : f.lt.skewXOut; curSubSkewY = e(this).data("skewyout") ? e(this).data("skewyout") : f.lt.skewYOut; if (curSubScale === 1) { curSubScaleX = e(this).data("scalexout") ? e(this).data("scalexout") : f.lt.scaleXOut; curSubScaleY = e(this).data("scaleyout") ? e(this).data("scaleyout") : f.lt.scaleYOut } else { curSubScaleX = curSubScaleY = curSubScale } var a = e(this).data("transformoriginout") ? e(this).data("transformoriginout").split(" ") : f.lt.transformOriginOut; for (var l = 0; l < a.length; l++) { if (a[l].indexOf("%") === -1 && a[l].indexOf("left") !== -1 && a[l].indexOf("right") !== -1 && a[l].indexOf("top") !== -1 && a[l].indexOf("bottom") !== -1) { a[l] = "" + parseInt(a[l]) * f.g.ratio + "px" } } var c = a.join(" "); var h = e(this).data("perspectiveout") ? e(this).data("perspectiveout") : f.lt.perspectiveOut; var d = parseInt(e(this).css("left")); var v = parseInt(e(this).css("top")); var m = parseInt(e(this).attr("class").split("ls-l")[1]); var g = e(this).outerWidth() > e(this).outerHeight() ? e(this).outerWidth() : e(this).outerHeight(); var y = parseInt(u) === 0 ? e(this).outerWidth() : g; var b = parseInt(u) === 0 ? e(this).outerHeight() : g; if (m === -1 && o !== "new" || e(this).data("offsetxout") === "left" || e(this).data("offsetxout") === "right") { if (i < 0) { i = -(f.g.sliderWidth() - d + (curSubScaleX / 2 - .5) * y + 100) } else if (i > 0) { i = d + (curSubScaleX / 2 + .5) * y + 100 } } else { i = i * f.g.ratio } if (m === -1 && o !== "new" || e(this).data("offsetyout") === "top" || e(this).data("offsetyout") === "bottom") { if (s < 0) { s = -(f.g.sliderHeight() - v + (curSubScaleY / 2 - .5) * b + 100) } else if (s > 0) { s = v + (curSubScaleY / 2 + .5) * b + 100 } } else { s = s * f.g.ratio } if (m === -1 || o === "new") { var w = 1 } else { var E = f.g.curLayer.data("parallaxout") ? parseInt(f.g.curLayer.data("parallaxout")) : f.o.parallaxOut; var w = m * E } if (e(this).data("transitiontype") === "new") { var S = f.lt.delayOut; var x = f.lt.durationOut; var T = f.lt.easingOut } else { var S = f.o.delayOut; var x = f.o.durationOut; var T = f.o.easingOut } var N = e(this).data("delayout") ? parseInt(e(this).data("delayout")) : S; var C = e(this).data("durationout") ? parseInt(e(this).data("durationout")) : x; if (C === 0) { C = 1 } var k = e(this).data("easingout") ? e(this).data("easingout") : T; if (t) { N = 0; C = t } if (e(this).data("showUntilTimer")) { clearTimeout(e(this).data("showUntilTimer")) } var L = { visibility: "hidden" }; var A = e(this); var O = { rotation: u, rotationX: curSubRotateX, rotationY: curSubRotateY, skewX: curSubSkewX, skewY: curSubSkewY, scaleX: curSubScaleX, scaleY: curSubScaleY, x: -i * w, y: -s * w, delay: N / 1e3, ease: n(k), onComplete: function() { A.css(L) } }; if (o == "fade" || !o && r === "fade" || e(this).data("fadeout") !== "false" && e(this).data("transitiontype") === "new") { O["opacity"] = 0; L["opacity"] = e(this).data("originalOpacity") } if (e(this).data("tr")) { e(this).data("tr").kill() } TweenLite.set(e(this)[0], { transformOrigin: c, transformPerspective: h }); e(this).data("tr", TweenLite.to(e(this)[0], C / 1e3, O)) }) }; var x = function() { f.g.nextLayer.delay(d + g).animate({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }, y, b) }; var T = function() { if (f.g.totalDuration) { d = 0 } if (typeof f.o.cbTimeLineStart === "function") { f.o.cbTimeLineStart(f.g, d + g) } f.g.nextLayer.find(' > *[class*="ls-l"]').each(function() { if (!e(this).data("transitiontype")) { f.transitionType(e(this)) } if (e(this).data("transitiontype") === "new") { var t = "new" } else { var t = e(this).data("slidedirection") ? e(this).data("slidedirection") : p } var r, i; switch (t) { case "left": r = -f.g.sliderWidth(); i = 0; break; case "right": r = f.g.sliderWidth(); i = 0; break; case "top": i = -f.g.sliderHeight(); r = 0; break; case "bottom": i = f.g.sliderHeight(); r = 0; break; case "fade": i = 0; r = 0; break; case "new": if (e(this).data("offsetxin")) { if (e(this).data("offsetxin") === "left") { r = -f.g.sliderWidth() } else if (e(this).data("offsetxin") === "right") { r = f.g.sliderWidth() } else { r = parseInt(e(this).data("offsetxin")) } } else { r = f.lt.offsetXIn } if (e(this).data("offsetyin")) { if (e(this).data("offsetyin") === "top") { i = -f.g.sliderHeight() } else if (e(this).data("offsetyin") === "bottom") { i = f.g.sliderHeight() } else { i = parseInt(e(this).data("offsetyin")) } } else { i = f.lt.offsetYIn } break } var s = nextSubRotateX = nextSubRotateY = nextSubScale = nextSubSkewX = nextSubSkewY = nextSubScaleX = nextSubScaleY = "none"; s = e(this).data("rotatein") ? e(this).data("rotatein") : f.lt.rotateIn; nextSubRotateX = e(this).data("rotatexin") ? e(this).data("rotatexin") : f.lt.rotateXIn; nextSubRotateY = e(this).data("rotateyin") ? e(this).data("rotateyin") : f.lt.rotateYIn; nextSubScale = e(this).data("scalein") ? e(this).data("scalein") : f.lt.scaleIn; nextSubSkewX = e(this).data("skewxin") ? e(this).data("skewxin") : f.lt.skewXIn; nextSubSkewY = e(this).data("skewyin") ? e(this).data("skewyin") : f.lt.skewYIn; if (nextSubScale === 1) { nextSubScaleX = e(this).data("scalexin") ? e(this).data("scalexin") : f.lt.scaleXIn; nextSubScaleY = e(this).data("scaleyin") ? e(this).data("scaleyin") : f.lt.scaleYIn } else { nextSubScaleX = nextSubScaleY = nextSubScale } var o = e(this).data("transformoriginin") ? e(this).data("transformoriginin").split(" ") : f.lt.transformOriginIn; for (var u = 0; u < o.length; u++) { if (o[u].indexOf("%") === -1 && o[u].indexOf("left") !== -1 && o[u].indexOf("right") !== -1 && o[u].indexOf("top") !== -1 && o[u].indexOf("bottom") !== -1) { o[u] = "" + parseInt(o[u]) * f.g.ratio + "px" } } var a = o.join(" "); var l = e(this).data("perspectivein") ? e(this).data("perspectivein") : f.lt.perspectiveIn; var c = parseInt(e(this).css("left")); var h = parseInt(e(this).css("top")); var d = parseInt(e(this).attr("class").split("ls-l")[1]); if (e(this)[0].style.width.indexOf("%") !== -1) { e(this).css({ width: f.g.sliderWidth() / 100 * parseInt(e(this)[0].style.width) }) } var v = e(this).outerWidth() > e(this).outerHeight() ? e(this).outerWidth() : e(this).outerHeight(); var m = parseInt(s) === 0 ? e(this).outerWidth() : v; var g = parseInt(s) === 0 ? e(this).outerHeight() : v; if (d === -1 && t !== "new" || e(this).data("offsetxin") === "left" || e(this).data("offsetxin") === "right") { if (r < 0) { r = -(c + (nextSubScaleX / 2 + .5) * m + 100) } else if (r > 0) { r = f.g.sliderWidth() - c + (nextSubScaleX / 2 - .5) * m + 100 } } else { r = r * f.g.ratio } if (d === -1 && t !== "new" || e(this).data("offsetyin") === "top" || e(this).data("offsetyin") === "bottom") { if (i < 0) { i = -(h + (nextSubScaleY / 2 + .5) * g + 100) } else if (i > 0) { i = f.g.sliderHeight() - h + (nextSubScaleY / 2 - .5) * g + 100 } } else { i = i * f.g.ratio } if (d === -1 || t === "new") { var y = 1 } else { var b = f.g.nextLayer.data("parallaxin") ? parseInt(f.g.nextLayer.data("parallaxin")) : f.o.parallaxIn; var y = d * b } if (e(this).data("transitiontype") === "new") { var w = f.lt.delayIn; var E = f.lt.durationIn; var S = f.lt.easingIn } else { var w = f.o.delayIn; var E = f.o.durationIn; var S = f.o.easingIn } var x = e(this).data("delayin") ? parseInt(e(this).data("delayin")) : w; var T = e(this).data("durationin") ? parseInt(e(this).data("durationin")) : E; var N = e(this).data("easingin") ? e(this).data("easingin") : S; var C = e(this); var k = function() { if (C.hasClass("ls-video-layer")) { C.addClass("ls-videohack") } if (f.o.autoPlayVideos == true) { C.find(".ls-videopreview").click(); C.find("video, audio").each(function() { if (typeof e(this)[0].currentTime !== 0) { e(this)[0].currentTime = 0 } e(this).click() }) } if ((!C.hasClass("ls-video-layer") || C.hasClass("ls-video-layer") && f.o.autoPlayVideos === false) && C.data("showuntil") > 0) { C.data("showUntilTimer", setTimeout(function() { f.sublayerShowUntil(C) }, C.data("showuntil"))) } }; e(this).css({ marginLeft: 0, marginTop: 0 }); var L = { scaleX: nextSubScaleX, scaleY: nextSubScaleY, skewX: nextSubSkewX, skewY: nextSubSkewY, rotation: s, rotationX: nextSubRotateX, rotationY: nextSubRotateY, visibility: "visible", x: r * y, y: i * y }; var A = { rotation: 0, rotationX: 0, rotationY: 0, skewX: 0, skewY: 0, scaleX: 1, scaleY: 1, ease: n(N), delay: x / 1e3, x: 0, y: 0, onComplete: function() { k() } }; if (t.indexOf("fade") != -1 || e(this).data("fadein") !== "false" && e(this).data("transitiontype") === "new") { L["opacity"] = 0; A["opacity"] = e(this).data("originalOpacity") } if (e(this).data("tr")) { e(this).data("tr").kill() } TweenLite.set(e(this)[0], { transformPerspective: l, transformOrigin: a }); e(this).data("tr", TweenLite.fromTo(e(this)[0], T / 1e3, L, A)) }) }; var N = function() { if (i(e(u)) && (f.g.nextLayer.data("transition3d") || f.g.nextLayer.data("customtransition3d"))) { if (f.g.nextLayer.data("transition3d") && f.g.nextLayer.data("customtransition3d")) { var t = Math.floor(Math.random() * 2); var n = [ ["3d", f.g.nextLayer.data("transition3d")], ["custom3d", f.g.nextLayer.data("customtransition3d")] ]; k(n[t][0], n[t][1]) } else if (f.g.nextLayer.data("transition3d")) { k("3d", f.g.nextLayer.data("transition3d")) } else { k("custom3d", f.g.nextLayer.data("customtransition3d")) } } else { if (f.g.nextLayer.data("transition2d") && f.g.nextLayer.data("customtransition2d")) { var t = Math.floor(Math.random() * 2); var n = [ ["2d", f.g.nextLayer.data("transition2d")], ["custom2d", f.g.nextLayer.data("customtransition2d")] ]; k(n[t][0], n[t][1]) } else if (f.g.nextLayer.data("transition2d")) { k("2d", f.g.nextLayer.data("transition2d")) } else if (f.g.nextLayer.data("customtransition2d")) { k("custom2d", f.g.nextLayer.data("customtransition2d")) } else { k("2d", "1") } } }; var C = function() { if (i(e(u)) && LSCustomTransition.indexOf("3d") != -1) { k("3d", LSCustomTransition.split(":")[1]) } else { if (LSCustomTransition.indexOf("3d") != -1) { k("2d", "all") } else { k("2d", LSCustomTransition.split(":")[1]) } } }; var k = function(e, t) { var n = e.indexOf("custom") == -1 ? f.t : f.ct; var r = "3d", i, s; if (e.indexOf("2d") != -1) { r = "2d" } if (t.indexOf("last") != -1) { s = n["t" + r].length - 1; i = "last" } else if (t.indexOf("all") != -1) { s = Math.floor(Math.random() * o(n["t" + r])); i = "random from all" } else { var u = t.split(","); var a = u.length; s = parseInt(u[Math.floor(Math.random() * a)]) - 1; i = "random from specified" } L(r, n["t" + r][s]) }; var L = function(t, i) { var o = e(u).find(".ls-inner"); var a = f.g.curLayer.find('*[class*="ls-l"]').length > 0 ? 1e3 : 0; var l = i.name.toLowerCase().indexOf("carousel") == -1 ? false : true; var c = i.name.toLowerCase().indexOf("crossfad") == -1 ? false : true; var h = typeof i.cols; var p = typeof i.rows; switch (h) { case "number": h = i.cols; break; case "string": h = Math.floor(Math.random() * (parseInt(i.cols.split(",")[1]) - parseInt(i.cols.split(",")[0]) + 1)) + parseInt(i.cols.split(",")[0]); break; default: h = Math.floor(Math.random() * (i.cols[1] - i.cols[0] + 1)) + i.cols[0]; break } switch (p) { case "number": p = i.rows; break; case "string": p = Math.floor(Math.random() * (parseInt(i.rows.split(",")[1]) - parseInt(i.rows.split(",")[0]) + 1)) + parseInt(i.rows.split(",")[0]); break; default: p = Math.floor(Math.random() * (i.rows[1] - i.rows[0] + 1)) + i.rows[0]; break } if (f.g.isMobile() == true && f.o.optimizeForMobile == true || f.g.ie78 && f.o.optimizeForIE78 == true) { if (h >= 15) { h = 7 } else if (h >= 5) { h = 4 } else if (h >= 4) { h = 3 } else if (h > 2) { h = 2 } if (p >= 15) { p = 7 } else if (p >= 5) { p = 4 } else if (p >= 4) { p = 3 } else if (p > 2) { p = 2 } if (p > 2 && h > 2) { p = 2; if (h > 4) { h = 4 } } } var d = e(u).find(".ls-inner").width() / h; var v = e(u).find(".ls-inner").height() / p; if (!f.g.ltContainer) { f.g.ltContainer = e("<div>").addClass("ls-lt-container").addClass("ls-overflow-hidden").css({ width: o.width(), height: o.height() }).prependTo(o) } else { f.g.ltContainer.stop(true, true).empty().css({ display: "block", width: o.width(), height: o.height() }) } var m = o.width() - Math.floor(d) * h; var g = o.height() - Math.floor(v) * p; var y = []; y.randomize = function() { var e = this.length, t, n, r; if (e == 0) return false; while (--e) { t = Math.floor(Math.random() * (e + 1)); n = this[e]; r = this[t]; this[e] = r; this[t] = n } return this }; for (var b = 0; b < h * p; b++) { y.push(b) } switch (i.tile.sequence) { case "reverse": y.reverse(); break; case "col-forward": y = s(p, h, "forward"); break; case "col-reverse": y = s(p, h, "reverse"); break; case "random": y.randomize(); break } var w = f.g.curLayer.find(".ls-bg"); var x = f.g.nextLayer.find(".ls-bg"); if (w.length == 0 && x.length == 0) { t = "2d"; i = e.extend(true, {}, f.t["t2d"][0]); i.transition.duration = 1; i.tile.delay = 0 } if (t == "3d") { f.g.totalDuration = (h * p - 1) * i.tile.delay; var N = 0; if (i.before && i.before.duration) { N += i.before.duration } if (i.animation && i.animation.duration) { N += i.animation.duration } if (i.after && i.after.duration) { N += i.after.duration } f.g.totalDuration += N; var C = 0; if (i.before && i.before.delay) { C += i.before.delay } if (i.animation && i.animation.delay) { C += i.animation.delay } if (i.after && i.after.delay) { C += i.after.delay } f.g.totalDuration += C } else { f.g.totalDuration = (h * p - 1) * i.tile.delay + i.transition.duration; f.g.curTiles = e("<div>").addClass("ls-curtiles").appendTo(f.g.ltContainer); f.g.nextTiles = e("<div>").addClass("ls-nexttiles").appendTo(f.g.ltContainer) } var k = f.g.prevNext; for (var L = 0; L < h * p; L++) { var A = L % h == 0 ? m : 0; var O = L > (p - 1) * h - 1 ? g : 0; var M = e("<div>").addClass("ls-lt-tile").css({ width: Math.floor(d) + A, height: Math.floor(v) + O }).appendTo(f.g.ltContainer); var _, D; if (t == "3d") { M.addClass("ls-3d-container"); var P = Math.floor(d) + A; var H = Math.floor(v) + O; var B; if (i.animation.direction == "horizontal") { if (Math.abs(i.animation.transition.rotateY) > 90 && i.tile.depth != "large") { B = Math.floor(P / 7) + A } else { B = P } } else { if (Math.abs(i.animation.transition.rotateX) > 90 && i.tile.depth != "large") { B = Math.floor(H / 7) + O } else { B = H } } var j = P / 2; var F = H / 2; var I = B / 2; var q = function(t, n, r, i, s, o, u, a, f) { e("<div>").addClass(t).css({ width: r, height: i, "-o-transform": "translate3d(" + s + "px, " + o + "px, " + u + "px) rotateX(" + a + "deg) rotateY(" + f + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-ms-transform": "translate3d(" + s + "px, " + o + "px, " + u + "px) rotateX(" + a + "deg) rotateY(" + f + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-moz-transform": "translate3d(" + s + "px, " + o + "px, " + u + "px) rotateX(" + a + "deg) rotateY(" + f + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-webkit-transform": "translate3d(" + s + "px, " + o + "px, " + u + "px) rotateX(" + a + "deg) rotateY(" + f + "deg) rotateZ(0deg) scale3d(1, 1, 1)", transform: "translate3d(" + s + "px, " + o + "px, " + u + "px) rotateX(" + a + "deg) rotateY(" + f + "deg) rotateZ(0deg) scale3d(1, 1, 1)" }).appendTo(n) }; q("ls-3d-box", M, 0, 0, 0, 0, -I, 0, 0); var R = 0; var U = 0; var z = 0; if (i.animation.direction == "vertical" && Math.abs(i.animation.transition.rotateX) > 90) { q("ls-3d-back", M.find(".ls-3d-box"), P, H, -j, -F, -I, 180, 0) } else { q("ls-3d-back", M.find(".ls-3d-box"), P, H, -j, -F, -I, 0, 180) } q("ls-3d-bottom", M.find(".ls-3d-box"), P, B, -j, F - I, 0, -90, 0); q("ls-3d-top", M.find(".ls-3d-box"), P, B, -j, -F - I, 0, 90, 0); q("ls-3d-front", M.find(".ls-3d-box"), P, H, -j, -F, I, 0, 0); q("ls-3d-left", M.find(".ls-3d-box"), B, H, -j - I, -F, 0, 0, -90); q("ls-3d-right", M.find(".ls-3d-box"), B, H, j - I, -F, 0, 0, 90); _ = M.find(".ls-3d-front"); if (i.animation.direction == "horizontal") { if (Math.abs(i.animation.transition.rotateY) > 90) { D = M.find(".ls-3d-back") } else { D = M.find(".ls-3d-left, .ls-3d-right") } } else { if (Math.abs(i.animation.transition.rotateX) > 90) { D = M.find(".ls-3d-back") } else { D = M.find(".ls-3d-top, .ls-3d-bottom") } } var W = y[L] * i.tile.delay; var X = f.g.ltContainer.find(".ls-3d-container:eq(" + L + ") .ls-3d-box"); var V = new TimelineLite; if (i.before && i.before.transition) { i.before.transition.delay = i.before.transition.delay ? (i.before.transition.delay + W) / 1e3 : W / 1e3; V.to(X[0], i.before.duration / 1e3, r(i.before.transition, i.before.easing)) } else { i.animation.transition.delay = i.animation.transition.delay ? (i.animation.transition.delay + W) / 1e3 : W / 1e3 } V.to(X[0], i.animation.duration / 1e3, r(i.animation.transition, i.animation.easing)); if (i.after) { if (!i.after.transition) { i.after.transition = {} } V.to(X[0], i.after.duration / 1e3, r(i.after.transition, i.after.easing, "after")) } } else { var J = L1 = T2 = L2 = "auto"; var K = O2 = 1; if (i.transition.direction == "random") { var Q = ["top", "bottom", "right", "left"]; var G = Q[Math.floor(Math.random() * Q.length)] } else { var G = i.transition.direction } if (i.name.toLowerCase().indexOf("mirror") != -1 && L % 2 == 0) { if (k == "prev") { k = "next" } else { k = "prev" } } if (k == "prev") { switch (G) { case "top": G = "bottom"; break; case "bottom": G = "top"; break; case "left": G = "right"; break; case "right": G = "left"; break; case "topleft": G = "bottomright"; break; case "topright": G = "bottomleft"; break; case "bottomleft": G = "topright"; break; case "bottomright": G = "topleft"; break } } switch (G) { case "top": J = T2 = -M.height(); L1 = L2 = 0; break; case "bottom": J = T2 = M.height(); L1 = L2 = 0; break; case "left": J = T2 = 0; L1 = L2 = -M.width(); break; case "right": J = T2 = 0; L1 = L2 = M.width(); break; case "topleft": J = M.height(); T2 = 0; L1 = M.width(); L2 = 0; break; case "topright": J = M.height(); T2 = 0; L1 = -M.width(); L2 = 0; break; case "bottomleft": J = -M.height(); T2 = 0; L1 = M.width(); L2 = 0; break; case "bottomright": J = -M.height(); T2 = 0; L1 = -M.width(); L2 = 0; break } f.g.scale2D = i.transition.scale ? i.transition.scale : 1; if (l == true && f.g.scale2D != 1) { J = J / 2; T2 = T2 / 2; L1 = L1 / 2; L2 = L2 / 2 } switch (i.transition.type) { case "fade": J = T2 = L1 = L2 = 0; K = 0; O2 = 1; break; case "mixed": K = 0; O2 = 1; if (f.g.scale2D == 1) { T2 = L2 = 0 } break } if ((i.transition.rotate || i.transition.rotateX || i.transition.rotateY || f.g.scale2D != 1) && !f.g.ie78 && i.transition.type != "slide") { M.css({ overflow: "visible" }) } else { M.css({ overflow: "hidden" }) } if (l == true) { f.g.curTiles.css({ overflow: "visible" }) } else { f.g.curTiles.css({ overflow: "hidden" }) } if (c == true || i.transition.type == "slide" || l == true) { var Y = M.appendTo(f.g.curTiles); var Z = M.clone().appendTo(f.g.nextTiles); _ = e("<div>").addClass("ls-curtile").appendTo(Y) } else { var Z = M.appendTo(f.g.nextTiles) } D = e("<div>").addClass("ls-nexttile").appendTo(Z).css({ top: -J, left: -L1, dispay: "block", opacity: K }); var et = y[L] * i.tile.delay; var tt = i.transition.rotate ? i.transition.rotate : 0; var nt = i.transition.rotateX ? i.transition.rotateX : 0; var rt = i.transition.rotateY ? i.transition.rotateY : 0; if (k == "prev") { tt = -tt; nt = -nt; rt = -rt } TweenLite.fromTo(D[0], i.transition.duration / 1e3, { rotation: tt, rotationX: nt, rotationY: rt, scale: f.g.scale2D }, { delay: et / 1e3, top: 0, left: 0, opacity: O2, rotation: 0, rotationX: 0, rotationY: 0, scale: 1, ease: n(i.transition.easing) }); if (c == true && (x.length < 1 || x.length > 0 && (x.attr("src").toLowerCase().indexOf("png") != -1 || x.width() < f.g.sliderWidth() || x.height() < f.g.sliderHeight()))) { TweenLite.to(_[0], i.transition.duration / 1e3, { delay: et / 1e3, opacity: 0, ease: n(i.transition.easing) }) } if ((i.transition.type == "slide" || l == true) && i.name.toLowerCase().indexOf("mirror") == -1) { var it = 0; if (tt != 0) { it = -tt } TweenLite.to(_[0], i.transition.duration / 1e3, { delay: et / 1e3, top: T2, left: L2, rotation: it, scale: f.g.scale2D, opacity: K, ease: n(i.transition.easing) }) } } if (w.length) { if (t == "3d" || t == "2d" && (c == true || i.transition.type == "slide" || l == true)) { _.append(e("<img>").attr("src", w.attr("src")).css({ width: w[0].style.width, height: w[0].style.height, marginLeft: parseFloat(w.css("margin-left")) - parseFloat(M.position().left), marginTop: parseFloat(w.css("margin-top")) - parseFloat(M.position().top) })) } else if (f.g.curTiles.children().length == 0) { f.g.curTiles.append(e("<img>").attr("src", w.attr("src")).css({ width: w[0].style.width, height: w[0].style.height, marginLeft: parseFloat(w.css("margin-left")), marginTop: parseFloat(w.css("margin-top")) })) } } if (x.length) { D.append(e("<img>").attr("src", x.attr("src")).css({ width: x[0].style.width, height: x[0].style.height, marginLeft: parseFloat(x.css("margin-left")) - parseFloat(M.position().left), marginTop: parseFloat(x.css("margin-top")) - parseFloat(M.position().top) })) } } var st = f.g.curLayer; var ot = f.g.nextLayer; setTimeout(function() { st.find(".ls-bg").css({ visibility: "hidden" }) }, 50); ot.find(".ls-bg").css({ visibility: "hidden" }); f.g.ltContainer.removeClass("ls-overflow-hidden"); S(a); if (a === 0) { a = 10 } setTimeout(function() { st.css({ width: 0 }) }, a); var ut = parseInt(ot.data("timeshift")) ? parseInt(ot.data("timeshift")) : 0; var at = f.g.totalDuration + ut > 0 ? f.g.totalDuration + ut : 0; setTimeout(function() { if (f.g.resize == true) { f.g.ltContainer.empty(); st.removeClass("ls-active"); f.makeResponsive(ot, function() { f.g.resize = false }) } T(); if (ot.find(".ls-bg").length < 1 || ot.find(".ls-bg").length > 0 && ot.find(".ls-bg").attr("src").toLowerCase().indexOf("png") != -1) { f.g.ltContainer.delay(350).fadeOut(300, function() { e(this).empty().show() }) } ot.css({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }) }, at); if (f.g.totalDuration < 300) { f.g.totalDuration = 1e3 } setTimeout(function() { f.g.ltContainer.addClass("ls-overflow-hidden"); ot.addClass("ls-active"); if (ot.find(".ls-bg").length) { ot.find(".ls-bg").css({ display: "none", visibility: "visible" }); if (f.g.ie78) { ot.find(".ls-bg").css("display", "block"); setTimeout(function() { E() }, 500) } else { ot.find(".ls-bg").fadeIn(500, function() { E() }) } } else { E() } }, f.g.totalDuration) }; var A = function() { f.g.nextLayer.find(' > *[class*="ls-l"]').each(function() { e(this).css({ visibility: "hidden" }) }); f.g.sliderTop = e(u).offset().top; e(window).load(function() { setTimeout(function() { f.g.sliderTop = e(u).offset().top }, 20) }); var t = function() { if (e(window).scrollTop() + e(window).height() - f.g.sliderHeight() / 2 > f.g.sliderTop) { f.g.firstSlideAnimated = true; if (f.g.originalAutoStart === true) { f.o.autoStart = true; f.start() } T() } }; e(window).scroll(function() { if (!f.g.firstSlideAnimated) { t() } }); t() }; var O = (f.g.nextLayer.data("transition3d") || f.g.nextLayer.data("transition2d")) && f.t || (f.g.nextLayer.data("customtransition3d") || f.g.nextLayer.data("customtransition2d")) && f.ct ? "new" : "old"; if (!f.g.nextLayer.data("transitiontype")) { f.transitionType(f.g.nextLayer) } if (f.g.nextLayer.data("transitiontype") === "new") { O = "new" } if (f.o.slideTransition) { O = "forced" } if (f.o.animateFirstSlide && !f.g.firstSlideAnimated) { if (f.g.layersNum == 1) { var d = 0; f.o.cbAnimStop(f.g) } else { var M = parseInt(f.g.nextLayer.data("timeshift")) ? parseInt(f.g.nextLayer.data("timeshift")) : 0; var _ = O == "new" ? 0 : v; f.g.t5 = setTimeout(function() { E() }, _ + Math.abs(M)) } f.g.totalDuration = true; if (f.o.startInViewport === true) { A() } else { f.g.firstSlideAnimated = true; T() } f.g.nextLayer.css({ width: f.g.sliderWidth(), height: f.g.sliderHeight() }); if (!f.g.ie78) { f.g.nextLayer.find(".ls-bg").css({ display: "none" }).fadeIn(f.o.sliderFadeInDuration) } f.g.isLoading = false } else { switch (O) { case "old": f.g.totalDuration = false; if (f.g.ltContainer) { f.g.ltContainer.empty() } w(); S(); x(); T(); break; case "new": if (typeof LSCustomTransition != "undefined") { C() } else { N() } break; case "forced": L(f.o.slideTransition.type, f.o.slideTransition.obj); break } } }; f.transitionType = function(e) { var t = e.data("ls") || !e.data("ls") && !e.data("slidedelay") && !e.data("slidedirection") && !e.data("slideoutdirection") && !e.data("delayin") && !e.data("delayout") && !e.data("durationin") && !e.data("durationout") && !e.data("showuntil") && !e.data("easingin") && !e.data("easingout") && !e.data("scalein") && !e.data("scaleout") && !e.data("rotatein") && !e.data("rotateout") ? "new" : "old"; e.data("transitiontype", t) }; f.sublayerShowUntil = function(e) { if (!e.data("transitiontype")) { f.transitionType(e) } e.removeClass("ls-videohack"); var t = f.g.curLayer; if (f.g.prevNext != "prev" && f.g.nextLayer) { t = f.g.nextLayer } var r = t.data("slidedirection") ? t.data("slidedirection") : f.o.slideDirection; var i = f.g.slideDirections[f.g.prevNext][r]; var s = e.data("slidedirection") ? e.data("slidedirection") : i; var o, u; switch (s) { case "left": o = -f.g.sliderWidth(); u = 0; break; case "right": o = f.g.sliderWidth(); u = 0; break; case "top": u = -f.g.sliderHeight(); o = 0; break; case "bottom": u = f.g.sliderHeight(); o = 0; break; case "fade": u = 0; o = 0; break } if (e.data("transitiontype") === "new") { var a = "new" } else { var a = e.data("slideoutdirection") ? e.data("slideoutdirection") : false } switch (a) { case "left": o = f.g.sliderWidth(); u = 0; break; case "right": o = -f.g.sliderWidth(); u = 0; break; case "top": u = f.g.sliderHeight(); o = 0; break; case "bottom": u = -f.g.sliderHeight(); o = 0; break; case "fade": u = 0; o = 0; break; case "new": if (e.data("offsetxout")) { if (e.data("offsetxout") === "left") { o = f.g.sliderWidth() } else if (e.data("offsetxout") === "right") { o = -f.g.sliderWidth() } else { o = -parseInt(e.data("offsetxout")) } } else { o = -f.lt.offsetXOut } if (e.data("offsetyout")) { if (e.data("offsetyout") === "top") { u = f.g.sliderHeight() } else if (e.data("offsetyout") === "bottom") { u = -f.g.sliderHeight() } else { u = -parseInt(e.data("offsetyout")) } } else { u = -f.lt.offsetYOut } break } var l = curSubRotateX = curSubRotateY = curSubScale = curSubSkewX = curSubSkewY = curSubScaleX = curSubScaleY = "none"; l = e.data("rotateout") ? e.data("rotateout") : f.lt.rotateOut; curSubRotateX = e.data("rotatexout") ? e.data("rotatexout") : f.lt.rotateXOut; curSubRotateY = e.data("rotateyout") ? e.data("rotateyout") : f.lt.rotateYOut; curSubScale = e.data("scaleout") ? e.data("scaleout") : f.lt.scaleOut; curSubSkewX = e.data("skewxout") ? e.data("skewxout") : f.lt.skewXOut; curSubSkewY = e.data("skewyout") ? e.data("skewyout") : f.lt.skewYOut; if (curSubScale === 1) { curSubScaleX = e.data("scalexout") ? e.data("scalexout") : f.lt.scaleXOut; curSubScaleY = e.data("scaleyout") ? e.data("scaleyout") : f.lt.scaleYOut } else { curSubScaleX = curSubScaleY = curSubScale } var c = e.data("transformoriginout") ? e.data("transformoriginout").split(" ") : f.lt.transformOriginOut; for (var h = 0; h < c.length; h++) { if (c[h].indexOf("%") === -1 && c[h].indexOf("left") !== -1 && c[h].indexOf("right") !== -1 && c[h].indexOf("top") !== -1 && c[h].indexOf("bottom") !== -1) { c[h] = "" + parseInt(c[h]) * f.g.ratio + "px" } } var p = c.join(" "); var d = e.data("perspectiveout") ? e.data("perspectiveout") : f.lt.perspectiveOut; var v = parseInt(e.css("left")); var m = parseInt(e.css("top")); var g = parseInt(e.attr("class").split("ls-l")[1]); var y = e.outerWidth() > e.outerHeight() ? e.outerWidth() : e.outerHeight(); var b = parseInt(l) === 0 ? e.outerWidth() : y; var w = parseInt(l) === 0 ? e.outerHeight() : y; if (g === -1 && a !== "new" || e.data("offsetxout") === "left" || e.data("offsetxout") === "right") { if (o < 0) { o = -(f.g.sliderWidth() - v + (curSubScaleX / 2 - .5) * b + 100) } else if (o > 0) { o = v + (curSubScaleX / 2 + .5) * b + 100 } } else { o = o * f.g.ratio } if (g === -1 && a !== "new" || e.data("offsetyout") === "top" || e.data("offsetyout") === "bottom") { if (u < 0) { u = -(f.g.sliderHeight() - m + (curSubScaleY / 2 - .5) * w + 100) } else if (u > 0) { u = m + (curSubScaleY / 2 + .5) * w + 100 } } else { u = u * f.g.ratio } if (g === -1 || a === "new") { var E = 1 } else { var S = f.g.curLayer.data("parallaxout") ? parseInt(f.g.curLayer.data("parallaxout")) : f.o.parallaxOut; var E = g * S } if (e.data("transitiontype") === "new") { var x = f.lt.durationOut; var T = f.lt.easingOut } else { var x = f.o.durationOut; var T = f.o.easingOut } var N = e.data("durationout") ? parseInt(e.data("durationout")) : x; if (N === 0) { N = 1 } var C = e.data("easingout") ? e.data("easingout") : T; var k = { visibility: "hidden" }; var L = { rotation: l, rotationX: curSubRotateX, rotationY: curSubRotateY, skewX: curSubSkewX, skewY: curSubSkewY, scaleX: curSubScaleX, scaleY: curSubScaleY, x: -o * E, y: -u * E, ease: n(C), onComplete: function() { e.css(k) } }; if (a == "fade" || !a && s == "fade" || e.data("fadeout") !== "false" && e.data("transitiontype") === "new") { L["opacity"] = 0; k["opacity"] = e.data("originalOpacity") } TweenLite.set(e[0], { transformPerspective: d, transformOrigin: p }); TweenLite.to(e[0], N / 1e3, L) }; f.load() }; var n = 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 n = e.toLowerCase().split("easeinout")[1]; t = window[n.charAt(0).toUpperCase() + n.slice(1)].easeInOut } else if (e.toLowerCase().indexOf("easeout") !== -1) { var n = e.toLowerCase().split("easeout")[1]; t = window[n.charAt(0).toUpperCase() + n.slice(1)].easeOut } else if (e.toLowerCase().indexOf("easein") !== -1) { var n = e.toLowerCase().split("easein")[1]; t = window[n.charAt(0).toUpperCase() + n.slice(1)].easeIn } return t }; var r = function(e, t, r, i) { if (typeof t === "undefined") { var t = "easeInOutQuart" } var s = {}; if (e.rotate !== i) { s.rotation = e.rotate } if (e.rotateY !== i) { s.rotationY = e.rotateY } if (e.rotateX !== i) { s.rotationX = e.rotateX } if (r === "after") { s.scaleX = s.scaleY = s.scaleZ = 1 } else if (e.scale3d !== i) { s.scaleX = s.scaleY = s.scaleZ = e.scale3d } if (e.delay) { s.delay = r === "after" ? e.delay / 1e3 : e.delay } s.ease = n(t); return s }; var i = function(t) { var n = e("<div>"), r = false, i = false, s = ["perspective", "OPerspective", "msPerspective", "MozPerspective", "WebkitPerspective"]; transform = ["transformStyle", "OTransformStyle", "msTransformStyle", "MozTransformStyle", "WebkitTransformStyle"]; for (var o = s.length - 1; o >= 0; o--) { r = r ? r : n[0].style[s[o]] != undefined } for (var o = transform.length - 1; o >= 0; o--) { n.css("transform-style", "preserve-3d"); i = i ? i : n[0].style[transform[o]] == "preserve-3d" } if (r && n[0].style[s[4]] != undefined) { n.attr("id", "ls-test3d").appendTo(t); r = n[0].offsetHeight === 3 && n[0].offsetLeft === 9; n.remove() } return r && i }; var s = function(e, t, n) { var r = []; if (n == "forward") { for (var i = 0; i < e; i++) { for (var s = 0; s < t; s++) { r.push(i + s * e) } } } else { for (var i = e - 1; i > -1; i--) { for (var s = t - 1; s > -1; s--) { r.push(i + s * e) } } } return r }; var o = function(e) { var t = 0; for (var n in e) { if (e.hasOwnProperty(n)) { ++t } } return t }; var u = function() { uaMatch = function(e) { e = e.toLowerCase(); var t = /(chrome)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || e.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || []; return { browser: t[1] || "", version: t[2] || "0" } }; var e = uaMatch(navigator.userAgent), t = {}; if (e.browser) { t[e.browser] = true; t.version = e.version } if (t.chrome) { t.webkit = true } else if (t.webkit) { t.safari = true } return t }; lsPrefixes = function(e, t) { var n = ["webkit", "khtml", "moz", "ms", "o", ""]; var r = 0, i, s; while (r < n.length && !e[i]) { i = t; if (n[r] == "") { i = i.substr(0, 1).toLowerCase() + i.substr(1) } i = n[r] + i; s = typeof e[i]; if (s != "undefined") { n = [n[r]]; return s == "function" ? e[i]() : e[i] } r++ } }; t.global = { version: "5.3.0", isMobile: function() { if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i)) { return true } else { return false } }, isHideOn3D: function(e) { if (e.css("padding-bottom") == "auto" || e.css("padding-bottom") == "none" || e.css("padding-bottom") == 0 || e.css("padding-bottom") == "0px") { return true } else { return false } }, ie78: u().msie && u().version < 9 ? true : false, originalAutoStart: false, paused: false, pausedByVideo: false, autoSlideshow: false, isAnimating: false, layersNum: null, prevNext: "next", slideTimer: null, sliderWidth: null, sliderHeight: null, slideDirections: { prev: { left: "right", right: "left", top: "bottom", bottom: "top" }, next: { left: "left", right: "right", top: "top", bottom: "bottom" } }, v: { d: 500, fo: 750, fi: 500 } }; t.layerTransitions = { offsetXIn: 80, offsetYIn: 0, durationIn: 1e3, delayIn: 0, easingIn: "easeInOutQuint", fadeIn: true, rotateIn: 0, rotateXIn: 0, rotateYIn: 0, scaleIn: 1, scaleXIn: 1, scaleYIn: 1, skewXIn: 0, skewYIn: 0, transformOriginIn: ["50%", "50%", "0"], perspectiveIn: 500, offsetXOut: -80, offsetYOut: 0, durationOut: 400, showUntil: 0, easingOut: "easeInOutQuint", fadeOut: true, rotateOut: 0, rotateXOut: 0, rotateYOut: 0, scaleOut: 1, scaleXOut: 1, scaleYOut: 1, skewXOut: 0, skewYOut: 0, transformOriginOut: ["50%", "50%", "0"], perspectiveOut: 500 }; t.slideTransitions = { slideDelay: 4e3 }; t.options = { responsive: true, responsiveUnder: 0, layersContainer: 0, fullScreen: false, appendTo: "", autoStart: true, startInViewport: true, pauseOnHover: true, firstSlide: 1, animateFirstSlide: true, sliderFadeInDuration: 350, loops: 0, forceLoopNum: true, twoWaySlideshow: false, randomSlideshow: false, skin: "v5", skinsPath: "/layerslider/skins/", globalBGColor: "transparent", globalBGImage: false, navPrevNext: true, navStartStop: true, navButtons: true, keybNav: true, touchNav: true, hoverPrevNext: true, hoverBottomNav: false, showBarTimer: false, showCircleTimer: true, thumbnailNavigation: "hover", tnContainerWidth: "60%", tnWidth: 100, tnHeight: 60, tnActiveOpacity: 35, tnInactiveOpacity: 100, autoPlayVideos: true, autoPauseSlideshow: "auto", youtubePreview: "maxresdefault.jpg", imgPreload: true, lazyLoad: true, yourLogo: false, yourLogoStyle: "left: -10px; top: -10px;", yourLogoLink: false, yourLogoTarget: "_self", optimizeForMobile: true, optimizeForIE78: true, hideOnMobile: false, hideUnder: 0, hideOver: 1e6, staticImage: "", cbInit: function(e) {}, cbStart: function(e) {}, cbStop: function(e) {}, cbPause: function(e) {}, cbAnimStart: function(e) {}, cbAnimStop: function(e) {}, cbPrev: function(e) {}, cbNext: function(e) {}, slideDelay: 4e3, slideDirection: "right", parallaxIn: .45, parallaxOut: .45, durationIn: 1e3, durationOut: 1e3, easingIn: "easeInOutQuint", easingOut: "easeInOutQuint", delayIn: 0, delayOut: 0 } })(jQuery)
到此,相信大家对“LAYERSLIDER 5插件怎么破解”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。