!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.0",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))},R=function(){V()},M=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)&&z(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 X(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&&M(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function U(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 z(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,ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",R),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 Me(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 R(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 R(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.mouseenter(e).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($){ })(jQuery); var _CRP_LAST_GENERATED_ID=100000; function crp_generateId(){ return "tmpid_" + (++_CRP_LAST_GENERATED_ID).toString(); } function crp_showSpinner(){ jQuery("#crp-spinner").css('display', 'block'); jQuery("#crp-spinner-background").css('display', 'block'); } function crp_hideSpinner(){ setTimeout(function(){ jQuery("#crp-spinner").css('display', 'none'); jQuery("#crp-spinner-background").css('display', 'none'); }, 1000); } function crp_openMediaUploader(callback, multipleSelection){ 'use strict'; multipleSelection=typeof multipleSelection!=='undefined' ? multipleSelection:false; var uploader, imgData, json; if(undefined!==uploader){ uploader.open(); return; } uploader=wp.media.frames.file_frame=wp.media({ frame: 'post', state: 'insert', multiple: multipleSelection }); uploader.on('insert', function(){ var selections=uploader.state().get('selection').toJSON(); var picInfos=[]; for(var sIdx=0; sIdx < selections.length; sIdx++){ var json=selections[sIdx]; if(0 > jQuery.trim(json.url.length)){ continue; } var picInfo={}; picInfo.id=json.id; picInfo.src=json.sizes.full.url; if(json.sizes.medium){ picInfo.src=json.sizes.medium.url; } picInfos.push(picInfo); } if(multipleSelection){ callback(picInfos); }else{ callback(picInfos.length > 0 ? picInfos[0]:null); }}); uploader.open(); } function crp_isJSArray(obj){ return (Object.prototype.toString.call(obj)==='[object Array]') } function crp_truncateIfNeeded(text, maxLength){ if(text){ if(text.length > 3&&text.length > maxLength - 3){ text=text.substring(0,maxLength - 3); text +="..." }} return text; } function crp_loadHref(href, blank){ if(!blank){ window.location.href=href; }else{ window.open(href, '_blank'); }} function crp_mgfCloseButtonMarkup(){ var html=""; html +="" return html; } var CrpBase64={ _keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode:function (input){ var output=""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i=0; if(!input) return output; input=CrpBase64._utf8_encode(input); while (i < input.length){ chr1=input.charCodeAt(i++); chr2=input.charCodeAt(i++); chr3=input.charCodeAt(i++); enc1=chr1 >> 2; enc2=((chr1 & 3) << 4) | (chr2 >> 4); enc3=((chr2 & 15) << 2) | (chr3 >> 6); enc4=chr3 & 63; if(isNaN(chr2)){ enc3=enc4=64; }else if(isNaN(chr3)){ enc4=64; } output=output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, decode:function (input){ var output=""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i=0; if(!input) return output; input=input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length){ enc1=this._keyStr.indexOf(input.charAt(i++)); enc2=this._keyStr.indexOf(input.charAt(i++)); enc3=this._keyStr.indexOf(input.charAt(i++)); enc4=this._keyStr.indexOf(input.charAt(i++)); chr1=(enc1 << 2) | (enc2 >> 4); chr2=((enc2 & 15) << 4) | (enc3 >> 2); chr3=((enc3 & 3) << 6) | enc4; output=output + String.fromCharCode(chr1); if(enc3!=64){ output=output + String.fromCharCode(chr2); } if(enc4!=64){ output=output + String.fromCharCode(chr3); }} output=CrpBase64._utf8_decode(output); return output; }, _utf8_encode:function (string){ string=string.replace(/\r\n/g,"\n"); var utftext=""; for (var n=0; n < string.length; n++){ var c=string.charCodeAt(n); if(c < 128){ utftext +=String.fromCharCode(c); } else if((c > 127)&&(c < 2048)){ utftext +=String.fromCharCode((c >> 6) | 192); utftext +=String.fromCharCode((c & 63) | 128); }else{ utftext +=String.fromCharCode((c >> 12) | 224); utftext +=String.fromCharCode(((c >> 6) & 63) | 128); utftext +=String.fromCharCode((c & 63) | 128); }} return utftext; }, _utf8_decode:function (utftext){ var string=""; var i=0; var c=c1=c2=0; while(i < utftext.length){ c=utftext.charCodeAt(i); if(c < 128){ string +=String.fromCharCode(c); i++; } else if((c > 191)&&(c < 224)){ c2=utftext.charCodeAt(i+1); string +=String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i +=2; }else{ c2=utftext.charCodeAt(i+1); c3=utftext.charCodeAt(i+2); string +=String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i +=3; }} return string; }}; ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; }}",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f _wrapperWidth - plugin.settings.margin){ _slotWidth=_wrapperWidth - plugin.settings.margin; } var _itemsPerRow=parseInt(_wrapperWidth / _slotWidth); var _delta=_wrapperWidth - _itemsPerRow * _slotWidth; var _deltaPerCell=Math.floor(_delta / _itemsPerRow); _slotWidth +=_deltaPerCell; sW=_slotWidth; var _ratio=plugin.settings.approxTileHeight / plugin.settings.approxTileWidth; if(plugin.settings.layoutType==CRPTiledLayerType.Masonry){ _ratio=height / width; } sH=Math.ceil(sW * _ratio); }else{ var _wrapperWidth=$element.width() + plugin.settings.margin; var step=parseInt(_wrapperWidth / 4); var ratios=[ {w: 1, h:1}, {w: 2, h:2}, ]; var ratio=ratios[(Math.floor(Math.random() * (ratios.length - 0)) + 0)]; sW=ratio.w * step; sH=ratio.h * step; } var newsH=sH; if(plugin.settings.addBlock1Height!=false){ newsH +=plugin.settings.addBlock1Height; } if(plugin.settings.addBlock2Height!=false){ newsH +=plugin.settings.addBlock2Height; } var slot=new Slot(sW, newsH); var av_blocks=0; var free_cell=0; var line=0; if(this.slots.length==0){ av_blocks=this.hor_size; slot.position.x=0; slot.position.y=0; }else{ var exit=false; for (; free_cell < this.cells.length; free_cell++){ if(this.cells[free_cell]==0){ line=Math.floor(free_cell / this.hor_size); var line_end=(line + 1) * this.hor_size; av_blocks=0; for (var k=0; k <=line_end - free_cell; k++){ av_blocks=k; if(this.cells[free_cell + k]==1){ break; }} break; }} } if(av_blocks < slot.blocks.h){ slot.resize(av_blocks); }else{ var free_on_right=this.count_free_cells_on_right(free_cell + slot.blocks.h); if(free_on_right - plugin.settings.margin < this.min_tile_width && free_on_right > 0){ slot.resize(av_blocks, !allowEnlargement); slot.enlarged=true; } if(free_on_right==0) slot.edge_right=true; } slot.position.x=free_cell % this.hor_size; slot.position.y=Math.floor(free_cell / this.hor_size); this.add_slot(slot); return slot; } var defaults={ layoutType: CRPTiledLayerType.Square, approxTileWidth: 200, approxTileHeight: 200, minTileWidth: 200, margin: 10, addBlock1Height: false, addBlock2Height: false, allowEnlargement: false, onComplete: function (){ }, onUpdate: function (){ }, } var plugin=this; var grid=null; var maxHeight=0; plugin.settings={} var $element=$(element), element=element; var currentWidth=$element.width(); var completed=false; var busy=false; var tilesForFilter=function(ft){ $tiles=$element.find(".tile"); return $tiles; } var doFiltration=function(){ busy=true; var $tiles=tilesForFilter(null); maxHeight=0; grid=null; $tiles.css({visibility: 'invisible'}); entile($tiles); $tiles.css({visibility: 'visible'}); busy=false; } plugin.init=function (){ plugin.settings=$.extend({}, defaults, options); $element.find(".ftg-items").css({ position: "relative", minWidth: plugin.settings.minTileWidth, }); var $tiles=$element.find(".tile"); styleTiles($tiles); assignImagesSize($tiles); var category=window.location.hash; if(category!=''&&category!='#'){ var current=jQuery(".ftg-filters a[href='" + category + "']"); if(current.length!=0){ jQuery("a", current.closest(".ftg-filters")).removeClass('selected'); current.addClass('selected'); }} doFiltration(); $(window).resize(function (){ if(busy) return; if(currentWidth!=$element.width()){ busy=true; currentWidth=$element.width(); resTo=setTimeout(function (){ grid=null; maxHeight=0; var $filteredTiles=tilesForFilter(null); entile($filteredTiles); busy=false; }, 700); }}); } var styleTiles=function ($tiles){ $tiles.css({ position: "absolute", visibility: 'hidden', }); $tiles.find('.tile-inner').css({ position: "relative", display: "block", overflow: "hidden", }); $tiles.find('.crp-item').css({ position: "relative", display: "block", fontSize: 10, maxWidth: "9999em", }); } var assignImagesSize=function ($tiles){ $tiles.each(function (){ var $item=$(this).find(".crp-item"); var size={ width: $item.data("width"), height: $item.data("height") }; $item.data("size", size); }); } var entile=function ($tiles){ if(!grid) grid=new Grid(plugin.settings.margin, plugin.settings.minTileWidth, Math.floor($element.width() + plugin.settings.margin)); $tiles.each(function (){ if($(this).hasClass("ftg-hidden")) return; var size=$(this).find(".crp-item").data("size"); var slot=grid.insert(size.width + plugin.settings.margin, size.height + plugin.settings.margin, plugin.settings.allowEnlargement); $(this).data("enlarged", slot.enlarged); var top=slot.position.y; var height=slot.blocks.v; var tileWidth=slot.blocks.h - plugin.settings.margin; var tileHeight=slot.blocks.v - plugin.settings.margin; if(top + tileHeight > maxHeight) maxHeight=top + height + plugin.settings.margin; if(plugin.settings.addBlock1Height!=false){ tileHeight -=plugin.settings.addBlock1Height; } if(plugin.settings.addBlock2Height!=false){ tileHeight -=plugin.settings.addBlock2Height; } $(this).css({ top: top, left: slot.position.x, width: slot.blocks.h, height: height }); $(this).find('.tile-inner').css({ width: tileWidth, height: tileHeight }) .data("width", tileWidth) .data("height", tileHeight); if(plugin.settings.addBlock1Height!=false){ $(this).find('.tile-inner').css({ top: plugin.settings.addBlock1Height }); $(this).find('.crp-additional-block1').css({ width: tileWidth, height: plugin.settings.addBlock1Height }); } if(plugin.settings.addBlock2Height!=false){ $(this).find('.crp-additional-block2').css({ bottom: plugin.settings.margin, width: tileWidth, height: plugin.settings.addBlock2Height }); } $element.find(".ftg-items").height(maxHeight); }); $tiles.find("img.crp-item").each(function (i, item){ var $item=$(item); var size=$item.data("size"); var ratioImg=size.width / size.height; var ratioTile=$item.parent().data("width") / $item.parent().data("height"); var bugFixDiff=0; if(ratioImg >=ratioTile){ $item.attr("case", "2"); var $h=$item.parent().data("height") + bugFixDiff; var $w=ratioImg * $h; $item.css({ width: $w, height: $h }); var diff=$w - $item.parent().data("width"); $item.css({ "margin-left": diff / -2, "margin-top": bugFixDiff / -2, }); }else{ $item.attr("case", "4"); var $w=$item.parent().data("width") + bugFixDiff; var $h=$w / ratioImg; $item.css({ width: $w, height: $h }); var diff=$h - $item.parent().data("height"); $item.css({ "margin-top": diff / -2, "margin-left": bugFixDiff / -2, }); }}); if(!completed){ completed=true; plugin.settings.onComplete.call(plugin); }else{ plugin.settings.onUpdate.call(plugin); }} plugin.init(); } $.fn.crpTiledLayer=function (options){ return this.each(function (){ if(undefined==$(this).data('crpTiledLayer')){ var plugin=new $.crpTiledLayer(this, options); $(this).data('crpTiledLayer', plugin); }}); }})(jQuery); (function($){ var crpFullScreenViewer=function(element, options){ var target="#" + $(element).attr("id"); var plugin=this; var $defaultViewMode="normal"; var $tsMargin=30; var $scrollEasing=600; var $scrollEasingType="easeOutCirc"; var $thumbnailsContainerOpacity=0; var $thumbnailsContainerMouseOutOpacity=0; var $thumbnailsOpacity=0.6; var $nextPrevBtnsInitState="show"; var $keyboardNavigation="on"; var $thumbnails_wrapper=$(target + " #thumbnails_wrapper"); var $outer_container=$(target + " #outer_container"); var $thumbScroller=$(target + " .thumbScroller"); var $thumbScroller_container=$(target + " .thumbScroller .container"); var $thumbScroller_content=$(target + " .thumbScroller .content"); var $thumbScroller_thumb=$(target + " .thumbScroller .thumb"); var $preloader=$(target + " #preloader"); var $toolbar=$(target + " #toolbar"); var $toolbar_a=$(target + " #toolbar a"); var $bgimg=$(target + " #bgimg"); var $img_title=$(target + " #img_title"); var $nextImageBtn=$(target + " .nextImageBtn"); var $prevImageBtn=$(target + " .prevImageBtn"); var $viewModeBtn=$(target + " .viewModeBtn"); var $nextViewMode="normal"; var $totalContent=0; var $fadeSpeed=200; var the1stImg=null; var the1stImgSrc=""; if(options.bgsrc){ the1stImgSrc=options.bgsrc; } $(window).load(function(){ $toolbar.data("imageViewMode",$defaultViewMode); if($defaultViewMode=="full"){ $nextViewMode="normal"; $viewModeBtn.removeClass("maximize"); $viewModeBtn.addClass("minimize"); $viewModeBtn.attr("title", "Restore"); }else{ $nextViewMode="full"; $viewModeBtn.removeClass("minimize"); $viewModeBtn.addClass("maximize"); $viewModeBtn.attr("title", "Maximize"); } ShowHideNextPrev($nextPrevBtnsInitState); $thumbScroller_container.css("marginLeft",$tsMargin+"px"); var sliderLeft=$thumbScroller_container.position().left; var sliderWidth=$outer_container.width(); $thumbScroller.css("width",sliderWidth); var $the_outer_container=$(target + " #outer_container").get(0); //document.getElementById("outer_container"); var $placement=findPos($the_outer_container); calcScrollerWidth(); var idleTimer=null; var idleState=false; var idleWait=600; $thumbScroller.mousemove(function(e){ if($thumbScroller_container.width()>sliderWidth){ var mouseCoords=(e.pageX - $placement[1]); var mousePercentX=mouseCoords/sliderWidth; var destX=-(((($totalContent+($tsMargin*2))-(sliderWidth))-sliderWidth)*(mousePercentX)); var thePosA=mouseCoords-destX; var thePosB=destX-mouseCoords; if(mouseCoords>destX){ $thumbScroller_container.stop().animate({left: -thePosA}, $scrollEasing,$scrollEasingType); }else if(mouseCoords picHeight){ $(theItem).attr("width",winWidth); $(theItem).attr("height",picHeight*winWidth); }else{ $(theItem).attr("height",winHeight); $(theItem).attr("width",picWidth*winHeight); };} $(theItem).css("margin-left",(winWidth-$(theItem).width())/2); $(theItem).css("margin-top",(winHeight-$(theItem).height())/2); }else{ $(theItem).attr("width",imageWidth); $(theItem).attr("height",imageHeight); $(theItem).css("margin-left",(winWidth-imageWidth)/2); $(theItem).css("margin-top",(winHeight-imageHeight)/2); }} function ImageViewMode(theMode){ $toolbar.data("imageViewMode", theMode); FullScreenBackground($bgimg,$bgimg.data("newImageW"),$bgimg.data("newImageH")); if(theMode=="full"){ $nextViewMode="normal"; $viewModeBtn.removeClass("maximize"); $viewModeBtn.addClass("minimize"); $viewModeBtn.attr("title", "Restore"); }else{ $nextViewMode="full"; $viewModeBtn.removeClass("minimize"); $viewModeBtn.addClass("maximize"); $viewModeBtn.attr("title", "Maximize"); }} function findPos(obj){ var curleft=curtop=0; if(obj.offsetParent){ curleft=obj.offsetLeft curtop=obj.offsetTop while (obj=obj.offsetParent){ curleft +=obj.offsetLeft curtop +=obj.offsetTop }} return [curtop, curleft]; } return { prepareToShow: function(){ if(!the1stImg.src){ the1stImg.src=the1stImgSrc; }else{ $($bgimg).fadeOut(0,0); $($bgimg).fadeIn("slow"); } plugin.loadThumbnails(); jQuery(window).trigger("resize"); }} } $.fn.crpFullScreenViewer=function (options){ var plugin=$(this).data('crpFullScreenViewer'); if(undefined==plugin){ plugin=new crpFullScreenViewer(this, options); $(this).data('crpFullScreenViewer', plugin); } return plugin; }})(jQuery); ; (function ($){ "use strict"; $.fn.lightGallery=function (options){ var defaults={ mode: 'slide', useCSS: true, cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',// easing: 'linear', //'for jquery animation',// speed: 600, addClass: '', closable: true, loop: false, auto: false, pause: 4000, escKey: true, controls: true, hideControlOnEnd: false, preload: 1, showAfterLoad: true, selector: null, index: false, lang: { allPhotos: 'All photos' }, counter: false, exThumbImage: false, thumbnail: true, showThumbByDefault: false, animateThumb: true, currentPagerPosition: 'middle', thumbWidth: 100, thumbMargin: 5, mobileSrc: false, mobileSrcMaxWidth: 640, swipeThreshold: 50, enableTouch: true, enableDrag: true, vimeoColor: 'CCCCCC', youtubePlayerParams: false, videoAutoplay: true, videoMaxWidth: '855px', dynamic: false, dynamicEl: [], onOpen: function (plugin){}, onSlideBefore: function (plugin){}, onSlideAfter: function (plugin){}, onSlideNext: function (plugin){}, onSlidePrev: function (plugin){}, onBeforeClose: function (plugin){}, onCloseAfter: function (plugin){}, onOpenExternal:function(plugin, index){}, onToggleInfo:function(plugin){}}, el=$(this), plugin=this, $children=null, index=0, isActive=false, lightGalleryOn=false, isTouch=document.createTouch!==undefined||('ontouchstart' in window)||('onmsgesturechange' in window)||navigator.msMaxTouchPoints, $gallery, $galleryCont, $slider, $slide, $prev, $next, prevIndex, $thumb_cont, $thumb, windowWidth, interval, usingThumb=false, aTiming=false, aSpeed=false; var settings=$.extend(true, {}, defaults, options); var lightGallery={ init: function (){ el.each(function (){ var $this=$(this); if(settings.dynamic){ $children=settings.dynamicEl; index=0; prevIndex=index; setUp.init(index); }else{ if(settings.selector!==null){ $children=$(settings.selector); }else{ $children=$this.children(); } $children.on('click', function (e){ if(settings.selector!==null){ $children=$(settings.selector); }else{ $children=$this.children(); } e.preventDefault(); e.stopPropagation(); index=$children.index(this); prevIndex=index; setUp.init(index); }); }}); }}; var setUp={ init: function (){ isActive=true; this.structure(); this.getWidth(); this.closeSlide(); this.autoStart(); this.counter(); this.slideTo(); this.buildThumbnail(); this.addInfoHtml(); this.keyPress(); if(settings.index){ this.slide(settings.index); this.animateThumb(settings.index); }else{ this.slide(index); this.animateThumb(index); } if(settings.enableDrag){ this.touch(); } if(settings.enableTouch){ this.enableTouch(); } setTimeout(function (){ $gallery.addClass('opacity'); }, 50); }, structure: function (){ $('body').append('
').addClass('light-gallery'); $galleryCont=$('#lg-outer'); $gallery=$('#lg-gallery'); if(settings.showAfterLoad===true){ $gallery.addClass('show-after-load'); } $slider=$gallery.find('#lg-slider'); var slideList=''; if(settings.dynamic){ for (var i=0; i < settings.dynamicEl.length; i++){ slideList +='
'; }}else{ $children.each(function (){ slideList +='
'; }); } $slider.append(slideList); $slide=$gallery.find('.lg-slide'); }, closeSlide: function (){ var $this=this; if(settings.closable){ $('#lg-outer') .on('click', function (event){ if($(event.target).is('.lg-slide')){ plugin.destroy(false); }}); } $('#lg-close').bind('click touchend', function (){ plugin.destroy(false); }); }, getWidth: function (){ var resizeWindow=function (){ windowWidth=$(window).width(); }; $(window).bind('resize.lightGallery', resizeWindow()); }, doCss: function (){ var support=function (){ var transition=['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; var root=document.documentElement; for (var i=0; i < transition.length; i++){ if(transition[i] in root.style){ return true; }} }; if(settings.useCSS&&support()){ return true; } return false; }, enableTouch: function (){ var $this=this; if(isTouch){ var startCoords={}, endCoords={}; $('body').on('touchstart.lightGallery', function (e){ endCoords=e.originalEvent.targetTouches[0]; startCoords.pageX=e.originalEvent.targetTouches[0].pageX; startCoords.pageY=e.originalEvent.targetTouches[0].pageY; }); $('body').on('touchmove.lightGallery', function (e){ var orig=e.originalEvent; endCoords=orig.targetTouches[0]; if(!jQuery(e.target).parent().hasClass("lg-info")) e.preventDefault(); }); $('body').on('touchend.lightGallery', function (e){ var distance=endCoords.pageX - startCoords.pageX, swipeThreshold=settings.swipeThreshold; if(distance >=swipeThreshold){ $this.prevSlide(); clearInterval(interval); }else if(distance <=-swipeThreshold){ $this.nextSlide(); clearInterval(interval); }}); }}, touch: function (){ var xStart, xEnd; var $this=this; $('.light-gallery').bind('mousedown', function (e){ e.stopPropagation(); e.preventDefault(); xStart=e.pageX; }); $('.light-gallery').bind('mouseup', function (e){ e.stopPropagation(); e.preventDefault(); xEnd=e.pageX; if(xEnd - xStart > 20){ $this.prevSlide(); }else if(xStart - xEnd > 20){ $this.nextSlide(); }}); }, isVideo: function (src, index){ var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i); var vimeo=src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i); var iframe=false; if(settings.dynamic){ if(settings.dynamicEl[index].iframe=='true'){ iframe=true; }}else{ if($children.eq(index).attr('data-iframe')=='true'){ iframe=true; }} if(youtube||vimeo||iframe){ return true; }}, loadVideo: function (src, _id){ var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i); var vimeo=src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i); var video=''; var a=''; if(youtube){ if(settings.videoAutoplay===true&&lightGalleryOn===false){ a='?autoplay=1&rel=0&wmode=opaque'; }else{ a='?wmode=opaque'; } if(settings.youtubePlayerParams){ var youtubeParams=$.param(settings.youtubePlayerParams); a=a + '&' + youtubeParams; } video=''; }else if(vimeo){ if(settings.videoAutoplay===true&&lightGalleryOn===false){ a='autoplay=1&'; }else{ a=''; } video=''; }else{ video=''; } return '
' + video + '
'; }, addHtml: function (index){ var dataSubHtml=null; if(settings.dynamic){ dataSubHtml=settings.dynamicEl[index]['sub-html']; }else{ dataSubHtml=$children.eq(index).attr('data-sub-html'); } if(typeof dataSubHtml!=='undefined'&&dataSubHtml!==null){ var fL=dataSubHtml.substring(0, 1); if(fL=='.'||fL=='#'){ dataSubHtml=$(dataSubHtml).html(); }else{ dataSubHtml=dataSubHtml; } $slide.eq(index).append(dataSubHtml); }}, addInfoHtml: function (){ var dataSubHtml=null; if(settings.dynamic){ dataSubHtml=settings['sub-html']; }else{ dataSubHtml=$(plugin).attr('data-sub-html'); } if(typeof dataSubHtml!=='undefined'&&dataSubHtml!==null){ $gallery.append(dataSubHtml); }}, preload: function (index){ var newIndex=index; for (var k=0; k <=settings.preload; k++){ if(k >=$children.length - index){ break; } this.loadContent(newIndex + k, true); } for (var h=0; h <=settings.preload; h++){ if(newIndex - h < 0){ break; } this.loadContent(newIndex - h, true); }}, loadObj: function (r, index){ var $this=this; $slide.eq(index).find('.object').on('load error', function (){ $slide.eq(index).addClass('complete'); }); if(r===false){ if(!$slide.eq(index).hasClass('complete')){ $slide.eq(index).find('.object').on('load error', function (){ $this.preload(index); }); }else{ $this.preload(index); }} }, loadContent: function (index, rec){ var $this=this; var i, j, l=$children.length - index; var src; if(settings.preload > $children.length){ settings.preload=$children.length; } if(settings.mobileSrc===true&&windowWidth <=settings.mobileSrcMaxWidth){ if(settings.dynamic){ src=settings.dynamicEl[index].mobileSrc; }else{ src=$children.eq(index).attr('data-responsive-src'); }} if(!src){ if(settings.dynamic){ src=settings.dynamicEl[index].src; }else{ src=$children.eq(index).attr('data-src'); }} var time=0; if(rec===true){ time=settings.speed + 400; } if(typeof src!=='undefined'&&src!==''){ if(!$this.isVideo(src, index)){ setTimeout(function (){ if(!$slide.eq(index).hasClass('loaded')){ $slide.eq(index).prepend(''); $this.addHtml(index); $slide.eq(index).addClass('loaded'); } $this.loadObj(rec, index); }, time); }else{ setTimeout(function (){ if(!$slide.eq(index).hasClass('loaded')){ $slide.eq(index).prepend($this.loadVideo(src, index)); $this.addHtml(index); $slide.eq(index).addClass('loaded'); if(settings.auto&&settings.videoAutoplay===true){ clearInterval(interval); }} $this.loadObj(rec, index); }, time); }}else{ setTimeout(function (){ if(!$slide.eq(index).hasClass('loaded')){ var dataHtml=null; if(settings.dynamic){ dataHtml=settings.dynamicEl[index].html; }else{ dataHtml=$children.eq(index).attr('data-html'); } if(typeof dataHtml!=='undefined'&&dataHtml!==null){ var fL=dataHtml.substring(0, 1); if(fL=='.'||fL=='#'){ dataHtml=$(dataHtml).html(); }else{ dataHtml=dataHtml; }} if(typeof dataHtml!=='undefined'&&dataHtml!==null){ $slide.eq(index).append('
' + dataHtml + '
'); } $this.addHtml(index); $slide.eq(index).addClass('loaded complete'); if(settings.auto&&settings.videoAutoplay===true){ clearInterval(interval); }} $this.loadObj(rec, index); }, time); }}, counter: function (){ if(settings.counter===true){ var slideCount=$("#lg-slider > div").length; $gallery.append("
/ " + slideCount + "
"); }}, buildThumbnail: function (){ if(settings.thumbnail===true&&$children.length > 1){ var $this=this, $close=''; if(!settings.showThumbByDefault){ $close=''; } $gallery.append('
' + $close + '
'); $thumb_cont=$gallery.find('.thumb-cont'); $prev.after(''); $prev.after(''); $prev.after(''); $prev.parent().addClass('has-thumb'); $gallery.find('.cl-thumb').bind('click touchend', function (){ $gallery.addClass('open'); if($this.doCss()&&settings.mode==='slide'){ $slide.eq(index).prevAll().removeClass('next-slide').addClass('prev-slide'); $slide.eq(index).nextAll().removeClass('prev-slide').addClass('next-slide'); }}); $gallery.find('.cl-external').bind('click touchend', function (){ settings.onOpenExternal.call(this, plugin,$gallery.find('.thumb.active').index()); }); $gallery.find('.cl-info').bind('click touchend', function (){ settings.onToggleInfo.call(this, plugin); }); $gallery.find('.thumb-cont .close').bind('click touchend', function (){ $gallery.removeClass('open'); }); var thumbInfo=$gallery.find('.thumb-info'); var $thumb_inner=$gallery.find('.thumb-inner'); var thumbList=''; var thumbImg; if(settings.dynamic){ for (var i=0; i < settings.dynamicEl.length; i++){ thumbImg=settings.dynamicEl[i].thumb; thumbList +='
'; }}else{ $children.each(function (){ if(settings.exThumbImage===false||typeof $(this).attr(settings.exThumbImage)=='undefined'||$(this).attr(settings.exThumbImage)===null){ thumbImg=$(this).find('img').attr('src'); }else{ thumbImg=$(this).attr(settings.exThumbImage); } thumbList +='
'; }); } $thumb_inner.append(thumbList); $thumb=$thumb_inner.find('.thumb'); $thumb.css({ 'margin-right': settings.thumbMargin + 'px', 'width': settings.thumbWidth + 'px' }); if(settings.animateThumb===true){ var width=($children.length * (settings.thumbWidth + settings.thumbMargin)); $gallery.find('.thumb-inner').css({ 'width': width + 'px', 'position': 'relative', 'transition-duration': settings.speed + 'ms' }); } $thumb.bind('click touchend', function (){ usingThumb=true; var index=$(this).index(); $thumb.removeClass('active'); $(this).addClass('active'); $this.slide(index); $this.animateThumb(index); clearInterval(interval); }); thumbInfo.prepend('' + settings.lang.allPhotos + ' (' + $thumb.length + ')'); if(settings.showThumbByDefault){ $gallery.addClass('open'); }} }, animateThumb: function (index){ if(settings.animateThumb===true){ var thumb_contW=$gallery.find('.thumb-cont').width(); var position; switch (settings.currentPagerPosition){ case 'left': position=0; break; case 'middle': position=(thumb_contW / 2) - (settings.thumbWidth / 2); break; case 'right': position=thumb_contW - settings.thumbWidth; } var left=((settings.thumbWidth + settings.thumbMargin) * index - 1) - position; var width=($children.length * (settings.thumbWidth + settings.thumbMargin)); if(left > (width - thumb_contW)){ left=width - thumb_contW; } if(left < 0){ left=0; } if(this.doCss()){ $gallery.find('.thumb-inner').css('transform', 'translate3d(-' + left + 'px, 0px, 0px)'); }else{ $gallery.find('.thumb-inner').animate({ left: -left + "px" }, settings.speed); }} }, slideTo: function (){ var $this=this; if(settings.controls===true&&$children.length > 1){ $gallery.append('
'); $prev=$gallery.find('#lg-prev'); $next=$gallery.find('#lg-next'); $prev.bind('click', function (){ $this.prevSlide(); clearInterval(interval); }); $next.bind('click', function (){ $this.nextSlide(); clearInterval(interval); }); }}, autoStart: function (){ var $this=this; if(settings.auto===true){ interval=setInterval(function (){ if(index + 1 < $children.length){ index=index; }else{ index=-1; } index++; $this.slide(index); }, settings.pause); }}, keyPress: function (){ var $this=this; $(window).bind('keyup.lightGallery', function (e){ e.preventDefault(); e.stopPropagation(); if(e.keyCode===37){ $this.prevSlide(); clearInterval(interval); } if(e.keyCode===38&&settings.thumbnail===true&&$children.length > 1){ if(!$gallery.hasClass('open')){ if($this.doCss()&&settings.mode==='slide'){ $slide.eq(index).prevAll().removeClass('next-slide').addClass('prev-slide'); $slide.eq(index).nextAll().removeClass('prev-slide').addClass('next-slide'); } $gallery.addClass('open'); }}else if(e.keyCode===39){ $this.nextSlide(); clearInterval(interval); } if(e.keyCode===40&&settings.thumbnail===true&&$children.length > 1&&!settings.showThumbByDefault){ if($gallery.hasClass('open')){ $gallery.removeClass('open'); }}else if(settings.escKey===true&&e.keyCode===27){ if(!settings.showThumbByDefault&&$gallery.hasClass('open')){ $gallery.removeClass('open'); }else{ plugin.destroy(false); }} }); }, nextSlide: function (){ var $this=this; index=$slide.index($slide.eq(prevIndex)); if(index + 1 < $children.length){ index++; $this.slide(index); }else{ if(settings.loop){ index=0; $this.slide(index); }else if(settings.thumbnail===true&&$children.length > 1&&!settings.showThumbByDefault){ $gallery.addClass('open'); }else{ $slide.eq(index).find('.object').addClass('right-end'); setTimeout(function (){ $slide.find('.object').removeClass('right-end'); }, 400); }} $this.animateThumb(index); settings.onSlideNext.call(this, plugin); }, prevSlide: function (){ var $this=this; index=$slide.index($slide.eq(prevIndex)); if(index > 0){ index--; $this.slide(index); }else{ if(settings.loop){ index=$children.length - 1; $this.slide(index); }else if(settings.thumbnail===true&&$children.length > 1&&!settings.showThumbByDefault){ $gallery.addClass('open'); }else{ $slide.eq(index).find('.object').addClass('left-end'); setTimeout(function (){ $slide.find('.object').removeClass('left-end'); }, 400); }} $this.animateThumb(index); settings.onSlidePrev.call(this, plugin); }, slide: function (index){ var $this=this; if(lightGalleryOn){ setTimeout(function (){ $this.loadContent(index, false); }, settings.speed + 400); if(!$slider.hasClass('on')){ $slider.addClass('on'); } if(this.doCss()&&settings.speed!==''){ if(!$slider.hasClass('speed')){ $slider.addClass('speed'); } if(aSpeed===false){ $slider.css('transition-duration', settings.speed + 'ms'); aSpeed=true; }} if(this.doCss()&&settings.cssEasing!==''){ if(!$slider.hasClass('timing')){ $slider.addClass('timing'); } if(aTiming===false){ $slider.css('transition-timing-function', settings.cssEasing); aTiming=true; }} settings.onSlideBefore.call(this, plugin); }else{ $this.loadContent(index, false); } if(settings.mode==='slide'){ var isiPad=navigator.userAgent.match(/iPad/i)!==null; if(this.doCss()&&!$slider.hasClass('slide')&&!isiPad){ $slider.addClass('slide'); }else if(this.doCss()&&!$slider.hasClass('use-left')&&isiPad){ $slider.addClass('use-left'); } if(!this.doCss()&&!lightGalleryOn){ $slider.css({ left: (-index * 100) + '%' }); }else if(!this.doCss()&&lightGalleryOn){ $slider.animate({ left: (-index * 100) + '%' }, settings.speed, settings.easing); }}else if(settings.mode==='fade'){ if(this.doCss()&&!$slider.hasClass('fade-m')){ $slider.addClass('fade-m'); }else if(!this.doCss()&&!$slider.hasClass('animate')){ $slider.addClass('animate'); } if(!this.doCss()&&!lightGalleryOn){ $slide.fadeOut(100); $slide.eq(index).fadeIn(100); }else if(!this.doCss()&&lightGalleryOn){ $slide.eq(prevIndex).fadeOut(settings.speed, settings.easing); $slide.eq(index).fadeIn(settings.speed, settings.easing); }} if(index + 1 >=$children.length&&settings.auto&&settings.loop===false){ clearInterval(interval); } $slide.eq(prevIndex).removeClass('current'); $slide.eq(index).addClass('current'); if(this.doCss()&&settings.mode==='slide'){ if(usingThumb===false){ $('.prev-slide').removeClass('prev-slide'); $('.next-slide').removeClass('next-slide'); $slide.eq(index - 1).addClass('prev-slide'); $slide.eq(index + 1).addClass('next-slide'); }else{ $slide.eq(index).prevAll().removeClass('next-slide').addClass('prev-slide'); $slide.eq(index).nextAll().removeClass('prev-slide').addClass('next-slide'); }} if(settings.thumbnail===true&&$children.length > 1){ $thumb.removeClass('active'); $thumb.eq(index).addClass('active'); } if(settings.controls&&settings.hideControlOnEnd&&settings.loop===false&&$children.length > 1){ var l=$children.length; l=parseInt(l) - 1; if(index===0){ $prev.addClass('disabled'); $next.removeClass('disabled'); }else if(index===l){ $prev.removeClass('disabled'); $next.addClass('disabled'); }else{ $prev.add($next).removeClass('disabled'); }} prevIndex=index; lightGalleryOn===false ? settings.onOpen.call(this, plugin):settings.onSlideAfter.call(this, plugin); setTimeout(function (){ lightGalleryOn=true; }); usingThumb=false; if(settings.counter){ $("#lg-counter-current").text(index + 1); } $(window).bind('resize.lightGallery', function (){ setTimeout(function (){ $this.animateThumb(index); }, 200); }); }}; plugin.isActive=function (){ if(isActive===true){ return true; }else{ return false; }}; plugin.destroy=function (d){ isActive=false; d=typeof d!=='undefined' ? false:true; settings.onBeforeClose.call(this, plugin); var lightGalleryOnT=lightGalleryOn; lightGalleryOn=false; aTiming=false; aSpeed=false; usingThumb=false; clearInterval(interval); if(d===true){ $children.off('click touch touchstart'); } $('.light-gallery').off('mousedown mouseup'); $('body').off('touchstart.lightGallery touchmove.lightGallery touchend.lightGallery'); $(window).off('resize.lightGallery keyup.lightGallery'); if(lightGalleryOnT===true){ $gallery.addClass('fade-m'); setTimeout(function (){ $galleryCont.remove(); $('body').removeClass('light-gallery'); }, 500); } settings.onCloseAfter.call(this, plugin); }; lightGallery.init(); return this; };}(jQuery)); ;(function($, window, document, undefined){ function Owl(element, options){ this.settings=null; this.options=$.extend({}, Owl.Defaults, options); this.$element=$(element); this._handlers={}; this._plugins={}; this._supress={}; this._current=null; this._speed=null; this._coordinates=[]; this._breakpoint=null; this._width=null; this._items=[]; this._clones=[]; this._mergers=[]; this._widths=[]; this._invalidated={}; this._pipe=[]; this._drag={ time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }; this._states={ current: {}, tags: { 'initializing': [ 'busy' ], 'animating': [ 'busy' ], 'dragging': [ 'interacting' ] }}; $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler){ this._handlers[handler]=$.proxy(this[handler], this); }, this)); $.each(Owl.Plugins, $.proxy(function(key, plugin){ this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] = new plugin(this); }, this)); $.each(Owl.Workers, $.proxy(function(priority, worker){ this._pipe.push({ 'filter': worker.filter, 'run': $.proxy(worker.run, this) }); }, this)); this.setup(); this.initialize(); } Owl.Defaults={ items: 3, loop: false, center: false, rewind: false, checkVisibility: true, mouseDrag: true, touchDrag: true, pullDrag: true, freeDrag: false, margin: 0, stagePadding: 0, merge: false, mergeFit: true, autoWidth: false, startPosition: 0, rtl: false, smartSpeed: 250, fluidSpeed: false, dragEndSpeed: false, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: window, fallbackEasing: 'swing', slideTransition: '', info: false, nestedItemSelector: false, itemElement: 'div', stageElement: 'div', refreshClass: 'owl-refresh', loadedClass: 'owl-loaded', loadingClass: 'owl-loading', rtlClass: 'owl-rtl', responsiveClass: 'owl-responsive', dragClass: 'owl-drag', itemClass: 'owl-item', stageClass: 'owl-stage', stageOuterClass: 'owl-stage-outer', grabClass: 'owl-grab' }; Owl.Width={ Default: 'default', Inner: 'inner', Outer: 'outer' }; Owl.Type={ Event: 'event', State: 'state' }; Owl.Plugins={}; Owl.Workers=[ { filter: [ 'width', 'settings' ], run: function(){ this._width=this.$element.width(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=this._items&&this._items[this.relative(this._current)]; }}, { filter: [ 'items', 'settings' ], run: function(){ this.$stage.children('.cloned').remove(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var margin=this.settings.margin||'', grid = !this.settings.autoWidth, rtl=this.settings.rtl, css={ 'width': 'auto', 'margin-left': rtl ? margin:'', 'margin-right': rtl ? '':margin }; !grid&&this.$stage.children().css(css); cache.css=css; }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var width=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, merge=null, iterator=this._items.length, grid = !this.settings.autoWidth, widths=[]; cache.items={ merge: false, width: width }; while (iterator--){ merge=this._mergers[iterator]; merge=this.settings.mergeFit&&Math.min(merge, this.settings.items)||merge; cache.items.merge=merge > 1||cache.items.merge; widths[iterator] = !grid ? this._items[iterator].width():width * merge; } this._widths=widths; }}, { filter: [ 'items', 'settings' ], run: function(){ var clones=[], items=this._items, settings=this.settings, view=Math.max(settings.items * 2, 4), size=Math.ceil(items.length / 2) * 2, repeat=settings.loop&&items.length ? settings.rewind ? view:Math.max(view, size):0, append='', prepend=''; repeat /=2; while (repeat > 0){ clones.push(this.normalize(clones.length / 2, true)); append=append + items[clones[clones.length - 1]][0].outerHTML; clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); prepend=items[clones[clones.length - 1]][0].outerHTML + prepend; repeat -=1; } this._clones=clones; $(append).addClass('cloned').appendTo(this.$stage); $(prepend).addClass('cloned').prependTo(this.$stage); }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, size=this._clones.length + this._items.length, iterator=-1, previous=0, current=0, coordinates=[]; while (++iterator < size){ previous=coordinates[iterator - 1]||0; current=this._widths[this.relative(iterator)] + this.settings.margin; coordinates.push(previous + current * rtl); } this._coordinates=coordinates; }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var padding=this.settings.stagePadding, coordinates=this._coordinates, css={ 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, 'padding-left': padding||'', 'padding-right': padding||'' }; this.$stage.css(css); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var iterator=this._coordinates.length, grid = !this.settings.autoWidth, items=this.$stage.children(); if(grid&&cache.items.merge){ while (iterator--){ cache.css.width=this._widths[this.relative(iterator)]; items.eq(iterator).css(cache.css); }}else if(grid){ cache.css.width=cache.items.width; items.css(cache.css); }} }, { filter: [ 'items' ], run: function(){ this._coordinates.length < 1&&this.$stage.removeAttr('style'); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=cache.current ? this.$stage.children().index(cache.current):0; cache.current=Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); this.reset(cache.current); }}, { filter: [ 'position' ], run: function(){ this.animate(this.coordinates(this._current)); }}, { filter: [ 'width', 'position', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, padding=this.settings.stagePadding * 2, begin=this.coordinates(this.current()) + padding, end=begin + this.width() * rtl, inner, outer, matches=[], i, n; for (i=0, n=this._coordinates.length; i < n; i++){ inner=this._coordinates[i - 1]||0; outer=Math.abs(this._coordinates[i]) + padding * rtl; if((this.op(inner, '<=', begin)&&(this.op(inner, '>', end))) || (this.op(outer, '<', begin)&&this.op(outer, '>', end))){ matches.push(i); }} this.$stage.children('.active').removeClass('active'); this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); this.$stage.children('.center').removeClass('center'); if(this.settings.center){ this.$stage.children().eq(this.current()).addClass('center'); }} } ]; Owl.prototype.initializeStage=function(){ this.$stage=this.$element.find('.' + this.settings.stageClass); if(this.$stage.length){ return; } this.$element.addClass(this.options.loadingClass); this.$stage=$('<' + this.settings.stageElement + '>', { "class": this.settings.stageClass }).wrap($('
', { "class": this.settings.stageOuterClass })); this.$element.append(this.$stage.parent()); }; Owl.prototype.initializeItems=function(){ var $items=this.$element.find('.owl-item'); if($items.length){ this._items=$items.get().map(function(item){ return $(item); }); this._mergers=this._items.map(function(){ return 1; }); this.refresh(); return; } this.replace(this.$element.children().not(this.$stage.parent())); if(this.isVisible()){ this.refresh(); }else{ this.invalidate('width'); } this.$element .removeClass(this.options.loadingClass) .addClass(this.options.loadedClass); }; Owl.prototype.initialize=function(){ this.enter('initializing'); this.trigger('initialize'); this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); if(this.settings.autoWidth&&!this.is('pre-loading')){ var imgs, nestedSelector, width; imgs=this.$element.find('img'); nestedSelector=this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector:undefined; width=this.$element.children(nestedSelector).width(); if(imgs.length&&width <=0){ this.preloadAutoWidthImages(imgs); }} this.initializeStage(); this.initializeItems(); this.registerEventHandlers(); this.leave('initializing'); this.trigger('initialized'); }; Owl.prototype.isVisible=function(){ return this.settings.checkVisibility ? this.$element.is(':visible') : true; }; Owl.prototype.setup=function(){ var viewport=this.viewport(), overwrites=this.options.responsive, match=-1, settings=null; if(!overwrites){ settings=$.extend({}, this.options); }else{ $.each(overwrites, function(breakpoint){ if(breakpoint <=viewport&&breakpoint > match){ match=Number(breakpoint); }}); settings=$.extend({}, this.options, overwrites[match]); if(typeof settings.stagePadding==='function'){ settings.stagePadding=settings.stagePadding(); } delete settings.responsive; if(settings.responsiveClass){ this.$element.attr('class', this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) ); }} this.trigger('change', { property: { name: 'settings', value: settings }}); this._breakpoint=match; this.settings=settings; this.invalidate('settings'); this.trigger('changed', { property: { name: 'settings', value: this.settings }}); }; Owl.prototype.optionsLogic=function(){ if(this.settings.autoWidth){ this.settings.stagePadding=false; this.settings.merge=false; }}; Owl.prototype.prepare=function(item){ var event=this.trigger('prepare', { content: item }); if(!event.data){ event.data=$('<' + this.settings.itemElement + '/>') .addClass(this.options.itemClass).append(item) } this.trigger('prepared', { content: event.data }); return event.data; }; Owl.prototype.update=function(){ var i=0, n=this._pipe.length, filter=$.proxy(function(p){ return this[p] }, this._invalidated), cache={}; while (i < n){ if(this._invalidated.all||$.grep(this._pipe[i].filter, filter).length > 0){ this._pipe[i].run(cache); } i++; } this._invalidated={}; !this.is('valid')&&this.enter('valid'); }; Owl.prototype.width=function(dimension){ dimension=dimension||Owl.Width.Default; switch (dimension){ case Owl.Width.Inner: case Owl.Width.Outer: return this._width; default: return this._width - this.settings.stagePadding * 2 + this.settings.margin; }}; Owl.prototype.refresh=function(){ this.enter('refreshing'); this.trigger('refresh'); this.setup(); this.optionsLogic(); this.$element.addClass(this.options.refreshClass); this.update(); this.$element.removeClass(this.options.refreshClass); this.leave('refreshing'); this.trigger('refreshed'); }; Owl.prototype.onThrottledResize=function(){ window.clearTimeout(this.resizeTimer); this.resizeTimer=window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); }; Owl.prototype.onResize=function(){ if(!this._items.length){ return false; } if(this._width===this.$element.width()){ return false; } if(!this.isVisible()){ return false; } this.enter('resizing'); if(this.trigger('resize').isDefaultPrevented()){ this.leave('resizing'); return false; } this.invalidate('width'); this.refresh(); this.leave('resizing'); this.trigger('resized'); }; Owl.prototype.registerEventHandlers=function(){ if($.support.transition){ this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); } if(this.settings.responsive!==false){ this.on(window, 'resize', this._handlers.onThrottledResize); } if(this.settings.mouseDrag){ this.$element.addClass(this.options.dragClass); this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('dragstart.owl.core selectstart.owl.core', function(){ return false }); } if(this.settings.touchDrag){ this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); }}; Owl.prototype.onDragStart=function(event){ var stage=null; if(event.which===3){ return; } if($.support.transform){ stage=this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); stage={ x: stage[stage.length===16 ? 12:4], y: stage[stage.length===16 ? 13:5] };}else{ stage=this.$stage.position(); stage={ x: this.settings.rtl ? stage.left + this.$stage.width() - this.width() + this.settings.margin : stage.left, y: stage.top };} if(this.is('animating')){ $.support.transform ? this.animate(stage.x):this.$stage.stop() this.invalidate('position'); } this.$element.toggleClass(this.options.grabClass, event.type==='mousedown'); this.speed(0); this._drag.time=new Date().getTime(); this._drag.target=$(event.target); this._drag.stage.start=stage; this._drag.stage.current=stage; this._drag.pointer=this.pointer(event); $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)); $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); if(Math.abs(delta.x) < Math.abs(delta.y)&&this.is('valid')){ return; } event.preventDefault(); this.enter('dragging'); this.trigger('drag'); }, this)); }; Owl.prototype.onDragMove=function(event){ var minimum=null, maximum=null, pull=null, delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this.difference(this._drag.stage.start, delta); if(!this.is('dragging')){ return; } event.preventDefault(); if(this.settings.loop){ minimum=this.coordinates(this.minimum()); maximum=this.coordinates(this.maximum() + 1) - minimum; stage.x=(((stage.x - minimum) % maximum + maximum) % maximum) + minimum; }else{ minimum=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()); maximum=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()); pull=this.settings.pullDrag ? -1 * delta.x / 5:0; stage.x=Math.max(Math.min(stage.x, minimum + pull), maximum + pull); } this._drag.stage.current=stage; this.animate(stage.x); }; Owl.prototype.onDragEnd=function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this._drag.stage.current, direction=delta.x > 0 ^ this.settings.rtl ? 'left':'right'; $(document).off('.owl.core'); this.$element.removeClass(this.options.grabClass); if(delta.x!==0&&this.is('dragging')||!this.is('valid')){ this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed); this.current(this.closest(stage.x, delta.x!==0 ? direction:this._drag.direction)); this.invalidate('position'); this.update(); this._drag.direction=direction; if(Math.abs(delta.x) > 3||new Date().getTime() - this._drag.time > 300){ this._drag.target.one('click.owl.core', function(){ return false; }); }} if(!this.is('dragging')){ return; } this.leave('dragging'); this.trigger('dragged'); }; Owl.prototype.closest=function(coordinate, direction){ var position=-1, pull=30, width=this.width(), coordinates=this.coordinates(); if(!this.settings.freeDrag){ $.each(coordinates, $.proxy(function(index, value){ if(direction==='left'&&coordinate > value - pull&&coordinate < value + pull){ position=index; }else if(direction==='right'&&coordinate > value - width - pull&&coordinate < value - width + pull){ position=index + 1; }else if(this.op(coordinate, '<', value) && this.op(coordinate, '>', coordinates[index + 1]!==undefined ? coordinates[index + 1]:value - width)){ position=direction==='left' ? index + 1:index; } return position===-1; }, this)); } if(!this.settings.loop){ if(this.op(coordinate, '>', coordinates[this.minimum()])){ position=coordinate=this.minimum(); }else if(this.op(coordinate, '<', coordinates[this.maximum()])){ position=coordinate=this.maximum(); }} return position; }; Owl.prototype.animate=function(coordinate){ var animate=this.speed() > 0; this.is('animating')&&this.onTransitionEnd(); if(animate){ this.enter('animating'); this.trigger('translate'); } if($.support.transform3d&&$.support.transition){ this.$stage.css({ transform: 'translate3d(' + coordinate + 'px,0px,0px)', transition: (this.speed() / 1000) + 's' + ( this.settings.slideTransition ? ' ' + this.settings.slideTransition:'' ) }); }else if(animate){ this.$stage.animate({ left: coordinate + 'px' }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); }else{ this.$stage.css({ left: coordinate + 'px' }); }}; Owl.prototype.is=function(state){ return this._states.current[state]&&this._states.current[state] > 0; }; Owl.prototype.current=function(position){ if(position===undefined){ return this._current; } if(this._items.length===0){ return undefined; } position=this.normalize(position); if(this._current!==position){ var event=this.trigger('change', { property: { name: 'position', value: position }}); if(event.data!==undefined){ position=this.normalize(event.data); } this._current=position; this.invalidate('position'); this.trigger('changed', { property: { name: 'position', value: this._current }}); } return this._current; }; Owl.prototype.invalidate=function(part){ if($.type(part)==='string'){ this._invalidated[part]=true; this.is('valid')&&this.leave('valid'); } return $.map(this._invalidated, function(v, i){ return i }); }; Owl.prototype.reset=function(position){ position=this.normalize(position); if(position===undefined){ return; } this._speed=0; this._current=position; this.suppress([ 'translate', 'translated' ]); this.animate(this.coordinates(position)); this.release([ 'translate', 'translated' ]); }; Owl.prototype.normalize=function(position, relative){ var n=this._items.length, m=relative ? 0:this._clones.length; if(!this.isNumeric(position)||n < 1){ position=undefined; }else if(position < 0||position >=n + m){ position=((position - m / 2) % n + n) % n + m / 2; } return position; }; Owl.prototype.relative=function(position){ position -=this._clones.length / 2; return this.normalize(position, true); }; Owl.prototype.maximum=function(relative){ var settings=this.settings, maximum=this._coordinates.length, iterator, reciprocalItemsWidth, elementWidth; if(settings.loop){ maximum=this._clones.length / 2 + this._items.length - 1; }else if(settings.autoWidth||settings.merge){ iterator=this._items.length; if(iterator){ reciprocalItemsWidth=this._items[--iterator].width(); elementWidth=this.$element.width(); while (iterator--){ reciprocalItemsWidth +=this._items[iterator].width() + this.settings.margin; if(reciprocalItemsWidth > elementWidth){ break; }} } maximum=iterator + 1; }else if(settings.center){ maximum=this._items.length - 1; }else{ maximum=this._items.length - settings.items; } if(relative){ maximum -=this._clones.length / 2; } return Math.max(maximum, 0); }; Owl.prototype.minimum=function(relative){ return relative ? 0:this._clones.length / 2; }; Owl.prototype.items=function(position){ if(position===undefined){ return this._items.slice(); } position=this.normalize(position, true); return this._items[position]; }; Owl.prototype.mergers=function(position){ if(position===undefined){ return this._mergers.slice(); } position=this.normalize(position, true); return this._mergers[position]; }; Owl.prototype.clones=function(position){ var odd=this._clones.length / 2, even=odd + this._items.length, map=function(index){ return index % 2===0 ? even + index / 2:odd - (index + 1) / 2 }; if(position===undefined){ return $.map(this._clones, function(v, i){ return map(i) }); } return $.map(this._clones, function(v, i){ return v===position ? map(i):null }); }; Owl.prototype.speed=function(speed){ if(speed!==undefined){ this._speed=speed; } return this._speed; }; Owl.prototype.coordinates=function(position){ var multiplier=1, newPosition=position - 1, coordinate; if(position===undefined){ return $.map(this._coordinates, $.proxy(function(coordinate, index){ return this.coordinates(index); }, this)); } if(this.settings.center){ if(this.settings.rtl){ multiplier=-1; newPosition=position + 1; } coordinate=this._coordinates[position]; coordinate +=(this.width() - coordinate + (this._coordinates[newPosition]||0)) / 2 * multiplier; }else{ coordinate=this._coordinates[newPosition]||0; } coordinate=Math.ceil(coordinate); return coordinate; }; Owl.prototype.duration=function(from, to, factor){ if(factor===0){ return 0; } return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor||this.settings.smartSpeed)); }; Owl.prototype.to=function(position, speed){ var current=this.current(), revert=null, distance=position - this.relative(current), direction=(distance > 0) - (distance < 0), items=this._items.length, minimum=this.minimum(), maximum=this.maximum(); if(this.settings.loop){ if(!this.settings.rewind&&Math.abs(distance) > items / 2){ distance +=direction * -1 * items; } position=current + distance; revert=((position - minimum) % items + items) % items + minimum; if(revert!==position&&revert - distance <=maximum&&revert - distance > 0){ current=revert - distance; position=revert; this.reset(current); }}else if(this.settings.rewind){ maximum +=1; position=(position % maximum + maximum) % maximum; }else{ position=Math.max(minimum, Math.min(maximum, position)); } this.speed(this.duration(current, position, speed)); this.current(position); if(this.isVisible()){ this.update(); }}; Owl.prototype.next=function(speed){ speed=speed||false; this.to(this.relative(this.current()) + 1, speed); }; Owl.prototype.prev=function(speed){ speed=speed||false; this.to(this.relative(this.current()) - 1, speed); }; Owl.prototype.onTransitionEnd=function(event){ if(event!==undefined){ event.stopPropagation(); if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){ return false; }} this.leave('animating'); this.trigger('translated'); }; Owl.prototype.viewport=function(){ var width; if(this.options.responsiveBaseElement!==window){ width=$(this.options.responsiveBaseElement).width(); }else if(window.innerWidth){ width=window.innerWidth; }else if(document.documentElement&&document.documentElement.clientWidth){ width=document.documentElement.clientWidth; }else{ console.warn('Can not detect viewport width.'); } return width; }; Owl.prototype.replace=function(content){ this.$stage.empty(); this._items=[]; if(content){ content=(content instanceof jQuery) ? content:$(content); } if(this.settings.nestedItemSelector){ content=content.find('.' + this.settings.nestedItemSelector); } content.filter(function(){ return this.nodeType===1; }).each($.proxy(function(index, item){ item=this.prepare(item); this.$stage.append(item); this._items.push(item); this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }, this)); this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0); this.invalidate('items'); }; Owl.prototype.add=function(content, position){ var current=this.relative(this._current); position=position===undefined ? this._items.length:this.normalize(position, true); content=content instanceof jQuery ? content:$(content); this.trigger('add', { content: content, position: position }); content=this.prepare(content); if(this._items.length===0||position===this._items.length){ this._items.length===0&&this.$stage.append(content); this._items.length!==0&&this._items[position - 1].after(content); this._items.push(content); this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }else{ this._items[position].before(content); this._items.splice(position, 0, content); this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); } this._items[current]&&this.reset(this._items[current].index()); this.invalidate('items'); this.trigger('added', { content: content, position: position }); }; Owl.prototype.remove=function(position){ position=this.normalize(position, true); if(position===undefined){ return; } this.trigger('remove', { content: this._items[position], position: position }); this._items[position].remove(); this._items.splice(position, 1); this._mergers.splice(position, 1); this.invalidate('items'); this.trigger('removed', { content: null, position: position }); }; Owl.prototype.preloadAutoWidthImages=function(images){ images.each($.proxy(function(i, element){ this.enter('pre-loading'); element=$(element); $(new Image()).one('load', $.proxy(function(e){ element.attr('src', e.target.src); element.css('opacity', 1); this.leave('pre-loading'); !this.is('pre-loading')&&!this.is('initializing')&&this.refresh(); }, this)).attr('src', element.attr('src')||element.attr('data-src')||element.attr('data-src-retina')); }, this)); }; Owl.prototype.destroy=function(){ this.$element.off('.owl.core'); this.$stage.off('.owl.core'); $(document).off('.owl.core'); if(this.settings.responsive!==false){ window.clearTimeout(this.resizeTimer); this.off(window, 'resize', this._handlers.onThrottledResize); } for (var i in this._plugins){ this._plugins[i].destroy(); } this.$stage.children('.cloned').remove(); this.$stage.unwrap(); this.$stage.children().contents().unwrap(); this.$stage.children().unwrap(); this.$stage.remove(); this.$element .removeClass(this.options.refreshClass) .removeClass(this.options.loadingClass) .removeClass(this.options.loadedClass) .removeClass(this.options.rtlClass) .removeClass(this.options.dragClass) .removeClass(this.options.grabClass) .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) .removeData('owl.carousel'); }; Owl.prototype.op=function(a, o, b){ var rtl=this.settings.rtl; switch (o){ case '<': return rtl ? a > b:a < b; case '>': return rtl ? a < b:a > b; case '>=': return rtl ? a <=b:a >=b; case '<=': return rtl ? a >=b:a <=b; default: break; }}; Owl.prototype.on=function(element, event, listener, capture){ if(element.addEventListener){ element.addEventListener(event, listener, capture); }else if(element.attachEvent){ element.attachEvent('on' + event, listener); }}; Owl.prototype.off=function(element, event, listener, capture){ if(element.removeEventListener){ element.removeEventListener(event, listener, capture); }else if(element.detachEvent){ element.detachEvent('on' + event, listener); }}; Owl.prototype.trigger=function(name, data, namespace, state, enter){ var status={ item: { count: this._items.length, index: this.current() }}, handler=$.camelCase($.grep([ 'on', name, namespace ], function(v){ return v }) .join('-').toLowerCase() ), event=$.Event([ name, 'owl', namespace||'carousel' ].join('.').toLowerCase(), $.extend({ relatedTarget: this }, status, data) ); if(!this._supress[name]){ $.each(this._plugins, function(name, plugin){ if(plugin.onTrigger){ plugin.onTrigger(event); }}); this.register({ type: Owl.Type.Event, name: name }); this.$element.trigger(event); if(this.settings&&typeof this.settings[handler]==='function'){ this.settings[handler].call(this, event); }} return event; }; Owl.prototype.enter=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ if(this._states.current[name]===undefined){ this._states.current[name]=0; } this._states.current[name]++; }, this)); }; Owl.prototype.leave=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ this._states.current[name]--; }, this)); }; Owl.prototype.register=function(object){ if(object.type===Owl.Type.Event){ if(!$.event.special[object.name]){ $.event.special[object.name]={};} if(!$.event.special[object.name].owl){ var _default=$.event.special[object.name]._default; $.event.special[object.name]._default=function(e){ if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){ return _default.apply(this, arguments); } return e.namespace&&e.namespace.indexOf('owl') > -1; }; $.event.special[object.name].owl=true; }}else if(object.type===Owl.Type.State){ if(!this._states.tags[object.name]){ this._states.tags[object.name]=object.tags; }else{ this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags); } this._states.tags[object.name]=$.grep(this._states.tags[object.name], $.proxy(function(tag, i){ return $.inArray(tag, this._states.tags[object.name])===i; }, this)); }}; Owl.prototype.suppress=function(events){ $.each(events, $.proxy(function(index, event){ this._supress[event]=true; }, this)); }; Owl.prototype.release=function(events){ $.each(events, $.proxy(function(index, event){ delete this._supress[event]; }, this)); }; Owl.prototype.pointer=function(event){ var result={ x: null, y: null }; event=event.originalEvent||event||window.event; event=event.touches&&event.touches.length ? event.touches[0]:event.changedTouches&&event.changedTouches.length ? event.changedTouches[0]:event; if(event.pageX){ result.x=event.pageX; result.y=event.pageY; }else{ result.x=event.clientX; result.y=event.clientY; } return result; }; Owl.prototype.isNumeric=function(number){ return !isNaN(parseFloat(number)); }; Owl.prototype.difference=function(first, second){ return { x: first.x - second.x, y: first.y - second.y };}; $.fn.owlCarousel=function(option){ var args=Array.prototype.slice.call(arguments, 1); return this.each(function(){ var $this=$(this), data=$this.data('owl.carousel'); if(!data){ data=new Owl(this, typeof option=='object'&&option); $this.data('owl.carousel', data); $.each([ 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' ], function(i, event){ data.register({ type: Owl.Type.Event, name: event }); data.$element.on(event + '.owl.carousel.core', $.proxy(function(e){ if(e.namespace&&e.relatedTarget!==this){ this.suppress([ event ]); data[event].apply(this, [].slice.call(arguments, 1)); this.release([ event ]); }}, data)); }); } if(typeof option=='string'&&option.charAt(0)!=='_'){ data[option].apply(data, args); }}); }; $.fn.owlCarousel.Constructor=Owl; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoRefresh=function(carousel){ this._core=carousel; this._interval=null; this._visible=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoRefresh){ this.watch(); }}, this) }; this._core.options=$.extend({}, AutoRefresh.Defaults, this._core.options); this._core.$element.on(this._handlers); }; AutoRefresh.Defaults={ autoRefresh: true, autoRefreshInterval: 500 }; AutoRefresh.prototype.watch=function(){ if(this._interval){ return; } this._visible=this._core.isVisible(); this._interval=window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); }; AutoRefresh.prototype.refresh=function(){ if(this._core.isVisible()===this._visible){ return; } this._visible = !this._visible; this._core.$element.toggleClass('owl-hidden', !this._visible); this._visible&&(this._core.invalidate('width')&&this._core.refresh()); }; AutoRefresh.prototype.destroy=function(){ var handler, property; window.clearInterval(this._interval); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Lazy=function(carousel){ this._core=carousel; this._loaded=[]; this._handlers={ 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } if(!this._core.settings||!this._core.settings.lazyLoad){ return; } if((e.property&&e.property.name=='position')||e.type=='initialized'){ var settings=this._core.settings, n=(settings.center&&Math.ceil(settings.items / 2)||settings.items), i=((settings.center&&n * -1)||0), position=(e.property&&e.property.value!==undefined ? e.property.value:this._core.current()) + i, clones=this._core.clones().length, load=$.proxy(function(i, v){ this.load(v) }, this); if(settings.lazyLoadEager > 0){ n +=settings.lazyLoadEager; if(settings.loop){ position -=settings.lazyLoadEager; n++; }} while (i++ < n){ this.load(clones / 2 + this._core.relative(position)); clones&&$.each(this._core.clones(this._core.relative(position)), load); position++; }} }, this) }; this._core.options=$.extend({}, Lazy.Defaults, this._core.options); this._core.$element.on(this._handlers); }; Lazy.Defaults={ lazyLoad: false, lazyLoadEager: 0 }; Lazy.prototype.load=function(position){ var $item=this._core.$stage.children().eq(position), $elements=$item&&$item.find('.owl-lazy'); if(!$elements||$.inArray($item.get(0), this._loaded) > -1){ return; } $elements.each($.proxy(function(index, element){ var $element=$(element), image, url=(window.devicePixelRatio > 1&&$element.attr('data-src-retina'))||$element.attr('data-src')||$element.attr('data-srcset'); this._core.trigger('load', { element: $element, url: url }, 'lazy'); if($element.is('img')){ $element.one('load.owl.lazy', $.proxy(function(){ $element.css('opacity', 1); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('src', url); }else if($element.is('source')){ $element.one('load.owl.lazy', $.proxy(function(){ this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('srcset', url); }else{ image=new Image(); image.onload=$.proxy(function(){ $element.css({ 'background-image': 'url("' + url + '")', 'opacity': '1' }); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this); image.src=url; }}, this)); this._loaded.push($item.get(0)); }; Lazy.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this._core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoHeight=function(carousel){ this._core=carousel; this._previousHeight=null; this._handlers={ 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight){ this.update(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight&&e.property.name==='position'){ this.update(); }}, this), 'loaded.owl.lazy': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass).index()===this._core.current()){ this.update(); }}, this) }; this._core.options=$.extend({}, AutoHeight.Defaults, this._core.options); this._core.$element.on(this._handlers); this._intervalId=null; var refThis=this; $(window).on('load', function(){ if(refThis._core.settings.autoHeight){ refThis.update(); }}); $(window).resize(function(){ if(refThis._core.settings.autoHeight){ if(refThis._intervalId!=null){ clearTimeout(refThis._intervalId); } refThis._intervalId=setTimeout(function(){ refThis.update(); }, 250); }}); }; AutoHeight.Defaults={ autoHeight: false, autoHeightClass: 'owl-height' }; AutoHeight.prototype.update=function(){ var start=this._core._current, end=start + this._core.settings.items, lazyLoadEnabled=this._core.settings.lazyLoad, visible=this._core.$stage.children().toArray().slice(start, end), heights=[], maxheight=0; $.each(visible, function(index, item){ heights.push($(item).height()); }); maxheight=Math.max.apply(null, heights); if(maxheight <=1&&lazyLoadEnabled&&this._previousHeight){ maxheight=this._previousHeight; } this._previousHeight=maxheight; this._core.$stage.parent() .height(maxheight) .addClass(this._core.settings.autoHeightClass); }; AutoHeight.prototype.destroy=function(){ var handler, property; for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!=='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Video=function(carousel){ this._core=carousel; this._videos={}; this._playing=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace){ this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); }}, this), 'resize.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){ e.preventDefault(); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.is('resizing')){ this._core.$stage.find('.cloned .owl-video-frame').remove(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='position'&&this._playing){ this.stop(); }}, this), 'prepared.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } var $element=$(e.content).find('.owl-video'); if($element.length){ $element.css('display', 'none'); this.fetch($element, $(e.content)); }}, this) }; this._core.options=$.extend({}, Video.Defaults, this._core.options); this._core.$element.on(this._handlers); this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e){ this.play(e); }, this)); }; Video.Defaults={ video: false, videoHeight: false, videoWidth: false }; Video.prototype.fetch=function(target, item){ var type=(function(){ if(target.attr('data-vimeo-id')){ return 'vimeo'; }else if(target.attr('data-vzaar-id')){ return 'vzaar' }else{ return 'youtube'; }})(), id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'), width=target.attr('data-width')||this._core.settings.videoWidth, height=target.attr('data-height')||this._core.settings.videoHeight, url=target.attr('href'); if(url){ id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); if(id[3].indexOf('youtu') > -1){ type='youtube'; }else if(id[3].indexOf('vimeo') > -1){ type='vimeo'; }else if(id[3].indexOf('vzaar') > -1){ type='vzaar'; }else{ throw new Error('Video URL not supported.'); } id=id[6]; }else{ throw new Error('Missing video URL.'); } this._videos[url]={ type: type, id: id, width: width, height: height }; item.attr('data-video', url); this.thumbnail(target, this._videos[url]); }; Video.prototype.thumbnail=function(target, video){ var tnLink, icon, path, dimensions=video.width&&video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;':'', customTn=target.find('img'), srcType='src', lazyClass='', settings=this._core.settings, create=function(path){ icon='
'; if(settings.lazyLoad){ tnLink=$('
',{ "class": 'owl-video-tn ' + lazyClass, "srcType": path }); }else{ tnLink=$('
', { "class": "owl-video-tn", "style": 'opacity:1;background-image:url(' + path + ')' }); } target.after(tnLink); target.after(icon); }; target.wrap($('
', { "class": "owl-video-wrapper", "style": dimensions })); if(this._core.settings.lazyLoad){ srcType='data-src'; lazyClass='owl-lazy'; } if(customTn.length){ create(customTn.attr(srcType)); customTn.remove(); return false; } if(video.type==='youtube'){ path="//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; create(path); }else if(video.type==='vimeo'){ $.ajax({ type: 'GET', url: '//vimeo.com/api/v2/video/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data[0].thumbnail_large; create(path); }}); }else if(video.type==='vzaar'){ $.ajax({ type: 'GET', url: '//vzaar.com/api/videos/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data.framegrab_url; create(path); }}); }}; Video.prototype.stop=function(){ this._core.trigger('stop', null, 'video'); this._playing.find('.owl-video-frame').remove(); this._playing.removeClass('owl-video-playing'); this._playing=null; this._core.leave('playing'); this._core.trigger('stopped', null, 'video'); }; Video.prototype.play=function(event){ var target=$(event.target), item=target.closest('.' + this._core.settings.itemClass), video=this._videos[item.attr('data-video')], width=video.width||'100%', height=video.height||this._core.$stage.height(), html, iframe; if(this._playing){ return; } this._core.enter('playing'); this._core.trigger('play', null, 'video'); item=this._core.items(this._core.relative(item.index())); this._core.reset(item.index()); html=$(''); html.attr('height', height); html.attr('width', width); if(video.type==='youtube'){ html.attr('src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id); }else if(video.type==='vimeo'){ html.attr('src', '//player.vimeo.com/video/' + video.id + '?autoplay=1'); }else if(video.type==='vzaar'){ html.attr('src', '//view.vzaar.com/' + video.id + '/player?autoplay=true'); } iframe=$(html).wrap('
').insertAfter(item.find('.owl-video')); this._playing=item.addClass('owl-video-playing'); }; Video.prototype.isInFullScreen=function(){ var element=document.fullscreenElement||document.mozFullScreenElement || document.webkitFullscreenElement; return element&&$(element).parent().hasClass('owl-video-frame'); }; Video.prototype.destroy=function(){ var handler, property; this._core.$element.off('click.owl.video'); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Video=Video; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Animate=function(scope){ this.core=scope; this.core.options=$.extend({}, Animate.Defaults, this.core.options); this.swapping=true; this.previous=undefined; this.next=undefined; this.handlers={ 'change.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.previous=this.core.current(); this.next=e.property.value; }}, this), 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e){ if(e.namespace){ this.swapping=e.type=='translated'; }}, this), 'translate.owl.carousel': $.proxy(function(e){ if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){ this.swap(); }}, this) }; this.core.$element.on(this.handlers); }; Animate.Defaults={ animateOut: false, animateIn: false }; Animate.prototype.swap=function(){ if(this.core.settings.items!==1){ return; } if(!$.support.animation||!$.support.transition){ return; } this.core.speed(0); var left, clear=$.proxy(this.clear, this), previous=this.core.$stage.children().eq(this.previous), next=this.core.$stage.children().eq(this.next), incoming=this.core.settings.animateIn, outgoing=this.core.settings.animateOut; if(this.core.current()===this.previous){ return; } if(outgoing){ left=this.core.coordinates(this.previous) - this.core.coordinates(this.next); previous.one($.support.animation.end, clear) .css({ 'left': left + 'px' }) .addClass('animated owl-animated-out') .addClass(outgoing); } if(incoming){ next.one($.support.animation.end, clear) .addClass('animated owl-animated-in') .addClass(incoming); }}; Animate.prototype.clear=function(e){ $(e.target).css({ 'left': '' }) .removeClass('animated owl-animated-out owl-animated-in') .removeClass(this.core.settings.animateIn) .removeClass(this.core.settings.animateOut); this.core.onTransitionEnd(); }; Animate.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this.core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Animate=Animate; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Autoplay=function(carousel){ this._core=carousel; this._call=null; this._time=0; this._timeout=0; this._paused=true; this._handlers={ 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='settings'){ if(this._core.settings.autoplay){ this.play(); }else{ this.stop(); }}else if(e.namespace&&e.property.name==='position'&&this._paused){ this._time=0; }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoplay){ this.play(); }}, this), 'play.owl.autoplay': $.proxy(function(e, t, s){ if(e.namespace){ this.play(t, s); }}, this), 'stop.owl.autoplay': $.proxy(function(e){ if(e.namespace){ this.stop(); }}, this), 'mouseover.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'mouseleave.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.play(); }}, this), 'touchstart.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'touchend.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause){ this.play(); }}, this) }; this._core.$element.on(this._handlers); this._core.options=$.extend({}, Autoplay.Defaults, this._core.options); }; Autoplay.Defaults={ autoplay: false, autoplayTimeout: 5000, autoplayHoverPause: false, autoplaySpeed: false }; Autoplay.prototype._next=function(speed){ this._call=window.setTimeout($.proxy(this._next, this, speed), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read() ); if(this._core.is('interacting')||document.hidden){ return; } this._core.next(speed||this._core.settings.autoplaySpeed); } Autoplay.prototype.read=function(){ return new Date().getTime() - this._time; }; Autoplay.prototype.play=function(timeout, speed){ var elapsed; if(!this._core.is('rotating')){ this._core.enter('rotating'); } timeout=timeout||this._core.settings.autoplayTimeout; elapsed=Math.min(this._time % (this._timeout||timeout), timeout); if(this._paused){ this._time=this.read(); this._paused=false; }else{ window.clearTimeout(this._call); } this._time +=this.read() % timeout - elapsed; this._timeout=timeout; this._call=window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed); }; Autoplay.prototype.stop=function(){ if(this._core.is('rotating')){ this._time=0; this._paused=true; window.clearTimeout(this._call); this._core.leave('rotating'); }}; Autoplay.prototype.pause=function(){ if(this._core.is('rotating')&&!this._paused){ this._time=this.read(); this._paused=true; window.clearTimeout(this._call); }}; Autoplay.prototype.destroy=function(){ var handler, property; this.stop(); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ 'use strict'; var Navigation=function(carousel){ this._core=carousel; this._initialized=false; this._pages=[]; this._controls={}; this._templates=[]; this.$element=this._core.$element; this._overrides={ next: this._core.next, prev: this._core.prev, to: this._core.to }; this._handlers={ 'prepared.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.push('
' + $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
'); }}, this), 'added.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 0, this._templates.pop()); }}, this), 'remove.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 1); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.draw(); }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&!this._initialized){ this._core.trigger('initialize', null, 'navigation'); this.initialize(); this.update(); this.draw(); this._initialized=true; this._core.trigger('initialized', null, 'navigation'); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._initialized){ this._core.trigger('refresh', null, 'navigation'); this.update(); this.draw(); this._core.trigger('refreshed', null, 'navigation'); }}, this) }; this._core.options=$.extend({}, Navigation.Defaults, this._core.options); this.$element.on(this._handlers); }; Navigation.Defaults={ nav: false, navText: [ '', '' ], navSpeed: false, navElement: 'button type="button" role="presentation"', navContainer: false, navContainerClass: 'owl-nav', navClass: [ 'owl-prev', 'owl-next' ], slideBy: 1, dotClass: 'owl-dot', dotsClass: 'owl-dots', dots: true, dotsEach: false, dotsData: false, dotsSpeed: false, dotsContainer: false }; Navigation.prototype.initialize=function(){ var override, settings=this._core.settings; this._controls.$relative=(settings.navContainer ? $(settings.navContainer) : $('
').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); this._controls.$previous=$('<' + settings.navElement + '>') .addClass(settings.navClass[0]) .html(settings.navText[0]) .prependTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.prev(settings.navSpeed); }, this)); this._controls.$next=$('<' + settings.navElement + '>') .addClass(settings.navClass[1]) .html(settings.navText[1]) .appendTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.next(settings.navSpeed); }, this)); if(!settings.dotsData){ this._templates=[ $('
');var n=e.find(".dddwrapper"),l=e.find(".dddwrapper-layer");e.find(".dddwrapper-layertobggroup").appendTo(n),"carousel"==t[i].sliderType&&(a.ddd_shadow&&n.addClass("dddwrappershadow"),tpGS.gsap.set(n,{borderRadius:t[i].carousel.border_radius})),tpGS.gsap.set(e,{overflow:"visible",transformStyle:"preserve-3d",perspective:1600}),tpGS.gsap.set(n,{force3D:"auto",transformOrigin:"50% 50%",transformStyle:"preserve-3d",transformPerspective:1600}),tpGS.gsap.set(l,{force3D:"auto",transformOrigin:"50% 50%",zIndex:5,transformStyle:"flat",transformPerspective:1600}),tpGS.gsap.set(t[i].canvas,{transformStyle:"preserve-3d",transformPerspective:1600})}}(jQuery),function(e){"use strict";var t=jQuery.fn.revolution,i=t.is_mobile();jQuery.extend(!0,t,{animateSlide:function(e){return r(e)}});var a=function(e,i){var a;return void 0!==(a=Array.isArray(e)?e.length>=i?e[i]:e[e.length-1]:e)&&t.isNumeric(a)?parseInt(e,0):a},r=function(e){var r=e.id,l="arrow"==t[r].sc_indicator?void 0===t[r].sc_indicator_dir?t[r].sdir:t[r].sc_indicator_dir:t[r].sdir,d=!0===e.recall?jQuery.extend(!0,{},t[r].lastSliderTransition):function(e,i,a){var r="power1.in",o="power1.out",s="power1.inOut",n="power2.in",l="power2.out",d="power2.inOut",c="power3.inOut",p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],g=[17,18,19,20,21,22,23,24,25,27],u=0,m=1,h=0,f=[["boxslide",0,0,50,"box",!1,null,0,o,o,1e3,6],["boxrandomrotate",0,1,50,"box",!1,null,60,o,o,1e3,6],["boxfade",1,0,50,"box",!1,null,1,s,s,1e3,5],["slotslide-horizontal",2,0,0,"horizontal",!0,!1,2,d,d,1e3,3],["slotslide-vertical",3,0,0,"vertical",!0,!1,3,d,d,1e3,3],["curtain-1",4,3,0,"horizontal",!0,!0,4,o,o,900,5],["curtain-2",5,3,0,"horizontal",!0,!0,5,o,o,900,5],["curtain-3",6,3,25,"horizontal",!0,!0,6,o,o,900,5],["slotzoom-horizontal",7,0,0,"horizontal",!0,!0,7,o,o,1e3,7],["slotzoom-vertical",8,0,0,"vertical",!0,!0,8,l,l,1e3,8],["slotzoom-mixed",8,1,0,"vertical",!0,!0,59,l,l,1e3,8],["slotfade-horizontal",9,0,0,"horizontal",!0,null,9,d,d,1500,10],["slotfade-vertical",10,0,0,"vertical",!0,null,10,d,d,1500,10],["crossfade-horizontal",9,0,0,"horizontal",!0,null,9,d,d,1500,10],["crossfade-vertical",10,0,0,"vertical",!0,null,10,d,d,1500,10],["fade",11,0,1,"horizontal",!0,null,11,d,d,1e3,1],["crossfade",11,1,1,"horizontal",!0,null,11,d,d,1e3,1],["fadethroughdark",11,2,1,"horizontal",!0,null,11,d,d,1e3,1],["fadethroughlight",11,3,1,"horizontal",!0,null,11,d,d,1e3,1],["fadethroughtransparent",11,4,1,"horizontal",!0,null,11,d,d,1e3,1],["slideleft",12,0,1,"horizontal",!0,!0,12,c,c,1e3,1],["slideup",13,0,1,"horizontal",!0,!0,13,c,c,1e3,1],["slidedown",14,0,1,"horizontal",!0,!0,14,c,c,1e3,1],["slideright",15,0,1,"horizontal",!0,!0,15,c,c,1e3,1],["slideoverleft",12,7,1,"horizontal",!0,!0,12,c,c,1e3,1],["slideoverup",13,7,1,"horizontal",!0,!0,13,c,c,1e3,1],["slideoverdown",14,7,1,"horizontal",!0,!0,14,c,c,1e3,1],["slideoverright",15,7,1,"horizontal",!0,!0,15,c,c,1e3,1],["slideremoveleft",12,8,1,"horizontal",!0,!0,12,c,c,1e3,1],["slideremoveup",13,8,1,"horizontal",!0,!0,13,c,c,1e3,1],["slideremovedown",14,8,1,"horizontal",!0,!0,14,c,c,1e3,1],["slideremoveright",15,8,1,"horizontal",!0,!0,15,c,c,1e3,1],["papercut",16,0,0,"vertical",null,!0,16,c,c,1e3,2],["3dcurtain-horizontal",17,0,20,"vertical",!0,!0,17,s,s,2e3,7],["3dcurtain-vertical",18,0,10,"horizontal",!0,!0,18,s,s,2e3,7],["cubic",19,0,20,"horizontal",!1,!0,19,d,d,1e3,1],["cube",19,0,20,"horizontal",!1,!0,20,d,d,1e3,1],["flyin",20,0,4,"vertical",!1,!0,21,"power3.out",c,1e3,1],["turnoff",21,0,1,"horizontal",!1,!0,22,c,c,1e3,1],["incube",22,0,20,"horizontal",!1,!0,23,d,d,1e3,1],["cubic-horizontal",23,0,20,"vertical",!1,!0,24,d,d,1e3,1],["cube-horizontal",23,0,20,"vertical",!1,!0,25,d,d,1e3,1],["incube-horizontal",24,0,20,"vertical",!1,!0,26,d,d,1e3,1],["turnoff-vertical",25,0,1,"horizontal",!1,!0,27,d,d,1e3,1],["fadefromright",12,1,1,"horizontal",!0,!0,28,d,d,1e3,1],["fadefromleft",15,1,1,"horizontal",!0,!0,29,d,d,1e3,1],["fadefromtop",14,1,1,"horizontal",!0,!0,30,d,d,1e3,1],["fadefrombottom",13,1,1,"horizontal",!0,!0,31,d,d,1e3,1],["fadetoleftfadefromright",12,2,1,"horizontal",!0,!0,32,d,d,1e3,1],["fadetorightfadefromleft",15,2,1,"horizontal",!0,!0,33,d,d,1e3,1],["fadetobottomfadefromtop",14,2,1,"horizontal",!0,!0,34,d,d,1e3,1],["fadetotopfadefrombottom",13,2,1,"horizontal",!0,!0,35,d,d,1e3,1],["parallaxtoright",15,3,1,"horizontal",!0,!0,36,d,d,1500,1],["parallaxtoleft",12,3,1,"horizontal",!0,!0,37,d,d,1500,1],["parallaxtotop",14,3,1,"horizontal",!0,!0,38,d,d,1500,1],["parallaxtobottom",13,3,1,"horizontal",!0,!0,39,d,d,1500,1],["scaledownfromright",12,4,1,"horizontal",!0,!0,40,d,n,1e3,1],["scaledownfromleft",15,4,1,"horizontal",!0,!0,41,d,n,1e3,1],["scaledownfromtop",14,4,1,"horizontal",!0,!0,42,d,n,1e3,1],["scaledownfrombottom",13,4,1,"horizontal",!0,!0,43,d,n,1e3,1],["zoomout",13,5,1,"horizontal",!0,!0,44,d,d,1e3,1],["zoomin",13,6,1,"horizontal",!0,!0,45,d,d,1e3,1],["slidingoverlayup",27,0,1,"horizontal",!0,!0,47,s,o,2e3,1],["slidingoverlaydown",28,0,1,"horizontal",!0,!0,48,s,o,2e3,1],["slidingoverlayright",30,0,1,"horizontal",!0,!0,49,s,o,2e3,1],["slidingoverlayleft",29,0,1,"horizontal",!0,!0,50,s,o,2e3,1],["parallaxcirclesup",31,0,1,"horizontal",!0,!0,51,d,r,1500,1],["parallaxcirclesdown",32,0,1,"horizontal",!0,!0,52,d,r,1500,1],["parallaxcirclesright",33,0,1,"horizontal",!0,!0,53,d,r,1500,1],["parallaxcirclesleft",34,0,1,"horizontal",!0,!0,54,d,r,1500,1],["notransition",26,0,1,"horizontal",!0,null,46,d,n,1e3,1],["parallaxright",15,3,1,"horizontal",!0,!0,55,d,n,1500,1],["parallaxleft",12,3,1,"horizontal",!0,!0,56,d,n,1500,1],["parallaxup",14,3,1,"horizontal",!0,!0,57,d,r,1500,1],["parallaxdown",13,3,1,"horizontal",!0,!0,58,d,r,1500,1],["grayscale",11,5,1,"horizontal",!0,null,11,d,d,1e3,1],["grayscalecross",11,6,1,"horizontal",!0,null,11,d,d,1e3,1],["brightness",11,7,1,"horizontal",!0,null,11,d,d,1e3,1],["brightnesscross",11,8,1,"horizontal",!0,null,11,d,d,1e3,1],["blurlight",11,9,1,"horizontal",!0,null,11,d,d,1e3,1],["blurlightcross",11,10,1,"horizontal",!0,null,11,d,d,1e3,1],["blurstrong",11,9,1,"horizontal",!0,null,11,d,d,1e3,1],["blurstrongcross",11,10,1,"horizontal",!0,null,11,d,d,1e3,1]];return t[e].duringslidechange=!0,jQuery.each(["parallaxcircles","slidingoverlay","slide","slideover","slideremove","parallax","parralaxto"],function(e,t){i==t+"horizontal"&&(i=1!=a?t+"left":t+"right"),i==t+"vertical"&&(i=1!=a?t+"up":t+"down")}),"random"==i?i=Math.min(Math.round(Math.random()*(f.length-1)),f.length-1):"random-static"==i?i=p[Math.min(Math.round(Math.random()*p.length-1),p.length-1)]:"random-premium"==i&&(i=g[Math.min(Math.round(Math.random()*g.length-1),g.length-1)]),1==t[e].isJoomla&&null!=window.MooTools&&-1!=[12,13,14,15,16,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45].indexOf(i)&&(i=g[Math.max(0,Math.min(g.length-1,Math.round(Math.random()*(g.length-2))+1))]),jQuery.each(f,function(e,t){t[0]!=i&&t[7]!=i||(u=t[1],m=t[2],h=e)}),{nTR:u=Math.max(0,Math.min(30,u)),TR:f[h],trC:m}}(r,e.animation.transition[e.ntrid],l),c=t[r].pr_next_bg&&void 0!==t[r].pr_next_bg.data("panzoom")&&(d.nTR<11||17==d.nTR||18===d.nTR||d.nTR>=27&&d.nTR<=30)?11:d.nTR,p=!1,g=void 0!==t[r].pr_next_bg&&t[r].pr_next_bg.length>0&&void 0!==t[r].pr_next_bg[0],u=void 0!==t[r].pr_active_bg&&t[r].pr_active_bg.length>0&&void 0!==t[r].pr_active_bg[0];!0!==e.recall?(t[r].lastSliderAnimation=jQuery.extend(!0,{},e.animation),t[r].lastSliderTransition=jQuery.extend(!0,{},d)):e.animation=jQuery.extend(!0,{},t[r].lastSliderAnimation);var m=!0===e.recall?d.ntrid:e.ntrid||0,h=a(e.animation.masterspeed,m);if(h=(h="default"===h||"d"===h?d.TR[10]:"random"===h?Math.round(1e3*Math.random()+300):null!=h?parseInt(h,0):d.TR[10])>t[r].duration?t[r].duration:h,t[r].rotate=a(e.animation.rotate,m),t[r].rotate=null==t[r].rotate||"default"==t[r].rotate||"d"==t[r].rotate?0:999==t[r].rotate||"random"==t[r].rotate?Math.round(360*Math.random()):t[r].rotate,t[r].rotate=window._rs_ie||window._rs_ie9?0:t[r].rotate,(c<11||16===c||17===c||18===c||d.nTR>=27&&d.nTR<=30)&&(t[r].slots=a(e.animation.slotamount,m),t[r].slots=null==t[r].slots||"default"==t[r].slots||"d"==t[r].slots?d.TR[11]:"random"==t[r].slots?Math.round(12*Math.random()+4):t[r].slots,t[r].slots=t[r].slots<1?"boxslide"==d.TR[0]?Math.round(6*Math.random()+3):"boxslide"==d.TR[0]||"flyin"==d.TR[0]?Math.round(4*Math.random()+1):t[r].slots:t[r].slots,t[r].slots=(4==c||5==c||6==c)&&t[r].slots<3?3:t[r].slots,t[r].slots=0!=d.TR[3]?Math.min(t[r].slots,d.TR[3]):t[r].slots,t[r].slots=9==c?t[r].module.width/t[r].slots:10==c?t[r].module.height/t[r].slots:t[r].slots,t[r].slots=jQuery.inArray(c,[19,20,21,22,23,24,25,27])>=0?1:t[r].slots,t[r].slots=3!=c&&8!=c&&10!=c||"vertical"!==d.TR[4]?t[r].slots:t[r].slots+2,null!=d.TR[6]&&n(t[r].pr_active_bg,r,d.TR[6],d.TR[4]),null!=d.TR[5]&&n(t[r].pr_next_bg,r,d.TR[5],d.TR[4])),jQuery.inArray(c,[0,1,2,3,4,5,6,7,8,9,10,17,18,27,28,29,30])>=0){var f=t[r].pr_next_bg.find("rs-bgvideo");f.length>0&&(p=!0,t[r].mtl.add(tpGS.gsap.set(f,{zIndex:0,display:"none"}),0),setTimeout(function(){void 0!==t[r].videoIsPlaying&&t[r].videoIsPlaying.length>0&&t[r].videoIsPlaying[0].id==f[0].id&&t.stopVideo(f,r)},h>50?50:h-20),setTimeout(function(){void 0!==t[r].videoIsPlaying&&t[r].videoIsPlaying.length>0&&t[r].videoIsPlaying[0].id==f[0].id&&t.stopVideo(f,r)},h>100?100:h-10))}var v=7===c||16===c||8===c?0:1,y=c<11||17===c||18===c?0:1;if(g){var b=t[r].pr_next_bg.find("rs-sbg");void 0!==b[0]&&t[r].mtl.add(tpGS.gsap.set(b,{scale:1,rotationX:0,rotationY:0,rotationZ:0,z:0,x:0,y:0,clearProps:"filter, transform",opacity:y}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_bg,{transformOrigin:"50% 50% 0",transformPerspective:600,scale:1,rotationX:0,rotationY:0,rotationZ:0,z:t[r].parZ?t[r].parZ:0,autoAlpha:1,x:0,y:0,clearProps:"filter, transform"}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_bg.parent(),{backgroundColor:"transparent"}),0)}if(u){var w=t[r].pr_active_bg.find("rs-sbg");void 0!==w[0]&&t[r].mtl.add(tpGS.gsap.set(w,{scale:1,rotationX:0,rotationY:0,rotationZ:0,z:0,x:0,y:0,clearProps:"filter, transform",opacity:v}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_bg,{transformOrigin:"50% 50% 0",transformPerspective:600,scale:1,rotationX:0,rotationY:0,rotationZ:0,z:0,autoAlpha:1,x:0,y:0,clearProps:"filter, transform"}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_bg.parent(),{backgroundColor:"transparent"}),0)}var _=a(e.animation.easein,m),x=a(e.animation.easeout,m);if(_="default"===_||"d"===_?d.TR[8]||"power2.inOut":_||d.TR[8]||"power2.inOut",x="default"===x||"d"===x?d.TR[9]||"power2.inOut":x||d.TR[9]||"power2.inOut",requestAnimationFrame(function(){t.generalObserver(i,!0)}),c>=31){var k={canvas:t[r].pr_next_bg[0].getElementsByClassName("bgcanvas")[0]};if(k.ctx=k.canvas.getContext("2d"),k.oBG_next=t.getByTag(t[r].pr_next_bg[0],"rs-sbg")[0],k.img_next=t.getLoadObj(r,t.gA(k.oBG_next,"src-rs-ref")),k.col_next=t.gA(k.oBG_next,"bgcolor"),u&&(k.oBG_act=t.getByTag(t[r].pr_active_bg[0],"rs-sbg")[0],k.img_act=t.getLoadObj(r,t.gA(k.oBG_act,"src-rs-ref")),k.col_act=t.gA(k.oBG_act,"bgcolor")),k.ctx.clearRect(0,0,k.canvas.width,k.canvas.height),k.canvas.width=t[r].module.width,k.canvas.height=t[r].module.height,k.canvas.style.background="transparent",k.canvas.style.display="block",k.oBG_next.style.display="none",void 0!==k.col_next&&k.col_next.indexOf("gradient")>=0&&(k.col_next="transparent"),void 0!==k.col_act&&k.col_act.indexOf("gradient")>=0&&(k.col_act="transparent"),31===c){for(var S="transparent"!==k.col_next&&void 0!==k.col_next?{x:0,y:0,width:t[r].module.width,height:t[r].module.height}:o("contain"===k.oBG_next.style.backgroundSize,t[r].module.width,t[r].module.height,k.img_next.width,k.img_next.height),L=void 0===k.oBG_act?void 0:"transparent"!==k.col_act&&void 0!==k.col_act?{x:0,y:0,width:t[r].module.width,height:t[r].module.height}:o("contain"===k.oBG_act.style.backgroundSize,t[r].module.width,t[r].module.height,k.img_act.width,k.img_act.height),T=t[r].module.width/t[r].slots,R=T/2,O=t[r].module.height,A=[],I=0;It[r].slots/2?t[r].slots-e:e,a=(5!==c?i:t[r].slots-i)*(B/t[r].slots)/(6===c?1.3:1);P.add(tpGS.gsap.to(this,B,{transformPerspective:600,force3D:"auto",y:1!==l?t[r].module.height:-t[r].module.height,opacity:.75,rotation:t[r].rotate,ease:_,delay:a}),0),t[r].mtl.add(P,0)}),t[r].pr_next_bg.find(".slotslide").each(function(e){var i=6!==c?e:e>t[r].slots/2?t[r].slots-e:e,a=(5!==c?i:t[r].slots-i)*(B/t[r].slots)/(6===c?1.3:1);P.add(tpGS.gsap.from(this,B,{y:1==l?t[r].module.height:-t[r].module.height,opacity:.75,rotation:t[r].rotate,force3D:"auto",ease:x,delay:a}),0),t[r].mtl.add(P,0)})}else if(7==c||8==c)h=Math.min(t[r].duration||h,h),t[r].pr_active_bg.find(".slotslide").each(function(e){var i=e>t[r].slots/2?t[r].slots-e:e;t[r].mtl.add(tpGS.gsap.to(t.getByTag(this,"div"),h/1e3,{x:8===c&&0===d.trC?0:i*t[r].slotw/3,y:8===c&&0===d.trC?i*t[r].sloth/3:0,ease:_,transformPerspective:600,force3D:"auto",filter:"blur(2px)",scale:1.2,opacity:0}),0)}),t[r].pr_next_bg.find(".slotslide").each(function(e){var i=e>t[r].slots/2?t[r].slots-e:e;t[r].mtl.add(tpGS.gsap.fromTo(t.getByTag(this,"div"),h/1e3,{x:8===c&&0===d.trC?0:0-i*t[r].slotw/3,y:8===c&&0===d.trC?0-i*t[r].sloth/3:0,filter:"blur(2px)",opacity:0,transformPerspective:600,scale:1.2},{x:0,y:0,ease:x,force3D:"auto",scale:1,filter:"blur(0px)",opacity:1,rotation:0}),0)});else if(9==c||10==c){var M=t[r].pr_next_bg[0].getElementsByClassName("slotslide"),G=h-h/1.8;for(I=0;I=0?5:jQuery.inArray(d.trC,[11,12])>=0?10:0)+"px) grayscale("+(jQuery.inArray(d.trC,[5,6,7,8])>=0?100:0)+"%) brightness("+(jQuery.inArray(d.trC,[7,8])>=0?300:0)+"%)",H="blur(0px) grayscale(0%) brightness(100%)";g&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,h/1e3,{autoAlpha:0,filter:N,"-webkit-filter":N},{autoAlpha:1,filter:H,"-webkit-filter":H,force3D:"auto",ease:_}),0),jQuery.inArray(d.trC,[6,8,10])>=0&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/1e3,{autoAlpha:1,filter:H,"-webkit-filter":H},{autoAlpha:0,force3D:"auto",ease:_,filter:N,"-webkit-filter":N}),0)}t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_bg.find("rs-sbg"),{autoAlpha:1}),0),u&&t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_bg.find("rs-sbg"),{autoAlpha:1}),0)}else if(12==c||13==c||14==c||15==c){var W=3==d.trC?h/1300:h/1e3,F=h/1e3,j=5==d.trC||6==d.trC?0:t[r].module.width,E=5==d.trC||6==d.trC?0:t[r].module.height,V=12==c?j:15==c?0-j:0,Y=13==c?5==d.trC||6==d.trC?0:t[r].module.height:14==c?5==d.trC||6==d.trC?0:0-t[r].module.height:0,Q=1==d.trC||2==d.trC||5==d.trC||6==d.trC?0:1,X=4==d.trC||5==d.trC?.6:6==d.trC?1.4:1,J=5==d.trC?1.4:6==d.trC?.6:1;if(7!=d.trC&&4!=d.trC||(j=0,E=0),8==d.trC?(t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_slide,{zIndex:20}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_slide,{zIndex:15}),0),t[r].mtl.add(tpGS.gsap.to(t[r].pr_next_bg,.01,{overflow:"hidden",x:0,y:0,scale:1,autoAlpha:1,rotation:0,overwrite:!0,immediateRender:!0,force3D:"auto"}),0)):(void 0!==t[r].pr_active_slide&&t[r].pr_active_slide.length>0&&t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_slide,{zIndex:15}),0),void 0!==t[r].pr_next_slide&&t[r].pr_next_slide.length>0&&t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_slide,{zIndex:20}),0),g&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,W,{x:V,y:Y,overflow:"hidden",scale:J,autoAlpha:Q,rotation:t[r].rotate},{autoAlpha:1,x:0,y:0,scale:1,rotation:0,ease:_,force3D:"auto"}),0)),1!=d.trC)switch(c){case 12:u&&t[r].mtl.add(tpGS.gsap.to(t[r].pr_active_bg,F,{x:0-j+"px",overflow:"hidden",force3D:"auto",scale:X,autoAlpha:Q,rotation:t[r].rotate,ease:x}),0);break;case 15:u&&t[r].mtl.add(tpGS.gsap.to(t[r].pr_active_bg,F,{x:j+"px",overflow:"hidden",force3D:"auto",scale:X,autoAlpha:Q,rotation:t[r].rotate,ease:x}),0);break;case 13:u&&t[r].mtl.add(tpGS.gsap.to(t[r].pr_active_bg,F,{y:0-E+"px",overflow:"hidden",force3D:"auto",scale:X,autoAlpha:Q,rotation:t[r].rotate,ease:x}),0);break;case 14:u&&t[r].mtl.add(tpGS.gsap.to(t[r].pr_active_bg,F,{y:E+"px",overflow:"hidden",force3D:"auto",scale:X,autoAlpha:Q,rotation:t[r].rotate,ease:x}),0)}}else if(16==c){var q=1===l?"80% 50% 0":"20% 50% 0";t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_slide,{zIndex:20}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_slide,{zIndex:15}),0),t[r].pr_active_bg.find(".slotslide").each(function(e){t[r].mtl.add(tpGS.gsap.fromTo(this,h/1e3,{x:0,rotationZ:0,opacity:1,y:0,z:0,scale:1},{opacity:1,x:1===l?0==e?-t[r].module.width/1.6:-t[r].module.width/1.8:0===e?t[r].module.width/1.6:t[r].module.width/1.8,rotationZ:1===l?0===e?-35:25:0===e?25:-35,z:0,y:0==e?"-120%":"140%",scale:.8,force3D:"auto",transformPerspective:600,transformOrigin:q,delay:0,ease:_}),0),t[r].mtl.add(tpGS.gsap.fromTo(this,h/2e3,{opacity:1},{opacity:0,delay:h/2e3}),0)}),g&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,h/1e3-h/7e3,{x:100*Math.random()-50,opacity:1,scale:.9,rotationZ:10*Math.random()-5},{x:0,opacity:1,scale:1,rotationZ:0,ease:_,force3D:"auto",delay:h/7e3}),0)}else if(17==c||18==c)t[r].pr_next_bg.find(".slotslide").each(function(e){t[r].mtl.add(tpGS.gsap.fromTo(this,h/t[r].slots/1e3,{opacity:0,y:0,x:0,rotationY:17===c?0:90,scale:1,rotationX:17===c?-90:0,force3D:"auto",transformPerspective:600,transformOrigin:17===c?"top center":"center left"},{opacity:1,y:0,x:0,rotationX:0,rotationY:0,force3D:"auto",ease:x,delay:e*(h/t[r].slots/2e3)}),0)}),t[r].pr_active_bg.find(".slotslide").each(function(e){t[r].mtl.add(tpGS.gsap.fromTo(this,h/t[r].slots/1e3,{opacity:1,rotationY:0,scale:1,rotationX:0,force3D:"auto",transformPerspective:600,transformOrigin:17===c?"bottom center":"center right"},{opacity:0,rotationX:17===c?110:0,rotationY:17===c?0:110,force3D:"auto",ease:_,delay:e*(h/t[r].slots/2e3)}),0)});else if(19==c||22==c||23==c||24==c){t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_slide,{zIndex:20}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_slide,{zIndex:10}),0);q=19===c?"center center -"+t[r].module.height/2:22===c?"center center "+t[r].module.height/2:23===c?"center center -"+t[r].module.width/2:"center center "+t[r].module.width/2;var U=[];tpGS.gsap.set(t[r].c,{transformStyle:"flat",backfaceVisibility:"hidden",transformPerspective:600}),g&&(U.push(t[r].pr_next_bg),t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,h/1e3,{rotationX:19==c||22===c?1==l?-90:90:0,rotationY:23==c||24===c?1==l?-90:90:0,x:0,scale:1,y:0,overflow:"hidden",autoAlpha:1,transformStyle:"flat",backfaceVisibility:"hidden",force3D:"auto",transformPerspective:1200,transformOrigin:q},{overflow:"hidden",x:0,autoAlpha:1,rotationX:0,rotationY:0,y:0,scale:1,delay:0,ease:_,transformStyle:"flat",backfaceVisibility:"hidden",force3D:"auto",transformPerspective:1200,transformOrigin:q}),0),t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,h/2e3,{z:19==c||23===c?-200:0},{z:19===c||23===c?0:-200,ease:"power3.inOut",delay:19===c||23===c?h/2e3:0}),0)),22!==c&&24!==c||(u&&U.push(t[r].pr_active_bg),t[r].mtl.add(tpGS.gsap.fromTo(U,h/2e3,{z:-200},{z:0,ease:"power2.in",delay:h/2e3}),0)),u&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/2e3,{z:0},{z:-200,ease:"power3.inOut",delay:0,force3D:"auto"}),0),!u||19!==c&&23!==c||t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/2e3,{autoAlpha:1},{autoAlpha:0,ease:"none",delay:h/2e3,force3D:"auto"}),0),u&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/1e3,{overflow:"hidden",rotationX:0,rotationY:0,rotationZ:0,y:0,x:0,scale:1,transformStyle:"flat",backfaceVisibility:"hidden",force3D:"auto",transformPerspective:1200,transformOrigin:q},{rotationX:19===c||22===c?1==l?90:-90:0,rotationY:23===c||24===c?1==l?90:-90:0,overflow:"hidden",y:0,scale:1,delay:0,force3D:"auto",ease:_,transformStyle:"flat",backfaceVisibility:"hidden",transformPerspective:1200,transformOrigin:q}),0)}else if(20==c){q=1===l?"20% ":"80% ";q+="60% -50%",g&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,h/1e3,{x:1===l?-t[r].module.width:t[r].module.width,rotationX:20,z:-t[r].module.width,autoAlpha:0,y:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:q,rotationY:1===l?50:-50},{x:0,rotationX:0,autoAlpha:1,y:0,z:0,scale:1,rotationY:0,delay:0,ease:_}),0),q=1!=l?"20% ":"80% ",q+="60% -50%",t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/1e3,{autoAlpha:1,rotationX:0,y:0,z:0,scale:1,x:0,force3D:"auto",transformPerspective:600,transformOrigin:q,rotationY:0},{autoAlpha:1,rotationX:20,y:0,z:-t[r].module.width,x:1!=l?-t[r].module.width/1.2:t[r].module.width/1.2,force3D:"auto",rotationY:1===l?-50:50,delay:0,ease:"power2.inOut"}),0)}else if(21==c||25==c){var Z=25===c?t[r].rotate:1===l?90:-90,K=25===c?1===l?-90:90:t[r].rotate;q=1===l?25===c?"center top 0":"left center 0":25===c?"center bottom 0":"right center 0";g&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,h/1e3,{transformStyle:"flat",rotationX:K,y:0,x:0,autoAlpha:0,force3D:"auto",transformPerspective:1200,transformOrigin:q,rotationY:Z},{autoAlpha:1,rotationX:0,rotationY:0,ease:_}),0),q=1===l?25===c?"center bottom 0":"right center 0":25===c?"center top 0":"left center 0",Z=25!==c?-Z:Z,K=25!==c?K:-K,t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/1e3,{rotationX:0,rotationY:0,transformStyle:"flat",transformPerspective:1200,force3D:"auto"},{immediateRender:!0,rotationX:K,transformOrigin:q,rotationY:Z,ease:x}),0)}else if(26==c)h=0,g&&(t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg,.001,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:_}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_next_bg.find("rs-sbg"),{autoAlpha:1}),0)),u&&(t[r].mtl.add(tpGS.gsap.to(t[r].pr_active_bg,.001,{autoAlpha:0,force3D:"auto",ease:_}),0),t[r].mtl.add(tpGS.gsap.set(t[r].pr_active_bg.find("rs-sbg"),{autoAlpha:1}),0));else if(27==c||28==c||29==c||30==c){var $=t[r].pr_next_bg.find(".slot"),ee=27==c||29==c?"-100%":"100%",te=27==c||29==c?"100%":"-100%",ie=27==c||29==c?"-80%":"80%",ae=27==c||29==c?"80%":"-80%",re=27==c||29==c?"10%":"-10%",oe={overwrite:"all"},se={autoAlpha:0,zIndex:1,force3D:"auto",ease:_},ne={position:"inherit",autoAlpha:0,overwrite:"all",zIndex:1},le={autoAlpha:1,force3D:"auto",ease:x},de={overwrite:"all",zIndex:2,opacity:1,autoAlpha:1},ce={autoAlpha:1,force3D:"auto",overwrite:"all",ease:_},pe={overwrite:"all",zIndex:2,autoAlpha:1},ge={autoAlpha:1,force3D:"auto",ease:_},ue=1==(27==c||28==c?1:2)?"y":"x";oe[ue]="0%",se[ue]=ee,ne[ue]=re,le[ue]=0,de[ue]=te,ce[ue]=ee,pe[ue]=ie,ge[ue]=ae,$.append(''),u&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_active_bg,h/1e3,oe,se),0),g&&t[r].mtl.add(tpGS.gsap.fromTo(t[r].pr_next_bg.find("rs-sbg"),h/2e3,ne,le),h/2e3),t[r].mtl.add(tpGS.gsap.fromTo($,h/1e3,de,ce),0),t[r].mtl.add(tpGS.gsap.fromTo($.find(".slotslide div"),h/1e3,pe,ge),0)}p&&f.length>0&&t[r].mtl.add(tpGS.gsap.set(f,{zIndex:30,display:"block",onComplete:function(){t.playVideo(f,r)}}))},o=function(e,t,i,a,r){var o=a/r,s=t/i,n=t,l=i;return(e?o>s:o=0?"background:"+m:"background-color:"+m+";background-image:url("+d+");background-repeat:"+f+";background-size:"+h+";background-position:"+v,b="";g=null==g?0:g;var w=e[0].parentNode;if(e.detach(),e.find(".slot").each(function(){jQuery(this).remove()}),"box"===r)for(var _=0,x=0,k=0;k
',x+=t[i].sloth;_+=t[i].slotw}else if("horizontal"===r){if(!a)u=0-t[i].slotw;for(S=0;S
'}if("vertical"===r){if(!a)u=0-t[i].sloth;for(S=0;S
'}e.append(b),w.appendChild(e[0])}}}(jQuery),function(e){"use strict";var t=jQuery.fn.revolution,i=t.is_mobile();t.is_android();function a(e){return null==e?-1:t.isNumeric(e)?e:e.split(":").length>1?60*parseInt(e.split(":")[0],0)+parseInt(e.split(":")[1],0):e}jQuery.extend(!0,t,{preLoadAudio:function(e,i){t[i].videos=void 0===t[i].videos?{}:t[i].videos,e.find(".rs-layer-audio").each(function(){var a=jQuery(this),r=t[i].videos[a[0].id]=void 0===t[i].videos[a[0].id]?v(a.data(),"audio",t.gA(e[0],"key")):t[i].videos[a[0].id],o={};0===a.find("audio").length&&(o.src=null!=r.mp4?r.mp4:"",o.pre=r.pload||"",this.id=void 0===this.id||""===this.id?a.attr("audio-layer-"+Math.round(199999*Math.random())):this.id,o.id=this.id,o.status="prepared",o.start=jQuery.now(),o.waittime=void 0!==r.ploadwait?1e3*r.ploadwait:5e3,"auto"!=o.pre&&"canplaythrough"!=o.pre&&"canplay"!=o.pre&&"progress"!=o.pre||(void 0===t[i].audioqueue&&(t[i].audioqueue=[]),t[i].audioqueue.push(o),t.manageVideoLayer(a,i,t.gA(e[0],"key"))))})},preLoadAudioDone:function(e,i,a){var r=t[i].videos[e[0].id];t[i].audioqueue&&t[i].audioqueue.length>0&&jQuery.each(t[i].audioqueue,function(e,t){r.mp4!==t.src||t.pre!==a&&"auto"!==t.pre||(t.status="loaded")})},resetVideo:function(e,a,r,o){var s=t[a].videos[e[0].id];switch(s.type){case"youtube":s.rwd&&null!=s.player&&void 0!==s.player.seekTo&&(s.player.seekTo(-1==s.ssec?0:s.ssec),s.player.pauseVideo()),0!=e.find("rs-poster").length||s.bgvideo||"preset"===r||tpGS.gsap.to(e.find("iframe"),.3,{opacity:1,display:"block",ease:"power3.inOut"});break;case"vimeo":void 0!==s.vimeoplayer&&!o&&s.rwd&&(0!==s.ssec&&-1!==s.ssec||s.bgvideo||e.find("rs-poster").length>0)&&(s.vimeoplayer.setCurrentTime(-1==s.ssec?0:s.ssec),s.vimeoplayer.pause()),0!=e.find("rs-poster").length||s.bgvideo||"preset"===r||tpGS.gsap.to(e.find("iframe"),.3,{opacity:1,display:"block",ease:"power3.inOut"});break;case"html5":if(i&&s.notonmobile)return!1;tpGS.gsap.to(s.jvideo,.3,{opacity:1,display:"block",ease:"power3.inOut"}),!s.rwd||e.hasClass("videoisplaying")||isNaN(s.video.duration)||(s.justReseted=!0,s.video.currentTime=-1==s.ssec?0:s.ssec),("mute"==s.volume||t.lastToggleState(e.videomutetoggledby)||!0===t[a].globalmute)&&(s.video.muted=!0)}},Mute:function(e,i,a){var r=!1,o=t[i].videos[e[0].id];switch(o.type){case"youtube":o.player&&(!0===a&&o.player.mute(),!1===a&&l(o,parseInt(o.volcache,0)),r=o.player.isMuted());break;case"vimeo":o.volcachecheck||(o.volcache=o.volcache>1?o.volcache/100:o.volcache,o.volcachecheck=!0),o.volume=!0===a?"mute":!1===a?o.volcache:o.volume,void 0!==a&&null!=o.vimeoplayer&&n(o,!0===a?0:o.volcache),r="mute"==o.volume||0===o.volume;break;case"html5":o.volcachecheck||(o.volcache=o.volcache>1?o.volcache/100:o.volcache,o.volcachecheck=!0),o.video.volume=o.volcache,void 0!==a&&o.video&&(o.video.muted=a),r=void 0!==o.video?o.video.muted:r}if(void 0===a)return r},stopVideo:function(e,i){if(void 0!==t[i]&&void 0!==t[i]){var a=t[i].videos[e[0].id];if(void 0!==a)switch(t[i].leaveViewPortBasedStop||(t[i].lastplayedvideos=[]),t[i].leaveViewPortBasedStop=!1,a.type){case"youtube":if(void 0===a.player||2===a.player.getPlayerState()||5===a.player.getPlayerState())return;a.player.pauseVideo(),a.youtubepausecalled=!0,setTimeout(function(){a.youtubepausecalled=!1},80);break;case"vimeo":if(void 0===a.vimeoplayer)return;a.vimeoplayer.pause(),a.vimeopausecalled=!0,setTimeout(function(){a.vimeopausecalled=!1},80);break;case"html5":a.video&&a.video.pause()}}},playVideo:function(e,i){var a=t[i].videos[e[0].id];switch(clearTimeout(a.videoplaywait),a.type){case"youtube":if(0==e.find("iframe").length)e.append(a.videomarkup),u(e,i,!0);else if(null!=a.player.playVideo){var o=a.player.getCurrentTime();a.nseTriggered&&(o=-1,a.nseTriggered=!1),-1!=a.ssec&&a.ssec>o&&a.player.seekTo(a.ssec),!0!==a.youtubepausecalled&&p(a)}else a.videoplaywait=setTimeout(function(){!0!==a.youtubepausecalled&&t.playVideo(e,i)},50);break;case"vimeo":0==e.find("iframe").length?(delete a.vimeoplayer,e.append(a.videomarkup),u(e,i,!0)):e.hasClass("rs-apiready")?(a.vimeoplayer=null==a.vimeoplayer?new Vimeo.Player(e.find("iframe").attr("id")):a.vimeoplayer,a.vimeoplayer.getPaused()?setTimeout(function(){var r=void 0===a.currenttime?0:a.currenttime;a.nseTriggered&&(r=-1,a.nseTriggered=!1),-1!=a.ssec&&a.ssec>r&&a.vimeoplayer.setCurrentTime(a.ssec),("mute"==a.volume||0===a.volume||t.lastToggleState(e.data("videomutetoggledby"))||!0===t[i].globalmute)&&(a.volumetoken=!0,a.vimeoplayer.setVolume(0)),c(a.vimeoplayer)},510):a.videoplaywait=setTimeout(function(){!0!==a.vimeopausecalled&&t.playVideo(e,i)},50)):a.videoplaywait=setTimeout(function(){!0!==a.vimeopausecalled&&t.playVideo(e,i)},100);break;case"html5":if(a.metaloaded){d(a.video);o=a.video.currentTime;a.nseTriggered&&(o=-1,a.nseTriggered=!1),window._video=a.video,-1!=a.ssec&&a.ssec>o&&(a.video.currentTime=a.ssec)}else r(a.video,"loadedmetadata",function(e){t.resetVideo(e,i),a.video.play();var r=a.video.currentTime;a.nseTriggered&&(r=-1,a.nseTriggered=!1),-1!=a.ssec&&a.ssec>r&&(a.video.currentTime=a.ssec)}(e))}},isVideoPlaying:function(e,i){var a=!1;return null!=t[i].playingvideos&&jQuery.each(t[i].playingvideos,function(t,i){e.attr("id")==i.attr("id")&&(a=!0)}),a},removeMediaFromList:function(e,t){b(e,t)},prepareCoveredVideo:function(e){clearTimeout(t[e].resizePrepareCoverVideolistener);var i="carousel"===t[e].sliderType?t[e].carousel.justify?void 0===t[e].carousel.slide_widths?void 0:t[e].carousel.slide_widths[t[e].carousel.focused]:t[e].carousel.slide_width:t[e].canv.width,a="carousel"===t[e].sliderType?t[e].carousel.slide_height:t[e].canv.height;if(0!==i&&0!==a&&void 0!==i&&void 0!==a)for(var r in t[e].videos){var o=t[e].videos[r];if((o.bgvideo||o.fcover)&&("html5"===o.type&&void 0!==o.jvideo&&tpGS.gsap.set(o.jvideo,{width:i}),void 0===t[e].activeRSSlide||o.slideid===t.gA(t[e].slides[t[e].activeRSSlide],"key")||void 0===t[e].pr_next_slide||o.slideid===t.gA(t[e].pr_next_slide[0],"key"))){o.vd=o.ratio.split(":").length>1?o.ratio.split(":")[0]/o.ratio.split(":")[1]:1;var s=i/a,n=s/o.vd*100,l=o.vd/s*100;"Edge"===t.get_browser()||"IE"===t.get_browser()?(o.ifr=void 0===o.ifr?o.video:o.ifr,s>o.vd?tpGS.gsap.set(o.ifr,{minWidth:"100%",height:n+"%",x:"-50%",y:"-50%",top:"50%",left:"50%",position:"absolute"}):tpGS.gsap.set(o.ifr,{minHeight:"100%",width:l+"%",x:"-50%",y:"-50%",top:"50%",left:"50%",position:"absolute"})):s>o.vd?tpGS.gsap.set(o.ifr,{height:n+"%",width:"100%",top:-(n-100)/2+"%",left:"0px",position:"absolute"}):tpGS.gsap.set(o.ifr,{width:l+"%",height:"100%",left:-(l-100)/2+"%",top:"0px",position:"absolute"})}}else t[e].resizePrepareCoverVideolistener=setTimeout(function(){t.prepareCoveredVideo(e)},100)},checkVideoApis:function(e,i){location.protocol;if(!t[i].youtubeapineeded&&((null!=e.data("ytid")||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(t[i].youtubeapineeded=!0),t[i].youtubeapineeded&&!window.rs_addedyt)){t[i].youtubestarttime=jQuery.now(),window.rs_addedyt=!0;var a=document.createElement("script"),r=t.getByTag(document,"script")[0],o=!0;a.src="https://www.youtube.com/iframe_api",jQuery("head").find("*").each(function(){"https://www.youtube.com/iframe_api"==jQuery(this).attr("src")&&(o=!1)}),o&&r.parentNode.insertBefore(a,r)}if(!t[i].vimeoapineeded&&((null!=e.data("vimeoid")||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(t[i].vimeoapineeded=!0),t[i].vimeoapineeded&&!window.rs_addedvim)){t[i].vimeostarttime=jQuery.now(),window.rs_addedvim=!0;var s=document.createElement("script");r=t.getByTag(document,"script")[0],o=!0;s.src="https://player.vimeo.com/api/player.js",jQuery("head").find("*").each(function(){"https://player.vimeo.com/api/player.js"==jQuery(this).attr("src")&&(o=!1)}),o&&r.parentNode.insertBefore(s,r)}},manageVideoLayer:function(e,a,o){if(!0===t.gA(e[0],"videoLayerManaged")||"true"===t.gA(e[0],"videoLayerManaged"))return!1;t[a].videos=void 0===t[a].videos?{}:t[a].videos;var s=t[a].videos[e[0].id]=void 0===t[a].videos[e[0].id]?v(e.data(),void 0,o):t[a].videos[e[0].id];if(s.audio=void 0!==s.audio&&s.audio,i&&s.opom)0==e.find("rs-poster").length&&e.append('');else{s.id=e[0].id,s.pload="auto"===s.pload||"canplay"===s.pload||"canplaythrough"===s.pload||"progress"===s.pload?"auto":s.pload,s.type=null!=s.mp4||null!=s.webm?"html5":null!=s.ytid&&String(s.ytid).length>1?"youtube":null!=s.vimeoid&&String(s.vimeoid).length>1?"vimeo":"none",s.newtype="html5"==s.type&&0==e.find(s.audio?"audio":"video").length?"html5":"youtube"==s.type&&0==e.find("iframe").length?"youtube":"vimeo"==s.type&&0==e.find("iframe").length?"vimeo":"none",s.extras="",s.posterMarkup=void 0===s.posterMarkup?"":s.posterMarkup,!s.audio&&"1sttime"==s.aplay&&s.pausetimer&&s.bgvideo&&t.sA(e.closest("rs-slide")[0],"rspausetimeronce",1),s.audio||!s.bgvideo||!s.pausetimer||1!=s.aplay&&"true"!=s.aplay&&"no1sttime"!=s.aplay||t.sA(e.closest("rs-slide")[0],"rspausetimeralways",1),s.noInt&&e.addClass("rs-nointeraction"),!(null!=s.poster&&s.poster.length>2)||i&&s.npom||0==e.find("rs-poster").length&&(s.posterMarkup+='');var n=!0;switch(s.newtype){case"html5":1==window.isSafari11&&(t[a].slideHasIframe=!0),s.audio&&e.addClass("rs-audio"),s.tag=s.audio?"audio":"video";var l="video"===s.tag&&(t.is_mobile()||t.isSafari11())?s.aplay||"true"===s.aplay?"muted playsinline autoplay":s.inline?" playsinline":"":"",d='
';d+="<"+s.tag+" "+l+" "+(s.controls&&"none"!==s.controls?" controls ":"")+(s.bgvideo?" muted autoplay ":"")+' style="'+("Edge"!==t.get_browser()?"object-fit:cover;background-size:cover;opacity:0;width:100%; height:100%":"")+'" class="" '+(s.loop?"loop":"")+' preload="'+s.pload+'">',"video"===s.tag&&null!=s.webm&&"firefox"==t.get_browser().toLowerCase()&&(d=d+''),null!=s.mp4&&(d=d+''),null!=s.ogv&&(d=d+''),d+="
",d+=s.posterMarkup,s.controls&&!s.audio||i||(d+='
 
'),s.videomarkup=d,n=!1,i&&s.notonmobile||t.isIE(8)||e.append(d),s.jvideo=e.find(s.tag),s.video=s.jvideo[0],s.html5vid=s.jvideo.parent(),s.metaloaded||r(s.video,"loadedmetadata",function(e){h(e,a),t.resetVideo(e,a)}(e));break;case"youtube":t[a].slideHasIframe=!0,s.controls&&"none"!==s.controls||(s.vatr=s.vatr.replace("controls=1","controls=0"),-1==s.vatr.toLowerCase().indexOf("controls")&&(s.vatr=s.vatr+"&controls=0")),(s.inline||"RS-BGVIDEO"===e[0].tagName)&&(s.vatr=s.vatr+"&playsinline=1"),-1!=s.ssec&&(s.vatr+="&start="+s.ssec),-1!=s.esec&&(s.vatr+="&end="+s.esec);var c=s.vatr.split("origin=https://");s.vatrnew=c.length>1?c[0]+"origin=https://"+(self.location.href.match(/www/gi)&&!c[1].match(/www/gi)?"www."+c[1]:c[1]):s.vatr,s.videomarkup='';break;case"vimeo":t[a].slideHasIframe=!0,s.controls&&"none"!==s.controls?(s.vatr=s.vatr.replace("background=0","background=1"),-1==s.vatr.toLowerCase().indexOf("background")&&(s.vatr=s.vatr+"&background=1")):(s.vatr=s.vatr.replace("background=1","background=0"),-1==s.vatr.toLowerCase().indexOf("background")&&(s.vatr=s.vatr+"&background=0")),s.vatr="autoplay="+(!0===s.aplay?1:0)+"&"+s.vatr,i&&(s.vatr="muted=1&"+s.vatr),s.loop&&(s.vatr="loop=1&"+s.vatr),s.videomarkup=''}if(!(null!=s.poster&&s.poster.length>2)||i&&s.npom){if(i&&s.notonmobile)return!1;0!=e.find("iframe").length||"youtube"!=s.type&&"vimeo"!=s.type||(delete s.vimeoplayer,e.append(s.videomarkup),u(e,a,!1))}else n&&0==e.find("rs-poster").length&&e.append(s.posterMarkup),0==e.find("iframe").length&&e.find("rs-poster").on("click",function(){if(t.playVideo(e,a),i){if(s.notonmobile)return!1;tpGS.gsap.to(e.find("rs-poster"),.3,{opacity:0,visibility:"hidden",force3D:"auto",ease:"power3.inOut"}),tpGS.gsap.to(e.find("iframe"),.3,{opacity:1,display:"block",ease:"power3.inOut"})}});"none"!==s.doverlay&&void 0!==s.doverlay&&(s.bgvideo?1!=e.closest("rs-sbg-wrap").find("rs-dotted").length&&e.closest("rs-sbg-wrap").append(''):1!=e.find("rs-dotted").length&&e.append('')),t.sA(e[0],"videoLayerManaged",!0),s.bgvideo&&tpGS.gsap.set(e.find("video, iframe"),{opacity:0})}}});var r=function(e,t,i){e.addEventListener?e.addEventListener(t,i,{capture:!1,passive:!0}):e.attachEvent(t,i,{capture:!1,passive:!0})},o=function(e,t,i){var a={};return a.video=e,a.type=t,a.settings=i,a},s=function(e,i){var a=t[e].videos[i[0].id];(a.bgvideo||a.fcover)&&(a.fcover&&i.removeClass("rs-fsv").addClass("coverscreenvideo"),(void 0===a.ratio||a.ratio.split(":").length<=1)&&(a.ratio="16:9"),t.prepareCoveredVideo(e))},n=function(e,t){var i=e.vimeoplayer;i.getPaused().then(function(a){e.volumetoken=!0;var r=!a,o=i.setVolume(t);void 0!==o&&o.then(function(t){i.getPaused().then(function(t){r===t&&(e.volume="mute",e.volumetoken=!0,i.setVolume(0),i.play())}).catch(function(e){console.log("Get Paused Function Failed for Vimeo Volume Changes Inside the Promise")})}).catch(function(t){r&&(e.volume="mute",e.volumetoken=!0,i.setVolume(0),i.play())})}).catch(function(){console.log("Get Paused Function Failed for Vimeo Volume Changes")})},l=function(e,t){var i=e.player.getPlayerState();"mute"===t?e.player.mute():(e.player.unMute(),e.player.setVolume(t)),setTimeout(function(){1===i&&1!==e.player.getPlayerState()&&(e.player.mute(),e.player.playVideo())},39)},d=function(e){var t=e.play();void 0!==t&&t.then(function(e){}).catch(function(t){e.pause()})},c=function(e){var t=e.play();void 0!==t&&t.then(function(e){}).catch(function(t){e.volumetoken=!0,e.setVolume(0),e.play()})},p=function(e){e.player.playVideo(),setTimeout(function(){1!==e.player.getPlayerState()&&3!==e.player.getPlayerState()&&(e.volume="mute",e.player.mute(),e.player.playVideo())},39)},g=function(e,i,a){e.vimeostarted=!0,e.nextslidecalled=!1;var r=i.find("rs-poster");e.ifr=i.find("iframe"),void 0!==r&&r.length>0?(tpGS.gsap.to(r,.3,{opacity:0,visibility:"hidden",force3D:"auto",ease:"power3.inOut"}),void 0!==e.ifr&&e.ifr.length>0&&tpGS.gsap.to(e.ifr,.3,{opacity:1,display:"block",ease:"power3.inOut"})):void 0!==e.ifr&&e.ifr.length>0&&tpGS.gsap.to(e.ifr,.001,{opacity:1,display:"block",ease:"power3.out"}),t[a].c.trigger("revolution.slide.onvideoplay",o(e.vimeoplayer,"vimeo",e)),t[a].stopByVideo=e.pausetimer,y(i,a),"mute"==e.volume||0===e.volume||t.lastToggleState(i.data("videomutetoggledby"))||!0===t[a].globalmute?(e.volumetoken=!0,e.vimeoplayer.setVolume(0)):n(e,parseInt(e.volcache,0)/100||.75),t.toggleState(e.videotoggledby)},u=function(e,a,r){var n=t[a].videos[e[0].id],d="iframe"+Math.round(1e5*Math.random()+1);if(n.ifr=e.find("iframe"),s(a,e),n.ifr.attr("id",d),n.startvideonow=r,n.videolistenerexist){if(r)switch(n.type){case"youtube":p(n),-1!=n.ssec&&n.player.seekTo(n.ssec);break;case"vimeo":c(n.vimeoplayer),-1!=n.ssec&&n.vimeoplayer.seekTo(n.ssec)}}else switch(n.type){case"youtube":if("undefined"==typeof YT||void 0===YT.Player)return t.checkVideoApis(e,a),void setTimeout(function(){u(e,a,r)},50);n.player=new YT.Player(d,{events:{onStateChange:function(i){i.data==YT.PlayerState.PLAYING?(t[a].onceVideoPlayed=!0,tpGS.gsap.to(e.find("rs-poster"),.3,{opacity:0,visibility:"hidden",force3D:"auto",ease:"power3.inOut"}),tpGS.gsap.to(n.ifr,.3,{opacity:1,display:"block",ease:"power3.inOut"}),"mute"==n.volume||0===n.volume||t.lastToggleState(e.data("videomutetoggledby"))||!0===t[a].globalmute?n.player.mute():l(n,parseInt(n.volcache,0)||75),t[a].stopByVideo=!0,y(e,a),n.pausetimer?t[a].c.trigger("stoptimer"):t[a].stopByVideo=!1,t[a].c.trigger("revolution.slide.onvideoplay",o(n.player,"youtube",n)),t.toggleState(n.videotoggledby)):(0==i.data&&n.loop&&(-1!=n.ssec&&n.player.seekTo(n.ssec),p(n),t.toggleState(n.videotoggledby)),t.checkfullscreenEnabled(a)||0!=i.data&&2!=i.data||!(n.scop&&e.find("rs-poster").length>0||n.bgvideo&&e.find(".rs-fullvideo-cover").length>0)||(n.bgvideo?tpGS.gsap.to(e.find(".rs-fullvideo-cover"),.1,{opacity:1,force3D:"auto",ease:"power3.inOut"}):tpGS.gsap.to(e.find("rs-poster"),.1,{opacity:1,visibility:"visible",force3D:"auto",ease:"power3.inOut"}),tpGS.gsap.to(n.ifr,.1,{opacity:0,ease:"power3.inOut"})),-1!=i.data&&3!=i.data&&(t[a].stopByVideo=!1,t[a].tonpause=!1,b(e,a),t[a].c.trigger("starttimer"),t[a].c.trigger("revolution.slide.onvideostop",o(n.player,"youtube",n)),null!=t[a].videoIsPlaying&&t[a].videoIsPlaying.attr("id")!=e.attr("id")||t.unToggleState(n.videotoggledby)),0==i.data&&n.nse?(m(),n.nseTriggered=!0,t[a].c.revnext(),b(e,a)):(b(e,a),t[a].stopByVideo=!1,3!==i.data&&(-1!=n.lasteventdata&&3!=n.lasteventdata&&void 0!==n.lasteventdata||-1!=i.data&&3!=i.data)&&t[a].c.trigger("starttimer"),t[a].c.trigger("revolution.slide.onvideostop",o(n.player,"youtube",n)),null!=t[a].videoIsPlaying&&t[a].videoIsPlaying.attr("id")!=e.attr("id")||t.unToggleState(n.videotoggledby))),n.lasteventdata=i.data},onReady:function(a){var r,o=t.is_mobile(),s=e.hasClass("rs-layer-video");!o&&(!t.isSafari11()||o&&s)||"RS-BGVIDEO"!==e[0].tagName&&(!s||!0!==n.aplay&&"true"!==n.aplay)||(r=!0,n.player.setVolume(0),n.volume="mute",n.player.mute(),clearTimeout(e.data("mobilevideotimr")),2!==n.player.getPlayerState()&&-1!==n.player.getPlayerState()||e.data("mobilevideotimr",setTimeout(function(){p(n)},500))),r||"mute"!=n.volume||(n.player.setVolume(0),n.player.mute()),e.addClass("rs-apiready"),null==n.speed&&1===n.speed||a.target.setPlaybackRate(parseFloat(n.speed)),e.find("rs-poster").unbind("click"),e.find("rs-poster").on("click",function(){i||p(n)}),n.startvideonow&&(p(n),-1!=n.ssec&&n.player.seekTo(n.ssec)),n.videolistenerexist=!0}}});break;case"vimeo":if("undefined"==typeof Vimeo||void 0===Vimeo.Player)return t.checkVideoApis(e,a),void setTimeout(function(){u(e,a,r)},50);for(var h,f=n.ifr.attr("src"),v={},w=f,_=/([^&=]+)=([^&]*)/g;h=_.exec(w);)v[decodeURIComponent(h[1])]=decodeURIComponent(h[2]);f=(f=null!=v.player_id?f.replace(v.player_id,d):f+"&player_id="+d).replace(/&api=0|&api=1/g,"");var x,k=t.is_mobile()||t.isSafari11(),S="RS-BGVIDEO"===e[0].tagName;if(k&&S&&(f+="&background=1"),n.ifr.attr("src",f),n.vimeoplayer=void 0===n.vimeoplayer||!1===n.vimeoplayer?new Vimeo.Player(d):n.vimeoplayer,k)S?x=!0:(n.aplay||"true"===n.aplay)&&(x=!0),x&&(n.volumetoken=!0,n.vimeoplayer.setVolume(0),n.volume="mute");n.vimeoplayer.on("play",function(i){n.vimeostarted||g(n,e,a),t[a].onceVideoPlayed=!0}),n.vimeoplayer.on("loaded",function(t){var i={};n.vimeoplayer.getVideoWidth().then(function(t){i.width=t,void 0!==i.width&&void 0!==i.height&&(n.ratio=i.width+":"+i.height,n.vimeoplayerloaded=!0,s(a,e))}),n.vimeoplayer.getVideoHeight().then(function(t){i.height=t,void 0!==i.width&&void 0!==i.height&&(n.ratio=i.width+":"+i.height,n.vimeoplayerloaded=!0,s(a,e))}),n.startvideonow&&("mute"===n.volume&&(n.volumetoken=!0,n.vimeoplayer.setVolume(0)),c(n.vimeoplayer),-1!=n.ssec&&n.vimeoplayer.setCurrentTime(n.ssec))}),e.addClass("rs-apiready"),n.vimeoplayer.on("volumechange",function(e){n.volumetoken&&(n.volume=e.volume),n.volumetoken=!1}),n.vimeoplayer.on("timeupdate",function(i){n.vimeostarted||0===i.percent||void 0!==t[a].activeRSSlide&&n.slideid!==t.gA(t[a].slides[t[a].activeRSSlide],"key")||g(n,e,a),n.pausetimer&&"playing"==t[a].sliderstatus&&(t[a].stopByVideo=!0,t[a].c.trigger("stoptimer")),n.currenttime=i.seconds,0!=n.esec&&-1!==n.esec&&n.esec0||n.bgvideo&&e.find(".rs-fullvideo-cover").length>0)&&(n.bgvideo?tpGS.gsap.to(e.find(".rs-fullvideo-cover"),.1,{opacity:1,force3D:"auto",ease:"power3.inOut"}):tpGS.gsap.to(e.find("rs-poster"),.1,{opacity:1,visibility:"visible",force3D:"auto",ease:"power3.inOut"}),tpGS.gsap.to(e.find("iframe"),.1,{opacity:0,ease:"power3.inOut"})),t[a].stopByVideo=!1,t[a].tonpause=!1,b(e,a),t[a].c.trigger("starttimer"),t[a].c.trigger("revolution.slide.onvideostop",o(n.vimeoplayer,"vimeo",n)),null!=t[a].videoIsPlaying&&t[a].videoIsPlaying.attr("id")!=e.attr("id")||t.unToggleState(n.videotoggledby)}),e.find("rs-poster").unbind("click"),e.find("rs-poster").on("click",function(){if(!i)return c(n.vimeoplayer),!1}),n.videolistenerexist=!0}},m=function(){document.exitFullscreen&&document.fullscreen?document.exitFullscreen():document.mozCancelFullScreen&&document.mozFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitIsFullScreen&&document.webkitExitFullscreen()};t.checkfullscreenEnabled=function(e){if(void 0!==window.fullScreen)return window.fullScreen;if(void 0!==document.fullscreen)return document.fullscreen;if(void 0!==document.mozFullScreen)return document.mozFullScreen;if(void 0!==document.webkitIsFullScreen)return document.webkitIsFullScreen;var i=t.isWebkit()&&/Apple Computer/.test(navigator.vendor)?42:5;return screen.width==t.winW&&Math.abs(screen.height-t.getWinH(e)) 
'),e.find("video, rs-poster, .tp-video-play-button").on("click",function(){e.hasClass("videoisplaying")?n.video.pause():n.video.play()})),(n.fcover||e.hasClass("rs-fsv")||n.bgvideo)&&(n.fcover||n.bgvideo?(n.html5vid.addClass("fullcoveredvideo"),void 0!==n.ratio&&1!=n.ratio.split(":").length||(n.ratio="16:9"),t.prepareCoveredVideo(a)):n.html5vid.addClass("rs-fsv")),r(n.video,"canplaythrough",function(){t.preLoadAudioDone(e,a,"canplaythrough")}),r(n.video,"canplay",function(){t.preLoadAudioDone(e,a,"canplay")}),r(n.video,"progress",function(){t.preLoadAudioDone(e,a,"progress")}),r(n.video,"timeupdate",function(i){void 0!==e&&void 0!==e[0]&&!0!==n.VideoIsVisible&&!0!==n.justReseted&&(t.getByTag(e[0],"rs-poster").length>0?(tpGS.gsap.to(t.getByTag(e[0],"rs-poster"),.3,{autoAlpha:0,force3D:"auto",ease:"power3.inOut"}),e.find(n.tag).length>0&&tpGS.gsap.to(e.find(n.tag),.001,{opacity:1,display:"block",ease:"power3.inOut"})):e.find(n.tag).length>0&&tpGS.gsap.to(e.find(n.tag),.001,{opacity:1,display:"block",ease:"power3.out"}),n.VideoIsVisible=!0,clearTimeout(n.showCoverSoon)),n.justReseted&&1!=t.checkfullscreenEnabled(a)&&e.find("rs-poster").length>0&&(n.showCoverSoon=setTimeout(function(){n.seeking||(tpGS.gsap.to(e.find("rs-poster"),.001,{autoAlpha:1,force3D:"auto",ease:"power3.inOut"}),tpGS.gsap.to(e.find(n.tag),1e-4,{opacity:0,ease:"power3.inOut"})),n.VideoIsVisible=!1},500)),n.justReseted=!1,-1===n.esec&&n.loop&&1==window.isSafari11&&(n.esec=n.video.duration-.075),void 0!==n.lastCurrentTime?n.fps=n.video.currentTime-n.lastCurrentTime:n.fps=.1,n.lastCurrentTime=n.video.currentTime,0!=n.esec&&-1!=n.esec&&n.esec1?n.volcache/100:n.volcache,"mute"==n.volume?n.video.muted=!0:null!=n.volcache&&(n.video.volume=n.volcache)),e.addClass("videoisplaying"),y(e,a),clearTimeout(n.showCoverSoon),!0!==n.pausetimer||"audio"==n.tag?(t[a].stopByVideo=!1,t[a].c.trigger("revolution.slide.onvideostop",o(n.video,"html5",n))):(t[a].stopByVideo=!0,t[a].c.trigger("revolution.slide.onvideoplay",o(n.video,"html5",n))),n.pausetimer&&"playing"==t[a].sliderstatus&&(t[a].stopByVideo=!0,t[a].c.trigger("stoptimer")),t.toggleState(n.videotoggledby)}),r(n.video,"seeked",function(){n.seeking=!1}),r(n.video,"seeking",function(){n.seeking=!0}),r(n.video,"pause",function(i){!t.checkfullscreenEnabled(a)&&e.find("rs-poster").length>0&&n.scop&&(n.showCoverSoon=setTimeout(function(){n.seeking||(tpGS.gsap.to(e.find("rs-poster"),.001,{opacity:1,visibility:"visible",force3D:"auto",ease:"power3.inOut"}),tpGS.gsap.to(e.find(n.tag),1e-4,{opacity:0,ease:"power3.inOut"}))},500),n.VideoIsVisible=!1),e.removeClass("videoisplaying"),t[a].stopByVideo=!1,b(e,a),"audio"!=n.tag&&t[a].c.trigger("starttimer"),t[a].c.trigger("revolution.slide.onvideostop",o(n.video,"html5",n)),null!=t[a].videoIsPlaying&&t[a].videoIsPlaying.attr("id")!=e.attr("id")||t.unToggleState(n.videotoggledby)}),r(n.video,"ended",function(){m(),b(e,a),t[a].stopByVideo=!1,b(e,a),"audio"!=n.tag&&t[a].c.trigger("starttimer"),t[a].c.trigger("revolution.slide.onvideostop",o(n.video,"html5",e.data())),n.nse&&n.video.currentTime>0&&(1==!t[a].jcnah&&(n.nseTriggered=!0,t[a].c.revnext(),t[a].jcnah=!0),setTimeout(function(){t[a].jcnah=!1},1500)),e.removeClass("videoisplaying"),!0!==t[a].inviewport&&void 0!==t[a].inviewport||(t[a].lastplayedvideos=[])})},f=function(e){return"t"===e||!0===e||"true"===e||"f"!==e&&!1!==e&&"false"!==e&&e},v=function(e,t,i){e.audio="audio"===t;var r=void 0===e.video?[]:e.video.split(";"),o={volume:e.audio?1:"mute",pload:"auto",ratio:"16:9",loop:!0,aplay:"true",fcover:1===e.bgvideo,afs:!0,controls:!1,nse:!0,npom:!1,opom:!1,inline:!0,notonmobile:!1,start:-1,end:-1,doverlay:"none",scop:!1,rwd:!0,speed:1,ploadwait:5,stopAV:1!==e.bgvideo,noInt:!1,volcache:75};for(var s in r)if(r.hasOwnProperty(s)){var n=r[s].split(":");switch(n[0]){case"v":o.volume=n[1];break;case"vd":o.volcache=n[1];break;case"p":o.pload=n[1];break;case"ar":o.ratio=n[1]+(void 0!==n[2]?":"+n[2]:"");break;case"ap":o.aplay=f(n[1]);break;case"fc":o.fcover=f(n[1]);break;case"afs":o.afs=f(n[1]);break;case"vc":o.controls=n[1];break;case"nse":o.nse=f(n[1]);break;case"npom":o.npom=f(n[1]);break;case"opom":o.opom=f(n[1]);break;case"t":o.vtype=n[1];break;case"inl":o.inline=f(n[1]);break;case"nomo":o.notonmobile=f(n[1]);break;case"sta":o.start=n[1]+(void 0!==n[2]?":"+n[2]:"");break;case"end":o.end=n[1]+(void 0!==n[2]?":"+n[2]:"");break;case"do":o.doverlay=n[1];break;case"scop":o.scop=f(n[1]);break;case"rwd":o.rwd=f(n[1]);break;case"sp":o.speed=n[1];break;case"vw":o.ploadwait=parseInt(n[1],0)||5;break;case"sav":o.stopAV=f(n[1]);break;case"noint":o.noInt=f(n[1]);break;case"l":o.loopcache=n[1],o.loop="loop"===n[1]||"loopandnoslidestop"===n[1]||"none"!==n[1]&&f(n[1]);break;case"ptimer":o.pausetimer=f(n[1]);break;case"sat":o.waitToSlideTrans=f(n[1])}}return void 0!==e.bgvideo&&(o.bgvideo=e.bgvideo),void 0===e.bgvideo||!1!==o.fcover&&"false"!==o.fcover||(o.doverlay="none"),o.noInt&&(o.controls=!1),void 0!==e.mp4&&(o.mp4=e.mp4),void 0!==e.videomp4&&(o.mp4=e.videomp4),void 0!==e.ytid&&(o.ytid=e.ytid),void 0!==e.ogv&&(o.ogv=e.ogv),void 0!==e.webm&&(o.webm=e.webm),void 0!==e.vimeoid&&(o.vimeoid=e.vimeoid),void 0!==e.vatr&&(o.vatr=e.vatr),void 0!==e.videoattributes&&(o.vatr=e.videoattributes),void 0!==e.poster&&(o.poster=e.poster),o.slideid=i,o.aplay="true"===o.aplay||o.aplay,1===o.bgvideo&&(o.volume="mute"),o.ssec=a(o.start),o.esec=a(o.end),o.pausetimer=void 0===o.pausetimer?"loopandnoslidestop"!==o.loopcache:o.pausetimer,o.inColumn=e._incolumn,o.audio=e.audio,!0!==o.loop&&"true"!==o.loop||!0!==o.nse&&"true"!==o.nse||(o.loop=!1),o},y=function(e,i){if(t[i].playingvideos=void 0===t[i].playingvideos?new Array:t[i].playingvideos,t[i].videos[e[0].id].stopAV&&void 0!==t[i].playingvideos&&t[i].playingvideos.length>0)for(var a in t[i].lastplayedvideos=jQuery.extend(!0,[],t[i].playingvideos),t[i].playingvideos)t[i].playingvideos.hasOwnProperty(a)&&t.stopVideo(t[i].playingvideos[a],i);t[i].playingvideos.push(e),t[i].videoIsPlaying=e},b=function(e,i){void 0!==t[i]&&void 0!==t[i]&&null!=t[i].playingvideos&&jQuery.inArray(e,t[i].playingvideos)>=0&&t[i].playingvideos.splice(jQuery.inArray(e,t[i].playingvideos),1)}}(jQuery); !function(e,t){if("function"==typeof define&&define.amd)define(["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var o={};t(o),e.bodyScrollLock=o}}(this,function(exports){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t