function lsShowNotice(e, t, n) {
if (typeof e == "string") {
var r = jQuery("#" + e)
} else if (typeof e == "object") {
var r = e
}
var i, s;
switch (t) {
case "jquery":
i = "multiple jQuery issue";
s = "It looks like that one of your other plugins or your theme itself loads an extra copy of the jQuery library which causes a Javascript conflict and LayerSlider WP can't load your slider. Please navigate on your WordPress admin area to edit this slider and enable the \"Put JS includes to body\" option in the Global Settings under the Troubleshooting section.
If this doesn't solve your problem, please try to disable every other plugin one-by-one to find out which one causes this issue. If you have found the corresponding plugin, please contact with the plugin author to solve this case. If none of your plugins causes this problem, it must be your theme and you should contact with the author of the theme. Ask help from them to remove any duplicates of the jQuery library.
If there is no one to help you, please write a comment in the comments section of the item on CodeCanyon.";
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.2 or newer. If you are using the WordPress version of LayerSlider, you can try out the "jQuery Updater" plugin from the WP plugin depository. If you don\'t know what to do, you can write us a private message from our CodeCanyon profile page. We need a temporary WP admin account (or a temporary FTP account in some cases) to solve this issue.';
break;
case "transit":
i = "jQuery Transit issue";
s = 'It looks like one of your other plugins also uses jQuery Transit and loads an extra copy of this library which can cause issues. Please navigate on your WordPress admin area to edit this slider and enable the "Put JS includes to body" option in your Global Settings under the Troubleshooting section.';
break
}
r.addClass("ls-error");
r.append('
!
'); r.append('LayerSlider WP: ' + i + "
"); r.append('' + s + "
") } (function (e) { e.fn.layerSlider = function (n) { var r = "1.7.2"; var i = e.fn.jquery; var s = e(this); var o = function (e, t) { var n = e.split("."); var r = t.split("."); for (var o = 0; o < n.length; ++o) { if (r.length == o) { lsShowNotice(s, "oldjquery", i); return false } if (n[o] == r[o]) { continue } else if (n[o] > r[o]) { lsShowNotice(s, "oldjquery", i); return false } else { return true } } if (n.length != r.length) { return true } return true }; if (o(r, i)) { 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 { 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 == "debug") { r.d.show() } 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*="www.youtu"], iframe[src*="player.vimeo"]').each(function () { clearTimeout(e(this).data("videoTimer")) }); r.stop() } } }) } } } }; var t = function (o, u) { var a = this; a.$el = e(o).addClass("ls-container"); a.$el.data("LayerSlider", a); a.load = function () { a.o = e.extend({}, t.options, u); a.g = e.extend({}, t.global); if (typeof layerSliderTransitions != "undefined") { a.t = e.extend({}, layerSliderTransitions) } if (typeof layerSliderCustomTransitions != "undefined") { a.ct = e.extend({}, layerSliderCustomTransitions) } if (!a.g.initialized) { a.g.initialized = true; a.debug(); if (e("html").find('meta[content*="WordPress"]').length) { a.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) { a.g.lswpVersion = e("html").find('script[src*="layerslider"]').attr("src").split("?")[1].split("=")[1] } } a.d.aT("LayerSlider controls"); a.d.aU('prev | next | start | stop | force stop'); a.d.history.find("a").each(function () { e(this).click(function (t) { t.preventDefault(); if (e(this).text() == "force stop") { e(o).find("*").stop(true, false); e(o).layerSlider("stop") } else { e(o).layerSlider(e(this).text()) } }) }); a.d.aT("LayerSlider version information"); a.d.aU("JS version: " + a.g.version + ""); if (a.g.lswpVersion) { a.d.aL("WP version: " + a.g.lswpVersion + "") } if (a.g.wpVersion) { a.d.aL("WordPress version: " + a.g.wpVersion + "") } a.d.aL("jQuery version: " + e().jquery + ""); if (e(o).attr("id")) { a.d.aT("LayerSlider container"); a.d.aU("#" + e(o).attr("id")) } a.d.aT("Init code"); a.d.aeU(); for (var n in a.o) { a.d.aL(n + ": " + a.o[n] + "") } if (!a.o.skin || a.o.skin == "" || !a.o.skinsPath || a.o.skinsPath == "") { a.d.aT("Loading without skin. Possibilities: mistyped skin and / or skinsPath."); a.init() } else { a.d.aT("Trying to load with skin: " + a.o.skin, true); e(o).addClass("ls-" + a.o.skin); var r = a.o.skinsPath + a.o.skin + "/skin.css"; cssContainer = e("head"); if (!e("head").length) { cssContainer = e("body") } if (e('link[href="' + r + '"]').length) { a.d.aU('Skin "' + a.o.skin + '" is already loaded.'); i = e('link[href="' + r + '"]'); if (!a.g.loaded) { a.g.loaded = true; a.init() } } else { if (document.createStyleSheet) { document.createStyleSheet(r); var i = e('link[href="' + r + '"]') } else { var i = e('').appendTo(cssContainer) } } i.load(function () { if (!a.g.loaded) { a.d.aU("curSkin.load(); fired"); a.g.loaded = true; a.init() } }); e(window).load(function () { if (!a.g.loaded) { a.d.aU("$(window).load(); fired"); a.g.loaded = true; a.init() } }); setTimeout(function () { if (!a.g.loaded) { a.d.aT("Fallback mode: Neither curSkin.load(); or $(window).load(); were fired"); a.g.loaded = true; a.init() } }, 2e3) } } }; a.init = function () { a.d.aT("FUNCTION ls.init();"); a.d.aeU(); if (!e("html").attr("id")) { e("html").attr("id", "ls-global") } else if (!e("body").attr("id")) { e("body").attr("id", "ls-global") } a.g.sliderWidth = function () { if (a.g.normalWidth && a.g.goingNormal) { return a.g.normalWidth } else { return e(o).width() } }; a.g.sliderHeight = function () { if (a.g.normalHeight && a.g.goingNormal) { return a.g.normalHeight } else { return e(o).height() } }; if (e(o).find(".ls-layer").length == 1) { a.o.autoStart = false; a.o.navPrevNext = false; a.o.navStartStop = false; a.o.navButtons = false; a.o.loops = 0; a.o.forceLoopNum = false; a.o.autoPauseSlideshow = true; a.o.firstLayer = 1; a.o.thumbnailNavigation = "disabled" } a.d.aL("Number of layers found: " + e(o).find(".ls-layer").length + ""); if (a.o.width) { a.g.sliderOriginalWidthRU = a.g.sliderOriginalWidth = "" + a.o.width } else { a.g.sliderOriginalWidthRU = a.g.sliderOriginalWidth = e(o)[0].style.width } a.d.aL("sliderOriginalWidth: " + a.g.sliderOriginalWidth + ""); if (a.o.height) { a.g.sliderOriginalHeight = "" + a.o.height } else { a.g.sliderOriginalHeight = e(o)[0].style.height } a.d.aL("sliderOriginalHeight: " + a.g.sliderOriginalHeight + ""); if (a.g.sliderOriginalWidth.indexOf("%") == -1 && a.g.sliderOriginalWidth.indexOf("px") == -1) { a.g.sliderOriginalWidth += "px" } if (a.g.sliderOriginalHeight.indexOf("%") == -1 && a.g.sliderOriginalHeight.indexOf("px") == -1) { a.g.sliderOriginalHeight += "px" } if (a.o.responsive && a.g.sliderOriginalWidth.indexOf("px") != -1 && a.g.sliderOriginalHeight.indexOf("px") != -1) { a.g.responsiveMode = true } else { a.g.responsiveMode = false } e(o).find('*[class*="ls-s"], *[class*="ls-bg"]').each(function () { if (!e(this).parent().hasClass("ls-layer")) { e(this).insertBefore(e(this).parent()) } }); e(o).find(".ls-layer").each(function () { e(this).children(':not([class*="ls-"])').each(function () { e(this).remove() }) }); a.d.aT("LayerSlider Content"); e(o).find('.ls-layer, *[class*="ls-s"]').each(function () { if (e(this).hasClass("ls-layer")) { a.d.aU("LAYER " + (e(this).index() + 1) + ""); a.d.aUU(); a.d.aL("LAYER " + (e(this).index() + 1) + " properties: