/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s}); ; (function($) { var isMobile; var isIOS; var isAndroid; var isSafari; var gncaWatcher = { isIOS: function() { if ( typeof(isIOS) === 'undefined' ) { isIOS = window.navigator.platform && /iP(hone|od|ad)/i.test(window.navigator.platform); } return isIOS; }, isAndroid: function() { if ( typeof(isAndroid) === 'undefined' ) { isAndroid = window.navigator.userAgent && /android/i.test(window.navigator.userAgent); } return isAndroid; }, isMobile: function() { if ( typeof(isMobile) === 'undefined' ) { isMobile = gncaWatcher.isAndroid() || gncaWatcher.isIOS(); } return isMobile; }, isSafari: function() { if ( typeof(isSafari) === 'undefined' ) { isSafari = window.navigator.userAgent && !(/chrome/i.test(window.navigator.userAgent)) && /safari/i.test(window.navigator.userAgent); } return isSafari; }, hasWifi: function() { return gncaWatcher.isAndroid() && navigator.connection && navigator.connection.type === 'wifi'; }, saveData: function() { if ( navigator && navigator.connection ) { // effective connection speed is 3g or lower if ( /\slow-2g|2g|3g/.test( navigator.connection.effectiveType ) ) { return true; } // Save-Data network header is set to true if ( true === navigator.connection.saveData ) { return true; } } return false; } }; window.GNCA_Watcher = gncaWatcher; })( jQuery ); ; if ( 'undefined' === typeof( jQuery.browser ) ) { function isIE() { var style = document.createElement( 'div' ).style; style.cssText = 'position:sticky;position:-webkit-sticky;position:-ms-sticky;'; var isSupported = -1 !== style.position.indexOf( 'sticky' ); return ! isSupported; } var browser = { msie: isIE() }; jQuery.browser = browser; }; /*! * jQuery Cookie Plugin v1.3.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as anonymous module. define(['jquery'], factory); } else { // Browser globals. factory(jQuery); } }(function ($) { var pluses = /\+/g; function raw(s) { return s; } function decoded(s) { return decodeURIComponent(s.replace(pluses, ' ')); } function converted(s) { if (s.indexOf('"') === 0) { // This is a quoted cookie as according to RFC2068, unescape s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { return config.json ? JSON.parse(s) : s; } catch(er) {} } var config = $.cookie = function (key, value, options) { // write if (value !== undefined) { options = $.extend({}, config.defaults, options); if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = config.json ? JSON.stringify(value) : String(value); return (document.cookie = [ config.raw ? key : encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // read var decode = config.raw ? raw : decoded; var cookies = document.cookie.split('; '); var result = key ? undefined : {}; for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies[i].split('='); var name = decode(parts.shift()); var cookie = decode(parts.join('=')); if (key && key === name) { result = converted(cookie); break; } if (!key) { result[name] = converted(cookie); } } return result; }; config.defaults = {}; $.removeCookie = function (key, options) { if ($.cookie(key) !== undefined) { $.cookie(key, '', $.extend(options, { expires: -1 })); return true; } return false; }; })); ; // This file is merely here to set up our global dom library var and ensure the plugins will direct to it if( window.wrap ){ window.jQuery = wrap; } else if( window.jQuery ){ window.wrap = jQuery; }; /* Extend some native JS objects */ if ( !String.trim ) { String.prototype.trim = String.prototype.trim || function trim() { return this.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); }; }; /* DEFINE GLOBAL NAMESPACE */ // The gNews namespace is used across multiple JS scripts. if (typeof window.gNews == "undefined") window.gNews = {}; gNews.Common = function() { // get jQuery var $ = jQuery; // init on dom-ready $(function() { gNews.Common.init(); }); // PUBLIC PROPERTIES & METHODS return { // PROPERTIES isTouch: false, isMsTouch: false, isIOS: false, isAndroid: false, isBlackBerry: false, isWinPhone: false, isIE: false, isTrident: false, isWebkit: false, isSafari: false, isChrome: false, isFirefox: false, isFlash: false, isViewportSet: false, isOrientationChange: false, // to determine whether page is actively being touched or scrolling status: { isTouched: false, isScrolling: false }, // properties used for when the window is being scrolled (iOS only, usually) scrollPos: { current: { left:0, top:0 }, orig: { left:0, top:0 }, delta: { left:0, top:0 } }, scrollCallbacks: [], // array of objects to use to trigger custom jQuery events // format: [ {nodeObj, customEventName}, ... ] // properties used for when the window is resized resizeTimeout: false, resizeCallbacks: [], // array of objects to use to trigger custom jQuery events // format: [ {nodeObj, customEventName}, ... ] // METHODS (PRE DOM-LOAD) preInit: function() { //console.log('gNews.Common.preInit()'); // clear console on escape key hit, local only if (window.location.hostname == 'local.globalnews.ca') { $(document).on('keydown', function(ev) { if (typeof ev !== 'undefined') { keyPress = ev.keyCode; if (keyPress == 27 && console) console.clear(); } }); }; // get ref $html = $('html'); // is device iOS (sometimes Android handles things differently from iOS) this.isIOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/gi) ? true : false ); if (this.isIOS ) { $( document.documentElement ).addClass( 'is_ios' ); } // is device Android this.isAndroid = ( navigator.userAgent.match(/Android/gi) ? true : false ); if (this.isAndroid ) { $( document.documentElement ).addClass( 'is_android' ); } // is device a BlackBerry this.isBlackBerry = ( navigator.userAgent.match(/BlackBerry|PlayBook|BB10/gi) ? true : false ); if (this.isBlackBerry ) { $( document.documentElement ).addClass( 'is_blackberry' ); } // is device a Windows Phone this.isWinPhone = ( navigator.userAgent.match(/Windows\sPhone/gi) ? true : false ); if (this.isWinPhone ) { $( document.documentElement ).addClass( 'is_winphone' ); } // handle IE browsers (add version number) this.isIE = ($.browser.msie) ? true : false; this.isTrident = ( navigator.userAgent.match(/Trident/gi) ? true : false ); if ( this.isIE ) { $html.addClass( 'is_ie is_ie'+ this.getIEVersion() ); }; // handle WebKit browsers this.isChrome = ($.browser.chrome) ? true : false; this.isSafari = ($.browser.safari) ? true : false; this.isWebkit = ($.browser.webkit) ? true : false; if (this.isWebkit) { $html.addClass('is_webkit'); if (this.isChrome) { $html.addClass('is_chrome'); } if (this.isSafari) { var versionRegex = /Version\/(\d+)./g; var versionMatch = versionRegex.exec(navigator.userAgent); if ( versionMatch && versionMatch[1] ) { version = parseInt( versionMatch[1], 10 ); // don't bother user agent sniffing for newer safari versions - they don't require the same CSS fixes if ( version < 10 ) { $html.addClass('is_safari'); } } } }; // is device touch capable? this.isTouch = ('ontouchend' in document.documentElement) ? true : false; // is this a touch-capable Microsoft IE browser? this.isMsTouch = ( window.navigator.msMaxTouchPoints>0 && window.navigator.msPointerEnabled ) ? true : false; // does this browser have Flash installed? try { var flashObj = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); if ( flashObj ) { this.isFlash = true; $html.addClass('flash-enabled'); } else { $html.addClass('no-flash'); }; } catch(e) { if ( navigator.mimeTypes["application/x-shockwave-flash"] != undefined ) { this.isFlash = true; $html.addClass('flash-enabled'); } else { $html.addClass('no-flash'); }; }; // tell other apps whether the page is scrolling or not (this can mess stuff up sometimes), iOS only if (this.isTouch && this.isIOS) { // determine if a user is scrolling $( document ).on( 'touchstart touchmove touchend', $.proxy( this.handleIOSTouch, this ) ); $( window ).on( 'scroll', $.proxy( this.handleIOSScroll, this ) ); }; }, /* POST DOM-LOAD METHODS */ init: function() { // is device touch capable? if ( this.isTouch ) { $( document.documentElement ).addClass( 'touch-enabled' ); } else if (this.isMsTouch) { $( document.documentElement ).addClass( 'ms-touch' ); } else { $( document.documentElement ).addClass( 'no-touch' ); }; // touch screen devices need to keep track of state, sometimes if (this.isTouch) { // determine if orientation change has happened $( window ).on( 'orientationchange', $.proxy( this, 'handleOrientationChange' ) ); } else { // determine if window has changed size $( window ).on( 'resize', function( ev ) { // if we're already doing this, don't bother doing it again if (gNews.Common.resizeTimeout) clearTimeout(gNews.Common.resizeTimeout); // run method on resize gNews.Common.resizeTimeout = window.setTimeout( function() { gNews.Common.handleResize(); }, 200); }); }; }, /* METHODS FOR PAGE RESIZE */ // handle when users resize the page handleResize: function(ev) { for (var i in this.resizeCallbacks) { var callbackNode = this.resizeCallbacks[i].node; var callbackFunction = this.resizeCallbacks[i].callback; callbackNode.trigger( callbackFunction ); }; }, registerResizeCallback: function(node, callback) { //console.log('Common.registerResizeCallback()'); // make sure we don't already have one of these for (var i in this.resizeCallbacks) { if (this.resizeCallbacks[i].node==node && this.resizeCallbacks[i].callback==callback) return; }; // add callback var callbackObj = {}; callbackObj.node = node; callbackObj.callback = callback; this.resizeCallbacks.push( callbackObj ); }, removeResizeCallback: function(node, callback) { //console.log('Common.removeResizeCallback()'); for (var i in this.resizeCallbacks) { if (this.resizeCallbacks[i].node.get(0)==node.get(0) && this.resizeCallbacks[i].callback==callback) { this.resizeCallbacks.splice(i, 1); }; }; }, // do stuff you need to do after an orientation change handleOrientationChange: function(ev) { // at the very least, run the resize event this.handleResize(ev); }, /* METHODS FOR DETERMINING WHETHER PAGE IS ACTIVELY BEING SCROLLED / TOUCHED (iOS only) */ // status isScrolling: function() { // return status return this.status.isScrolling; }, handleIOSTouch: function( ev ) { // figure out what the page is doing this.setPosition( ev.type ); // set flags, where appropriate switch (ev.type) { case 'touchstart': this.status.isTouched = true; this.status.isScrolling = false; break; case 'touchmove': this.status.isScrolling = (this.scrollPos.delta.left!=0 || this.scrollPos.delta.top!=0) ? true : false; break; case 'touchend': this.status.isScrolling = (this.scrollPos.delta.left!=0 || this.scrollPos.delta.top!=0) ? true : false; this.status.isTouched = false; break; }; }, handleIOSScroll: function( ev ) { //console.log('Common.handleIOSScroll()'); // don't bother running if user hasn't scrolled if ( !this.status.isScrolling ) return; // figure out what the page is doing this.setPosition( ev.type ); // clear flags this.status.isTouched = false; this.status.isScrolling = false; // call any scroll callbacks we might have for (var i in this.scrollCallbacks) { var callbackNode = this.scrollCallbacks[i].node; var callbackFunction = this.scrollCallbacks[i].callback; callbackNode.trigger( callbackFunction ); }; }, setPosition: function( type ) { //console.log('Common.setPosition()'); // set current position this.scrollPos.current.left = window.pageXOffset; this.scrollPos.current.top = window.pageYOffset; // reset, or set deltas switch (type) { case 'touchstart': this.scrollPos.orig = {left:window.pageXOffset, top:window.pageYOffset}; this.scrollPos.delta = {left:0, top:0}; break; default: this.scrollPos.delta.left = this.scrollPos.orig.left - this.scrollPos.current.left; this.scrollPos.delta.top = this.scrollPos.orig.top - this.scrollPos.current.top; break; }; }, // note: this only works with iOS registerScrollCallback: function(node, callback) { //console.log('Common.registerScrollCallback()'); // make sure we don't already have one of these for (var i in this.scrollCallbacks) { if (this.scrollCallbacks[i].node==node && this.scrollCallbacks[i].callback==callback) return; }; // add callback var callbackObj = {}; callbackObj.node = node; callbackObj.callback = callback; this.scrollCallbacks.push( callbackObj ); }, removeScrollCallback: function(node, callback) { //console.log('Common.removeScrollCallback()'); for (var i in this.scrollCallbacks) { if (this.scrollCallbacks[i].node==node && this.scrollCallbacks[i].callback==callback) { this.scrollCallbacks.splice(i, 1); }; }; }, /* IE BROWSER DETECTION */ getIEVersion: function() { var version = -1; // Return value assumes failure. if ( this.isIE ) { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) version = parseFloat( RegExp.$1 ); }; return version; }, canPlayMp4: function() { var canPlay = false; var v = document.createElement('video'); if(v.canPlayType && v.canPlayType('video/mp4').replace(/no/, '')) { canPlay = true; } return canPlay; }, iFrameAutoHeight: function( $obj ) { $obj.style.height = $obj.contentWindow.document.body.scrollHeight + 'px'; }, EOF: null }; }(); // init right away gNews.Common.preInit(); /* handles resizing embeds */ gNews.Common.EmbedResizer = function() { // PRIVATE var _embeds = []; var _isInit = false; function _init() { //console.log('********** EmbedResizer._init()'); // double-check to make sure we haven't done this yet if ( _isInit ) return; // add eventListener var $body = $('html body'); $body.on('RecentPostsResizeEvent', function() { _resize(); }); gNews.Common.registerResizeCallback( $body, 'RecentPostsResizeEvent' ); // don't do this more than once _isInit = true; }; function _resize() { //console.log('EmbedResizer._resize()'); // loop through array and resize each embed for (var i=0; i<_embeds.length; i++) { _resizeEmbed( _embeds[i] ); }; }; function _resizeEmbed( $embedObj ) { //console.log('EmbedResizer._resizeEmbed()'); // get current object height var newW = $embedObj.width(); // set width to 100%, and height to ratio of orig height $embedObj.css('height', ( newW * $embedObj.data('origEmbedHeight') / $embedObj.data('origEmbedWidth') ) +1 ); }; // PUBLIC return { // this is how you interact with this object -- simply add embed's you want here... add: function( $embedObj ) { //console.log('EmbedResizer.add()'); // don't add if the embed is already in here if ( $embedObj.data('embedResizerIsInit') ) return; // make sure this is initialized the first time you use it if ( !_isInit ) _init(); // add data to node, to save original height/width var origH = $embedObj.height(); var origW = $embedObj.width(); $embedObj.data('embedResizerIsInit', true); $embedObj.data('origEmbedHeight', origH); $embedObj.data('origEmbedWidth', origW); $embedObj.attr('height', ''); $embedObj.attr('width', ''); $embedObj.css( 'width', '100%'); // set width to 100% now, do this on a timer to give the 100% width change time to take effect window.setTimeout( function() { _resizeEmbed( $embedObj ); }, 10 ); // add embed to array _embeds.push( $embedObj ); }, EOF: null } }(); ; // This script is used to decode html entities // // Used in /includes/plugins/gnca-analytics-dash - need to check if this plugin is even used // Used in /includes/plugins/display-dashboard\display-dashboard.js (function( $ ){ var entityMapping = { '&': '&', '"': '\"', ''': '\'', '<': '<', '>': '>', '&nbdash;': '-', '‚': ',', ' ': ' ', '‘': '‘', '’': '’', '“': '“', '“': '“', '”': '”', '”': '”', '‘': '‘', '’': '’', ''': '’', '‚': ',', '–': '-' }; window.GNCA_String = { decodeHtmlEntity: function( str ) { var result = str; for ( var entity in entityMapping ) { result = result.replace( new RegExp(entity, 'g'), entityMapping[entity] ); } result = result.replace( /&#(\d+)*$/, '' ); return result; } } })( jQuery ); ; /** * Handles the form submission for the get in touch widget. Relies on an AJAX callback function (see includes/widgets/get-in-touch.php) */ (function($){ "use strict"; var submit = function(event, form){ event.preventDefault(); var $form = $(form); var $responseDiv = $form.next('.response'); var data = $form.serialize(); // Disable form fields while we're submitting. $form.find('input, textarea').attr("disabled", "disabled"); $responseDiv.html(' Sending your message').removeClass( 'error success warning' ); $.post(gncaGetInTouch.ajaxurl, data, function(response){ if (response.status == 'error') { $responseDiv.removeClass('warning success').addClass('error').html(response.status_msg); $form.find('input, textarea').removeAttr("disabled"); } if (response.status == 'warning') { $responseDiv.removeClass('error success').addClass('warning').html(response.status_msg); $form.find('input, textarea').removeAttr("disabled"); } if (response.status == 'success') { $responseDiv.removeClass('error warning').addClass('success').html(response.status_msg); $form.slideUp( ); } }, 'json'); }; $(document).ready(function(){ $('.gnca-get-in-touch-form').submit( 'submit', function(e){ submit( e, this ) } ); }); })(jQuery); ; function gnca_ajax( template , get_vars, callback ) { var params = JSON.stringify( get_vars ); return jQuery.get( '/gnca-ajax/' + template + '/' + encodeURI( params ) + '/', callback ); } JSON.stringify = JSON.stringify || function (obj) { var t = typeof (obj); if (t != "object" || obj === null) { // simple data type if (t == "string") obj = '"'+obj+'"'; return String(obj); } else { // recurse array or object var n, v, json = [], arr = (obj && obj.constructor == Array); for (n in obj) { v = obj[n]; t = typeof(v); if (t == "string") v = '"'+v+'"'; else if (t == "object" && v !== null) v = JSON.stringify(v); json.push((arr ? "" : '"' + n + '":') + String(v)); } return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}"); } };; // Handles Load More button logic on the video browse page // Used in /templates-redesign/dev/video/video-browse.php jQuery(function( $ ) { $(".load-more-video-btn").on('click', function( ev ) { // prevent default link from firign ev.preventDefault(); $(ev.currentTarget).blur(); // add loading class $(this).addClass('load-more-btn-loading'); // do your thing var url = $(this).attr("data-url"); var $container = $( "ul.video-browse-container, ul.video-browse-container-redesign" ); var last_id = ''; if ( $container.hasClass( 'video-browse-container-redesign' ) ) { last_id = $("ul.video-browse-container-redesign li:last").last().attr('data-post-id'); } else { last_id = $("ul.video-browse-container li:last a").last().attr('data-vid_id'); } var settings = { "video_url" : url, "video_lastid" : last_id } gnca_ajax( 'videozone' , settings , function( data ) { $("ul.video-browse-container, ul.video-browse-container-redesign").append(data); // Lazy load images. if ( 'undefined' !== typeof ( gn_hybrid ) && 'undefined' !== typeof ( gn_hybrid.LazyLoad ) ) { var $images = document.querySelectorAll( 'ul.video-browse-container-redesign img:not([src])' ); [].forEach.call( $images, function( $image ) { gn_hybrid.LazyLoad.startWatching( $image ); }); } $(".load-more-video-btn").removeClass('load-more-btn-loading'); if( MorePosts ) { MorePosts.afterCachedLoadMore(); } if( $("input.gnca_load_more_stop").length > 0 ) { $(".load-more-video-btn").css( "display", "none" ); } } ); return false; }); }); ; /* eslint-disable */ /** * Triggers a function once DOM is loaded, just like $(document).ready() */ var DOMReady = function( fn ) { if ( 'loading' !== document.readyState ) { fn(); } else { document.addEventListener( 'DOMContentLoaded', fn ); } }; ; function lsShowNotice(e, c, b) { if (typeof e == "string") { var f = jQuery("#" + e) } else { if (typeof e == "object") { var f = e } } var d, a; switch (c) { case "jquery": d = "multiple jQuery issue"; a = "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": d = "old jQuery issue"; a = "It looks like you are using an old version (" + b + ') of the jQuery library. LayerSlider requires at least version 1.7.0 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": d = "jQuery Transit issue"; a = '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 } f.addClass("ls-error"); f.append('

!

'); f.append('

LayerSlider: ' + d + "

"); f.append('

' + a + "

") }(function(e) { e.fn.layerSlider = function(g) { var k = "1.7.0"; var j = e.fn.jquery; var i = e(this); var l = function(q, p) { var o = q.split("."); var n = p.split("."); for (var m = 0; m < o.length; ++m) { if (n.length == m) { return false } if (parseInt(o[m]) == parseInt(n[m])) { continue } else { if (parseInt(o[m]) > parseInt(n[m])) { return false } else { return true } } } if (o.length != n.length) { return true } return true }; if (!l("1.8.0", j)) { i.addClass("ls-norotate") } if (!l(k, j)) { lsShowNotice(i, "oldjquery", j) } else { if ((typeof(g)).match("object|undefined")) { return this.each(function(m) { new d(this, g) }) } else { if (g == "data") { var h = e(this).data("LayerSlider").g; if (h) { return h } } else { return this.each(function(m) { var n = e(this).data("LayerSlider"); if (n) { if (!n.g.isAnimating && !n.g.isLoading) { if (typeof g == "number") { if (g > 0 && g < n.g.layersNum + 1 && g != n.g.curLayerIndex) { n.change(g) } } else { switch (g) { case "prev": n.o.cbPrev(n.g); n.prev("clicked"); break; case "next": n.o.cbNext(n.g); n.next("clicked"); break; case "start": if (!n.g.autoSlideshow) { n.o.cbStart(n.g); n.g.originalAutoSlideshow = true; n.start() } break } } } if (g == "debug") { n.d.show() } if ((n.g.autoSlideshow || (!n.g.autoSlideshow && n.g.originalAutoSlideshow)) && g == "stop") { n.o.cbStop(n.g); n.g.originalAutoSlideshow = false; n.g.curLayer.find('iframe[src*="www.youtu"], iframe[src*="player.vimeo"]').each(function() { clearTimeout(e(this).data("videoTimer")) }); n.stop() } if (g == "force stop") { n.forcestop() } } }) } } } }; var d = function(i, h) { var g = this; g.$el = e(i).addClass("ls-container"); g.$el.data("LayerSlider", g); g.load = function() { g.o = e.extend({}, d.options, h); g.g = e.extend({}, d.global); g.g.enableCSS3 = e(i).hasClass("ls-norotate") ? false : true; if (typeof layerSliderTransitions != "undefined") { g.t = e.extend({}, layerSliderTransitions) } if (typeof layerSliderCustomTransitions != "undefined") { g.ct = e.extend({}, layerSliderCustomTransitions) } if (!g.g.initialized) { g.g.initialized = true; g.debug(); if (e("html").find('meta[content*="WordPress"]').length) { g.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) { g.g.lswpVersion = e("html").find('script[src*="layerslider"]').attr("src").split("?")[1].split("=")[1] } } g.d.aT("LayerSlider controls"); g.d.aU('prev | next | start | stop | force stop'); g.d.history.find("a").each(function() { e(this).click(function(l) { l.preventDefault(); e(i).layerSlider(e(this).text()) }) }); g.d.aT("LayerSlider version information"); g.d.aU("JS version: " + g.g.version + ""); if (g.g.lswpVersion) { g.d.aL("WP version: " + g.g.lswpVersion + "") } if (g.g.wpVersion) { g.d.aL("WordPress version: " + g.g.wpVersion + "") } g.d.aL("jQuery version: " + e().jquery + ""); if (e(i).attr("id")) { g.d.aT("LayerSlider container"); g.d.aU("#" + e(i).attr("id")) } if (!g.o.skin || g.o.skin == "" || !g.o.skinsPath || g.o.skinsPath == "") { g.d.aT("Loading without skin. Possibilities: mistyped skin and / or skinsPath."); g.init() } else { g.d.aT("Trying to load with skin: " + g.o.skin, true); e(i).addClass("ls-" + g.o.skin); var j = g.o.skinsPath + g.o.skin + "/skin.css"; cssContainer = e("head"); if (!e("head").length) { cssContainer = e("body") } if (e('link[href="' + j + '"]').length) { g.d.aU('Skin "' + g.o.skin + '" is already loaded.'); k = e('link[href="' + j + '"]'); if (!g.g.loaded) { g.g.loaded = true; setTimeout(function() { g.init() }, 150) } } else { if (document.createStyleSheet) { document.createStyleSheet(j); var k = e('link[href="' + j + '"]') } else { var k = e('').appendTo(cssContainer) } } k.load(function() { if (!g.g.loaded) { g.d.aU("curSkin.load(); fired"); g.g.loaded = true; setTimeout(function() { g.init() }, 150) } }); e(window).load(function() { if (!g.g.loaded) { g.d.aU("$(window).load(); fired"); g.g.loaded = true; setTimeout(function() { g.init() }, 150) } }); setTimeout(function() { if (!g.g.loaded) { g.d.aT("Fallback mode: Neither curSkin.load(); or $(window).load(); were fired"); g.g.loaded = true; g.init() } }, 1000) } } }; g.init = function() { if (!e("html").attr("id")) { e("html").attr("id", "ls-global") } else { if (!e("body").attr("id")) { e("body").attr("id", "ls-global") } } g.g.sliderWidth = function() { if (g.g.normalWidth && g.g.goingNormal) { return g.g.normalWidth } else { return e(i).width() } }; g.g.sliderHeight = function() { if (g.g.normalHeight && g.g.goingNormal) { return g.g.normalHeight } else { return e(i).height() } }; if (e(i).find(".ls-layer").length == 1) { g.o.autoStart = false; g.o.navPrevNext = false; g.o.navStartStop = false; g.o.navButtons = false; g.o.loops = 0; g.o.forceLoopNum = false; g.o.autoPauseSlideshow = true; g.o.firstLayer = 1; g.o.thumbnailNavigation = "disabled" } if (g.o.width) { g.g.sliderOriginalWidthRU = g.g.sliderOriginalWidth = "" + g.o.width } else { g.g.sliderOriginalWidthRU = g.g.sliderOriginalWidth = e(i)[0].style.width } if (g.o.height) { g.g.sliderOriginalHeight = "" + g.o.height } else { g.g.sliderOriginalHeight = e(i)[0].style.height } if (g.g.sliderOriginalWidth.indexOf("%") == -1 && g.g.sliderOriginalWidth.indexOf("px") == -1) { g.g.sliderOriginalWidth += "px" } if (g.g.sliderOriginalHeight.indexOf("%") == -1 && g.g.sliderOriginalHeight.indexOf("px") == -1) { g.g.sliderOriginalHeight += "px" } if (g.o.responsive && g.g.sliderOriginalWidth.indexOf("px") != -1 && g.g.sliderOriginalHeight.indexOf("px") != -1) { g.g.responsiveMode = true } else { g.g.responsiveMode = false } e(i).find('*[class*="ls-s"], *[class*="ls-bg"]').each(function() { if (!e(this).parent().hasClass("ls-layer")) { e(this).insertBefore(e(this).parent()) } }); e(i).find(".ls-layer").each(function() { e(this).children(':not([class*="ls-"])').each(function() { e(this).remove() }) }); e(i).find('.ls-layer, *[class*="ls-s"]').each(function() { if (e(this).attr("rel") || e(this).attr("style")) { if (e(this).attr("rel")) { var B = e(this).attr("rel").toLowerCase().split(";") } else { var B = e(this).attr("style").toLowerCase().split(";") } for (x = 0; x < B.length; x++) { param = B[x].split(":"); if (param[0].indexOf("easing") != -1) { param[1] = g.ieEasing(param[1]) } var A = ""; if (param[2]) { A = ":" + e.trim(param[2]) } if (param[0] != " " && param[0] != "") { e(this).data(e.trim(param[0]), e.trim(param[1]) + A) } } } var v = e(this); v.data("originalLeft", v[0].style.left); v.data("originalTop", v[0].style.top); if (e(this).is("a") && e(this).children().length > 0) { v = e(this).children() } var y = v.width(); var z = v.height(); if (v[0].style.width && v[0].style.width.indexOf("%") != -1) { y = v[0].style.width } if (v[0].style.height && v[0].style.height.indexOf("%") != -1) { z = v[0].style.height } v.data("originalWidth", y); v.data("originalHeight", z); v.data("originalPaddingLeft", v.css("padding-left")); v.data("originalPaddingRight", v.css("padding-right")); v.data("originalPaddingTop", v.css("padding-top")); v.data("originalPaddingBottom", v.css("padding-bottom")); if (!g.g.ie78) { var w = typeof parseFloat(v.css("opacity")) == "number" ? Math.round(parseFloat(v.css("opacity")) * 100) / 100 : 1; e(this).data("originalOpacity", w) } if (v.css("border-left-width").indexOf("px") == -1) { v.data("originalBorderLeft", v[0].style.borderLeftWidth) } else { v.data("originalBorderLeft", v.css("border-left-width")) } if (v.css("border-right-width").indexOf("px") == -1) { v.data("originalBorderRight", v[0].style.borderRightWidth) } else { v.data("originalBorderRight", v.css("border-right-width")) } if (v.css("border-top-width").indexOf("px") == -1) { v.data("originalBorderTop", v[0].style.borderTopWidth) } else { v.data("originalBorderTop", v.css("border-top-width")) } if (v.css("border-bottom-width").indexOf("px") == -1) { v.data("originalBorderBottom", v[0].style.borderBottomWidth) } else { v.data("originalBorderBottom", v.css("border-bottom-width")) } v.data("originalFontSize", v.css("font-size")); v.data("originalLineHeight", v.css("line-height")) }); if (document.location.hash) { for (var p = 0; p < e(i).find(".ls-layer").length; p++) { if (e(i).find(".ls-layer").eq(p).data("deeplink") == document.location.hash.split("#")[1]) { g.o.firstLayer = p + 1 } } } e(i).find('*[class*="ls-linkto-"]').each(function() { var v = e(this).attr("class").split(" "); for (var w = 0; w < v.length; w++) { if (v[w].indexOf("ls-linkto-") != -1) { var y = parseInt(v[w].split("ls-linkto-")[1]); e(this).css({ cursor: "pointer" }).click(function(z) { z.preventDefault(); e(i).layerSlider(y) }) } } }); g.g.layersNum = e(i).find(".ls-layer").length; if (g.o.randomSlideshow && g.g.layersNum > 2) { g.o.firstLayer == "random"; g.o.twoWaySlideshow = false } else { g.o.randomSlideshow = false } if (g.o.firstLayer == "random") { g.o.firstLayer = Math.floor(Math.random() * g.g.layersNum + 1) } g.o.firstLayer = g.o.firstLayer < g.g.layersNum + 1 ? g.o.firstLayer : 1; g.o.firstLayer = g.o.firstLayer < 1 ? 1 : g.o.firstLayer; g.g.nextLoop = 1; if (g.o.animateFirstLayer) { g.g.nextLoop = 0 } var u = document.location.href.indexOf("file:") == -1 ? "" : "http:"; e(i).find('iframe[src*="www.youtu"], iframe[src*="youtu.be"]').each(function() { e(this).parent().addClass("ls-video-layer"); if (e(this).parent('[class*="ls-s"]')) { var y = e(this); e.getJSON(u + "//gdata.youtube.com/feeds/api/videos/" + e(this).attr("src").split("embed/")[1].split("?")[0] + "?v=2&alt=json&callback=?", function(z) { y.data("videoDuration", parseInt(z.entry["media$group"]["yt$duration"]["seconds"]) * 1000) }); var v = e("
").addClass("ls-vpcontainer").appendTo(e(this).parent()); e("").appendTo(v).addClass("ls-videopreview").attr("src", u + "//img.youtube.com/vi/" + e(this).attr("src").split("embed/")[1].split("?")[0] + "/" + g.o.youtubePreview); e("
").appendTo(v).addClass("ls-playvideo"); e(this).parent().css({ width: e(this).width(), height: e(this).height() }).click(function() { g.g.isAnimating = true; if (g.g.paused) { if (g.o.autoPauseSlideshow != false) { g.g.paused = false } g.g.originalAutoSlideshow = true } else { g.g.originalAutoSlideshow = g.g.autoSlideshow } if (g.o.autoPauseSlideshow != false) { g.stop() } g.g.pausedByVideo = true; e(this).find("iframe").attr("src", e(this).find("iframe").data("videoSrc")); e(this).find(".ls-vpcontainer").delay(g.g.v.d).fadeOut(g.g.v.fo, function() { if (g.o.autoPauseSlideshow == "auto" && g.g.originalAutoSlideshow == true) { var z = setTimeout(function() { g.start() }, y.data("videoDuration") - g.g.v.d); y.data("videoTimer", z) } g.g.isAnimating = false; if (g.g.resize == true) { g.makeResponsive(g.g.curLayer, function() { g.g.resize = false }) } }) }); var w = "&"; if (e(this).attr("src").indexOf("?") == -1) { w = "?" } if (e(this).attr("src").indexOf("autoplay=0") != -1) { e(this).data("videoSrc", e(this).attr("src").replace("autoplay=0", "autoplay=1")) } else { if (e(this).attr("src").indexOf("autoplay") == -1) { e(this).data("videoSrc", e(this).attr("src") + w + "autoplay=1") } } e(this).data("originalWidth", e(this).attr("width")); e(this).data("originalHeight", e(this).attr("height")); e(this).attr("src", "") } }); e(i).find('iframe[src*="player.vimeo"]').each(function() { e(this).parent().addClass("ls-video-layer"); if (e(this).parent('[class*="ls-s"]')) { var y = e(this); var v = e("
").addClass("ls-vpcontainer").appendTo(e(this).parent()); e.getJSON(u + "//vimeo.com/api/v2/video/" + (e(this).attr("src").split("video/")[1].split("?")[0]) + ".json?callback=?", function(z) { e("").appendTo(v).addClass("ls-videopreview").attr("src", z[0]["thumbnail_large"]); y.data("videoDuration", parseInt(z[0]["duration"]) * 1000); e("
").appendTo(v).addClass("ls-playvideo") }); e(this).parent().css({ width: e(this).width(), height: e(this).height() }).click(function() { g.g.isAnimating = true; if (g.g.paused) { if (g.o.autoPauseSlideshow != false) { g.g.paused = false } g.g.originalAutoSlideshow = true } else { g.g.originalAutoSlideshow = g.g.autoSlideshow } if (g.o.autoPauseSlideshow != false) { g.stop() } g.g.pausedByVideo = true; e(this).find("iframe").attr("src", e(this).find("iframe").data("videoSrc")); e(this).find(".ls-vpcontainer").delay(g.g.v.d).fadeOut(g.g.v.fo, function() { if (g.o.autoPauseSlideshow == "auto" && g.g.originalAutoSlideshow == true) { var z = setTimeout(function() { g.start() }, y.data("videoDuration") - g.g.v.d); y.data("videoTimer", z) } g.g.isAnimating = false; if (g.g.resize == true) { g.makeResponsive(g.g.curLayer, function() { g.g.resize = false }) } }) }); var w = "&"; if (e(this).attr("src").indexOf("?") == -1) { w = "?" } if (e(this).attr("src").indexOf("autoplay=0") != -1) { e(this).data("videoSrc", e(this).attr("src").replace("autoplay=0", "autoplay=1")) } else { if (e(this).attr("src").indexOf("autoplay") == -1) { e(this).data("videoSrc", e(this).attr("src") + w + "autoplay=1") } } e(this).data("originalWidth", e(this).attr("width")); e(this).data("originalHeight", e(this).attr("height")); e(this).attr("src", "") } }); if (g.o.animateFirstLayer) { g.o.firstLayer = g.o.firstLayer - 1 == 0 ? g.g.layersNum : g.o.firstLayer - 1 } g.g.curLayerIndex = g.o.firstLayer; g.g.curLayer = e(i).find(".ls-layer:eq(" + (g.g.curLayerIndex - 1) + ")"); e(i).find(".ls-layer").wrapAll('
'); e("
").addClass("ls-webkit-hack").prependTo(e(i)); if (g.o.showBarTimer) { g.g.barTimer = e('
').appendTo(e(i).find(".ls-inner")) } if (g.o.showCircleTimer && !g.g.ie78) { g.g.circleTimer = e("
").addClass("ls-circle-timer").appendTo(e(i).find(".ls-inner")); g.g.circleTimer.append(e('
')) } g.g.li = e("
").css({ zIndex: -1, display: "none" }).addClass("ls-loading-container").appendTo(e(i)); e("
").addClass("ls-loading-indicator").appendTo(g.g.li); if (e(i).css("position") == "static") { e(i).css("position", "relative") } if (g.o.globalBGImage) { e(i).find(".ls-inner").css({ backgroundImage: "url(" + g.o.globalBGImage + ")" }) } else { e(i).find(".ls-inner").css({ backgroundColor: g.o.globalBGColor }) } if (g.o.globalBGColor == "transparent" && g.o.globalBGImage == false) { e(i).find(".ls-inner").css({ background: "none transparent !important" }) } if (g.g.responsiveMode && g.g.isMobile() != true && g.o.allowFullScreenMode && (typeof lsPrefixes(document, "FullScreen") != "undefined" || typeof lsPrefixes(document, "IsFullScreen") != "undefined")) { var q = e("").css("display", "none").addClass("ls-fullscreen").click(function() { g.goFullScreen() }).appendTo(e(i).find(".ls-inner")); e(i).hover(function() { if (g.g.ie78) { q.css({ display: "block" }) } else { q.stop(true, true).fadeIn(300) } }, function() { if (g.g.ie78) { q.css({ display: "none" }) } else { q.stop(true, true).fadeOut(300) } }); document.addEventListener("fullscreenchange", function() { if (!document.fullscreen) { g.escFullScreen() } else {} }, false); document.addEventListener("mozfullscreenchange", function() { if (!document.mozFullScreen) { g.escFullScreen() } else {} }, false); document.addEventListener("webkitfullscreenchange", function() { if (!document.webkitIsFullScreen) { g.escFullScreen() } else {} }, false) } if (g.o.navPrevNext) { e('').click(function(v) { v.preventDefault(); e(i).layerSlider("prev") }).appendTo(e(i)); e('').click(function(v) { v.preventDefault(); e(i).layerSlider("next") }).appendTo(e(i)); if (g.o.hoverPrevNext) { e(i).find(".ls-nav-prev, .ls-nav-next").css({ display: "none" }); e(i).hover(function() { if (!g.g.forceHideControls) { if (g.g.ie78) { e(i).find(".ls-nav-prev, .ls-nav-next").css("display", "block") } else { e(i).find(".ls-nav-prev, .ls-nav-next").stop(true, true).fadeIn(300) } } }, function() { if (g.g.ie78) { e(i).find(".ls-nav-prev, .ls-nav-next").css("display", "none") } else { e(i).find(".ls-nav-prev, .ls-nav-next").stop(true, true).fadeOut(300) } }) } } if (g.o.navStartStop || g.o.navButtons) { var j = e('
').appendTo(e(i)); g.g.bottomWrapper = j; if (g.o.thumbnailNavigation == "always") { j.addClass("ls-above-thumbnails") } if (g.o.navButtons && g.o.thumbnailNavigation != "always") { e('').appendTo(e(i).find(".ls-bottom-nav-wrapper")); if (g.o.thumbnailNavigation == "hover") { var r = e('
').appendTo(e(i).find(".ls-bottom-slidebuttons")) } for (x = 1; x < g.g.layersNum + 1; x++) { var m = e('
').appendTo(e(i).find(".ls-bottom-slidebuttons")).click(function(v) { v.preventDefault(); e(i).layerSlider((e(this).index() + 1)) }); if (g.o.thumbnailNavigation == "hover") { e(i).find(".ls-thumbnail-hover, .ls-thumbnail-hover-img").css({ width: g.o.tnWidth, height: g.o.tnHeight }); var l = e(i).find(".ls-thumbnail-hover"); var k = l.find("img").css({ height: g.o.tnHeight }); var o = e(i).find(".ls-thumbnail-hover-inner").css({ visibility: "hidden", display: "block" }); m.hover(function() { var v = e(i).find(".ls-layer").eq(e(this).index()); if (v.find(".ls-tn").length) { var w = v.find(".ls-tn").attr("src") } else { if (v.find(".ls-videopreview").length) { var w = v.find(".ls-videopreview").attr("src") } else { if (v.find(".ls-bg").length) { var w = v.find(".ls-bg").attr("src") } else { var w = g.o.skinsPath + g.o.skin + "/nothumb.png" } } } e(i).find(".ls-thumbnail-hover-img").css({ left: parseInt(l.css("padding-left")), top: parseInt(l.css("padding-top")) }); k.load(function() { if (e(this).width() == 0) { k.css({ position: "relative", margin: "0 auto", left: "auto" }) } else { k.css({ position: "absolute", marginLeft: -e(this).width() / 2, left: "50%" }) } }).attr("src", w); l.css({ display: "block" }).stop().animate({ left: e(this).position().left + (e(this).width() - l.outerWidth()) / 2 }, 250, "easeInOutQuad"); o.css({ display: "none", visibility: "visible" }).stop().fadeIn(250) }, function() { o.stop().fadeOut(250, function() { l.css({ visibility: "hidden", display: "block" }) }) }) } } if (g.o.thumbnailNavigation == "hover") { r.appendTo(e(i).find(".ls-bottom-slidebuttons")) } e(i).find(".ls-bottom-slidebuttons a:eq(" + (g.o.firstLayer - 1) + ")").addClass("ls-nav-active") } if (g.o.navStartStop) { var t = e('').click(function(v) { v.preventDefault(); e(i).layerSlider("start") }).prependTo(e(i).find(".ls-bottom-nav-wrapper")); var s = e('').click(function(v) { v.preventDefault(); e(i).layerSlider("stop") }).appendTo(e(i).find(".ls-bottom-nav-wrapper")) } else { if (g.o.thumbnailNavigation != "always") { e('').prependTo(e(i).find(".ls-bottom-nav-wrapper")); e('').appendTo(e(i).find(".ls-bottom-nav-wrapper")) } } if (g.o.hoverBottomNav && g.o.thumbnailNavigation != "always") { j.css({ display: "none" }); e(i).hover(function() { if (!g.g.forceHideControls) { if (g.g.ie78) { j.css("display", "block") } else { j.stop(true, true).fadeIn(300) } } }, function() { if (g.g.ie78) { j.css("display", "none") } else { j.stop(true, true).fadeOut(300) } }) } } if (g.o.thumbnailNavigation == "always") { g.g.thumbsWrapper = e('
').appendTo(e(i)); var r = e('
').appendTo(g.g.thumbsWrapper); g.g.thumbnails = e(i).find(".ls-thumbnail-slide-container"); if (!("ontouchstart" in window)) { g.g.thumbnails.hover(function() { e(this).addClass("ls-thumbnail-slide-hover") }, function() { e(this).removeClass("ls-thumbnail-slide-hover"); g.scrollThumb() }).mousemove(function(v) { var w = parseInt(v.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: w }) }) } else { g.g.thumbnails.addClass("ls-touchscroll") } e(i).find(".ls-layer").each(function() { var v = e(this).index() + 1; if (e(this).find(".ls-tn").length) { var y = e(this).find(".ls-tn").attr("src") } else { if (e(this).find(".ls-videopreview").length) { var y = e(this).find(".ls-videopreview").attr("src") } else { if (e(this).find(".ls-bg").length) { var y = e(this).find(".ls-bg").attr("src") } } } if (y) { var w = e('
') } else { var w = e('') } w.appendTo(e(i).find(".ls-thumbnail-slide")); if (!("ontouchstart" in window)) { w.hover(function() { e(this).children().stop().fadeTo(300, g.o.tnActiveOpacity / 100) }, function() { if (!e(this).children().hasClass("ls-thumb-active")) { e(this).children().stop().fadeTo(300, g.o.tnInactiveOpacity / 100) } }) } w.click(function(z) { z.preventDefault(); e(i).layerSlider(v) }) }); if (t && s) { var n = g.g.bottomWrapper = e('
').appendTo(e(i)); t.clone().click(function(v) { v.preventDefault(); e(i).layerSlider("start") }).appendTo(n); s.clone().click(function(v) { v.preventDefault(); e(i).layerSlider("stop") }).appendTo(n) } if (g.o.hoverBottomNav) { g.g.thumbsWrapper.css("display", "none"); if (n) { g.g.bottomWrapper = n.css("display") == "block" ? n : e(i).find(".ls-above-thumbnails"); g.g.bottomWrapper.css("display", "none") } e(i).hover(function() { e(i).addClass("ls-hover"); if (!g.g.forceHideControls) { if (g.g.ie78) { g.g.thumbsWrapper.css("display", "block"); if (g.g.bottomWrapper) { g.g.bottomWrapper.css("display", "block") } } else { g.g.thumbsWrapper.stop(true, true).fadeIn(300); if (g.g.bottomWrapper) { g.g.bottomWrapper.stop(true, true).fadeIn(300) } } } }, function() { e(i).removeClass("ls-hover"); if (g.g.ie78) { g.g.thumbsWrapper.css("display", "none"); if (g.g.bottomWrapper) { g.g.bottomWrapper.css("display", "none") } } else { g.g.thumbsWrapper.stop(true, true).fadeOut(300); if (g.g.bottomWrapper) { g.g.bottomWrapper.stop(true, true).fadeOut(300) } } }) } } g.g.shadow = e('
').appendTo(e(i)); if (g.g.shadow.css("display") == "block" && !g.g.shadow.find("img").length) { g.g.showShadow = function() { g.g.shadow.css({ display: "none", visibility: "visible" }).fadeIn(500, function() { g.g.showShadow = false }) }; g.g.shadowImg = e("").attr("src", g.o.skinsPath + g.o.skin + "/shadow.png").appendTo(g.g.shadow); g.g.shadowBtmMod = typeof parseInt(e(i).css("padding-bottom")) == "number" ? parseInt(e(i).css("padding-bottom")) : 0 } g.resizeShadow(); if (g.o.keybNav && e(i).find(".ls-layer").length > 1) { e("body").bind("keydown", function(v) { if (!g.g.isAnimating && !g.g.isLoading) { if (v.which == 37) { g.o.cbPrev(g.g); g.prev("clicked") } else { if (v.which == 39) { g.o.cbNext(g.g); g.next("clicked") } } } }) } if ("ontouchstart" in window && e(i).find(".ls-layer").length > 1 && g.o.touchNav) { e(i).find(".ls-inner").bind("touchstart", function(w) { var v = w.touches ? w.touches : w.originalEvent.touches; if (v.length == 1) { g.g.touchStartX = g.g.touchEndX = v[0].clientX } }); e(i).find(".ls-inner").bind("touchmove", function(w) { var v = w.touches ? w.touches : w.originalEvent.touches; if (v.length == 1) { g.g.touchEndX = v[0].clientX } if (Math.abs(g.g.touchStartX - g.g.touchEndX) > 45) { w.preventDefault() } }); e(i).find(".ls-inner").bind("touchend", function(v) { if (Math.abs(g.g.touchStartX - g.g.touchEndX) > 45) { if (g.g.touchStartX - g.g.touchEndX > 0) { g.o.cbNext(g.g); e(i).layerSlider("next") } else { g.o.cbPrev(g.g); e(i).layerSlider("prev") } } }) } if (g.o.pauseOnHover == true && e(i).find(".ls-layer").length > 1) { e(i).find(e(".ls-inner, .ls-nav-prev, .ls-nav-next")).hover(function() { g.o.cbPause(g.g); if (g.g.autoSlideshow) { g.g.paused = true; g.stop(); if (g.g.barTimer) { g.g.barTimer.stop() } if (g.g.circleTimer) { g.g.circleTimer.find(".ls-ct-rotate").stop() } g.g.pausedSlideTime = new Date().getTime() } }, function() { if (g.g.paused == true) { g.start(); g.g.paused = false } }) } g.resizeSlider(); if (g.o.yourLogo) { g.g.yourLogo = e("").addClass("ls-yourlogo").appendTo(e(i)).attr("style", g.o.yourLogoStyle).css({ visibility: "hidden", display: "bock" }).load(function() { var v = 0; if (!g.g.yourLogo) { v = 1000 } setTimeout(function() { g.g.yourLogo.data("originalWidth", g.g.yourLogo.width()); g.g.yourLogo.data("originalHeight", g.g.yourLogo.height()); if (g.g.yourLogo.css("left") != "auto") { g.g.yourLogo.data("originalLeft", g.g.yourLogo[0].style.left) } if (g.g.yourLogo.css("right") != "auto") { g.g.yourLogo.data("originalRight", g.g.yourLogo[0].style.right) } if (g.g.yourLogo.css("top") != "auto") { g.g.yourLogo.data("originalTop", g.g.yourLogo[0].style.top) } if (g.g.yourLogo.css("bottom") != "auto") { g.g.yourLogo.data("originalBottom", g.g.yourLogo[0].style.bottom) } if (g.o.yourLogoLink != false) { e("").appendTo(e(i)).attr("href", g.o.yourLogoLink).attr("target", g.o.yourLogoTarget).css({ textDecoration: "none", outline: "none" }).append(g.g.yourLogo) } g.g.yourLogo.css({ display: "none", visibility: "visible" }); g.resizeYourLogo() }, v) }).attr("src", g.o.yourLogo) } e(window).resize(function() { g.g.resize = true; if (!g.g.isAnimating) { g.makeResponsive(g.g.curLayer, function() { if (g.g.ltContainer) { g.g.ltContainer.empty() } g.g.resize = false }); if (g.g.yourLogo) { g.resizeYourLogo() } } }); g.g.showSlider = true; if (g.o.animateFirstLayer == true) { if (g.o.autoStart) { g.g.autoSlideshow = true; e(i).find(".ls-nav-start").addClass("ls-nav-start-active") } else { e(i).find(".ls-nav-stop").addClass("ls-nav-stop-active") } g.next() } else { g.imgPreload(g.g.curLayer, function() { g.g.curLayer.fadeIn(1000, function() { g.g.isLoading = false; e(this).addClass("ls-active"); if (g.o.autoPlayVideos) { e(this).delay(e(this).data("delayin") + 25).queue(function() { e(this).find(".ls-videopreview").click(); e(this).dequeue() }) } g.g.curLayer.find(' > *[class*="ls-s"]').each(function() { if (e(this).data("showuntil") > 0) { var v = e(this); v.data("showUntilTimer", setTimeout(function() { g.sublayerShowUntil(v) }, v.data("showuntil"))) } }) }); g.changeThumb(g.g.curLayerIndex); if (g.o.autoStart) { g.g.isLoading = false; g.start() } else { e(i).find(".ls-nav-stop").addClass("ls-nav-stop-active") } }) } g.o.cbInit(e(i)) }; g.goFullScreen = function() { if (!g.g.isAnimating && !g.g.isLoading) { if (lsPrefixes(document, "FullScreen") || lsPrefixes(document, "IsFullScreen")) { lsPrefixes(document, "CancelFullScreen"); g.escFullScreen() } else { g.g.normalWidth = g.g.sliderWidth(); g.g.normalHeight = g.g.sliderHeight(); g.g.normalRatio = g.g.ratio; lsPrefixes(e(i)[0], "RequestFullScreen"); e(i).addClass("ls-container-fullscreen") } } }; g.escFullScreen = function() { g.g.goingNormal = true; e(i).removeClass("ls-container-fullscreen") }; g.start = function() { if (g.g.autoSlideshow) { if (g.g.prevNext == "prev" && g.o.twoWaySlideshow) { g.prev() } else { g.next() } } else { g.g.autoSlideshow = true; if (!g.g.isAnimating && !g.g.isLoading) { g.timer() } } e(i).find(".ls-nav-start").addClass("ls-nav-start-active"); e(i).find(".ls-nav-stop").removeClass("ls-nav-stop-active") }; g.timer = function() { var j = e(i).find(".ls-active").data("slidedelay") ? parseInt(e(i).find(".ls-active").data("slidedelay")) : g.o.slideDelay; if (!g.o.animateFirstLayer && !e(i).find(".ls-active").data("slidedelay")) { var k = e(i).find(".ls-layer:eq(" + (g.o.firstLayer - 1) + ")").data("slidedelay"); j = k ? k : g.o.slideDelay } clearTimeout(g.g.slideTimer); if (g.g.pausedSlideTime) { if (!g.g.startSlideTime) { g.g.startSlideTime = new Date().getTime() } if (g.g.startSlideTime > g.g.pausedSlideTime) { g.g.pausedSlideTime = new Date().getTime() } if (!g.g.curSlideTime) { g.g.curSlideTime = j } g.g.curSlideTime -= (g.g.pausedSlideTime - g.g.startSlideTime); g.g.pausedSlideTime = false; g.g.startSlideTime = new Date().getTime() } else { g.g.curSlideTime = j; g.g.startSlideTime = new Date().getTime() } g.g.curSlideTime = parseInt(g.g.curSlideTime); g.g.slideTimer = window.setTimeout(function() { g.g.startSlideTime = g.g.pausedSlideTime = g.g.curSlideTime = false; g.start() }, g.g.curSlideTime); if (g.g.barTimer) { g.g.barTimer.animate({ width: g.g.sliderWidth() }, g.g.curSlideTime, "linear", function() { e(this).css({ width: 0 }) }) } if (g.g.circleTimer) { var o = g.g.circleTimer.find(".ls-ct-right .ls-ct-rotate"); var n = g.g.circleTimer.find(".ls-ct-left .ls-ct-rotate"); if (g.g.circleTimer.css("display") == "none") { o.css({ kmRotate: 0 }); n.css({ kmRotate: 0 }); g.g.circleTimer.fadeIn(350) } var p = function() { n.animate({ kmRotate: 180 }, j / 2, "linear") }; var m = o; var l = g.g.curSlideTime - j / 2; if (g.g.curSlideTime < j / 2) { m = n; l = g.g.curSlideTime; p = function() {} } m.stop(true, true).animate({ kmRotate: 180 }, l, "linear", function() { p() }) } }; g.stop = function() { g.g.pausedSlideTime = new Date().getTime(); if (g.g.barTimer) { g.g.barTimer.stop() } if (g.g.circleTimer) { g.g.circleTimer.find(".ls-ct-rotate").stop() } if (!g.g.paused && !g.g.originalAutoSlideshow) { e(i).find(".ls-nav-stop").addClass("ls-nav-stop-active"); e(i).find(".ls-nav-start").removeClass("ls-nav-start-active") } clearTimeout(g.g.slideTimer); g.g.autoSlideshow = false }; g.forcestop = function() { e(i).find("*").stop(true, false).dequeue(); if (!g.g.paused && !g.g.originalAutoSlideshow) { e(i).find(".ls-nav-stop").addClass("ls-nav-stop-active"); e(i).find(".ls-nav-start").removeClass("ls-nav-start-active") } clearTimeout(g.g.slideTimer); g.g.autoSlideshow = false }; g.restart = function() { e(i).find("*").stop(); clearTimeout(g.g.slideTimer); g.change(g.g.curLayerIndex, g.g.prevNext) }; g.ieEasing = function(j) { if (e.trim(j.toLowerCase()) == "swing" || e.trim(j.toLowerCase()) == "linear") { return j.toLowerCase() } else { return j.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") } }; g.prev = function(j) { if (g.g.curLayerIndex < 2) { g.g.nextLoop += 1 } if ((g.g.nextLoop > g.o.loops) && (g.o.loops > 0) && !j) { g.g.nextLoop = 0; g.stop(); if (g.o.forceLoopNum == false) { g.o.loops = 0 } } else { var k = g.g.curLayerIndex < 2 ? g.g.layersNum : g.g.curLayerIndex - 1; g.g.prevNext = "prev"; g.change(k, g.g.prevNext) } }; g.next = function(k) { if (!g.o.randomSlideshow) { if (!(g.g.curLayerIndex < g.g.layersNum)) { g.g.nextLoop += 1 } if ((g.g.nextLoop > g.o.loops) && (g.o.loops > 0) && !k) { g.g.nextLoop = 0; g.stop(); if (g.o.forceLoopNum == false) { g.o.loops = 0 } } else { var l = g.g.curLayerIndex < g.g.layersNum ? g.g.curLayerIndex + 1 : 1; g.g.prevNext = "next"; g.change(l, g.g.prevNext) } } else { if (!k) { var l = g.g.curLayerIndex; var j = function() { l = Math.floor(Math.random() * g.g.layersNum) + 1; if (l == g.g.curLayerIndex) { j() } else { g.g.prevNext = "next"; g.change(l, g.g.prevNext) } }; j() } else { if (k) { var l = g.g.curLayerIndex < g.g.layersNum ? g.g.curLayerIndex + 1 : 1; g.g.prevNext = "next"; g.change(l, g.g.prevNext) } } } }; g.change = function(l, k) { g.g.startSlideTime = g.g.pausedSlideTime = g.g.curSlideTime = false; if (g.g.barTimer) { g.g.barTimer.stop().delay(300).animate({ width: 0 }, 450) } if (g.g.circleTimer) { g.g.circleTimer.delay(300).fadeOut(500).find(".ls-ct-rotate").stop().delay(300).animate({ kmRotate: 0 }, 450) } if (g.g.pausedByVideo == true) { g.g.pausedByVideo = false; g.g.autoSlideshow = g.g.originalAutoSlideshow; g.g.curLayer.find('iframe[src*="www.youtu"], iframe[src*="player.vimeo"]').each(function() { e(this).parent().find(".ls-vpcontainer").fadeIn(g.g.v.fi, function() { e(this).parent().find("iframe").attr("src", "") }) }) } e(i).find('iframe[src*="www.youtu"], iframe[src*="player.vimeo"]').each(function() { clearTimeout(e(this).data("videoTimer")) }); clearTimeout(g.g.slideTimer); g.g.nextLayerIndex = l; g.g.nextLayer = e(i).find(".ls-layer:eq(" + (g.g.nextLayerIndex - 1) + ")"); if (!k) { if (g.g.curLayerIndex < g.g.nextLayerIndex) { g.g.prevNext = "next" } else { g.g.prevNext = "prev" } } var j = 0; if (e(i).find('iframe[src*="www.youtu"], iframe[src*="player.vimeo"]').length > 0) { j = g.g.v.fi } clearTimeout(g.g.changeTimer); g.g.changeTimer = setTimeout(function() { var m = function() { if (g.g.goingNormal) { setTimeout(function() { m() }, 500) } else { g.imgPreload(g.g.nextLayer, function() { g.animate() }) } }; m() }, j) }; g.imgPreload = function(l, n) { g.g.isLoading = true; if (g.g.showSlider) { e(i).css({ visibility: "visible" }) } if (g.o.imgPreload) { var j = []; var k = 0; if (l.css("background-image") != "none" && l.css("background-image").indexOf("url") != -1) { var m = l.css("background-image"); m = m.match(/url\((.*)\)/)[1].replace(/"/gi, ""); j.push(m) } l.find("img").each(function() { j.push(e(this).attr("src")) }); l.find("*").each(function() { if (e(this).css("background-image") != "none" && e(this).css("background-image").indexOf("url") != -1) { var o = e(this).css("background-image"); o = o.match(/url\((.*)\)/)[1].replace(/"/gi, ""); j.push(o) } }); if (j.length == 0) { e(".ls-thumbnail-wrapper, .ls-nav-next, .ls-nav-prev, .ls-bottom-nav-wrapper").css({ visibility: "visible" }); g.makeResponsive(l, n) } else { if (g.g.ie78) { g.g.li.css("display", "block") } else { g.g.li.delay(400).fadeIn(300) } for (x = 0; x < j.length; x++) { e("").load(function() { if (++k == j.length) { g.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" }); g.makeResponsive(l, n) } }).attr("src", j[x]) } } } else { e(".ls-thumbnail-wrapper, .ls-nav-next, .ls-nav-prev, .ls-bottom-nav-wrapper").css({ visibility: "visible" }); g.makeResponsive(l, n) } }; g.makeResponsive = function(j, k) { j.css({ visibility: "hidden", display: "block" }); if (g.g.showShadow) { g.g.showShadow() } g.resizeSlider(); if (g.o.thumbnailNavigation == "always") { g.resizeThumb() } j.children().each(function() { var C = e(this); var y = C.data("originalLeft") ? C.data("originalLeft") : "0"; var r = C.data("originalTop") ? C.data("originalTop") : "0"; if (C.is("a") && C.children().length > 0) { C.css({ display: "block" }); C = C.children() } var p = "auto"; var z = "auto"; if (C.data("originalWidth")) { if (typeof C.data("originalWidth") == "number") { p = parseInt(C.data("originalWidth")) * g.g.ratio } else { if (C.data("originalWidth").indexOf("%") != -1) { p = C.data("originalWidth") } } } if (C.data("originalHeight")) { if (typeof C.data("originalHeight") == "number") { z = parseInt(C.data("originalHeight")) * g.g.ratio } else { if (C.data("originalHeight").indexOf("%") != -1) { z = C.data("originalHeight") } } } var o = C.data("originalPaddingLeft") ? parseInt(C.data("originalPaddingLeft")) * g.g.ratio : 0; var m = C.data("originalPaddingRight") ? parseInt(C.data("originalPaddingRight")) * g.g.ratio : 0; var l = C.data("originalPaddingTop") ? parseInt(C.data("originalPaddingTop")) * g.g.ratio : 0; var v = C.data("originalPaddingBottom") ? parseInt(C.data("originalPaddingBottom")) * g.g.ratio : 0; var w = C.data("originalBorderLeft") ? parseInt(C.data("originalBorderLeft")) * g.g.ratio : 0; var t = C.data("originalBorderRight") ? parseInt(C.data("originalBorderRight")) * g.g.ratio : 0; var q = C.data("originalBorderTop") ? parseInt(C.data("originalBorderTop")) * g.g.ratio : 0; var A = C.data("originalBorderBottom") ? parseInt(C.data("originalBorderBottom")) * g.g.ratio : 0; var B = C.data("originalFontSize"); var E = C.data("originalLineHeight"); if (g.g.responsiveMode || g.o.responsiveUnder > 0) { if (C.is("img") && !C.hasClass("ls-bg")) { C.css({ width: "auto", height: "auto" }); if ((p == 0 || p == "auto") && typeof z == "number" && z != 0) { p = (z / C.height()) * C.width() } if ((z == 0 || z == "auto") && typeof p == "number" && p != 0) { z = (p / C.width()) * C.height() } if (p == "auto") { p = C.width() * g.g.ratio } if (z == "auto") { z = C.height() * g.g.ratio } C.css({ width: p, height: z }) } if (!C.is("img")) { C.css({ width: p, height: z, "font-size": parseInt(B) * g.g.ratio + "px", "line-height": parseInt(E) * g.g.ratio + "px" }) } if (C.is("div") && C.find("iframe").data("videoSrc")) { var n = C.find("iframe"); n.attr("width", parseInt(n.data("originalWidth")) * g.g.ratio).attr("height", parseInt(n.data("originalHeight")) * g.g.ratio); C.css({ width: parseInt(n.data("originalWidth")) * g.g.ratio, height: parseInt(n.data("originalHeight")) * g.g.ratio }) } C.css({ padding: l + "px " + m + "px " + v + "px " + o + "px ", borderLeftWidth: w + "px", borderRightWidth: t + "px", borderTopWidth: q + "px", borderBottomWidth: A + "px" }) } if (!C.hasClass("ls-bg")) { var s = C; if (C.parent().is("a")) { C = C.parent() } var D = g.o.sublayerContainer > 0 ? (g.g.sliderWidth() - g.o.sublayerContainer) / 2 : 0; D = D < 0 ? 0 : D; if (y.indexOf("%") != -1) { C.css({ left: g.g.sliderWidth() / 100 * parseInt(y) - s.width() / 2 - o - w }) } else { if (D > 0 || g.g.responsiveMode || g.o.responsiveUnder > 0) { C.css({ left: D + parseInt(y) * g.g.ratio }) } } if (r.indexOf("%") != -1) { C.css({ top: g.g.sliderHeight() / 100 * parseInt(r) - s.height() / 2 - l - q }) } else { if (g.g.responsiveMode || g.o.responsiveUnder > 0) { C.css({ top: parseInt(r) * g.g.ratio }) } } } else { C.css({ width: "auto", height: "auto" }); // @maxhartshorn added scale factor to take into account image scaling (GT-539). var scaleFactor = 1; if ( C.attr( 'scale' ) ) { scaleFactor = parseInt( C.attr( 'scale' ), 10 ); } p = C.width() * scaleFactor; z = C.height() * scaleFactor; var u = g.g.ratio; if (g.g.sliderOriginalWidth.indexOf("%") != -1) { if (g.g.sliderWidth() > p) { u = g.g.sliderWidth() / p; if (g.g.sliderHeight() > z * u) { u = g.g.sliderHeight() / z } } else { if (g.g.sliderHeight() > z) { u = g.g.sliderHeight() / z; if (g.g.sliderWidth() > p * u) { u = g.g.sliderWidth() / p } } } } C.css({ width: Math.round(p * u), height: Math.round(z * u), marginLeft: -Math.round(p * u) / 2 + "px", marginTop: -Math.round(z * u) / 2 + "px" }) } }); j.css({ display: "none", visibility: "visible" }); g.resizeShadow(); k(); e(this).dequeue(); if (g.g.normalWidth && g.g.goingNormal) { g.g.normalWidth = false; g.g.normalHeight = false; g.g.normalRatio = false; g.g.goingNormal = false } }; g.resizeShadow = function() { if (g.g.shadowImg) { var j = function() { if (g.g.shadowImg.height() > 0) { if (g.g.shadowBtmMod > 0) { g.g.shadow.css({ height: g.g.shadowImg.height() / 2 }) } else { g.g.shadow.css({ height: g.g.shadowImg.height(), marginTop: -g.g.shadowImg.height() / 2 }) } } else { setTimeout(function() { j() }, 50) } }; j() } }; g.resizeSlider = function() { if (g.o.responsiveUnder > 0) { if (e(window).width() < g.o.responsiveUnder) { g.g.responsiveMode = true; g.g.sliderOriginalWidth = g.o.responsiveUnder + "px" } else { g.g.responsiveMode = false; g.g.sliderOriginalWidth = g.g.sliderOriginalWidthRU; g.g.ratio = 1 } } if (g.g.responsiveMode) { var k = e(i).parent(); if (g.g.normalRatio && g.g.goingNormal) { e(i).css({ width: g.g.normalWidth }); g.g.ratio = g.g.normalRatio; e(i).css({ height: g.g.normalHeight }) } else { e(i).css({ width: k.width() - parseInt(e(i).css("padding-left")) - parseInt(e(i).css("padding-right")) }); g.g.ratio = e(i).width() / parseInt(g.g.sliderOriginalWidth); e(i).css({ height: g.g.ratio * parseInt(g.g.sliderOriginalHeight) }) } } else { g.g.ratio = 1; e(i).css({ width: g.g.sliderOriginalWidth, height: g.g.sliderOriginalHeight }) } if (e(i).closest(".ls-wp-fullwidth-container").length) { e(i).closest(".ls-wp-fullwidth-helper").css({ height: e(i).outerHeight(true) }); e(i).closest(".ls-wp-fullwidth-container").css({ height: e(i).outerHeight(true) }); e(i).closest(".ls-wp-fullwidth-helper").css({ width: e(window).width(), left: -e(i).closest(".ls-wp-fullwidth-container").offset().left }); if (g.g.sliderOriginalWidth.indexOf("%") != -1) { var j = parseInt(g.g.sliderOriginalWidth); var l = e("body").width() / 100 * j - (e(i).outerWidth() - e(i).width()); e(i).width(l) } } e(i).find(".ls-inner, .ls-lt-container").css({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }); if (g.g.curLayer && g.g.nextLayer) { g.g.curLayer.css({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }); g.g.nextLayer.css({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }) } else { e(i).find(".ls-layer").css({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }) } }; g.resizeYourLogo = function() { g.g.yourLogo.css({ width: g.g.yourLogo.data("originalWidth") * g.g.ratio, height: g.g.yourLogo.data("originalHeight") * g.g.ratio }); if (g.g.ie78) { g.g.yourLogo.css("display", "block") } else { g.g.yourLogo.fadeIn(300) } var j = oR = oT = oB = "auto"; if (g.g.yourLogo.data("originalLeft") && g.g.yourLogo.data("originalLeft").indexOf("%") != -1) { j = g.g.sliderWidth() / 100 * parseInt(g.g.yourLogo.data("originalLeft")) - g.g.yourLogo.width() / 2 + parseInt(e(i).css("padding-left")) } else { j = parseInt(g.g.yourLogo.data("originalLeft")) * g.g.ratio } if (g.g.yourLogo.data("originalRight") && g.g.yourLogo.data("originalRight").indexOf("%") != -1) { oR = g.g.sliderWidth() / 100 * parseInt(g.g.yourLogo.data("originalRight")) - g.g.yourLogo.width() / 2 + parseInt(e(i).css("padding-right")) } else { oR = parseInt(g.g.yourLogo.data("originalRight")) * g.g.ratio } if (g.g.yourLogo.data("originalTop") && g.g.yourLogo.data("originalTop").indexOf("%") != -1) { oT = g.g.sliderHeight() / 100 * parseInt(g.g.yourLogo.data("originalTop")) - g.g.yourLogo.height() / 2 + parseInt(e(i).css("padding-top")) } else { oT = parseInt(g.g.yourLogo.data("originalTop")) * g.g.ratio } if (g.g.yourLogo.data("originalBottom") && g.g.yourLogo.data("originalBottom").indexOf("%") != -1) { oB = g.g.sliderHeight() / 100 * parseInt(g.g.yourLogo.data("originalBottom")) - g.g.yourLogo.height() / 2 + parseInt(e(i).css("padding-bottom")) } else { oB = parseInt(g.g.yourLogo.data("originalBottom")) * g.g.ratio } g.g.yourLogo.css({ left: j, right: oR, top: oT, bottom: oB }) }; g.resizeThumb = function() { g.bottomNavSizeHelper("on"); var k = g.g.sliderOriginalWidth.indexOf("%") == -1 ? parseInt(g.g.sliderOriginalWidth) : g.g.sliderWidth(); e(i).find(".ls-thumbnail-slide a").css({ width: parseInt(g.o.tnWidth * g.g.ratio), height: parseInt(g.o.tnHeight * g.g.ratio) }); e(i).find(".ls-thumbnail-slide a:last").css({ margin: 0 }); e(i).find(".ls-thumbnail-slide").css({ height: parseInt(g.o.tnHeight * g.g.ratio) }); var j = e(i).find(".ls-thumbnail"); var l = g.o.tnContainerWidth.indexOf("%") == -1 ? parseInt(g.o.tnContainerWidth) : parseInt(k / 100 * parseInt(g.o.tnContainerWidth)); j.css({ width: l * Math.floor(g.g.ratio * 100) / 100 }); if (j.width() > e(i).find(".ls-thumbnail-slide").width()) { j.css({ width: e(i).find(".ls-thumbnail-slide").width() }) } g.bottomNavSizeHelper("off") }; g.changeThumb = function(j) { var k = j ? j : g.g.nextLayerIndex; e(i).find(".ls-thumbnail-slide a:not(.ls-thumb-" + k + ")").children().each(function() { e(this).removeClass("ls-thumb-active").stop().fadeTo(750, g.o.tnInactiveOpacity / 100) }); e(i).find(".ls-thumbnail-slide a.ls-thumb-" + k).children().addClass("ls-thumb-active").stop().fadeTo(750, g.o.tnActiveOpacity / 100) }; g.scrollThumb = function() { if (!e(i).find(".ls-thumbnail-slide-container").hasClass("ls-thumbnail-slide-hover")) { var j = e(i).find(".ls-thumb-active").length ? e(i).find(".ls-thumb-active").parent() : false; if (j) { var k = j.position().left + j.width() / 2; var l = e(i).find(".ls-thumbnail-slide-container").width() / 2 - k; l = l < e(i).find(".ls-thumbnail-slide-container").width() - e(i).find(".ls-thumbnail-slide").width() ? e(i).find(".ls-thumbnail-slide-container").width() - e(i).find(".ls-thumbnail-slide").width() : l; l = l > 0 ? 0 : l; e(i).find(".ls-thumbnail-slide").animate({ marginLeft: l }, 600, "easeInOutQuad") } } }; g.bottomNavSizeHelper = function(j) { if (g.o.hoverBottomNav && !e(i).hasClass("ls-hover")) { switch (j) { case "on": g.g.thumbsWrapper.css({ visibility: "hidden", display: "block" }); break; case "off": g.g.thumbsWrapper.css({ visibility: "visible", display: "none" }); break } } }; g.animate = function() { if (e(i).find(".ls-layer").length > 1) { g.g.isAnimating = true } g.g.isLoading = false; clearTimeout(g.g.slideTimer); clearTimeout(g.g.changeTimer); g.g.stopLayer = g.g.curLayer; g.o.cbAnimStart(g.g); if (g.o.thumbnailNavigation == "always") { g.changeThumb(); if (!("ontouchstart" in window)) { g.scrollThumb() } } g.g.nextLayer.addClass("ls-animating"); var D = curLayerRight = curLayerTop = curLayerBottom = nextLayerLeft = nextLayerRight = nextLayerTop = nextLayerBottom = layerMarginLeft = layerMarginRight = layerMarginTop = layerMarginBottom = "auto"; var s = nextLayerWidth = g.g.sliderWidth(); var C = nextLayerHeight = g.g.sliderHeight(); var y = g.g.prevNext == "prev" ? g.g.curLayer : g.g.nextLayer; var n = y.data("slidedirection") ? y.data("slidedirection") : g.o.slideDirection; var j = g.g.slideDirections[g.g.prevNext][n]; if (j == "left" || j == "right") { s = curLayerTop = nextLayerWidth = nextLayerTop = 0; layerMarginTop = 0 } if (j == "top" || j == "bottom") { C = D = nextLayerHeight = nextLayerLeft = 0; layerMarginLeft = 0 } switch (j) { case "left": curLayerRight = nextLayerLeft = 0; layerMarginLeft = -g.g.sliderWidth(); break; case "right": D = nextLayerRight = 0; layerMarginLeft = g.g.sliderWidth(); break; case "top": curLayerBottom = nextLayerTop = 0; layerMarginTop = -g.g.sliderHeight(); break; case "bottom": curLayerTop = nextLayerBottom = 0; layerMarginTop = g.g.sliderHeight(); break } g.g.curLayer.css({ left: D, right: curLayerRight, top: curLayerTop, bottom: curLayerBottom }); g.g.nextLayer.css({ width: nextLayerWidth, height: nextLayerHeight, left: nextLayerLeft, right: nextLayerRight, top: nextLayerTop, bottom: nextLayerBottom }); var l = g.g.curLayer.data("delayout") ? parseInt(g.g.curLayer.data("delayout")) : g.o.delayOut; var r = g.g.curLayer.data("durationout") ? parseInt(g.g.curLayer.data("durationout")) : g.o.durationOut; var q = g.g.curLayer.data("easingout") ? g.g.curLayer.data("easingout") : g.o.easingOut; var k = g.g.nextLayer.data("delayin") ? parseInt(g.g.nextLayer.data("delayin")) : g.o.delayIn; var z = g.g.nextLayer.data("durationin") ? parseInt(g.g.nextLayer.data("durationin")) : g.o.durationIn; var o = g.g.nextLayer.data("easingin") ? g.g.nextLayer.data("easingin") : g.o.easingIn; var p = function() { g.g.curLayer.delay(l + r / 15).animate({ width: s, height: C }, r, q, function() { t() }) }; var t = function() { g.g.stopLayer.find(' > *[class*="ls-s"]').stop(true, true); g.o.cbAnimStop(g.g); g.g.curLayer = g.g.nextLayer; g.g.curLayerIndex = g.g.nextLayerIndex; e(i).find(".ls-layer").removeClass("ls-active"); e(i).find(".ls-layer:eq(" + (g.g.curLayerIndex - 1) + ")").addClass("ls-active").removeClass("ls-animating"); e(i).find(".ls-bottom-slidebuttons a").removeClass("ls-nav-active"); e(i).find(".ls-bottom-slidebuttons a:eq(" + (g.g.curLayerIndex - 1) + ")").addClass("ls-nav-active"); if (g.g.autoSlideshow) { g.timer() } g.g.isAnimating = false; if (g.g.resize == true) { g.makeResponsive(g.g.curLayer, function() { g.g.resize = false }) } }; var A = function(H) { g.g.curLayer.find(' > *[class*="ls-s"]').each(function() { var I = e(this).data("slidedirection") ? e(this).data("slidedirection") : j; var U, Q; switch (I) { case "left": U = -g.g.sliderWidth(); Q = 0; break; case "right": U = g.g.sliderWidth(); Q = 0; break; case "top": Q = -g.g.sliderHeight(); U = 0; break; case "bottom": Q = g.g.sliderHeight(); U = 0; break } var K = e(this).data("slideoutdirection") ? e(this).data("slideoutdirection") : false; switch (K) { case "left": U = g.g.sliderWidth(); Q = 0; break; case "right": U = -g.g.sliderWidth(); Q = 0; break; case "top": Q = g.g.sliderHeight(); U = 0; break; case "bottom": Q = -g.g.sliderHeight(); U = 0; break } var O = parseInt(e(this).attr("class").split("ls-s")[1]); if (O == -1) { var R = parseInt(e(this).css("left")); var L = parseInt(e(this).css("top")); if (Q < 0) { Q = -(g.g.sliderHeight() - L + 1) } else { if (Q > 0) { Q = L + e(this).outerHeight() + 1 } } if (U < 0) { U = -(g.g.sliderWidth() - R + 1) } else { if (U > 0) { U = R + e(this).outerWidth() + 1 } } var V = 1 } else { var J = g.g.curLayer.data("parallaxout") ? parseInt(g.g.curLayer.data("parallaxout")) : g.o.parallaxOut; var V = O * J } var N = e(this).data("delayout") ? parseInt(e(this).data("delayout")) : g.o.delayOut; var S = e(this).data("durationout") ? parseInt(e(this).data("durationout")) : g.o.durationOut; var T = e(this).data("easingout") ? e(this).data("easingout") : g.o.easingOut; if (H) { N = 0; S = H } var P = "none"; if (!g.g.ie78 && g.g.enableCSS3) { P = e(this).data("rotateout") ? e(this).data("rotateout") : 0 } var M = "none"; if (!g.g.ie78 && g.g.enableCSS3) { M = e(this).data("scaleout") ? e(this).data("scaleout") : 1 } if (e(this).data("showUntilTimer")) { clearTimeout(e(this).data("showUntilTimer")) } if (K == "fade" || (!K && I == "fade")) { if (!g.g.ie78) { e(this).stop(true, false).delay(N).animate({ opacity: 0, kmRotate: P, kmScale: M }, S, T, function() { e(this).css({ visibility: "hidden", opacity: e(this).data("originalOpacity") }) }) } else { e(this).stop(true, true).delay(N).fadeOut(S, T, function() { e(this).css({ visibility: "hidden", display: "block" }) }) } } else { e(this).stop(true, false).delay(N).animate({ kmRotate: P, kmScale: M, marginLeft: -U * V, marginTop: -Q * V }, S, T) } }) }; var m = function() { g.g.nextLayer.delay(l + k).animate({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }, z, o) }; var u = function() { if (g.g.totalDuration) { l = 0 } g.g.nextLayer.find(' > *[class*="ls-s"]').each(function() { var S = e(this).data("slidedirection") ? e(this).data("slidedirection") : j; var U, O; switch (S) { case "left": U = -g.g.sliderWidth(); O = 0; break; case "right": U = g.g.sliderWidth(); O = 0; break; case "top": O = -g.g.sliderHeight(); U = 0; break; case "bottom": O = g.g.sliderHeight(); U = 0; break; case "fade": O = 0; U = 0; break } var T = parseInt(e(this).attr("class").split("ls-s")[1]); if (T == -1) { var P = parseInt(e(this).css("left")); var I = parseInt(e(this).css("top")); if (O < 0) { O = -(I + e(this).outerHeight() + 1) } else { if (O > 0) { O = g.g.sliderHeight() - I + 1 } } if (U < 0) { U = -(P + e(this).outerWidth() + 1) } else { if (U > 0) { U = g.g.sliderWidth() - P + 1 } } var Q = 1 } else { var M = g.g.nextLayer.data("parallaxin") ? parseInt(g.g.nextLayer.data("parallaxin")) : g.o.parallaxIn; var Q = T * M } var K = e(this).data("delayin") ? parseInt(e(this).data("delayin")) : g.o.delayIn; var R = e(this).data("durationin") ? parseInt(e(this).data("durationin")) : g.o.durationIn; var J = e(this).data("easingin") ? e(this).data("easingin") : g.o.easingIn; var N = e(this); var L = function() { if (g.o.autoPlayVideos == true) { N.find(".ls-videopreview").click() } if (N.data("showuntil") > 0) { N.data("showUntilTimer", setTimeout(function() { g.sublayerShowUntil(N) }, N.data("showuntil"))) } }; var V = "none"; if (!g.g.ie78 && g.g.enableCSS3) { V = e(this).data("rotatein") ? e(this).data("rotatein") : 0 } var H = "none"; if (!g.g.ie78 && g.g.enableCSS3) { H = e(this).data("scalein") ? e(this).data("scalein") : 1 } if (S == "fade") { if (!g.g.ie78) { e(this).css({ transform: "kmRotate(" + V + "deg) kmScale(" + H + ")", "-ms-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", "-webkit-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", "-o-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", "-moz-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", opacity: 0, visibility: "visible", marginLeft: 0, marginTop: 0 }).stop().delay(l + k + K).animate({ kmScale: 1, kmRotate: 0, opacity: e(this).data("originalOpacity") }, R, J, function() { L() }) } else { e(this).css({ display: "none", visibility: "visible", marginLeft: 0, marginTop: 0 }).stop(true, true).delay(l + k + K).fadeIn(R, J, function() { L() }) } } else { if (!g.g.ie78) { e(this).css({ opacity: e(this).data("originalOpacity") }) } e(this).css({ transform: "kmRotate(" + V + "deg) kmScale(" + H + ")", "-ms-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", "-webkit-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", "-o-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", "-moz-transform": "kmRotate(" + V + "deg) kmScale(" + H + ")", marginLeft: U * Q, marginTop: O * Q, display: "block", visibility: "visible" }); e(this).stop().delay(l + k + K).animate({ marginLeft: 0, marginTop: 0, kmScale: 1, kmRotate: 0 }, R, J, function() { L() }) } }) }; var w = function() { if (a(e(i)) && typeof e.transit != "undefined" && (g.g.nextLayer.data("transition3d") || g.g.nextLayer.data("customtransition3d"))) { if (g.g.nextLayer.data("transition3d") && g.g.nextLayer.data("customtransition3d")) { var I = Math.floor(Math.random() * 2); var H = [ ["3d", g.g.nextLayer.data("transition3d")], ["custom3d", g.g.nextLayer.data("customtransition3d")] ]; F(H[I][0], H[I][1]) } else { if (g.g.nextLayer.data("transition3d")) { F("3d", g.g.nextLayer.data("transition3d")) } else { F("custom3d", g.g.nextLayer.data("customtransition3d")) } } } else { if (g.g.nextLayer.data("transition2d") && g.g.nextLayer.data("customtransition2d")) { var I = Math.floor(Math.random() * 2); var H = [ ["2d", g.g.nextLayer.data("transition2d")], ["custom2d", g.g.nextLayer.data("customtransition2d")] ]; F(H[I][0], H[I][1]) } else { if (g.g.nextLayer.data("transition2d")) { F("2d", g.g.nextLayer.data("transition2d")) } else { if (g.g.nextLayer.data("customtransition2d")) { F("custom2d", g.g.nextLayer.data("customtransition2d")) } else { F("2d", "all") } } } } }; var v = function() { if (a(e(i)) && LSCustomTransition.indexOf("3d") != -1) { F("3d", LSCustomTransition.split(":")[1]) } else { if (LSCustomTransition.indexOf("3d") != -1) { F("2d", "all") } else { F("2d", LSCustomTransition.split(":")[1]) } } }; var F = function(M, J) { var O = M.indexOf("custom") == -1 ? g.t : g.ct; var L = "3d", H, N; if (M.indexOf("2d") != -1) { L = "2d" } if (J.indexOf("last") != -1) { N = O["t" + L].length - 1; H = "last" } else { if (J.indexOf("all") != -1) { N = Math.floor(Math.random() * c(O["t" + L])); H = "random from all" } else { var K = J.split(","); var I = K.length; N = parseInt(K[Math.floor(Math.random() * I)]) - 1; H = "random from specified" } } E(L, O["t" + L][N]) }; var E = function(aI, af) { var al = e(i).find(".ls-inner"); var ag = g.g.curLayer.find('*[class*="ls-s"]').length > 0 ? 1000 : 0; var O = af.name.toLowerCase().indexOf("carousel") == -1 ? false : true; var ae = typeof(af.cols) == "number" ? af.cols : Math.floor(Math.random() * (af.cols[1] - af.cols[0] + 1)) + af.cols[0]; var aC = typeof(af.rows) == "number" ? af.rows : Math.floor(Math.random() * (af.rows[1] - af.rows[0] + 1)) + af.rows[0]; if ((g.g.isMobile() == true && g.o.optimizeForMobile == true) || (g.g.ie78 && g.o.optimizeForIE78 == true)) { if (ae >= 15) { ae = 7 } else { if (ae >= 5) { ae = 4 } else { if (ae >= 4) { ae = 3 } else { if (ae > 2) { ae = 2 } } } } if (aC >= 15) { aC = 7 } else { if (aC >= 5) { aC = 4 } else { if (aC >= 4) { aC = 3 } else { if (aC > 2) { aC = 2 } } } } if (aC > 2 && ae > 2) { aC = 2; if (ae > 4) { ae = 4 } } } var ax = e(i).find(".ls-inner").width() / ae; var L = e(i).find(".ls-inner").height() / aC; if (!g.g.ltContainer) { g.g.ltContainer = e("
").addClass("ls-lt-container").addClass("ls-overflow-hidden").css({ width: al.width(), height: al.height() }).prependTo(al) } else { g.g.ltContainer.empty().css({ width: al.width(), height: al.height() }) } var T = al.width() - Math.floor(ax) * ae; var ad = al.height() - Math.floor(L) * aC; var U = []; U.randomize = function() { var W = this.length, H, aK, aJ; if (W == 0) { return false } while (--W) { H = Math.floor(Math.random() * (W + 1)); aK = this[W]; aJ = this[H]; this[W] = aJ; this[H] = aK } return this }; for (var aE = 0; aE < ae * aC; aE++) { U.push(aE) } switch (af.tile.sequence) { case "reverse": U.reverse(); break; case "col-forward": U = f(aC, ae, "forward"); break; case "col-reverse": U = f(aC, ae, "reverse"); break; case "random": U.randomize(); break } var ai = g.g.curLayer.find(".ls-bg"); var ao = g.g.nextLayer.find(".ls-bg"); if (ai.length == 0 && ao.length == 0) { aI = "2d"; af = e.extend(true, {}, g.t.t2d[0]); af.transition.duration = 1; af.tile.delay = 0 } if (aI == "3d") { g.g.totalDuration = ag + ((ae * aC) - 1) * af.tile.delay; var ac = 0; if (af.before && af.before.duration) { ac += af.before.duration } if (af.animation && af.animation.duration) { ac += af.animation.duration } if (af.after && af.after.duration) { ac += af.after.duration } g.g.totalDuration += ac; var am = 0; if (af.before && af.before.delay) { am += af.before.delay } if (af.animation && af.animation.delay) { am += af.animation.delay } if (af.after && af.after.delay) { am += af.after.delay } g.g.totalDuration += am } else { g.g.totalDuration = ag + ((ae * aC) - 1) * af.tile.delay + af.transition.duration; g.g.curTiles = e("
").addClass("ls-curtiles").appendTo(g.g.ltContainer); g.g.nextTiles = e("
").addClass("ls-nexttiles").appendTo(g.g.ltContainer) } var ab = g.g.prevNext; for (var ap = 0; ap < ae * aC; ap++) { var aA = ap % ae == 0 ? T : 0; var J = ap > (aC - 1) * ae - 1 ? ad : 0; var R = e("
").addClass("ls-lt-tile").css({ width: Math.floor(ax) + aA, height: Math.floor(L) + J }).appendTo(g.g.ltContainer); var aj, K; if (aI == "3d") { R.addClass("ls-3d-container"); var Q = Math.floor(ax) + aA; var X = Math.floor(L) + J; var Z; if (af.animation.direction == "horizontal") { if (Math.abs(af.animation.transition.rotateY) > 90 && af.tile.depth != "large") { Z = Math.floor(Q / 7) + aA } else { Z = Q } } else { if (Math.abs(af.animation.transition.rotateX) > 90 && af.tile.depth != "large") { Z = Math.floor(X / 7) + J } else { Z = X } } var P = Q / 2; var aH = X / 2; var aa = Z / 2; var aq = function(aN, aO, aP, aM, aL, aK, aJ, W, H) { e("
").addClass(aN).css({ width: aP, height: aM, transform: "translate3d(" + aL + "px, " + aK + "px, " + aJ + "px) rotateX(" + W + "deg) rotateY(" + H + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-o-transform": "translate3d(" + aL + "px, " + aK + "px, " + aJ + "px) rotateX(" + W + "deg) rotateY(" + H + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-ms-transform": "translate3d(" + aL + "px, " + aK + "px, " + aJ + "px) rotateX(" + W + "deg) rotateY(" + H + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-moz-transform": "translate3d(" + aL + "px, " + aK + "px, " + aJ + "px) rotateX(" + W + "deg) rotateY(" + H + "deg) rotateZ(0deg) scale3d(1, 1, 1)", "-webkit-transform": "translate3d(" + aL + "px, " + aK + "px, " + aJ + "px) rotateX(" + W + "deg) rotateY(" + H + "deg) rotateZ(0deg) scale3d(1, 1, 1)" }).appendTo(aO) }; aq("ls-3d-box", R, 0, 0, 0, 0, -aa, 0, 0); var au = 0; var aG = 0; var ak = 0; if (af.animation.direction == "vertical" && Math.abs(af.animation.transition.rotateX) > 90) { aq("ls-3d-back", R.find(".ls-3d-box"), Q, X, -P, -aH, -aa, 180, 0) } else { aq("ls-3d-back", R.find(".ls-3d-box"), Q, X, -P, -aH, -aa, 0, 180) } aq("ls-3d-bottom", R.find(".ls-3d-box"), Q, Z, -P, aH - aa, 0, -90, 0); aq("ls-3d-top", R.find(".ls-3d-box"), Q, Z, -P, -aH - aa, 0, 90, 0); aq("ls-3d-front", R.find(".ls-3d-box"), Q, X, -P, -aH, aa, 0, 0); aq("ls-3d-left", R.find(".ls-3d-box"), Z, X, -P - aa, -aH, 0, 0, -90); aq("ls-3d-right", R.find(".ls-3d-box"), Z, X, P - aa, -aH, 0, 0, 90); aj = R.find(".ls-3d-front"); if (af.animation.direction == "horizontal") { if (Math.abs(af.animation.transition.rotateY) > 90) { K = R.find(".ls-3d-back") } else { K = R.find(".ls-3d-left, .ls-3d-right") } } else { if (Math.abs(af.animation.transition.rotateX) > 90) { K = R.find(".ls-3d-back") } else { K = R.find(".ls-3d-top, .ls-3d-bottom") } } var an = ag + U[ap] * af.tile.delay; var aB = g.g.ltContainer.find(".ls-3d-container:eq(" + ap + ") .ls-3d-box"); if (af.before && af.before.transition) { af.before.transition.delay = af.before.transition.delay ? af.before.transition.delay + an : an; aB.transition(af.before.transition, af.before.duration, af.before.easing) } else { af.animation.transition.delay = af.animation.transition.delay ? af.animation.transition.delay + an : an } aB.transition(af.animation.transition, af.animation.duration, af.animation.easing); if (af.after) { aB.transition(e.extend({}, { scale3d: 1 }, af.after.transition), af.after.duration, af.after.easing) } } else { var N = L1 = T2 = L2 = "auto"; var ar = O2 = 1; if (af.transition.direction == "random") { var aF = ["top", "bottom", "right", "left"]; var V = aF[Math.floor(Math.random() * aF.length)] } else { var V = af.transition.direction } if (af.name.toLowerCase().indexOf("mirror") != -1 && ap % 2 == 0) { if (ab == "prev") { ab = "next" } else { ab = "prev" } } if (ab == "prev") { switch (V) { case "top": V = "bottom"; break; case "bottom": V = "top"; break; case "left": V = "right"; break; case "right": V = "left"; break; case "topleft": V = "bottomright"; break; case "topright": V = "bottomleft"; break; case "bottomleft": V = "topright"; break; case "bottomright": V = "topleft"; break } } switch (V) { case "top": N = T2 = -R.height(); L1 = L2 = 0; break; case "bottom": N = T2 = R.height(); L1 = L2 = 0; break; case "left": N = T2 = 0; L1 = L2 = -R.width(); break; case "right": N = T2 = 0; L1 = L2 = R.width(); break; case "topleft": N = R.height(); T2 = 0; L1 = R.width(); L2 = 0; break; case "topright": N = R.height(); T2 = 0; L1 = -R.width(); L2 = 0; break; case "bottomleft": N = -R.height(); T2 = 0; L1 = R.width(); L2 = 0; break; case "bottomright": N = -R.height(); T2 = 0; L1 = -R.width(); L2 = 0; break } g.g.scale2D = af.transition.scale ? af.transition.scale : 1; if (O == true && g.g.scale2D != 1) { N = N / 2; T2 = T2 / 2; L1 = L1 / 2; L2 = L2 / 2 } switch (af.transition.type) { case "fade": N = T2 = L1 = L2 = 0; ar = 0; O2 = 1; break; case "mixed": ar = 0; O2 = 1; if (g.g.scale2D == 1) { T2 = L2 = 0 } break } if (((af.transition.rotate || af.transition.rotateX || af.transition.rotateY) || g.g.scale2D != 1) && !g.g.ie78 && af.transition.type != "slide") { R.css({ overflow: "visible" }) } else { R.css({ overflow: "hidden" }) } if (O == true) { g.g.curTiles.css({ overflow: "visible" }) } else { g.g.curTiles.css({ overflow: "hidden" }) } if (af.transition.type == "slide" || O == true) { var M = R.appendTo(g.g.curTiles); var I = R.clone().appendTo(g.g.nextTiles); aj = e("
").addClass("ls-curtile").appendTo(M) } else { var I = R.appendTo(g.g.nextTiles) } K = e("
").addClass("ls-nexttile").appendTo(I).css({ top: -N, left: -L1, dispay: "block", opacity: ar }); var aD = ag + U[ap] * af.tile.delay; if (g.g.cssTransitions && typeof e.transit != "undefined") { var aw = af.transition.rotate ? af.transition.rotate : 0; var az = af.transition.rotateX ? af.transition.rotateX : 0; var ay = af.transition.rotateY ? af.transition.rotateY : 0; if (ab == "prev") { aw = -aw; az = -az; ay = -ay } if (az != 0 || ay != 0 || aw != 0 || g.g.scale2D != 1) { K.css({ transform: "kmRotate(" + aw + "deg) rotateX(" + az + "deg) rotateY(" + ay + "deg) kmScale(" + g.g.scale2D + "," + g.g.scale2D + ")", "-o-transform": "kmRotate(" + aw + "deg) rotateX(" + az + "deg) rotateY(" + ay + "deg) kmScale(" + g.g.scale2D + "," + g.g.scale2D + ")", "-ms-transform": "kmRotate(" + aw + "deg) rotateX(" + az + "deg) rotateY(" + ay + "deg) kmScale(" + g.g.scale2D + "," + g.g.scale2D + ")", "-moz-transform": "kmRotate(" + aw + "deg) rotateX(" + az + "deg) rotateY(" + ay + "deg) kmScale(" + g.g.scale2D + "," + g.g.scale2D + ")", "-webkit-transform": "kmRotate(" + aw + "deg) rotateX(" + az + "deg) rotateY(" + ay + "deg) kmScale(" + g.g.scale2D + "," + g.g.scale2D + ")" }) } K.transition({ delay: aD, top: 0, left: 0, opacity: O2, kmRotate: 0, rotateX: 0, rotateY: 0, kmScale: 1 }, af.transition.duration, af.transition.easing); if ((af.transition.type == "slide" || O == true) && af.name.toLowerCase().indexOf("mirror") == -1) { var Y = 0; if (aw != 0) { Y = -aw } aj.transition({ delay: aD, top: T2, left: L2, kmRotate: Y, kmScale: g.g.scale2D, opacity: ar }, af.transition.duration, af.transition.easing) } } else { K.delay(aD).animate({ top: 0, left: 0, opacity: O2 }, af.transition.duration, af.transition.easing); if (af.transition.type == "slide") { aj.delay(aD).animate({ top: T2, left: L2 }, af.transition.duration, af.transition.easing) } } } if (ai.length) { if (aI == "3d" || (aI == "2d" && (af.transition.type == "slide" || O == true))) { aj.append(e("").attr("src", ai.attr("src")).css({ width: ai[0].style.width, height: ai[0].style.height, marginLeft: al.width() / 2 + parseFloat(ai.css("margin-left")) - parseInt(R.position().left), marginTop: al.height() / 2 + parseFloat(ai.css("margin-top")) - parseInt(R.position().top) })) } else { if (g.g.curTiles.children().length == 0) { g.g.curTiles.append(e("").attr("src", ai.attr("src")).css({ width: ai[0].style.width, height: ai[0].style.height, marginLeft: al.width() / 2 + parseFloat(ai.css("margin-left")), marginTop: al.height() / 2 + parseFloat(ai.css("margin-top")) })) } } } if (ao.length) { K.append(e("").attr("src", ao.attr("src")).css({ width: ao[0].style.width, height: ao[0].style.height, marginLeft: al.width() / 2 + parseFloat(ao.css("margin-left")) - parseInt(R.position().left), marginTop: al.height() / 2 + parseFloat(ao.css("margin-top")) - parseInt(R.position().top) })) } } var at = g.g.curLayer; var av = g.g.nextLayer; av.find(".ls-bg").css({ visibility: "hidden" }); A(ag); setTimeout(function() { at.css({ width: 0 }); g.g.ltContainer.removeClass("ls-overflow-hidden") }, ag); var S = parseInt(av.data("timeshift")) ? parseInt(av.data("timeshift")) : 0; var ah = g.g.totalDuration + S > 0 ? g.g.totalDuration + S : 0; setTimeout(function() { if (g.g.resize == true) { g.g.ltContainer.empty(); at.removeClass("ls-active"); g.makeResponsive(av, function() { g.g.resize = false }) } u(); if (av.find(".ls-bg").length < 1 || (av.find(".ls-bg").length > 0 && av.find(".ls-bg").attr("src").toLowerCase().indexOf("png") != -1)) { g.g.ltContainer.fadeOut(750, "easeInExpo", function() { e(this).empty().show() }) } av.css({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }) }, ah); setTimeout(function() { g.g.ltContainer.addClass("ls-overflow-hidden"); av.addClass("ls-active"); if (av.find(".ls-bg").length) { av.find(".ls-bg").css({ display: "none", visibility: "visible" }); if (g.g.ie78) { av.find(".ls-bg").css("display", "block"); setTimeout(function() { t() }, 500) } else { av.find(".ls-bg").fadeIn(500, function() { t() }) } } else { t() } }, g.g.totalDuration) }; transitionType = ((g.g.nextLayer.data("transition3d") || g.g.nextLayer.data("transition2d")) && g.t) || ((g.g.nextLayer.data("customtransition3d") || g.g.nextLayer.data("customtransition2d")) && g.ct) ? "new" : "old"; if (g.o.animateFirstLayer && !g.g.firstLayerAnimated) { if (g.g.layersNum == 1) { var l = 0; g.o.cbAnimStop(g.g) } else { var G = parseInt(g.g.nextLayer.data("timeshift")) ? parseInt(g.g.nextLayer.data("timeshift")) : 0; var B = transitionType == "new" ? 0 : r; setTimeout(function() { t() }, B + Math.abs(G)) } g.g.totalDuration = true; u(); g.g.nextLayer.css({ width: g.g.sliderWidth(), height: g.g.sliderHeight() }); if (!g.g.ie78) { g.g.nextLayer.find(".ls-bg").css({ display: "none" }).fadeIn(500) } g.g.firstLayerAnimated = true; g.g.isLoading = false } else { switch (transitionType) { case "old": g.g.totalDuration = false; if (g.g.ltContainer) { g.g.ltContainer.empty() } p(); A(); m(); u(); break; case "new": if (typeof LSCustomTransition != "undefined") { v() } else { w() } break } } }; g.sublayerShowUntil = function(v) { var q = g.g.curLayer; if (g.g.prevNext != "prev" && g.g.nextLayer) { q = g.g.nextLayer } var l = q.data("slidedirection") ? q.data("slidedirection") : g.o.slideDirection; var m = g.g.slideDirections[g.g.prevNext][l]; var j = v.data("slidedirection") ? v.data("slidedirection") : m; var z, u; switch (j) { case "left": z = -g.g.sliderWidth(); u = 0; break; case "right": z = g.g.sliderWidth(); u = 0; break; case "top": u = -g.g.sliderHeight(); z = 0; break; case "bottom": u = g.g.sliderHeight(); z = 0; break } var o = v.data("slideoutdirection") ? v.data("slideoutdirection") : false; switch (o) { case "left": z = g.g.sliderWidth(); u = 0; break; case "right": z = -g.g.sliderWidth(); u = 0; break; case "top": u = g.g.sliderHeight(); z = 0; break; case "bottom": u = -g.g.sliderHeight(); z = 0; break } var r = parseInt(v.attr("class").split("ls-s")[1]); if (r == -1) { var t = parseInt(v.css("left")); var n = parseInt(v.css("top")); if (u < 0) { u = -(g.g.sliderHeight() - n + 1) } else { if (u > 0) { u = n + v.outerHeight() + 1 } } if (z < 0) { z = -(g.g.sliderWidth() - t + 1) } else { if (z > 0) { z = t + v.outerWidth() + 1 } } var A = 1 } else { var k = g.g.curLayer.data("parallaxout") ? parseInt(g.g.curLayer.data("parallaxout")) : g.o.parallaxOut; var A = r * k } var w = v.data("durationout") ? parseInt(v.data("durationout")) : g.o.durationOut; var y = v.data("easingout") ? v.data("easingout") : g.o.easingOut; var s = "none"; if (!g.g.ie78 && g.g.enableCSS3) { s = v.data("rotateout") ? v.data("rotateout") : 0 } var p = "none"; if (!g.g.ie78 && g.g.enableCSS3) { p = v.data("scaleout") ? v.data("scaleout") : 1 } if (o == "fade" || (!o && j == "fade")) { if (!g.g.ie78) { v.animate({ opacity: 0, kmRotate: s, kmScale: p }, w, y) } else { v.fadeOut(w, y) } } else { v.animate({ kmRotate: s, kmScale: p, marginLeft: -z * A, marginTop: -u * A }, w, y) } }; g.debug = function() { g.d = { history: e("
"), aT: function(j) { e("

" + j + "

").appendTo(g.d.history) }, aeU: function() { e("
    ").appendTo(g.d.history) }, aU: function(j) { e("
    • " + j + "
    ").appendTo(g.d.history) }, aL: function(j) { e("
  • " + j + "
  • ").appendTo(g.d.history.find("ul:last")) }, aUU: function(j) { e("
      ").appendTo(g.d.history.find("ul:last li:last")) }, aF: function(j) { g.d.history.find("ul:last li:last").hover(function() { j.css({ border: "2px solid red", marginTop: parseInt(j.css("margin-top")) - 2, marginLeft: parseInt(j.css("margin-left")) - 2 }) }, function() { j.css({ border: "0px", marginTop: parseInt(j.css("margin-top")) + 2, marginLeft: parseInt(j.css("margin-left")) + 2 }) }) }, show: function() { if (!e("body").find(".ls-debug-console").length) { if (!g.d.putData) { g.d.aT("Init code"); g.d.aeU(); for (var m in g.o) { g.d.aL(m + ": " + g.o[m] + "") } g.d.aT("LayerSlider Content"); g.d.aU("Number of slides found: " + e(i).find(".ls-layer").length + ""); e(i).find('.ls-inner .ls-layer, .ls-inner *[class*="ls-s"]').each(function() { if (e(this).hasClass("ls-layer")) { g.d.aU("SLIDE " + (e(this).index() + 1) + ""); g.d.aUU(); g.d.aL("SLIDE " + (e(this).index() + 1) + " properties:

      ") } else { g.d.aU("    Layer ( " + e(this).prop("tagName") + " )"); g.d.aF(e(this)); g.d.aUU(); g.d.aL("" + e(this).prop("tagName") + " layer properties:

      "); g.d.aL("distance / class: " + e(this).attr("class") + "") } e.each(e(this).data(), function(n, o) { g.d.aL(n + ": " + o + "") }) }); g.d.putData = true } var k = e("
      ").addClass("ls-debug-console").css({ position: "fixed", zIndex: "10000000000", top: "10px", right: "10px", width: "300px", padding: "20px", background: "black", "border-radius": "10px", height: e(window).height() - 60, opacity: 0, marginRight: 150 }).appendTo(e("body")).animate({ marginRight: 0, opacity: 0.9 }, 600, "easeInOutQuad").click(function(n) { if (n.shiftKey && n.altKey) { e(this).animate({ marginRight: 150, opacity: 0 }, 600, "easeInOutQuad", function() { e(this).remove() }) } }); var l = e("
      ").css({ width: "100%", height: "100%", overflow: "auto" }).appendTo(k); var j = e("
      ").css({ width: "100%" }).appendTo(l).append(g.d.history) } }, hide: function() { e("body").find(".ls-debug-console").remove() } }; e(i).click(function(j) { if (j.shiftKey && j.altKey) { g.d.show() } }) }; g.load() }; var a = function(j) { var m = e("
      "), l = false, k = false, h = ["perspective", "OPerspective", "msPerspective", "MozPerspective", "WebkitPerspective"]; transform = ["transformStyle", "OTransformStyle", "msTransformStyle", "MozTransformStyle", "WebkitTransformStyle"]; for (var g = h.length - 1; g >= 0; g--) { l = l ? l : m[0].style[h[g]] != undefined } for (var g = transform.length - 1; g >= 0; g--) { m.css("transform-style", "preserve-3d"); k = k ? k : m[0].style[transform[g]] == "preserve-3d" } if (l && m[0].style[h[4]] != undefined) { m.attr("id", "ls-test3d").appendTo(j); l = m[0].offsetHeight === 3 && m[0].offsetLeft === 9; m.remove() } return (l && k) }; var f = function(h, m, k) { var l = []; if (k == "forward") { for (var j = 0; j < h; j++) { for (var g = 0; g < m; g++) { l.push(j + g * h) } } } else { for (var j = h - 1; j > -1; j--) { for (var g = m - 1; g > -1; g--) { l.push(j + g * h) } } } return l }; var c = function(h) { var g = 0; for (var i in h) { if (h.hasOwnProperty(i)) { ++g } } return g }; var b = function() { uaMatch = function(j) { j = j.toLowerCase(); var i = /(chrome)[ \/]([\w.]+)/.exec(j) || /(webkit)[ \/]([\w.]+)/.exec(j) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(j) || /(msie) ([\w.]+)/.exec(j) || j.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(j) || []; return { browser: i[1] || "", version: i[2] || "0" } }; var g = uaMatch(navigator.userAgent), h = {}; if (g.browser) { h[g.browser] = true; h.version = g.version } if (h.chrome) { h.webkit = true } else { if (h.webkit) { h.safari = true } } return h }; lsPrefixes = function(j, l) { var k = ["webkit", "khtml", "moz", "ms", "o", ""]; var i = 0, g, h; while (i < k.length && !j[g]) { g = l; if (k[i] == "") { g = g.substr(0, 1).toLowerCase() + g.substr(1) } g = k[i] + g; h = typeof j[g]; if (h != "undefined") { k = [k[i]]; return (h == "function" ? j[g]() : j[g]) } i++ } }; d.global = { version: "4.6.1", 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(g) { if (g.css("padding-bottom") == "auto" || g.css("padding-bottom") == "none" || g.css("padding-bottom") == 0 || g.css("padding-bottom") == "0px") { return true } else { return false } }, cssTransitions: !b().msie || (b().msie && b().version > 9) ? true : false, ie78: b().msie && b().version < 9 ? true : false, normalWidth: false, normalHeight: false, normalRatio: false, goingNormal: 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 } }; d.options = { autoStart: true, firstLayer: 1, twoWaySlideshow: true, keybNav: true, imgPreload: true, navPrevNext: true, navStartStop: true, navButtons: true, skin: "glass", skinsPath: "/layerslider/skins/", pauseOnHover: true, globalBGColor: "transparent", globalBGImage: false, animateFirstLayer: true, yourLogo: false, yourLogoStyle: "left: -10px; top: -10px;", yourLogoLink: false, yourLogoTarget: "_blank", touchNav: true, loops: 0, forceLoopNum: true, autoPlayVideos: true, autoPauseSlideshow: "auto", youtubePreview: "maxresdefault.jpg", responsive: true, randomSlideshow: false, responsiveUnder: 0, sublayerContainer: 0, thumbnailNavigation: "hover", tnWidth: 100, tnHeight: 60, tnContainerWidth: "60%", tnActiveOpacity: 35, tnInactiveOpacity: 100, hoverPrevNext: true, hoverBottomNav: false, showBarTimer: false, showCircleTimer: true, optimizeForMobile: true, optimizeForIE78: true, allowFullScreenMode: false, cbInit: function(g) {}, cbStart: function(g) {}, cbStop: function(g) {}, cbPause: function(g) {}, cbAnimStart: function(g) {}, cbAnimStop: function(g) {}, cbPrev: function(g) {}, cbNext: function(g) {}, slideDirection: "right", slideDelay: 4000, parallaxIn: 0.45, parallaxOut: 0.45, durationIn: 1000, durationOut: 1000, easingIn: "easeInOutQuint", easingOut: "easeInOutQuint", delayIn: 0, delayOut: 0 } })(jQuery); jQuery.extend(jQuery.easing, { easeInOutQuint: function(e, t, n, r, i) { if ((t /= i / 2) < 1) return r / 2 * t * t * t * t * t + n; return r / 2 * ((t -= 2) * t * t * t * t + 2) + n } });