vendor: 15,088 bytes, lines 1-2
1/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ 2!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(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=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))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(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&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(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&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(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 ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);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&&E){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=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||se.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]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(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(te,ne).toLowerCase();return"*"===e?function(){return!0}
vendor: 4,356 bytes, line 2
2:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(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=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];
vendor: 10,068 bytes, line 2
2if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.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 S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
vendor: 8,547 bytes, line 2
2nding",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone
vendor: 51,417 bytes, line 2
2=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").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)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.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),m(t)&&(t=t.call(e,n,S.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):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.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"===S.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"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(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)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(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?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.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)}}),S.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){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
3; 4/** 5* DO NOT EDIT THIS FILE. 6* See the following change record for more information, 7* https://www.drupal.org/node/2815083 8* @preserve 9**/ 10 11(function () { 12 var settingsElement = document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]'); 13 14 window.drupalSettings = {}; 15 16 if (settingsElement !== null) { 17 window.drupalSettings = JSON.parse(settingsElement.textContent); 18 } 19})();; 20/** 21* DO NOT EDIT THIS FILE. 22* See the following change record for more information, 23* https://www.drupal.org/node/2815083 24* @preserve 25**/ 26 27window.Drupal = { behaviors: {}, locale: {} }; 28 29(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) { 30 Drupal.throwError = function (error) { 31 setTimeout(function () { 32 throw error; 33 }, 0); 34 }; 35 36 Drupal.attachBehaviors = function (context, settings) { 37 context = context || document; 38 settings = settings || drupalSettings; 39 var behaviors = Drupal.behaviors; 40 41 Object.keys(behaviors || {}).forEach(function (i) { 42 if (typeof behaviors[i].attach === 'function') { 43 try { 44 behaviors[i].attach(context, settings); 45 } catch (e) { 46 Drupal.throwError(e); 47 } 48 } 49 }); 50 }; 51 52 Drupal.detachBehaviors = function (context, settings, trigger) { 53 context = context || document; 54 settings = settings || drupalSettings; 55 trigger = trigger || 'unload'; 56 var behaviors = Drupal.behaviors; 57 58 Object.keys(behaviors || {}).forEach(function (i) { 59 if (typeof behaviors[i].detach === 'function') { 60 try { 61 behaviors[i].detach(context, settings, trigger); 62 } catch (e) { 63 Drupal.throwError(e); 64 } 65 } 66 }); 67 }; 68 69 Drupal.checkPlain = function (str) { 70 str = str.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); 71 return str; 72 }; 73 74 Drupal.formatString = function (str, args) { 75 var processedArgs = {}; 76 77 Object.keys(args || {}).forEach(function (key) { 78 switch (key.charAt(0)) { 79 case '@': 80 processedArgs[key] = Drupal.checkPlain(args[key]); 81 break; 82 83 case '!': 84 processedArgs[key] = args[key]; 85 break; 86 87 default: 88 processedArgs[key] = Drupal.theme('placeholder', args[key]); 89 break; 90 } 91 }); 92 93 return Drupal.stringReplace(str, processedArgs, null); 94 }; 95 96 Drupal.stringReplace = function (str, args, keys) { 97 if (str.length === 0) { 98 return str; 99 } 100 101 if (!Array.isArray(keys)) { 102 keys = Object.keys(args || {}); 103 104 keys.sort(function (a, b) { 105 return a.length - b.length; 106 }); 107 } 108 109 if (keys.length === 0) { 110 return str; 111 } 112 113 var key = keys.pop(); 114 var fragments = str.split(key); 115 116 if (keys.length) { 117 for (var i = 0; i < fragments.length; i++) { 118 fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); 119 } 120 } 121 122 return fragments.join(args[key]); 123 }; 124 125 Drupal.t = function (str, args, options) { 126 options = options || {}; 127 options.context = options.context || ''; 128 129 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) { 130 str = drupalTranslations.strings[options.context][str]; 131 } 132 133 if (args) { 134 str = Drupal.formatString(str, args); 135 } 136 return str; 137 }; 138 139 Drupal.url = function (path) { 140 return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path; 141 }; 142 143 Drupal.url.toAbsolute = function (url) { 144 var urlParsingNode = document.createElement('a'); 145 146 try { 147 url = decodeURIComponent(url); 148 } catch (e) {} 149 150 urlParsingNode.setAttribute('href', url); 151 152 return urlParsingNode.cloneNode(false).href; 153 }; 154 155 Drupal.url.isLocal = function (url) { 156 var absoluteUrl = Drupal.url.toAbsolute(url); 157 var protocol = window.location.protocol; 158 159 if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) { 160 protocol = 'https:'; 161 } 162 var baseUrl = protocol + '//' + window.location.host + drupalSettings.path.baseUrl.slice(0, -1); 163 164 try { 165 absoluteUrl = decodeURIComponent(absoluteUrl); 166 } catch (e) {} 167 try { 168 baseUrl = decodeURIComponent(baseUrl); 169 } catch (e) {} 170 171 return absoluteUrl === baseUrl || absoluteUrl.indexOf(baseUrl + '/') === 0; 172 }; 173 174 Drupal.formatPlural = function (count, singular, plural, args, options) { 175 args = args || {}; 176 args['@count'] = count; 177 178 var pluralDelimiter = drupalSettings.pluralDelimiter; 179 var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter); 180 var index = 0; 181 182 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) { 183 index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default; 184 } else if (args['@count'] !== 1) { 185 index = 1; 186 } 187 188 return translations[index]; 189 }; 190 191 Drupal.encodePath = function (item) { 192 return window.encodeURIComponent(item).replace(/%2F/g, '/'); 193 }; 194 195 Drupal.deprecationError = function (_ref) { 196 var message = _ref.message; 197 198 if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) { 199 console.warn('[Deprecation] ' + message); 200 } 201 }; 202 203 Drupal.deprecatedProperty = function (_ref2) { 204 var target = _ref2.target, 205 deprecatedProperty = _ref2.deprecatedProperty, 206 message = _ref2.message; 207 208 if (!Proxy || !Reflect) { 209 return target; 210 } 211 212 return new Proxy(target, { 213 get: function get(target, key) { 214 for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { 215 rest[_key - 2] = arguments[_key]; 216 } 217 218 if (key === deprecatedProperty) { 219 Drupal.deprecationError({ message: message }); 220 } 221 return Reflect.get.apply(Reflect, [target, key].concat(rest)); 222 } 223 }); 224 }; 225 226 Drupal.theme = function (func) { 227 if (func in Drupal.theme) { 228 var _Drupal$theme; 229 230 for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 231 args[_key2 - 1] = arguments[_key2]; 232 } 233
234 return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args); 235 } 236 }; 237 238 Drupal.theme.placeholder = function (str) { 239 return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>'; 240 }; 241})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);; 242/** 243* DO NOT EDIT THIS FILE. 244* See the following change record for more information, 245* https://www.drupal.org/node/2815083 246* @preserve 247**/ 248 249if (window.jQuery) { 250 jQuery.noConflict(); 251} 252 253document.documentElement.className += ' js'; 254 255(function (Drupal, drupalSettings) { 256 var domReady = function domReady(callback) { 257 if (document.readyState !== 'loading') { 258 callback(); 259 } else { 260 var listener = function listener() { 261 callback(); 262 document.removeEventListener('DOMContentLoaded', listener); 263 }; 264 document.addEventListener('DOMContentLoaded', listener); 265 } 266 }; 267 268 domReady(function () { 269 Drupal.attachBehaviors(document, drupalSettings); 270 }); 271})(Drupal, window.drupalSettings);; 272/*! jQuery Migrate v1.4.1 | (c) jQuery Foundation and other contributors | jquery.org/license */ 273"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=[],a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("<input/>",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*</,u=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,v=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,w=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(
273a.support,"boxModel",a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g<e.length;)e[g++].guid=f;return this.click(h)},a.fn.live=function(b,c,e){return d("jQuery.fn.live() is deprecated"),F?F.apply(this,arguments):(a(this.context).on(b,this.selector,c,e),this)},a.fn.die=function(b,c){return d("jQuery.fn.die() is deprecated"),G?G.apply(this,arguments):(a(this.context).off(b,this.selector||"**",c),this)},a.event.trigger=function(a,b,c,e){return c||J.test(a)||d("Global events are undocumented and deprecated"),D.call(this,a,b,c||document,e)},a.each(I.split("|"),function(b,c){a.event.special[c]={setup:function(){var b=this;return b!==document&&(a.event.add(document,c+"."+a.guid,function(){a.event.trigger(c,Array.prototype.slice.call(arguments,1),b,!0)}),a._data(this,c,a.guid++)),!1},teardown:function(){return this!==document&&a.event.remove(document,c+"."+a._data(this,c)),!1}}}),a.event.special.ready={setup:function(){this===document&&d("'ready' event is deprecated")}};var M=a.fn.andSelf||a.fn.addBack,N=a.fn.find;if(a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),M.apply(this,arguments)},a.fn.find=function(a){var b=N.apply(this,arguments);return b.context=this.context,b.selector=this.selector?this.selector+" "+a:a,b},a.Callbacks){var O=a.Deferred,P=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var c=O(),e=c.promise();return c.pipe=e.pipe=function(){var b=arguments;return d("deferred.pipe() is deprecated"),a.Deferred(function(d){a.each(P,function(f,g){var h=a.isFunction(b[f])&&b[f];c[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(d.resolve).fail(d.reject).progress(d.notify):d[g[0]+"With"](this===e?d.promise():this,h?[b]:arguments)})}),b=null}).promise()},c.isResolved=function(){return d("deferred.isResolved is deprecated"),"resolved"===c.state()},c.isRejected=function(){return d("deferred.isRejected is deprecated"),"rejected"===c.state()},b&&b.call(c,c),c}}}(jQuery,window);; 274/** 275* bootstrap.js v3.0.0 by @fat and @mdo 276* Copyright 2013 Twitter Inc. 277* http://www.apache.org/licenses/LICENSE-2.0 278*/ 279if (!jQuery) { throw new Error("Bootstrap requires jQuery") } 280 281/* ======================================================================== 282 * Bootstrap: transition.js v3.0.0 283 * http://twbs.github.com/bootstrap/javascript.html#transitions 284 * ======================================================================== 285 * Copyright 2013 Twitter, Inc. 286 * 287 * Licensed under the Apache License, Version 2.0 (the "License");
288 * you may not use this file except in compliance with the License. 289 * You may obtain a copy of the License at 290 * 291 * http://www.apache.org/licenses/LICENSE-2.0 292 * 293 * Unless required by applicable law or agreed to in writing, software 294 * distributed under the License is distributed on an "AS IS" BASIS, 295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 296 * See the License for the specific language governing permissions and 297 * limitations under the License. 298 * ======================================================================== */ 299 300 301+function ($) { "use strict"; 302 303 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 304 // ============================================================ 305 306 function transitionEnd() { 307 var el = document.createElement('bootstrap') 308 309 var transEndEventNames = { 310 'WebkitTransition' : 'webkitTransitionEnd' 311 , 'MozTransition' : 'transitionend' 312 , 'OTransition' : 'oTransitionEnd otransitionend' 313 , 'transition' : 'transitionend' 314 } 315 316 for (var name in transEndEventNames) { 317 if (el.style[name] !== undefined) { 318 return { end: transEndEventNames[name] } 319 } 320 } 321 } 322 323 // http://blog.alexmaccaw.com/css-transitions 324 $.fn.emulateTransitionEnd = function (duration) { 325 var called = false, $el = this 326 $(this).one($.support.transition.end, function () { called = true }) 327 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 328 setTimeout(callback, duration) 329 return this 330 } 331 332 $(function () { 333 $.support.transition = transitionEnd() 334 }) 335 336}(window.jQuery); 337 338/* ======================================================================== 339 * Bootstrap: alert.js v3.0.0 340 * http://twbs.github.com/bootstrap/javascript.html#alerts 341 * ======================================================================== 342 * Copyright 2013 Twitter, Inc. 343 * 344 * Licensed under the Apache License, Version 2.0 (the "License"); 345 * you may not use this file except in compliance with the License. 346 * You may obtain a copy of the License at 347 * 348 * http://www.apache.org/licenses/LICENSE-2.0 349 * 350 * Unless required by applicable law or agreed to in writing, software 351 * distributed under the License is distributed on an "AS IS" BASIS, 352 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 353 * See the License for the specific language governing permissions and 354 * limitations under the License. 355 * ======================================================================== */ 356 357 358+function ($) { "use strict"; 359 360 // ALERT CLASS DEFINITION 361 // ====================== 362 363 var dismiss = '[data-dismiss="alert"]' 364 var Alert = function (el) { 365 $(el).on('click', dismiss, this.close) 366 } 367 368 Alert.prototype.close = function (e) { 369 var $this = $(this) 370 var selector = $this.attr('data-target') 371 372 if (!selector) { 373 selector = $this.attr('href') 374 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 375 } 376 377 var $parent = $(selector) 378 379 if (e) e.preventDefault() 380 381 if (!$parent.length) { 382 $parent = $this.hasClass('alert') ? $this : $this.parent() 383 } 384 385 $parent.trigger(e = $.Event('close.bs.alert')) 386 387 if (e.isDefaultPrevented()) return 388 389 $parent.removeClass('in') 390 391 function removeElement() { 392 $parent.trigger('closed.bs.alert').remove() 393 } 394 395 $.support.transition && $parent.hasClass('fade') ? 396 $parent 397 .one($.support.transition.end, removeElement) 398 .emulateTransitionEnd(150) : 399 removeElement() 400 } 401 402 403 // ALERT PLUGIN DEFINITION 404 // ======================= 405 406 var old = $.fn.alert 407 408 $.fn.alert = function (option) { 409 return this.each(function () { 410 var $this = $(this) 411 var data = $this.data('bs.alert') 412 413 if (!data) $this.data('bs.alert', (data = new Alert(this))) 414 if (typeof option == 'string') data[option].call($this) 415 }) 416 } 417 418 $.fn.alert.Constructor = Alert 419 420 421 // ALERT NO CONFLICT 422 // ================= 423 424 $.fn.alert.noConflict = function () { 425 $.fn.alert = old 426 return this 427 } 428 429 430 // ALERT DATA-API 431 // ============== 432 433 $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 434 435}(window.jQuery); 436 437/* ======================================================================== 438 * Bootstrap: button.js v3.0.0 439 * http://twbs.github.com/bootstrap/javascript.html#buttons 440 * ======================================================================== 441 * Copyright 2013 Twitter, Inc. 442 * 443 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 46,360 bytes, lines 444-2017
444 * you may not use this file except in compliance with the License. 445 * You may obtain a copy of the License at 446 * 447 * http://www.apache.org/licenses/LICENSE-2.0 448 * 449 * Unless required by applicable law or agreed to in writing, software 450 * distributed under the License is distributed on an "AS IS" BASIS, 451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 452 * See the License for the specific language governing permissions and 453 * limitations under the License. 454 * ======================================================================== */ 455 456 457+function ($) { "use strict"; 458 459 // BUTTON PUBLIC CLASS DEFINITION 460 // ============================== 461 462 var Button = function (element, options) { 463 this.$element = $(element) 464 this.options = $.extend({}, Button.DEFAULTS, options) 465 } 466 467 Button.DEFAULTS = { 468 loadingText: 'loading...' 469 } 470 471 Button.prototype.setState = function (state) { 472 var d = 'disabled' 473 var $el = this.$element 474 var val = $el.is('input') ? 'val' : 'html' 475 var data = $el.data() 476 477 state = state + 'Text' 478 479 if (!data.resetText) $el.data('resetText', $el[val]()) 480 481 $el[val](data[state] || this.options[state]) 482 483 // push to event loop to allow forms to submit 484 setTimeout(function () { 485 state == 'loadingText' ? 486 $el.addClass(d).attr(d, d) : 487 $el.removeClass(d).removeAttr(d); 488 }, 0) 489 } 490 491 Button.prototype.toggle = function () { 492 var $parent = this.$element.closest('[data-toggle="buttons"]') 493 494 if ($parent.length) { 495 var $input = this.$element.find('input') 496 .prop('checked', !this.$element.hasClass('active')) 497 .trigger('change') 498 if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') 499 } 500 501 this.$element.toggleClass('active') 502 } 503 504 505 // BUTTON PLUGIN DEFINITION 506 // ======================== 507 508 var old = $.fn.button 509 510 $.fn.button = function (option) { 511 return this.each(function () { 512 var $this = $(this) 513 var data = $this.data('bs.button') 514 var options = typeof option == 'object' && option 515 516 if (!data) $this.data('bs.button', (data = new Button(this, options))) 517 518 if (option == 'toggle') data.toggle() 519 else if (option) data.setState(option) 520 }) 521 } 522 523 $.fn.button.Constructor = Button 524 525 526 // BUTTON NO CONFLICT 527 // ================== 528 529 $.fn.button.noConflict = function () { 530 $.fn.button = old 531 return this 532 } 533 534 535 // BUTTON DATA-API 536 // =============== 537 538 $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { 539 var $btn = $(e.target) 540 if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 541 $btn.button('toggle') 542 e.preventDefault() 543 }) 544 545}(window.jQuery); 546 547/* ======================================================================== 548 * Bootstrap: carousel.js v3.0.0 549 * http://twbs.github.com/bootstrap/javascript.html#carousel 550 * ======================================================================== 551 * Copyright 2012 Twitter, Inc. 552 * 553 * Licensed under the Apache License, Version 2.0 (the "License"); 554 * you may not use this file except in compliance with the License. 555 * You may obtain a copy of the License at 556 * 557 * http://www.apache.org/licenses/LICENSE-2.0 558 * 559 * Unless required by applicable law or agreed to in writing, software 560 * distributed under the License is distributed on an "AS IS" BASIS, 561 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 562 * See the License for the specific language governing permissions and 563 * limitations under the License. 564 * ======================================================================== */ 565 566 567+function ($) { "use strict"; 568 569 // CAROUSEL CLASS DEFINITION 570 // ========================= 571 572 var Carousel = function (element, options) { 573 this.$element = $(element) 574 this.$indicators = this.$element.find('.carousel-indicators') 575 this.options = options 576 this.paused = 577 this.sliding = 578 this.interval = 579 this.$active = 580 this.$items = null 581 582 this.options.pause == 'hover' && this.$element 583 .on('mouseenter', $.proxy(this.pause, this)) 584 .on('mouseleave', $.proxy(this.cycle, this)) 585 } 586 587 Carousel.DEFAULTS = { 588 interval: 5000 589 , pause: 'hover' 590 , wrap: true 591 } 592 593 Carousel.prototype.cycle = function (e) { 594 e || (this.paused = false) 595 596 this.interval && clearInterval(this.interval) 597 598 this.options.interval 599 && !this.paused 600 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 601 602 return this 603 } 604 605 Carousel.prototype.getActiveIndex = function () { 606 this.$active = this.$element.find('.item.active') 607 this.$items = this.$active.parent().children() 608 609 return this.$items.index(this.$active) 610 } 611 612 Carousel.prototype.to = function (pos) { 613 var that = this 614 var activeIndex = this.getActiveIndex() 615 616 if (pos > (this.$items.length - 1) || pos < 0) return 617 618 if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) 619 if (activeIndex == pos) return this.pause().cycle() 620 621 return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) 622 } 623 624 Carousel.prototype.pause = function (e) { 625 e || (this.paused = true) 626 627 if (this.$element.find('.next, .prev').length && $.support.transition.end) { 628 this.$element.trigger($.support.transition.end) 629 this.cycle(true) 630 } 631 632 this.interval = clearInterval(this.interval) 633 634 return this 635 } 636 637 Carousel.prototype.next = function () { 638 if (this.sliding) return 639 return this.slide('next') 640 } 641 642 Carousel.prototype.prev = function () { 643 if (this.sliding) return 644 return this.slide('prev') 645 } 646 647 Carousel.prototype.slide = function (type, next) { 648 var $active = this.$element.find('.item.active') 649 var $next = next || $active[type]() 650 var isCycling = this.interval 651 var direction = type == 'next' ? 'left' : 'right' 652 var fallback = type == 'next' ? 'first' : 'last' 653 var that = this 654 655 if (!$next.length) { 656 if (!this.options.wrap) return 657 $next = this.$element.find('.item')[fallback]() 658 } 659 660 this.sliding = true 661 662 isCycling && this.pause() 663 664 var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) 665 666 if ($next.hasClass('active')) return 667 668 if (this.$indicators.length) { 669 this.$indicators.find('.active').removeClass('active') 670 this.$element.one('slid', function () { 671 var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) 672 $nextIndicator && $nextIndicator.addClass('active') 673 }) 674 } 675 676 if ($.support.transition && this.$element.hasClass('slide')) { 677 this.$element.trigger(e) 678 if (e.isDefaultPrevented()) return 679 $next.addClass(type) 680 $next[0].offsetWidth // force reflow 681 $active.addClass(direction) 682 $next.addClass(direction) 683 $active 684 .one($.support.transition.end, function () { 685 $next.removeClass([type, direction].join(' ')).addClass('active') 686 $active.removeClass(['active', direction].join(' ')) 687 that.sliding = false 688 setTimeout(function () { that.$element.trigger('slid') }, 0) 689 }) 690 .emulateTransitionEnd(600) 691 } else { 692 this.$element.trigger(e) 693 if (e.isDefaultPrevented()) return 694 $active.removeClass('active') 695 $next.addClass('active') 696 this.sliding = false 697 this.$element.trigger('slid') 698 } 699 700 isCycling && this.cycle() 701 702 return this 703 } 704 705 706 // CAROUSEL PLUGIN DEFINITION 707 // ========================== 708 709 var old = $.fn.carousel 710 711 $.fn.carousel = function (option) { 712 return this.each(function () { 713 var $this = $(this) 714 var data = $this.data('bs.carousel') 715 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 716 var action = typeof option == 'string' ? option : options.slide 717 718 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 719 if (typeof option == 'number') data.to(option) 720 else if (action) data[action]() 721 else if (options.interval) data.pause().cycle() 722 }) 723 } 724 725 $.fn.carousel.Constructor = Carousel 726 727 728 // CAROUSEL NO CONFLICT 729 // ==================== 730 731 $.fn.carousel.noConflict = function () { 732 $.fn.carousel = old 733 return this 734 } 735 736 737 // CAROUSEL DATA-API 738 // ================= 739 740 $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { 741 var $this = $(this), href 742 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 743 var options = $.extend({}, $target.data(), $this.data()) 744 var slideIndex = $this.attr('data-slide-to') 745 if (slideIndex) options.interval = false 746 747 $target.carousel(options) 748 749 if (slideIndex = $this.attr('data-slide-to')) { 750 $target.data('bs.carousel').to(slideIndex) 751 } 752 753 e.preventDefault() 754 }) 755 756 $(window).on('load', function () { 757 $('[data-ride="carousel"]').each(function () { 758 var $carousel = $(this) 759 $carousel.carousel($carousel.data()) 760 }) 761 }) 762 763}(window.jQuery); 764 765/* ======================================================================== 766 * Bootstrap: collapse.js v3.0.0 767 * http://twbs.github.com/bootstrap/javascript.html#collapse 768 * ======================================================================== 769 * Copyright 2012 Twitter, Inc. 770 * 771 * Licensed under the Apache License, Version 2.0 (the "License"); 772 * you may not use this file except in compliance with the License. 773 * You may obtain a copy of the License at 774 * 775 * http://www.apache.org/licenses/LICENSE-2.0 776 * 777 * Unless required by applicable law or agreed to in writing, software 778 * distributed under the License is distributed on an "AS IS" BASIS, 779 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 780 * See the License for the specific language governing permissions and 781 * limitations under the License. 782 * ======================================================================== */ 783 784 785+function ($) { "use strict"; 786 787 // COLLAPSE PUBLIC CLASS DEFINITION 788 // ================================ 789 790 var Collapse = function (element, options) { 791 this.$element = $(element) 792 this.options = $.extend({}, Collapse.DEFAULTS, options) 793 this.transitioning = null 794 795 if (this.options.parent) this.$parent = $(this.options.parent) 796 if (this.options.toggle) this.toggle() 797 } 798 799 Collapse.DEFAULTS = { 800 toggle: true 801 } 802 803 Collapse.prototype.dimension = function () { 804 var hasWidth = this.$element.hasClass('width') 805 return hasWidth ? 'width' : 'height' 806 } 807 808 Collapse.prototype.show = function () { 809 if (this.transitioning || this.$element.hasClass('in')) return 810 811 var startEvent = $.Event('show.bs.collapse') 812 this.$element.trigger(startEvent) 813 if (startEvent.isDefaultPrevented()) return 814 815 var actives = this.$parent && this.$parent.find('> .panel > .in') 816 817 if (actives && actives.length) { 818 var hasData = actives.data('bs.collapse') 819 if (hasData && hasData.transitioning) return 820 actives.collapse('hide') 821 hasData || actives.data('bs.collapse', null) 822 } 823 824 var dimension = this.dimension() 825 826 this.$element 827 .removeClass('collapse') 828 .addClass('collapsing') 829 [dimension](0) 830 831 this.transitioning = 1 832 833 var complete = function () { 834 this.$element 835 .removeClass('collapsing') 836 .addClass('in') 837 [dimension]('auto') 838 this.transitioning = 0 839 this.$element.trigger('shown.bs.collapse') 840 } 841 842 if (!$.support.transition) return complete.call(this) 843 844 var scrollSize = $.camelCase(['scroll', dimension].join('-')) 845 846 this.$element 847 .one($.support.transition.end, $.proxy(complete, this)) 848 .emulateTransitionEnd(350) 849 [dimension](this.$element[0][scrollSize]) 850 } 851 852 Collapse.prototype.hide = function () { 853 if (this.transitioning || !this.$element.hasClass('in')) return 854 855 var startEvent = $.Event('hide.bs.collapse') 856 this.$element.trigger(startEvent) 857 if (startEvent.isDefaultPrevented()) return 858 859 var dimension = this.dimension() 860 861 this.$element 862 [dimension](this.$element[dimension]()) 863 [0].offsetHeight 864 865 this.$element 866 .addClass('collapsing') 867 .removeClass('collapse') 868 .removeClass('in') 869 870 this.transitioning = 1 871 872 var complete = function () { 873 this.transitioning = 0 874 this.$element 875 .trigger('hidden.bs.collapse') 876 .removeClass('collapsing') 877 .addClass('collapse') 878 } 879 880 if (!$.support.transition) return complete.call(this) 881 882 this.$element 883 [dimension](0) 884 .one($.support.transition.end, $.proxy(complete, this)) 885 .emulateTransitionEnd(350) 886 } 887 888 Collapse.prototype.toggle = function () { 889 this[this.$element.hasClass('in') ? 'hide' : 'show']() 890 } 891 892 893 // COLLAPSE PLUGIN DEFINITION 894 // ========================== 895 896 var old = $.fn.collapse 897 898 $.fn.collapse = function (option) { 899 return this.each(function () { 900 var $this = $(this) 901 var data = $this.data('bs.collapse') 902 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 903 904 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 905 if (typeof option == 'string') data[option]() 906 }) 907 } 908 909 $.fn.collapse.Constructor = Collapse 910 911 912 // COLLAPSE NO CONFLICT 913 // ==================== 914 915 $.fn.collapse.noConflict = function () { 916 $.fn.collapse = old 917 return this 918 } 919 920 921 // COLLAPSE DATA-API 922 // ================= 923 924 $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { 925 var $this = $(this), href 926 var target = $this.attr('data-target') 927 || e.preventDefault() 928 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 929 var $target = $(target) 930 var data = $target.data('bs.collapse') 931 var option = data ? 'toggle' : $this.data() 932 var parent = $this.attr('data-parent') 933 var $parent = parent && $(parent) 934 935 if (!data || !data.transitioning) { 936 if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') 937 $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') 938 } 939 940 $target.collapse(option) 941 }) 942 943}(window.jQuery); 944 945/* ======================================================================== 946 * Bootstrap: dropdown.js v3.0.0 947 * http://twbs.github.com/bootstrap/javascript.html#dropdowns 948 * ======================================================================== 949 * Copyright 2012 Twitter, Inc. 950 * 951 * Licensed under the Apache License, Version 2.0 (the "License"); 952 * you may not use this file except in compliance with the License. 953 * You may obtain a copy of the License at 954 * 955 * http://www.apache.org/licenses/LICENSE-2.0 956 * 957 * Unless required by applicable law or agreed to in writing, software 958 * distributed under the License is distributed on an "AS IS" BASIS, 959 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 960 * See the License for the specific language governing permissions and 961 * limitations under the License. 962 * ======================================================================== */ 963 964 965+function ($) { "use strict"; 966 967 // DROPDOWN CLASS DEFINITION 968 // ========================= 969 970 var backdrop = '.dropdown-backdrop' 971 var toggle = '[data-toggle=dropdown]' 972 var Dropdown = function (element) { 973 var $el = $(element).on('click.bs.dropdown', this.toggle) 974 } 975 976 Dropdown.prototype.toggle = function (e) { 977 var $this = $(this) 978 979 if ($this.is('.disabled, :disabled')) return 980 981 var $parent = getParent($this) 982 var isActive = $parent.hasClass('open') 983 984 clearMenus() 985 986 if (!isActive) { 987 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 988 // if mobile we we use a backdrop because click events don't delegate 989 $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) 990 } 991 992 $parent.trigger(e = $.Event('show.bs.dropdown')) 993 994 if (e.isDefaultPrevented()) return 995 996 $parent 997 .toggleClass('open') 998 .trigger('shown.bs.dropdown') 999 1000 $this.focus() 1001 } 1002 1003 return false 1004 } 1005 1006 Dropdown.prototype.keydown = function (e) { 1007 if (!/(38|40|27)/.test(e.keyCode)) return 1008 1009 var $this = $(this) 1010 1011 e.preventDefault() 1012 e.stopPropagation() 1013 1014 if ($this.is('.disabled, :disabled')) return 1015 1016 var $parent = getParent($this) 1017 var isActive = $parent.hasClass('open') 1018 1019 if (!isActive || (isActive && e.keyCode == 27)) { 1020 if (e.which == 27) $parent.find(toggle).focus() 1021 return $this.click() 1022 } 1023 1024 var $items = $('[role=menu] li:not(.divider):visible a', $parent) 1025 1026 if (!$items.length) return 1027 1028 var index = $items.index($items.filter(':focus')) 1029 1030 if (e.keyCode == 38 && index > 0) index-- // up 1031 if (e.keyCode == 40 && index < $items.length - 1) index++ // down 1032 if (!~index) index=0 1033 1034 $items.eq(index).focus() 1035 } 1036 1037 function clearMenus() { 1038 $(backdrop).remove() 1039 $(toggle).each(function (e) { 1040 var $parent = getParent($(this)) 1041 if (!$parent.hasClass('open')) return 1042 $parent.trigger(e = $.Event('hide.bs.dropdown')) 1043 if (e.isDefaultPrevented()) return 1044 $parent.removeClass('open').trigger('hidden.bs.dropdown') 1045 }) 1046 } 1047 1048 function getParent($this) { 1049 var selector = $this.attr('data-target') 1050 1051 if (!selector) { 1052 selector = $this.attr('href') 1053 selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 1054 } 1055 1056 var $parent = selector && $(selector) 1057 1058 return $parent && $parent.length ? $parent : $this.parent() 1059 } 1060 1061 1062 // DROPDOWN PLUGIN DEFINITION 1063 // ========================== 1064 1065 var old = $.fn.dropdown 1066 1067 $.fn.dropdown = function (option) { 1068 return this.each(function () { 1069 var $this = $(this) 1070 var data = $this.data('dropdown') 1071 1072 if (!data) $this.data('dropdown', (data = new Dropdown(this))) 1073 if (typeof option == 'string') data[option].call($this) 1074 }) 1075 } 1076 1077 $.fn.dropdown.Constructor = Dropdown 1078 1079 1080 // DROPDOWN NO CONFLICT 1081 // ==================== 1082 1083 $.fn.dropdown.noConflict = function () { 1084 $.fn.dropdown = old 1085 return this 1086 } 1087 1088 1089 // APPLY TO STANDARD DROPDOWN ELEMENTS 1090 // =================================== 1091 1092 $(document) 1093 .on('click.bs.dropdown.data-api', clearMenus) 1094 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 1095 .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle) 1096 .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) 1097 1098}(window.jQuery); 1099 1100/* ======================================================================== 1101 * Bootstrap: modal.js v3.0.0 1102 * http://twbs.github.com/bootstrap/javascript.html#modals 1103 * ======================================================================== 1104 * Copyright 2012 Twitter, Inc. 1105 * 1106 * Licensed under the Apache License, Version 2.0 (the "License"); 1107 * you may not use this file except in compliance with the License. 1108 * You may obtain a copy of the License at 1109 * 1110 * http://www.apache.org/licenses/LICENSE-2.0 1111 * 1112 * Unless required by applicable law or agreed to in writing, software 1113 * distributed under the License is distributed on an "AS IS" BASIS, 1114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1115 * See the License for the specific language governing permissions and 1116 * limitations under the License. 1117 * ======================================================================== */ 1118 1119 1120+function ($) { "use strict"; 1121 1122 // MODAL CLASS DEFINITION 1123 // ====================== 1124 1125 var Modal = function (element, options) { 1126 this.options = options 1127 this.$element = $(element) 1128 this.$backdrop = 1129 this.isShown = null 1130 1131 if (this.options.remote) this.$element.load(this.options.remote) 1132 } 1133 1134 Modal.DEFAULTS = { 1135 backdrop: true 1136 , keyboard: true 1137 , show: true 1138 } 1139 1140 Modal.prototype.toggle = function (_relatedTarget) { 1141 return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) 1142 } 1143 1144 Modal.prototype.show = function (_relatedTarget) { 1145 var that = this 1146 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) 1147 1148 this.$element.trigger(e) 1149 1150 if (this.isShown || e.isDefaultPrevented()) return 1151 1152 this.isShown = true 1153 1154 this.escape() 1155 1156 this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) 1157 1158 this.backdrop(function () { 1159 var transition = $.support.transition && that.$element.hasClass('fade') 1160 1161 if (!that.$element.parent().length) { 1162 that.$element.appendTo(document.body) // don't move modals dom position 1163 } 1164 1165 that.$element.show() 1166 1167 if (transition) { 1168 that.$element[0].offsetWidth // force reflow 1169 } 1170 1171 that.$element 1172 .addClass('in') 1173 .attr('aria-hidden', false) 1174 1175 that.enforceFocus() 1176 1177 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) 1178 1179 transition ? 1180 that.$element.find('.modal-dialog') // wait for modal to slide in 1181 .one($.support.transition.end, function () { 1182 that.$element.focus().trigger(e) 1183 }) 1184 .emulateTransitionEnd(300) : 1185 that.$element.focus().trigger(e) 1186 }) 1187 } 1188 1189 Modal.prototype.hide = function (e) { 1190 if (e) e.preventDefault() 1191 1192 e = $.Event('hide.bs.modal') 1193 1194 this.$element.trigger(e) 1195 1196 if (!this.isShown || e.isDefaultPrevented()) return 1197 1198 this.isShown = false 1199 1200 this.escape() 1201 1202 $(document).off('focusin.bs.modal') 1203 1204 this.$element 1205 .removeClass('in') 1206 .attr('aria-hidden', true) 1207 .off('click.dismiss.modal') 1208 1209 $.support.transition && this.$element.hasClass('fade') ? 1210 this.$element 1211 .one($.support.transition.end, $.proxy(this.hideModal, this)) 1212 .emulateTransitionEnd(300) : 1213 this.hideModal() 1214 } 1215 1216 Modal.prototype.enforceFocus = function () { 1217 $(document) 1218 .off('focusin.bs.modal') // guard against infinite focus loop 1219 .on('focusin.bs.modal', $.proxy(function (e) { 1220 if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { 1221 this.$element.focus() 1222 } 1223 }, this)) 1224 } 1225 1226 Modal.prototype.escape = function () { 1227 if (this.isShown && this.options.keyboard) { 1228 this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { 1229 e.which == 27 && this.hide() 1230 }, this)) 1231 } else if (!this.isShown) { 1232 this.$element.off('keyup.dismiss.bs.modal') 1233 } 1234 } 1235 1236 Modal.prototype.hideModal = function () { 1237 var that = this 1238 this.$element.hide() 1239 this.backdrop(function () { 1240 that.removeBackdrop() 1241 that.$element.trigger('hidden.bs.modal') 1242 }) 1243 } 1244 1245 Modal.prototype.removeBackdrop = function () { 1246 this.$backdrop && this.$backdrop.remove() 1247 this.$backdrop = null 1248 } 1249 1250 Modal.prototype.backdrop = function (callback) { 1251 var that = this 1252 var animate = this.$element.hasClass('fade') ? 'fade' : '' 1253 1254 if (this.isShown && this.options.backdrop) { 1255 var doAnimate = $.support.transition && animate 1256 1257 this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') 1258 .appendTo(document.body) 1259 1260 this.$element.on('click.dismiss.modal', $.proxy(function (e) { 1261 if (e.target !== e.currentTarget) return 1262 this.options.backdrop == 'static' 1263 ? this.$element[0].focus.call(this.$element[0]) 1264 : this.hide.call(this) 1265 }, this)) 1266 1267 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 1268 1269 this.$backdrop.addClass('in') 1270 1271 if (!callback) return 1272 1273 doAnimate ? 1274 this.$backdrop 1275 .one($.support.transition.end, callback) 1276 .emulateTransitionEnd(150) : 1277 callback() 1278 1279 } else if (!this.isShown && this.$backdrop) { 1280 this.$backdrop.removeClass('in') 1281 1282 $.support.transition && this.$element.hasClass('fade')? 1283 this.$backdrop 1284 .one($.support.transition.end, callback) 1285 .emulateTransitionEnd(150) : 1286 callback() 1287 1288 } else if (callback) { 1289 callback() 1290 } 1291 } 1292 1293 1294 // MODAL PLUGIN DEFINITION 1295 // ======================= 1296 1297 var old = $.fn.modal 1298 1299 $.fn.modal = function (option, _relatedTarget) { 1300 return this.each(function () { 1301 var $this = $(this) 1302 var data = $this.data('bs.modal') 1303 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) 1304 1305 if (!data) $this.data('bs.modal', (data = new Modal(this, options))) 1306 if (typeof option == 'string') data[option](_relatedTarget) 1307 else if (options.show) data.show(_relatedTarget) 1308 }) 1309 } 1310 1311 $.fn.modal.Constructor = Modal 1312 1313 1314 // MODAL NO CONFLICT 1315 // ================= 1316 1317 $.fn.modal.noConflict = function () { 1318 $.fn.modal = old 1319 return this 1320 } 1321 1322 1323 // MODAL DATA-API 1324 // ============== 1325 1326 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { 1327 var $this = $(this) 1328 var href = $this.attr('href') 1329 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 1330 var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) 1331 1332 e.preventDefault() 1333 1334 $target 1335 .modal(option, this) 1336 .one('hide', function () { 1337 $this.is(':visible') && $this.focus() 1338 }) 1339 }) 1340 1341 $(document) 1342 .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') }) 1343 .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') }) 1344 1345}(window.jQuery); 1346 1347/* ======================================================================== 1348 * Bootstrap: tooltip.js v3.0.0 1349 * http://twbs.github.com/bootstrap/javascript.html#tooltip 1350 * Inspired by the original jQuery.tipsy by Jason Frame 1351 * ======================================================================== 1352 * Copyright 2012 Twitter, Inc. 1353 * 1354 * Licensed under the Apache License, Version 2.0 (the "License"); 1355 * you may not use this file except in compliance with the License. 1356 * You may obtain a copy of the License at 1357 * 1358 * http://www.apache.org/licenses/LICENSE-2.0 1359 * 1360 * Unless required by applicable law or agreed to in writing, software 1361 * distributed under the License is distributed on an "AS IS" BASIS, 1362 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1363 * See the License for the specific language governing permissions and 1364 * limitations under the License. 1365 * ======================================================================== */ 1366 1367 1368+function ($) { "use strict"; 1369 1370 // TOOLTIP PUBLIC CLASS DEFINITION 1371 // =============================== 1372 1373 var Tooltip = function (element, options) { 1374 this.type = 1375 this.options = 1376 this.enabled = 1377 this.timeout = 1378 this.hoverState = 1379 this.$element = null 1380 1381 this.init('tooltip', element, options) 1382 } 1383 1384 Tooltip.DEFAULTS = { 1385 animation: true 1386 , placement: 'top' 1387 , selector: false 1388 , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' 1389 , trigger: 'hover focus' 1390 , title: '' 1391 , delay: 0 1392 , html: false 1393 , container: false 1394 } 1395 1396 Tooltip.prototype.init = function (type, element, options) { 1397 this.enabled = true 1398 this.type = type 1399 this.$element = $(element) 1400 this.options = this.getOptions(options) 1401 1402 var triggers = this.options.trigger.split(' ') 1403 1404 for (var i = triggers.length; i--;) { 1405 var trigger = triggers[i] 1406 1407 if (trigger == 'click') { 1408 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) 1409 } else if (trigger != 'manual') { 1410 var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' 1411 var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' 1412 1413 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) 1414 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) 1415 } 1416 } 1417 1418 this.options.selector ? 1419 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : 1420 this.fixTitle() 1421 } 1422 1423 Tooltip.prototype.getDefaults = function () { 1424 return Tooltip.DEFAULTS 1425 } 1426 1427 Tooltip.prototype.getOptions = function (options) { 1428 options = $.extend({}, this.getDefaults(), this.$element.data(), options) 1429 1430 if (options.delay && typeof options.delay == 'number') { 1431 options.delay = { 1432 show: options.delay 1433 , hide: options.delay 1434 } 1435 } 1436 1437 return options 1438 } 1439 1440 Tooltip.prototype.getDelegateOptions = function () { 1441 var options = {} 1442 var defaults = this.getDefaults() 1443 1444 this._options && $.each(this._options, function (key, value) { 1445 if (defaults[key] != value) options[key] = value 1446 }) 1447 1448 return options 1449 } 1450 1451 Tooltip.prototype.enter = function (obj) { 1452 var self = obj instanceof this.constructor ? 1453 obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) 1454 1455 clearTimeout(self.timeout) 1456 1457 self.hoverState = 'in' 1458 1459 if (!self.options.delay || !self.options.delay.show) return self.show() 1460 1461 self.timeout = setTimeout(function () { 1462 if (self.hoverState == 'in') self.show() 1463 }, self.options.delay.show) 1464 } 1465 1466 Tooltip.prototype.leave = function (obj) { 1467 var self = obj instanceof this.constructor ? 1468 obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) 1469 1470 clearTimeout(self.timeout) 1471 1472 self.hoverState = 'out' 1473 1474 if (!self.options.delay || !self.options.delay.hide) return self.hide() 1475 1476 self.timeout = setTimeout(function () { 1477 if (self.hoverState == 'out') self.hide() 1478 }, self.options.delay.hide) 1479 } 1480 1481 Tooltip.prototype.show = function () { 1482 var e = $.Event('show.bs.'+ this.type) 1483 1484 if (this.hasContent() && this.enabled) { 1485 this.$element.trigger(e) 1486 1487 if (e.isDefaultPrevented()) return 1488 1489 var $tip = this.tip() 1490 1491 this.setContent() 1492 1493 if (this.options.animation) $tip.addClass('fade') 1494 1495 var placement = typeof this.options.placement == 'function' ? 1496 this.options.placement.call(this, $tip[0], this.$element[0]) : 1497 this.options.placement 1498 1499 var autoToken = /\s?auto?\s?/i 1500 var autoPlace = autoToken.test(placement) 1501 if (autoPlace) placement = placement.replace(autoToken, '') || 'top' 1502 1503 $tip 1504 .detach() 1505 .css({ top: 0, left: 0, display: 'block' }) 1506 .addClass(placement) 1507 1508 this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) 1509 1510 var pos = this.getPosition() 1511 var actualWidth = $tip[0].offsetWidth 1512 var actualHeight = $tip[0].offsetHeight 1513 1514 if (autoPlace) { 1515 var $parent = this.$element.parent() 1516 1517 var orgPlacement = placement 1518 var docScroll = document.documentElement.scrollTop || document.body.scrollTop 1519 var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() 1520 var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() 1521 var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left 1522 1523 placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' : 1524 placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' : 1525 placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' : 1526 placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' : 1527 placement 1528 1529 $tip 1530 .removeClass(orgPlacement) 1531 .addClass(placement) 1532 } 1533 1534 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) 1535 1536 this.applyPlacement(calculatedOffset, placement) 1537 this.$element.trigger('shown.bs.' + this.type) 1538 } 1539 } 1540 1541 Tooltip.prototype.applyPlacement = function(offset, placement) { 1542 var replace 1543 var $tip = this.tip() 1544 var width = $tip[0].offsetWidth 1545 var height = $tip[0].offsetHeight 1546 1547 // manually read margins because getBoundingClientRect includes difference 1548 var marginTop = parseInt($tip.css('margin-top'), 10) 1549 var marginLeft = parseInt($tip.css('margin-left'), 10) 1550 1551 // we must check for NaN for ie 8/9 1552 if (isNaN(marginTop)) marginTop = 0 1553 if (isNaN(marginLeft)) marginLeft = 0 1554 1555 offset.top = offset.top + marginTop 1556 offset.left = offset.left + marginLeft 1557 1558 $tip 1559 .offset(offset) 1560 .addClass('in') 1561 1562 // check to see if placing tip in new offset caused the tip to resize itself 1563 var actualWidth = $tip[0].offsetWidth 1564 var actualHeight = $tip[0].offsetHeight 1565 1566 if (placement == 'top' && actualHeight != height) { 1567 replace = true 1568 offset.top = offset.top + height - actualHeight 1569 } 1570 1571 if (/bottom|top/.test(placement)) { 1572 var delta = 0 1573 1574 if (offset.left < 0) { 1575 delta = offset.left * -2 1576 offset.left = 0 1577 1578 $tip.offset(offset) 1579 1580 actualWidth = $tip[0].offsetWidth 1581 actualHeight = $tip[0].offsetHeight 1582 } 1583 1584 this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') 1585 } else { 1586 this.replaceArrow(actualHeight - height, actualHeight, 'top') 1587 } 1588 1589 if (replace) $tip.offset(offset) 1590 } 1591 1592 Tooltip.prototype.replaceArrow = function(delta, dimension, position) { 1593 this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') 1594 } 1595 1596 Tooltip.prototype.setContent = function () { 1597 var $tip = this.tip() 1598 var title = this.getTitle() 1599 1600 $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) 1601 $tip.removeClass('fade in top bottom left right') 1602 } 1603 1604 Tooltip.prototype.hide = function () { 1605 var that = this 1606 var $tip = this.tip() 1607 var e = $.Event('hide.bs.' + this.type) 1608 1609 function complete() { 1610 if (that.hoverState != 'in') $tip.detach() 1611 } 1612 1613 this.$element.trigger(e) 1614 1615 if (e.isDefaultPrevented()) return 1616 1617 $tip.removeClass('in') 1618 1619 $.support.transition && this.$tip.hasClass('fade') ? 1620 $tip 1621 .one($.support.transition.end, complete) 1622 .emulateTransitionEnd(150) : 1623 complete() 1624 1625 this.$element.trigger('hidden.bs.' + this.type) 1626 1627 return this 1628 } 1629 1630 Tooltip.prototype.fixTitle = function () { 1631 var $e = this.$element 1632 if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { 1633 $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') 1634 } 1635 } 1636 1637 Tooltip.prototype.hasContent = function () { 1638 return this.getTitle() 1639 } 1640 1641 Tooltip.prototype.getPosition = function () { 1642 var el = this.$element[0] 1643 return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { 1644 width: el.offsetWidth 1645 , height: el.offsetHeight 1646 }, this.$element.offset()) 1647 } 1648 1649 Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { 1650 return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : 1651 placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : 1652 placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : 1653 /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } 1654 } 1655 1656 Tooltip.prototype.getTitle = function () { 1657 var title 1658 var $e = this.$element 1659 var o = this.options 1660 1661 title = $e.attr('data-original-title') 1662 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) 1663 1664 return title 1665 } 1666 1667 Tooltip.prototype.tip = function () { 1668 return this.$tip = this.$tip || $(this.options.template) 1669 } 1670 1671 Tooltip.prototype.arrow = function () { 1672 return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow') 1673 } 1674 1675 Tooltip.prototype.validate = function () { 1676 if (!this.$element[0].parentNode) { 1677 this.hide() 1678 this.$element = null 1679 this.options = null 1680 } 1681 } 1682 1683 Tooltip.prototype.enable = function () { 1684 this.enabled = true 1685 } 1686 1687 Tooltip.prototype.disable = function () { 1688 this.enabled = false 1689 } 1690 1691 Tooltip.prototype.toggleEnabled = function () { 1692 this.enabled = !this.enabled 1693 } 1694 1695 Tooltip.prototype.toggle = function (e) { 1696 var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this 1697 self.tip().hasClass('in') ? self.leave(self) : self.enter(self) 1698 } 1699 1700 Tooltip.prototype.destroy = function () { 1701 this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) 1702 } 1703 1704 1705 // TOOLTIP PLUGIN DEFINITION 1706 // ========================= 1707 1708 var old = $.fn.tooltip 1709 1710 $.fn.tooltip = function (option) { 1711 return this.each(function () { 1712 var $this = $(this) 1713 var data = $this.data('bs.tooltip') 1714 var options = typeof option == 'object' && option 1715 1716 if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) 1717 if (typeof option == 'string') data[option]() 1718 }) 1719 } 1720 1721 $.fn.tooltip.Constructor = Tooltip 1722 1723 1724 // TOOLTIP NO CONFLICT 1725 // =================== 1726 1727 $.fn.tooltip.noConflict = function () { 1728 $.fn.tooltip = old 1729 return this 1730 } 1731 1732}(window.jQuery); 1733 1734/* ======================================================================== 1735 * Bootstrap: popover.js v3.0.0 1736 * http://twbs.github.com/bootstrap/javascript.html#popovers 1737 * ======================================================================== 1738 * Copyright 2012 Twitter, Inc. 1739 * 1740 * Licensed under the Apache License, Version 2.0 (the "License"); 1741 * you may not use this file except in compliance with the License. 1742 * You may obtain a copy of the License at 1743 * 1744 * http://www.apache.org/licenses/LICENSE-2.0 1745 * 1746 * Unless required by applicable law or agreed to in writing, software 1747 * distributed under the License is distributed on an "AS IS" BASIS, 1748 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1749 * See the License for the specific language governing permissions and 1750 * limitations under the License. 1751 * ======================================================================== */ 1752 1753 1754+function ($) { "use strict"; 1755 1756 // POPOVER PUBLIC CLASS DEFINITION 1757 // =============================== 1758 1759 var Popover = function (element, options) { 1760 this.init('popover', element, options) 1761 } 1762 1763 if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 1764 1765 Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, { 1766 placement: 'right' 1767 , trigger: 'click' 1768 , content: '' 1769 , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' 1770 }) 1771 1772 1773 // NOTE: POPOVER EXTENDS tooltip.js 1774 // ================================ 1775 1776 Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 1777 1778 Popover.prototype.constructor = Popover 1779 1780 Popover.prototype.getDefaults = function () { 1781 return Popover.DEFAULTS 1782 } 1783 1784 Popover.prototype.setContent = function () { 1785 var $tip = this.tip() 1786 var title = this.getTitle() 1787 var content = this.getContent() 1788 1789 $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 1790 $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) 1791 1792 $tip.removeClass('fade top bottom left right in') 1793 1794 // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 1795 // this manually by checking the contents. 1796 if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 1797 } 1798 1799 Popover.prototype.hasContent = function () { 1800 return this.getTitle() || this.getContent() 1801 } 1802 1803 Popover.prototype.getContent = function () { 1804 var $e = this.$element 1805 var o = this.options 1806 1807 return $e.attr('data-content') 1808 || (typeof o.content == 'function' ? 1809 o.content.call($e[0]) : 1810 o.content) 1811 } 1812 1813 Popover.prototype.arrow = function () { 1814 return this.$arrow = this.$arrow || this.tip().find('.arrow') 1815 } 1816 1817 Popover.prototype.tip = function () { 1818 if (!this.$tip) this.$tip = $(this.options.template) 1819 return this.$tip 1820 } 1821 1822 1823 // POPOVER PLUGIN DEFINITION 1824 // ========================= 1825 1826 var old = $.fn.popover 1827 1828 $.fn.popover = function (option) { 1829 return this.each(function () { 1830 var $this = $(this) 1831 var data = $this.data('bs.popover') 1832 var options = typeof option == 'object' && option 1833 1834 if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 1835 if (typeof option == 'string') data[option]() 1836 }) 1837 } 1838 1839 $.fn.popover.Constructor = Popover 1840 1841 1842 // POPOVER NO CONFLICT 1843 // =================== 1844 1845 $.fn.popover.noConflict = function () { 1846 $.fn.popover = old 1847 return this 1848 } 1849 1850}(window.jQuery); 1851 1852/* ======================================================================== 1853 * Bootstrap: scrollspy.js v3.0.0 1854 * http://twbs.github.com/bootstrap/javascript.html#scrollspy 1855 * ======================================================================== 1856 * Copyright 2012 Twitter, Inc. 1857 * 1858 * Licensed under the Apache License, Version 2.0 (the "License"); 1859 * you may not use this file except in compliance with the License. 1860 * You may obtain a copy of the License at 1861 * 1862 * http://www.apache.org/licenses/LICENSE-2.0 1863 * 1864 * Unless required by applicable law or agreed to in writing, software 1865 * distributed under the License is distributed on an "AS IS" BASIS, 1866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1867 * See the License for the specific language governing permissions and 1868 * limitations under the License. 1869 * ======================================================================== */ 1870 1871 1872+function ($) { "use strict"; 1873 1874 // SCROLLSPY CLASS DEFINITION 1875 // ========================== 1876 1877 function ScrollSpy(element, options) { 1878 var href 1879 var process = $.proxy(this.process, this) 1880 1881 this.$element = $(element).is('body') ? $(window) : $(element) 1882 this.$body = $('body') 1883 this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process) 1884 this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 1885 this.selector = (this.options.target 1886 || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 1887 || '') + ' .nav li > a' 1888 this.offsets = $([]) 1889 this.targets = $([]) 1890 this.activeTarget = null 1891 1892 this.refresh() 1893 this.process() 1894 } 1895 1896 ScrollSpy.DEFAULTS = { 1897 offset: 10 1898 } 1899 1900 ScrollSpy.prototype.refresh = function () { 1901 var offsetMethod = this.$element[0] == window ? 'offset' : 'position' 1902 1903 this.offsets = $([]) 1904 this.targets = $([]) 1905 1906 var self = this 1907 var $targets = this.$body 1908 .find(this.selector) 1909 .map(function () { 1910 var $el = $(this) 1911 var href = $el.data('target') || $el.attr('href') 1912 var $href = /^#\w/.test(href) && $(href) 1913 1914 return ($href 1915 && $href.length 1916 && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null 1917 }) 1918 .sort(function (a, b) { return a[0] - b[0] }) 1919 .each(function () { 1920 self.offsets.push(this[0]) 1921 self.targets.push(this[1]) 1922 }) 1923 } 1924 1925 ScrollSpy.prototype.process = function () { 1926 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 1927 var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight 1928 var maxScroll = scrollHeight - this.$scrollElement.height() 1929 var offsets = this.offsets 1930 var targets = this.targets 1931 var activeTarget = this.activeTarget 1932 var i 1933 1934 if (scrollTop >= maxScroll) { 1935 return activeTarget != (i = targets.last()[0]) && this.activate(i) 1936 } 1937 1938 for (i = offsets.length; i--;) { 1939 activeTarget != targets[i] 1940 && scrollTop >= offsets[i] 1941 && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 1942 && this.activate( targets[i] ) 1943 } 1944 } 1945 1946 ScrollSpy.prototype.activate = function (target) { 1947 this.activeTarget = target 1948 1949 $(this.selector) 1950 .parents('.active') 1951 .removeClass('active') 1952 1953 var selector = this.selector 1954 + '[data-target="' + target + '"],' 1955 + this.selector + '[href="' + target + '"]' 1956 1957 var active = $(selector) 1958 .parents('li') 1959 .addClass('active') 1960 1961 if (active.parent('.dropdown-menu').length) { 1962 active = active 1963 .closest('li.dropdown') 1964 .addClass('active') 1965 } 1966 1967 active.trigger('activate') 1968 } 1969 1970 1971 // SCROLLSPY PLUGIN DEFINITION 1972 // =========================== 1973 1974 var old = $.fn.scrollspy 1975 1976 $.fn.scrollspy = function (option) { 1977 return this.each(function () { 1978 var $this = $(this) 1979 var data = $this.data('bs.scrollspy') 1980 var options = typeof option == 'object' && option 1981 1982 if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 1983 if (typeof option == 'string') data[option]() 1984 }) 1985 } 1986 1987 $.fn.scrollspy.Constructor = ScrollSpy 1988 1989 1990 // SCROLLSPY NO CONFLICT 1991 // ===================== 1992 1993 $.fn.scrollspy.noConflict = function () { 1994 $.fn.scrollspy = old 1995 return this 1996 } 1997 1998 1999 // SCROLLSPY DATA-API 2000 // ================== 2001 2002 $(window).on('load', function () { 2003 $('[data-spy="scroll"]').each(function () { 2004 var $spy = $(this) 2005 $spy.scrollspy($spy.data()) 2006 }) 2007 }) 2008 2009}(window.jQuery); 2010 2011/* ======================================================================== 2012 * Bootstrap: tab.js v3.0.0 2013 * http://twbs.github.com/bootstrap/javascript.html#tabs 2014 * ======================================================================== 2015 * Copyright 2012 Twitter, Inc. 2016 * 2017 * Licensed under the Apache License, Version 2.0 (the "License");
2018 * you may not use this file except in compliance with the License. 2019 * You may obtain a copy of the License at 2020 * 2021 * http://www.apache.org/licenses/LICENSE-2.0 2022 * 2023 * Unless required by applicable law or agreed to in writing, software 2024 * distributed under the License is distributed on an "AS IS" BASIS, 2025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2026 * See the License for the specific language governing permissions and 2027 * limitations under the License. 2028 * ======================================================================== */ 2029 2030 2031+function ($) { "use strict"; 2032 2033 // TAB CLASS DEFINITION 2034 // ==================== 2035 2036 var Tab = function (element) { 2037 this.element = $(element) 2038 } 2039 2040 Tab.prototype.show = function () { 2041 var $this = this.element 2042 var $ul = $this.closest('ul:not(.dropdown-menu)') 2043 var selector = $this.attr('data-target') 2044 2045 if (!selector) { 2046 selector = $this.attr('href') 2047 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 2048 } 2049 2050 if ($this.parent('li').hasClass('active')) return 2051 2052 var previous = $ul.find('.active:last a')[0] 2053 var e = $.Event('show.bs.tab', { 2054 relatedTarget: previous 2055 }) 2056 2057 $this.trigger(e) 2058 2059 if (e.isDefaultPrevented()) return 2060 2061 var $target = $(selector) 2062 2063 this.activate($this.parent('li'), $ul) 2064 this.activate($target, $target.parent(), function () { 2065 $this.trigger({ 2066 type: 'shown.bs.tab' 2067 , relatedTarget: previous 2068 }) 2069 }) 2070 } 2071 2072 Tab.prototype.activate = function (element, container, callback) { 2073 var $active = container.find('> .active') 2074 var transition = callback 2075 && $.support.transition 2076 && $active.hasClass('fade') 2077 2078 function next() { 2079 $active 2080 .removeClass('active') 2081 .find('> .dropdown-menu > .active') 2082 .removeClass('active') 2083 2084 element.addClass('active') 2085 2086 if (transition) { 2087 element[0].offsetWidth // reflow for transition 2088 element.addClass('in') 2089 } else { 2090 element.removeClass('fade') 2091 } 2092 2093 if (element.parent('.dropdown-menu')) { 2094 element.closest('li.dropdown').addClass('active') 2095 } 2096 2097 callback && callback() 2098 } 2099 2100 transition ? 2101 $active 2102 .one($.support.transition.end, next) 2103 .emulateTransitionEnd(150) : 2104 next() 2105 2106 $active.removeClass('in') 2107 } 2108 2109 2110 // TAB PLUGIN DEFINITION 2111 // ===================== 2112 2113 var old = $.fn.tab 2114 2115 $.fn.tab = function ( option ) { 2116 return this.each(function () { 2117 var $this = $(this) 2118 var data = $this.data('bs.tab') 2119 2120 if (!data) $this.data('bs.tab', (data = new Tab(this))) 2121 if (typeof option == 'string') data[option]() 2122 }) 2123 } 2124 2125 $.fn.tab.Constructor = Tab 2126 2127 2128 // TAB NO CONFLICT 2129 // =============== 2130 2131 $.fn.tab.noConflict = function () { 2132 $.fn.tab = old 2133 return this 2134 } 2135 2136 2137 // TAB DATA-API 2138 // ============ 2139 2140 $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { 2141 e.preventDefault() 2142 $(this).tab('show') 2143 }) 2144 2145}(window.jQuery); 2146 2147/* ======================================================================== 2148 * Bootstrap: affix.js v3.0.0 2149 * http://twbs.github.com/bootstrap/javascript.html#affix 2150 * ======================================================================== 2151 * Copyright 2012 Twitter, Inc. 2152 * 2153 * Licensed under the Apache License, Version 2.0 (the "License"); 2154 * you may not use this file except in compliance with the License. 2155 * You may obtain a copy of the License at 2156 * 2157 * http://www.apache.org/licenses/LICENSE-2.0 2158 * 2159 * Unless required by applicable law or agreed to in writing, software 2160 * distributed under the License is distributed on an "AS IS" BASIS, 2161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2162 * See the License for the specific language governing permissions and 2163 * limitations under the License. 2164 * ======================================================================== */ 2165 2166 2167+function ($) { "use strict"; 2168 2169 // AFFIX CLASS DEFINITION 2170 // ====================== 2171 2172 var Affix = function (element, options) { 2173 this.options = $.extend({}, Affix.DEFAULTS, options) 2174 this.$window = $(window) 2175 .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 2176 .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 2177 2178 this.$element = $(element) 2179 this.affixed = 2180 this.unpin = null 2181 2182 this.checkPosition() 2183 } 2184 2185 Affix.RESET = 'affix affix-top affix-bottom' 2186 2187 Affix.DEFAULTS = { 2188 offset: 0 2189 } 2190 2191 Affix.prototype.checkPositionWithEventLoop = function () { 2192 setTimeout($.proxy(this.checkPosition, this), 1) 2193 } 2194 2195 Affix.prototype.checkPosition = function () { 2196 if (!this.$element.is(':visible')) return 2197 2198 var scrollHeight = $(document).height() 2199 var scrollTop = this.$window.scrollTop() 2200 var position = this.$element.offset() 2201 var offset = this.options.offset 2202 var offsetTop = offset.top 2203 var offsetBottom = offset.bottom 2204 2205 if (typeof offset != 'object') offsetBottom = offsetTop = offset 2206 if (typeof offsetTop == 'function') offsetTop = offset.top() 2207 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() 2208 2209 var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : 2210 offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : 2211 offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false 2212 2213 if (this.affixed === affix) return 2214 if (this.unpin) this.$element.css('top', '') 2215 2216 this.affixed = affix 2217 this.unpin = affix == 'bottom' ? position.top - scrollTop : null 2218 2219 this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : '')) 2220 2221 if (affix == 'bottom') { 2222 this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() }) 2223 } 2224 } 2225 2226 2227 // AFFIX PLUGIN DEFINITION 2228 // ======================= 2229 2230 var old = $.fn.affix 2231 2232 $.fn.affix = function (option) { 2233 return this.each(function () { 2234 var $this = $(this) 2235 var data = $this.data('bs.affix') 2236 var options = typeof option == 'object' && option 2237 2238 if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 2239 if (typeof option == 'string') data[option]() 2240 }) 2241 } 2242 2243 $.fn.affix.Constructor = Affix 2244 2245 2246 // AFFIX NO CONFLICT 2247 // ================= 2248 2249 $.fn.affix.noConflict = function () { 2250 $.fn.affix = old 2251 return this 2252 } 2253 2254 2255 // AFFIX DATA-API 2256 // ============== 2257 2258 $(window).on('load', function () { 2259 $('[data-spy="affix"]').each(function () { 2260 var $spy = $(this) 2261 var data = $spy.data() 2262 2263 data.offset = data.offset || {} 2264 2265 if (data.offsetBottom) data.offset.bottom = data.offsetBottom 2266 if (data.offsetTop) data.offset.top = data.offsetTop 2267 2268 $spy.affix(data) 2269 }) 2270 }) 2271 2272}(window.jQuery); 2273; 2274/*! 2275 * imagesLoaded PACKAGED v3.1.8 2276 * JavaScript is all like "You images are done yet or what?" 2277 * MIT License 2278 */ 2279 2280(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1
2280);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit
vendor: 4,310 bytes, lines 2280-2395
2280("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});; 2281/* 2282 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 2283 * 2284 * Uses the built in easing capabilities added In jQuery 1.1 2285 * to offer multiple easing options 2286 * 2287 * TERMS OF USE - jQuery Easing 2288 * 2289 * Open source under the BSD License. 2290 * 2291 * Copyright © 2008 George McGinley Smith 2292 * All rights reserved. 2293 * 2294 * Redistribution and use in source and binary forms, with or without modification, 2295 * are permitted provided that the following conditions are met: 2296 * 2297 * Redistributions of source code must retain the above copyright notice, this list of 2298 * conditions and the following disclaimer. 2299 * Redistributions in binary form must reproduce the above copyright notice, this list 2300 * of conditions and the following disclaimer in the documentation and/or other materials 2301 * provided with the distribution. 2302 * 2303 * Neither the name of the author nor the names of contributors may be used to endorse 2304 * or promote products derived from this software without specific prior written permission. 2305 * 2306 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 2307 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2308 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 2309 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 2310 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2311 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2312 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 2313 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 2314 * OF THE POSSIBILITY OF SUCH DAMAGE. 2315 * 2316*/ 2317 2318// t: current time, b: begInnIng value, c: change In value, d: duration 2319jQuery.easing['jswing'] = jQuery.easing['swing']; 2320 2321jQuery.extend( jQuery.easing, 2322{ 2323 def: 'easeOutQuad', 2324 swing: function (x, t, b, c, d) { 2325 //alert(jQuery.easing.default); 2326 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 2327 }, 2328 easeInQuad: function (x, t, b, c, d) { 2329 return c*(t/=d)*t + b; 2330 }, 2331 easeOutQuad: function (x, t, b, c, d) { 2332 return -c *(t/=d)*(t-2) + b; 2333 }, 2334 easeInOutQuad: function (x, t, b, c, d) { 2335 if ((t/=d/2) < 1) return c/2*t*t + b; 2336 return -c/2 * ((--t)*(t-2) - 1) + b; 2337 }, 2338 easeInCubic: function (x, t, b, c, d) { 2339 return c*(t/=d)*t*t + b; 2340 }, 2341 easeOutCubic: function (x, t, b, c, d) { 2342 return c*((t=t/d-1)*t*t + 1) + b; 2343 }, 2344 easeInOutCubic: function (x, t, b, c, d) { 2345 if ((t/=d/2) < 1) return c/2*t*t*t + b; 2346 return c/2*((t-=2)*t*t + 2) + b; 2347 }, 2348 easeInQuart: function (x, t, b, c, d) { 2349 return c*(t/=d)*t*t*t + b; 2350 }, 2351 easeOutQuart: function (x, t, b, c, d) { 2352 return -c * ((t=t/d-1)*t*t*t - 1) + b; 2353 }, 2354 easeInOutQuart: function (x, t, b, c, d) { 2355 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 2356 return -c/2 * ((t-=2)*t*t*t - 2) + b; 2357 }, 2358 easeInQuint: function (x, t, b, c, d) { 2359 return c*(t/=d)*t*t*t*t + b; 2360 }, 2361 easeOutQuint: function (x, t, b, c, d) { 2362 return c*((t=t/d-1)*t*t*t*t + 1) + b; 2363 }, 2364 easeInOutQuint: function (x, t, b, c, d) { 2365 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 2366 return c/2*((t-=2)*t*t*t*t + 2) + b; 2367 }, 2368 easeInSine: function (x, t, b, c, d) { 2369 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 2370 }, 2371 easeOutSine: function (x, t, b, c, d) { 2372 return c * Math.sin(t/d * (Math.PI/2)) + b; 2373 }, 2374 easeInOutSine: function (x, t, b, c, d) { 2375 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 2376 }, 2377 easeInExpo: function (x, t, b, c, d) { 2378 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 2379 }, 2380 easeOutExpo: function (x, t, b, c, d) { 2381 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 2382 }, 2383 easeInOutExpo: function (x, t, b, c, d) { 2384 if (t==0) return b; 2385 if (t==d) return b+c; 2386 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 2387 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 2388 }, 2389 easeInCirc: function (x, t, b, c, d) { 2390 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 2391 }, 2392 easeOutCirc: function (x, t, b, c, d) { 2393 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 2394 }, 2395 easeInOutCirc: function (x, t, b, c, d) {
2396 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 2397 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 2398 }, 2399 easeInElastic: function (x, t, b, c, d) { 2400 var s=1.70158;var p=0;var a=c; 2401 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 2402 if (a < Math.abs(c)) { a=c; var s=p/4; } 2403 else var s = p/(2*Math.PI) * Math.asin (c/a); 2404 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 2405 }, 2406 easeOutElastic: function (x, t, b, c, d) { 2407 var s=1.70158;var p=0;var a=c; 2408 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 2409 if (a < Math.abs(c)) { a=c; var s=p/4; } 2410 else var s = p/(2*Math.PI) * Math.asin (c/a); 2411 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 2412 }, 2413 easeInOutElastic: function (x, t, b, c, d) { 2414 var s=1.70158;var p=0;var a=c; 2415 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 2416 if (a < Math.abs(c)) { a=c; var s=p/4; } 2417 else var s = p/(2*Math.PI) * Math.asin (c/a); 2418 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 2419 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 2420 }, 2421 easeInBack: function (x, t, b, c, d, s) { 2422 if (s == undefined) s = 1.70158; 2423 return c*(t/=d)*t*((s+1)*t - s) + b; 2424 }, 2425 easeOutBack: function (x, t, b, c, d, s) { 2426 if (s == undefined) s = 1.70158; 2427 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 2428 }, 2429 easeInOutBack: function (x, t, b, c, d, s) { 2430 if (s == undefined) s = 1.70158; 2431 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 2432 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 2433 }, 2434 easeInBounce: function (x, t, b, c, d) { 2435 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 2436 }, 2437 easeOutBounce: function (x, t, b, c, d) { 2438 if ((t/=d) < (1/2.75)) { 2439 return c*(7.5625*t*t) + b; 2440 } else if (t < (2/2.75)) { 2441 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 2442 } else if (t < (2.5/2.75)) { 2443 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 2444 } else { 2445 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 2446 } 2447 }, 2448 easeInOutBounce: function (x, t, b, c, d) { 2449 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 2450 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 2451 } 2452}); 2453 2454/* 2455 * 2456 * TERMS OF USE - EASING EQUATIONS 2457 * 2458 * Open source under the BSD License. 2459 * 2460 * Copyright © 2001 Robert Penner 2461 * All rights reserved. 2462 * 2463 * Redistribution and use in source and binary forms, with or without modification, 2464 * are permitted provided that the following conditions are met: 2465 * 2466 * Redistributions of source code must retain the above copyright notice, this list of 2467 * conditions and the following disclaimer. 2468 * Redistributions in binary form must reproduce the above copyright notice, this list 2469 * of conditions and the following disclaimer in the documentation and/or other materials 2470 * provided with the distribution. 2471 * 2472 * Neither the name of the author nor the names of contributors may be used to endorse 2473 * or promote products derived from this software without specific prior written permission. 2474 * 2475 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 2476 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2477 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 2478 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 2479 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2480 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2481 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 2482 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 2483 * OF THE POSSIBILITY OF SUCH DAMAGE. 2484 * 2485 */; 2486/* 2487 * jQuery.appear 2488 * https://github.com/bas2k/jquery.appear/ 2489 * http://code.google.com/p/jquery-appear/ 2490 * 2491 * Copyright (c) 2009 Michael Hixson 2492 * Copyright (c) 2012 Alexander Brovikov 2493 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 2494 */ 2495(function($) { 2496 $.fn.appear = function(fn, options) { 2497 2498 var settings = $.extend({ 2499 2500 //arbitrary data to pass to fn 2501 data: undefined, 2502 2503 //call fn only on the first appear? 2504 one: true, 2505 2506 // X & Y accuracy 2507 accX: 0, 2508 accY: 0 2509 2510 }, options); 2511 2512 return this.each(function() { 2513 2514 var t = $(this); 2515 2516 //whether the element is currently visible 2517 t.appeared = false; 2518 2519 if (!fn) { 2520 2521 //trigger the custom event 2522 t.trigger('appear', settings.data); 2523 return; 2524 } 2525 2526 var w = $(window); 2527 2528 //fires the appear event when appropriate 2529 var check = function() { 2530 2531 //is the element hidden? 2532 if (!t.is(':visible')) { 2533 2534 //it became hidden 2535 t.appeared = false; 2536 return; 2537 } 2538 2539 //is the element inside the visible window? 2540 var a = w.scrollLeft(); 2541 var b = w.scrollTop(); 2542 var o = t.offset(); 2543 var x = o.left; 2544 var y = o.top; 2545 2546 var ax = settings.accX; 2547 var ay = settings.accY; 2548 var th = t.height(); 2549 var wh = w.height(); 2550 var tw = t.width(); 2551 var ww = w.width(); 2552 2553 if (y + th + ay >= b && 2554 y <= b + wh + ay && 2555 x + tw + ax >= a && 2556 x <= a + ww + ax) { 2557 2558 //trigger the custom event 2559 if (!t.appeared) t.trigger('appear', settings.data); 2560 2561 } else { 2562 2563 //it scrolled out of view 2564 t.appeared = false; 2565 } 2566 }; 2567 2568 //create a modified fn with some additional logic 2569 var modifiedFn = function() { 2570 2571 //mark the element as visible 2572 t.appeared = true; 2573 2574 //is this supposed to happen only once? 2575 if (settings.one) { 2576 2577 //remove the check 2578 w.unbind('scroll', check); 2579 var i = $.inArray(check, $.fn.appear.checks); 2580 if (i >= 0) $.fn.appear.checks.splice(i, 1); 2581 } 2582 2583 //trigger the original fn 2584 fn.apply(this, arguments); 2585 }; 2586 2587 //bind the modified fn to the element 2588 if (settings.one) t.one('appear', settings.data, modifiedFn); 2589 else t.bind('appear', settings.data, modifiedFn); 2590 2591 //check whenever the window scrolls 2592 w.scroll(check); 2593 2594 //check whenever the dom changes 2595 $.fn.appear.checks.push(check); 2596 2597 //check now 2598 (check)();
2599 }); 2600 }; 2601 2602 //keep a queue of appearance checks 2603 $.extend($.fn.appear, { 2604 2605 checks: [], 2606 timeout: null, 2607 2608 //process the queue 2609 checkAll: function() { 2610 var length = $.fn.appear.checks.length; 2611 if (length > 0) while (length--) ($.fn.appear.checks[length])(); 2612 }, 2613 2614 //check the queue asynchronously 2615 run: function() { 2616 if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); 2617 $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20); 2618 } 2619 }); 2620 2621 //run checks when these methods are called 2622 $.each(['append', 'prepend', 'after', 'before', 'attr', 2623 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 2624 'remove', 'css', 'show', 'hide'], function(i, n) { 2625 var old = $.fn[n]; 2626 if (old) { 2627 $.fn[n] = function() { 2628 var r = old.apply(this, arguments); 2629 $.fn.appear.run(); 2630 return r; 2631 } 2632 } 2633 }); 2634 2635})(jQuery);; 2636// Generated by CoffeeScript 1.6.3 2637/* 2638Easy pie chart is a jquery plugin to display simple animated pie charts for only one value 2639 2640Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 2641and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 2642 2643Built on top of the jQuery library (http://jquery.com) 2644 2645@source: http://github.com/rendro/easy-pie-chart/ 2646@autor: Robert Fleischmann 2647@version: 1.2.2 2648 2649Inspired by: http://dribbble.com/shots/631074-Simple-Pie-Charts-II?list=popular&offset=210 2650Thanks to Philip Thrasher for the jquery plugin boilerplate for coffee script 2651*/ 2652 2653(function($) { 2654 $.easyPieChart = function(el, options) { 2655 var addScaleLine, animateLine, drawLine, easeInOutQuad, rAF, renderBackground, renderScale, renderTrack, 2656 _this = this; 2657 this.el = el; 2658 this.$el = $(el); 2659 this.$el.data("easyPieChart", this); 2660 this.init = function() { 2661 var percent, scaleBy; 2662 _this.options = $.extend({}, $.easyPieChart.defaultOptions, options); 2663 percent = parseInt(_this.$el.data('percent'), 10); 2664 _this.percentage = 0; 2665 _this.canvas = $("<canvas width='" + _this.options.size + "' height='" + _this.options.size + "'></canvas>").get(0); 2666 _this.$el.append(_this.canvas); 2667 if (typeof G_vmlCanvasManager !== "undefined" && G_vmlCanvasManager !== null) { 2668 G_vmlCanvasManager.initElement(_this.canvas); 2669 } 2670 _this.ctx = _this.canvas.getContext('2d'); 2671 if (window.devicePixelRatio > 1) { 2672 scaleBy = window.devicePixelRatio; 2673 $(_this.canvas).css({ 2674 width: _this.options.size, 2675 height: _this.options.size 2676 }); 2677 _this.canvas.width *= scaleBy; 2678 _this.canvas.height *= scaleBy; 2679 _this.ctx.scale(scaleBy, scaleBy); 2680 } 2681 _this.ctx.translate(_this.options.size / 2, _this.options.size / 2); 2682 _this.ctx.rotate(_this.options.rotate * Math.PI / 180); 2683 _this.$el.addClass('easyPieChart'); 2684 _this.$el.css({ 2685 width: _this.options.size, 2686 height: _this.options.size, 2687 lineHeight: "" + _this.options.size + "px" 2688 }); 2689 _this.update(percent); 2690 return _this; 2691 }; 2692 this.update = function(percent) { 2693 percent = parseFloat(percent) || 0; 2694 if (_this.options.animate === false) { 2695 drawLine(percent); 2696 } else { 2697 animateLine(_this.percentage, percent); 2698 } 2699 return _this; 2700 }; 2701 renderScale = function() { 2702 var i, _i, _results; 2703 _this.ctx.fillStyle = _this.options.scaleColor; 2704 _this.ctx.lineWidth = 1; 2705 _results = []; 2706 for (i = _i = 0; _i <= 24; i = ++_i) { 2707 _results.push(addScaleLine(i)); 2708 } 2709 return _results; 2710 }; 2711 addScaleLine = function(i) { 2712 var offset; 2713 offset = i % 6 === 0 ? 0 : _this.options.size * 0.017; 2714 _this.ctx.save(); 2715 _this.ctx.rotate(i * Math.PI / 12); 2716 _this.ctx.fillRect(_this.options.size / 2 - offset, 0, -_this.options.size * 0.05 + offset, 1); 2717 _this.ctx.restore(); 2718 }; 2719 renderTrack = function() { 2720 var offset; 2721 offset = _this.options.size / 2 - _this.options.lineWidth / 2; 2722 if (_this.options.scaleColor !== false) { 2723 offset -= _this.options.size * 0.08; 2724 } 2725 _this.ctx.beginPath(); 2726 _this.ctx.arc(0, 0, offset, 0, Math.PI * 2, true); 2727 _this.ctx.closePath(); 2728 _this.ctx.strokeStyle = _this.options.trackColor; 2729 _this.ctx.lineWidth = _this.options.lineWidth; 2730 _this.ctx.stroke(); 2731 };
2732 renderBackground = function() { 2733 if (_this.options.scaleColor !== false) { 2734 renderScale(); 2735 } 2736 if (_this.options.trackColor !== false) { 2737 renderTrack(); 2738 } 2739 }; 2740 drawLine = function(percent) { 2741 var offset; 2742 renderBackground(); 2743 _this.ctx.strokeStyle = $.isFunction(_this.options.barColor) ? _this.options.barColor(percent) : _this.options.barColor; 2744 _this.ctx.lineCap = _this.options.lineCap; 2745 _this.ctx.lineWidth = _this.options.lineWidth; 2746 offset = _this.options.size / 2 - _this.options.lineWidth / 2; 2747 if (_this.options.scaleColor !== false) { 2748 offset -= _this.options.size * 0.08; 2749 } 2750 _this.ctx.save(); 2751 _this.ctx.rotate(-Math.PI / 2); 2752 _this.ctx.beginPath(); 2753 _this.ctx.arc(0, 0, offset, 0, Math.PI * 2 * percent / 100, false); 2754 _this.ctx.stroke(); 2755 _this.ctx.restore(); 2756 }; 2757 rAF = (function() { 2758 return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { 2759 return window.setTimeout(callback, 1000 / 60); 2760 }; 2761 })(); 2762 animateLine = function(from, to) { 2763 var anim, startTime; 2764 _this.options.onStart.call(_this); 2765 _this.percentage = to; 2766 startTime = Date.now(); 2767 anim = function() { 2768 var currentValue, process; 2769 process = Date.now() - startTime; 2770 if (process < _this.options.animate) { 2771 rAF(anim); 2772 } 2773 _this.ctx.clearRect(-_this.options.size / 2, -_this.options.size / 2, _this.options.size, _this.options.size); 2774 renderBackground.call(_this); 2775 currentValue = [easeInOutQuad(process, from, to - from, _this.options.animate)]; 2776 _this.options.onStep.call(_this, currentValue); 2777 drawLine.call(_this, currentValue); 2778 if (process >= _this.options.animate) { 2779 return _this.options.onStop.call(_this, currentValue, to); 2780 } 2781 }; 2782 rAF(anim); 2783 }; 2784 easeInOutQuad = function(t, b, c, d) { 2785 var easeIn, easing; 2786 easeIn = function(t) { 2787 return Math.pow(t, 2); 2788 }; 2789 easing = function(t) { 2790 if (t < 1) { 2791 return easeIn(t); 2792 } else { 2793 return 2 - easeIn((t / 2) * -2 + 2); 2794 } 2795 }; 2796 t /= d / 2; 2797 return c / 2 * easing(t) + b; 2798 }; 2799 return this.init(); 2800 }; 2801 $.easyPieChart.defaultOptions = { 2802 barColor: '#ef1e25', 2803 trackColor: '#f2f2f2', 2804 scaleColor: '#dfe0e0', 2805 lineCap: 'round', 2806 rotate: 0, 2807 size: 110, 2808 lineWidth: 3, 2809 animate: false, 2810 onStart: $.noop, 2811 onStop: $.noop, 2812 onStep: $.noop 2813 }; 2814 $.fn.easyPieChart = function(options) { 2815 return $.each(this, function(i, el) { 2816 var $el, instanceOptions; 2817 $el = $(el); 2818 if (!$el.data('easyPieChart')) { 2819 instanceOptions = $.extend({}, options, $el.data()); 2820 return $el.data('easyPieChart', new $.easyPieChart(el, instanceOptions)); 2821 } 2822 }); 2823 }; 2824 return void 0; 2825})(jQuery);; 2826!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),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"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,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"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.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(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>
vendor: 5,241 bytes, line 2826
2826d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.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")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),c=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return b>h-e&&h+e>b?d=a:this.op(b,"<",h)&&this.op(b,">
2826",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=this._items.length,f=c?0:this._clones.length;return!a.isNumeric(b)||1>e?b=d:(0>b||b>=e+f)&&(b=((b-f/2)%e+e)%e+f/2),b},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c=this.settings,d=this._coordinates.length,e=Math.abs(this._coordinates[d-1])-this._width,f=-1;if(c.loop)d=this._clones.length/2+this._items.length-1;else if(c.autoWidth||c.merge)for(;d-f>1;)Math.abs(this._coordinates[b=d+f>>1])<e?f=b:d=b;else d=c.center?this._items.length-1:this._items.length-c.items;return a&&(d-=this._clones.length/2),Math.max(d,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()}
vendor: 3,685 bytes, line 2826
2826,this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),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")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}
vendor: 18,033 bytes, lines 2826-2827
2826),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f)),h),f++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c);heights=[],maxheight=0,a.each(d,function(b,c){heights.push(a(c).height())}),maxheight=Math.max.apply(null,heights),this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},e.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")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="http://www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type&&(c='<iframe src="http://player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name&&(this._core.settings.autoplay?this.play():this.stop())},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){ 2827this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(d,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._interval=b.setInterval(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout))},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearInterval(this._interval),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,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":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":
2827a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);; 2828/*! 2829Waypoints - 4.0.0 2830Copyright © 2011-2015 Caleb Troughton 2831Licensed under the MIT license. 2832https://github.com/imakewebthings/waypoints/blog/master/licenses.txt 2833*/ 2834!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()}
vendor: 5,106 bytes, line 2834
2834,t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],r
2834ight:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); 2835 2836(function ($) { 2837 'use strict' 2838 2839 var $ = window.jQuery 2840 var Waypoint = window.Waypoint 2841 2842 function Sticky(options) { 2843 this.options = $.extend({}, Waypoint.defaults, Sticky.defaults, options) 2844 this.element = this.options.element 2845 this.$element = $(this.element) 2846 this.createWrapper() 2847 this.createWaypoint() 2848 } 2849 2850 Sticky.prototype.createWaypoint = function() { 2851 var originalHandler = this.options.handler 2852 2853 this.waypoint = new Waypoint($.extend({}, this.options, { 2854 element: this.wrapper, 2855 handler: $.proxy(function(direction) { 2856 var shouldBeStuck = this.options.direction.indexOf(direction) > -1 2857 var wrapperHeight = shouldBeStuck ? this.$element.outerHeight(true) : '' 2858 2859 this.$wrapper.height(wrapperHeight) 2860 this.$element.toggleClass(this.options.stuckClass, shouldBeStuck) 2861 2862 if (originalHandler) { 2863 originalHandler.call(this, direction) 2864 } 2865 }, this) 2866 })) 2867 } 2868 2869 Sticky.prototype.createWrapper = function() { 2870 if (this.options.wrapper) { 2871 this.$element.wrap(this.options.wrapper) 2872 } 2873 this.$wrapper = this.$element.parent() 2874 this.wrapper = this.$wrapper[0] 2875 } 2876 2877 Sticky.prototype.destroy = function() { 2878 if (this.$element.parent()[0] === this.wrapper) { 2879 this.waypoint.destroy() 2880 this.$element.removeClass(this.options.stuckClass) 2881 if (this.options.wrapper) { 2882 this.$element.unwrap() 2883 } 2884 } 2885 } 2886$(document).ready(function(){ 2887 Sticky.defaults = { 2888 wrapper: '<div class="sticky-wrapper" />', 2889 stuckClass: 'stuck', 2890 direction: 'down right' 2891 }
2892 Waypoint.Sticky = Sticky 2893}); 2894})(jQuery);; 2895(function ($) { 2896 $.fn.countTo = function (options) { 2897 options = options || {}; 2898 2899 return $(this).each(function () { 2900 // set options for current element 2901 var settings = $.extend({}, $.fn.countTo.defaults, { 2902 from: $(this).data('from'), 2903 to: $(this).data('to'), 2904 speed: $(this).data('speed'), 2905 refreshInterval: $(this).data('refresh-interval'), 2906 decimals: $(this).data('decimals') 2907 }, options); 2908 2909 // how many times to update the value, and how much to increment the value on each update 2910 var loops = Math.ceil(settings.speed / settings.refreshInterval), 2911 increment = (settings.to - settings.from) / loops; 2912 2913 // references & variables that will change with each update 2914 var self = this, 2915 $self = $(this), 2916 loopCount = 0, 2917 value = settings.from, 2918 data = $self.data('countTo') || {}; 2919 2920 $self.data('countTo', data); 2921 2922 // if an existing interval can be found, clear it first 2923 if (data.interval) { 2924 clearInterval(data.interval); 2925 } 2926 data.interval = setInterval(updateTimer, settings.refreshInterval); 2927 2928 // initialize the element with the starting value 2929 render(value); 2930 2931 function updateTimer() { 2932 value += increment; 2933 loopCount++; 2934 2935 render(value); 2936
2937 if (typeof(settings.onUpdate) == 'function') { 2938 settings.onUpdate.call(self, value); 2939 } 2940 2941 if (loopCount >= loops) { 2942 // remove the interval 2943 $self.removeData('countTo'); 2944 clearInterval(data.interval); 2945 value = settings.to; 2946 2947 if (typeof(settings.onComplete) == 'function') { 2948 settings.onComplete.call(self, value); 2949 } 2950 } 2951 } 2952 2953 function render(value) { 2954 var formattedValue = settings.formatter.call(self, value, settings); 2955 $self.html(formattedValue); 2956 } 2957 }); 2958 }; 2959 2960 $.fn.countTo.defaults = { 2961 from: 0, // the number the element should start at 2962 to: 0, // the number the element should end at 2963 speed: 1000, // how long it should take to count between the target numbers 2964 refreshInterval: 100, // how often the element should be updated 2965 decimals: 0, // the number of decimal places to show 2966 formatter: formatter, // handler for formatting the value before rendering 2967 onUpdate: null, // callback method for every time the element is updated 2968 onComplete: null // callback method for when the element finishes updating 2969 }; 2970 2971 function formatter(value, settings) { 2972 return value.toFixed(settings.decimals); 2973 } 2974}(jQuery));; 2975/*! 2976 * Masonry PACKAGED v3.1.5 2977 * Cascading grid layout library 2978 * http://masonry.desandro.com 2979 * MIT License 2980 * by David DeSandro 2981 */ 2982 2983!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c(a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():f.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==e.readyState;if(!b.isReady&&!c){b.isReady=!0;for(var d=0,g=f.length;g>d;d++){var h=f[d];h()}}}function d(d){return d.bind(e,"DOMContentLoaded",c),d.bind(e,"readystatechange",c),d.bind(a,"load",c),b}var e=a.document,f=[];b.isReady=!1,"function"==typeof define&&define.amd?(b.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],d)):a.docReady=d(a.eventie)}(this),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);
2983else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function d(a){function d(a){if("string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var d=f(a);if("none"===d.display)return c();var e={};e.width=a.offsetWidth,e.height=a.offsetHeight;for(var k=e.isBorderBox=!(!j||!d[j]||"border-box"!==d[j]),l=0,m=g.length;m>l;l++){var n=g[l],o=d[n];o=h(a,o);var p=parseFloat(o);e[n]=isNaN(p)?0:p}var q=e.paddingLeft+e.paddingRight,r=e.paddingTop+e.paddingBottom,s=e.marginLeft+e.marginRight,t=e.marginTop+e.marginBottom,u=e.borderLeftWidth+e.borderRightWidth,v=e.borderTopWidth+e.borderBottomWidth,w=k&&i,x=b(d.width);x!==!1&&(e.width=x+(w?0:q+u));var y=b(d.height);return y!==!1&&(e.height=y+(w?0:r+v)),e.innerWidth=e.width-(q+u),e.innerHeight=e.height-(r+v),e.outerWidth=e.width+s,e.outerHeight=e.height+t,e}}function h(a,b){if(e||-1===b.indexOf("%"))return b;var c=a.style,d=c.left,f=a.runtimeStyle,g=f&&f.left;return g&&(f.left=a.currentStyle.left),c.left=b,b=c.pixelLeft,c.left=d,g&&(f.left=g),b}var i,j=a("boxSizing");return function(){if(j){var a=document.createElement("div");a.style.width="200px",a.style.padding="1px 2px 3px 4px",a.style.borderStyle="solid",a.style.borderWidth="1px 2px 3px 4px",a.style[j]="border-box";var c=document.body||document.documentElement;c.appendChild(a);var d=f(a);i=200===b(d.width),c.removeChild(a)}}(),d}var e=a.getComputedStyle,f=e?function(a){return e(a,null)}:function(a){return a.currentStyle},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],d):"object"==typeof exports?module.exports=d(require("get-style-property")):a.getSize=d(a.getStyleProperty)}(window),function(a,b){function c(a,b){return a[h](b)}function d(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function e(a,b){d(a);for(var c=a.parentNode.querySelectorAll(b),e=0,f=c.length;f>e;e++)if(c[e]===a)return!0;return!1}function f(a,b){return d(a),c(a,b)}var g,h=function(){if(b.matchesSelector)return"matchesSelector";for(var a=["webkit","moz","ms","o"],c=0,d=a.length;d>c;c++){var e=a[c],f=e+"MatchesSelector";if(b[f])return f}}();if(h){var i=document.createElement("div"),j=c(i,"div");g=j?c:f}else g=e;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return g}):window.matchesSelector=g}(this,Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()}
2983,h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.get
2983Size()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}}
2983,q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize(),delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):a.Masonry=b(a.Outlayer,a.getSize)}(window);; 2984/*! 2985 * Isotope PACKAGED v2.0.1 2986 * Filter & sort magical layouts 2987 * http://isotope.metafizzy.co 2988 */ 2989 2990(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1
2990),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1
2990);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var h=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,d=s.length;d>f;f++){var l=s[f],c=o[l];c=a(t,c);var y=parseFloat(c);n[l]=isNaN(y)?0:y}var m=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,_=n.marginTop+n.marginBottom,I=n.borderLeftWidth+n.borderRightWidth,L=n.borderTopWidth+n.borderBottomWidth,z=h&&u,S=e(o.width);S!==!1&&(n.width=S+(z?0:m+I));var b=e(o.height);return b!==!1&&(n.height=b+(z?0:g+L)),n.innerWidth=n.width-(m+I),n.innerHeight=n.height-(g+L),n.outerWidth=n.width+v,n.outerHeight=n.height+_,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;r>n;n++)if(i[n]===t)return!0;return!1}function r(t,e){return o(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,o=t.length;o>i;i++){var n=t[i],r=n+"MatchesSelector";if(e[r])return r}}();if(a){var u=document.createElement("div"),p=i(u,"div");s=p?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],c=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=c[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};
2990e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];
2990if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,l,c,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!d(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(d(s))if(e){c(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=l(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):d(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.
2990concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,d=i[s],l=d.getAttribute(n);try{f=l&&JSON.parse(l)}catch(c){u&&u.error("Error parsing "+n+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+c);continue}var y=new o(d,f);p&&p.data(d,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,d="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;
2990return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.x&&t.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var e={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=t.size.outerWidth,e},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];
2990if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var d=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=u,d.LayoutMode=h,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},d.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},d.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},d.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},d.prototype.updateSortData=function(t){this._getSorters(),t=o(t); 2991var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=d.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},d.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(c.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window);; 2992!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exp
2992orts.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="dist/",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=o(1),r=(n(a),o(5)),c=n(r),u=o(6),s=n(u),d=o(7),f=n(d),l=o(8),m=n(l),p=o(9),b=n(p),v=o(10),g=n(v),y=o(13),w=n(y),h=[],k=!1,x=document.all&&!window.atob,j={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded"},O=function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];return e&&(k=!0),k?(h=(0,g["default"])(h,j),(0,b["default"])(h,j.once),h):void 0},_=function(){h=(0,w["default"])(),O()},z=function(){h.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},A=function(e){return e===!0||"mobile"===e&&m["default"].mobile()||"phone"===e&&m["default"].phone()||"tablet"===e&&m["default"].tablet()||"function"==typeof e&&e()===!0},E=function(e){return j=i(j,e),h=(0,w["default"])(),A(j.disable)||x?z():(document.querySelector("body").setAttribute("data-aos-easing",j.easing),document.querySelector("body").setAttribute("data-aos-duration",j.duration),document.querySelector("body").setAttribute("data-aos-delay",j.delay),"DOMContentLoaded"===j.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?O(!0):"load"===j.startEvent?window.addEventListener(j.startEvent,function(){O(!0)}):document.addEventListener(j.startEvent,function(){O(!0)}),window.addEventListener("resize",(0,s["default"])(O,50,!0)),window.addEventListener("orientationchange",(0,s["default"])(O,50,!0)),window.addEventListener("scroll",(0,c["default"])(function(){(0,b["default"])(h,j.once)},99)),document.addEventListener("DOMNodeRemoved",function(e){var t=e.target;t&&1===t.nodeType&&t.hasAttribute&&t.hasAttribute("data-aos")&&(0,s["default"])(_,50,!0)}),(0,f["default"])("[data-aos]",_),h)};e.exports={init:E,refresh:O,refreshHard:_}},function(e,t){},,,,function(e,t,o){"use strict";function n(e,t,o){var n=!0,a=!0;if("function"!=typeof e)throw new TypeError(c);return i(o)&&(n="leading"in o?!!o.leading:n,a="trailing"in o?!!o.trailing:a),r(e,t,{leading:n,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=o(6),c="Expected a function";e.exports=n},function(e,t){"use strict";function o(e,t,o){function n(t){var o=b,n=v;return b=v=void 0,O=t,y=e.apply(n,o)}function a(e){return O=e,w=setTimeout(d,t),_?n(e):y}function r(e){var o=e-h,n=e-O,i=t-o;return z?x(i,g-n):i}function u(e){var o=e-h,n=e-O;return!h||o>=t||0>o||z&&n>=g}function d(){var e=j();return u(e)?f(e):void(w=setTimeout(d,r(e)))}function f(e){return clearTimeout(w),w=void 0,A&&b?n(e):(b=v=void 0,y)}function l(){void 0!==w&&clearTimeout(w),h=O=0,b=v=w=void 0}function m(){return void 0===w?y:f(j())}function p(){var e=j(),o=u(e);if(b=arguments,v=this,h=e,o){if(void 0===w)return a(h);if(z)return clearTimeout(w),w=setTimeout(d,t),n(h)}return void 0===w&&(w=setTimeout(d,t)),y}var b,v,g,y,w,h=0,O=0,_=!1,z=!1,A=!0;if("function"!=typeof e)throw new TypeError(s);return t=c(t)||0,i(o)&&(_=!!o.leading,z="maxWait"in o,g=z?k(c(o.maxWait)||0,t):g,A="trailing"in o?!!o.trailing:A),p.cancel=l,p.flush=m,p}function n(e){var t=i(e)?h.call(e):"";return t==f||t==l}function i(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function a(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||a(e)&&h.call(e)==m}function c(e){if("number"==typeof e)return e;if(r(e))return d;if(i(e)){var t=n(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var o=v.test(e);return o||g.test(e)?y(e.slice(2),o?2:8):b.test(e)?d:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s="Expected a function",d=NaN,f="[object Function]",l="[object GeneratorFunction]",m="[object Symbol]",p=/^\s+|\s+$/g,b=
2992/^[-+]0x[0-9a-f]+$/i,v=/^0b[01]+$/i,g=/^0o[0-7]+$/i,y=parseInt,w=Object.prototype,h=w.toString,k=Math.max,x=Math.min,j=Date.now;e.exports=o},function(e,t){"use strict";function o(e,t){r.push({selector:e,fn:t}),!c&&a&&(c=new a(n),c.observe(i.documentElement,{childList:!0,subtree:!0,removedNodes:!0})),n()}function n(){for(var e,t,o=0,n=r.length;n>o;o++){e=r[o],t=i.querySelectorAll(e.selector);for(var a,c=0,u=t.length;u>c;c++)a=t[c],a.ready||(a.ready=!0,e.fn.call(a,a))}}Object.defineProperty(t,"__esModule",{value:!0});var i=window.document,a=window.MutationObserver||window.WebKitMutationObserver,r=[],c=void 0;t["default"]=o},function(e,t){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),i=function(){function e(){o(this,e)}return n(e,[{key:"phone",value:function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}},{key:"mobile",value:function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
2992sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();t["default"]=new i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,o){var n=e.node.getAttribute("data-aos-once");t>e.position?e.node.classList.add("aos-animate"):"undefined"!=typeof n&&("false"===n||!o&&"true"!==n)&&e.node.classList.remove("aos-animate")},n=function(e,t){var n=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,a){o(e,i+n,t)})};t["default"]=n},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(11),a=n(i),r=function(e,t){return e.forEach(function(e,o){e.node.classList.add("aos-init"),e.position=(0,a["default"])(e.node,t.offset)}),e};t["default"]=r},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=o(12),a=n(i),r=function(e,t){var o=0,n=0,i=window.innerHeight,r={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(r.offset&&!isNaN(r.offset)&&(n=parseInt(r.offset)),r.anchor&&document.querySelectorAll(r.anchor)&&(e=document.querySelectorAll(r.anchor)[0]),o=(0,a["default"])(e).top,r.anchorPlacement){case"top-bottom":break;case"center-bottom":o+=e.offsetHeight/2;break;case"bottom-bottom":o+=e.offsetHeight;break;case"top-center":o+=i/2;break;case"bottom-center":o+=i/2+e.offsetHeight;break;case"center-center":o+=i/2+e.offsetHeight/2;break;case"top-top":o+=i;break;case"bottom-top":o+=e.offsetHeight+i;break;case"center-top":o+=e.offsetHeight/2+i}return r.anchorPlacement||r.offset||isNaN(t)||(n=t),o+n};t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){for(var t=0,o=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),o+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:o,left:t}};t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){e=e||document.querySelectorAll("[data-aos]");var t=[];return[].forEach.call(e,function(e,o){t.push({node:e})}),t};t["default"]=o}])});; 2993/* 2994* jPreLoader - jQuery plugin 2995* Create a Loading Screen to preload images and content for you website 2996* 2997* Name: jPreLoader.js 2998* Author: Kenny Ooi - http://www.inwebson.com 2999* Date: July 11, 2012 3000* Version: 2.1 3001* Example: http://www.inwebson.com/demo/jpreloader-v2/ 3002* 3003*/ 3004 3005(function($) { 3006 var items = new Array(), 3007 errors = new Array(), 3008 onComplete = function() {}, 3009 current = 0; 3010 3011 var jpreOptions = { 3012 splashVPos: '35%', 3013 loaderVPos: '75%', 3014 splashID: '#jpreContent', 3015 showSplash: true, 3016 showPercentage: true, 3017 autoClose: true, 3018 closeBtnText: 'Start!', 3019 onetimeLoad: false, 3020 debugMode: false, 3021 splashFunction: function() {} 3022 } 3023 3024 //cookie 3025 var getCookie = function() { 3026 if( jpreOptions.onetimeLoad ) { 3027 var cookies = document.cookie.split('; '); 3028 for (var i = 0, parts; (parts = cookies[i] && cookies[i].split('=')); i++) { 3029 if ((parts.shift()) === "jpreLoader") { 3030 return (parts.join('=')); 3031 } 3032 } 3033 return false; 3034 } else { 3035 return false; 3036 } 3037 3038 } 3039 var setCookie = function(expires) { 3040 if( jpreOptions.onetimeLoad ) { 3041 var exdate = new Date(); 3042 exdate.setDate( exdate.getDate() + expires ); 3043 var c_value = ((expires==null) ? "" : "expires=" + exdate.toUTCString()); 3044 document.cookie="jpreLoader=loaded; " + c_value; 3045 } 3046 } 3047 3048 //create jpreLoader UI 3049 var createContainer = function() { 3050 3051 jOverlay = $('<div></div>') 3052 .attr('id', 'jpreOverlay') 3053 .css({ 3054 position: "fixed", 3055 top: 0, 3056 left: 0, 3057 width: '100%', 3058 height: '100%', 3059 zIndex: 9999999 3060 }) 3061 .appendTo('body'); 3062 3063 if(jpreOptions.showSplash) { 3064 jContent = $('<div></div>') 3065 .attr('id', 'jpreSlide') 3066 .appendTo(jOverlay); 3067 3068 var conWidth = $(window).width() - $(jContent).width(); 3069 $(jContent).css({ 3070 position: "absolute",
3071 top: jpreOptions.splashVPos, 3072 left: Math.round((50 / $(window).width()) * conWidth) + '%' 3073 }); 3074 $(jContent).html($(jpreOptions.splashID).wrap('<div/>').parent().html()); 3075 $(jpreOptions.splashID).remove(); 3076 jpreOptions.splashFunction() 3077 } 3078 3079 jLoader = $('<div></div>') 3080 .attr('id', 'jpreLoader') 3081 .appendTo(jOverlay); 3082 3083 var posWidth = $(window).width() - $(jLoader).width(); 3084 $(jLoader).css({ 3085 position: 'absolute', 3086 top: jpreOptions.loaderVPos, 3087 left: Math.round((50 / $(window).width()) * posWidth) + '%' 3088 }); 3089 3090 jBar = $('<div></div>') 3091 .attr('id', 'jpreBar') 3092 .css({ 3093 width: '0%', 3094 height: '100%' 3095 }) 3096 .appendTo(jLoader); 3097 3098 if(jpreOptions.showPercentage) { 3099 jPer = $('<div></div>') 3100 .attr('id', 'jprePercentage') 3101 .css({ 3102 position: 'relative', 3103 height: '100%' 3104 }) 3105 .appendTo(jLoader) 3106 .html('Loading...'); 3107 } 3108 if( !jpreOptions.autoclose ) { 3109 jButton = $('<div></div>') 3110 .attr('id', 'jpreButton') 3111 .on('click', function() { 3112 loadComplete(); 3113 }) 3114 .css({ 3115 position: 'relative', 3116 height: '100%' 3117 }) 3118 .appendTo(jLoader) 3119 .text(jpreOptions.closeBtnText) 3120 .hide(); 3121 } 3122 } 3123 3124 //get all images from css and <img> tag 3125 var getImages = function(element) { 3126 $(element).find('*:not(script)').each(function() { 3127 var url = ""; 3128 3129 if ($(this).css('background-image').indexOf('none') == -1 && $(this).css('background-image').indexOf('-gradient') == -1) { 3130 url = $(this).css('background-image'); 3131 if(url.indexOf('url') != -1) { 3132 var temp = url.match(/url\((.*?)\)/); 3133 url = temp[1].replace(/\"/g, ''); 3134 } 3135 } else if ($(this).get(0).nodeName.toLowerCase() == 'img' && typeof($(this).attr('src')) != 'undefined') { 3136 url = $(this).attr('src'); 3137 } 3138 3139 if (url.length > 0) { 3140 items.push(url); 3141 } 3142 }); 3143 } 3144 3145 //create preloaded image 3146 var preloading = function() { 3147 for (var i = 0; i < items.length; i++) { 3148 if(loadImg(items[i])); 3149 } 3150 } 3151 var loadImg = function(url) { 3152 var imgLoad = new Image(); 3153 3154 $(imgLoad).on('load', function(){ 3155 completeLoading(); 3156 }) 3157 .on('error', function(){ 3158 errors.push($(this).attr('src')); 3159 completeLoading(); 3160 }) 3161 .attr('src', url); 3162 } 3163 3164 //update progress bar once image loaded 3165 var completeLoading = function() { 3166 current++; 3167 3168 var per = Math.round((current / items.length) * 100); 3169 $(jBar).stop().animate({ 3170 width: per + '%' 3171 }, 500, 'linear'); 3172 3173 if(jpreOptions.showPercentage) { 3174 $(jPer).text(per+"%"); 3175 } 3176 3177 //if all images loaded 3178 if(current >= items.length) { 3179 current = items.length; 3180 setCookie(); //create cookie 3181 3182 if(jpreOptions.showPercentage) { 3183 $(jPer).text("100%"); 3184 } 3185 3186 //fire debug mode 3187 if (jpreOptions.debugMode) { 3188 var error = debug(); 3189 } 3190 3191 3192 //max progress bar 3193 $(jBar).stop().animate({ 3194 width: '100%' 3195 }, 500, 'linear', function() { 3196 //autoclose on 3197 if( jpreOptions.autoClose ) 3198 loadComplete(); 3199 else 3200 $(jButton).fadeIn(1000); 3201 }); 3202 } 3203 } 3204 3205 //triggered when all images are loaded 3206 var loadComplete = function() { 3207 $(jOverlay).fadeOut(800, function() { 3208 $(jOverlay).remove(); 3209 onComplete(); //callback function 3210 }); 3211 } 3212 3213 //debug mode 3214 var debug = function() { 3215 if(errors.length > 0) { 3216 var str = 'ERROR - IMAGE FILES MISSING!!!\n\r' 3217 str += errors.length + ' image files cound not be found. \n\r'; 3218 str += 'Please check your image paths and filenames:\n\r'; 3219 for (var i = 0; i < errors.length; i++) { 3220 str += '- ' + errors[i] + '\n\r'; 3221 } 3222 return true; 3223 } else { 3224 return false; 3225 } 3226 } 3227 3228 $.fn.jpreLoader = function(options, callback) { 3229 if(options) { 3230 $.extend(jpreOptions, options ); 3231 } 3232 if(typeof callback == 'function') { 3233 onComplete = callback; 3234 } 3235 3236 //show preloader once JS loaded 3237 $('body').css({ 3238 'display': 'block' 3239 }); 3240 3241 return this.each(function() { 3242 if( !(getCookie()) ) { 3243 createContainer(); 3244 getImages(this); 3245 preloading(); 3246 } 3247 else { //onetime load / cookie is set 3248 $(jpreOptions.splashID).remove(); 3249 onComplete(); 3250 } 3251 }); 3252 }; 3253 3254})(jQuery);; 3255/* ------------------------------------------------------------------------ 3256 Class: prettyPhoto 3257 Use: Lightbox clone for jQuery 3258 Author: Stephane Caron (http://www.no-margin-for-errors.com) 3259 Version: 3.1.6 3260------------------------------------------------------------------------- */ 3261(function($) { 3262 $.prettyPhoto = {version: '3.1.6'}; 3263 3264 $.fn.prettyPhoto = function(pp_settings) { 3265 pp_settings = jQuery.extend({ 3266 hook: 'data-rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */ 3267 animation_speed: 'fast', /* fast/slow/normal */ 3268 ajaxcallback: function() {}, 3269 slideshow: 3000, /* false OR interval time in ms */ 3270 autoplay_slideshow: true, /* true/false */ 3271 opacity: 0.80, /* Value between 0 and 1 */ 3272 show_title: false, /* true/false */ 3273 allow_resize: true, /* Resize the photos bigger than viewport. true/false */ 3274 allow_expand: false, /* Allow the user to expand a resized image. true/false */ 3275 default_width: 500, 3276 default_height: 344, 3277 counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ 3278 theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ 3279 horizontal_padding: 20, /* The padding on each side of the picture */ 3280 hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ 3281 wmode: 'opaque', /* Set the flash wmode attribute */ 3282 autoplay: true, /* Automatically start videos: True/False */ 3283 modal: false, /* If set to true, only the close button will close the window */ 3284 deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ 3285 overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ 3286 overlay_gallery_max: 30, /* Maximum number of pictures in the overlay gallery */ 3287 keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ 3288 changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ 3289 callback: function(){}, /* Called when prettyPhoto is closed */ 3290 ie6_fallback: true, 3291 markup: '<div class="pp_pic_holder"> \ 3292 <div class="ppt"> </div> \ 3293 <div class="pp_top"> \ 3294 <div class="pp_left"></div> \ 3295 <div class="pp_middle"></div> \ 3296 <div class="pp_right"></div> \ 3297 </div> \ 3298 <div class="pp_content_container"> \ 3299 <div class="pp_left"> \ 3300 <div class="pp_right"> \ 3301 <div class="pp_content"> \ 3302 <div class="pp_loaderIcon"></div> \ 3303 <div class="pp_fade"> \ 3304 <a href="#" class="pp_expand" title="Expand the image">Expand</a> \ 3305 <div class="pp_hoverContainer"> \ 3306 <a class="pp_next" href="#">next</a> \ 3307 <a class="pp_previous" href="#">previous</a> \ 3308 </div> \ 3309 <div id="pp_full_res"></div> \ 3310 <div class="pp_details"> \ 3311 <div class="pp_nav"> \ 3312 <a href="#" class="pp_arrow_previous">Previous</a> \ 3313 <p class="currentTextHolder hidden">0/0</p> \ 3314 <a href="#" class="pp_arrow_next">Next</a> \ 3315 </div> \ 3316 <p class="pp_description"></p> \ 3317 <div class="pp_social">{pp_social}</div> \ 3318 <a class="pp_close" href="#">Close</a> \ 3319 </div> \ 3320 </div> \ 3321 </div> \ 3322 </div> \ 3323 </div> \ 3324 </div> \ 3325 <div class="pp_bottom"> \ 3326 <div class="pp_left"></div> \ 3327 <div class="pp_middle"></div> \ 3328 <div class="pp_right"></div> \ 3329 </div> \ 3330 </div> \ 3331 <div class="pp_overlay"></div>', 3332 gallery_markup: '<div class="pp_gallery hidden"> \ 3333 <a href="#" class="pp_arrow_previous">Previous</a> \ 3334 <div> \ 3335 <ul> \ 3336 {gallery} \ 3337 </ul> \ 3338 </div> \ 3339 <a href="#" class="pp_arrow_next">Next</a> \ 3340 </div>', 3341 image_markup: '<img id="fullResImage" src="{path}" />', 3342 flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>', 3343 quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>', 3344 iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', 3345 inline_markup: '<div class="pp_inline">{content}</div>', 3346 custom_markup: '', 3347 social_tools: '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>' /* html or false to disable */ 3348 }, pp_settings); 3349 3350 // Global variables accessible only by prettyPhoto 3351 var matchedObjects = this, percentBased = false, pp_dimensions, pp_open, 3352 3353 // prettyPhoto container specific 3354 pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, 3355 3356 // Window size 3357 windowHeight = $(window).height(), windowWidth = $(window).width(), 3358 3359 // Global elements 3360 pp_slideshow; 3361 3362 doresize = true, scroll_pos = _get_scroll(); 3363 3364 // Window/Keyboard events 3365 $(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); }); 3366 3367 if(pp_settings.keyboard_shortcuts) { 3368 $(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){ 3369 if(typeof $pp_pic_holder != 'undefined'){ 3370 if($pp_pic_holder.is(':visible')){ 3371 switch(e.keyCode){ 3372 case 37: 3373 $.prettyPhoto.changePage('previous'); 3374 e.preventDefault(); 3375 break; 3376 case 39: 3377 $.prettyPhoto.changePage('next'); 3378 e.preventDefault(); 3379 break; 3380 case 27: 3381 if(!settings.modal) 3382 $.prettyPhoto.close(); 3383 e.preventDefault(); 3384 break; 3385 }; 3386 // return false;
3387 }; 3388 }; 3389 }); 3390 }; 3391 3392 /** 3393 * Initialize prettyPhoto. 3394 */ 3395 $.prettyPhoto.initialize = function() { 3396 3397 settings = pp_settings; 3398 3399 if(settings.theme == 'pp_default') settings.horizontal_padding = 16; 3400 3401 // Find out if the picture is part of a set 3402 theRel = $(this).attr(settings.hook); 3403 galleryRegExp = /\[(?:.*)\]/; 3404 isSet = (galleryRegExp.exec(theRel)) ? true : false; 3405 3406 // Put the SRCs, TITLEs, ALTs into an array. 3407 pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href')); 3408 pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt')); 3409 pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title')); 3410 3411 if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false; 3412 3413 set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned 3414 rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this)); 3415 3416 _build_overlay(this); // Build the overlay {this} being the caller 3417 3418 if(settings.allow_resize) 3419 $(window).bind('scroll.prettyphoto',function(){ _center_overlay(); }); 3420 3421 3422 $.prettyPhoto.open(); 3423 3424 return false; 3425 } 3426 3427 3428 /** 3429 * Opens the prettyPhoto modal box. 3430 * @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths. 3431 * @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles. 3432 * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions. 3433 */ 3434 $.prettyPhoto.open = function(event) { 3435 if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables 3436 settings = pp_settings; 3437 pp_images = $.makeArray(arguments[0]); 3438 pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); 3439 pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); 3440 isSet = (pp_images.length > 1) ? true : false; 3441 set_position = (arguments[3])? arguments[3]: 0; 3442 _build_overlay(event.target); // Build the overlay {this} being the caller 3443 } 3444 3445 if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash 3446 3447 _checkPosition($(pp_images).size()); // Hide the next/previous links if on first or last images. 3448 3449 $('.pp_loaderIcon').show(); 3450 3451 if(settings.deeplinking) 3452 setHashtag(); 3453 3454 // Rebuild Facebook Like Button with updated href 3455 if(settings.social_tools){ 3456 facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); 3457 $pp_pic_holder.find('.pp_social').html(facebook_like_link); 3458 } 3459 3460 // Fade the content in 3461 if($ppt.is(':hidden')) $ppt.css('opacity',0).show(); 3462 $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity); 3463 3464 // Display the current position 3465 $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size()); 3466 3467 // Set the description 3468 if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){ 3469 $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); 3470 }else{ 3471 $pp_pic_holder.find('.pp_description').hide(); 3472 } 3473 3474 // Get the dimensions 3475 movie_width = ( parseFloat(getParam('width',pp_images[set_position])) ) ? getParam('width',pp_images[set_position]) : settings.default_width.toString(); 3476 movie_height = ( parseFloat(getParam('height',pp_images[set_position])) ) ? getParam('height',pp_images[set_position]) : settings.default_height.toString(); 3477 3478 // If the size is % based, calculate according to window dimensions 3479 percentBased=false; 3480 if(movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true; } 3481 if(movie_width.indexOf('%') != -1) { movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; } 3482 3483 // Fade the holder 3484 $pp_pic_holder.fadeIn(function(){ 3485 // Set the title
3486 (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(' '); 3487 3488 imgPreloader = ""; 3489 skipInjection = false; 3490 3491 // Inject the proper content 3492 switch(_getFileType(pp_images[set_position])){ 3493 case 'image': 3494 imgPreloader = new Image(); 3495 3496 // Preload the neighbour images 3497 nextImage = new Image(); 3498 if(isSet && set_position < $(pp_images).size() -1) nextImage.src = pp_images[set_position + 1]; 3499 prevImage = new Image(); 3500 if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; 3501 3502 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g,pp_images[set_position]); 3503 3504 imgPreloader.onload = function(){ 3505 // Fit item to viewport 3506 pp_dimensions = _fitToViewport(imgPreloader.width,imgPreloader.height); 3507 3508 _showContent(); 3509 }; 3510 3511 imgPreloader.onerror = function(){ 3512 alert('Image cannot be loaded. Make sure the path is correct and image exist.'); 3513 $.prettyPhoto.close(); 3514 }; 3515 3516 imgPreloader.src = pp_images[set_position]; 3517 break; 3518 3519 case 'youtube': 3520 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport 3521 3522 // Regular youtube link 3523 movie_id = getParam('v',pp_images[set_position]); 3524 3525 // youtu.be link 3526 if(movie_id == ""){ 3527 movie_id = pp_images[set_position].split('youtu.be/'); 3528 movie_id = movie_id[1]; 3529 if(movie_id.indexOf('?') > 0) 3530 movie_id = movie_id.substr(0,movie_id.indexOf('?')); // Strip anything after the ? 3531 3532 if(movie_id.indexOf('&') > 0) 3533 movie_id = movie_id.substr(0,movie_id.indexOf('&')); // Strip anything after the & 3534 } 3535 3536 movie = 'http://www.youtube.com/embed/'+movie_id; 3537 (getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]) : movie+="?rel=1"; 3538 3539 if(settings.autoplay) movie += "&autoplay=1"; 3540 3541 toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie); 3542 break; 3543 3544 case 'vimeo': 3545 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport 3546 3547 movie_id = pp_images[set_position]; 3548 var regExp = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/; 3549 var match = movie_id.match(regExp); 3550 3551 movie = 'http://player.vimeo.com/video/'+ match[3] +'?title=0&byline=0&portrait=0'; 3552 if(settings.autoplay) movie += "&autoplay=1;"; 3553 3554 vimeo_width = pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width']; 3555 3556 toInject = settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie); 3557 break; 3558 3559 case 'quicktime': 3560 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport 3561 pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; // Add space for the control bar 3562 3563 toInject = settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay); 3564 break; 3565 3566 case 'flash': 3567 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport 3568 3569 flash_vars = pp_images[set_position]; 3570 flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length); 3571 3572 filename = pp_images[set_position]; 3573 filename = filename.substring(0,filename.indexOf('?')); 3574 3575 toInject = settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars); 3576 break; 3577 3578 case 'iframe': 3579 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport 3580 3581 frame_url = pp_images[set_position]; 3582 frame_url = frame_url.substr(0,frame_url.indexOf('iframe')-1); 3583 3584 toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url); 3585 break; 3586 3587 case 'ajax': 3588 doresize = false; // Make sure the dimensions are not resized. 3589 pp_dimensions = _fitToViewport(movie_width,movie_height); 3590 doresize = true; // Reset the dimensions 3591 3592 skipInjection = true; 3593 $.get(pp_images[set_position],function(responseHTML){ 3594 toInject = settings.inline_markup.replace(/{content}/g,responseHTML); 3595 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; 3596 _showContent(); 3597 }); 3598 3599 break; 3600 3601 case 'custom': 3602 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport 3603 3604 toInject = settings.custom_markup; 3605 break; 3606 3607 case 'inline': 3608 // to get the item height clone it, apply default width, wrap it in the prettyPhoto containers , then delete 3609 myClone = $(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show(); 3610 doresize = false; // Make sure the dimensions are not resized. 3611 pp_dimensions = _fitToViewport($(myClone).width(),$(myClone).height()); 3612 doresize = true; // Reset the dimensions 3613 $(myClone).remove(); 3614 toInject = settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html()); 3615 break; 3616 }; 3617 3618 if(!imgPreloader && !skipInjection){ 3619 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; 3620 3621 // Show content 3622 _showContent(); 3623 }; 3624 }); 3625 3626 return false;
3627 }; 3628 3629 3630 /** 3631 * Change page in the prettyPhoto modal box 3632 * @param direction {String} Direction of the paging, previous or next. 3633 */ 3634 $.prettyPhoto.changePage = function(direction){ 3635 currentGalleryPage = 0; 3636 3637 if(direction == 'previous') { 3638 set_position--; 3639 if (set_position < 0) set_position = $(pp_images).size()-1; 3640 }else if(direction == 'next'){ 3641 set_position++; 3642 if(set_position > $(pp_images).size()-1) set_position = 0; 3643 }else{ 3644 set_position=direction; 3645 }; 3646 3647 rel_index = set_position; 3648 3649 if(!doresize) doresize = true; // Allow the resizing of the images 3650 if(settings.allow_expand) { 3651 $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); 3652 } 3653 3654 _hideContent(function(){ $.prettyPhoto.open(); }); 3655 }; 3656 3657 3658 /** 3659 * Change gallery page in the prettyPhoto modal box 3660 * @param direction {String} Direction of the paging, previous or next. 3661 */ 3662 $.prettyPhoto.changeGalleryPage = function(direction){ 3663 if(direction=='next'){ 3664 currentGalleryPage ++; 3665 3666 if(currentGalleryPage > totalPage) currentGalleryPage = 0; 3667 }else if(direction=='previous'){ 3668 currentGalleryPage --; 3669 3670 if(currentGalleryPage < 0) currentGalleryPage = totalPage; 3671 }else{ 3672 currentGalleryPage = direction; 3673 }; 3674 3675 slide_speed = (direction == 'next' || direction == 'previous') ? settings.animation_speed : 0; 3676 3677 slide_to = currentGalleryPage * (itemsPerPage * itemWidth); 3678 3679 $pp_gallery.find('ul').animate({left:-slide_to},slide_speed); 3680 }; 3681 3682 3683 /** 3684 * Start the slideshow... 3685 */ 3686 $.prettyPhoto.startSlideshow = function(){ 3687 if(typeof pp_slideshow == 'undefined'){ 3688 $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){ 3689 $.prettyPhoto.stopSlideshow(); 3690 return false; 3691 }); 3692 pp_slideshow = setInterval($.prettyPhoto.startSlideshow,settings.slideshow); 3693 }else{ 3694 $.prettyPhoto.changePage('next'); 3695 }; 3696 } 3697 3698 3699 /** 3700 * Stop the slideshow... 3701 */ 3702 $.prettyPhoto.stopSlideshow = function(){ 3703 $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){ 3704 $.prettyPhoto.startSlideshow(); 3705 return false; 3706 }); 3707 clearInterval(pp_slideshow); 3708 pp_slideshow=undefined; 3709 } 3710 3711 3712 /** 3713 * Closes prettyPhoto. 3714 */ 3715 $.prettyPhoto.close = function(){ 3716 if($pp_overlay.is(":animated")) return; 3717 3718 $.prettyPhoto.stopSlideshow(); 3719 3720 $pp_pic_holder.stop().find('object,embed').css('visibility','hidden'); 3721 3722 $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); }); 3723 3724 $pp_overlay.fadeOut(settings.animation_speed, function(){ 3725 3726 if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible'); // Show the flash 3727 3728 $(this).remove(); // No more need for the prettyPhoto markup 3729 3730 $(window).unbind('scroll.prettyphoto'); 3731 3732 clearHashtag(); 3733 3734 settings.callback(); 3735 3736 doresize = true; 3737 3738 pp_open = false; 3739 3740 delete settings; 3741 }); 3742 }; 3743 3744 /** 3745 * Set the proper sizes on the containers and animate the content in. 3746 */ 3747 function _showContent(){ 3748 $('.pp_loaderIcon').hide(); 3749 3750 // Calculate the opened top position of the pic holder 3751 projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); 3752 if(projectedTop < 0) projectedTop = 0; 3753 3754 $ppt.fadeTo(settings.animation_speed,1); 3755 3756 // Resize the content holder 3757 $pp_pic_holder.find('.pp_content') 3758 .animate({ 3759 height:pp_dimensions['contentHeight'], 3760 width:pp_dimensions['contentWidth'] 3761 },settings.animation_speed); 3762 3763 // Resize picture the holder 3764 $pp_pic_holder.animate({ 3765 'top': projectedTop, 3766 'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0 : (windowWidth/2) - (pp_dimensions['containerWidth']/2), 3767 width:pp_dimensions['containerWidth'] 3768 },settings.animation_speed,function(){ 3769 $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']); 3770 3771 $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content 3772 3773 // Show the nav 3774 if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); } 3775 3776 if(settings.allow_expand) { 3777 if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized 3778 $('a.pp_expand,a.pp_contract').show(); 3779 }else{ 3780 $('a.pp_expand').hide(); 3781 } 3782 } 3783 3784 if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); 3785 3786 settings.changepicturecallback(); // Callback! 3787 3788 pp_open = true; 3789 }); 3790 3791 _insert_gallery(); 3792 pp_settings.ajaxcallback(); 3793 }; 3794
3795 /** 3796 * Hide the content...DUH! 3797 */ 3798 function _hideContent(callback){ 3799 // Fade out the current picture 3800 $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden'); 3801 $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){ 3802 $('.pp_loaderIcon').show(); 3803 3804 callback(); 3805 }); 3806 }; 3807 3808 /** 3809 * Check the item position in the gallery array, hide or show the navigation links 3810 * @param setCount {integer} The total number of items in the set 3811 */ 3812 function _checkPosition(setCount){ 3813 (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); // Hide the bottom nav if it's not a set. 3814 }; 3815 3816 /** 3817 * Resize the item dimensions if it's bigger than the viewport 3818 * @param width {integer} Width of the item to be opened 3819 * @param height {integer} Height of the item to be opened 3820 * @return An array containin the "fitted" dimensions 3821 */ 3822 function _fitToViewport(width,height){ 3823 resized = false; 3824 3825 _getDimensions(width,height); 3826 3827 // Define them in case there's no resize needed 3828 imageWidth = width, imageHeight = height; 3829 3830 if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) { 3831 resized = true, fitting = false; 3832 3833 while (!fitting){ 3834 if((pp_containerWidth > windowWidth)){ 3835 imageWidth = (windowWidth - 200); 3836 imageHeight = (height/width) * imageWidth; 3837 }else if((pp_containerHeight > windowHeight)){ 3838 imageHeight = (windowHeight - 200); 3839 imageWidth = (width/height) * imageHeight; 3840 }else{ 3841 fitting = true; 3842 }; 3843 3844 pp_containerHeight = imageHeight, pp_containerWidth = imageWidth; 3845 }; 3846 3847 3848 3849 if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){ 3850 _fitToViewport(pp_containerWidth,pp_containerHeight) 3851 }; 3852 3853 _getDimensions(imageWidth,imageHeight); 3854 }; 3855 3856 return { 3857 width:Math.floor(imageWidth), 3858 height:Math.floor(imageHeight), 3859 containerHeight:Math.floor(pp_containerHeight), 3860 containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2), 3861 contentHeight:Math.floor(pp_contentHeight), 3862 contentWidth:Math.floor(pp_contentWidth), 3863 resized:resized 3864 }; 3865 }; 3866 3867 /** 3868 * Get the containers dimensions according to the item size 3869 * @param width {integer} Width of the item to be opened 3870 * @param height {integer} Height of the item to be opened 3871 */ 3872 function _getDimensions(width,height){ 3873 width = parseFloat(width); 3874 height = parseFloat(height); 3875 3876 // Get the details height, to do so, I need to clone it since it's invisible 3877 $pp_details = $pp_pic_holder.find('.pp_details'); 3878 $pp_details.width(width); 3879 detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); 3880 3881 $pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({ 3882 'position':'absolute', 3883 'top':-10000 3884 }); 3885 detailsHeight += $pp_details.height(); 3886 detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details 3887 $pp_details.remove(); 3888 3889 // Get the titles height, to do so, I need to clone it since it's invisible 3890 $pp_title = $pp_pic_holder.find('.ppt'); 3891 $pp_title.width(width); 3892 titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom')); 3893 $pp_title = $pp_title.clone().appendTo($('body')).css({ 3894 'position':'absolute', 3895 'top':-10000 3896 }); 3897 titleHeight += $pp_title.height(); 3898 $pp_title.remove(); 3899 3900 // Get the container size, to resize the holder to the right dimensions 3901 pp_contentHeight = height + detailsHeight; 3902 pp_contentWidth = width; 3903 pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); 3904 pp_containerWidth = width; 3905 } 3906 3907 function _getFileType(itemSrc){ 3908 if (itemSrc.match(/youtube\.com\/watch/i) || itemSrc.match(/youtu\.be/i)) { 3909 return 'youtube'; 3910 }else if (itemSrc.match(/vimeo\.com/i)) { 3911 return 'vimeo'; 3912 }else if(itemSrc.match(/\b.mov\b/i)){ 3913 return 'quicktime'; 3914 }else if(itemSrc.match(/\b.swf\b/i)){ 3915 return 'flash'; 3916 }else if(itemSrc.match(/\biframe=true\b/i)){ 3917 return 'iframe'; 3918 }else if(itemSrc.match(/\bajax=true\b/i)){ 3919 return 'ajax'; 3920 }else if(itemSrc.match(/\bcustom=true\b/i)){ 3921 return 'custom'; 3922 }else if(itemSrc.substr(0,1) == '#'){ 3923 return 'inline'; 3924 }else{ 3925 return 'image'; 3926 }; 3927 }; 3928 3929 function _center_overlay(){ 3930 if(doresize && typeof $pp_pic_holder != 'undefined') { 3931 scroll_pos = _get_scroll(); 3932 contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); 3933 3934 projectedTop = (windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2); 3935 if(projectedTop < 0) projectedTop = 0; 3936 3937 if(contentHeight > windowHeight) 3938 return; 3939 3940 $pp_pic_holder.css({ 3941 'top': projectedTop, 3942 'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2) 3943 }); 3944 }; 3945 }; 3946 3947 function _get_scroll(){ 3948 if (self.pageYOffset) { 3949 return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}; 3950 } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict 3951 return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}; 3952 } else if (document.body) {// all other Explorers 3953 return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}; 3954 }; 3955 }; 3956 3957 function _resize_overlay() { 3958 windowHeight = $(window).height(), windowWidth = $(window).width(); 3959 3960 if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth); 3961 }; 3962 3963 function _insert_gallery(){ 3964 if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image") { 3965 itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin. 3966 navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme 3967 3968 itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth); 3969 itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length;
3970 totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; 3971 3972 // Hide the nav in the case there's no need for links 3973 if(totalPage == 0){ 3974 navWidth = 0; // No nav means no width! 3975 $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide(); 3976 }else{ 3977 $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show(); 3978 }; 3979 3980 galleryWidth = itemsPerPage * itemWidth; 3981 fullGalleryWidth = pp_images.length * itemWidth; 3982 3983 // Set the proper width to the gallery items 3984 $pp_gallery 3985 .css('margin-left',-((galleryWidth/2) + (navWidth/2))) 3986 .find('div:first').width(galleryWidth+5) 3987 .find('ul').width(fullGalleryWidth) 3988 .find('li.selected').removeClass('selected'); 3989 3990 goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage; 3991 3992 $.prettyPhoto.changeGalleryPage(goToPage); 3993 3994 $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected'); 3995 }else{ 3996 $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); 3997 // $pp_gallery.hide(); 3998 } 3999 } 4000 4001 function _build_overlay(caller){ 4002 // Inject Social Tool markup into General markup 4003 if(settings.social_tools) 4004 facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); 4005 4006 settings.markup = settings.markup.replace('{pp_social}',''); 4007 4008 $('body').append(settings.markup); // Inject the markup 4009 4010 $pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay
4010= $('div.pp_overlay'); // Set my global selectors 4011 4012 // Inject the inline gallery! 4013 if(isSet && settings.overlay_gallery) { 4014 currentGalleryPage = 0; 4015 toInject = ""; 4016 for (var i=0; i < pp_images.length; i++) { 4017 if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){ 4018 classname = 'default'; 4019 img_src = ''; 4020 }else{ 4021 classname = ''; 4022 img_src = pp_images[i]; 4023 } 4024 toInject += "<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>"; 4025 }; 4026 4027 toInject = settings.gallery_markup.replace(/{gallery}/g,toInject); 4028 4029 $pp_pic_holder.find('#pp_full_res').after(toInject); 4030 4031 $pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors 4032 4033 $pp_gallery.find('.pp_arrow_next').click(function(){ 4034 $.prettyPhoto.changeGalleryPage('next'); 4035 $.prettyPhoto.stopSlideshow(); 4036 return false; 4037 }); 4038 4039 $pp_gallery.find('.pp_arrow_previous').click(function(){ 4040 $.prettyPhoto.changeGalleryPage('previous'); 4041 $.prettyPhoto.stopSlideshow(); 4042 return false; 4043 }); 4044 4045 $pp_pic_holder.find('.pp_content').hover( 4046 function(){ 4047 $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); 4048 }, 4049 function(){ 4050 $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); 4051 }); 4052 4053 itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin. 4054 $pp_gallery_li.each(function(i){ 4055 $(this) 4056 .find('a') 4057 .click(function(){ 4058 $.prettyPhoto.changePage(i); 4059 $.prettyPhoto.stopSlideshow(); 4060 return false; 4061 }); 4062 }); 4063 }; 4064 4065 4066 // Inject the play/pause if it's a slideshow 4067 if(settings.slideshow){ 4068 $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>') 4069 $pp_pic_holder.find('.pp_nav .pp_play').click(function(){ 4070 $.prettyPhoto.startSlideshow(); 4071 return false; 4072 }); 4073 } 4074 4075 $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme 4076 4077 $pp_overlay 4078 .css({ 4079 'opacity':0, 4080 'height':$(document).height(), 4081 'width':$(window).width() 4082 }) 4083 .bind('click',function(){ 4084 if(!settings.modal) $.prettyPhoto.close(); 4085 }); 4086 4087 $('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; }); 4088 4089 4090 if(settings.allow_expand) { 4091 $('a.pp_expand').bind('click',function(e){ 4092 // Expand the image 4093 if($(this).hasClass('pp_expand')){ 4094 $(this).removeClass('pp_expand').addClass('pp_contract'); 4095 doresize = false; 4096 }else{ 4097 $(this).removeClass('pp_contract').addClass('pp_expand'); 4098 doresize = true; 4099 }; 4100 4101 _hideContent(function(){ $.prettyPhoto.open(); }); 4102 4103 return false; 4104 }); 4105 } 4106 4107 $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){ 4108 $.prettyPhoto.changePage('previous'); 4109 $.prettyPhoto.stopSlideshow(); 4110 return false; 4111 }); 4112 4113 $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){ 4114 $.prettyPhoto.changePage('next'); 4115 $.prettyPhoto.stopSlideshow(); 4116 return false; 4117 }); 4118 4119 _center_overlay(); // Center it 4120 }; 4121 4122 if(!pp_alreadyInitialized && getHashtag()){ 4123 pp_alreadyInitialized = true; 4124 4125 // Grab the rel index to trigger the click on the correct element 4126 hashIndex = getHashtag(); 4127 hashRel = hashIndex; 4128 hashIndex = hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1); 4129 hashRel = hashRel.substring(0,hashRel.indexOf('/')); 4130 4131 // Little timeout to make sure all the prettyPhoto initialize scripts has been run. 4132 // Useful in the event the page contain several init scripts. 4133 setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50); 4134 } 4135 4136 return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once 4137 }; 4138 4139 function getHashtag(){ 4140 var url = location.href; 4141 hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)) : false;
4142 if(hashtag){ hashtag = hashtag.replace(/<|>/g,''); } 4143 return hashtag; 4144 }; 4145 4146 function setHashtag(){ 4147 if(typeof theRel == 'undefined') return; // theRel is set on normal calls, it's impossible to deeplink using the API 4148 location.hash = theRel + '/'+rel_index+'/'; 4149 }; 4150 4151 function clearHashtag(){ 4152 if ( location.href.indexOf('#prettyPhoto') !== -1 ) location.hash = "prettyPhoto"; 4153 } 4154 4155 function getParam(name,url){ 4156 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 4157 var regexS = "[\\?&]"+name+"=([^&#]*)"; 4158 var regex = new RegExp( regexS ); 4159 var results = regex.exec( url ); 4160 return ( results == null ) ? "" : results[1]; 4161 } 4162 4163})(jQuery); 4164 4165var pp_alreadyInitialized = false; // Used for the deep linking to make sure not to call the same function several times. 4166; 4167/*jquery.mb.YTPlayer 07-03-2016 4168 _ jquery.mb.components 4169 _ email: [email protected] 4170 _ Copyright (c) 2001-2016. Matteo Bicocchi (Pupunzi); 4171 _ blog: http://pupunzi.open-lab.com 4172 _ Open Lab s.r.l., Florence - Italy 4173 */ 4174function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function setUnit(a,b){return"string"!=typeof a||a.match(/^[\-0-9\.]+jQuery/)?""+a+b:a}function setFilter(a,b,c){var d=uncamel(b),e=jQuery.browser.mozilla?"":jQuery.CSS.sfx;a[e+"filter"]=a[e+"filter"]||"",c=setUnit(c>jQuery.CSS.filters[b].max?jQuery.CSS.filters[b].max:c,jQuery.CSS.filters[b].unit),a[e+"filter"]+=d+"("+c+") ",delete a[b]}var ytp=ytp||{},getYTPVideoID=function(a){var b,c;return a.indexOf("youtu.be")>0?(b=a.substr(a.lastIndexOf("/")+1,a.length),c=b.indexOf("?list=")>0?b.substr(b.lastIndexOf("="),b.length):null,b=c?b.substr(0,b.lastIndexOf("?")):b):a.indexOf("http")>-1?(b=a.match(/[\\?&]v=([^&#]*)/)[1],c=a.indexOf("list=")>0?a.match(/[\\?&]list=([^&#]*)/)[1]:null):(b=a.length>15?null:a,c=b?null:a),{videoID:b,playlistID:c}};!function(jQuery,ytp){jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"2.9.14",build:"5837",author:"Matteo Bicocchi",apiKey:"",defaults:{containment:"body",ratio:"auto",videoURL:null,playlistURL:null,startAt:0,stopAt:0,autoPlay:!0,vol:50,addRaster:!1,opacity:1,quality:"default",mute:!1,loop:!0,showControls:!0,showAnnotations:!1,showYTLogo:!0,stopMovieOnBlur:!0,realfullscreen:!0,gaTrack:!0,optimizeDisplay:!0,onReady:function(a){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},locationProtocol:"https:",buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0,YTPlayer.opt={},YTPlayer.state={},YTPlayer.filtersEnabled=!0,YTPlayer.id=YTPlayer.id||"YTP_"+(new Date).getTime(),YTPlayer.filters={grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},$YTPlayer.addClass("mb_YTPlayer");var property=$YTPlayer.data("property")&&"string"==typeof $YTPlayer.data("property")?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property");"undefined"!=typeof property&&"undefined"!=typeof property.vol&&(property.vol=0===property.vol?property.vol=1:property.vol),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property),YTPlayer.hasChanged||(YTPlayer.defaultOpt={},jQuery.extend(YTPlayer.defaultOpt,jQuery.mbYTPlayer.defaults,options)),"true"==YTPlayer.opt.loop&&(YTPlayer.opt.loop=9999),YTPlayer.isRetina=window.retina||window.devicePixelRatio>1;var isIframe=function(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a};YTPlayer.canGoFullScreen=!(jQuery.browser.msie||jQuery.browser.opera||isIframe()),YTPlayer.canGoFullScreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr("id")||$YTPlayer.attr("id","video_"+(new Date).getTime());var playerID="mbYTP_"+YTPlayer.id;YTPlayer.isAlone=!1,YTPlayer.hasFocus=!0;var videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).videoID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).videoID:!1,playlistID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).playlistID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).playlistID:!1;YTPlayer.videoID=videoID,YTPlayer.playlistID=playlistID,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"0":"3";var playerVars={autoplay:0,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations};document.createElement("video").canPlayType&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1);var playerBox=jQuery("<div/>").attr("id",playerID).addClass("playerBox"),overlay=jQuery("<div/>").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay");if(YTPlayer.isSelf="self"==YTPlayer.opt.containment,YTPlayer.defaultOpt.containment=YTPlayer.opt.containment=jQuery("self"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackgroun
4174d="body"==YTPlayer.opt.containment.get(0).tagName.toLowerCase(),!YTPlayer.isBackground||!ytp.backgroundIsInited){var isPlayer=YTPlayer.opt.containment.is(jQuery(this));if(YTPlayer.canPlayOnMobile=isPlayer&&0===jQuery(this).children().length,isPlayer?YTPlayer.isPlayer=!0:$YTPlayer.hide(),jQuery.browser.mobile&&!YTPlayer.canPlayOnMobile)return void $YTPlayer.remove();var wrapper=jQuery("<div/>").addClass("mbYTP_wrapper").attr("id","wrapper_"+playerID);if(wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0}),playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden"}),wrapper.append(playerBox),YTPlayer.opt.containment.children().not("script, style").each(function(){"static"==jQuery(this).css("position")&&jQuery(this).css("position","relative")}),YTPlayer.isBackground?(jQuery("body").css({boxSizing:"border-box"}),wrapper.css({position:"fixed",top:0,left:0,zIndex:0}),$YTPlayer.hide()):"static"==YTPlayer.opt.containment.css("position")&&YTPlayer.opt.containment.css({position:"relative"}),YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),jQuery.browser.mobile||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on("mouseenter",function(){YTPlayer.controlBar&&YTPlayer.controlBar.addClass("visible")}).on("mouseleave",function(){YTPlayer.controlBar&&YTPlayer.controlBar.removeClass("visible")}),ytp.YTAPIReady)setTimeout(function(){jQuery(document).trigger("YTAPIReady")},100);else{jQuery("#YTAPI").remove();var tag=jQuery("<script></script>").attr({src:jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/iframe_api?v="+jQuery.mbYTPlayer.version,id:"YTAPI"});jQuery("head").prepend(tag)}jQuery(document).on("YTAPIReady",function(){YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit||(YTPlayer.isBackground&&(ytp.backgroundIsInited=!0),YTPlayer.opt.autoPlay="undefined"==typeof YTPlayer.opt.autoPlay?YTPlayer.isBackground?!0:!1:YTPlayer.opt.autoPlay,YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100,jQuery.mbYTPlayer.getDataFromAPI(YTPlayer),jQuery(YTPlayer).on("YTPChanged",function(){if(!YTPlayer.isInit){if(YTPlayer.isInit=!0,jQuery.browser.mobile&&YTPlayer.canPlayOnMobile){if(YTPlayer.opt.containment.outerWidth()>jQuery(window).width()){YTPlayer.opt.containment.css({maxWidth:"100%"});var h=.6*YTPlayer.opt.containment.outerWidth();YTPlayer.opt.containment.css({maxHeight:h})}return void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),height:"100%",width:"100%",events:{onReady:function(a){YTPlayer.player=a.target,playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:1})}}})}new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(a){YTPlayer.player=a.target,YTPlayer.isReady||(YTPlayer.isReady=YTPlayer.isPlayer&&!YTPlayer.opt.autoPlay?!1:!0,YTPlayer.playerEl=YTPlayer.player.getIframe(),jQuery(YTPlayer.playerEl).unselectable(),$YTPlayer.optimizeDisplay(),YTPlayer.videoID=videoID,jQuery(window).off("resize.YTP_"+YTPlayer.id).on("resize.YTP_"+YTPlayer.id,function(){$YTPlayer.optimizeDisplay()}),jQuery.mbYTPlayer.checkForState(YTPlayer))},onStateChange:function(event){if("function"==typeof event.target.getPlayerState){var state=event.target.getPlayerState();if(YTPlayer.state!=state){if(YTPlayer.preventTrigger)return void(YTPlayer.preventTrigger=!1);YTPlayer.state=state;var eventType;switch(state){case-1:eventType="YTPUnstarted";break;case 0:eventType="YTPEnd";break;case 1:eventType="YTPPlay",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.pause),"undefined"!=typeof _gaq&&eval(YTPlayer.opt.gaTrack)&&_gaq.push(["_trackEvent","YTPlayer","Play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString()]),"undefined"!=typeof ga&&eval(YTPlayer.opt.gaTrack)&&ga("send","event","YTPlayer","play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString());break;case 2:eventType="YTPPause",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 3:YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),eventType="YTPBuffer
4174ing",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 5:eventType="YTPCued"}var YTPEvent=jQuery.Event(eventType);YTPEvent.time=YTPlayer.player.time,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(YTPEvent)}}},onPlaybackQualityChange:function(a){var b=a.target.getPlaybackQuality(),c=jQuery.Event("YTPQualityChange");c.quality=b,jQuery(YTPlayer).trigger(c)},onError:function(a){150==a.data&&(console.log("Embedding this video is restricted by Youtube."),YTPlayer.isPlayList&&jQuery(YTPlayer).playNext()),2==a.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),"function"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,a)}}})}}))})}})},getDataFromAPI:function(a){if(a.videoData=jQuery.mbStorage.get("YTPlayer_data_"+a.videoID),jQuery(a).off("YTPData.YTPlayer").on("YTPData.YTPlayer",function(){if(a.hasData&&a.isPlayer&&!a.opt.autoPlay){var b=a.videoData.thumb_max||a.videoData.thumb_high||a.videoData.thumb_medium;a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"}),a.opt.backgroundUrl=b}}),a.videoData)setTimeout(function(){a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.dataReceived=!0,jQuery(a).trigger("YTPChanged");var b=jQuery.Event("YTPData");b.prop={};for(var c in a.videoData)b.prop[c]=a.videoData[c];jQuery(a).trigger(b)},500),a.hasData=!0;else if(jQuery.mbYTPlayer.apiKey)jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+"//www.googleapis.com/youtube/v3/videos?id="+a.videoID+"&key="+jQuery.mbYTPlayer.apiKey+"&part=snippet",function(b){function c(b){a.videoData={},a.videoData.id=a.videoID,a.videoData.channelTitle=b.channelTitle,a.videoData.title=b.title,a.videoData.description=b.description.length<400?b.description:b.description.substring(0,400)+" ...",a.videoData.aspectratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.opt.ratio=a.videoData.aspectratio,a.videoData.thumb_max=b.thumbnails.maxres?b.thumbnails.maxres.url:null,a.videoData.thumb_high=b.thumbnails.high?b.thumbnails.high.url:null,a.videoData.thumb_medium=b.thumbnails.medium?b.thumbnails.medium.url:null,jQuery.mbStorage.set("YTPlayer_data_"+a.videoID,a.videoData)}a.dataReceived=!0,jQuery(a).trigger("YTPChanged"),c(b.items[0].snippet),a.hasData=!0;var d=jQuery.Event("YTPData");d.prop={};for(var e in a.videoData)d.prop[e]=a.videoData[e];jQuery(a).trigger(d)});else{if(setTimeout(function(){jQuery(a).trigger("YTPChanged")},50),a.isPlayer&&!a.opt.autoPlay){var b=jQuery.mbYTPlayer.locationProtocol+"//i.ytimg.com/vi/"+a.videoID+"/hqdefault.jpg";a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"}),a.opt.backgroundUrl=b}a.videoData=null,a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio}a.isPlayer&&!a.opt.autoPlay&&(a.loading=jQuery("<div/>").addClass("loading").html("Loading").hide(),jQuery(a).append(a.loading),a.loading.fadeIn())},removeStoredData:function(){jQuery.mbStorage.remove()},getVideoData:function(){var a=this.get(0);return a.videoData},getVideoID:function(){var a=this.get(0);return a.videoID||!1},setVideoQuality:function(a){var b=this.get(0);b.player.setPlaybackQuality(a)},playlist:function(a,b,c){var d=this,e=d.get(0);return e.isPlayList=!0,b&&(a=jQuery.shuffle(a)),e.videoID||(e.videos=a,e.videoCounter=0,e.videoLength=a.length,jQuery(e).data("property",a[0]),jQuery(e).mb_YTPlayer()),"function"==typeof c&&jQuery(e).one("YTPChanged",function(){c(e)}),jQuery(e).on("YTPEnd",function(){jQuery(e).playNext()}),d},playNext:function(){var a=this.get(0);return a.checkForStartAt&&(clearTimeout(a.checkForStartAt),clearInterval(a.getState)),a.videoCounter++,a.videoCounter>=a.videoLength&&(a.videoCounter=0),jQuery(a).changeMovie(a.videos[a.videoCounter]),this},playPrev:function(){var a=this.get(0);return a.checkForStartAt&&(clearInterval(a.checkForStartAt),clearInterval(a.getState)),a.videoCounter--,a.videoCounter<0&&(a.videoCounter=a.videoLength-1),jQuery(a).changeMovie(a.videos[a.videoCounter]),this},changeMovie:function(a){var b=this.get(0);b.opt.startAt=0,b.opt.stopAt=0,b.opt.mute=!0,b.hasData=!1,b.hasChanged=!0,b.player.loopTime=void 0,a&&jQuery.extend(b.o
4174pt,b.defaultOpt,a),b.videoID=getYTPVideoID(b.opt.videoURL).videoID,"true"==b.opt.loop&&(b.opt.loop=9999),jQuery(b.playerEl).CSSAnimate({opacity:0},200,function(){var a=jQuery.Event("YTPChangeMovie");return a.time=b.player.time,a.videoId=b.videoID,jQuery(b).trigger(a),jQuery(b).YTPGetPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+b.videoID),1,b.opt.quality),jQuery(b).optimizeDisplay(),jQuery.mbYTPlayer.checkForState(b),jQuery.mbYTPlayer.getDataFromAPI(b),this})},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var a=this.get(0);ytp.YTAPIReady=!0,ytp.backgroundIsInited=!1,a.isInit=!1,a.videoID=null;var b=a.wrapper;return b.remove(),jQuery("#controlBar_"+a.id).remove(),clearInterval(a.checkForStartAt),clearInterval(a.getState),this},fullscreen:function(real){function hideMouse(){YTPlayer.overlay.css({cursor:"none"})}function RunPrefixMethod(a,b){for(var c,d,e=["webkit","moz","ms","o",""],f=0;f<e.length&&!a[c];){if(c=b,""==e[f]&&(c=c.substr(0,1).toLowerCase()+c.substr(1)),c=e[f]+c,d=typeof a[c],"undefined"!=d)return e=[e[f]],"function"==d?a[c]():a[c];f++}}function launchFullscreen(a){RunPrefixMethod(a,"RequestFullScreen")}function cancelFullscreen(){(RunPrefixMethod(document,"FullScreen")||RunPrefixMethod(document,"IsFullScreen"))&&RunPrefixMethod(document,"CancelFullScreen")}var YTPlayer=this.get(0);"undefined"==typeof real&&(real=YTPlayer.opt.realfullscreen),real=eval(real);var controls=jQuery("#controlBar_"+YTPlayer.id),fullScreenBtn=controls.find(".mb_OnlyYT"),videoWrapper=YTPlayer.isSelf?YTPlayer.opt.containment:YTPlayer.wrapper;if(real){var fullscreenchange=jQuery.browser.mozilla?"mozfullscreenchange":jQuery.browser.webkit?"webkitfullscreenchange":"fullscreenchange";jQuery(document).off(fullscreenchange).on(fullscreenchange,function(){var a=RunPrefixMethod(document,"IsFullScreen")||RunPrefixMethod(document,"FullScreen");a?(jQuery(YTPlayer).YTPSetVideoQuality("default"),jQuery(YTPlayer).trigger("YTPFullScreenStart")):(YTPlayer.isAlone=!1,fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),jQuery(YTPlayer).YTPSetVideoQuality(YTPlayer.opt.quality),videoWrapper.removeClass("YTPFullscreen"),videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500),videoWrapper.css({zIndex:0}),YTPlayer.isBackground?jQuery("body").after(controls):YTPlayer.wrapper.before(controls),jQuery(window).resize(),jQuery(YTPlayer).trigger("YTPFullScreenEnd"))})}return YTPlayer.isAlone?(jQuery(document).off("mousemove.YTPlayer"),YTPlayer.overlay.css({cursor:"auto"}),real?cancelFullscreen():(videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500),videoWrapper.css({zIndex:0})),fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),YTPlayer.isAlone=!1):(jQuery(document).on("mousemove.YTPlayer",function(a){YTPlayer.overlay.css({cursor:"auto"}),clearTimeout(YTPlayer.hideCursor),jQuery(a.target).parents().is(".mb_YTPBar")||(YTPlayer.hideCursor=setTimeout(hideMouse,3e3))}),hideMouse(),real?(videoWrapper.css({opacity:0}),videoWrapper.addClass("YTPFullscreen"),launchFullscreen(videoWrapper.get(0)),setTimeout(function(){videoWrapper.CSSAnimate({opacity:1},1e3),YTPlayer.wrapper.append(controls),jQuery(YTPlayer).optimizeDisplay(),YTPlayer.player.seekTo(YTPlayer.player.getCurrentTime()+.1,!0)},500)):videoWrapper.css({zIndex:1e4}).CSSAnimate({opacity:1},1e3),fullScreenBtn.html(jQuery.mbYTPlayer.controls.showSite),YTPlayer.isAlone=!0),this},toggleLoops:function(){var a=this.get(0),b=a.opt;return 1==b.loop?b.loop=0:(b.startAt?a.player.seekTo(b.startAt):a.player.playVideo(),b.loop=1),this},play:function(){var a=this.get(0);if(a.isReady)return a.player.playVideo(),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},2e3),jQuery(a.playerEl).CSSAnimate({opacity:1},1e3),jQuery(a).css("background-image","none"),this},togglePlay:function(a){var b=this.get(0);return 1==b.state?this.YTPPause():this.YTPPlay(),"function"==typeof a&&a(b.state),this},stop:function(){var a=this.get(0),b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPPlaypause");return c.html(jQuery.mbYTPlayer.controls.play),a.player.stopVideo(),this},pause:function(){var a=this.get(0);return a.player.pauseVideo(),this},seekTo:function(a){var b=this.get(0);return b.player.seekTo(a,!0),this},setVolume:function(a){var b=this.get(0);return a||b.opt.vol||0!=b.player.getVolume()?!a&&b.player.getVolume()>0||a&&b.opt.vol==a?b.isMute?jQuery(b).YTPUnmute():jQuery(b).YTPMute():(b.opt.vol=a,b.player.setVolume(b.opt.vol),b.volumeBar&&b.volumeBar.length&&b.volumeBar.updateSliderVal(a)):jQuery(b).YTPUnmute(),this},mute:function(){var a=this.get(0);if(!a.isMute){a.player.mute(),a.isMute=!0,a.player.setVolume(0),a.volumeBar&&a.volumeBar.length&&a.volumeBar.width()>10&&a.volumeBar.updateSliderVal(0);var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPMuteUnmute");c.html(jQuery.mbYTPlayer.controls.unmute),jQuery(a).addClass("isMuted"),a.volumeBar&&a.volumeBar.length&&a.volumeBar.addClass("muted");var d=jQuery.Event("YTPMuted");return d.time=a.player.time,a.canTrigger&&jQuery(a).trigger(d),this}},unmute:function(){var a=this.get(0);if(a.isMute){a.player.unMute(),a.isMute=!1,a.player.setVolume(a.opt.vol),a.volumeBar&&a.volumeBar.length&&a.volumeBar.updateSliderVal(a.opt.vol>10?a.opt.vol:10);var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPMuteUnmute");c.html(jQuery.mbYTPlayer.controls.mute),jQuery(a).removeClass("isMuted"),a.volumeBar&&a.volumeBar.length&&a.volumeBar.removeClass("muted");var d=jQuery.Event("YTPUnmuted");return d.time=a.player.time,a.canTrigger&&jQuery(a).trigger(d),this}},applyFilter:function(a,b){var c=this.get(0);return c.filters[a].value=b,c.filtersEnabled&&this.YTPEnableFilters(),this},applyFilters:function(a){var b=this.get(0);return this.on("YTPReady",function(){for(var c in a)b.filters[c].value=a[c],jQuery(b).YTPApplyFilter(c,a[c]);jQuery(b).trigger("YTPFiltersApplied")}),this},toggleFilter:function(a,b){return this.each(function(){var c=this;c.filters[a].value?c.filters[a].value=0:c.filters[a].value=b,c.filtersEnabled&&jQuery(this).YTPEnableFilters()})},toggleFilters:function(a){return this.each(function(){var b=this;b.filtersEnabled?(jQuery(b).trigger("YTPDisableFilters"),jQuery(b).YTPDisableFilters()):(jQuery(b).YTPEnableFilters(),jQuery(b).trigger("YTPEnableFilters")),"function"==typeof a&&a(b.filtersEnabled)})},disableFilters:function(){return this.each(function(){var a=this,b=jQuery(a.playerEl);b.css("-webkit-filter",""),b.css("filter",""),a.filtersEnabled=!1})},enableFilters:function(){return this.each(function(){var a=this,b=jQuery(a.playerEl),c="";for(var d in a.filters)a.filters[d].value&&(c+=d.replace("_","-")+"("+a.filters[d].value+a.filters[d].unit+") ");b.css("-webkit-filter",c),b.css("filter",c),a.filtersEnabled=!0})},removeFilter:function(a,b){return this.each(function(){"function"==typeof a&&(b=a,a=null);var c=this;if(a)jQuery(this).YTPApplyFilter(a,0),"function"==typeof b&&b(a);else for(var d in c.filters)jQuery(this).YTPApplyFilter(d,0),"function"==typeof b&&b(d)})},addMask:function(a){var b=this.get(0),c=b.overlay;return c.CSSAnimate({opacity:0}
4174,500,function(){c.css({backgroundImage:"url("+a+")",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover"}),c.CSSAnimate({opacity:1},500)}),this},removeMask:function(){var a=this.get(0),b=a.overlay;return b.CSSAnimate({opacity:0},500,function(){b.css({backgroundImage:"",backgroundRepeat:"",backgroundPosition:"",backgroundSize:""}),b.CSSAnimate({opacity:1},500)}),this},manageProgress:function(){var a=this.get(0),b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPProgress"),d=b.find(".mb_YTPLoaded"),e=b.find(".mb_YTPseekbar"),f=c.outerWidth(),g=Math.floor(a.player.getCurrentTime()),h=Math.floor(a.player.getDuration()),i=g*f/h,j=0,k=100*a.player.getVideoLoadedFraction();return d.css({left:j,width:k+"%"}),e.css({left:0,width:i}),{totalTime:h,currentTime:g}},buildControls:function(YTPlayer){var data=YTPlayer.opt;if(data.showYTLogo=data.showYTLogo||data.printUrl,!jQuery("#controlBar_"+YTPlayer.id).length){YTPlayer.controlBar=jQuery("<span/>").attr("id","controlBar_"+YTPlayer.id).addClass("mb_YTPBar").css({whiteSpace:"noWrap",position:YTPlayer.isBackground?"fixed":"absolute",zIndex:YTPlayer.isBackground?1e4:1e3}).hide();var buttonBar=jQuery("<div/>").addClass("buttonBar"),playpause=jQuery("<span>"+jQuery.mbYTPlayer.controls.play+"</span>").addClass("mb_YTPPlaypause ytpicon").click(function(){1==YTPlayer.player.getPlayerState()?jQuery(YTPlayer).YTPPause():jQuery(YTPlayer).YTPPlay()}),MuteUnmute=jQuery("<span>"+jQuery.mbYTPlayer.controls.mute+"</span>").addClass("mb_YTPMuteUnmute ytpicon").click(function(){0==YTPlayer.player.getVolume()?jQuery(YTPlayer).YTPUnmute():jQuery(YTPlayer).YTPMute()}),volumeBar=jQuery("<div/>").addClass("mb_YTPVolumeBar").css({display:"inline-block"});YTPlayer.volumeBar=volumeBar;var idx=jQuery("<span/>").addClass("mb_YTPTime"),vURL=data.videoURL?data.videoURL:"";vURL.indexOf("http")<0&&(vURL=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+data.videoURL);var movieUrl=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(vURL,"viewOnYT")}),onlyVideo=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(YTPlayer).YTPFullscreen(data.realfullscreen)}),progressBar=jQuery("<div/>").addClass("mb_YTPProgress").css("position","absolute").click(function(a){timeBar.css({width:a.clientX-timeBar.offset().left}),YTPlayer.timeW=a.clientX-timeBar.offset().left,YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0});var b=Math.floor(YTPlayer.player.getDuration());YTPlayer["goto"]=timeBar.outerWidth()*b/progressBar.outerWidth(),YTPlayer.player.seekTo(parseFloat(YTPlayer["goto"]),!0),YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0})}),loadedBar=jQuery("<div/>").addClass("mb_YTPLoaded").css("position","absolute"),timeBar=jQuery("<div/>").addClass("mb_YTPseekbar").css("position","absolute");progressBar.append(loadedBar).append(timeBar),buttonBar.append(playpause).append(MuteUnmute).append(volumeBar).append(idx),data.showYTLogo&&buttonBar.append(movieUrl),(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)&&buttonBar.append(onlyVideo),YTPlayer.controlBar.append(buttonBar).append(progressBar),YTPlayer.isBackground?jQuery("body").after(YTPlayer.controlBar):(YTPlayer.controlBar.addClass("inlinePlayer"),YTPlayer.wrapper.before(YTPlayer.controlBar)),volumeBar.simpleSlider({initialval:YTPlayer.opt.vol,scale:100,orientation:"h",callback:function(a){0==a.value?jQuery(YTPlayer).YTPMute():jQuery(YTPlayer).YTPUnmute(),YTPlayer.player.setVolume(a.value),YTPlayer.isMute||(YTPlayer.opt.vol=a.value)}})}},checkForState:function(YTPlayer){var interval=YTPlayer.opt.showControls?100:400;return clearInterval(YTPlayer.getState),jQuery.contains(document,YTPlayer)?(jQuery.mbYTPlayer.checkForStart(YTPlayer),void(YTPlayer.getState=setInterval(function(){var prog=jQuery(YTPlayer).YTPManageProgress(),$YTPlayer=jQuery(YTPlayer),data=YTPlayer.opt,startAt=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1,stopAt=YTPlayer.opt.stopAt>YTPlayer.opt.startAt?YTPlayer.opt.stopAt:0;if(stopAt=stopAt<YTPlayer.player.getDuration()?stopAt:0,YTPlayer.player.time!=prog.currentTime){var YTPEvent=jQuery.Event("YTPTime");YTPEvent.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(YTPEvent)}if(YTPlayer.player.time=prog.currentTime,0==YTPlayer.player.getVolume()?$YTPlayer.addClass("isMuted"):$YTPlayer.removeClass("isMuted"),YTPlayer.opt.showControls&&(prog.totalTime?YTPlayer.controlBar.find(".mb_YTPTime").html(jQuery.mbYTPlayer.formatTime(prog.currentTime)+" / "+jQuery.mbYTPlayer.formatTime(prog.totalTime)):YTPlayer.controlBar.find(".mb_YTPTime").html("-- : -- / -- : --")),eval(YTPlayer.opt.stopMovieOnBlur)&&(document.hasFocus()?document.hasFocus()&&!YTPlayer.hasFocus&&-1!=YTPlayer.state&&0!=YTPlayer.state&&(YTPlayer.hasFocus=!0,$YTPlayer.YTPPlay()):1==YTPlayer.state&&(YTPlayer.hasFocus=!1,$YTPlayer.YTPPause())),YTPlayer.controlBar&&YTPlayer.controlBar.outerWidth()<=400&&!YTPlayer.isCompact?(YTPlayer.controlBar.addClass("compact"),YTPlayer.isCompact=!0,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)):YTPlayer.controlBar&&YTPlayer.controlBar.outerWidth()>400&&YTPlayer.isCompact&&(YTPlayer.controlBar.removeClass("compact"),YTPlayer.isCompact=!1,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)),1==YTPlayer.player.getPlayerState()&&(parseFloat(YTPlayer.player.getDuration()-1.5)<YTPlayer.player.getCurrentTime()||stopAt>0&&parseFloat(YTPlayer.player.getCurrentTime())>stopAt)){if(YTPlayer.isEnded)return;if(YTPlayer.isEnded=!0,setTimeout(function(){YTPlayer.isEnded=!1},1e3),YTPlayer.isPlayList){if(!data.loop||data.loop>0&&YTPlayer.player.loopTime===data.loop-1){YTPlayer.player.loopTime=void 0,clearInterval(YTPlayer.getState);var YTPEnd=jQuery.Event("YTPEnd");return YTPEnd.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(YTPEnd),void(YTPlayer.state=0)}}else if(!data.loop||data.loop>0&&YTPlayer.player.loopTime===data.loop-1)return YTPlayer.player.loopTime=void 0,YTPlayer.preventTrigger=!0,jQuery(YTPlayer).YTPPause(),YTPlayer.state=0,void YTPlayer.wrapper.CSSAnimate({opacity:0}
4174,500,function(){YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);var a=jQuery.Event("YTPEnd");a.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(a),YTPlayer.player.seekTo(startAt,!0),YTPlayer.isBackground||YTPlayer.opt.containment.css({background:"rgba(0,0,0,0.5) url("+YTPlayer.opt.backgroundUrl+") center center",backgroundSize:"cover"})});YTPlayer.player.loopTime=YTPlayer.player.loopTime?++YTPlayer.player.loopTime:1,startAt=startAt||1,YTPlayer.preventTrigger=!0,jQuery(YTPlayer).YTPPause(),YTPlayer.player.seekTo(startAt,!0),$YTPlayer.YTPPlay()}},interval))):(jQuery(YTPlayer).YTPPlayerDestroy(),clearInterval(YTPlayer.getState),void clearInterval(YTPlayer.checkForStartAt))},checkForStart:function(a){var b=jQuery(a);if(!jQuery.contains(document,a))return void jQuery(a).YTPPlayerDestroy();if(a.preventTrigger=!0,jQuery(a).YTPPause(),jQuery(a).muteYTPVolume(),jQuery("#controlBar_"+a.id).remove(),a.opt.showControls&&jQuery.mbYTPlayer.buildControls(a),a.opt.addRaster){var c="dot"==a.opt.addRaster?"raster-dot":"raster";a.overlay.addClass(a.isRetina?c+" retina":c)}else a.overlay.removeClass(function(a,b){var c=b.split(" "),d=[];return jQuery.each(c,function(a,b){/raster.*/.test(b)&&d.push(b)}),d.push("retina"),d.join(" ")});var d=a.opt.startAt?a.opt.startAt:1;a.player.playVideo(),a.player.seekTo(d,!0),a.checkForStartAt=setInterval(function(){jQuery(a).YTPMute();var c=a.player.getVideoLoadedFraction()>=d/a.player.getDuration();if(a.player.getDuration()>0&&a.player.getCurrentTime()>=d&&c){clearInterval(a.checkForStartAt),a.isReady=!0,"function"==typeof a.opt.onReady&&a.opt.onReady(a);var e=jQuery.Event("YTPReady");if(e.time=a.player.time,jQuery(a).trigger(e),a.preventTrigger=!0,jQuery(a).YTPPause(),a.opt.mute||jQuery(a).YTPUnmute(),a.canTrigger=!0,a.opt.autoPlay){b.YTPPlay();var f=jQuery.Event("YTPStart");f.time=a.player.time,jQuery(a).trigger(f),b.css("background-image","none"),jQuery(a.playerEl).CSSAnimate({opacity:1},1e3),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},1e3)}else b.YTPPause(),a.isPlayer||(jQuery(a.playerEl).CSSAnimate({opacity:1},500),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},500));a.isPlayer&&!a.opt.autoPlay&&(a.loading.html("Ready"),setTimeout(function(){a.loading.fadeOut()},100)),a.controlBar&&a.controlBar.slideDown(1e3)}else jQuery.browser.safari},1)},formatTime:function(a){var b=Math.floor(a/60),c=Math.floor(a-60*b);return(9>=b?"0"+b:b)+" : "+(9>=c?"0"+c:c)}},jQuery.fn.toggleVolume=function(){var a=this.get(0);if(a)return a.player.isMuted()?(jQuery(a).YTPUnmute(),!0):(jQuery(a).YTPMute(),!1)},jQuery.fn.optimizeDisplay=function(){var a=this.get(0),b=a.opt,c=jQuery(a.playerEl),d={};if(b.optimizeDisplay){var e=24,f=100,g={},h=a.wrapper;g.width=h.outerWidth(),g.height=h.outerHeight(),d.width=g.width+g.width*e/100,d.height="16/9"==b.ratio?Math.ceil(9*g.width/16):Math.ceil(3*g.width/4),d.marginTop=-((d.height-g.height)/2),d.marginLeft=-(g.width*(e/2)/100),d.height<g.height&&(d.height=g.height+g.height*e/100,d.width="16/9"==b.ratio?Math.floor(16*g.height/9):Math.floor(4*g.height/3),d.marginTop=-(g.height*(e/2)/100),d.marginLeft=-((d.width-g.width)/2)),d.width+=f,d.height+=f,d.marginTop-=f/2,d.marginLeft-=f/2}else d.width="100%",d.height="100%",d.marginTop=0,d.marginLeft=0;c.css({width:d.width,height:d.height,marginTop:d.marginTop,marginLeft:d.marginLeft})},jQuery.shuffle=function(a){for(var b=a.slice(),c=b.length,d=c;d--;){var e=parseInt(Math.random()*c),f=b[d];b[d]=b[e],b[e]=f}return b},jQuery.fn.unselectable=function(){return this.each(function(){jQuery(this).css({"-moz-user-select":"none","-webkit-user-select":"none","user-select":"none"}).attr("unselectable","on")})},jQuery.fn.YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.YTPGetPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.YTPGetVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.YTPChangeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.YTPPlayerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.YTPPlay=jQuery.mbYTPlayer.play,jQuery.fn.YTPTogglePlay=jQuery.mbYTPlayer.togglePlay,jQuery.fn.YTPStop=jQuery.mbYTPlayer.stop,jQuery.fn.YTPPause=jQuery.mbYTPlayer.pause,jQuery.fn.YTPSeekTo=jQuery.mbYTPlayer.seekTo,jQuery.fn.YTPlaylist=jQuery.mbYTPlayer.playlist,jQuery.fn.YTPPlayNext=jQuery.mbYTPlayer.playNext,jQuery.fn.YTPPlayPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.YTPMute=jQuery.mbYTPlayer.mute,jQuery.fn.YTPUnmute=jQuery.mbYTPlayer.unmute,jQuery.fn.YTPToggleVolume=jQuery.mbYTPlayer.toggleVolume,jQuery.fn.YTPSetVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.YTPGetVideoData=jQuery.mbYTPlayer.getVideoData,jQuery.fn.YTPFullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.YTPToggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.YTPSetVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.YTPManageProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPApplyFilter=jQuery.mbYTPlayer.applyFilter,jQuery.fn.YTPApplyFilters=jQuery.mbYTPlayer.applyFilters,jQuery.fn.YTPToggleFilter=jQuery.mbYTPlayer.toggleFilter,jQuery.fn.YTPToggleFilters=jQuery.mbYTPlayer.toggleFilters,jQuery.fn.YTPRemoveFilter=jQuery.mbYTPlayer.removeFilter,jQuery.fn.YTPDisableFilters=jQuery.mbYTPlayer.disableFilters,jQuery.fn.YTPEnableFilters=jQuery.mbYTPlayer.enableFilters,jQuery.fn.YTPAddMask=jQuery.mbYTPlayer.addMask,jQuery.fn.YTPRemoveMask=jQuery.mbYTPlayer.removeMask,jQuery.fn.mb_YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.playNext=jQuery.mbYTPlayer.playNext,jQuery.fn.playPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.changeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.getVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.getPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.playerDe
4174stroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.fullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.buildYTPControls=jQuery.mbYTPlayer.buildControls,jQuery.fn.playYTP=jQuery.mbYTPlayer.play,jQuery.fn.toggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.stopYTP=jQuery.mbYTPlayer.stop,jQuery.fn.pauseYTP=jQuery.mbYTPlayer.pause,jQuery.fn.seekToYTP=jQuery.mbYTPlayer.seekTo,jQuery.fn.muteYTPVolume=jQuery.mbYTPlayer.mute, 4175jQuery.fn.unmuteYTPVolume=jQuery.mbYTPlayer.unmute,jQuery.fn.setYTPVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.setVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.manageYTPProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPGetDataFromFeed=jQuery.mbYTPlayer.getVideoData}(jQuery,ytp),jQuery.support.CSStransition=function(){var a=document.body||document.documentElement,b=a.style;return void 0!==b.transition||void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.MsTransition||void 0!==b.OTransition}(),jQuery.CSS={name:"mb.CSSAnimate",author:"Matteo Bicocchi",version:"2.0.0",transitionEnd:"transitionEnd",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},hueRotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizeCss:function(a){var b=jQuery.extend(!0,{},a);jQuery.browser.webkit||jQuery.browser.opera?jQuery.CSS.sfx="-webkit-":jQuery.browser.mozilla?jQuery.CSS.sfx="-moz-":jQuery.browser.msie&&(jQuery.CSS.sfx="-ms-");for(var c in b){"transform"===c&&(b[jQuery.CSS.sfx+"transform"]=b[c],delete b[c]),"transform-origin"===c&&(b[jQuery.CSS.sfx+"transform-origin"]=a[c],delete b[c]),"filter"!==c||jQuery.browser.mozilla||(b[jQuery.CSS.sfx+"filter"]=a[c],delete b[c]),"blur"===c&&setFilter(b,"blur",a[c]),"brightness"===c&&setFilter(b,"brightness",a[c]),"contrast"===c&&setFilter(b,"contrast",a[c]),"grayscale"===c&&setFilter(b,"grayscale",a[c]),"hueRotate"===c&&setFilter(b,"hueRotate",a[c]),"invert"===c&&setFilter(b,"invert",a[c]),"saturate"===c&&setFilter(b,"saturate",a[c]),"sepia"===c&&setFilter(b,"sepia",a[c]);var d="";"x"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateX("+setUnit(a[c],"px")+")",delete b[c]),"y"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateY("+setUnit(a[c],"px")+")",delete b[c]),"z"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateZ("+setUnit(a[c],"px")+")",delete b[c]),"rotate"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotate("+setUnit(a[c],"deg")+")",delete b[c]),"rotateX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateX("+setUnit(a[c],"deg")+")",delete b[c]),"rotateY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateY("+setUnit(a[c],"deg")+")",delete b[c]),"rotateZ"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateZ("+setUnit(a[c],"deg")+")",delete b[c]),"scale"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scale("+setUnit(a[c],"")+")",delete b[c]),"scaleX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleX("+setUnit(a[c],"")+")",delete b[c]),"scaleY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleY("+setUnit(a[c],"")+")",delete b[c]),"scaleZ"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleZ("+setUnit(a[c],"")+")",delete b[c]),"skew"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skew("+setUnit(a[c],"deg")+")",delete b[c]),"skewX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewX("+setUnit(a[c],"deg")+")",delete b[c]),"skewY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewY("+setUnit(a[c],"deg")+")",delete b[c]),"perspective"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" perspective("+setUnit(a[c],"px")+")",delete b[c])}return b},getProp:function(a){var b=[];for(var c in a)b.indexOf(c)<0&&b.push(uncamel(c));return b.join(",")},animate:function(a,b,c,d,e){return this.each(function(){function f(){g.called=!0,g.CSSAIsRunning=!1,h.off(jQuery.CSS.transitionEnd+"."+g.id),clearTimeout(g.timeout),h.css(jQuery.CSS.sfx+"transition",""),"function"==typeof e&&e.apply(g),"function"==typeof g.CSSqueue&&(g.CSSqueue(),g.CSSqueue=null)}var g=this,h=jQuery(this);g.id=g.id||"CSSA_"+(new Date).getTime();var i=i||{type:"noEvent"};if(g.CSSAIsRunning&&g.eventType==i.type&&!jQuery.browser.msie&&jQuery.browser.version<=9)return void(g.CSSqueue=function(){h.CSSAnimate(a,b,c,d,e)});if(g.CSSqueue=null,g.eventType=i.type,0!==h.length&&a){if(a=jQuery.normalizeCss(a),g.CSSAIsRunning=!0,"function"==typeof b&&(e=b,b=jQuery.fx.speeds._default),"function"==typeof c&&(d=c,c=0),"string"==typeof c&&(e=c,c=0),"function"==typeof d&&(e=d,d="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof b)for(var j in jQuery.fx.speeds){if(b==j){b=jQuery.fx.speeds[j];break}b=jQuery.fx.speeds._default}if(b||(b=jQuery.fx.speeds._default),"string"==typeof e&&(d=e,e=null),!jQuery.support.CSStransition){for(var k in a){if("transform"===k&&delete a[k],"filter"===k&&delete a[k],"transform-origin"===k&&delete a[k],"auto"===a[k]&&delete a[k],"x"===k){var l=a[k],m="left";a[m]=l,delete a[k]}if("y"===k){var l=a[k],m="top";a[m]=l,delete a[k]}("-ms-transform"===k||"-ms-filter"===k)&&delete a[k]}return void h.delay(c).animate(a,b,e)}var n={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1
4175)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};n[d]&&(d=n[d]),h.off(jQuery.CSS.transitionEnd+"."+g.id);var o=jQuery.CSS.getProp(a),p={};jQuery.extend(p,a),p[jQuery.CSS.sfx+"transition-property"]=o,p[jQuery.CSS.sfx+"transition-duration"]=b+"ms",p[jQuery.CSS.sfx+"transition-delay"]=c+"ms",p[jQuery.CSS.sfx+"transition-timing-function"]=d,setTimeout(function(){h.one(jQuery.CSS.transitionEnd+"."+g.id,f),h.css(p)},1),g.timeout=setTimeout(function(){return g.called||!e?(g.called=!1,void(g.CSSAIsRunning=!1)):(h.css(jQuery.CSS.sfx+"transition",""),e.apply(g),g.CSSAIsRunning=!1,void("function"==typeof g.CSSqueue&&(g.CSSqueue(),g.CSSqueue=null)))},b+c+10)}})}},jQuery.fn.CSSAnimate=jQuery.CSS.animate,jQuery.normalizeCss=jQuery.CSS.normalizeCss,jQuery.fn.css3=function(a){return this.each(function(){var b=jQuery(this),c=jQuery.normalizeCss(a);b.css(c)})};var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt),!function(a){/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase());var b="ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch||!1;a.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1}
4175,events:{start:b?"touchstart":"mousedown",end:b?"touchend":"mouseup",move:b?"touchmove":"mousemove"},init:function(c){return this.each(function(){var d=this,e=a(d);e.addClass("simpleSlider"),d.opt={},a.extend(d.opt,a.simpleSlider.defaults,c),a.extend(d.opt,e.data());var f="h"==d.opt.orientation?"horizontal":"vertical",g=a("<div/>").addClass("level").addClass(f);e.prepend(g),d.level=g,e.css({cursor:"default"}),"auto"==d.opt.scale&&(d.opt.scale=a(d).outerWidth()),e.updateSliderVal(),d.opt.readonly||(e.on(a.simpleSlider.events.start,function(a){b&&(a=a.changedTouches[0]),d.canSlide=!0,e.updateSliderVal(a),e.css({cursor:"col-resize"}),a.preventDefault(),a.stopPropagation()}),a(document).on(a.simpleSlider.events.move,function(c){b&&(c=c.changedTouches[0]),d.canSlide&&(a(document).css({cursor:"default"}),e.updateSliderVal(c),c.preventDefault(),c.stopPropagation())}).on(a.simpleSlider.events.end,function(){a(document).css({cursor:"auto"}),d.canSlide=!1,e.css({cursor:"auto"})}))})},updateSliderVal:function(b){function c(a,b){return Math.floor(100*a/b)}var d=this,e=d.get(0);e.opt.initialval="number"==typeof e.opt.initialval?e.opt.initialval:e.opt.initialval(e);var f=a(e).outerWidth(),g=a(e).outerHeight();e.x="object"==typeof b?b.clientX+document.body.scrollLeft-d.offset().left:"number"==typeof b?b*f/e.opt.scale:e.opt.initialval*f/e.opt.scale,e.y="object"==typeof b?b.clientY+document.body.scrollTop-d.offset().top:"number"==typeof b?(e.opt.scale-e.opt.initialval-b)*g/e.opt.scale:e.opt.initialval*g/e.opt.scale,e.y=d.outerHeight()-e.y,e.scaleX=e.x*e.opt.scale/f,e.scaleY=e.y*e.opt.scale/g,e.outOfRangeX=e.scaleX>e.opt.scale?e.scaleX-e.opt.scale:e.scaleX<0?e.scaleX:0,e.outOfRangeY=e.scaleY>e.opt.scale?e.scaleY-e.opt.scale:e.scaleY<0?e.scaleY:0,e.outOfRange="h"==e.opt.orientation?e.outOfRangeX:e.outOfRangeY,e.value="undefined"!=typeof b?"h"==e.opt.orientation?e.x>=d.outerWidth()?e.opt.scale:e.x<=0?0:e.scaleX:e.y>=d.outerHeight()?e.opt.scale:e.y<=0?0:e.scaleY:"h"==e.opt.orientation?e.scaleX:e.scaleY,"h"==e.opt.orientation?e.level.width(c(e.x,f)+"%"):e.level.height(c(e.y,g)),"function"==typeof e.opt.callback&&e.opt.callback(e)}},a.fn.simpleSlider=a.simpleSlider.init,a.fn.updateSliderVal=a.simpleSlider.updateSliderVal}(jQuery),!function(a){a.mbCookie={set:function(a,b,c,d){b=JSON.stringify(b),c||(c=7),d=d?"; domain="+d:"";var e,f=new Date;f.setTime(f.getTime()+864e5*c),e="; expires="+f.toGMTString(),document.cookie=a+"="+b+e+"; path=/"+d},get:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))return JSON.parse(e.substring(b.length,e.length))}return null},remove:function(b){a.mbCookie.set(b,"",-1)}},a.mbStorage={set:function(a,b){b=JSON.stringify(b),localStorage.setItem(a,b)},get:function(a){return localStorage[a]?JSON.parse(localStorage[a]):null},remove:function(a){a?localStorage.removeItem(a):localStorage.clear()}}}(jQuery);; 4176String.prototype.rightChars = function(n){ 4177 if (n <= 0) { 4178 return ""; 4179 } 4180 else if (n > this.length) { 4181 return this; 4182 } 4183 else { 4184 return this.substring(this.length, this.length - n); 4185 } 4186}; 4187 4188(function($) { 4189 var 4190 options = { 4191 highlightSpeed : 20, 4192 typeSpeed : 100, 4193 clearDelay : 500, 4194 typeDelay : 200, 4195 clearOnHighlight : true, 4196 typerDataAttr : 'data-typer-targets', 4197 typerInterval : 2000 4198 }, 4199 highlight, 4200 clearText, 4201 backspace, 4202 type, 4203 spanWithColor, 4204 clearDelay, 4205 typeDelay, 4206 clearData, 4207 isNumber, 4208 typeWithAttribute, 4209 getHighlightInterval, 4210 getTypeInterval, 4211 typerInterval; 4212 4213 spanWithColor = function(color, backgroundColor) { 4214 if (color === 'rgba(0, 0, 0, 0)') { 4215 color = 'rgb(255, 255, 255)'; 4216 } 4217 4218 return $('<span></span>') 4219 .css('color', '#323232') 4220 .css('background-color', backgroundColor); 4221 }; 4222 4223 isNumber = function (n) { 4224 return !isNaN(parseFloat(n)) && isFinite(n); 4225 }; 4226 4227 clearData = function ($e) { 4228 $e.removeData([ 4229 'typePosition', 4230 'highlightPosition', 4231 'leftStop', 4232 'rightStop', 4233 'primaryColor', 4234 'backgroundColor', 4235 'text', 4236 'typing' 4237 ]); 4238 }; 4239 4240 type = function ($e) { 4241 var 4242 // position = $e.data('typePosition'), 4243 text = $e.data('text'), 4244 oldLeft = $e.data('oldLeft'), 4245 oldRight = $e.data('oldRight'); 4246 4247 // if (!isNumber(position)) { 4248 // position = $e.data('leftStop'); 4249 // } 4250 4251 if (!text || text.length === 0) { 4252 clearData($e); 4253 return; 4254 } 4255 4256 4257 $e.text( 4258 oldLeft + 4259 text.charAt(0) + 4260 oldRight 4261 ).data({ 4262 oldLeft: oldLeft + text.charAt(0), 4263 text: text.substring(1) 4264 }); 4265 4266 // $e.text($e.text() + text.substring(position, position + 1)); 4267 4268 // $e.data('typePosition', position + 1); 4269 4270 setTimeout(function () { 4271 type($e); 4272 }, getTypeInterval()); 4273 }; 4274 4275 clearText = function ($e) { 4276 $e.find('span').remove(); 4277 4278 setTimeout(function () { 4279 type($e); 4280 }, typeDelay()); 4281 }; 4282 4283 highlight = function ($e) { 4284 var 4285 position = $e.data('highlightPosition'), 4286 leftText, 4287 highlightedText, 4288 rightText; 4289 4290 if (!isNumber(position)) { 4291 position = $e.data('rightStop') + 1; 4292 } 4293 4294 if (position <= $e.data('leftStop')) { 4295 setTimeout(function () { 4296 clearText($e); 4297 }, clearDelay()); 4298 return; 4299 } 4300 4301 leftText = $e.text().substring(0, position - 1); 4302 highlightedText = $e.text().substring(position - 1, $e.data('rightStop') + 1); 4303 rightText = $e.text().substring($e.data('rightStop') + 1); 4304 4305 $e.html(leftText) 4306 .append( 4307 spanWithColor( 4308 $e.data('backgroundColor'), 4309 $e.data('primaryColor') 4310 ) 4311 .append(highlightedText) 4312 ) 4313 .append(rightText); 4314 4315 $e.data('highlightPosition', position - 1); 4316 4317 setTimeout(function () { 4318 return highlight($e); 4319 }, getHighlightInterval()); 4320 }; 4321
4322 typeWithAttribute = function ($e) { 4323 var targets; 4324 4325 if ($e.data('typing')) { 4326 return; 4327 } 4328 4329 try { 4330 targets = JSON.parse($e.attr($.typer.options.typerDataAttr)).targets; 4331 } catch (e) {} 4332 4333 if (typeof targets === "undefined") { 4334 targets = $.map($e.attr($.typer.options.typerDataAttr).split(','), function (e) { 4335 return $.trim(e); 4336 }); 4337 } 4338 4339 $e.typeTo(targets[Math.floor(Math.random()*targets.length)]); 4340 }; 4341 4342 // Expose our options to the world. 4343 $.typer = (function () { 4344 return { options: options }; 4345 })(); 4346 4347 $.extend($.typer, { 4348 options: options 4349 }); 4350 4351 //-- Methods to attach to jQuery sets 4352 4353 $.fn.typer = function() { 4354 var $elements = $(this); 4355 4356 return $elements.each(function () { 4357 var $e = $(this); 4358 4359 if (typeof $e.attr($.typer.options.typerDataAttr) === "undefined") { 4360 return; 4361 } 4362 4363 typeWithAttribute($e); 4364 setInterval(function () { 4365 typeWithAttribute($e); 4366 }, typerInterval()); 4367 }); 4368 }; 4369 4370 $.fn.typeTo = function (newString) { 4371 var 4372 $e = $(this), 4373 currentText = $e.text(), 4374 i = 0, 4375 j = 0; 4376 4377 if (currentText === newString) { 4378 console.log("Our strings our equal, nothing to type"); 4379 return $e; 4380 } 4381 4382 if (currentText !== $e.html()) { 4383 console.error("Typer does not work on elements with child elements."); 4384 return $e; 4385 } 4386 4387 $e.data('typing', true); 4388 4389 while (currentText.charAt(i) === newString.charAt(i)) { 4390 i++; 4391 } 4392 4393 while (currentText.rightChars(j) === newString.rightChars(j)) { 4394 j++; 4395 } 4396 4397 newString = newString.substring(i, newString.length - j + 1); 4398 4399 $e.data({ 4400 oldLeft: currentText.substring(0, i), 4401 oldRight: currentText.rightChars(j - 1), 4402 leftStop: i, 4403 rightStop: currentText.length - j, 4404 primaryColor: $e.css('color'), 4405 backgroundColor: $e.css('background-color'), 4406 text: newString 4407 }); 4408 4409 highlight($e); 4410 4411 return $e; 4412 }; 4413 4414 //-- Helper methods. These can one day be customized further to include things like ranges of delays. 4415 4416 getHighlightInterval = function () { 4417 return $.typer.options.highlightSpeed; 4418 }; 4419 4420 getTypeInterval = function () { 4421 return $.typer.options.typeSpeed; 4422 }, 4423 4424 clearDelay = function () { 4425 return $.typer.options.clearDelay; 4426 }, 4427 4428 typeDelay = function () { 4429 return $.typer.options.typeDelay; 4430 }; 4431 4432 typerInterval = function () { 4433 return $.typer.options.typerInterval; 4434 }; 4435})(jQuery); 4436; 4437/* perfect-scrollbar v0.6.7 */ 4438!function t(e,n,r){function o(l,s){if(!n[l]){if(!e[l]){var a="function"==typeof require&&require;if(!s&&a)return a(l,!0);if(i)return i(l,!0);var c=new Error("Cannot find module '"+l+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[l]={exports:{}};e[l][0].call(u.exports,function(t){var n=e[l][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[l].exports}for(var i="function"==typeof require&&require,l=0;l<r.length;l++)o(r[l]);return o}({1:[function(t,e,n){"use strict";function r(t){t.fn.perfectScrollbar=function(e){return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var n=e;i.get(this)||o.initialize(this,n)}else{var r=e;"update"===r?o.update(this):"destroy"===r&&o.destroy(this)}return t(this)})}}var o=t("../main"),i=t("../plugin/instances");if("function"==typeof define&&define.amd)define(["jquery"],r);else{var l=window.jQuery?window.jQuery:window.$;"undefined"!=typeof l&&r(l)}e.exports=r},{"../main":7,"../plugin/instances":18}],2:[function(t,e,n){"use strict";function r(t,e){var n=t.className.split(" ");n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")}function o(t,e){var n=t.className.split(" "),r=n.indexOf(e);r>=0&&n.splice(r,1),t.className=n.join(" ")}n.add=function(t,e){t.classList?t.classList.add(e):r(t,e)},n.remove=function(t,e){t.classList?t.classList.remove(e):o(t,e)},n.list=function(t){return t.classList?Array.prototype.slice.apply(t.classList):t.className.split(" ")}},{}],3:[function(t,e,n){"use strict";function r(t,e){return window.getComputedStyle(t)[e]}function o(t,e,n){return"number"==typeof n&&(n=n.toString()+"px"),t.style[e]=n,t}function i(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.toString()+"px"),t.style[n]=r}return t}var l={};l.e=function(t,e){var n=document.createElement(t);return n.className=e,n},l.appendTo=function(t,e){return e.appendChild(t),t},l.css=function(t,e,n){return"object"==typeof e?i(t,e):"undefined"==typeof n?r(t,e):o(t,e,n)},l.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesSelector?t.matchesSelector(e):"undefined"!=typeof t.webkitMatchesSelector?t.webkitMatchesSelector(e):"undefined"!=typeof t.mozMatchesSelector?t.mozMatchesSelector(e):"undefined"!=typeof t.msMatchesSelector?t.msMatchesSelector(e):void 0},l.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},l.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return l.matches(t,e)})},e.exports=l},{}],4:[function(t,e,n){"use strict";var r=function(t){this.element=t,this.events={}};r.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},r.prototype.unbind=function(t,e){var n="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(r){return n&&r!==e?!0:(this.element.removeEventListener(t,r,!1),!1)},this)},r.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};var o=function(){this.eventElements=[]};o.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new r(t),this.eventElements.push(e)),e},o.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventElement(t).unbind(e,n)},o.prototype.unbindAll=function(){for(var t=0;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},o.prototype.once=function(t,e,n){var r=this.eventElement(t),o=function(t){r.unbind(e,o),n(t)};r.bind(e,o)},e.exports=o},{}],5:[function(t,e,n){"use strict";e.exports=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}
4438return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},{}],6:[function(t,e,n){"use strict";var r=t("./class"),o=t("./dom");n.toInt=function(t){return parseInt(t,10)||0},n.clone=function(t){if(null===t)return null;if("object"==typeof t){var e={};for(var n in t)e[n]=this.clone(t[n]);return e}return t},n.extend=function(t,e){var n=this.clone(t);for(var r in e)n[r]=this.clone(e[r]);return n},n.isEditable=function(t){return o.matches(t,"input,[contenteditable]")||o.matches(t,"select,[contenteditable]")||o.matches(t,"textarea,[contenteditable]")||o.matches(t,"button,[contenteditable]")},n.removePsClasses=function(t){for(var e=r.list(t),n=0;n<e.length;n++){var o=e[n];0===o.indexOf("ps-")&&r.remove(t,o)}},n.outerWidth=function(t){return this.toInt(o.css(t,"width"))+this.toInt(o.css(t,"paddingLeft"))+this.toInt(o.css(t,"paddingRight"))+this.toInt(o.css(t,"borderLeftWidth"))+this.toInt(o.css(t,"borderRightWidth"))},n.startScrolling=function(t,e){r.add(t,"ps-in-scrolling"),"undefined"!=typeof e?r.add(t,"ps-"+e):(r.add(t,"ps-x"),r.add(t,"ps-y"))},n.stopScrolling=function(t,e){r.remove(t,"ps-in-scrolling"),"undefined"!=typeof e?r.remove(t,"ps-"+e):(r.remove(t,"ps-x"),r.remove(t,"ps-y"))},n.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(t,e,n){"use strict";var r=t("./plugin/destroy"),o=t("./plugin/initialize"),i=t("./plugin/update");e.exports={initialize:o,update:i,destroy:r}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(t,e,n){"use strict";e.exports={maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,useBothWheelAxes:!1,useKeyboard:!0,useSelectionScroll:!1,wheelPropagation:!1,wheelSpeed:1}},{}],9:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances");e.exports=function(t){var e=i.get(t);e&&(e.event.unbindAll(),r.remove(e.scrollbarX),r.remove(e.scrollbarY),r.remove(e.scrollbarXRail),r.remove(e.scrollbarYRail),o.removePsClasses(t),i.remove(t))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(t,e,n){"use strict";function r(t,e){function n(t){return t.getBoundingClientRect()}var r=window.Event.prototype.stopPropagation.bind;e.settings.stopPropagationOnClick&&e.event.bind(e.scrollbarY,"click",r),e.event.bind(e.scrollbarYRail,"click",function(r){var i=o.toInt(e.scrollbarYHeight/2),a=e.railYRatio*(r.pageY-window.scrollY-n(e.scrollbarYRail).top-i),c=e.railYRatio*(e.railYHeight-e.scrollbarYHeight),u=a/c;0>u?u=0:u>1&&(u=1),s(t,"top",(e.contentHeight-e.containerHeight)*u),l(t),r.stopPropagation()}),e.settings.stopPropagationOnClick&&e.event.bind(e.scrollbarX,"click",r),e.event.bind(e.scrollbarXRail,"click",function(r){var i=o.toInt(e.scrollbarXWidth/2),a=e.railXRatio*(r.pageX-window.scrollX-n(e.scrollbarXRail).left-i),c=e.railXRatio*(e.railXWidth-e.scrollbarXWidth),u=a/c;0>u?u=0:u>1&&(u=1),s(t,"left",(e.contentWidth-e.containerWidth)*u-e.negativeScrollAdjustment),l(t),r.stopPropagation()})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(t,e,n){"use strict";function r(t,e){function n(n){var o=r+n*e.railXRatio,i=e.scrollbarXRail.getBoundingClientRect().left+e.railXRatio*(e.railXWidth-e.scrollbarXWidth);0>o?e.scrollbarXLeft=0:o>i?e.scrollbarXLeft=i:e.scrollbarXLeft=o;var s=l.toInt(e.scrollbarXLeft*(e.contentWidth-e.containerWidth)/(e.containerWidth-e.railXRatio*e.scrollbarXWidth))-e.negativeScrollAdjustment;c(t,"left",s)}var r=null,o=null,s=function(e){n(e.pageX-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"x"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarX,"mousedown",function(n){o=n.pageX,r=l.toInt(i.css(e.scrollbarX,"left"))*e.railXRatio,l.startScrolling(t,"x"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}function o(t,e){function n(n){var o=r+n*e.railYRatio,i=e.scrollbarYRail.getBoundingClientRect().top+e.railYRatio*(e.railYHeight-e.scrollbarYHeight);0>o?e.scrollbarYTop=0:o>
4438i?e.scrollbarYTop=i:e.scrollbarYTop=o;var s=l.toInt(e.scrollbarYTop*(e.contentHeight-e.containerHeight)/(e.containerHeight-e.railYRatio*e.scrollbarYHeight));c(t,"top",s)}var r=null,o=null,s=function(e){n(e.pageY-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"y"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarY,"mousedown",function(n){o=n.pageY,r=l.toInt(i.css(e.scrollbarY,"top"))*e.railYRatio,l.startScrolling(t,"y"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}var i=t("../../lib/dom"),l=t("../../lib/helper"),s=t("../instances"),a=t("../update-geometry"),c=t("../update-scroll");e.exports=function(t){var e=s.get(t);r(t,e),o(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&0>r)return!e.settings.wheelPropagation}var i=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===i&&0>n||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}var r=!1;e.event.bind(t,"mouseenter",function(){r=!0}),e.event.bind(t,"mouseleave",function(){r=!1});var i=!1;e.event.bind(e.ownerDocument,"keydown",function(a){if((!a.isDefaultPrevented||!a.isDefaultPrevented())&&r){var c=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(c){for(;c.shadowRoot;)c=c.shadowRoot.activeElement;if(o.isEditable(c))return}var u=0,d=0;switch(a.which){case 37:u=-30;break;case 38:d=30;break;case 39:u=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:d=a.shiftKey?90:-90;break;case 34:d=-90;break;case 35:d=a.ctrlKey?-e.contentHeight:-e.containerHeight;break;case 36:d=a.ctrlKey?t.scrollTop:e.containerHeight;break;default:return}s(t,"top",t.scrollTop-d),s(t,"left",t.scrollLeft+u),l(t),i=n(u,d),i&&a.preventDefault()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&0>r)return!e.settings.wheelPropagation}var i=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===i&&0>n||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}function r(t){var e=t.deltaX,n=-1*t.deltaY;return("undefined"==typeof e||"undefined"==typeof n)&&(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheelDelta),[e,n]}function i(e,n){var r=t.querySelector("textarea:hover");if(r){var o=r.scrollHeight-r.clientHeight;if(o>0&&!(0===r.scrollTop&&n>0||r.scrollTop===o&&0>n))return!0;var i=r.scrollLeft-r.clientWidth;if(i>0&&!(0===r.scrollLeft&&0>e||r.scrollLeft===i&&e>0))return!0}return!1}function a(a){if(o.env.isWebKit||!t.querySelector("select:focus")){var u=r(a),d=u[0],p=u[1];i(d,p)||(c=!1,e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(p?s(t,"top",t.scrollTop-p*e.settings.wheelSpeed):s(t,"top",t.scrollTop+d*e.settings.wheelSpeed),c=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(d?s(t,"left",t.scrollLeft+d*e.settings.wheelSpeed):s(t,"left",t.scrollLeft-p*e.settings.wheelSpeed),c=!0):(s(t,"top",t.scrollTop-p*e.settings.wheelSpeed),s(t,"left",t.scrollLeft+d*e.settings.wheelSpeed)),l(t),c=c||n(d,p),c&&(a.stopPropagation(),a.preventDefault()))}}var c=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",a):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",a)}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(t,e,n){"use strict";function r(t,e){e.event.bind(t,"scroll",function(){i(t)})}var o=t("../instances"),i=t("../update-geometry");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,n){"use strict";function r(t,e){function n(){var t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===t.toString().length?null:t.getRangeAt(0).commonAncestorContainer}function r(){c||(c=setInterval(function(){return i.get(t)?(s(t,"top",t.scrollTop+u.top),s(t,"left",t.scrollLeft+u.left),void l(t)):void clearInterval(c)},50))}function a(){c&&(clearInterval(c),c=null),o.stopScrolling(t)}var c=null,u={top:0,left:0},d=!1;e.event.bind(e.ownerDocument,"selectionchange",function(){t.contains(n())?d=!0:(d=!1,a())}),e.event.bind(window,"mouseup",function(){d&&(d=!1,a())}),e.event.bind(window,"mousemove",function(e){if(d){var n={x:e.pageX,y:e.pageY},i={left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight};n.x<i.left+3?(u.left=-5,o.startScrolling(t,"x")):n.x>i.right-3?(u.left=5,o.startScrolling(t,"x")):u.left=0,n.y<i.top+3?(i.top+3-n.y<5?u.top=-5:u.top=-20,o.startScrolling(t,"y")):n.y>i.bottom-3?(n.y-i.bottom+3<5?u.top=5:u.top=20,o.startScrolling(t,"y")):u.top=0,0===u.top&&0===u.left?a():r()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(t,e,n){"use strict";function r(t,e,n,r){function s(n,r){var o=t.scrollTop,i=t.scrollLeft,l=Math.abs(n),s=Math.abs(r);if(s>l){if(0>r&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(l>s&&(0>n&&i===e.contentWidth-e.containerWidth||n>0&&0===i))return!e.settings.swipePropagation;return!0}function a(e,n){l(t,"top",t.scrollTop-n),l(t,"left",t.scrollLeft-e),i(t)}function c(){Y=!0}function u(){Y=!1}function d(t){return t.targetTouches?t.targetTouches[0]:t}function p(t){return t.targetTouches&&1===t.targetTouches.length?!0:t.pointerType&&"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE?!0:!1}function f(t){if(p(t)){w=!0;var e=d(t);b.pageX=e.pageX,b.pageY=e.pageY,g=(new Date).getTime(),null!==y&&clearInterval(y),t.stopPropagation()}}function h(t){if(!Y&&w&&p(t)){var e=d(t),n={pageX:e.pageX,pageY:e.pageY},r=n.pageX-b.pageX,o=n.pageY-b.pageY;a(r,o),b=n;var i=(new Date).getTime(),l=i-g;l>0&&(m.x=r/l,m.y=o/l,g=i),s(r,o)&&(t.stopPropagation(),t.preventDefault())}}function v(){!Y&&w&&(w=!1,clearInterval(y),y=setInterval(function(){return o.get(t)?Math.abs(m.x)<.01&&Math.abs(m.y)<.01?void clearInterval(y):(a(30*m.x,30*m.y),m.x*=.8,void(m.y*=.8)):void clearInterval(y)},10))}var b={},g=0,m={},y=null,Y=!1,w=!1;n&&(e.event.bind(window,"touchstart",c),e.event.bind(window,"touchend",u),e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",v)),r&&(window.PointerEvent?(e.event.bind(window,"pointerdown",c),e.event.bind(window,"pointerup",u),e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",v)):window.MSPointerEvent&&(e.event.bind(window,"MSPointerDown",c),e.event.bind(window,"MSPointerUp",u),e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",h),e.event.bind(t,"MSPointerUp",v)))}var o=t("../instances"),i=t("../update-geometry"),l=t("../update-scroll");e.exports=function(t,e,n){var i=o.get(t);r(t,i,e,n)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(t,e,n){"use strict";var r=t("../lib/class"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry"),s=t("./handler/click-rail"),a=t("./handler/drag-scrollbar"),c=t("./handler/keyboard"),u=t("./handler/mouse-wheel"),d=t("./handler/native-scroll"),p=t("./handler/selection"),f=t("./handler/touch");e.exports=function(t,e){e="object"==typeof e?e:{},r.add(t,"ps-container");var n=i.add(t);n.settings=o.extend(n.settings,e),s(t),a(t),u(t),d(t),n.settings.useSelectionScroll&&p(t),(o.env.supportsTouch||o.env.supportsIePointer)&&f(t,o.env.supportsTouch,o.env.supportsIePointer),n.settings.useKeyboard&&c(t),l(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,n){"use strict";function r(t){var e=this;e.settings=d.clone(a),e.containerWidth=null,e.containerHeight=null,e.contentWidth=null,e.contentHeight=null,e.isRtl="rtl"===s.css(t,"direction"),e.isNegativeScroll=function(){var e=t.scrollLeft,n=null;return t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=e,n}(),e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,e.event=new c,e.ownerDocument=t.ownerDocument||document,e.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),t),e.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),e.scrollbarXRail),e.scrollbarXActive=null,e.scrollbarXWidth=null,e.scrollbarXLeft=null,e.scrollbarXBottom=d.toInt(s.css(e.scrollbarXRail,"bottom")),e.isScrollbarXUsingBottom=e.scrollbarXBottom===e.scrollbarXBottom,e.scrollbarXTop=e.isScrollbarXUsingBottom?null:d.toInt(s.css(e.scrollbarXRail,"top")),e.railBorderXWidth=d.toInt(s.css(e.scrollbarXRail,"borderLeftWidth"))+d.toInt(s.css(e.scrollbarXRail,"borderRightWidth")),s.css(e.scrollbarXRail,"display","block"),e.railXMarginWidth=d.toInt(s.css(e.scrollbarXRail,"marginLeft"))+d.toInt(s.css(e.scrollbarXRail,"marginRight")),s.css(e.scrollbarXRail,"display",""),e.railXWidth=null,e.railXRatio=null,e.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),t),e.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),e.scrollbarYRail),e.scrollbarYActive=null,e.scrollbarYHeight=null,e.scrollbarYTop=null,e.scrollbarYRight=d.toInt(s.css(e.scrollbarYRail,"right")),e.isScrollbarYUsingRight=e.scrollbarYRight===e.scrollbarYRight,e.scrollbarYLeft=e.isScrollbarYUsingRight?null:d.toInt(s.css(e.scrollbarYRail,"left")),e.scrollbarYOuterWidth=e.isRtl?d.outerWidth(e.scrollbarY):null,e.railBorderYWidth=d.toInt(s.css(e.scrollbarYRail,"borderTopWidth"))+d.toInt(s.css(e.scrollbarYRail,"borderBottomWidth")),s.css(e.scrollbarYRail,"display","block"),e.railYMarginHeight=d.toInt(s.css(e.scrollbarYRail,"marginTop"))+d.toInt(s.css(e.scrollbarYRail,"marginBottom")),s.css(e.scrollbarYRail,"display",""),e.railYHeight=null,e.railYRatio=null}function o(t){return"undefined"==typeof t.dataset?t.getAttribute("data-ps-id"):t.dataset.psId}function i(t,e){"undefined"==typeof t.dataset?t.setAttribute("data-ps-id",e):t.dataset.psId=e}function l(t){"undefined"==typeof t.dataset?t.removeAttribute("data-ps-id"):delete t.dataset.psId}var s=t("../lib/dom"),a=t("./default-setting"),c=t("../lib/event-manager"),u=t
4438("../lib/guid"),d=t("../lib/helper"),p={};n.add=function(t){var e=u();return i(t,e),p[e]=new r(t),p[e]},n.remove=function(t){delete p[o(t)],l(t)},n.get=function(t){return p[o(t)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,n){"use strict";function r(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function o(t,e){var n={width:e.railXWidth};e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-t.scrollTop:n.top=e.scrollbarXTop+t.scrollTop,l.css(e.scrollbarXRail,n);var r={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?r.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:r.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?r.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:r.left=e.scrollbarYLeft+t.scrollLeft,l.css(e.scrollbarYRail,r),l.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),l.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}var i=t("../lib/class"),l=t("../lib/dom"),s=t("../lib/helper"),a=t("./instances"),c=t("./update-scroll");e.exports=function(t){var e=a.get(t);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight;var n;t.contains(e.scrollbarXRail)||(n=l.queryChildren(t,".ps-scrollbar-x-rail"),n.length>0&&n.forEach(function(t){l.remove(t)}),l.appendTo(e.scrollbarXRail,t)),t.contains(e.scrollbarYRail)||(n=l.queryChildren(t,".ps-scrollbar-y-rail"),n.length>0&&n.forEach(function(t){l.remove(t)}),l.appendTo(e.scrollbarYRail,t)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=r(e,s.toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=s.toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):(e.scrollbarXActive=!1,e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=0),!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=r(e,s.toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=s.toInt(t.scrollTop*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):(e.scrollbarYActive=!1,e.scrollbarYHeight=0,e.scrollbarYTop=0,c(t,"top",0)),e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),o(t,e),i[e.scrollbarXActive?"add":"remove"](t,"ps-active-x"),i[e.scrollbarYActive?"add":"remove"](t,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(t,e,n){"use strict";var r,o,i=t("./instances"),l=document.createEvent("Event"),s=document.createEvent("Event"),a=document.createEvent("Event"),c=document.createEvent("Event"),u=document.createEvent("Event"),d=document.createEvent("Event"),p=document.createEvent("Event"),f=document.createEvent("Event"),h=document.createEvent("Event"),v=document.createEvent("Event");l.initEvent("ps-scroll-up",!0,!0),s.initEvent("ps-scroll-down",!0,!0),a.initEvent("ps-scroll-left",!0,!0),c.initEvent("ps-scroll-right",!0,!0),u.initEvent("ps-scroll-y",!0,!0),d.initEvent("ps-scroll-x",!0,!0),p.initEvent("ps-x-reach-start",!0,!0),f.initEvent("ps-x-reach-end",!0,!0),h.initEvent("ps-y-reach-start",!0,!0),v.initEvent("ps-y-reach-end",!0,!0),e.exports=function(t,e,n){if("undefined"==typeof t)throw"You must provide an element to the update-scroll function";if("undefined"==typeof e)throw"You must provide an axis to the update-scroll function";if("undefined"==typeof n)throw"You must provide a value to the update-scroll function";if("top"===e&&0>=n)return t.scrollTop=0,void t.dispatchEvent(h);if("left"===e&&0>=n)return t.scrollLeft=0,void t.dispatchEvent(p);var b=i.get(t);return"top"===e&&n>b.contentHeight-b.containerHeight?(t.scrollTop=b.contentHeight-b.containerHeight,void t.dispatchEvent(v)):"left"===e&&n>b.contentWidth-b.containerWidth?(t.scrollLeft=b.contentWidth-b.containerWidth,void t.dispatchEvent(f)):(r||(r=t.scrollTop),o||(o=t.scrollLeft),"top"===e&&r>n&&t.dispatchEvent(l),"top"===e&&n>
4438r&&t.dispatchEvent(s),"left"===e&&o>n&&t.dispatchEvent(a),"left"===e&&n>o&&t.dispatchEvent(c),"top"===e&&(t.scrollTop=r=n,t.dispatchEvent(u)),void("left"===e&&(t.scrollLeft=o=n,t.dispatchEvent(d))))}},{"./instances":18}],21:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry");e.exports=function(t){var e=i.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,r.css(e.scrollbarXRail,"display","block"),r.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=o.toInt(r.css(e.scrollbarXRail,"marginLeft"))+o.toInt(r.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=o.toInt(r.css(e.scrollbarYRail,"marginTop"))+o.toInt(r.css(e.scrollbarYRail,"marginBottom")),r.css(e.scrollbarXRail,"display","none"),r.css(e.scrollbarYRail,"display","none"),l(t),r.css(e.scrollbarXRail,"display",""),r.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19}]},{},[1]);; 4439/*! Magnific Popup - v1.1.0 - 2016-02-20 4440* http://dimsemenov.com/plugins/magnific-popup/ 4441* Copyright (c) 2016 Dmitry Semenov; */ 4442!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.
4442st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;
4442if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;
4442var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});
4442var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});; 4443/* 4444 _ _ _ _ 4445 ___| (_) ___| | __ (_)___ 4446/ __| | |/ __| |/ / | / __| 4447\__ \ | | (__| < _ | \__ \ 4448|___/_|_|\___|_|\_(_)/ |___/ 4449 |__/ 4450 4451 Version: 1.6.0
vendor: 33,111 bytes, lines 4451-4461
4451 4452 Author: Ken Wheeler 4453 Website: http://kenwheeler.github.io 4454 Docs: http://kenwheeler.github.io/slick 4455 Repo: http://github.com/kenwheeler/slick 4456 Issues: http://github.com/kenwheeler/slick/issues 4457 4458 */ 4459 4460!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,g,h,e=this;if(e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button" data-role="none">'+(b+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rtl:!1,slide:"",slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.hidden="hidden",e.paused=!1,e.positionProp=null,e.respondTo=null,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,f,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,g=e.options.responsive||null,g&&g.length>-1){e.respondTo=e.options.respondTo||"window";for(h in g)g.hasOwnProperty(h)&&(e.breakpoints.push(g[h].breakpoint),e.breakpointSettings[g[h].breakpoint]=g[h].settings);e.breakpoints.sort(function(a,b){return e.options.mobileFirst===!0?a-b:b-a})}"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(e.hidden="msHidden",e.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.init(),e.checkResponsive(!0)}var b=0;return c}(),b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=null!==c.options.asNavFor?a(c.options.asNavFor).slick("getSlick"):null;null!==d&&d.slideHandler(b,!0)},b.prototype.applyTransition=function(a){var b=this,c={};c[b.transitionType]=b.options.fade===!1?b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:"opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(0===a.currentSlide-1&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow=a(b.options.prevArrow),b.$nextArrow=a(b.options.nextArrow),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.appendTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled"))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class="'+b.options.dotsClass+'">',c=0;c<=b.getDotCount();c+=1)d+="<li>"+b.options.customPaging.call(this,b,c)+"</li>";d+="</ul>",b.$dots=a(d).appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),b.$slidesCache=b.$slides,b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.options.accessibility===!0&&b.$list.prop("tabIndex",0),b.setSlideClasses("number"==typeof this.currentSlide?this.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.checkResponsive=function(b){var d,e,f,c=this,g=c.$slider.width(),h=window.innerWidth||a(window).width();if("window"===c.respondTo?f=h:"slider"===c.respondTo?f=g:"min"===c.respondTo&&(f=Math.min(h,g)),c.originalSettings.responsive&&c.originalSettings.responsive.length>-1&&null!==c.originalSettings.responsive){e=null;for(d in c.breakpoints)c.breakpoints.hasOwnProperty(d)&&(c.originalSettings.mobileFirst===!1?f<c.breakpoints[d]&&(e=c.breakpoints[d]):f>c.breakpoints[d]&&(e=c.breakpoints[d]));null!==e?null!==c.activeBreakpoint?e!==c.activeBreakpoint&&(c.activeBreakpoint=e,"unslick"===c.breakpointSettings[e]?c.unslick():(c.options=a.extend({},c.originalSettings,c.breakpointSettings[e]),b===!0&&(c.currentSlide=c.options.initialSlide),c.refresh())):(c.activeBreakpoint=e,"unslick"===c.breakpointSettings[e]?c.unslick():(c.options=a.extend({},c.originalSettings,c.breakpointSettings[e]),b===!0&&(c.currentSlide=c.options.initialSlide),c.refresh())):null!==c.activeBreakpoint&&(c.activeBreakpoint=null,c.options=c.originalSettings,b===!0&&(c.currentSlide=c.options.initialSlide),c.refresh())}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.target);switch(e.is("a")&&b.preventDefault(),h=0!==d.slideCount%d.options.slidesToScroll,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||a(b.target).parent().index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c);break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(){var b=this;b.autoPlayClear(),b.touchObject={},a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&"object"!=typeof b.options.prevArrow&&b.$prevArrow.remove(),b.$nextArrow&&"object"!=typeof b.options.nextArrow&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-center slick-visible").removeAttr("data-slick-index").css({position:"",left:"",top:"",zIndex:"",opacity:"",width:""}),b.$slider.removeClass("slick-slider"),b.$slider.removeClass("slick-initialized"),b.$list.off(".slick"),a(window).off(".slick-"+b.instanceUid),a(document).off(".slick-"+b.instanceUid),b.$slider.html(b.$slides)},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:1e3}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:1e3}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)d=Math.ceil(a.slideCount/a.options.slidesToScroll);else if(a.options.centerMode===!0)d=a.slideCount;else for(;b<a.slideCount;)++d,b=c+a.options.slidesToShow,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=-1*b.slideWidth*b.options.slidesToShow,e=-1*d*b.options.slidesToShow),0!==b.slideCount%b.options.slidesToScroll&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=-1*(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth,e=-1*(b.options.slidesToShow-(a-b.slideCount))*d):(b.slideOffset=-1*b.slideCount%b.options.slidesToScroll*b.slideWidth,e=-1*b.slideCount%b.options.slidesToScroll*d))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?-1*a*b.slideWidth+b.slideOffset:-1*a*d+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?(e=a.slideCount-a.options.slidesToShow+1,a.options.centerMode===!0&&(e=a.slideCount)):(b=-1*a.slideCount,c=-1*a.slideCount,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(){var b=this;a(b.$slider).hasClass("slick-initialized")||(a(b.$slider).addClass("slick-initialized"),b.buildOut(),b.setProps(),b.startLoad(),b.loadSlider(),b.initializeEvents(),b.updateArrows(),b.updateDots()),b.$slider.trigger("init",[b])},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).on("mouseenter.slick",function(){b.paused=!0,b.autoPlayClear()}).on("mouseleave.slick",function(){b.paused=!1,b.autoPlay()})},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),b.options.autoplay===!0&&(a(document).on(b.visibilityChange,function(){b.visibility()}),b.options.pauseOnHover===!0&&(b.$list.on("mouseenter.slick",function(){b.paused=!0,b.autoPlayClear()}),b.$list.on("mouseleave.slick",function(){b.paused=!1,b.autoPlay()}))),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,function(){b.checkResponsive(),b.setPosition()}),a(window).on("resize.slick.slick-"+b.instanceUid,function(){a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.setPosition()},50))}),a("*[draggable!=true]",b.$slideTrack).on("dragstart",function(a){a.preventDefault()}),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.keyHandler=function(a){var b=this;37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:"next"}})},b.prototype.lazyLoad=function(){function g(b){a("img[data-lazy]",b).each(function(){var b=a(this),c=a(this).attr("data-lazy");b.load(function(){b.animate({opacity:1},200)}).css({opacity:0}).attr("src",c).removeAttr("data-lazy").removeClass("slick-loading")})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=e+b.options.slidesToShow,b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.paused=!1,a.autoPlay()},b.prototype.postSlide=function(a){var b=this;b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay===!0&&b.paused===!1&&b.autoPlay()},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.progressiveLazyLoad=function(){var c,d,b=this;c=a("img[data-lazy]",b.$slider).length,c>0&&(d=a("img[data-lazy]",b.$slider).first(),d.attr("src",d.attr("data-lazy")).removeClass("slick-loading").load(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad()}).error(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad()}))},b.prototype.refresh=function(){var b=this,c=b.currentSlide;b.destroy(),a.extend(b,b.initials),b.init(),b.changeSlide({data:{message:"index",index:c}},!0)},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses(0),b.setPosition(),b.$slider.trigger("reInit",[b])},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,d.reinit(),void 0)},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;if(a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1)a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length));else if(a.options.variableWidth===!0){var b=0;a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.children(".slick-slide").each(function(){b+=a.listWidth}),a.$slideTrack.width(Math.ceil(b)+1)}else a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length));var c=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-c)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=-1*b.slideWidth*d,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:800,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:800,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:900,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(a,b,c){var d=this;d.options[a]=b,c===!0&&(d.unload(),d.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;b.$slider.find(".slick-slide").removeClass("slick-active").removeClass("slick-center"),d=b.$slider.find(".slick-slide"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass("slick-active")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active"):d.length<=b.options.slidesToShow?d.addClass("slick-active"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.selectHandler=function(b){var c=this,d=parseInt(a(b.target).parents(".slick-slide").attr("data-slick-index"));return d||(d=0),c.slideCount<=c.options.slidesToShow?(c.$slider.find(".slick-slide").removeClass("slick-active"),c.$slides.eq(d).addClass("slick-active"),c.options.centerMode===!0&&(c.$slider.find(".slick-slide").removeClass("slick-center"),c.$slides.eq(d).addClass("slick-center")),c.asNavFor(d),void 0):(c.slideHandler(d),void 0)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d)),void 0):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d)),void 0):(i.options.autoplay===!0&&clearInterval(i.autoPlayTimer),e=0>d?0!==i.slideCount%i.options.slidesToScroll?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?0!==i.slideCount%i.options.slidesToScroll?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?i.fadeSlide(e,function(){i.postSlide(e)}):i.postSlide(e),i.animateHeight(),void 0):(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e),void 0)))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":"vertical"},b.prototype.swipeEnd=function(){var c,b=this;if(b.dragging=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe)switch(b.swipeDirection()){case"left":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.slideHandler(c),b.currentDirection=0,b.touchObject={},b.$slider.trigger("swipe",[b,"left"]);break;case"right":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.slideHandler(c),b.currentDirection=1,b.touchObject={},b.$slider.trigger("swipe",[b,"right"])}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.swipeLeft=b.options.vertical===!1?d+f*g:d+f*(b.$list.height()/b.listWidth)*g,b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):(b.setCSS(b.swipeLeft),void 0)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,b.dragging=!0,void 0)},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&"object"!=typeof b.options.prevArrow&&b.$prevArrow.remove(),b.$nextArrow&&"object"!=typeof b.options.nextArrow&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible").css("width","")},b.prototype.unslick=function(){var a=this;a.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.options.infinite!==!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.removeClass("slick-disabled"),a.$nextArrow.removeClass("slick-disabled"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled"),a.$nextArrow.removeClass("slick-disabled")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled"),a.$prevArrow.removeClass("slick-disabled")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled"),a.$prevArrow.removeClass("slick-disabled"))) 4461},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active"))},b.prototype.visibility=function(){var a=this;document[a.hidden]?(a.paused=!0,a.autoPlayClear()):(a.paused=!1,a.autoPlay())},a.fn.slick=function(){var g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length,f=0;for(f;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a},a(function(){a("[data-slick]").slick()})});
4461 4462(function ($) { 4463 $(document).ready(function() { 4464 "use strict"; 4465 4466 /*================== App Features =====================*/ 4467 $('.tab-carousel-list-here').slick({ 4468 slidesToShow: 1, 4469 slidesToScroll: 1, 4470 arrows: false, 4471 slide: 'div', 4472 fade: false, 4473 asNavFor: '.tab-carousel-nav', 4474 autoplay: true 4475 }); 4476 4477 $('.tab-carousel-nav').slick({ 4478 slidesToShow: 3, 4479 slidesToScroll: 1, 4480 asNavFor: '.tab-carousel-list-here', 4481 dots: false, 4482 arrows: false, 4483 slide: 'div', 4484 vertical: false, 4485 centerMode: true, 4486 centerPadding: '0px', 4487 focusOnSelect: true, 4488 loop: true, 4489 responsive: [ 4490 { 4491 breakpoint: 1200, 4492 settings: { 4493 slidesToShow: 3, 4494 slidesToScroll: 2, 4495 infinite: true, 4496 vertical: false, 4497 centerMode: true, 4498 centerPadding: '0px', 4499 dots: false 4500 } 4501 }, 4502 { 4503 breakpoint: 980, 4504 settings: { 4505 slidesToShow: 3, 4506 slidesToScroll: 2, 4507 infinite: true, 4508 vertical: false, 4509 centerMode: true, 4510 centerPadding: '0px', 4511 dots: false 4512 } 4513 }, 4514 { 4515 breakpoint: 767, 4516 settings: { 4517 slidesToShow: 1, 4518 slidesToScroll: 2, 4519 infinite: true, 4520 vertical: false, 4521 centerMode: true, 4522 centerPadding: '0px', 4523 dots: false 4524 } 4525 }, 4526 { 4527 breakpoint: 480, 4528 settings: { 4529 slidesToShow: 1, 4530 slidesToScroll: 1, 4531 infinite: true, 4532 vertical: false, 4533 centerMode: true, 4534 centerPadding: '0px', 4535 dots: false 4536 } 4537 } 4538 ] 4539 }); 4540 }); 4541 4542})(jQuery); 4543; 4544/*! lightgallery - v1.6.6 - 2017-12-20 4545* http://sachinchoolur.github.io/lightGallery/ 4546* Copyright (c) 2017 Sachin N; Licensed GPLv3 */ 4547!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(b,d){if(this.el=b,this.$el=a(b),this.s=a.extend({},c,d),this.s.dynamic&&"undefined"!==this.s.dynamicEl&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBartimeout=!1,this.isTouch="ontouchstart"in document.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.s.dynamic?this.$items=this.s.dynamicEl:"this"===this.s.selector?this.$items=this.$el:""!==this.s.selector?this.s.selectWithin?this.$items=a(this.s.selectWithin).find(this.s.selector):this.$items=this.$el.find(a(this.s.selector)):this.$items=this.$el.children(),this.$slide="",this.$outer="",this.init(),this}var c={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!0,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};b.prototype.init=function(){var b=this;b.s.preload>b.$items.length&&(b.s.preload=b.$items.length);var c=window.location.hash;c.indexOf("lg="+this.s.galleryId)>0&&(b.index=parseInt(c.split("&slide=")[1],10),a("body").addClass("lg-from-hash"),a("body").hasClass("lg-on")||(setTimeout(function(){b.build(b.index)}),a("body").addClass("lg-on"))),b.s.dynamic?(b.$el.trigger("onBeforeOpen.lg"),b.index=b.s.index||0,a("body").hasClass("lg-on")||setTimeout(function(){b.build(b.index),a("body").addClass("lg-on")})):b.$items.on("click.lgcustom",function(c){try{c.preventDefault(),c.preventDefault()}catch(a){c.returnValue=!1}b.$el.trigger("onBeforeOpen.lg"),b.index=b.s.index||b.$items.index(this),a("body").hasClass("lg-on")||(b.build(b.index),a("body").addClass("lg-on"))})},b.prototype.build=function(b){var c=this;c.structure(),a.each(a.fn.lightGallery.modules,function(b){c.modules[b]=new a.fn.lightGallery.modules[b](c.el)}),c.slide(b,!1,!1,!1),c.s.keyPress&&c.keyPress(),c.$items.length>1?(c.arrow(),setTimeout(function(){c.enableDrag(),c.enableSwipe()},50),c.s.mousewheel&&c.mousewheel()):c.$slide.on("click.lg",function(){c.$el.trigger("onSlideClick.lg")}),c.counter(),c.closeGallery(),c.$el.trigger("onAfterOpen.lg"),c.$outer.on("mousemove.lg
4547click.lg touchstart.lg",function(){c.$outer.removeClass("lg-hide-items"),clearTimeout(c.hideBartimeout),c.hideBartimeout=setTimeout(function(){c.$outer.addClass("lg-hide-items")},c.s.hideBarsDelay)}),c.$outer.trigger("mousemove.lg")},b.prototype.structure=function(){var b,c="",d="",e=0,f="",g=this;for(a("body").append('<div class="lg-backdrop"></div>'),a(".lg-backdrop").css("transition-duration",this.s.backdropDuration+"ms"),e=0;e<this.$items.length;e++)c+='<div class="lg-item"></div>';if(this.s.controls&&this.$items.length>1&&(d='<div class="lg-actions"><button class="lg-prev lg-icon">'+this.s.prevHtml+'</button><button class="lg-next lg-icon">'+this.s.nextHtml+"</button></div>"),".lg-sub-html"===this.s.appendSubHtmlTo&&(f='<div class="lg-sub-html"></div>'),b='<div class="lg-outer '+this.s.addClass+" "+this.s.startClass+'"><div class="lg" style="width:'+this.s.width+"; height:"+this.s.height+'"><div class="lg-inner">'+c+'</div><div class="lg-toolbar lg-group"><span class="lg-close lg-icon"></span></div>'+d+f+"</div></div>",a("body").append(b),this.$outer=a(".lg-outer"),this.$slide=this.$outer.find(".lg-item"),this.s.useLeft?(this.$outer.addClass("lg-use-left"),this.s.mode="lg-slide"):this.$outer.addClass("lg-use-css3"),g.setTop(),a(window).on("resize.lg orientationchange.lg",function(){setTimeout(function(){g.setTop()},100)}),this.$slide.eq(this.index).addClass("lg-current"),this.doCss()?this.$outer.addClass("lg-css3"):(this.$outer.addClass("lg-css"),this.s.speed=0),this.$outer.addClass(this.s.mode),this.s.enableDrag&&this.$items.length>1&&this.$outer.addClass("lg-grab"),this.s.showAfterLoad&&this.$outer.addClass("lg-show-after-load"),this.doCss()){var h=this.$outer.find(".lg-inner");h.css("transition-timing-function",this.s.cssEasing),h.css("transition-duration",this.s.speed+"ms")}setTimeout(function(){a(".lg-backdrop").addClass("in")}),setTimeout(function(){g.$outer.addClass("lg-visible")},this.s.backdropDuration),this.s.download&&this.$outer.find(".lg-toolbar").append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>'),this.prevScrollTop=a(window).scrollTop()},b.prototype.setTop=function(){if("100%"!==this.s.height){var b=a(window).height(),c=(b-parseInt(this.s.height,10))/2,d=this.$outer.find(".lg");b>=parseInt(this.s.height,10)?d.css("top",c+"px"):d.css("top","0px")}},b.prototype.doCss=function(){var a=function(){var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;for(c=0;c<a.length;c++)if(a[c]in b.style)return!0};return!!a()},b.prototype.isVideo=function(a,b){var c;if(c=this.s.dynamic?this.s.dynamicEl[b].html:this.$items.eq(b).attr("data-html"),!a)return c?{html5:!0}:(console.error("lightGallery :- data-src is not pvovided on slide item "+(b+1)+". Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html"),!1);var d=a.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),e=a.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),f=a.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),g=a.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return d?{youtube:d}:e?{vimeo:e}:f?{dailymotion:f}:g?{vk:g}:void 0},b.prototype.counter=function(){this.s.counter&&a(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'</span> / <span id="lg-counter-all">'+this.$items.length+"</span></div>")},b.prototype.addHtml=function(b){var c,d,e=null;if(this.s.dynamic?this.s.dynamicEl[b].subHtmlUrl?c=this.s.dynamicEl[b].subHtmlUrl:e=this.s.dynamicEl[b].subHtml:(d=this.$items.eq(b),d.attr("data-sub-html-url")?c=d.attr("data-sub-html-url"):(e=d.attr("data-sub-html"),this.s.getCaptionFromTitleOrAlt&&!e&&(e=d.attr("title")||d.find("img").first().attr("alt")))),!c)if("undefined"!=typeof e&&null!==e){var f=e.substring(0,1);"."!==f&&"#"!==f||(e=this.s.subHtmlSelectorRelative&&!this.s.dynamic?d.find(e).html():a(e).html())}else e="";".lg-sub-html"===this.s.appendSubHtmlTo?c?this.$outer.find(this.s.appendSubHtmlTo).load(c):this.$outer.find(this.s.appendSubHtmlTo).html(e):c?this.$slide.eq(b).load(c):this.$slide.eq(b).append(e),"undefined"!=typeof e&&null!==e&&(""===e?this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html"):this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")),this.$el.trigger("onAfterAppendSubHtml.lg",[b])},b.prototype.preload=function(a){var b=1,c=1;for(b=1;b<=this.s.preload&&!(b>=this.$items.length-a);b++)this.loadContent(a+b,!1,0);for(c=1;c<=this.s.preload&&!(a-c<0);c++)this.loadContent(a-c,!1,0)},b.prototype.loadContent=function(b,c,d){var e,f,g,h,i,j,k=this,l=!1,m=function(b){for(var c=[],d=[],e=0;e<b.length;e++){var g=b[e].split(" ");""===g[0]&&g.splice(0,1),d.push(g[0]),c.push(g[1])}for(var h=a(window).width(),i=0;i<c.length;i++)if(parseInt(c[i],10)>h){f=d[i];break}};if(k.s.dynamic){if(k.s.dynamicEl[b].poster&&(l=!0,g=k.s.dynamicEl[b].poster),j=k.s.dynamicEl[b].html,f=k.s.dynamicEl[b].src,k.s.dynamicEl[b].responsive){var n=k.s.dynamicEl[b].responsive.split(",");m(n)}h=k.s.dynamicEl[b].srcset,i=k.s.dynamicEl[b].sizes}else{if(k.$items.eq(b).attr("data-poster")&&(l=!0,g=k.$items.eq(b).attr("data-poster")),j=k.$items.eq(b).attr("data-html"),f=k.$items.eq(b).attr("href")||k.$items.eq(b).attr("data-src"),k.$items.eq(b).attr("data-responsive")){var o=k.$items.eq(b).attr("data-responsive").split(",");m(o)}h=k.$items.eq(b).attr("data-srcset"),i=k.$items.eq(b).attr("data-sizes")}var p=!1;k.s.dynamic?k.s.dynamicEl[b].iframe&&(p=!0):"true"===k.$items.eq(b).attr("data-iframe")&&(p=!0);var q=k.isVideo(f,b);if(!k.$slide.eq(b).hasClass("lg-loaded")){if(p)k.$slide.eq(b).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:'+k.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+f+'" allowfullscreen="true"></iframe></div></div>');else if(l){var r="";r=q&&q.youtube?"lg-has-youtube":q&&q.vimeo?"lg-has-vimeo":"lg-has-html5",k.$slide.eq(b).prepend('<div class="lg-video-cont '+r+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+g+'" /></div></div>')}else q?(k.$slide.eq(b).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>'),k.$el.trigger("hasVideo.lg",[b,f,j])):k.$slide.eq(b).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="'+f+'" /></div>');if(k.$el.trigger("onAferAppendSlide.lg",[b]),e=k.$slide.eq(b).find(".lg-object"),i&&e.attr("sizes",i),h){e.attr("srcset",h);try{picturefill({elements:[e[0]]})}catch(a){console.warn("lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.")}}".lg-sub-html"!==this.s.appendSubHtmlTo&&k.addHtml(b),k.$slide.eq(b).addClass("lg-loaded")}k.$slide.eq(b).find(".lg-object").on("load.lg error.lg",function(){var c=0;d&&!a("body").hasClass("lg-from-hash")&&(c=d),setTimeout(function(){k.$slide.eq(b).addClass("lg-complete"),k.$el.trigger("onSlideItemLoad.lg",[b,d||0])},c)}),q&&q.html5&&!l&&k.$slide.eq(b).addClass("lg-complete"),c===!0&&(k.$slide.eq(b).hasClass("lg-complete")?k.preload(b):k.$slide.eq(b).find(".lg-object").on("load.lg error.lg",function(){k.preload(b)}))},b.prototype.slide=function(b,c,d,e){var f=this.$outer.find(".lg-current").index(),g=this;if(!g.lGalleryOn||f!==b){var h=this.$slide.length,i=g.lGalleryOn?this.s.speed:0;if(!g.lgBusy){if(this.s.download){var j;j=g.s.dynamic?g.s.dynamicEl[b].downloadUrl!==!1&&(g.s.dynamicEl[b].downloadUrl||g.s.dynamicEl[b].src):"false"!==g.$items.eq(b).attr("data-download-url")&&(g.$items.eq(b).attr("data-download-url")||g.$items.eq(b).attr("href")||g.$items.eq(b).attr("data-src")),j?(a("#lg-download").attr("href",j),g.$outer.removeClass("lg-hide-download")):g.$outer.addClass("lg-hide-download")}if(this.$el.trigger("onBeforeSlide.lg",[f,b,c,d]),g.lgBusy=!0,clearTimeout(g.hideBartimeout),".lg-sub-html"===this.s.appendSubHtmlTo&&setTimeout(function(){g.addHtml(b)},i),this.arrowDisable(b),e||(b<f?e="prev":b>f&&(e="next")),c){this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide");var k,l;h>2?(k=b-1,l=b+1,0===b&&f===h-1?(l=0,k=h-1):b===h-1&&0===f&&(l=0,k=h-1)):(k=0,l=1),"prev"===e?g.$slide.eq(l).addClass("lg-next-slide"):g.$slide.eq(k).addClass("lg-prev-slide"),g.$slide.eq(b).addClass("lg-current")}else g.$outer.addClass("lg-no-trans"),this.$slide.removeClass("lg-prev-slide lg-next-slide"),"prev"===e?(this.$slide.eq(b).addClass("lg-prev-slide"),this.$slide.eq(f).addClass("lg-next-slide")):(this.$slide.eq(b).addClass("lg-next-slide"),this.$slide.eq(f).addClass("lg-prev-slide")),setTimeout(function(){g.$slide.removeClass("lg-current"),g.$slide.eq(b).addClass("lg-current"),g.$outer.removeClass("lg-no-trans")},50);g.lGalleryOn?(setTimeout(function(){g.loadContent(b,!0,0)},this.s.speed+50),setTimeout(function(){g.lgBusy=!1,g.$el.trigger("onAfterSlide.lg",[f,b,c,d])},this.s.speed)):(g.loadContent(b,!0,g.s.backdropDuration),g.lgBusy=!1,g.$el.trigger("onAfterSlide.lg",[f,b,c,d])),g.lGalleryOn=!0,this.s.counter&&a("#lg-counter-current").text(b+1)}g.index=b}},b.prototype.goToNextSlide=function(a){var b=this,c=b.s.loop;a&&b.$slide.length<3&&(c=!1),b.lgBusy||(b.index+1<b.$slide.length?(b.index++,b.$el.trigger("onBeforeNextSlide.lg",[b.index]),b.slide(b.index,a,!1,"next")):c?(b.index=0,b.$el.trigger("onBeforeNextSlide.lg",[b.index]),b.slide(b.index,a,!1,"next")):b.s.slideEndAnimatoin&&!a&&(b.$outer.addClass("lg-right-end"),setTimeout(function(){b.$outer.removeClass("lg-right-end")},400)))},b.prototype.goToPrevSlide=function(a){var b=this,c=b.s.loop;a&&b.$slide.length<3&&(c=!1),b.lgBusy||(b.index>0?(b.index--,b.$el.trigger("onBeforePrevSlide.lg",[b.index,a]),b.slide(b.index,a,!1,"prev")):c?(b.index=b.$items.length-1,b.$el.trigger("onBeforePrevSlide.lg",[b.index,a]),b.slide(b.index,a,!1,"prev")):b.s.slideEndAnimatoin&&!a&&(b.$outer.addClass("lg-left-end"),setTimeout(function(){b.$outer.removeClass("lg-left-end")},400)))},b.prototype.keyPress=function(){var b=this;this.$items.length>1&&a(window).on("keyup.lg",function(a){b.$items.length>1&&(37===a.keyCode&&(a.preventDefault(),b.goToPrevSlide()),39===a.keyCode&&(a.preventDefault(),b.goToNextSlide()))}),a(window).on("keydown.lg",function(a){b.s.escKey===!0&&27===a.keyCode&&(a.preventDefault(),b.$outer.hasClass("lg-thumb-open")?b.$outer.removeClass("lg-thumb-open"):b.destroy())})},b.prototype.arrow=function(){var a=this;this.$outer.find(".lg-prev").on("click.lg",function(){a.goToPrevSlide()}),this.$outer.find(".lg-next").on("click.lg",function(){a.goToNextSlide()})},b.prototype.arrowDisable=function(a){!this.s.loop&&this.s.hideControlOnEnd&&(a+1<this.$slide.length?this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-next").attr("disabled","disabled").addClass("disabled"),a>0?this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-prev").attr("disabled","disabled").addClass("disabled"))},b.prototype.setTranslate=function(a,b,c){this.s.useLeft?a.css("left",b):a.css({transform:"translate3d("+b+"px, "+c+"px, 0px)"})},b.prototype.touchMove=function(b,c){var d=c-b;Math.abs(d)>15&&(this.$outer.addClass("lg-dragging"),this.setTranslate(this.$slide.eq(this.index),d,0),this.setTranslate(a(".lg-prev-slide"),-this.$slide.eq(this.index).width()+d,0),this.setTranslate(a(".lg-next-slide"),this.$slide.eq(this.index).width()+d,0))},b.prototype.touchEnd=function(a){var b=this;"lg-slide"!==b.s.mode&&b.$outer.addClass("lg-slide"),this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity","0"),setTimeout(function(){b.$outer.removeClass("lg-dragging"),a<0&&Math.abs(a)>b.s.swipeThreshold?b.goToNextSlide(!0):a>0&&Math.abs(a)>b.s.swipeThreshold?b.goToPrevSlide(!0):Math.abs(a)<5&&b.$el.trigger("onSlideClick.lg"),b.$slide.removeAttr("style")}),setTimeout(function(){b.$outer.hasClass("lg-dragging")||"lg-slide"===b.s.mode||b.$outer.removeClass("lg-slide")},b.s.speed+100)},b.prototype.enableSwipe=function(){var a=this,b=0,c=0,d=!1;a.s.enableSwipe&&a.doCss()&&(a.$slide.on("touchstart.lg",function(c){a.$outer.hasClass("lg-zoomed")||a.lgBusy||(c.preventDefault(),a.manageSwipeClass(),b=c.originalEvent.targetTouches[0].pageX)}),a.$slide.on("touchmove.lg",function(e){a.$outer.hasClass("lg-zoomed")||(e.preventDefault(),c=e.originalEvent.targetTouches[0].pageX,a.touchMove(b,c),d=!0)}),a.$slide.on("touchend.lg",function(){a.$outer.hasClass("lg-zoomed")||(d?(d=!1,a.touchEnd(c-b)):a.$el.trigger("onSlideClick.lg"))}))},b.prototype.enableDrag=function(){var b=this,c=0,d=0,e=!1,f=!1;b.s.enableDrag&&b.doCss()&&(b.$slide.on("mousedown.lg",function(d){b.$outer.hasClass("lg-zoomed")||(a(d.target).hasClass("lg-object")||a(d.target).hasClass("lg-video-play"))&&(d.preventDefault(),b.lgBusy||(b.manageSwipeClass(),c=d.pageX,e=!0,b.$outer.scrollLeft+=1,b.$outer.scrollLeft-=1,b.$outer.removeClass("lg-grab").addClass("lg-grabbing"),b.$el.trigger("onDragstart.lg")))}),a(window).on("mousemove.lg",function(a){e&&(f=!0,d=a.pageX,b.touchMove(c,d),b.$el.trigger("onDragmove.lg"))}),a(window).on("mouseup.lg",function(g){f?(f=!1,b.touchEnd(d-c),b.$el.trigger("onDragend.lg")):(a(g.target).hasClass("lg-object")||a(g.target).hasClass("lg-video-play"))&&b.$el.trigger("onSlideClick.lg"),e&&(e=!1,b.$outer.removeClass("lg-grabbing").addClass("lg-grab"))}))},b.prototype.manageSwipeClass=function(){var a=this.index+1,b=this.index-1;this.s.loop&&this.$slide.length>2&&(0===this.index?b=this.$slide.length-1:this.index===this.$slide.length-1&&(a=0)),this.$slide.removeClass("lg-next-slide lg-prev-slide"),b>-1&&this.$slide.eq(b).addClass("lg-prev-slide"),this.$slide.eq(a).addClass("lg-next-slide")},b.prototype.mousewheel=function(){var a=this;a.$outer.on("mousewheel.lg",function(b){b.deltaY&&(b.deltaY>0?a.goToPrevSlide():a.goToNextSlide(),b.preventDefault())})},b.prototype.closeGallery=function(){var b=this,c=!1;this.$outer.find(".lg-close").on("click.lg",function(){b.destroy()}),b.s.closable&&(b.$outer.on("mousedown.lg",function(b){c=!!(a(b.target).is(".lg-outer")||a(b.target).is(".lg-item ")||a(b.target).is(".lg-img-wrap"))}),b.$outer.on("mouseup.lg",function(d){(a(d.target).is(".lg-outer")||a(d.target).is(".lg-item ")||a(d.target).is(".lg-img-wrap")&&c)&&
4547(b.$outer.hasClass("lg-dragging")||b.destroy())}))},b.prototype.destroy=function(b){var c=this;b||(c.$el.trigger("onBeforeClose.lg"),a(window).scrollTop(c.prevScrollTop)),b&&(c.s.dynamic||this.$items.off("click.lg click.lgcustom"),a.removeData(c.el,"lightGallery")),this.$el.off(".lg.tm"),a.each(a.fn.lightGallery.modules,function(a){c.modules[a]&&c.modules[a].destroy()}),this.lGalleryOn=!1,clearTimeout(c.hideBartimeout),this.hideBartimeout=!1,a(window).off(".lg"),a("body").removeClass("lg-on lg-from-hash"),c.$outer&&c.$outer.removeClass("lg-visible"),a(".lg-backdrop").removeClass("in"),setTimeout(function(){c.$outer&&c.$outer.remove(),a(".lg-backdrop").remove(),b||c.$el.trigger("onCloseAfter.lg")},c.s.backdropDuration+50)},a.fn.lightGallery=function(c){return this.each(function(){if(a.data(this,"lightGallery"))try{a(this).data("lightGallery").init()}catch(a){console.error("lightGallery has not initiated properly")}else a.data(this,"lightGallery",new b(this,c))})},a.fn.lightGallery.modules={}}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),!(this.core.$items.length<2)&&(this.core.s=a.extend({},b,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};c.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),a.progress(),a.core.s.autoplay&&a.$el.one("onSlideItemLoad.lg.tm",function(){a.startlAuto()}),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},c.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},c.prototype.controls=function(){var b=this,c='<span class="lg-autoplay-button lg-icon"></span>';a(this.core.s.appendAutoplayControlsTo).append(c),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},c.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1<a.core.$items.length?a.core.index++:a.core.index=0,a.fromAuto=!0,a.core.slide(a.core.index,!1,!1,"next")},a.core.s.speed+a.core.s.pause)},c.prototype.cancelAuto=function(){clearInterval(this.interval),this.interval=!1,this.core.$outer.find(".lg-progress").removeAttr("style"),this.core.$outer.removeClass("lg-show-autoplay"),this.core.$outer.find(".lg-progress-bar").removeClass("lg-start")},c.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},a.fn.lightGallery.modules.autoplay=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={fullScreen:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),this.core.s=a.extend({},b,this.core.s),this.init(),this};c.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;a='<span class="lg-fullscreen lg-icon"></span>',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},c.prototype.requestFullscreen=function(){var a=document.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},c.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},c.prototype.fullScreen=function(){var b=this;a(document).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){b.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?b.exitFullscreen():b.requestFullscreen()})},c.prototype.destroy=function(){this.exitFullscreen(),a(document).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={pager:!1},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),this.core.s=a.extend({},b,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};c.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),e.core.s.dynamic)for(var g=0;g<e.core.s.dynamicEl.length;g++)f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e.core.s.dynamicEl[g].thumb+'" /></div></span>';else e.core.$items.each(function(){f+=e.core.s.exThumbImage?'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).attr(e.core.s.exThumbImage)+'" /></div></span>':'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).find("img").attr("src")+'" /></div></span>'});c=e.core.$outer.find(".lg-pager-outer"),c.html(f),b=e.core.$outer.find(".lg-pager-cont"),b.on("click.lg touchend.lg",function(){var b=a(this);
vendor: 4,140 bytes, line 4547
4547e.core.index=b.index(),e.core.slide(e.core.index,!1,!0,!1)}),c.on("mouseover.lg",function(){clearTimeout(d),c.addClass("lg-pager-hover")}),c.on("mouseout.lg",function(){d=setTimeout(function(){c.removeClass("lg-pager-hover")})}),e.core.$el.on("onBeforeSlide.lg.tm",function(a,c,d){b.removeClass("lg-pager-active"),b.eq(d).addClass("lg-pager-active")})},c.prototype.destroy=function(){},a.fn.lightGallery.modules.pager=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbHeight:"80px",thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toogleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.$el=a(c),this.$thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.core.s.animateThumb&&(this.core.s.thumbHeight="100%"),this.left=0,this.init(),this};c.prototype.init=function(){var a=this;this.core.s.thumbnail&&this.core.$items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){a.core.$outer.addClass("lg-thumb-open")},700),this.core.s.pullCaptionUp&&this.core.$outer.addClass("lg-pull-caption-up"),this.build(),this.core.s.animateThumb&&this.core.doCss()?(this.core.s.enableThumbDrag&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toogle(),this.thumbkeyPress())},c.prototype.build=function(){function b(a,b,c){var g,h=d.core.isVideo(a,c)||{},i="";h.youtube||h.vimeo||h.dailymotion?h.youtube?g=d.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+h.youtube[1]+"/"+d.core.s.youtubeThumbSize+".jpg":b:h.vimeo?d.core.s.loadVimeoThumbnail?(g="//i.vimeocdn.com/video/error_"+f+".jpg",i=h.vimeo[1]):g=b:h.dailymotion&&(g=d.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+h.dailymotion[1]:b):g=b,e+='<div data-vimeo-id="'+i+'" class="lg-thumb-item" style="width:'+d.core.s.thumbWidth+"px; height: "+d.core.s.thumbHeight+"; margin-right: "+d.core.s.thumbMargin+'px"><img src="'+g+'" /></div>',i=""}var c,d=this,e="",f="",g='<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":f="640";break;case"thumbnail_medium":f="200x150";break;case"thumbnail_small":f="100x75"}if(d.core.$outer.addClass("lg-has-thumb"),d.core.$outer.find(".lg").append(g),d.$thumbOuter=d.core.$outer.find(".lg-thumb-outer"),d.thumbOuterWidth=d.$thumbOuter.width(),d.core.s.animateThumb&&d.core.$outer.find(".lg-thumb").css({width:d.thumbTotalWidth+"px",position:"relative"}),this.core.s.animateThumb&&d.$thumbOuter.css("height",d.core.s.thumbContHeight+"px"),d.core.s.dynamic)for(var h=0;h<d.core.s.dynamicEl.length;h++)b(d.core.s.dynamicEl[h].src,d.core.s.dynamicEl[h].thumb,h);else d.core.$items.each(function(c){d.core.s.exThumbImage?b(a(this).attr("href")||a(this).attr("data-src"),a(this).attr(d.core.s.exThumbImage),c):b(a(this).attr("href")||a(this).attr("data-src"),a(this).find("img").attr("src"),c)});d.core.$outer.find(".lg-thumb").html(e),c=d.core.$outer.find(".lg-thumb-item"),c.each(function(){var b=a(this),c=b.attr("data-vimeo-id");c&&a.getJSON("//www.vimeo.com/api/v2/video/"+c+".json?callback=?",{format:"json"},function(a){b.find("img").attr("src",a[0][d.core.s.vimeoThumbSize])})}),c.eq(d.core.index).addClass("active"),d.core.$el.on("onBeforeSlide.lg.tm",function(){c.removeClass("active"),c.eq(d.core.index).addClass("active")}),c.on("click.lg touchend.lg",function(){var b=a(this);setTimeout(function(){(d.thumbClickable&&!d.core.lgBusy||!d.core.doCss())&&(d.core.index=b.index(),d.core.slide(d.core.index,!1,
4547!0,!1))},50)}),d.core.$el.on("onBeforeSlide.lg.tm",function(){d.animateThumb(d.core.index)}),a(window).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){d.animateThumb(d.core.index),d.thumbOuterWidth=d.$thumbOuter.width()},200)})},c.prototype.setTranslate=function(a){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+a+"px, 0px, 0px)"})},c.prototype.animateThumb=function(a){var b=this.core.$outer.find(".lg-thumb");if(this.core.s.animateThumb){var c;switch(this.core.s.currentPagerPosition){case"left":c=0;break;case"middle":c=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":c=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*a-1-c,this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth),this.left<0&&(this.left=0),this.core.lGalleryOn?(b.hasClass("on")||this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms"),this.core.doCss()||b.animate({left:-this.left+"px"},this.core.s.speed)):this.core.doCss()||b.css("left",-this.left+"px"),this.setTranslate(this.left)}},c.prototype.enableThumbDrag=function(){var b=this,c=0,d=0,e=!1,f=!1,g=0;b.$thumbOuter.addClass("lg-grab"),b.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(a){b.thumbTotalWidth>b.thumbOuterWidth&&(a.preventDefault(),c=a.pageX,e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.thumbClickable=!1,b.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.thumb",function(a){e&&(g=b.left,f=!0,d=a.pageX,b.$thumbOuter.addClass("lg-dragging"),g-=d-c,g>b.thumbTotalWidth-b.thumbOuterWidth&&(g=b.thumbTotalWidth-b.thumbOuterWidth),g<0&&(g=0),b.setTranslate(g))}),a(window).on("mouseup.lg.thumb",function(){f?(f=!1,b.$thumbOuter.removeClass("lg-dragging"),b.left=g,Math.abs(d-c)<b.core.s.swipeThreshold&&(b.thumbClickable=!0)):b.thumbClickable=!0,e&&(e=!1,b.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab"))})},c.prototype.enableThumbSwipe=function(){var a=this,b=0,c=0,d=!1,e=0;a.core.$outer.find(".lg-thumb").on("touchstart.lg",function(c){a.thumbTotalWidth>a.thumbOuterWidth&&(c.preventDefault(),b=c.originalEvent.targetTouches[0].pageX,a.thumbClickable=!1)}),a.core.$outer.find(".lg-thumb").on("touchmove.lg",function(f){a.thumbTotalWidth>a.thumbOuterWidth&&(f.preventDefault(),c=f.originalEvent.targetTouches[0].pageX,d=!0,a.$thumbOuter.addClass("lg-dragging"),e=a.left,e-=c-b,e>a.thumbTotalWidth-a.thumbOuterWidth&&(e=a.thumbTotalWidth-a.thumbOuterWidth),e<0&&(e=0),a.setTranslate(e))}),a.core.$outer.find(".lg-thumb").on("touchend.lg",function(){a.thumbTotalWidth>a.thumbOuterWidth&&d?(d=!1,a.$thumbOuter.removeClass("lg-dragging"),Math.abs(c-b)<a.core.s.swipeThreshold&&(a.thumbClickable=!0),a.left=e):a.thumbClickable=!0})},c.prototype.toogle=function(){var a=this;a.core.s.toogleThumb&&(a.core.$outer.addClass("lg-can-toggle"),a.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>'),a.core.$outer.find(".lg-toogle-thumb").on("click.lg",function(){a.core.$outer.toggleClass("lg-thumb-open")}))},c.prototype.thumbkeyPress=function(){var b=this;a(window).on("keydown.lg.thumb",function(a){38===a.keyCode?(a.preventDefault(),b.core.$outer.addClass("lg-thumb-open")):40===a.keyCode&&(a.preventDefault(),b.core.$outer.removeClass("lg-thumb-open"))})},c.prototype.destroy=function(){this.core.s.thumbnail&&this.core.$items.length>1&&(a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"), 4548this.$thumbOuter.remove(),this.core.$outer.removeClass("lg-has-thumb"))},a.fn.lightGallery.modules.Thumbnail=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";function b(a,b,c,d){var e=this;if(e.core.$slide.eq(b).find(".lg-video").append(e.loadVideo(c,"lg-object",!0,b,d)),d)if(e.core.s.videojs)try{videojs(e.core.$slide.eq(b).find(".lg-html5").get(0),e.core.s.videojsOptions,function(){!e.videoLoaded&&e.core.s.autoplayFirstVideo&&this.play()})}catch(a){console.error("Make sure you have included videojs")}else!e.videoLoaded&&e.core.s.autoplayFirstVideo&&e.core.$slide.eq(b).find(".lg-html5").get(0).play()}function c(a,b){var c=this.core.$slide.eq(b).find(".lg-video-cont");c.hasClass("lg-has-iframe")||(c.css("max-width",this.core.s.videoMaxWidth),this.videoLoaded=!0)}function d(b,c,d){var e=this,f=e.core.$slide.eq(c),g=f.find(".lg-youtube").get(0),h=f.find(".lg-vimeo").get(0),i=f.find(".lg-dailymotion").get(0),j=f.find(".lg-vk").get(0),k=f.find(".lg-html5").get(0);if(g)g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*");else if(h)try{$f(h).api("pause")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(i)i.contentWindow.postMessage("pause","*");else if(k)if(e.core.s.videojs)try{videojs(k).pause()}catch(a){console.error("Make sure you have included videojs")}else k.pause();j&&a(j).attr("src",a(j).attr("src").replace("&autoplay","&noplay"));var l;l=e.core.s.dynamic?e.core.s.dynamicEl[d].src:e.core.$items.eq(d).attr("href")||e.core.$items.eq(d).attr("data-src");var m=e.core.isVideo(l,d)||{};(m.youtube||m.vimeo||m.dailymotion||m.vk)&&e.core.$outer.addClass("lg-hide-download")}var e={videoMaxWidth:"855px",autoplayFirstVideo:!0,youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1,videojsOptions:{}},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.videoLoaded=!1,this.init(),this};f.prototype.init=function(){var e=this;e.core.$el.on("hasVideo.lg.tm",b.bind(this)),e.core.$el.on("onAferAppendSlide.lg.tm",c.bind(this)),e.core.doCss()&&e.core.$items.length>1&&(e.core.s.enableSwipe||e.core.s.enableDrag)?e.core.$el.on("onSlideClick.lg.tm",function(){var a=e.core.$slide.eq(e.core.index);e.loadVideoOnclick(a)}):e.core.$slide.on("click.lg",function(){e.loadVideoOnclick(a(this))}),e.core.$el.on("onBeforeSlide.lg.tm",d.bind(this)),e.core.$el.on("onAfterSlide.lg.tm",function(a,b){e.core.$slide.eq(b).removeClass("lg-video-playing")})},f.prototype.loadVideo=function(b,c,d,e,f){var g="",h=1,i="",j=this.core.isVideo(b,e)||{};if(d&&(h=this.videoLoaded?0:this.core.s.autoplayFirstVideo?1:0),j.youtube)i="?wmode=
4548opaque&autoplay="+h+"&enablejsapi=1",this.core.s.youtubePlayerParams&&(i=i+"&"+a.param(this.core.s.youtubePlayerParams)),g='<iframe class="lg-video-object lg-youtube '+c+'" width="560" height="315" src="//www.youtube.com/embed/'+j.youtube[1]+i+'" frameborder="0" allowfullscreen></iframe>';else if(j.vimeo)i="?autoplay="+h+"&api=1",this.core.s.vimeoPlayerParams&&(i=i+"&"+a.param(this.core.s.vimeoPlayerParams)),g='<iframe class="lg-video-object lg-vimeo '+c+'" width="560" height="315" src="//player.vimeo.com/video/'+j.vimeo[1]+i+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';else if(j.dailymotion)i="?wmode=opaque&autoplay="+h+"&api=postMessage",this.core.s.dailymotionPlayerParams&&(i=i+"&"+a.param(this.core.s.dailymotionPlayerParams)),g='<iframe class="lg-video-object lg-dailymotion '+c+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+j.dailymotion[1]+i+'" frameborder="0" allowfullscreen></iframe>';else if(j.html5){var k=f.substring(0,1);"."!==k&&"#"!==k||(f=a(f).html()),g=f}else j.vk&&(i="&autoplay="+h,this.core.s.vkPlayerParams&&(i=i+"&"+a.param(this.core.s.vkPlayerParams)),g='<iframe class="lg-video-object lg-vk '+c+'" width="560" height="315" src="http://vk.com/video_ext.php?'+j.vk[1]+i+'" frameborder="0" allowfullscreen></iframe>');return g},f.prototype.loadVideoOnclick=function(a){var b=this;if(a.find(".lg-object").hasClass("lg-has-poster")&&a.find(".lg-object").is(":visible"))if(a.hasClass("lg-has-video")){var c=a.find(".lg-youtube").get(0),d=a.find(".lg-vimeo").get(0),e=a.find(".lg-dailymotion").get(0),f=a.find(".lg-html5").get(0);if(c)c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*");else if(d)try{$f(d).api("play")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(e)e.contentWindow.postMessage("play","*");else if(f)if(b.core.s.videojs)try{videojs(f).play()}catch(a){console.error("Make sure you have included videojs")}else f.play();a.addClass("lg-video-playing")}else{a.addClass("lg-video-playing lg-has-video");var g,h,i=function(c,d){if(a.find(".lg-video").append(b.loadVideo(c,"",!1,b.core.index,d)),d)if(b.core.s.videojs)try{videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0),b.core.s.videojsOptions,function(){this.play()})}catch(a){console.error("Make sure you have included videojs")}else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play()};b.core.s.dynamic?(g=b.core.s.dynamicEl[b.core.index].src,h=b.core.s.dynamicEl[b.core.index].html,i(g,h)):(g=b.core.$items.eq(b.core.index).attr("href")||b.core.$items.eq(b.core.index).attr("data-src"),h=b.core.$items.eq(b.core.index).attr("data-html"),i(g,h));var j=a.find(".lg-object");a.find(".lg-video").append(j),a.find(".lg-video-object").hasClass("lg-html5")||(a.removeClass("lg-complete"),a.find(".lg-video-object").on("load.lg error.lg",function(){a.addClass("lg-complete")}))}},f.prototype.destroy=function(){this.videoLoaded=!1},a.fn.lightGallery.modules.video=f}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b=function(){var a=!1,b=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return b&&parseInt(b[2],10)<54&&(a=!0),a},c={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:b()},d=function(b){return this.core=a(b).data("lightGallery"),this.core.s=a.extend({},c,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()),this};d.prototype.init=function(){var b=this,c='<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';b.core.s.actualSize&&(c+='<span id="lg-actual-size" class="lg-icon"></span>'),b.core.s.useLeftForZoom?b.core.$outer.addClass("lg-use-left-for-zoom"):b.core.$outer.addClass("lg-use-transition-for-zoom"),this.core.$outer.find(".lg-toolbar").append(c),b.core.$el.on("onSlideItemLoad.lg.tm.zoom",function(c,d,e){var f=b.core.s.enableZoomAfter+e;a("body").hasClass("lg-from-hash")&&e?f=0:a("body").removeClass("lg-from-hash"),b.zoomabletimeout=setTimeout(function(){b.core.$slide.eq(d).addClass("lg-zoomable")},f+30)});var d=1,e=function(c){var d,e,f=b.core.$outer.find(".lg-current .lg-image"),g=(a(window).width()-f.prop("offsetWidth"))/2,h=(a(window).height()-f.prop("offsetHeight"))/2+a(window).scrollTop();d=b.pageX-g,e=b.pageY-h;var i=(c-1)*d,j=(c-1)*e;f.css("transform","scale3d("+c+", "+c+", 1)").attr("data-scale",c),b.core.s.useLeftForZoom?f.parent().css({left:-i+"px",top:-j+"px"}).attr("data-x",i).attr("data-y",j):f.parent().css("transform","translate3d(-"+i+"px, -"+j+"px, 0)").attr("data-x",i).attr("data-y",j)},f=function(){d>1?b.core.$outer.addClass("lg-zoomed"):b.resetZoom(),d<1&&(d=1),e(d)},g=function(c,e,g,h){var i,j=e.prop("offsetWidth");
4548i=b.core.s.dynamic?b.core.s.dynamicEl[g].width||e[0].naturalWidth||j:b.core.$items.eq(g).attr("data-width")||e[0].naturalWidth||j;var k;b.core.$outer.hasClass("lg-zoomed")?d=1:i>j&&(k=i/j,d=k||2),h?(b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop()):(b.pageX=c.pageX||c.originalEvent.targetTouches[0].pageX,b.pageY=c.pageY||c.originalEvent.targetTouches[0].pageY),f(),setTimeout(function(){b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},h=!1;b.core.$el.on("onAferAppendSlide.lg.tm.zoom",function(a,c){var d=b.core.$slide.eq(c).find(".lg-image");d.on("dblclick",function(a){g(a,d,c)}),d.on("touchstart",function(a){h?(clearTimeout(h),h=null,g(a,d,c)):h=setTimeout(function(){h=null},300),a.preventDefault()})}),a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom",function(){b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop(),e(d)}),a("#lg-zoom-out").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d-=b.core.s.scale,f())}),a("#lg-zoom-in").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d+=b.core.s.scale,f())}),a("#lg-actual-size").on("click.lg",function(a){g(a,b.core.$slide.eq(b.core.index).find(".lg-image"),b.core.index,!0)}),b.core.$el.on("onBeforeSlide.lg.tm",function(){d=1,b.resetZoom()}),b.zoomDrag(),b.zoomSwipe()},d.prototype.resetZoom=function(){this.core.$outer.removeClass("lg-zoomed"),this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"),this.core.$slide.find(".lg-image").removeAttr("style data-scale"),this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()},d.prototype.zoomSwipe=function(){var a=this,b={},c={},d=!1,e=!1,f=!1;a.core.$slide.on("touchstart.lg",function(c){if(a.core.$outer.hasClass("lg-zoomed")){var d=a.core.$slide.eq(a.core.index).find(".lg-object");f=d.prop("offsetHeight")*d.attr("data-scale")>a.core.$outer.find(".lg").height(),e=d.prop("offsetWidth")*d.attr("data-scale")>a.core.$outer.find(".lg").width(),(e||f)&&(c.preventDefault(),b={x:c.originalEvent.targetTouches[0].pageX,y:c.originalEvent.targetTouches[0].pageY})}}),a.core.$slide.on("touchmove.lg",function(g){if(a.core.$outer.hasClass("lg-zoomed")){var h,i,j=a.core.$slide.eq(a.core.index).find(".lg-img-wrap");g.preventDefault(),d=!0,c={x:g.originalEvent.targetTouches[0].pageX,y:g.originalEvent.targetTouches[0].pageY},a.core.$outer.addClass("lg-zoom-dragging"),i=f?-Math.abs(j.attr("data-y"))+(c.y-b.y):-Math.abs(j.attr("data-y")),h=e?-Math.abs(j.attr("data-x"))+(c.x-b.x):-Math.abs(j.attr("data-x")),(Math.abs(c.x-b.x)>15||Math.abs(c.y-b.y)>15)&&(a.core.s.useLeftForZoom?j.css({left:h+"px",top:i+"px"}):j.css("transform","translate3d("+h+"px, "+i+"px, 0)"))}}),a.core.$slide.on("touchend.lg",function(){a.core.$outer.hasClass("lg-zoomed")&&d&&(d=!1,a.core.$outer.removeClass("lg-zoom-dragging"),a.touchendZoom(b,c,e,f))})},d.prototype.zoomDrag=function(){var b=this,c={},d={},e=!1,f=!1,g=!1,h=!1;b.core.$slide.on("mousedown.lg.zoom",function(d){var f=b.core.$slide.eq(b.core.index).find(".lg-object");h=f.prop("offsetHeight")*f.attr("data-scale")>b.core.$outer.find(".lg").height(),g=f.prop("offsetWidth")*f.attr("data-scale")>b.core.$outer.find(".lg").width(),b.core.$outer.hasClass("lg-zoomed")&&a(d.target).hasClass("lg-object")&&(g||h)&&(d.preventDefault(),c={x:d.pageX,y:d.pageY},e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.core.$outer.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.zoom",function(a){if(e){var i,j,k=b.core.$slide.eq(b.core.index).find(".lg-img-wrap");f=!0,d={x:a.pageX,y:a.pageY},b.core.$outer.addClass("lg-zoom-dragging"),j=h?-Math.abs(k.attr("data-y"))+(d.y-c.y):-Math.abs(k.attr("data-y")),i=g?-Math.abs(k.attr("data-x"))+(d.x-c.x):-Math.abs(k.attr("data-x")),b.core.s.useLeftForZoom?k.css({left:i+"px",top:j+"px"}):k.css("transform","translate3d("+i+"px, "+j+"px, 0)")}}),a(window).on("mouseup.lg.zoom",function(a){e&&(e=!1,b.core.$outer.removeClass("lg-zoom-dragging"),!f||c.x===d.x&&c.y===d.y||(d={x:a.pageX,y:a.pageY},b.touchendZoom(c,d,g,h)),f=!1),b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")})},d.prototype.touchendZoom=function(a,b,c,d){var e=this,f=e.core.$slide.eq(e.core.index).find(".lg-img-wrap"),g=e.core.$slide.eq(e.core.index).find(".lg-object"),h=-Math.abs(f.attr("data-x"))+(b.x-a.x),i=-Math.abs(f.attr("data-y"))+(b.y-a.y),j=(e.core.$outer.find(".lg").height()-g.prop("offsetHeight"))/2,k=Math.abs(g.prop("offsetHeight")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").height()+j),l=(e.core.$outer.find(".lg").width()-g.prop("offsetWidth"))/2,m=Math.abs(g.prop("offsetWidth")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").width()+l);(Math.abs(b.x-a.x)>15||Math.abs(b.y-a.y)>15)&&(d&&(i<=-k?i=-k:i>=-j&&(i=-j)),c&&(h<=-m?h=-m:h>=-l&&(h=-l)),d?f.attr("data-y",Math.abs(i)):i=-Math.abs(f.attr("data-y")),c?f.attr("data-x",Math.abs(h)):h=-Math.abs(f.attr("data-x")),e.core.s.useLeftForZoom?f.css({left:h+"px",top:i+"px"}):f.css("transform","translate3d("+h+"px, "+i+"px, 0)"))},d.prototype.destroy=function(){var b=this;b.core.$el.off(".lg.zoom"),a(window).off(".lg.zoom"),b.core.$slide.off(".lg.zoom"),b.core.$el.off(".lg.tm.zoom"),b.resetZoom(),clearTimeout(b.zoomabletimeout),b.zoomabletimeout=!1},a.fn.lightGallery.modules.zoom=d}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={hash:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.hash&&(this.oldHash=window.location.hash,this.init()),this};c.prototype.init=function(){var b,c=this;c.core.$el.on("onAfterSlide.lg.tm",function(a,b,d){history.replaceState?history.replaceState(null,null,window.location.pathname+window.location.search+"#lg="+c.core.s.galleryId+"&slide="+d):window.location.hash="lg="+c.core.s.galleryId+"&slide="+d}),a(window).on("hashchange.lg.hash",function(){b=window.location.hash;var a=parseInt(b.split("&slide=")[1],10);b.indexOf("lg="+c.core.s.galleryId)>-1?c.core.slide(a,!1,!1):c.core.lGalleryOn&&c.core.destroy()})},c.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?history.replaceState?history.replaceState(null,null,this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",googlePlus:!0,googlePlusDropdownText:"GooglePlus",pinterest:!0,pinterestDropdownText:"Pinterest"},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.share&&this.init(),this};
4548c.prototype.init=function(){var b=this,c='<span id="lg-share" class="lg-icon"><ul class="lg-dropdown" style="position: absolute;">';c+=b.core.s.facebook?'<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.facebookDropdownText+"</span></a></li>":"",c+=b.core.s.twitter?'<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.twitterDropdownText+"</span></a></li>":"",c+=b.core.s.googlePlus?'<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.googlePlusDropdownText+"</span></a></li>":"",c+=b.core.s.pinterest?'<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.pinterestDropdownText+"</span></a></li>":"",c+="</ul></span>",this.core.$outer.find(".lg-toolbar").append(c),this.core.$outer.find(".lg").append('<div id="lg-dropdown-overlay"></div>'),a("#lg-share").on("click.lg",function(){b.core.$outer.toggleClass("lg-dropdown-active")}),a("#lg-dropdown-overlay").on("click.lg",function(){b.core.$outer.removeClass("lg-dropdown-active")}),b.core.$el.on("onAfterSlide.lg.tm",function(c,d,e){setTimeout(function(){a("#lg-share-facebook").attr("href","https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(b.getSahreProps(e,"facebookShareUrl")||window.location.href)),a("#lg-share-twitter").attr("href","https://twitter.com/intent/tweet?text="+b.getSahreProps(e,"tweetText")+"&url="+encodeURIComponent(b.getSahreProps(e,"twitterShareUrl")||window.location.href)),a("#lg-share-googleplus").attr("href","https://plus.google.com/share?url="+encodeURIComponent(b.getSahreProps(e,"googleplusShareUrl")||window.location.href)),a("#lg-share-pinterest").attr("href","http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(b.getSahreProps(e,"pinterestShareUrl")||window.location.href)+"&media="+encodeURIComponent(b.getSahreProps(e,"src"))+"&description="+b.getSahreProps(e,"pinterestText"))},100)})},c.prototype.getSahreProps=function(a,b){var c="";if(this.core.s.dynamic)c=this.core.s.dynamicEl[a][b];else{var d=this.core.$items.eq(a).attr("href"),e=this.core.$items.eq(a).data(b);c="src"===b?d||e:e}return c},c.prototype.destroy=function(){},a.fn.lightGallery.modules.share=c}()});; 4549(function ($) { 4550 "use strict"; 4551 (function ($) { 4552 var $event = $.event, 4553 $special, resizeTimeout; 4554 $special = $event.special.debouncedresize = { 4555 setup: function () { 4556 $(this).on("resize", $special.handler); 4557 }, 4558 teardown: function () { 4559 $(this).off("resize", $special.handler); 4560 }, 4561 handler: function (event, execAsap) { 4562 // Save the context 4563 var context = this, 4564 args = arguments, 4565 dispatch = function () { 4566 // set correct event type 4567 event.type = "debouncedresize"; 4568 $event.dispatch.apply(context, args); 4569 }; 4570 4571 if (resizeTimeout) { 4572 clearTimeout(resizeTimeout); 4573 } 4574 4575 execAsap ? dispatch() : resizeTimeout = setTimeout(dispatch, $special.threshold); 4576 }, 4577 threshold: 150 4578 }; 4579})(jQuery); 4580 4581 //------- OWL carousle init --------------- 4582 jQuery(document).ready(function(){ 4583 function init_carousel_owl(){ 4584 $('.init-carousel-owl').each(function(){ 4585 var items = $(this).data('items') ? $(this).data('items') : 5; 4586 var items_lg = $(this).data('items_lg') ? $(this).data('items_lg') : 4; 4587 var items_md = $(this).data('items_md') ? $(this).data('items_md') : 3; 4588 var items_sm = $(this).data('items_sm') ? $(this).data('items_sm') : 2; 4589 var items_xs = $(this).data('items_xs') ? $(this).data('items_xs') : 1; 4590 var loop = $(this).data('loop') ? $(this).data('loop') : true; 4591 var speed = $(this).data('speed') ? $(this).data('speed') : 200; 4592 var auto_play = $(this).data('auto_play') ? $(this).data('auto_play') : false; 4593 var auto_play_speed = $(this).data('auto_play_speed') ? $(this).data('auto_play_speed') : false; 4594 var auto_play_timeout = $(this).data('auto_play_timeout') ? $(this).data('auto_play_timeout') : 1000; 4595 var auto_play_hover = $(this).data('auto_play_hover') ? $(this).data('auto_play_hover') : true; 4596 var navigation = $(this).data('navigation') ? $(this).data('navigation') : false; 4597 var rewind_nav = $(this).data('rewind_nav') ? $(this).data('rewind_nav') : true; 4598 var pagination = $(this).data('pagination') ? $(this).data('pagination') : false; 4599 var mouse_drag = $(this).data('mouse_drag') ? $(this).data('mouse_drag') : true; 4600 var touch_drag = $(this).data('touch_drag') ? $(this).data('touch_drag') : true; 4601 4602 $(this).owlCarousel({ 4603 nav: navigation, 4604 autoplay: false, 4605 autoplayTimeout: auto_play_timeout, 4606 autoplaySpeed: auto_play_speed, 4607 autoplayHoverPause: auto_play_hover, 4608 navText: [ '<i class="gv-icon-164"></i>', '<i class="gv-icon-165"></i>' ], 4609 autoHeight: false, 4610 loop: loop, 4611 dots: pagination, 4612 rewind: rewind_nav, 4613 smartSpeed: speed, 4614 mouseDrag: mouse_drag, 4615 touchDrag: touch_drag, 4616 responsive : { 4617 0 : { 4618 items: 1, 4619 nav: false 4620 }, 4621 640 : { 4622 items : items_xs, 4623 nav: false 4624 }, 4625 768 : { 4626 items : items_sm, 4627 nav: false 4628 }, 4629 992: { 4630 items : items_md 4631 }, 4632 1200: { 4633 items: items_lg 4634 }, 4635 1400: { 4636 items: items 4637 } 4638 } 4639 }); 4640 4641 }); 4642 } 4643 4644 init_carousel_owl(); 4645 4646 //===== Gallery ============ 4647 $("a[data-rel^='prettyPhoto[g_gal]']").prettyPhoto({ 4648 animation_speed:'normal', 4649 social_tools: false, 4650 });
4651 4652 //===== Popup video ============ 4653 $('.popup-video').magnificPopup({ 4654 type: 'iframe', 4655 fixedContentPos: false 4656 }); 4657 //===== Gallery ============ 4658 $(".lightGallery").lightGallery({ 4659 selector: '.image-item .zoomGallery' 4660 }); 4661 //===== AOS ============ 4662 AOS.init({ 4663 offset: 100, 4664 easing: 'ease-out-cubic', 4665 disable: 'mobile', 4666 delay: 100, 4667 duration: 600, 4668 }); 4669 4670 // PreLoader 4671 if ($(window).width() > 780) { 4672 if ( $.fn.jpreLoader ) { 4673 var $preloader = $( '.js-preloader' ); 4674 $preloader.jpreLoader({ 4675 autoClose: true, 4676 }, function() { 4677 $preloader.addClass( 'preloader-done' ); 4678 $( 'body' ).trigger( 'preloader-done' ); 4679 $( window ).trigger( 'resize' ); 4680 }); 4681 } 4682 }else{ 4683 $('body').removeClass('js-preloader'); 4684 }; 4685 4686 var $container = $('.post-masonry-style'); 4687 $container.imagesLoaded( function(){ 4688 $container.masonry({ 4689 itemSelector : '.item-masory', 4690 gutterWidth: 0, 4691 columnWidth: 1, 4692 }); 4693 }); 4694 4695 $('.gva-search-region .icon').on('click',function(e){ 4696 if($(this).parent().hasClass('show')){ 4697 $(this).parent().removeClass('show'); 4698 }else{ 4699 $(this).parent().addClass('show'); 4700 } 4701 e.stopPropagation(); 4702 }) 4703 4704 $('.quick-cart a.link-qc').on('click',function(e){ 4705 if($(this).parents('.quick-cart').hasClass('open')){ 4706 $(this).parents('.quick-cart').removeClass('open'); 4707 }else{ 4708 $(this).parents('.quick-cart').addClass('open'); 4709 } 4710 e.stopPropagation(); 4711 }) 4712 4713 // ================================================================================== 4714 // Offcavas 4715 // ================================================================================== 4716 $('#menu-bar').on('click',function(e){ 4717 if($('.gva-offcanvas-mobile').hasClass('show-view')){ 4718 $(this).removeClass('show-view'); 4719 $('.gva-offcanvas-mobile').removeClass('show-view'); 4720 }else{ 4721 $(this).addClass('show-view'); 4722 $('.gva-offcanvas-mobile').addClass('show-view'); 4723 } 4724 e.stopPropagation(); 4725 }) 4726 $('.close-offcanvas').on('click', function(e){ 4727 $('.gva-offcanvas-mobile').removeClass('show-view'); 4728 $('#menu-bar').removeClass('show-view'); 4729 }); 4730 4731 /*========== Click Show Sub Menu ==========*/ 4732 4733 $('.gva-navigation a').on('click','.nav-plus',function(){ 4734 if($(this).hasClass('nav-minus') == false){ 4735 $(this).parent('a').parent('li').find('> ul').slideDown(); 4736 $(this).addClass('nav-minus'); 4737 }else{ 4738 $(this).parent('a').parent('li').find('> ul').slideUp(); 4739 $(this).removeClass('nav-minus'); 4740 } 4741 return false; 4742 }); 4743 4744 /* ============ Isotope ==============*/ 4745 if ( $.fn.isotope ) { 4746 $( '.isotope-items' ).each(function() { 4747 var _pid = $(this).data('pid'); 4748 var $el = $( this ), 4749 $filter = $( '.portfolio-filter a.' + _pid ), 4750 $loop = $( this ); 4751 4752 $loop.isotope(); 4753 4754 $loop.imagesLoaded(function() { 4755 $loop.isotope( 'layout' ); 4756 }); 4757 4758 if ( $filter.length > 0 ) { 4759 4760 $filter.on( 'click', function( e ) { 4761 e.preventDefault(); 4762 var $a = $(this); 4763 $filter.removeClass( 'active' ); 4764 $a.addClass( 'active' ); 4765 $loop.isotope({ filter: $a.data( 'filter' ) }); 4766 }); 4767 }; 4768 }); 4769 }; 4770 4771 //==== Customize ===== 4772 $('.help .control-panel').click(function(){ 4773 if($(this).parents('.help').hasClass('show')){ 4774 $(this).parents('.help').removeClass('show'); 4775 }else $(this).parents('.help').addClass('show'); 4776 }); 4777 4778 $('.drupal-message .close').click(function(){ 4779 $(this).parent().remove(); 4780 }) 4781 4782 $('.gavias-skins-panel .control-panel').click(function(){ 4783 if($(this).parents('.gavias-skins-panel').hasClass('active')){ 4784 $(this).parents('.gavias-skins-panel').removeClass('active'); 4785 }else $(this).parents('.gavias-skins-panel').addClass('active'); 4786 }); 4787 4788 $('.gavias-skins-panel .layout').click(function(){ 4789 $('body').removeClass('wide-layout').removeClass('boxed'); 4790 $('body').addClass($(this).data('layout')); 4791 $('.gavias-skins-panel .layout').removeClass('active'); 4792 $(this).addClass('active'); 4793 var $container = $('.post-masonry-style'); 4794 $container.imagesLoaded( function(){ 4795 $container.masonry({ 4796 itemSelector : '.item-masory', 4797 gutterWidth: 0, 4798 columnWidth: 1, 4799 }); 4800 });
4801 }); 4802 4803 /*-------------Milestone Counter----------*/ 4804 jQuery('.milestone-block').each(function() { 4805 jQuery(this).appear(function() { 4806 var $endNum = parseInt(jQuery(this).find('.milestone-number').text()); 4807 jQuery(this).find('.milestone-number').countTo({ 4808 from: 0, 4809 to: $endNum, 4810 speed: 4000, 4811 refreshInterval: 60, 4812 formatter: function (value, options) { 4813 value = value.toFixed(options.decimals); 4814 value = value.replace(/\B(?=(\d{3})+(?!\d))/g, ','); 4815 return value; 4816 } 4817 }); 4818 },{accX: 0, accY: 0}); 4819 }); 4820 4821 /*----------- Animation Progress Bars --------------------*/ 4822 $("[data-progress-animation]").each(function() { 4823 var $this = $(this); 4824 $this.appear(function() { 4825 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 4826 if(delay > 1) $this.css("animation-delay", delay + "ms"); 4827 setTimeout(function() { $this.animate({width: $this.attr("data-progress-animation")}, 800);}, delay); 4828 }, {accX: 0, accY: -50}); 4829 }); 4830 4831 /*----------------------------------------------------*/ 4832 /* Pie Charts 4833 /*----------------------------------------------------*/ 4834 var pieChartClass = 'pieChart', 4835 pieChartLoadedClass = 'pie-chart-loaded'; 4836 4837 function initPieCharts() { 4838 var chart = $('.' + pieChartClass); 4839 chart.each(function() { 4840 $(this).appear(function() { 4841 var $this = $(this), 4842 chartBarColor = ($this.data('bar-color')) ? $this.data('bar-color') : "#F54F36", 4843 chartBarWidth = ($this.data('bar-width')) ? ($this.data('bar-width')) : 150 4844 if( !$this.hasClass(pieChartLoadedClass) ) { 4845 $this.easyPieChart({ 4846 animate: 2000, 4847 size: chartBarWidth, 4848 lineWidth: 8, 4849 scaleColor: false, 4850 trackColor: "#eee", 4851 barColor: chartBarColor, 4852 }).addClass(pieChartLoadedClass); 4853 } 4854 }); 4855 }); 4856 } 4857 initPieCharts(); 4858 4859 // ============================================================================ 4860 // mb_YTPlayer video background 4861 // ============================================================================ 4862 if (!jQuery.browser.mobile){ 4863 $(".youtube-bg").mb_YTPlayer(); 4864 } 4865 4866 // ============================================================================ 4867 // Fixed top Menu Bar 4868 // ============================================================================ 4869 if($('.gv-sticky-menu').length > 0){ 4870 var sticky = new Waypoint.Sticky({ 4871 element: $('.gv-sticky-menu')[0] 4872 }); 4873 } 4874 4875 // ============================================================================ 4876 // Text Typer 4877 // ============================================================================ 4878 $("[data-typer-targets]", ".rotate-text").typer(); 4879 4880 var animationDimensions = function() { 4881 var gavias_height = $(window).height(); 4882 $('.bb-container.full-screen').each(function(){ 4883 $(this).css('height', gavias_height); 4884 }); 4885 } 4886 4887 $(document).ready(function(){ 4888 if($('.full-screen').length > 0){ 4889 animationDimensions(); 4890 } 4891 }) 4892 4893 $(window).on('load', function(){ 4894 if($('.full-screen').length > 0){ 4895 animationDimensions(); 4896 } 4897 }); 4898 4899 $(window).on("debouncedresize", function(event) { 4900 if($('.full-screen').length > 0){ 4901 setTimeout(function() { 4902 animationDimensions(); 4903 }, 50); 4904 } 4905 }); 4906 4907 // Footer fixed 4908 var footerFixed = function() { 4909 var footer_height = $('#footer').height(); 4910 $('body.footer-fixed .gva-body-page').css('margin-bottom', footer_height); 4911 } 4912 4913 footerFixed(); 4914 4915 $(window).on("debouncedresize", function(event) { 4916 footerFixed(); 4917 }); 4918 4919 $('.gsc-tabs-views-ajax ul[data-load="ajax"] a').on('click', function(){ 4920 var $href = $(this).data('panel'); 4921 var self = $(this); 4922 var main = $($href); 4923 var main_elements = $($href); 4924 self.parents('.nav-tabs').find('li').removeClass('active'); 4925 self.parent('li').addClass('active'); 4926 if ( main.length > 0 ) { 4927 if(main_elements.data('loaded') == false){ 4928 self.parents('.gsc-tabs-views-ajax').addClass('ajaxloadding'); 4929 $.ajax({
4930 url: drupalSettings.gavias_load_ajax_view, 4931 type:'POST', 4932 dataType: 'html', 4933 data: 'view=' + main.data('view') 4934 }).done(function(reponse) { 4935 main_elements.html( reponse ); 4936 main.data('loaded', 'true'); 4937 self.parents('.gsc-tabs-views-ajax').find('.tab-pane').removeClass('active'); 4938 $($href).addClass('active'); 4939 init_carousel_owl(); 4940 Drupal.attachBehaviors(document); 4941 self.parents('.gsc-tabs-views-ajax').removeClass('ajaxloadding'); 4942 }); 4943 return true; 4944 }else{ 4945 self.parents('.gsc-tabs-views-ajax').find('.tab-pane').removeClass('active'); 4946 $($href).addClass('active'); 4947 } 4948 } 4949 }); 4950 4951 //== Ajax Lesson == 4952 var ajax_links = 'a.gva-pajax'; 4953 $(ajax_links).on('click', function(){ 4954 var $href = $(this).data('href'); 4955 $('#gva-popup-ajax').addClass('gva-ajax-loading').addClass('open'); 4956 $('body').addClass('loading-pjax open-popup'); 4957 $('html').addClass('open-popup'); 4958 $.ajax({
4959 url: $href, 4960 type:'GET', 4961 dataType: 'html', 4962 }).done(function(response) { 4963 var $result = $(response).find('#preview-lesson-content'); 4964 $('#gva-popup-ajax .gva-popup-ajax-content').html( $result ); 4965 $('body').removeClass('gva-ajax-loading'); 4966 }); 4967 return true; 4968 }); 4969 4970 $(document).delegate('#gva-popup-ajax a.btn-close', 'click', function(){ 4971 $(this).parents('#gva-popup-ajax').removeClass('open'); 4972 $('body').removeClass('open-popup'); 4973 $('html').removeClass('open-popup'); 4974 $(this).parents('#gva-popup-ajax').find('.gva-popup-ajax-content').html(''); 4975 $('body').removeClass('loading-pjax'); 4976 }); 4977 4978 }); 4979 4980 4981 $(window).on('load', function(){ 4982 if($('.row-overlay').length > 0){ 4983 var html_help = $('div.help').html(); 4984 $('.gav-help-region').remove(); 4985 html_help = '<div class="gav-help-region">' + html_help + '</div>'; 4986 $('.row-overlay').first().after(html_help); 4987 $('.gav-help-region').show(); 4988 }else if($('.block-gavias-sliderlayer').length > 0){ 4989 var html_help = $('div.help').html(); 4990 $('.gav-help-region').remove(); 4991 html_help = '<div class="gav-help-region">' + html_help + '</div>'; 4992 $('.block-gavias-sliderlayer').first().after(html_help); 4993 $('.gav-help-region').show(); 4994 }else{ 4995 var html_help = $('div.help').html(); 4996 $('.gav-help-region').remove(); 4997 html_help = '<div class="gav-help-region">' + html_help + '</div>'; 4998 $('#page-main-content').first().before(html_help); 4999 $('.gav-help-region').show(); 5000 } 5001 5002 if($('.full-screen').length > 0){ 5003 animationDimensions(); 5004 } 5005 }); 5006 5007 5008})(jQuery); 5009; 5010/******************************************** 5011 - THEMEPUNCH TOOLS Ver. 1.0 - 5012 Last Update of Tools 27.02.2015 5013*********************************************/ 5014 5015 5016/* 5017* @fileOverview TouchSwipe - jQuery Plugin 5018* @version 1.6.12 5019* 5020* @author Matt Bryson http://www.github.com/mattbryson 5021* @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin 5022* @see http://labs.rampinteractive.co.uk/touchSwipe/ 5023* @see http://plugins.jquery.com/project/touchSwipe 5024* 5025* Copyright (c) 2010-2015 Matt Bryson 5026* Dual licensed under the MIT or GPL Version 2 licenses. 5027* 5028*/ 5029 5030/* 5031* 5032* Changelog 5033* $Date: 2010-12-12 (Wed, 12 Dec 2010) $ 5034* $version: 1.0.0 5035* $version: 1.0.1 - removed multibyte comments 5036* 5037* $Date: 2011-21-02 (Mon, 21 Feb 2011) $ 5038* $version: 1.1.0 - added allowPageScroll property to allow swiping and scrolling of page 5039* - changed handler signatures so one handler can be used for multiple events 5040* $Date: 2011-23-02 (Wed, 23 Feb 2011) $ 5041* $version: 1.2.0 - added click handler. This is fired if the user simply clicks and does not swipe. The event object and click target are passed to handler. 5042* - If you use the http://code.google.com/p/jquery-ui-for-ipad-and-iphone/ plugin, you can also assign jQuery mouse events to children of a touchSwipe object. 5043* $version: 1.2.1 - removed console log! 5044* 5045* $version: 1.2.2 - Fixed bug where scope was not preserved in callback methods. 5046* 5047* $Date: 2011-28-04 (Thurs, 28 April 2011) $ 5048* $version: 1.2.4 - Changed licence terms to be MIT or GPL inline with jQuery. Added check for support of touch events to stop non compatible browsers erroring. 5049* 5050* $Date: 2011-27-09 (Tues, 27 September 2011) $
5051* $version: 1.2.5 - Added support for testing swipes with mouse on desktop browser (thanks to https://github.com/joelhy) 5052* 5053* $Date: 2012-14-05 (Mon, 14 May 2012) $ 5054* $version: 1.2.6 - Added timeThreshold between start and end touch, so user can ignore slow swipes (thanks to Mark Chase). Default is null, all swipes are detected 5055* 5056* $Date: 2012-05-06 (Tues, 05 June 2012) $ 5057* $version: 1.2.7 - Changed time threshold to have null default for backwards compatibility. Added duration param passed back in events, and refactored how time is handled. 5058* 5059* $Date: 2012-05-06 (Tues, 05 June 2012) $ 5060* $version: 1.2.8 - Added the possibility to return a value like null or false in the trigger callback. In that way we can control when the touch start/move should take effect or not (simply by returning in some cases return null; or return false;) This effects the ontouchstart/ontouchmove event. 5061* 5062* $Date: 2012-06-06 (Wed, 06 June 2012) $ 5063* $version: 1.3.0 - Refactored whole plugin to allow for methods to be executed, as well as exposed defaults for user override. Added 'enable', 'disable', and 'destroy' methods 5064* 5065* $Date: 2012-05-06 (Fri, 05 June 2012) $ 5066* $version: 1.3.1 - Bug fixes - bind() with false as last argument is no longer supported in jQuery 1.6, also, if you just click, the duration is now returned correctly. 5067* 5068* $Date: 2012-29-07 (Sun, 29 July 2012) $ 5069* $version: 1.3.2 - Added fallbackToMouseEvents option to NOT capture mouse events on non touch devices. 5070* - Added "all" fingers value to the fingers property, so any combination of fingers triggers the swipe, allowing event handlers to check the finger count 5071* 5072* $Date: 2012-09-08 (Thurs, 9 Aug 2012) $ 5073* $version: 1.3.3 - Code tidy prep for minefied version 5074* 5075* $Date: 2012-04-10 (wed, 4 Oct 2012) $ 5076* $version: 1.4.0 - Added pinch support, pinchIn and pinchOut 5077* 5078* $Date: 2012-11-10 (Thurs, 11 Oct 2012) $ 5079* $version: 1.5.0 - Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is one select that removes all form, input select, button and anchor elements. 5080* 5081* $Date: 2012-22-10 (Mon, 22 Oct 2012) $ 5082* $version: 1.5.1 - Fixed bug with jQuery 1.8 and trailing comma in excludedElements 5083* - Fixed bug with IE and eventPreventDefault() 5084* $Date: 2013-01-12 (Fri, 12 Jan 2013) $ 5085* $version: 1.6.0 - Fixed bugs with pinching, mainly when both pinch and swipe enabled, as well as adding time threshold for multifinger gestures, so releasing one finger beofre the other doesnt trigger as single finger gesture. 5086* - made the demo site all static local HTML pages so they can be run locally by a developer 5087* - added jsDoc comments and added documentation for the plugin 5088* - code tidy 5089* - added triggerOnTouchLeave property that will end the event when the user swipes off the element. 5090* $Date: 2013-03-23 (Sat, 23 Mar 2013) $
5091* $version: 1.6.1 - Added support for ie8 touch events 5092* $version: 1.6.2 - Added support for events binding with on / off / bind in jQ for all callback names. 5093* - Deprecated the 'click' handler in favour of tap. 5094* - added cancelThreshold property 5095* - added option method to update init options at runtime 5096* $version 1.6.3 - added doubletap, longtap events and longTapThreshold, doubleTapThreshold property 5097* 5098* $Date: 2013-04-04 (Thurs, 04 April 2013) $ 5099* $version 1.6.4 - Fixed bug with cancelThreshold introduced in 1.6.3, where swipe status no longer fired start event, and stopped once swiping back. 5100* 5101* $Date: 2013-08-24 (Sat, 24 Aug 2013) $ 5102* $version 1.6.5 - Merged a few pull requests fixing various bugs, added AMD support. 5103* 5104* $Date: 2014-06-04 (Wed, 04 June 2014) $ 5105* $version 1.6.6 - Merge of pull requests. 5106* - IE10 touch support 5107* - Only prevent default event handling on valid swipe 5108* - Separate license/changelog comment 5109* - Detect if the swipe is valid at the end of the touch event. 5110* - Pass fingerdata to event handlers. 5111* - Add 'hold' gesture 5112* - Be more tolerant about the tap distance 5113* - Typos and minor fixes 5114* 5115* $Date: 2015-22-01 (Thurs, 22 Jan 2015) $ 5116* $version 1.6.7 - Added patch from https://github.com/mattbryson/TouchSwipe-Jquery-Plugin/issues/206 to fix memory leak 5117* 5118* $Date: 2015-2-2 (Mon, 2 Feb 2015) $ 5119* $version 1.6.8 - Added preventDefaultEvents option to proxy events regardless. 5120* - Fixed issue with swipe and pinch not triggering at the same time 5121* 5122* $Date: 2015-9-6 (Tues, 9 June 2015) $ 5123* $version 1.6.9 - Added PR from jdalton/hybrid to fix pointer events 5124* - Added scrolling demo 5125* - Added version property to plugin 5126* 5127* $Date: 2015-1-10 (Wed, 1 October 2015) $ 5128* $version 1.6.10 - Added PR from beatspace to fix tap events 5129* $version 1.6.11 - Added PRs from indri-indri ( Doc tidyup), kkirsche ( Bower tidy up ), UziTech (preventDefaultEvents fixes ) 5130* - Allowed setting multiple options via .swipe("options", options_hash) and more simply .swipe(options_hash) or exisitng instances 5131* $version 1.6.12 - Fixed bug with multi finger releases above 2 not triggering events 5132*/ 5133 5134/** 5135 * See (http://jquery.com/). 5136 * @name $ 5137 * @class 5138 * See the jQuery Library (http://jquery.com/) for full details. This just 5139 * documents the function and classes that are added to jQuery by this plug-in. 5140 */ 5141 5142/** 5143 * See (http://jquery.com/) 5144 * @name fn 5145 * @class 5146 * See the jQuery Library (http://jquery.com/) for full details. This just 5147 * documents the function and classes that are added to jQuery by this plug-in. 5148 * @memberOf $ 5149 */ 5150 5151 5152 5153(function (factory) { 5154 if (typeof define === 'function' && define.amd && define.amd.jQuery) { 5155 // AMD. Register as anonymous module. 5156 define(['jquery'], factory); 5157 } else { 5158 // Browser globals. 5159 factory(jQuery); 5160 } 5161}(function ($) { 5162 "use strict"; 5163 5164 //Constants 5165 var VERSION = "1.6.12", 5166 LEFT = "left", 5167 RIGHT = "right", 5168 UP = "up", 5169 DOWN = "down", 5170 IN = "in", 5171 OUT = "out", 5172 5173 NONE = "none", 5174 AUTO = "auto", 5175 5176 SWIPE = "swipe", 5177 PINCH = "pinch", 5178 TAP = "tap", 5179 DOUBLE_TAP = "doubletap", 5180 LONG_TAP = "longtap", 5181 HOLD = "hold", 5182 5183 HORIZONTAL = "horizontal", 5184 VERTICAL = "vertical", 5185 5186 ALL_FINGERS = "all", 5187 5188 DOUBLE_TAP_THRESHOLD = 10, 5189 5190 PHASE_START = "start", 5191 PHASE_MOVE = "move", 5192 PHASE_END = "end", 5193 PHASE_CANCEL = "cancel", 5194 5195 SUPPORTS_TOUCH = 'ontouchstart' in window, 5196 5197 SUPPORTS_POINTER_IE10 = window.navigator.msPointerEnabled && !window.navigator.pointerEnabled, 5198 5199 SUPPORTS_POINTER = window.navigator.pointerEnabled || window.navigator.msPointerEnabled, 5200 5201 PLUGIN_NS = 'TouchSwipe'; 5202 5203 5204 5205 /** 5206 * The default configuration, and available options to configure touch swipe with. 5207 * You can set the default values by updating any of the properties prior to instantiation. 5208 * @name $.fn.swipe.defaults 5209 * @namespace 5210 * @property {int} [fingers=1] The number of fingers to detect in a swipe. Any swipes that do not meet this requirement will NOT trigger swipe handlers. 5211 * @property {int} [threshold=75] The number of pixels that the user must move their finger by before it is considered a swipe. 5212 * @property {int} [cancelThreshold=null] The number of pixels that the user must move their finger back from the original swipe direction to cancel the gesture. 5213 * @property {int} [pinchThreshold=20] The number of pixels that the user must pinch their finger by before it is considered a pinch. 5214 * @property {int} [maxTimeThreshold=null] Time, in milliseconds, between touchStart and touchEnd must NOT exceed in order to be considered a swipe. 5215 * @property {int} [fingerReleaseThreshold=250] Time in milliseconds between releasing multiple fingers. If 2 fingers are down, and are released one after the other, if they are within this threshold, it counts as a simultaneous release. 5216 * @property {int} [longTapThreshold=500] Time in milliseconds between tap and release for a long tap 5217 * @property {int} [doubleTapThreshold=200] Time in milliseconds between 2 taps to count as a double tap 5218 * @property {function} [swipe=null] A handler to catch all swipes. See {@link $.fn.swipe#event:swipe} 5219 * @property {function} [swipeLeft=null] A handler that is triggered for "left" swipes. See {@link $.fn.swipe#event:swipeLeft} 5220 * @property {function} [swipeRight=null] A handler that is triggered for "right" swipes. See {@link $.fn.swipe#event:swipeRight} 5221 * @property {function} [swipeUp=null] A handler that is triggered for "up" swipes. See {@link $.fn.swipe#event:swipeUp} 5222 * @property {function} [swipeDown=null] A handler that is triggered for "down" swipes. See {@link $.fn.swipe#event:swipeDown} 5223 * @property {function} [swipeStatus=null] A handler triggered for every phase of the swipe. See {@link $.fn.swipe#event:swipeStatus} 5224 * @property {function} [pinchIn=null] A handler triggered for pinch in events. See {@link $.fn.swipe#event:pinchIn} 5225 * @property {function} [pinchOut=null] A handler triggered for pinch out events. See {@link $.fn.swipe#event:pinchOut} 5226 * @property {function} [pinchStatus=null] A handler triggered for every phase of a pinch. See {@link $.fn.swipe#event:pinchStatus} 5227 * @property {function} [tap=null] A handler triggered when a user just taps on the item, rather than swipes it. If they do not move, tap is triggered, if they do move, it is not. 5228 * @property {function} [doubleTap=null] A handler triggered when a user double taps on the item. The delay between taps can be set with the doubleTapThreshold property. See {@link $.fn.swipe.defaults#doubleTapThreshold} 5229 * @property {function} [longTap=null] A handler triggered when a user long taps on the item. The delay between start and end can be set with the longTapThreshold property. See {@link $.fn.swipe.defaults#longTapThreshold} 5230 * @property (function) [hold=null] A handler triggered when a user reaches longTapThreshold on the item. See {@link $.fn.swipe.defaults#longTapThreshold} 5231 * @property {boolean} [triggerOnTouchEnd=true] If true, the swipe events are triggered when the touch end event is received (user releases finger). If false, it will be triggered on reaching the threshold, and then cancel the touch event automatically. 5232 * @property {boolean} [triggerOnTouchLeave=false] If true, then when the user leaves the swipe object, the swipe will end and trigger appropriate handlers. 5233 * @property {string|undefined} [allowPageScroll='auto'] How the browser handles page scrolls when the user is swiping on a touchSwipe object. See {@link $.fn.swipe.pageScroll}. <br/><br/> 5234 <code>"auto"</code> : all undefined swipes will cause the page to scroll in that direction. <br/> 5235 <code>"none"</code> : the page will not scroll when user swipes. <br/> 5236 <code>"horizontal"</code> : will force page to scroll on horizontal swipes. <br/> 5237 <code>"vertical"</code> : will force page to scroll on vertical swipes. <br/> 5238 * @property {boolean} [fallbackToMouseEvents=true] If true mouse events are used when run on a non touch device, false will stop swipes being triggered by mouse events on non tocuh devices. 5239 * @property {string} [excludedElements="button, input, select, textarea, a, .noSwipe"] A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes all form, input, select, button, anchor and .noSwipe elements. 5240 * @property {boolean} [preventDefaultEvents=true] by default default events are cancelled, so the page doesn't move. You can dissable this so both native events fire as well as your handlers. 5241 5242 */ 5243 var defaults = { 5244 fingers: 1, 5245 threshold: 75, 5246 cancelThreshold:null, 5247 pinchThreshold:20, 5248 maxTimeThreshold: null, 5249 fingerReleaseThreshold:250, 5250 longTapThreshold:500, 5251 doubleTapThreshold:200, 5252 swipe: null, 5253 swipeLeft: null, 5254 swipeRight: null, 5255 swipeUp: null, 5256 swipeDown: null, 5257 swipeStatus: null, 5258 pinchIn:null, 5259 pinchOut:null, 5260 pinchStatus:null, 5261 click:null, //Deprecated since 1.6.2 5262 tap:null, 5263 doubleTap:null, 5264 longTap:null, 5265 hold:null, 5266 triggerOnTouchEnd: true, 5267 triggerOnTouchLeave:false, 5268 allowPageScroll: "auto", 5269 fallbackToMouseEvents: true, 5270 excludedElements:"label, button, input, select, textarea, a, .noSwipe", 5271 preventDefaultEvents:true 5272 }; 5273 5274 5275 5276 /** 5277 * Applies TouchSwipe behaviour to one or more jQuery objects. 5278 * The TouchSwipe plugin can be instantiated via this method, or methods within
5279 * TouchSwipe can be executed via this method as per jQuery plugin architecture. 5280 * An existing plugin can have its options changed simply by re calling .swipe(options) 5281 * @see TouchSwipe 5282 * @class 5283 * @param {Mixed} method If the current DOMNode is a TouchSwipe object, and <code>method</code> is a TouchSwipe method, then 5284 * the <code>method</code> is executed, and any following arguments are passed to the TouchSwipe method. 5285 * If <code>method</code> is an object, then the TouchSwipe class is instantiated on the current DOMNode, passing the 5286 * configuration properties defined in the object. See TouchSwipe 5287 * 5288 */ 5289 $.fn.swipe = function (method) { 5290 var $this = $(this), 5291 plugin = $this.data(PLUGIN_NS); 5292 5293 //Check if we are already instantiated and trying to execute a method 5294 if (plugin && typeof method === 'string') { 5295 if (plugin[method]) { 5296 return plugin[method].apply(this, Array.prototype.slice.call(arguments, 1)); 5297 } else { 5298 $.error('Method ' + method + ' does not exist on jQuery.swipe'); 5299 } 5300 } 5301 5302 //Else update existing plugin with new options hash 5303 else if (plugin && typeof method === 'object') { 5304 plugin['option'].apply(this, arguments); 5305 } 5306 5307 //Else not instantiated and trying to pass init object (or nothing) 5308 else if (!plugin && (typeof method === 'object' || !method)) { 5309 return init.apply(this, arguments); 5310 } 5311 5312 return $this; 5313 }; 5314 5315 /** 5316 * The version of the plugin 5317 * @readonly 5318 */ 5319 $.fn.swipe.version = VERSION; 5320 5321 5322 5323 //Expose our defaults so a user could override the plugin defaults 5324 $.fn.swipe.defaults = defaults; 5325 5326 /** 5327 * The phases that a touch event goes through. The <code>phase</code> is passed to the event handlers. 5328 * These properties are read only, attempting to change them will not alter the values passed to the event handlers. 5329 * @namespace 5330 * @readonly 5331 * @property {string} PHASE_START Constant indicating the start phase of the touch event. Value is <code>"start"</code>. 5332 * @property {string} PHASE_MOVE Constant indicating the move phase of the touch event. Value is <code>"move"</code>. 5333 * @property {string} PHASE_END Constant indicating the end phase of the touch event. Value is <code>"end"</code>. 5334 * @property {string} PHASE_CANCEL Constant indicating the cancel phase of the touch event. Value is <code>"cancel"</code>. 5335 */ 5336 $.fn.swipe.phases = { 5337 PHASE_START: PHASE_START, 5338 PHASE_MOVE: PHASE_MOVE, 5339 PHASE_END: PHASE_END, 5340 PHASE_CANCEL: PHASE_CANCEL 5341 }; 5342 5343 /** 5344 * The direction constants that are passed to the event handlers. 5345 * These properties are read only, attempting to change them will not alter the values passed to the event handlers. 5346 * @namespace 5347 * @readonly 5348 * @property {string} LEFT Constant indicating the left direction. Value is <code>"left"</code>. 5349 * @property {string} RIGHT Constant indicating the right direction. Value is <code>"right"</code>. 5350 * @property {string} UP Constant indicating the up direction. Value is <code>"up"</code>. 5351 * @property {string} DOWN Constant indicating the down direction. Value is <code>"cancel"</code>. 5352 * @property {string} IN Constant indicating the in direction. Value is <code>"in"</code>. 5353 * @property {string} OUT Constant indicating the out direction. Value is <code>"out"</code>. 5354 */ 5355 $.fn.swipe.directions = { 5356 LEFT: LEFT, 5357 RIGHT: RIGHT, 5358 UP: UP, 5359 DOWN: DOWN, 5360 IN : IN, 5361 OUT: OUT 5362 }; 5363 5364 /** 5365 * The page scroll constants that can be used to set the value of <code>allowPageScroll</code> option 5366 * These properties are read only 5367 * @namespace 5368 * @readonly 5369 * @see $.fn.swipe.defaults#allowPageScroll 5370 * @property {string} NONE Constant indicating no page scrolling is allowed. Value is <code>"none"</code>. 5371 * @property {string} HORIZONTAL Constant indicating horizontal page scrolling is allowed. Value is <code>"horizontal"</code>. 5372 * @property {string} VERTICAL Constant indicating vertical page scrolling is allowed. Value is <code>"vertical"</code>. 5373 * @property {string} AUTO Constant indicating either horizontal or vertical will be allowed, depending on the swipe handlers registered. Value is <code>"auto"</code>. 5374 */ 5375 $.fn.swipe.pageScroll = { 5376 NONE: NONE, 5377 HORIZONTAL: HORIZONTAL, 5378 VERTICAL: VERTICAL, 5379 AUTO: AUTO 5380 }; 5381 5382 /** 5383 * Constants representing the number of fingers used in a swipe. These are used to set both the value of <code>fingers</code> in the 5384 * options object, as well as the value of the <code>fingers</code> event property. 5385 * These properties are read only, attempting to change them will not alter the values passed to the event handlers. 5386 * @namespace 5387 * @readonly 5388 * @see $.fn.swipe.defaults#fingers 5389 * @property {string} ONE Constant indicating 1 finger is to be detected / was detected. Value is <code>1</code>. 5390 * @property {string} TWO Constant indicating 2 fingers are to be detected / were detected. Value is <code>2</code>. 5391 * @property {string} THREE Constant indicating 3 finger are to be detected / were detected. Value is <code>3</code>. 5392 * @property {string} FOUR Constant indicating 4 finger are to be detected / were detected. Not all devices support this. Value is <code>4</code>. 5393 * @property {string} FIVE Constant indicating 5 finger are to be detected / were detected. Not all devices support this. Value is <code>5</code>. 5394 * @property {string} ALL Constant indicating any combination of finger are to be detected. Value is <code>"all"</code>. 5395 */ 5396 $.fn.swipe.fingers = { 5397 ONE: 1, 5398 TWO: 2, 5399 THREE: 3, 5400 FOUR: 4, 5401 FIVE: 5, 5402 ALL: ALL_FINGERS 5403 }; 5404 5405 /** 5406 * Initialise the plugin for each DOM element matched
vendor: 18,166 bytes, lines 5407-5947
5407 * This creates a new instance of the main TouchSwipe class for each DOM element, and then 5408 * saves a reference to that instance in the elements data property. 5409 * @internal 5410 */ 5411 function init(options) { 5412 //Prep and extend the options 5413 if (options && (options.allowPageScroll === undefined && (options.swipe !== undefined || options.swipeStatus !== undefined))) { 5414 options.allowPageScroll = NONE; 5415 } 5416 5417 //Check for deprecated options 5418 //Ensure that any old click handlers are assigned to the new tap, unless we have a tap 5419 if(options.click!==undefined && options.tap===undefined) { 5420 options.tap = options.click; 5421 } 5422 5423 if (!options) { 5424 options = {}; 5425 } 5426 5427 //pass empty object so we dont modify the defaults 5428 options = $.extend({}, $.fn.swipe.defaults, options); 5429 5430 //For each element instantiate the plugin 5431 return this.each(function () { 5432 var $this = $(this); 5433 5434 //Check we havent already initialised the plugin 5435 var plugin = $this.data(PLUGIN_NS); 5436 5437 if (!plugin) { 5438 plugin = new TouchSwipe(this, options); 5439 $this.data(PLUGIN_NS, plugin); 5440 } 5441 }); 5442 } 5443 5444 /** 5445 * Main TouchSwipe Plugin Class. 5446 * Do not use this to construct your TouchSwipe object, use the jQuery plugin method $.fn.swipe(); {@link $.fn.swipe} 5447 * @private 5448 * @name TouchSwipe 5449 * @param {DOMNode} element The HTML DOM object to apply to plugin to 5450 * @param {Object} options The options to configure the plugin with. @link {$.fn.swipe.defaults} 5451 * @see $.fh.swipe.defaults 5452 * @see $.fh.swipe 5453 * @class 5454 */ 5455 function TouchSwipe(element, options) { 5456 5457 //take a local/instacne level copy of the options - should make it this.options really... 5458 var options = $.extend({}, options); 5459 5460 var useTouchEvents = (SUPPORTS_TOUCH || SUPPORTS_POINTER || !options.fallbackToMouseEvents), 5461 START_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerDown' : 'pointerdown') : 'touchstart') : 'mousedown', 5462 MOVE_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerMove' : 'pointermove') : 'touchmove') : 'mousemove', 5463 END_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerUp' : 'pointerup') : 'touchend') : 'mouseup', 5464 LEAVE_EV = useTouchEvents ? null : 'mouseleave', //we manually detect leave on touch devices, so null event here 5465 CANCEL_EV = (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerCancel' : 'pointercancel') : 'touchcancel'); 5466 5467 5468 5469 //touch properties 5470 var distance = 0, 5471 direction = null, 5472 duration = 0, 5473 startTouchesDistance = 0, 5474 endTouchesDistance = 0, 5475 pinchZoom = 1, 5476 pinchDistance = 0, 5477 pinchDirection = 0, 5478 maximumsMap=null; 5479 5480 5481 5482 //jQuery wrapped element for this instance 5483 var $element = $(element); 5484 5485 //Current phase of th touch cycle 5486 var phase = "start"; 5487 5488 // the current number of fingers being used. 5489 var fingerCount = 0; 5490 5491 //track mouse points / delta 5492 var fingerData = {}; 5493 5494 //track times 5495 var startTime = 0, 5496 endTime = 0, 5497 previousTouchEndTime=0, 5498 fingerCountAtRelease=0, 5499 doubleTapStartTime=0; 5500 5501 //Timeouts 5502 var singleTapTimeout=null, 5503 holdTimeout=null; 5504 5505 // Add gestures to all swipable areas if supported 5506 try { 5507 $element.bind(START_EV, touchStart); 5508 $element.bind(CANCEL_EV, touchCancel); 5509 } 5510 catch (e) { 5511 $.error('events not supported ' + START_EV + ',' + CANCEL_EV + ' on jQuery.swipe'); 5512 } 5513 5514 // 5515 //Public methods 5516 // 5517 5518 /** 5519 * re-enables the swipe plugin with the previous configuration 5520 * @function 5521 * @name $.fn.swipe#enable 5522 * @return {DOMNode} The Dom element that was registered with TouchSwipe 5523 * @example $("#element").swipe("enable"); 5524 */ 5525 this.enable = function () { 5526 $element.bind(START_EV, touchStart); 5527 $element.bind(CANCEL_EV, touchCancel); 5528 return $element; 5529 }; 5530 5531 /** 5532 * disables the swipe plugin 5533 * @function 5534 * @name $.fn.swipe#disable 5535 * @return {DOMNode} The Dom element that is now registered with TouchSwipe 5536 * @example $("#element").swipe("disable"); 5537 */ 5538 this.disable = function () { 5539 removeListeners(); 5540 return $element; 5541 }; 5542 5543 /** 5544 * Destroy the swipe plugin completely. To use any swipe methods, you must re initialise the plugin. 5545 * @function 5546 * @name $.fn.swipe#destroy 5547 * @example $("#element").swipe("destroy"); 5548 */ 5549 this.destroy = function () { 5550 removeListeners(); 5551 $element.data(PLUGIN_NS, null); 5552 $element = null; 5553 }; 5554 5555 5556 /** 5557 * Allows run time updating of the swipe configuration options. 5558 * @function 5559 * @name $.fn.swipe#option 5560 * @param {String} property The option property to get or set, or a has of multiple options to set 5561 * @param {Object} [value] The value to set the property to 5562 * @return {Object} If only a property name is passed, then that property value is returned. If nothing is passed the current options hash is returned. 5563 * @example $("#element").swipe("option", "threshold"); // return the threshold 5564 * @example $("#element").swipe("option", "threshold", 100); // set the threshold after init 5565 * @example $("#element").swipe("option", {threshold:100, fingers:3} ); // set multiple properties after init 5566 * @example $("#element").swipe({threshold:100, fingers:3} ); // set multiple properties after init - the "option" method is optional! 5567 * @example $("#element").swipe("option"); // Return the current options hash 5568 * @see $.fn.swipe.defaults 5569 * 5570 */ 5571 this.option = function (property, value) { 5572 5573 if(typeof property === 'object') { 5574 options = $.extend(options, property); 5575 } else if(options[property]!==undefined) { 5576 if(value===undefined) { 5577 return options[property]; 5578 } else { 5579 options[property] = value; 5580 } 5581 } else if (!property) { 5582 return options; 5583 } else { 5584 $.error('Option ' + property + ' does not exist on jQuery.swipe.options'); 5585 } 5586 5587 return null; 5588 } 5589 5590 5591 5592 // 5593 // Private methods 5594 // 5595 5596 // 5597 // EVENTS 5598 // 5599 /** 5600 * Event handler for a touch start event. 5601 * Stops the default click event from triggering and stores where we touched 5602 * @inner 5603 * @param {object} jqEvent The normalised jQuery event object. 5604 */ 5605 function touchStart(jqEvent) { 5606 5607 //If we already in a touch event (a finger already in use) then ignore subsequent ones.. 5608 if( getTouchInProgress() ) 5609 return; 5610 5611 //Check if this element matches any in the excluded elements selectors, or its parent is excluded, if so, DON'T swipe 5612 if( $(jqEvent.target).closest( options.excludedElements, $element ).length>0 ) 5613 return; 5614 5615 //As we use Jquery bind for events, we need to target the original event object 5616 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 5617 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent; 5618 5619 var ret, 5620 touches = event.touches, 5621 evt = touches ? touches[0] : event; 5622 5623 phase = PHASE_START; 5624 5625 //If we support touches, get the finger count 5626 if (touches) { 5627 // get the total number of fingers touching the screen 5628 fingerCount = touches.length; 5629 } 5630 //Else this is the desktop, so stop the browser from dragging content 5631 else if(options.preventDefaultEvents !== false) { 5632 jqEvent.preventDefault(); //call this on jq event so we are cross browser 5633 } 5634 5635 //clear vars.. 5636 distance = 0; 5637 direction = null; 5638 pinchDirection=null; 5639 duration = 0; 5640 startTouchesDistance=0; 5641 endTouchesDistance=0; 5642 pinchZoom = 1; 5643 pinchDistance = 0; 5644 maximumsMap=createMaximumsData(); 5645 cancelMultiFingerRelease(); 5646 5647 //Create the default finger data 5648 createFingerData( 0, evt ); 5649 5650 // check the number of fingers is what we are looking for, or we are capturing pinches 5651 if (!touches || (fingerCount === options.fingers || options.fingers === ALL_FINGERS) || hasPinches()) { 5652 // get the coordinates of the touch 5653 startTime = getTimeStamp(); 5654 5655 if(fingerCount==2) { 5656 //Keep track of the initial pinch distance, so we can calculate the diff later 5657 //Store second finger data as start 5658 createFingerData( 1, touches[1] ); 5659 startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start); 5660 } 5661 5662 if (options.swipeStatus || options.pinchStatus) { 5663 ret = triggerHandler(event, phase); 5664 } 5665 } 5666 else { 5667 //A touch with more or less than the fingers we are looking for, so cancel 5668 ret = false; 5669 } 5670 5671 //If we have a return value from the users handler, then return and cancel 5672 if (ret === false) { 5673 phase = PHASE_CANCEL; 5674 triggerHandler(event, phase); 5675 return ret; 5676 } 5677 else { 5678 if (options.hold) { 5679 holdTimeout = setTimeout($.proxy(function() { 5680 //Trigger the event 5681 $element.trigger('hold', [event.target]); 5682 //Fire the callback 5683 if(options.hold) { 5684 ret = options.hold.call($element, event, event.target); 5685 } 5686 }, this), options.longTapThreshold ); 5687 } 5688 5689 setTouchInProgress(true); 5690 } 5691 5692 return null; 5693 }; 5694 5695 5696 5697 /** 5698 * Event handler for a touch move event. 5699 * If we change fingers during move, then cancel the event 5700 * @inner 5701 * @param {object} jqEvent The normalised jQuery event object. 5702 */ 5703 function touchMove(jqEvent) { 5704 5705 //As we use Jquery bind for events, we need to target the original event object 5706 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 5707 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent; 5708 5709 //If we are ending, cancelling, or within the threshold of 2 fingers being released, don't track anything.. 5710 if (phase === PHASE_END || phase === PHASE_CANCEL || inMultiFingerRelease()) 5711 return; 5712 5713 var ret, 5714 touches = event.touches, 5715 evt = touches ? touches[0] : event; 5716 5717 5718 //Update the finger data 5719 var currentFinger = updateFingerData(evt); 5720 endTime = getTimeStamp(); 5721 5722 if (touches) { 5723 fingerCount = touches.length; 5724 } 5725 5726 if (options.hold) 5727 clearTimeout(holdTimeout); 5728 5729 phase = PHASE_MOVE; 5730 5731 //If we have 2 fingers get Touches distance as well 5732 if(fingerCount==2) { 5733 5734 //Keep track of the initial pinch distance, so we can calculate the diff later 5735 //We do this here as well as the start event, in case they start with 1 finger, and the press 2 fingers 5736 if(startTouchesDistance==0) { 5737 //Create second finger if this is the first time... 5738 createFingerData( 1, touches[1] ); 5739 5740 startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start); 5741 } else { 5742 //Else just update the second finger 5743 updateFingerData(touches[1]); 5744 5745 endTouchesDistance = calculateTouchesDistance(fingerData[0].end, fingerData[1].end); 5746 pinchDirection = calculatePinchDirection(fingerData[0].end, fingerData[1].end); 5747 } 5748 5749 5750 pinchZoom = calculatePinchZoom(startTouchesDistance, endTouchesDistance); 5751 pinchDistance = Math.abs(startTouchesDistance - endTouchesDistance); 5752 } 5753 5754 5755 5756 5757 if ( (fingerCount === options.fingers || options.fingers === ALL_FINGERS) || !touches || hasPinches() ) { 5758 5759 direction = calculateDirection(currentFinger.start, currentFinger.end); 5760 5761 //Check if we need to prevent default event (page scroll / pinch zoom) or not 5762 validateDefaultEvent(jqEvent, direction); 5763 5764 //Distance and duration are all off the main finger 5765 distance = calculateDistance(currentFinger.start, currentFinger.end); 5766 duration = calculateDuration(); 5767 5768 //Cache the maximum distance we made in this direction 5769 setMaxDistance(direction, distance); 5770 5771 5772 if (options.swipeStatus || options.pinchStatus) { 5773 ret = triggerHandler(event, phase); 5774 } 5775 5776 5777 //If we trigger end events when threshold are met, or trigger events when touch leaves element 5778 if(!options.triggerOnTouchEnd || options.triggerOnTouchLeave) { 5779 5780 var inBounds = true; 5781 5782 //If checking if we leave the element, run the bounds check (we can use touchleave as its not supported on webkit) 5783 if(options.triggerOnTouchLeave) { 5784 var bounds = getbounds( this ); 5785 inBounds = isInBounds( currentFinger.end, bounds ); 5786 } 5787 5788 //Trigger end handles as we swipe if thresholds met or if we have left the element if the user has asked to check these.. 5789 if(!options.triggerOnTouchEnd && inBounds) { 5790 phase = getNextPhase( PHASE_MOVE ); 5791 } 5792 //We end if out of bounds here, so set current phase to END, and check if its modified 5793 else if(options.triggerOnTouchLeave && !inBounds ) { 5794 phase = getNextPhase( PHASE_END ); 5795 } 5796 5797 if(phase==PHASE_CANCEL || phase==PHASE_END) { 5798 triggerHandler(event, phase); 5799 } 5800 } 5801 } 5802 else { 5803 phase = PHASE_CANCEL; 5804 triggerHandler(event, phase); 5805 } 5806 5807 if (ret === false) { 5808 phase = PHASE_CANCEL; 5809 triggerHandler(event, phase); 5810 } 5811 } 5812 5813 5814 5815 5816 /** 5817 * Event handler for a touch end event. 5818 * Calculate the direction and trigger events 5819 * @inner 5820 * @param {object} jqEvent The normalised jQuery event object. 5821 */ 5822 function touchEnd(jqEvent) { 5823 //As we use Jquery bind for events, we need to target the original event object 5824 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 5825 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent, 5826 touches = event.touches; 5827 5828 //If we are still in a touch with the device wait a fraction and see if the other finger comes up 5829 //if it does within the threshold, then we treat it as a multi release, not a single release and end the touch / swipe 5830 if (touches) { 5831 if(touches.length && !inMultiFingerRelease()) { 5832 startMultiFingerRelease(); 5833 return true; 5834 } else if (touches.length && inMultiFingerRelease()) { 5835 return true; 5836 } 5837 } 5838 5839 //If a previous finger has been released, check how long ago, if within the threshold, then assume it was a multifinger release. 5840 //This is used to allow 2 fingers to release fractionally after each other, whilst maintainig the event as containg 2 fingers, not 1 5841 if(inMultiFingerRelease()) { 5842 fingerCount=fingerCountAtRelease; 5843 } 5844 5845 //Set end of swipe 5846 endTime = getTimeStamp(); 5847 5848 //Get duration incase move was never fired 5849 duration = calculateDuration(); 5850 5851 //If we trigger handlers at end of swipe OR, we trigger during, but they didnt trigger and we are still in the move phase 5852 if(didSwipeBackToCancel() || !validateSwipeDistance()) { 5853 phase = PHASE_CANCEL; 5854 triggerHandler(event, phase); 5855 } else if (options.triggerOnTouchEnd || (options.triggerOnTouchEnd == false && phase === PHASE_MOVE)) { 5856 //call this on jq event so we are cross browser 5857 if(options.preventDefaultEvents !== false) { 5858 jqEvent.preventDefault(); 5859 } 5860 phase = PHASE_END; 5861 triggerHandler(event, phase); 5862 } 5863 //Special cases - A tap should always fire on touch end regardless, 5864 //So here we manually trigger the tap end handler by itself 5865 //We dont run trigger handler as it will re-trigger events that may have fired already 5866 else if (!options.triggerOnTouchEnd && hasTap()) { 5867 //Trigger the pinch events... 5868 phase = PHASE_END; 5869 triggerHandlerForGesture(event, phase, TAP); 5870 } 5871 else if (phase === PHASE_MOVE) { 5872 phase = PHASE_CANCEL; 5873 triggerHandler(event, phase); 5874 } 5875 5876 setTouchInProgress(false); 5877 5878 return null; 5879 } 5880 5881 5882 5883 /** 5884 * Event handler for a touch cancel event. 5885 * Clears current vars 5886 * @inner 5887 */ 5888 function touchCancel() { 5889 // reset the variables back to default values 5890 fingerCount = 0; 5891 endTime = 0; 5892 startTime = 0; 5893 startTouchesDistance=0; 5894 endTouchesDistance=0; 5895 pinchZoom=1; 5896 5897 //If we were in progress of tracking a possible multi touch end, then re set it. 5898 cancelMultiFingerRelease(); 5899 5900 setTouchInProgress(false); 5901 } 5902 5903 5904 /** 5905 * Event handler for a touch leave event. 5906 * This is only triggered on desktops, in touch we work this out manually 5907 * as the touchleave event is not supported in webkit 5908 * @inner 5909 */ 5910 function touchLeave(jqEvent) { 5911 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 5912 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent; 5913 5914 //If we have the trigger on leave property set.... 5915 if(options.triggerOnTouchLeave) { 5916 phase = getNextPhase( PHASE_END ); 5917 triggerHandler(event, phase); 5918 } 5919 } 5920 5921 /** 5922 * Removes all listeners that were associated with the plugin 5923 * @inner 5924 */ 5925 function removeListeners() { 5926 $element.unbind(START_EV, touchStart); 5927 $element.unbind(CANCEL_EV, touchCancel); 5928 $element.unbind(MOVE_EV, touchMove); 5929 $element.unbind(END_EV, touchEnd); 5930 5931 //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit 5932 if(LEAVE_EV) { 5933 $element.unbind(LEAVE_EV, touchLeave); 5934 } 5935 5936 setTouchInProgress(false); 5937 } 5938 5939 5940 /** 5941 * Checks if the time and distance thresholds have been met, and if so then the appropriate handlers are fired. 5942 */ 5943 function getNextPhase(currentPhase) { 5944 5945 var nextPhase = currentPhase; 5946 5947 // Ensure we have valid swipe (under time and over distance and check if we are out of bound...)
5948 var validTime = validateSwipeTime(); 5949 var validDistance = validateSwipeDistance(); 5950 var didCancel = didSwipeBackToCancel(); 5951 5952 //If we have exceeded our time, then cancel 5953 if(!validTime || didCancel) { 5954 nextPhase = PHASE_CANCEL; 5955 } 5956 //Else if we are moving, and have reached distance then end 5957 else if (validDistance && currentPhase == PHASE_MOVE && (!options.triggerOnTouchEnd || options.triggerOnTouchLeave) ) { 5958 nextPhase = PHASE_END; 5959 } 5960 //Else if we have ended by leaving and didn't reach distance, then cancel 5961 else if (!validDistance && currentPhase==PHASE_END && options.triggerOnTouchLeave) { 5962 nextPhase = PHASE_CANCEL; 5963 } 5964 5965 return nextPhase; 5966 } 5967 5968 5969 /** 5970 * Trigger the relevant event handler 5971 * The handlers are passed the original event, the element that was swiped, and in the case of the catch all handler, the direction that was swiped, "left", "right", "up", or "down" 5972 * @param {object} event the original event object 5973 * @param {string} phase the phase of the swipe (start, end cancel etc) {@link $.fn.swipe.phases} 5974 * @inner 5975 */ 5976 function triggerHandler(event, phase) { 5977 5978 var ret, 5979 touches = event.touches; 5980 5981 //Swipes and pinches are not mutually exclusive - can happend at same time, so need to trigger 2 events potentially 5982 if( (didSwipe() && hasSwipes()) || (didPinch() && hasPinches()) ) { 5983 // SWIPE GESTURES 5984 if(didSwipe() && hasSwipes()) { //hasSwipes as status needs to fire even if swipe is invalid 5985 //Trigger the swipe events... 5986 ret = triggerHandlerForGesture(event, phase, SWIPE); 5987 } 5988 5989 // PINCH GESTURES (if the above didn't cancel) 5990 if((didPinch() && hasPinches()) && ret!==false) { 5991 //Trigger the pinch events... 5992 ret = triggerHandlerForGesture(event, phase, PINCH); 5993 } 5994 } 5995 else { 5996 5997 // CLICK / TAP (if the above didn't cancel) 5998 if(didDoubleTap() && ret!==false) { 5999 //Trigger the tap events... 6000 ret = triggerHandlerForGesture(event, phase, DOUBLE_TAP); 6001 } 6002 6003 // CLICK / TAP (if the above didn't cancel) 6004 else if(didLongTap() && ret!==false) { 6005 //Trigger the tap events... 6006 ret = triggerHandlerForGesture(event, phase, LONG_TAP); 6007 } 6008 6009 // CLICK / TAP (if the above didn't cancel) 6010 else if(didTap() && ret!==false) { 6011 //Trigger the tap event.. 6012 ret = triggerHandlerForGesture(event, phase, TAP); 6013 } 6014 } 6015 6016 // If we are cancelling the gesture, then manually trigger the reset handler 6017 if (phase === PHASE_CANCEL) { 6018 if(hasSwipes() ) { 6019 ret = triggerHandlerForGesture(event, phase, SWIPE); 6020 } 6021 6022 if(hasPinches()) { 6023 ret = triggerHandlerForGesture(event, phase, PINCH); 6024 } 6025 touchCancel(event); 6026 } 6027 6028 // If we are ending the gesture, then manually trigger the reset handler IF all fingers are off 6029 if(phase === PHASE_END) { 6030 //If we support touch, then check that all fingers are off before we cancel 6031 if (touches) { 6032 if(!touches.length) { 6033 touchCancel(event); 6034 } 6035 } 6036 else { 6037 touchCancel(event); 6038 } 6039 } 6040 6041 return ret; 6042 } 6043 6044 6045 6046 /** 6047 * Trigger the relevant event handler 6048 * The handlers are passed the original event, the element that was swiped, and in the case of the catch all handler, the direction that was swiped, "left", "right", "up", or "down" 6049 * @param {object} event the original event object 6050 * @param {string} phase the phase of the swipe (start, end cancel etc) {@link $.fn.swipe.phases} 6051 * @param {string} gesture the gesture to trigger a handler for : PINCH or SWIPE {@link $.fn.swipe.gestures} 6052 * @return Boolean False, to indicate that the event should stop propagation, or void. 6053 * @inner 6054 */ 6055 function triggerHandlerForGesture(event, phase, gesture) { 6056 6057 var ret; 6058 6059 //SWIPES.... 6060 if(gesture==SWIPE) { 6061 //Trigger status every time.. 6062 6063 //Trigger the event... 6064 $element.trigger('swipeStatus', [phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData]); 6065 6066 //Fire the callback 6067 if (options.swipeStatus) { 6068 ret = options.swipeStatus.call($element, event, phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData); 6069 //If the status cancels, then dont run the subsequent event handlers.. 6070 if(ret===false) return false; 6071 } 6072 6073 6074 6075 6076 if (phase == PHASE_END && validateSwipe()) {
vendor: 25,281 bytes, lines 6077-6924
6077 //Fire the catch all event 6078 $element.trigger('swipe', [direction, distance, duration, fingerCount, fingerData]); 6079 6080 //Fire catch all callback 6081 if (options.swipe) { 6082 ret = options.swipe.call($element, event, direction, distance, duration, fingerCount, fingerData); 6083 //If the status cancels, then dont run the subsequent event handlers.. 6084 if(ret===false) return false; 6085 } 6086 6087 //trigger direction specific event handlers 6088 switch (direction) { 6089 case LEFT: 6090 //Trigger the event 6091 $element.trigger('swipeLeft', [direction, distance, duration, fingerCount, fingerData]); 6092 6093 //Fire the callback 6094 if (options.swipeLeft) { 6095 ret = options.swipeLeft.call($element, event, direction, distance, duration, fingerCount, fingerData); 6096 } 6097 break; 6098 6099 case RIGHT: 6100 //Trigger the event 6101 $element.trigger('swipeRight', [direction, distance, duration, fingerCount, fingerData]); 6102 6103 //Fire the callback 6104 if (options.swipeRight) { 6105 ret = options.swipeRight.call($element, event, direction, distance, duration, fingerCount, fingerData); 6106 } 6107 break; 6108 6109 case UP: 6110 //Trigger the event 6111 $element.trigger('swipeUp', [direction, distance, duration, fingerCount, fingerData]); 6112 6113 //Fire the callback 6114 if (options.swipeUp) { 6115 ret = options.swipeUp.call($element, event, direction, distance, duration, fingerCount, fingerData); 6116 } 6117 break; 6118 6119 case DOWN: 6120 //Trigger the event 6121 $element.trigger('swipeDown', [direction, distance, duration, fingerCount, fingerData]); 6122 6123 //Fire the callback 6124 if (options.swipeDown) { 6125 ret = options.swipeDown.call($element, event, direction, distance, duration, fingerCount, fingerData); 6126 } 6127 break; 6128 } 6129 } 6130 } 6131 6132 6133 //PINCHES.... 6134 if(gesture==PINCH) { 6135 //Trigger the event 6136 $element.trigger('pinchStatus', [phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]); 6137 6138 //Fire the callback 6139 if (options.pinchStatus) { 6140 ret = options.pinchStatus.call($element, event, phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData); 6141 //If the status cancels, then dont run the subsequent event handlers.. 6142 if(ret===false) return false; 6143 } 6144 6145 if(phase==PHASE_END && validatePinch()) { 6146 6147 switch (pinchDirection) { 6148 case IN: 6149 //Trigger the event 6150 $element.trigger('pinchIn', [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]); 6151 6152 //Fire the callback 6153 if (options.pinchIn) { 6154 ret = options.pinchIn.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData); 6155 } 6156 break; 6157 6158 case OUT: 6159 //Trigger the event 6160 $element.trigger('pinchOut', [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]); 6161 6162 //Fire the callback 6163 if (options.pinchOut) { 6164 ret = options.pinchOut.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData); 6165 } 6166 break; 6167 } 6168 } 6169 } 6170 6171 6172 6173 6174 6175 if(gesture==TAP) { 6176 if(phase === PHASE_CANCEL || phase === PHASE_END) { 6177 6178 6179 //Cancel any existing double tap 6180 clearTimeout(singleTapTimeout); 6181 //Cancel hold timeout 6182 clearTimeout(holdTimeout); 6183 6184 //If we are also looking for doubelTaps, wait incase this is one... 6185 if(hasDoubleTap() && !inDoubleTap()) { 6186 //Cache the time of this tap 6187 doubleTapStartTime = getTimeStamp(); 6188 6189 //Now wait for the double tap timeout, and trigger this single tap 6190 //if its not cancelled by a double tap 6191 singleTapTimeout = setTimeout($.proxy(function() { 6192 doubleTapStartTime=null; 6193 //Trigger the event 6194 $element.trigger('tap', [event.target]); 6195 6196 6197 //Fire the callback 6198 if(options.tap) { 6199 ret = options.tap.call($element, event, event.target); 6200 } 6201 }, this), options.doubleTapThreshold ); 6202 6203 } else { 6204 doubleTapStartTime=null; 6205 6206 //Trigger the event 6207 $element.trigger('tap', [event.target]); 6208 6209 6210 //Fire the callback 6211 if(options.tap) { 6212 ret = options.tap.call($element, event, event.target); 6213 } 6214 } 6215 } 6216 } 6217 6218 else if (gesture==DOUBLE_TAP) { 6219 if(phase === PHASE_CANCEL || phase === PHASE_END) { 6220 //Cancel any pending singletap 6221 clearTimeout(singleTapTimeout); 6222 doubleTapStartTime=null; 6223 6224 //Trigger the event 6225 $element.trigger('doubletap', [event.target]); 6226 6227 //Fire the callback 6228 if(options.doubleTap) { 6229 ret = options.doubleTap.call($element, event, event.target); 6230 } 6231 } 6232 } 6233 6234 else if (gesture==LONG_TAP) { 6235 if(phase === PHASE_CANCEL || phase === PHASE_END) { 6236 //Cancel any pending singletap (shouldnt be one) 6237 clearTimeout(singleTapTimeout); 6238 doubleTapStartTime=null; 6239 6240 //Trigger the event 6241 $element.trigger('longtap', [event.target]); 6242 6243 //Fire the callback 6244 if(options.longTap) { 6245 ret = options.longTap.call($element, event, event.target); 6246 } 6247 } 6248 } 6249 6250 return ret; 6251 } 6252 6253 6254 6255 6256 // 6257 // GESTURE VALIDATION 6258 // 6259 6260 /** 6261 * Checks the user has swipe far enough 6262 * @return Boolean if <code>threshold</code> has been set, return true if the threshold was met, else false. 6263 * If no threshold was set, then we return true. 6264 * @inner 6265 */ 6266 function validateSwipeDistance() { 6267 var valid = true; 6268 //If we made it past the min swipe distance.. 6269 if (options.threshold !== null) { 6270 valid = distance >= options.threshold; 6271 } 6272 6273 return valid; 6274 } 6275 6276 /** 6277 * Checks the user has swiped back to cancel. 6278 * @return Boolean if <code>cancelThreshold</code> has been set, return true if the cancelThreshold was met, else false. 6279 * If no cancelThreshold was set, then we return true. 6280 * @inner 6281 */ 6282 function didSwipeBackToCancel() { 6283 var cancelled = false; 6284 if(options.cancelThreshold !== null && direction !==null) { 6285 cancelled = (getMaxDistance( direction ) - distance) >= options.cancelThreshold; 6286 } 6287 6288 return cancelled; 6289 } 6290 6291 /** 6292 * Checks the user has pinched far enough 6293 * @return Boolean if <code>pinchThreshold</code> has been set, return true if the threshold was met, else false. 6294 * If no threshold was set, then we return true. 6295 * @inner 6296 */ 6297 function validatePinchDistance() { 6298 if (options.pinchThreshold !== null) { 6299 return pinchDistance >= options.pinchThreshold; 6300 } 6301 return true; 6302 } 6303 6304 /** 6305 * Checks that the time taken to swipe meets the minimum / maximum requirements 6306 * @return Boolean 6307 * @inner 6308 */ 6309 function validateSwipeTime() { 6310 var result; 6311 //If no time set, then return true 6312 6313 if (options.maxTimeThreshold) { 6314 if (duration >= options.maxTimeThreshold) { 6315 result = false; 6316 } else { 6317 result = true; 6318 } 6319 } 6320 else { 6321 result = true; 6322 } 6323 6324 return result; 6325 } 6326 6327 6328 6329 /** 6330 * Checks direction of the swipe and the value allowPageScroll to see if we should allow or prevent the default behaviour from occurring. 6331 * This will essentially allow page scrolling or not when the user is swiping on a touchSwipe object. 6332 * @param {object} jqEvent The normalised jQuery representation of the event object. 6333 * @param {string} direction The direction of the event. See {@link $.fn.swipe.directions} 6334 * @see $.fn.swipe.directions 6335 * @inner 6336 */ 6337 function validateDefaultEvent(jqEvent, direction) { 6338 6339 //If we have no pinches, then do this 6340 //If we have a pinch, and we we have 2 fingers or more down, then dont allow page scroll. 6341 6342 //If the option is set, allways allow the event to bubble up (let user handle wiredness) 6343 if( options.preventDefaultEvents === false) { 6344 return; 6345 } 6346 6347 if (options.allowPageScroll === NONE) { 6348 jqEvent.preventDefault(); 6349 } else { 6350 var auto = options.allowPageScroll === AUTO; 6351 6352 switch (direction) { 6353 case LEFT: 6354 if ((options.swipeLeft && auto) || (!auto && options.allowPageScroll != HORIZONTAL)) { 6355 jqEvent.preventDefault(); 6356 } 6357 break; 6358 6359 case RIGHT: 6360 if ((options.swipeRight && auto) || (!auto && options.allowPageScroll != HORIZONTAL)) { 6361 jqEvent.preventDefault(); 6362 } 6363 break; 6364 6365 case UP: 6366 if ((options.swipeUp && auto) || (!auto && options.allowPageScroll != VERTICAL)) { 6367 jqEvent.preventDefault(); 6368 } 6369 break; 6370 6371 case DOWN: 6372 if ((options.swipeDown && auto) || (!auto && options.allowPageScroll != VERTICAL)) { 6373 jqEvent.preventDefault(); 6374 } 6375 break; 6376 } 6377 } 6378 6379 } 6380 6381 6382 // PINCHES 6383 /** 6384 * Returns true of the current pinch meets the thresholds 6385 * @return Boolean 6386 * @inner 6387 */ 6388 function validatePinch() { 6389 var hasCorrectFingerCount = validateFingers(); 6390 var hasEndPoint = validateEndPoint(); 6391 var hasCorrectDistance = validatePinchDistance(); 6392 return hasCorrectFingerCount && hasEndPoint && hasCorrectDistance; 6393 6394 } 6395 6396 /** 6397 * Returns true if any Pinch events have been registered 6398 * @return Boolean 6399 * @inner 6400 */ 6401 function hasPinches() { 6402 //Enure we dont return 0 or null for false values 6403 return !!(options.pinchStatus || options.pinchIn || options.pinchOut); 6404 } 6405 6406 /** 6407 * Returns true if we are detecting pinches, and have one 6408 * @return Boolean 6409 * @inner 6410 */ 6411 function didPinch() { 6412 //Enure we dont return 0 or null for false values 6413 return !!(validatePinch() && hasPinches()); 6414 } 6415 6416 6417 6418 6419 // SWIPES 6420 /** 6421 * Returns true if the current swipe meets the thresholds 6422 * @return Boolean 6423 * @inner 6424 */ 6425 function validateSwipe() { 6426 //Check validity of swipe 6427 var hasValidTime = validateSwipeTime(); 6428 var hasValidDistance = validateSwipeDistance(); 6429 var hasCorrectFingerCount = validateFingers(); 6430 var hasEndPoint = validateEndPoint(); 6431 var didCancel = didSwipeBackToCancel(); 6432 6433 // if the user swiped more than the minimum length, perform the appropriate action 6434 // hasValidDistance is null when no distance is set 6435 var valid = !didCancel && hasEndPoint && hasCorrectFingerCount && hasValidDistance && hasValidTime; 6436 6437 return valid; 6438 } 6439 6440 /** 6441 * Returns true if any Swipe events have been registered 6442 * @return Boolean 6443 * @inner 6444 */ 6445 function hasSwipes() { 6446 //Enure we dont return 0 or null for false values 6447 return !!(options.swipe || options.swipeStatus || options.swipeLeft || options.swipeRight || options.swipeUp || options.swipeDown); 6448 } 6449 6450 6451 /** 6452 * Returns true if we are detecting swipes and have one 6453 * @return Boolean 6454 * @inner 6455 */ 6456 function didSwipe() { 6457 //Enure we dont return 0 or null for false values 6458 return !!(validateSwipe() && hasSwipes()); 6459 } 6460 6461 /** 6462 * Returns true if we have matched the number of fingers we are looking for 6463 * @return Boolean 6464 * @inner 6465 */ 6466 function validateFingers() { 6467 //The number of fingers we want were matched, or on desktop we ignore 6468 return ((fingerCount === options.fingers || options.fingers === ALL_FINGERS) || !SUPPORTS_TOUCH); 6469 } 6470 6471 /** 6472 * Returns true if we have an end point for the swipe 6473 * @return Boolean 6474 * @inner 6475 */ 6476 function validateEndPoint() { 6477 //We have an end value for the finger 6478 return fingerData[0].end.x !== 0; 6479 } 6480 6481 // TAP / CLICK 6482 /** 6483 * Returns true if a click / tap events have been registered 6484 * @return Boolean 6485 * @inner 6486 */ 6487 function hasTap() { 6488 //Enure we dont return 0 or null for false values 6489 return !!(options.tap) ; 6490 } 6491 6492 /** 6493 * Returns true if a double tap events have been registered 6494 * @return Boolean 6495 * @inner 6496 */ 6497 function hasDoubleTap() { 6498 //Enure we dont return 0 or null for false values 6499 return !!(options.doubleTap) ; 6500 } 6501 6502 /** 6503 * Returns true if any long tap events have been registered 6504 * @return Boolean 6505 * @inner 6506 */ 6507 function hasLongTap() { 6508 //Enure we dont return 0 or null for false values 6509 return !!(options.longTap) ; 6510 } 6511 6512 /** 6513 * Returns true if we could be in the process of a double tap (one tap has occurred, we are listening for double taps, and the threshold hasn't past. 6514 * @return Boolean 6515 * @inner 6516 */ 6517 function validateDoubleTap() { 6518 if(doubleTapStartTime==null){ 6519 return false; 6520 } 6521 var now = getTimeStamp(); 6522 return (hasDoubleTap() && ((now-doubleTapStartTime) <= options.doubleTapThreshold)); 6523 } 6524 6525 /** 6526 * Returns true if we could be in the process of a double tap (one tap has occurred, we are listening for double taps, and the threshold hasn't past. 6527 * @return Boolean 6528 * @inner 6529 */ 6530 function inDoubleTap() { 6531 return validateDoubleTap(); 6532 } 6533 6534 6535 /** 6536 * Returns true if we have a valid tap 6537 * @return Boolean 6538 * @inner 6539 */ 6540 function validateTap() { 6541 return ((fingerCount === 1 || !SUPPORTS_TOUCH) && (isNaN(distance) || distance < options.threshold)); 6542 } 6543 6544 /** 6545 * Returns true if we have a valid long tap 6546 * @return Boolean 6547 * @inner 6548 */ 6549 function validateLongTap() { 6550 //slight threshold on moving finger 6551 return ((duration > options.longTapThreshold) && (distance < DOUBLE_TAP_THRESHOLD)); 6552 } 6553 6554 /** 6555 * Returns true if we are detecting taps and have one 6556 * @return Boolean 6557 * @inner 6558 */ 6559 function didTap() { 6560 //Enure we dont return 0 or null for false values 6561 return !!(validateTap() && hasTap()); 6562 } 6563 6564 6565 /** 6566 * Returns true if we are detecting double taps and have one 6567 * @return Boolean 6568 * @inner 6569 */ 6570 function didDoubleTap() { 6571 //Enure we dont return 0 or null for false values 6572 return !!(validateDoubleTap() && hasDoubleTap()); 6573 } 6574 6575 /** 6576 * Returns true if we are detecting long taps and have one 6577 * @return Boolean 6578 * @inner 6579 */ 6580 function didLongTap() { 6581 //Enure we dont return 0 or null for false values 6582 return !!(validateLongTap() && hasLongTap()); 6583 } 6584 6585 6586 6587 6588 // MULTI FINGER TOUCH 6589 /** 6590 * Starts tracking the time between 2 finger releases, and keeps track of how many fingers we initially had up 6591 * @inner 6592 */ 6593 function startMultiFingerRelease() { 6594 previousTouchEndTime = getTimeStamp(); 6595 fingerCountAtRelease = event.touches.length+1; 6596 } 6597 6598 /** 6599 * Cancels the tracking of time between 2 finger releases, and resets counters 6600 * @inner 6601 */ 6602 function cancelMultiFingerRelease() { 6603 previousTouchEndTime = 0; 6604 fingerCountAtRelease = 0; 6605 } 6606 6607 /** 6608 * Checks if we are in the threshold between 2 fingers being released 6609 * @return Boolean 6610 * @inner 6611 */ 6612 function inMultiFingerRelease() { 6613 6614 var withinThreshold = false; 6615 6616 if(previousTouchEndTime) { 6617 var diff = getTimeStamp() - previousTouchEndTime 6618 if( diff<=options.fingerReleaseThreshold ) { 6619 withinThreshold = true; 6620 } 6621 } 6622 6623 return withinThreshold; 6624 } 6625 6626 6627 /** 6628 * gets a data flag to indicate that a touch is in progress 6629 * @return Boolean 6630 * @inner 6631 */ 6632 function getTouchInProgress() { 6633 //strict equality to ensure only true and false are returned 6634 return !!($element.data(PLUGIN_NS+'_intouch') === true); 6635 } 6636 6637 /** 6638 * Sets a data flag to indicate that a touch is in progress 6639 * @param {boolean} val The value to set the property to 6640 * @inner 6641 */ 6642 function setTouchInProgress(val) { 6643 6644 //Add or remove event listeners depending on touch status 6645 if(val===true) { 6646 $element.bind(MOVE_EV, touchMove); 6647 $element.bind(END_EV, touchEnd); 6648 6649 //we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit 6650 if(LEAVE_EV) { 6651 $element.bind(LEAVE_EV, touchLeave); 6652 } 6653 } else { 6654 6655 $element.unbind(MOVE_EV, touchMove, false); 6656 $element.unbind(END_EV, touchEnd, false); 6657 6658 //we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit 6659 if(LEAVE_EV) { 6660 $element.unbind(LEAVE_EV, touchLeave, false); 6661 } 6662 } 6663 6664 6665 //strict equality to ensure only true and false can update the value 6666 $element.data(PLUGIN_NS+'_intouch', val === true); 6667 } 6668 6669 6670 /** 6671 * Creates the finger data for the touch/finger in the event object. 6672 * @param {int} id The id to store the finger data under (usually the order the fingers were pressed) 6673 * @param {object} evt The event object containing finger data 6674 * @return finger data object 6675 * @inner 6676 */ 6677 function createFingerData(id, evt) { 6678 var f = { 6679 start:{ x: 0, y: 0 }, 6680 end:{ x: 0, y: 0 } 6681 }; 6682 f.start.x = f.end.x = evt.pageX||evt.clientX; 6683 f.start.y = f.end.y = evt.pageY||evt.clientY; 6684 fingerData[id] = f; 6685 return f; 6686 } 6687 6688 /** 6689 * Updates the finger data for a particular event object 6690 * @param {object} evt The event object containing the touch/finger data to upadte 6691 * @return a finger data object. 6692 * @inner 6693 */ 6694 function updateFingerData(evt) { 6695 var id = evt.identifier!==undefined ? evt.identifier : 0; 6696 var f = getFingerData( id ); 6697 6698 if (f === null) { 6699 f = createFingerData(id, evt); 6700 } 6701 6702 f.end.x = evt.pageX||evt.clientX; 6703 f.end.y = evt.pageY||evt.clientY; 6704 6705 return f; 6706 } 6707 6708 /** 6709 * Returns a finger data object by its event ID. 6710 * Each touch event has an identifier property, which is used 6711 * to track repeat touches 6712 * @param {int} id The unique id of the finger in the sequence of touch events. 6713 * @return a finger data object. 6714 * @inner 6715 */ 6716 function getFingerData(id) { 6717 return fingerData[id] || null; 6718 } 6719 6720 6721 /** 6722 * Sets the maximum distance swiped in the given direction. 6723 * If the new value is lower than the current value, the max value is not changed. 6724 * @param {string} direction The direction of the swipe 6725 * @param {int} distance The distance of the swipe 6726 * @inner 6727 */ 6728 function setMaxDistance(direction, distance) { 6729 distance = Math.max(distance, getMaxDistance(direction) ); 6730 maximumsMap[direction].distance = distance; 6731 } 6732 6733 /** 6734 * gets the maximum distance swiped in the given direction. 6735 * @param {string} direction The direction of the swipe 6736 * @return int The distance of the swipe 6737 * @inner 6738 */ 6739 function getMaxDistance(direction) { 6740 if (maximumsMap[direction]) return maximumsMap[direction].distance; 6741 return undefined; 6742 } 6743 6744 /** 6745 * Creats a map of directions to maximum swiped values. 6746 * @return Object A dictionary of maximum values, indexed by direction. 6747 * @inner 6748 */ 6749 function createMaximumsData() { 6750 var maxData={}; 6751 maxData[LEFT]=createMaximumVO(LEFT); 6752 maxData[RIGHT]=createMaximumVO(RIGHT); 6753 maxData[UP]=createMaximumVO(UP); 6754 maxData[DOWN]=createMaximumVO(DOWN); 6755 6756 return maxData; 6757 } 6758 6759 /** 6760 * Creates a map maximum swiped values for a given swipe direction 6761 * @param {string} The direction that these values will be associated with 6762 * @return Object Maximum values 6763 * @inner 6764 */ 6765 function createMaximumVO(dir) { 6766 return { 6767 direction:dir, 6768 distance:0 6769 } 6770 } 6771 6772 6773 // 6774 // MATHS / UTILS 6775 // 6776 6777 /** 6778 * Calculate the duration of the swipe 6779 * @return int 6780 * @inner 6781 */ 6782 function calculateDuration() { 6783 return endTime - startTime; 6784 } 6785 6786 /** 6787 * Calculate the distance between 2 touches (pinch) 6788 * @param {point} startPoint A point object containing x and y co-ordinates 6789 * @param {point} endPoint A point object containing x and y co-ordinates 6790 * @return int; 6791 * @inner 6792 */ 6793 function calculateTouchesDistance(startPoint, endPoint) { 6794 var diffX = Math.abs(startPoint.x - endPoint.x); 6795 var diffY = Math.abs(startPoint.y - endPoint.y); 6796 6797 return Math.round(Math.sqrt(diffX*diffX+diffY*diffY)); 6798 } 6799 6800 /** 6801 * Calculate the zoom factor between the start and end distances 6802 * @param {int} startDistance Distance (between 2 fingers) the user started pinching at 6803 * @param {int} endDistance Distance (between 2 fingers) the user ended pinching at 6804 * @return float The zoom value from 0 to 1. 6805 * @inner 6806 */ 6807 function calculatePinchZoom(startDistance, endDistance) { 6808 var percent = (endDistance/startDistance) * 1; 6809 return percent.toFixed(2); 6810 } 6811 6812 6813 /** 6814 * Returns the pinch direction, either IN or OUT for the given points 6815 * @return string Either {@link $.fn.swipe.directions.IN} or {@link $.fn.swipe.directions.OUT} 6816 * @see $.fn.swipe.directions 6817 * @inner 6818 */ 6819 function calculatePinchDirection() { 6820 if(pinchZoom<1) { 6821 return OUT; 6822 } 6823 else { 6824 return IN; 6825 } 6826 } 6827 6828 6829 /** 6830 * Calculate the length / distance of the swipe 6831 * @param {point} startPoint A point object containing x and y co-ordinates 6832 * @param {point} endPoint A point object containing x and y co-ordinates 6833 * @return int 6834 * @inner 6835 */ 6836 function calculateDistance(startPoint, endPoint) { 6837 return Math.round(Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2))); 6838 } 6839 6840 /** 6841 * Calculate the angle of the swipe 6842 * @param {point} startPoint A point object containing x and y co-ordinates 6843 * @param {point} endPoint A point object containing x and y co-ordinates 6844 * @return int 6845 * @inner 6846 */ 6847 function calculateAngle(startPoint, endPoint) { 6848 var x = startPoint.x - endPoint.x; 6849 var y = endPoint.y - startPoint.y; 6850 var r = Math.atan2(y, x); //radians 6851 var angle = Math.round(r * 180 / Math.PI); //degrees 6852 6853 //ensure value is positive 6854 if (angle < 0) { 6855 angle = 360 - Math.abs(angle); 6856 } 6857 6858 return angle; 6859 } 6860 6861 /** 6862 * Calculate the direction of the swipe 6863 * This will also call calculateAngle to get the latest angle of swipe 6864 * @param {point} startPoint A point object containing x and y co-ordinates 6865 * @param {point} endPoint A point object containing x and y co-ordinates 6866 * @return string Either {@link $.fn.swipe.directions.LEFT} / {@link $.fn.swipe.directions.RIGHT} / {@link $.fn.swipe.directions.DOWN} / {@link $.fn.swipe.directions.UP} 6867 * @see $.fn.swipe.directions 6868 * @inner 6869 */ 6870 function calculateDirection(startPoint, endPoint ) { 6871 var angle = calculateAngle(startPoint, endPoint); 6872 6873 if ((angle <= 45) && (angle >= 0)) { 6874 return LEFT; 6875 } else if ((angle <= 360) && (angle >= 315)) { 6876 return LEFT; 6877 } else if ((angle >= 135) && (angle <= 225)) { 6878 return RIGHT; 6879 } else if ((angle > 45) && (angle < 135)) { 6880 return DOWN; 6881 } else { 6882 return UP; 6883 } 6884 } 6885 6886 6887 /** 6888 * Returns a MS time stamp of the current time 6889 * @return int 6890 * @inner 6891 */ 6892 function getTimeStamp() { 6893 var now = new Date(); 6894 return now.getTime(); 6895 } 6896 6897 6898 6899 /** 6900 * Returns a bounds object with left, right, top and bottom properties for the element specified. 6901 * @param {DomNode} The DOM node to get the bounds for. 6902 */ 6903 function getbounds( el ) { 6904 el = $(el); 6905 var offset = el.offset(); 6906 6907 var bounds = { 6908 left:offset.left, 6909 right:offset.left+el.outerWidth(), 6910 top:offset.top, 6911 bottom:offset.top+el.outerHeight() 6912 } 6913 6914 return bounds; 6915 } 6916 6917 6918 /** 6919 * Checks if the point object is in the bounds object. 6920 * @param {object} point A point object. 6921 * @param {int} point.x The x value of the point. 6922 * @param {int} point.y The x value of the point. 6923 * @param {object} bounds The bounds object to test 6924 * @param {int}
6924 bounds.left The leftmost value 6925 * @param {int} bounds.right The righttmost value 6926 * @param {int} bounds.top The topmost value 6927 * @param {int} bounds.bottom The bottommost value 6928 */ 6929 function isInBounds(point, bounds) { 6930 return (point.x > bounds.left && point.x < bounds.right && point.y > bounds.top && point.y < bounds.bottom); 6931 }; 6932 6933 6934 } 6935 6936 6937 6938 6939/** 6940 * A catch all handler that is triggered for all swipe directions. 6941 * @name $.fn.swipe#swipe 6942 * @event 6943 * @default null 6944 * @param {EventObject} event The original event object 6945 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 6946 * @param {int} distance The distance the user swiped 6947 * @param {int} duration The duration of the swipe in milliseconds 6948 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 6949 * @param {object} fingerData The coordinates of fingers in event 6950 */ 6951 6952 6953 6954 6955/** 6956 * A handler that is triggered for "left" swipes. 6957 * @name $.fn.swipe#swipeLeft 6958 * @event 6959 * @default null 6960 * @param {EventObject} event The original event object 6961 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 6962 * @param {int} distance The distance the user swiped 6963 * @param {int} duration The duration of the swipe in milliseconds 6964 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 6965 * @param {object} fingerData The coordinates of fingers in event 6966 */ 6967 6968/** 6969 * A handler that is triggered for "right" swipes. 6970 * @name $.fn.swipe#swipeRight 6971 * @event 6972 * @default null 6973 * @param {EventObject} event The original event object 6974 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 6975 * @param {int} distance The distance the user swiped 6976 * @param {int} duration The duration of the swipe in milliseconds 6977 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 6978 * @param {object} fingerData The coordinates of fingers in event 6979 */ 6980 6981/** 6982 * A handler that is triggered for "up" swipes. 6983 * @name $.fn.swipe#swipeUp 6984 * @event 6985 * @default null 6986 * @param {EventObject} event The original event object 6987 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 6988 * @param {int} distance The distance the user swiped 6989 * @param {int} duration The duration of the swipe in milliseconds 6990 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 6991 * @param {object} fingerData The coordinates of fingers in event 6992 */ 6993 6994/** 6995 * A handler that is triggered for "down" swipes. 6996 * @name $.fn.swipe#swipeDown 6997 * @event 6998 * @default null 6999 * @param {EventObject} event The original event object 7000 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 7001 * @param {int} distance The distance the user swiped 7002 * @param {int} duration The duration of the swipe in milliseconds 7003 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 7004 * @param {object} fingerData The coordinates of fingers in event 7005 */ 7006 7007/** 7008 * A handler triggered for every phase of the swipe. This handler is constantly fired for the duration of the pinch. 7009 * This is triggered regardless of swipe thresholds. 7010 * @name $.fn.swipe#swipeStatus 7011 * @event 7012 * @default null 7013 * @param {EventObject} event The original event object 7014 * @param {string} phase The phase of the swipe event. See {@link $.fn.swipe.phases} 7015 * @param {string} direction The direction the user swiped in. This is null if the user has yet to move. See {@link $.fn.swipe.directions} 7016 * @param {int} distance The distance the user swiped. This is 0 if the user has yet to move. 7017 * @param {int} duration The duration of the swipe in milliseconds 7018 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 7019 * @param {object} fingerData The coordinates of fingers in event 7020 */ 7021 7022/** 7023 * A handler triggered for pinch in events. 7024 * @name $.fn.swipe#pinchIn 7025 * @event 7026 * @default null 7027 * @param {EventObject} event The original event object 7028 * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions} 7029 * @param {int} distance The distance the user pinched 7030 * @param {int} duration The duration of the swipe in milliseconds 7031 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 7032 * @param {int} zoom The zoom/scale level the user pinched too, 0-1. 7033 * @param {object} fingerData The coordinates of fingers in event 7034 */ 7035 7036/** 7037 * A handler triggered for pinch out events. 7038 * @name $.fn.swipe#pinchOut 7039 * @event 7040 * @default null 7041 * @param {EventObject} event The original event object 7042 * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions} 7043 * @param {int} distance The distance the user pinched 7044 * @param {int} duration The duration of the swipe in milliseconds 7045 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 7046 * @param {int} zoom The zoom/scale level the user pinched too, 0-1. 7047 * @param {object} fingerData The coordinates of fingers in event 7048 */ 7049 7050/** 7051 * A handler triggered for all pinch events. This handler is constantly f
7051ired for the duration of the pinch. This is triggered regardless of thresholds. 7052 * @name $.fn.swipe#pinchStatus 7053 * @event 7054 * @default null 7055 * @param {EventObject} event The original event object 7056 * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions} 7057 * @param {int} distance The distance the user pinched 7058 * @param {int} duration The duration of the swipe in milliseconds 7059 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 7060 * @param {int} zoom The zoom/scale level the user pinched too, 0-1. 7061 * @param {object} fingerData The coordinates of fingers in event 7062 */ 7063 7064/** 7065 * A click handler triggered when a user simply clicks, rather than swipes on an element. 7066 * This is deprecated since version 1.6.2, any assignment to click will be assigned to the tap handler. 7067 * You cannot use <code>on</code> to bind to this event as the default jQ <code>click</code> event will be triggered. 7068 * Use the <code>tap</code> event instead. 7069 * @name $.fn.swipe#click 7070 * @event 7071 * @deprecated since version 1.6.2, please use {@link $.fn.swipe#tap} instead 7072 * @default null 7073 * @param {EventObject} event The original event object 7074 * @param {DomObject} target The element clicked on. 7075 */ 7076 7077 /** 7078 * A click / tap handler triggered when a user simply clicks or taps, rather than swipes on an element. 7079 * @name $.fn.swipe#tap 7080 * @event 7081 * @default null 7082 * @param {EventObject} event The original event object 7083 * @param {DomObject} target The element clicked on. 7084 */ 7085 7086/** 7087 * A double tap handler triggered when a user double clicks or taps on an element. 7088 * You can set the time delay for a double tap with the {@link $.fn.swipe.defaults#doubleTapThreshold} property. 7089 * Note: If you set both <code>doubleTap</code> and <code>tap</code> handlers, the <code>tap</code> event will be delayed by the <code>doubleTapThreshold</code> 7090 * as the script needs to check if its a double tap. 7091 * @name $.fn.swipe#doubleTap 7092 * @see $.fn.swipe.defaults#doubleTapThreshold 7093 * @event 7094 * @default null 7095 * @param {EventObject} event The original event object 7096 * @param {DomObject} target The element clicked on. 7097 */ 7098 7099 /** 7100 * A long tap handler triggered once a tap has been release if the tap was longer than the longTapThreshold. 7101 * You can set the time delay for a long tap with the {@link $.fn.swipe.defaults#longTapThreshold} property. 7102 * @name $.fn.swipe#longTap 7103 * @see $.fn.swipe.defaults#longTapThreshold 7104 * @event 7105 * @default null 7106 * @param {EventObject} event The original event object 7107 * @param {DomObject} target The element clicked on. 7108 */ 7109 7110 /** 7111 * A hold tap handler triggered as soon as the longTapThreshold is reached 7112 * You can set the time delay for a long tap with the {@link $.fn.swipe.defaults#longTapThreshold} property. 7113 * @name $.fn.swipe#hold 7114 * @see $.fn.swipe.defaults#longTapThreshold 7115 * @event 7116 * @default null 7117 * @param {EventObject} event The original event object 7118 * @param {DomObject} target The element clicked on. 7119 */ 7120 7121})); 7122 7123 7124// THEMEPUNCH INTERNAL HANDLINGS 7125if(typeof(console) === 'undefined') { 7126 var console = {}; 7127 console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = console.groupCollapsed = function() {}; 7128} 7129 7130// THEMEPUNCH LOGS 7131if (window.tplogs==true) 7132 try { 7133 console.groupCollapsed("ThemePunch GreenSocks Logs"); 7134 } catch(e) { } 7135 7136// SANDBOX GREENSOCK 7137var oldgs = window.GreenSockGlobals; 7138 oldgs_queue = window._gsQueue; 7139 7140var punchgs = window.GreenSockGlobals = {}; 7141 7142if (window.tplogs==true) 7143 try { 7144 console.info("Build GreenSock SandBox for ThemePunch Plugins"); 7145 console.info("GreenSock TweenLite Engine Initalised by ThemePunch Plugin"); 7146 } catch(e) {} 7147 7148/*! 7149 * VERSION: 1.18.0 7150 * DATE: 2015-09-03 7151 * UPDATES AND DOCS AT: http://greensock.com 7152 * 7153 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved. 7154 * This work is subject to the terms at http://greensock.com/standard-license or for
7155 * Club GreenSock members, the software agreement that was issued with your membership. 7156 * 7157 * @author: Jack Doyle, [email protected] 7158 */ 7159(function(window, moduleName) { 7160 7161 "use strict"; 7162 var _globals = window.GreenSockGlobals = window.GreenSockGlobals || window; 7163 if (_globals.TweenLite) { 7164 return; //in case the core set of classes is already loaded, don't instantiate twice. 7165 } 7166 var _namespace = function(ns) { 7167 var a = ns.split("."), 7168 p = _globals, i; 7169 for (i = 0; i < a.length; i++) { 7170 p[a[i]] = p = p[a[i]] || {}; 7171 } 7172 return p; 7173 }, 7174 gs = _namespace("com.greensock"), 7175 _tinyNum = 0.0000000001, 7176 _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 7177 var b = [], 7178 l = a.length, 7179 i; 7180 for (i = 0; i !== l; b.push(a[i++])) {} 7181 return b; 7182 }, 7183 _emptyFunc = function() {}, 7184 _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower) 7185 var toString = Object.prototype.toString, 7186 array = toString.call([]); 7187 return function(obj) { 7188 return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array)); 7189 }; 7190 }()), 7191 a, i, p, _ticker, _tickerActive, 7192 _defLookup = {}, 7193 7194 /** 7195 * @constructor 7196 * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition. 7197 * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is 7198 * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin 7199 * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally. 7200 * 7201 * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found, 7202 * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere, 7203 * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so 7204 * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything 7205 * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock 7206 * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could 7207 * sandbox the banner one like: 7208 * 7209 * <script> 7210 * var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever. 7211 * </script> 7212 * <script src="js/greensock/v1.7/TweenMax.js"></script> 7213 * <script> 7214 * window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...) 7215 * </script> 7216 * <script src="js/greensock/v1.6/TweenMax.js"></script> 7217 * <script> 7218 * gs.TweenLite.to(...); //would use v1.7 7219 * TweenLite.to(...); //would use v1.6 7220 * </script> 7221 * 7222 * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back". 7223 * @param {!Array.<string>}
7223 dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"] 7224 * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition. 7225 * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object) 7226 */ 7227 Definition = function(ns, dependencies, func, global) { 7228 this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses 7229 _defLookup[ns] = this; 7230 this.gsClass = null; 7231 this.func = func; 7232 var _classes = []; 7233 this.check = function(init) { 7234 var i = dependencies.length, 7235 missing = i, 7236 cur, a, n, cl, hasModule; 7237 while (--i > -1) { 7238 if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) { 7239 _classes[i] = cur.gsClass; 7240 missing--; 7241 } else if (init) { 7242 cur.sc.push(this); 7243 } 7244 } 7245 if (missing === 0 && func) { 7246 a = ("com.greensock." + ns).split("."); 7247 n = a.pop(); 7248 cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes); 7249 7250 //exports to multiple environments 7251 if (global) { 7252 _globals[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.) 7253 hasModule = (typeof(module) !== "undefined" && module.exports); 7254 if (!hasModule && typeof(define) === "function" && define.amd){ //AMD 7255 define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; }); 7256 } else if (ns === moduleName && hasModule){ //node 7257 module.exports = cl; 7258 } 7259 } 7260 for (i = 0; i < this.sc.length; i++) { 7261 this.sc[i].check(); 7262 } 7263 } 7264 }; 7265 this.check(true); 7266 }, 7267 7268 //used to create Definition instances (which basically registers a class that has dependencies). 7269 _gsDefine = window._gsDefine = function(ns, dependencies, func, global) { 7270 return new Definition(ns, dependencies, func, global); 7271 }, 7272 7273 //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class). 7274 _class = gs._class = function(ns, func, global) { 7275 func = func || function() {}; 7276 _gsDefine(ns, [], function(){ return func; }, global); 7277 return func; 7278 }; 7279 7280 _gsDefine.globals = _globals; 7281 7282 7283 7284/* 7285 * ---------------------------------------------------------------- 7286 * Ease 7287 * ---------------------------------------------------------------- 7288 */ 7289 var _baseParams = [0, 0, 1, 1], 7290 _blankArray = [], 7291 Ease = _class("easing.Ease", function(func, extraParams, type, power) { 7292 this._func = func; 7293 this._type = type || 0; 7294 this._power = power || 0; 7295 this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams; 7296 }, true), 7297 _easeMap = Ease.map = {}, 7298 _easeReg = Ease.register = function(ease, names, types, create) { 7299 var na = names.split(","), 7300 i = na.length, 7301 ta = (types || "easeIn,easeOut,easeInOut").split(","), 7302 e, name, j, type; 7303 while (--i > -1) { 7304 name = na[i]; 7305 e = create ? _class("easing."+name, null, true) : gs.easing[name] || {}; 7306 j = ta.length; 7307 while (--j > -1) { 7308 type = ta[j]; 7309 _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease(); 7310 } 7311 } 7312 }; 7313 7314 p = Ease.prototype; 7315 p._calcEnd = false; 7316 p.getRatio = function(p) { 7317 if (this._func) { 7318 this._params[0] = p; 7319 return this._func.apply(null, this._params); 7320 } 7321 var t = this._type, 7322 pw = this._power,
7323 r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2; 7324 if (pw === 1) { 7325 r *= r; 7326 } else if (pw === 2) { 7327 r *= r * r; 7328 } else if (pw === 3) { 7329 r *= r * r * r; 7330 } else if (pw === 4) { 7331 r *= r * r * r * r; 7332 } 7333 return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2); 7334 }; 7335 7336 //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut) 7337 a = ["Linear","Quad","Cubic","Quart","Quint,Strong"]; 7338 i = a.length; 7339 while (--i > -1) { 7340 p = a[i]+",Power"+i; 7341 _easeReg(new Ease(null,null,1,i), p, "easeOut", true); 7342 _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : "")); 7343 _easeReg(new Ease(null,null,3,i), p, "easeInOut"); 7344 } 7345 _easeMap.linear = gs.easing.Linear.easeIn; 7346 _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks 7347 7348 7349/* 7350 * ---------------------------------------------------------------- 7351 * EventDispatcher 7352 * ---------------------------------------------------------------- 7353 */ 7354 var EventDispatcher = _class("events.EventDispatcher", function(target) { 7355 this._listeners = {}; 7356 this._eventTarget = target || this; 7357 }); 7358 p = EventDispatcher.prototype; 7359 7360 p.addEventListener = function(type, callback, scope, useParam, priority) { 7361 priority = priority || 0; 7362 var list = this._listeners[type], 7363 index = 0, 7364 listener, i; 7365 if (list == null) { 7366 this._listeners[type] = list = []; 7367 } 7368 i = list.length; 7369 while (--i > -1) { 7370 listener = list[i]; 7371 if (listener.c === callback && listener.s === scope) { 7372 list.splice(i, 1); 7373 } else if (index === 0 && listener.pr < priority) { 7374 index = i + 1; 7375 } 7376 } 7377 list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority}); 7378 if (this === _ticker && !_tickerActive) { 7379 _ticker.wake(); 7380 } 7381 }; 7382 7383 p.removeEventListener = function(type, callback) { 7384 var list = this._listeners[type], i; 7385 if (list) { 7386 i = list.length; 7387 while (--i > -1) { 7388 if (list[i].c === callback) { 7389 list.splice(i, 1); 7390 return; 7391 } 7392 } 7393 } 7394 }; 7395 7396 p.dispatchEvent = function(type) { 7397 var list = this._listeners[type], 7398 i, t, listener; 7399 if (list) { 7400 i = list.length; 7401 t = this._eventTarget; 7402 while (--i > -1) { 7403 listener = list[i]; 7404 if (listener) { 7405 if (listener.up) { 7406 listener.c.call(listener.s || t, {type:type, target:t}); 7407 } else { 7408 listener.c.call(listener.s || t); 7409 } 7410 } 7411 } 7412 } 7413 }; 7414 7415 7416/* 7417 * ---------------------------------------------------------------- 7418 * Ticker 7419 * ---------------------------------------------------------------- 7420 */ 7421 var _reqAnimFrame = window.requestAnimationFrame, 7422 _cancelAnimFrame = window.cancelAnimationFrame, 7423 _getTime = Date.now || function() {return new Date().getTime();}, 7424 _lastUpdate = _getTime(); 7425 7426 //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill. 7427 a = ["ms","moz","webkit","o"]; 7428 i = a.length; 7429 while (--i > -1 && !_reqAnimFrame) { 7430 _reqAnimFrame = window[a[i] + "RequestAnimationFrame"]; 7431 _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"]; 7432 } 7433 7434 _class("Ticker", function(fps, useRAF) { 7435 var _self = this, 7436 _startTime = _getTime(), 7437 _useRAF = (useRAF !== false && _reqAnimFrame), 7438 _lagThreshold = 500, 7439 _adjustedLag = 33, 7440 _tickWord = "tick", //helps reduce gc burden 7441 _fps, _req, _id, _gap, _nextTime, 7442 _tick = function(manual) { 7443 var elapsed = _getTime() - _lastUpdate, 7444 overlap, dispatch; 7445 if (elapsed > _lagThreshold) { 7446 _startTime += elapsed - _adjustedLag; 7447 } 7448 _lastUpdate += elapsed; 7449 _self.time = (_lastUpdate - _startTime) / 1000; 7450 overlap = _self.time - _nextTime; 7451 if (!_fps || overlap > 0 || manual === true) { 7452 _self.frame++; 7453 _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap); 7454 dispatch = true; 7455 } 7456 if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise. 7457 _id = _req(_tick); 7458 }
7459 if (dispatch) { 7460 _self.dispatchEvent(_tickWord); 7461 } 7462 }; 7463 7464 EventDispatcher.call(_self); 7465 _self.time = _self.frame = 0; 7466 _self.tick = function() { 7467 _tick(true); 7468 }; 7469 7470 _self.lagSmoothing = function(threshold, adjustedLag) { 7471 _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited 7472 _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0); 7473 }; 7474 7475 _self.sleep = function() { 7476 if (_id == null) { 7477 return; 7478 } 7479 if (!_useRAF || !_cancelAnimFrame) { 7480 clearTimeout(_id); 7481 } else { 7482 _cancelAnimFrame(_id); 7483 } 7484 _req = _emptyFunc; 7485 _id = null; 7486 if (_self === _ticker) { 7487 _tickerActive = false; 7488 } 7489 }; 7490 7491 _self.wake = function() { 7492 if (_id !== null) { 7493 _self.sleep(); 7494 } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout(). 7495 _lastUpdate = _getTime() - _lagThreshold + 5; 7496 } 7497 _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame; 7498 if (_self === _ticker) { 7499 _tickerActive = true; 7500 } 7501 _tick(2); 7502 }; 7503 7504 _self.fps = function(value) { 7505 if (!arguments.length) { 7506 return _fps; 7507 } 7508 _fps = value; 7509 _gap = 1 / (_fps || 60); 7510 _nextTime = this.time + _gap; 7511 _self.wake(); 7512 }; 7513 7514 _self.useRAF = function(value) { 7515 if (!arguments.length) { 7516 return _useRAF; 7517 } 7518 _self.sleep(); 7519 _useRAF = value; 7520 _self.fps(_fps); 7521 }; 7522 _self.fps(fps); 7523 7524 //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition. 7525 setTimeout(function() { 7526 if (_useRAF && _self.frame < 5) { 7527 _self.useRAF(false); 7528 } 7529 }, 1500); 7530 }); 7531 7532 p = gs.Ticker.prototype = new gs.events.EventDispatcher(); 7533 p.constructor = gs.Ticker; 7534 7535 7536/* 7537 * ---------------------------------------------------------------- 7538 * Animation 7539 * ---------------------------------------------------------------- 7540 */ 7541 var Animation = _class("core.Animation", function(duration, vars) { 7542 this.vars = vars = vars || {}; 7543 this._duration = this._totalDuration = duration || 0; 7544 this._delay = Number(vars.delay) || 0; 7545 this._timeScale = 1; 7546 this._active = (vars.immediateRender === true); 7547 this.data = vars.data; 7548 this._reversed = (vars.reversed === true); 7549 7550 if (!_rootTimeline) { 7551 return; 7552 } 7553 if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly. 7554 _ticker.wake(); 7555 } 7556 7557 var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline; 7558 tl.add(this, tl._time); 7559 7560 if (this.vars.paused) { 7561 this.paused(true); 7562 } 7563 }); 7564 7565 _ticker = Animation.ticker = new gs.Ticker(); 7566 p = Animation.prototype; 7567 p._dirty = p._gc = p._initted = p._paused = false; 7568 p._totalTime = p._time = 0; 7569 p._rawPrevTime = -1; 7570 p._next = p._last = p._onUpdate = p._timeline = p.timeline = null; 7571 p._paused = false; 7572 7573 7574 //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker. 7575 var _checkTimeout = function() { 7576 if (_tickerActive && _getTime() - _lastUpdate > 2000) { 7577 _ticker.wake(); 7578 } 7579 setTimeout(_checkTimeout, 2000); 7580 }; 7581 _checkTimeout(); 7582 7583 7584 p.play = function(from, suppressEvents) { 7585 if (from != null) { 7586 this.seek(from, suppressEvents); 7587 } 7588 return this.reversed(false).paused(false); 7589 }; 7590 7591 p.pause = function(atTime, suppressEvents) { 7592 if (atTime != null) { 7593 this.seek(atTime, suppressEvents); 7594 } 7595 return this.paused(true); 7596 }; 7597 7598 p.resume = function(from, suppressEvents) { 7599 if (from != null) { 7600 this.seek(from, suppressEvents); 7601 } 7602 return this.paused(false); 7603 }; 7604 7605 p.seek = function(time, suppressEvents) { 7606 return this.totalTime(Number(time), suppressEvents !== false); 7607 }; 7608 7609 p.restart = function(includeDelay, suppressEvents) { 7610 return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true); 7611 }; 7612 7613 p.reverse = function(from, suppressEvents) { 7614 if (from != null) { 7615 this.seek((from || this.totalDuration()), suppressEvents); 7616 } 7617 return this.reversed(true).paused(false); 7618 }; 7619 7620 p.render = function(time, suppressEvents, force) { 7621 //stub - we override this method in subclasses. 7622 }; 7623 7624 p.invalidate = function() { 7625 this._time = this._totalTime = 0; 7626 this._initted = this._gc = false; 7627 this._rawPrevTime = -1; 7628 if (this._gc || !this.timeline) { 7629 this._enabled(true); 7630 } 7631 return this; 7632 }; 7633 7634 p.isActive = function() { 7635 var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active. 7636 startTime = this._startTime, 7637 rawTime; 7638 return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale)); 7639 }; 7640 7641 p._enabled = function (enabled, ignoreTimeline) { 7642 if (!_tickerActive) { 7643 _ticker.wake(); 7644 } 7645 this._gc = !enabled; 7646 this._active = this.isActive(); 7647 if (ignoreTimeline !== true) { 7648 if (enabled && !this.timeline) { 7649 this._timeline.add(this, this._startTime - this._delay); 7650 } else if (!enabled && this.timeline) { 7651 this._timeline._remove(this, true); 7652 } 7653 } 7654 return false; 7655 }; 7656 7657 7658 p._kill = function(vars, target) { 7659 return this._enabled(false, false); 7660 }; 7661 7662 p.kill = function(vars, target) { 7663 this._kill(vars, target); 7664 return this; 7665 }; 7666 7667 p._uncache = function(includeSelf) { 7668 var tween = includeSelf ? this : this.timeline; 7669 while (tween) { 7670 tween._dirty = true; 7671 tween = tween.timeline; 7672 } 7673 return this; 7674 }; 7675 7676 p._swapSelfInParams = function(params) { 7677 var i = params.length, 7678 copy = params.concat(); 7679 while (--i > -1) { 7680 if (params[i] === "{self}") { 7681 copy[i] = this; 7682 } 7683 } 7684 return copy; 7685 }; 7686 7687 p._callback = function(type) { 7688 var v = this.vars; 7689 v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray);
7690 }; 7691 7692//----Animation getters/setters -------------------------------------------------------- 7693 7694 p.eventCallback = function(type, callback, params, scope) { 7695 if ((type || "").substr(0,2) === "on") { 7696 var v = this.vars; 7697 if (arguments.length === 1) { 7698 return v[type]; 7699 } 7700 if (callback == null) { 7701 delete v[type]; 7702 } else { 7703 v[type] = callback; 7704 v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params; 7705 v[type + "Scope"] = scope; 7706 } 7707 if (type === "onUpdate") { 7708 this._onUpdate = callback; 7709 } 7710 } 7711 return this; 7712 }; 7713 7714 p.delay = function(value) { 7715 if (!arguments.length) { 7716 return this._delay; 7717 } 7718 if (this._timeline.smoothChildTiming) { 7719 this.startTime( this._startTime + value - this._delay ); 7720 } 7721 this._delay = value; 7722 return this; 7723 }; 7724 7725 p.duration = function(value) { 7726 if (!arguments.length) { 7727 this._dirty = false; 7728 return this._duration; 7729 } 7730 this._duration = this._totalDuration = value; 7731 this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration. 7732 if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) { 7733 this.totalTime(this._totalTime * (value / this._duration), true); 7734 } 7735 return this; 7736 }; 7737 7738 p.totalDuration = function(value) { 7739 this._dirty = false; 7740 return (!arguments.length) ? this._totalDuration : this.duration(value); 7741 }; 7742 7743 p.time = function(value, suppressEvents) { 7744 if (!arguments.length) { 7745 return this._time; 7746 } 7747 if (this._dirty) { 7748 this.totalDuration(); 7749 } 7750 return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents); 7751 }; 7752 7753 p.totalTime = function(time, suppressEvents, uncapped) { 7754 if (!_tickerActive) { 7755 _ticker.wake(); 7756 } 7757 if (!arguments.length) { 7758 return this._totalTime; 7759 } 7760 if (this._timeline) { 7761 if (time < 0 && !uncapped) { 7762 time += this.totalDuration(); 7763 } 7764 if (this._timeline.smoothChildTiming) { 7765 if (this._dirty) { 7766 this.totalDuration(); 7767 } 7768 var totalDuration = this._totalDuration, 7769 tl = this._timeline; 7770 if (time > totalDuration && !uncapped) { 7771 time = totalDuration; 7772 } 7773 this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale); 7774 if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here. 7775 this._uncache(false); 7776 } 7777 //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed. 7778 if (tl._timeline) { 7779 while (tl._timeline) { 7780 if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) { 7781 tl.totalTime(tl._totalTime, true); 7782 } 7783 tl = tl._timeline; 7784 } 7785 } 7786 } 7787 if (this._gc) { 7788 this._enabled(true, false); 7789 } 7790 if (this._totalTime !== time || this._duration === 0) { 7791 if (_lazyTweens.length) { 7792 _lazyRender(); 7793 } 7794 this.render(time, suppressEvents, false); 7795 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render. 7796 _lazyRender(); 7797 } 7798 } 7799 } 7800 return this; 7801 }; 7802 7803 p.progress = p.totalProgress = function(value, suppressEvents) { 7804 var duration = this.duration(); 7805 return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents); 7806 }; 7807 7808 p.startTime = function(value) { 7809 if (!arguments.length) { 7810 return this._startTime; 7811 } 7812 if (value !== this._startTime) { 7813 this._startTime = value; 7814 if (this.timeline) if (this.timeline._sortChildren) { 7815 this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct. 7816 } 7817 } 7818 return this; 7819 }; 7820 7821 p.endTime = function(includeRepeats) { 7822 return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale; 7823 }; 7824 7825 p.timeScale = function(value) { 7826 if (!arguments.length) { 7827 return this._timeScale; 7828 } 7829 value = value || _tinyNum; //can't allow zero because it'll throw the math off
7830 if (this._timeline && this._timeline.smoothChildTiming) { 7831 var pauseTime = this._pauseTime, 7832 t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime(); 7833 this._startTime = t - ((t - this._startTime) * this._timeScale / value); 7834 } 7835 this._timeScale = value; 7836 return this._uncache(false); 7837 }; 7838 7839 p.reversed = function(value) { 7840 if (!arguments.length) { 7841 return this._reversed; 7842 } 7843 if (value != this._reversed) { 7844 this._reversed = value; 7845 this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true); 7846 } 7847 return this; 7848 }; 7849 7850 p.paused = function(value) { 7851 if (!arguments.length) { 7852 return this._paused; 7853 } 7854 var tl = this._timeline, 7855 raw, elapsed; 7856 if (value != this._paused) if (tl) { 7857 if (!_tickerActive && !value) { 7858 _ticker.wake(); 7859 } 7860 raw = tl.rawTime(); 7861 elapsed = raw - this._pauseTime; 7862 if (!value && tl.smoothChildTiming) { 7863 this._startTime += elapsed; 7864 this._uncache(false); 7865 } 7866 this._pauseTime = value ? raw : null; 7867 this._paused = value; 7868 this._active = this.isActive(); 7869 if (!value && elapsed !== 0 && this._initted && this.duration()) { 7870 raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale; 7871 this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render. 7872 } 7873 } 7874 if (this._gc && !value) { 7875 this._enabled(true, false); 7876 } 7877 return this; 7878 }; 7879 7880 7881/* 7882 * ---------------------------------------------------------------- 7883 * SimpleTimeline 7884 * ---------------------------------------------------------------- 7885 */ 7886 var SimpleTimeline = _class("core.SimpleTimeline", function(vars) { 7887 Animation.call(this, 0, vars); 7888 this.autoRemoveChildren = this.smoothChildTiming = true; 7889 }); 7890 7891 p = SimpleTimeline.prototype = new Animation(); 7892 p.constructor = SimpleTimeline; 7893 p.kill()._gc = false; 7894 p._first = p._last = p._recent = null; 7895 p._sortChildren = false; 7896 7897 p.add = p.insert = function(child, position, align, stagger) { 7898 var prevTween, st; 7899 child._startTime = Number(position || 0) + child._delay; 7900 if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order). 7901 child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale); 7902 } 7903 if (child.timeline) { 7904 child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one. 7905 } 7906 child.timeline = child._timeline = this; 7907 if (child._gc) { 7908 child._enabled(true, true); 7909 } 7910 prevTween = this._last; 7911 if (this._sortChildren) { 7912 st = child._startTime; 7913 while (prevTween && prevTween._startTime > st) { 7914 prevTween = prevTween._prev; 7915 } 7916 } 7917 if (prevTween) { 7918 child._next = prevTween._next; 7919 prevTween._next = child; 7920 } else { 7921 child._next = this._first; 7922 this._first = child; 7923 } 7924 if (child._next) { 7925 child._next._prev = child; 7926 } else { 7927 this._last = child; 7928 } 7929 child._prev = prevTween; 7930 this._recent = child; 7931 if (this._timeline) { 7932 this._uncache(true); 7933 } 7934 return this; 7935 }; 7936 7937 p._remove = function(tween, skipDisable) { 7938 if (tween.timeline === this) { 7939 if (!skipDisable) { 7940 tween._enabled(false, true); 7941 } 7942 7943 if (tween._prev) { 7944 tween._prev._next = tween._next; 7945 } else if (this._first === tween) { 7946 this._first = tween._next; 7947 } 7948 if (tween._next) { 7949 tween._next._prev = tween._prev; 7950 } else if (this._last === tween) { 7951 this._last = tween._prev; 7952 } 7953 tween._next = tween._prev = tween.timeline = null; 7954 if (tween === this._recent) { 7955 this._recent = this._last; 7956 } 7957 7958 if (this._timeline) { 7959 this._uncache(true); 7960 } 7961 } 7962 return this; 7963 }; 7964 7965 p.render = function(time, suppressEvents, force) { 7966 var tween = this._first, 7967 next; 7968 this._totalTime = this._time = this._rawPrevTime = time; 7969 while (tween) { 7970 next = tween._next; //record it here because the value could change after rendering... 7971 if (tween._active || (time >= tween._startTime && !tween._paused)) { 7972 if (!tween._reversed) { 7973 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 7974 } else { 7975 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 7976 } 7977 } 7978 tween = next; 7979 } 7980 }; 7981 7982 p.rawTime = function() { 7983 if (!_tickerActive) { 7984 _ticker.wake(); 7985 } 7986 return this._totalTime; 7987 }; 7988 7989/* 7990 * ---------------------------------------------------------------- 7991 * TweenLite 7992 * ---------------------------------------------------------------- 7993 */ 7994 var TweenLite = _class("TweenLite", function(target, duration, vars) { 7995 Animation.call(this, duration, vars); 7996 this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method) 7997 7998 if (target == null) { 7999 throw "Cannot tween a null target."; 8000 } 8001 8002 this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 8003 8004 var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),
8005 overwrite = this.vars.overwrite, 8006 i, targ, targets; 8007 8008 this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite]; 8009 8010 if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") { 8011 this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 8012 this._propLookup = []; 8013 this._siblings = []; 8014 for (i = 0; i < targets.length; i++) { 8015 targ = targets[i]; 8016 if (!targ) { 8017 targets.splice(i--, 1); 8018 continue; 8019 } else if (typeof(targ) === "string") { 8020 targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings 8021 if (typeof(targ) === "string") { 8022 targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case) 8023 } 8024 continue; 8025 } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself. 8026 targets.splice(i--, 1); 8027 this._targets = targets = targets.concat(_slice(targ)); 8028 continue; 8029 } 8030 this._siblings[i] = _register(targ, this, false); 8031 if (overwrite === 1) if (this._siblings[i].length > 1) { 8032 _applyOverwrite(targ, this, null, 1, this._siblings[i]); 8033 } 8034 } 8035 8036 } else { 8037 this._propLookup = {}; 8038 this._siblings = _register(target, this, false); 8039 if (overwrite === 1) if (this._siblings.length > 1) { 8040 _applyOverwrite(target, this, null, 1, this._siblings); 8041 } 8042 } 8043 if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) { 8044 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 8045 this.render(-this._delay); 8046 } 8047 }, true), 8048 _isSelector = function(v) { 8049 return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox. 8050 }, 8051 _autoCSS = function(vars, target) { 8052 var css = {}, 8053 p; 8054 for (p in vars) { 8055 if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties. 8056 css[p] = vars[p]; 8057 delete vars[p]; 8058 } 8059 } 8060 vars.css = css; 8061 }; 8062 8063 p = TweenLite.prototype = new Animation(); 8064 p.constructor = TweenLite; 8065 p.kill()._gc = false; 8066 8067//----TweenLite defaults, overwrite management, and root updates ---------------------------------------------------- 8068 8069 p.ratio = 0; 8070 p._firstPT = p._targets = p._overwrittenProps = p._startAt = null; 8071 p._notifyPluginsOfEnabled = p._lazy = false; 8072 8073 TweenLite.version = "1.18.0"; 8074 TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1); 8075 TweenLite.defaultOverwrite = "auto"; 8076 TweenLite.ticker = _ticker; 8077 TweenLite.autoSleep = 120; 8078 TweenLite.lagSmoothing = function(threshold, adjustedLag) { 8079 _ticker.lagSmoothing(threshold, adjustedLag); 8080 }; 8081 8082 TweenLite.selector = window.$ || window.jQuery || function(e) { 8083 var selector = window.$ || window.jQuery; 8084 if (selector) { 8085 TweenLite.selector = selector; 8086 return selector(e); 8087 } 8088 return (typeof(document) === "undefined") ? e : (document.querySelectorAll ? document.querySelectorAll(e) : document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e)); 8089 }; 8090 8091 var _lazyTweens = [], 8092 _lazyLookup = {}, 8093 _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, 8094 //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig, 8095 _setRatio = function(v) { 8096 var pt = this._firstPT, 8097 min = 0.000001, 8098 val; 8099 while (pt) { 8100 val = !pt.blob ? pt.c * v + pt.s : v ? this.join("") : this.start; 8101 if (pt.r) { 8102 val = Math.round(val); 8103 } else if (val < min) if (val >
8103 -min) { //prevents issues with converting very small numbers to strings in the browser 8104 val = 0; 8105 } 8106 if (!pt.f) { 8107 pt.t[pt.p] = val; 8108 } else if (pt.fp) { 8109 pt.t[pt.p](pt.fp, val); 8110 } else { 8111 pt.t[pt.p](val); 8112 } 8113 pt = pt._next; 8114 } 8115 }, 8116 //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")). 8117 _blobDif = function(start, end, filter, pt) { 8118 var a = [start, end], 8119 charIndex = 0, 8120 s = "", 8121 color = 0, 8122 startNums, endNums, num, i, l, nonNumbers, currentNum; 8123 a.start = start; 8124 if (filter) { 8125 filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. 8126 start = a[0]; 8127 end = a[1]; 8128 } 8129 a.length = 0; 8130 startNums = start.match(_numbersExp) || []; 8131 endNums = end.match(_numbersExp) || []; 8132 if (pt) { 8133 pt._next = null; 8134 pt.blob = 1; 8135 a._firstPT = pt; //apply last in the linked list (which means inserting it first) 8136 } 8137 l = endNums.length; 8138 for (i = 0; i < l; i++) { 8139 currentNum = endNums[i]; 8140 nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex); 8141 s += (nonNumbers || !i) ? nonNumbers : ","; //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. 8142 charIndex += nonNumbers.length; 8143 if (color) { //sense rgba() values and round them. 8144 color = (color + 1) % 5; 8145 } else if (nonNumbers.substr(-5) === "rgba(") { 8146 color = 1; 8147 } 8148 if (currentNum === startNums[i] || startNums.length <= i) { 8149 s += currentNum; 8150 } else { 8151 if (s) { 8152 a.push(s); 8153 s = ""; 8154 } 8155 num = parseFloat(startNums[i]); 8156 a.push(num); 8157 a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, r:(color && color < 4)}; 8158 //note: we don't set _prev because we'll never need to remove individual PropTweens from this list. 8159 } 8160 charIndex += currentNum.length; 8161 } 8162 s += end.substr(charIndex); 8163 if (s) { 8164 a.push(s); 8165 } 8166 a.setRatio = _setRatio; 8167 return a; 8168 }, 8169 //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example. 8170 _addPropTween = function(target, prop, start, end, overwriteProp, round, funcParam, stringFilter) { 8171 var s = (start === "get") ? target[prop] : start, 8172 type = typeof(target[prop]), 8173 isRelative = (typeof(end) === "string" && end.charAt(1) === "="), 8174 pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, r:round, pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0}, 8175 blob, getterName; 8176 if (type !== "number") { 8177 if (type === "function" && start === "get") { 8178 getterName = ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)); 8179 pt.s = s = funcParam ? target[getterName](funcParam) : target[getterName](); 8180 } 8181 if (typeof(s) === "string" && (funcParam || isNaN(s))) { 8182 //a blob (string that has multiple numbers in it) 8183 pt.fp = funcParam; 8184 blob = _blobDif(s, end, stringFilter || TweenLite.defaultStringFilter, pt); 8185 pt = {t:blob, p:"setRatio", s:0, c:1, f:2, pg:0, n:overwriteProp || prop, pr:0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example. 8186 } else if (!isRelative) { 8187 pt.c = (parseFloat(end) - parseFloat(s)) || 0; 8188 } 8189 } 8190 if (pt.c) { //only add it to the linked list if there's a change. 8191 if ((pt._next = this._firstPT)) { 8192 pt._next._prev = pt; 8193 } 8194 this._firstPT = pt; 8195 return pt; 8196 } 8197 }, 8198 _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object. 8199 _plugins = TweenLite._plugins = {}, 8200 _tweenLookup = _internals.tweenLookup = {}, 8201 _tweenLookupNum = 0, 8202 _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUp
8202date:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1}, 8203 _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0}, 8204 _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(), 8205 _rootTimeline = Animation._rootTimeline = new SimpleTimeline(), 8206 _nextGCFrame = 30, 8207 _lazyRender = _internals.lazyRender = function() { 8208 var i = _lazyTweens.length, 8209 tween; 8210 _lazyLookup = {}; 8211 while (--i > -1) { 8212 tween = _lazyTweens[i]; 8213 if (tween && tween._lazy !== false) { 8214 tween.render(tween._lazy[0], tween._lazy[1], true); 8215 tween._lazy = false; 8216 } 8217 } 8218 _lazyTweens.length = 0; 8219 }; 8220 8221 _rootTimeline._startTime = _ticker.time; 8222 _rootFramesTimeline._startTime = _ticker.frame; 8223 _rootTimeline._active = _rootFramesTimeline._active = true; 8224 setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick". 8225 8226 Animation._updateRoot = TweenLite.render = function() { 8227 var i, a, p; 8228 if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again. 8229 _lazyRender(); 8230 } 8231 _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false); 8232 _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false); 8233 if (_lazyTweens.length) { 8234 _lazyRender(); 8235 } 8236 if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to 8237 _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120); 8238 for (p in _tweenLookup) { 8239 a = _tweenLookup[p].tweens; 8240 i = a.length; 8241 while (--i > -1) { 8242 if (a[i]._gc) { 8243 a.splice(i, 1); 8244 } 8245 } 8246 if (a.length === 0) { 8247 delete _tweenLookup[p]; 8248 } 8249 } 8250 //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly 8251 p = _rootTimeline._first; 8252 if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) { 8253 while (p && p._paused) { 8254 p = p._next; 8255 } 8256 if (!p) { 8257 _ticker.sleep(); 8258 } 8259 } 8260 } 8261 }; 8262 8263 _ticker.addEventListener("tick", Animation._updateRoot); 8264 8265 var _register = function(target, tween, scrub) { 8266 var id = target._gsTweenID, a, i; 8267 if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) { 8268 _tweenLookup[id] = {target:target, tweens:[]}; 8269 } 8270 if (tween) { 8271 a = _tweenLookup[id].tweens; 8272 a[(i = a.length)] = tween; 8273 if (scrub) { 8274 while (--i > -1) { 8275 if (a[i] === tween) { 8276 a.splice(i, 1); 8277 } 8278 } 8279 } 8280 } 8281 return _tweenLookup[id].tweens; 8282 }, 8283 _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) { 8284 var func = overwrittenTween.vars.onOverwrite, r1, r2; 8285 if (func) { 8286 r1 = func(overwrittenTween, overwritingTween, target, killedProps); 8287 } 8288 func = TweenLite.onOverwrite; 8289 if (func) { 8290 r2 = func(overwrittenTween, overwritingTween, target, killedProps); 8291 } 8292 return (r1 !== false && r2 !== false); 8293 }, 8294 _applyOverwrite = function(target, tween, props, mode, siblings) { 8295 var i, changed, curTween, l; 8296 if (mode === 1 || mode >= 4) { 8297 l = siblings.length; 8298 for (i = 0; i < l; i++) { 8299 if ((curTween = siblings[i]) !== tween) { 8300 if (!curTween._gc) { 8301 if (curTween._kill(null, target, tween)) { 8302 changed = true; 8303 } 8304 } 8305 } else if (mode === 5) { 8306 break; 8307 } 8308 } 8309 return changed; 8310 } 8311 //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example) 8312 var startTime = tween._startTime + _tinyNum, 8313 overlaps = [], 8314 oCount = 0, 8315 zeroDur = (tween._duration === 0), 8316 globalStart; 8317 i = siblings.length; 8318 while (--i > -1) { 8319 if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) { 8320 //ignore 8321 } else if (curTween._timeline !== tween._timeline) { 8322 globalStart = globalStart || _checkOverlap(tween, 0, zeroDur); 8323 if (_checkOverlap(curTween, globalStart, zeroDur) === 0) { 8324 overlaps[oCount++] = curTween; 8325 } 8326 } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) { 8327 overlaps[oCount++] = curTween; 8328 } 8329 } 8330 8331 i = oCount; 8332 while (--i > -1) { 8333 curTween = overlaps[i]; 8334 if (mode === 2) if (curTween._kill(props, target, tween)) { 8335 changed = true; 8336 } 8337 if (mode !== 2 || (!curTween._firstPT && curTween._initted)) { 8338 if (mode !== 2 && !_onOverwrite(curTween, tween)) { 8339 continue; 8340 } 8341 if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween. 8342 changed = true; 8343 } 8344 } 8345 } 8346 return changed; 8347 }, 8348 _checkOverlap = function(tween, reference, zeroDur) { 8349 var tl = tween._timeline, 8350 ts = tl._timeScale, 8351 t = tween._startTime; 8352 while (tl._timeline) { 8353 t += tl._startTime; 8354 ts *= tl._timeScale; 8355 if (tl._paused) { 8356 return -100; 8357 } 8358 tl = tl._timeline; 8359 } 8360 t /= ts; 8361 return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum; 8362 }; 8363 8364 8365//---- TweenLite instance methods ----------------------------------------------------------------------------- 8366 8367 p._init = function() { 8368 var v = this.vars, 8369 op = this._overwrittenProps, 8370 dur = this._duration, 8371 immediate = !!v.immediateRender, 8372 ease = v.ease, 8373 i, initPlugins, pt, p, startVars; 8374 if (v.startAt) { 8375 if (this._startAt) { 8376 this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change. 8377 this._startAt.kill(); 8378 } 8379 startVars = {}; 8380 for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from); 8381 startVars[p] = v.startAt[p]; 8382 } 8383 startVars.overwrite = false; 8384 startVars.immediateRender = true; 8385 startVars.lazy = (immediate && v.lazy !== false);
8386 startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop). 8387 this._startAt = TweenLite.to(this.target, 0, startVars); 8388 if (immediate) { 8389 if (this._time > 0) { 8390 this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()). 8391 } else if (dur !== 0) { 8392 return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting. 8393 } 8394 } 8395 } else if (v.runBackwards && dur !== 0) { 8396 //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards) 8397 if (this._startAt) { 8398 this._startAt.render(-1, true); 8399 this._startAt.kill(); 8400 this._startAt = null; 8401 } else { 8402 if (this._time !== 0) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0 8403 immediate = false; 8404 } 8405 pt = {}; 8406 for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through. 8407 if (!_reservedProps[p] || p === "autoCSS") { 8408 pt[p] = v[p]; 8409 } 8410 } 8411 pt.overwrite = 0; 8412 pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in. 8413 pt.lazy = (immediate && v.lazy !== false); 8414 pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after) 8415 this._startAt = TweenLite.to(this.target, 0, pt); 8416 if (!immediate) { 8417 this._startAt._init(); //ensures that the initial values are recorded 8418 this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween. 8419 if (this.vars.immediateRender) { 8420 this._startAt = null; 8421 } 8422 } else if (this._time === 0) { 8423 return; 8424 } 8425 } 8426 } 8427 this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase; 8428 if (v.easeParams instanceof Array && ease.config) { 8429 this._ease = ease.config.apply(ease, v.easeParams); 8430 } 8431 this._easeType = this._ease._type; 8432 this._easePower = this._ease._power; 8433 this._firstPT = null; 8434 8435 if (this._targets) { 8436 i = this._targets.length; 8437 while (--i > -1) { 8438 if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null)) ) { 8439 initPlugins = true; 8440 } 8441 } 8442 } else { 8443 initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op); 8444 } 8445 8446 if (initPlugins) { 8447 TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite 8448 } 8449 if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live. 8450 this._enabled(false, false); 8451 } 8452 if (v.runBackwards) { 8453 pt = this._firstPT; 8454 while (pt) { 8455 pt.s += pt.c; 8456 pt.c = -pt.c; 8457 pt = pt._next; 8458 } 8459 } 8460 this._onUpdate = v.onUpdate; 8461 this._initted = true; 8462 }; 8463 8464 p._initProps = function(target, propLookup, siblings, overwrittenProps) { 8465 var p, i, initPlugins, plugin, pt, v; 8466 if (target == null) { 8467 return false; 8468 } 8469 8470 if (_lazyLookup[target._gsTweenID]) { 8471 _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end) 8472 } 8473 8474 if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe. 8475 _autoCSS(this.vars, target); 8476 } 8477 for (p in this.vars) { 8478 v = this.vars[p]; 8479 if (_reservedProps[p]) { 8480 if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) { 8481 this.vars[p] = v = this._swapSelfInParams(v, this); 8482 } 8483 8484 } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this)) { 8485 8486 //t - target [object] 8487 //p - property [string] 8488 //s - start [number] 8489 //c - change [number] 8490 //f - isFunction [boolean] 8491 //n - name [string] 8492 //pg - isPlugin [boolean] 8493 //pr - priority [number] 8494 this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority};
8495 i = plugin._overwriteProps.length; 8496 while (--i > -1) { 8497 propLookup[plugin._overwriteProps[i]] = this._firstPT; 8498 } 8499 if (plugin._priority || plugin._onInitAllProps) { 8500 initPlugins = true; 8501 } 8502 if (plugin._onDisable || plugin._onEnable) { 8503 this._notifyPluginsOfEnabled = true; 8504 } 8505 if (pt._next) { 8506 pt._next._prev = pt; 8507 } 8508 8509 } else { 8510 propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter); 8511 } 8512 } 8513 8514 if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first) 8515 return this._initProps(target, propLookup, siblings, overwrittenProps); 8516 } 8517 if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) { 8518 this._kill(propLookup, target); 8519 return this._initProps(target, propLookup, siblings, overwrittenProps); 8520 } 8521 if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does. 8522 _lazyLookup[target._gsTweenID] = true; 8523 } 8524 return initPlugins; 8525 }; 8526 8527 p.render = function(time, suppressEvents, force) { 8528 var prevTime = this._time, 8529 duration = this._duration, 8530 prevRawPrevTime = this._rawPrevTime, 8531 isComplete, callback, pt, rawPrevTime; 8532 if (time >= duration) { 8533 this._totalTime = this._time = duration; 8534 this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1; 8535 if (!this._reversed ) { 8536 isComplete = true; 8537 callback = "onComplete"; 8538 force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 8539 } 8540 if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 8541 if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate. 8542 time = 0; 8543 } 8544 if (time === 0 || prevRawPrevTime < 0 || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause. 8545 force = true; 8546 if (prevRawPrevTime > _tinyNum) { 8547 callback = "onReverseComplete"; 8548 } 8549 } 8550 this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 8551 } 8552 8553 } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0. 8554 this._totalTime = this._time = 0; 8555 this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0; 8556 if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) { 8557 callback = "onReverseComplete"; 8558 isComplete = this._reversed; 8559 } 8560 if (time < 0) { 8561 this._active = false; 8562 if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 8563 if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && this.data === "isPause")) { 8564 force = true; 8565 } 8566 this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 8567 } 8568 } 8569 if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. 8570 force = true; 8571 } 8572 } else { 8573 this._totalTime = this._time = time; 8574 8575 if (this._easeType) { 8576 var r = time / duration, type = this._easeType, pow = this._easePower; 8577 if (type === 1 || (type === 3 && r >= 0.5)) { 8578 r = 1 - r; 8579 } 8580 if (type === 3) { 8581 r *= 2; 8582 } 8583 if (pow === 1) { 8584 r *= r; 8585 } else if (pow === 2) { 8586 r *= r * r; 8587 } else if (pow === 3) { 8588 r *= r * r * r; 8589 } else if (pow === 4) { 8590 r *= r * r * r * r; 8591 } 8592 8593 if (type === 1) { 8594 this.ratio = 1 - r; 8595 } else if (type === 2) { 8596 this.ratio = r; 8597 } else if (time / duration < 0.5) { 8598 this.ratio = r / 2; 8599 } else { 8600 this.ratio = 1 - (r / 2); 8601 } 8602 8603 } else { 8604 this.ratio = this._ease.getRatio(time / duration); 8605 } 8606 } 8607 8608 if (this._time === prevTime && !force) { 8609 return; 8610 } else if (!this._initted) { 8611 this._init(); 8612 if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that over
8612writing occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example. 8613 return; 8614 } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) { 8615 this._time = this._totalTime = prevTime; 8616 this._rawPrevTime = prevRawPrevTime; 8617 _lazyTweens.push(this); 8618 this._lazy = [time, suppressEvents]; 8619 return; 8620 } 8621 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. 8622 if (this._time && !isComplete) { 8623 this.ratio = this._ease.getRatio(this._time / duration); 8624 } else if (isComplete && this._ease._calcEnd) { 8625 this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1); 8626 } 8627 } 8628 if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time. 8629 this._lazy = false; 8630 } 8631 if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) { 8632 this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. 8633 } 8634 if (prevTime === 0) { 8635 if (this._startAt) { 8636 if (time >= 0) { 8637 this._startAt.render(time, suppressEvents, force); 8638 } else if (!callback) { 8639 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area. 8640 } 8641 } 8642 if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) { 8643 this._callback("onStart"); 8644 } 8645 } 8646 pt = this._firstPT; 8647 while (pt) { 8648 if (pt.f) { 8649 pt.t[pt.p](pt.c * this.ratio + pt.s); 8650 } else { 8651 pt.t[pt.p] = pt.c * this.ratio + pt.s; 8652 } 8653 pt = pt._next; 8654 } 8655 8656 if (this._onUpdate) { 8657 if (time < 0) if (this._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 8658 this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. 8659 } 8660 if (!suppressEvents) if (this._time !== prevTime || isComplete) { 8661 this._callback("onUpdate"); 8662 } 8663 } 8664 if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate 8665 if (time < 0 && this._startAt && !this._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values. 8666 this._startAt.render(time, suppressEvents, force); 8667 } 8668 if (isComplete) { 8669 if (this._timeline.autoRemoveChildren) { 8670 this._enabled(false, false); 8671 } 8672 this._active = false; 8673 } 8674 if (!suppressEvents && this.vars[callback]) { 8675 this._callback(callback); 8676 } 8677 if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon sce
8677nario, but possible nonetheless. 8678 this._rawPrevTime = 0; 8679 } 8680 } 8681 }; 8682 8683 p._kill = function(vars, target, overwritingTween) { 8684 if (vars === "all") { 8685 vars = null; 8686 } 8687 if (vars == null) if (target == null || target === this.target) { 8688 this._lazy = false; 8689 return this._enabled(false, false); 8690 } 8691 target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target; 8692 var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline), 8693 i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed; 8694 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 8695 i = target.length; 8696 while (--i > -1) { 8697 if (this._kill(vars, target[i], overwritingTween)) { 8698 changed = true; 8699 } 8700 } 8701 } else { 8702 if (this._targets) { 8703 i = this._targets.length; 8704 while (--i > -1) { 8705 if (target === this._targets[i]) { 8706 propLookup = this._propLookup[i] || {}; 8707 this._overwrittenProps = this._overwrittenProps || []; 8708 overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all"; 8709 break; 8710 } 8711 } 8712 } else if (target !== this.target) { 8713 return false; 8714 } else { 8715 propLookup = this._propLookup; 8716 overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all"; 8717 } 8718 8719 if (propLookup) { 8720 killProps = vars || propLookup; 8721 record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin) 8722 if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) { 8723 for (p in killProps) { 8724 if (propLookup[p]) { 8725 if (!killed) { 8726 killed = []; 8727 } 8728 killed.push(p); 8729 } 8730 } 8731 if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it). 8732 return false; 8733 } 8734 } 8735 8736 for (p in killProps) { 8737 if ((pt = propLookup[p])) { 8738 if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween. 8739 if (pt.f) { 8740 pt.t[pt.p](pt.s); 8741 } else { 8742 pt.t[pt.p] = pt.s; 8743 } 8744 changed = true; 8745 } 8746 if (pt.pg && pt.t._kill(killProps)) { 8747 changed = true; //some plugins need to be notified so they can perform cleanup tasks first 8748 } 8749 if (!pt.pg || pt.t._overwriteProps.length === 0) { 8750 if (pt._prev) { 8751 pt._prev._next = pt._next; 8752 } else if (pt === this._firstPT) { 8753 this._firstPT = pt._next; 8754 } 8755 if (pt._next) { 8756 pt._next._prev = pt._prev; 8757 } 8758 pt._next = pt._prev = null; 8759 } 8760 delete propLookup[p]; 8761 } 8762 if (record) { 8763 overwrittenProps[p] = 1; 8764 } 8765 } 8766 if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening. 8767 this._enabled(false, false); 8768 } 8769 } 8770 } 8771 return changed; 8772 }; 8773 8774 p.invalidate = function() { 8775 if (this._notifyPluginsOfEnabled) { 8776 TweenLite._onPluginEvent("_onDisable", this); 8777 } 8778 this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null; 8779 this._notifyPluginsOfEnabled = this._active = this._lazy = false; 8780 this._propLookup = (this._targets) ? {} : []; 8781 Animation.prototype.invalidate.call(this); 8782 if (this.vars.immediateRender) { 8783 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 8784 this.render(-this._delay); 8785 } 8786 return this; 8787 }; 8788 8789 p._enabled = function(enabled, ignoreTimeline) { 8790 if (!_tickerActive) { 8791 _ticker.wake(); 8792 } 8793 if (enabled && this._gc) { 8794 var targets = this._targets, 8795 i; 8796 if (targets) { 8797 i = targets.length; 8798 while (--i > -1) { 8799 this._siblings[i] = _register(targets[i], this, true); 8800 } 8801 } else { 8802 this._siblings = _register(this.target, this, true); 8803 } 8804 } 8805 Animation.prototype._enabled.call(this, enabled, ignoreTimeline); 8806 if (this._notifyPluginsOfEnabled) if (this._firstPT) { 8807 return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this); 8808 } 8809 return false; 8810 }; 8811 8812 8813//----TweenLite static methods ----------------------------------------------------- 8814 8815 TweenLite.to = function(target, duration, vars) { 8816 return new TweenLite(target, duration, vars); 8817 }; 8818 8819 TweenLite.from = function(target, duration, vars) { 8820 vars.runBackwards = true; 8821 vars.immediateRender = (vars.immediateRender != false); 8822 return new TweenLite(target, duration, vars); 8823 }; 8824 8825 TweenLite.fromTo = function(target, duration, fromVars, toVars) { 8826 toVars.startAt = fromVars; 8827 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 8828 return new TweenLite(target, duration, toVars); 8829 }; 8830 8831 TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) { 8832 return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0}); 8833 }; 8834 8835 TweenLite.set = function(target, vars) { 8836 return new TweenLite(target, 0, vars); 8837 }; 8838 8839 TweenLite.getTweensOf = function(target, onlyActive) { 8840 if (target == null) { return []; } 8841 target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 8842 var i, a, j, t; 8843 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 8844 i = target.length; 8845 a = []; 8846 while (--i > -1) { 8847 a = a.concat(TweenLite.getTweensOf(target[i], onlyActive)); 8848 } 8849 i = a.length; 8850 //now get rid of any duplicates (tweens of arrays of objects could cause duplicates) 8851 while (--i > -1) { 8852 t = a[i]; 8853 j = i; 8854 while (--j > -1) { 8855 if (t === a[j]) { 8856 a.splice(i, 1); 8857 } 8858 } 8859 } 8860 } else { 8861 a = _register(target).concat(); 8862 i = a.length; 8863 while (--i > -1) { 8864 if (a[i]._gc || (onlyActive && !a[i].isActive())) { 8865 a.splice(i, 1); 8866 } 8867 } 8868 } 8869 return a; 8870 }; 8871 8872 TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) { 8873 if (typeof(onlyActive) === "object") { 8874 vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted) 8875 onlyActive = false; 8876 } 8877 var a = TweenLite.getTweensOf(target, onlyActive), 8878 i = a.length; 8879 while (--i > -1) { 8880 a[i]._kill(vars, target); 8881 } 8882 }; 8883 8884 8885 8886/* 8887 * ---------------------------------------------------------------- 8888 * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget) 8889 * ---------------------------------------------------------------- 8890 */ 8891 var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) { 8892 this._overwriteProps = (props || "").split(","); 8893 this._propName = this._overwriteProps[0]; 8894 this._priority = priority || 0; 8895 this._super = TweenPlugin.prototype; 8896 }, true); 8897 8898 p = TweenPlugin.prototype; 8899 TweenPlugin.version = "1.18.0"; 8900 TweenPlugin.API = 2; 8901 p._firstPT = null; 8902 p._addTween = _addPropTween; 8903 p.setRatio = _setRatio; 8904 8905 p._kill = function(lookup) { 8906 var a = this._overwriteProps, 8907 pt = this._firstPT, 8908 i; 8909 if (lookup[this._propName] != null) { 8910 this._overwriteProps = []; 8911 } else { 8912 i = a.length; 8913 while (--i > -1) { 8914 if (lookup[a[i]] != null) { 8915 a.splice(i, 1); 8916 } 8917 } 8918 } 8919 while (pt) { 8920 if (lookup[pt.n] != null) { 8921 if (pt._next) { 8922 pt._next._prev = pt._prev; 8923 } 8924 if (pt._prev) { 8925 pt._prev._next = pt._next; 8926 pt._prev = null; 8927 } else if (this._firstPT === pt) { 8928 this._firstPT = pt._next; 8929 } 8930 } 8931 pt = pt._next; 8932 } 8933 return false; 8934 }; 8935 8936 p._roundProps = function(lookup, value) { 8937 var pt = this._firstPT; 8938 while (pt) { 8939 if (lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ])) { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here. 8940 pt.r = value; 8941 } 8942 pt = pt._next; 8943 } 8944 }; 8945 8946 TweenLite._onPluginEvent = function(type, tween) { 8947 var pt = tween._firstPT, 8948 changed, pt2, first, last, next; 8949 if (type === "_onInitAllProps") { 8950 //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame. 8951 while (pt) { 8952 next = pt._next; 8953 pt2 = first; 8954 while (pt2 && pt2.pr > pt.pr) { 8955 pt2 = pt2._next; 8956 } 8957 if ((pt._prev = pt2 ? pt2._prev : last)) { 8958 pt._prev._next = pt; 8959 } else { 8960 first = pt; 8961 } 8962 if ((pt._next = pt2)) { 8963 pt2._prev = pt; 8964 } else { 8965 last = pt; 8966 } 8967 pt = next; 8968 } 8969 pt = tween._firstPT = first; 8970 } 8971 while (pt) { 8972 if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) { 8973 changed = true; 8974 } 8975 pt = pt._next; 8976 } 8977 return changed; 8978 }; 8979 8980 TweenPlugin.activate = function(plugins) { 8981 var i = plugins.length; 8982 while (--i > -1) { 8983 if (plugins[i].API === TweenPlugin.API) { 8984 _plugins[(new plugins[i]())._propName] = plugins[i]; 8985 } 8986 } 8987 return true; 8988 }; 8989 8990 //provides a more concise way to define plugins that have no depen
8990dencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations. 8991 _gsDefine.plugin = function(config) { 8992 if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; } 8993 var propName = config.propName, 8994 priority = config.priority || 0, 8995 overwriteProps = config.overwriteProps, 8996 map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_roundProps", initAll:"_onInitAllProps"}, 8997 Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin", 8998 function() { 8999 TweenPlugin.call(this, propName, priority); 9000 this._overwriteProps = overwriteProps || []; 9001 }, (config.global === true)), 9002 p = Plugin.prototype = new TweenPlugin(propName), 9003 prop; 9004 p.constructor = Plugin; 9005 Plugin.API = config.API; 9006 for (prop in map) { 9007 if (typeof(config[prop]) === "function") { 9008 p[map[prop]] = config[prop]; 9009 } 9010 } 9011 Plugin.version = config.version; 9012 TweenPlugin.activate([Plugin]); 9013 return Plugin; 9014 }; 9015 9016 9017 //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you. 9018 a = window._gsQueue; 9019 if (a) { 9020 for (i = 0; i < a.length; i++) { 9021 a[i](); 9022 } 9023 for (p in _defLookup) { 9024 if (!_defLookup[p].func) { 9025 window.console.log("GSAP encountered missing dependency: com.greensock." + p); 9026 } 9027 } 9028 } 9029 9030 _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated 9031 9032})((typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window, "TweenLite"); 9033 9034/*! 9035 * VERSION: 1.18.0 9036 * DATE: 2015-08-29 9037 * UPDATES AND DOCS AT: http://greensock.com 9038 * 9039 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved. 9040 * This work is subject to the terms at http://greensock.com/standard-license or for 9041 * Club GreenSock members, the software agreement that was issued with your membership. 9042 * 9043 * @author: Jack Doyle, [email protected] 9044 */ 9045var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 9046(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() { 9047 9048 "use strict"; 9049 9050 _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) { 9051 9052 var TimelineLite = function(vars) { 9053 SimpleTimeline.call(this, vars); 9054 this._labels = {}; 9055 this.autoRemoveChildren = (this.vars.autoRemoveChildren === true); 9056 this.smoothChildTiming = (this.vars.smoothChildTiming === true); 9057 this._sortChildren = true; 9058 this._onUpdate = this.vars.onUpdate; 9059 var v = this.vars, 9060 val, p; 9061 for (p in v) { 9062 val = v[p]; 9063 if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) { 9064 v[p] = this._swapSelfInParams(val); 9065 } 9066 } 9067 if (_isArray(v.tweens)) { 9068 this.add(v.tweens, 0, v.align, v.stagger); 9069 } 9070 }, 9071 _tinyNum = 0.0000000001, 9072 TweenLiteInternals = TweenLite._internals, 9073 _internals = TimelineLite._internals = {}, 9074 _isSelector = TweenLiteInternals.isSelector, 9075 _isArray = TweenLiteInternals.isArray, 9076 _lazyTweens = TweenLiteInternals.lazyTweens, 9077 _lazyRender = TweenLiteInternals.lazyRender, 9078 _globals = _gsScope._gsDefine.globals, 9079 _copy = function(vars) { 9080 var copy = {}, p; 9081 for (p in vars) { 9082 copy[p] = vars[p]; 9083 } 9084 return copy; 9085 }, 9086 _applyCycle = function(vars, targets, i) { 9087 var alt = vars.cycle, 9088 p, val; 9089 for (p in alt) { 9090 val = alt[p]; 9091 vars[p] = (typeof(val) === "function") ? val.call(targets[i], i) : val[i % val.length]; 9092 } 9093 delete vars.cycle; 9094 }, 9095 _pauseCallback = _internals.pauseCallback = function() {}, 9096 _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 9097 var b = [], 9098 l = a.length, 9099 i; 9100 for (i = 0; i !== l; b.push(a[i++])); 9101 return b; 9102 }, 9103 p = TimelineLite.prototype = new SimpleTimeline(); 9104
9105 TimelineLite.version = "1.18.0"; 9106 p.constructor = TimelineLite; 9107 p.kill()._gc = p._forcingPlayhead = p._hasPause = false; 9108 9109 /* might use later... 9110 //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales. 9111 function localToGlobal(time, animation) { 9112 while (animation) { 9113 time = (time / animation._timeScale) + animation._startTime; 9114 animation = animation.timeline; 9115 } 9116 return time; 9117 } 9118 9119 //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales 9120 function globalToLocal(time, animation) { 9121 var scale = 1; 9122 time -= localToGlobal(0, animation); 9123 while (animation) { 9124 scale *= animation._timeScale; 9125 animation = animation.timeline; 9126 } 9127 return time * scale; 9128 } 9129 */ 9130 9131 p.to = function(target, duration, vars, position) { 9132 var Engine = (vars.repeat && _globals.TweenMax) || TweenLite; 9133 return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position); 9134 }; 9135 9136 p.from = function(target, duration, vars, position) { 9137 return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, vars), position); 9138 }; 9139 9140 p.fromTo = function(target, duration, fromVars, toVars, position) { 9141 var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite; 9142 return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position); 9143 }; 9144 9145 p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 9146 var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, callbackScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}), 9147 cycle = vars.cycle, 9148 copy, i; 9149 if (typeof(targets) === "string") { 9150 targets = TweenLite.selector(targets) || targets; 9151 } 9152 targets = targets || []; 9153 if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array. 9154 targets = _slice(targets); 9155 } 9156 stagger = stagger || 0; 9157 if (stagger < 0) { 9158 targets = _slice(targets); 9159 targets.reverse(); 9160 stagger *= -1; 9161 } 9162 for (i = 0; i < targets.length; i++) { 9163 copy = _copy(vars); 9164 if (copy.startAt) { 9165 copy.startAt = _copy(copy.startAt); 9166 if (copy.startAt.cycle) { 9167 _applyCycle(copy.startAt, targets, i); 9168 } 9169 } 9170 if (cycle) { 9171 _applyCycle(copy, targets, i); 9172 } 9173 tl.to(targets[i], duration, copy, i * stagger); 9174 } 9175 return this.add(tl, position); 9176 }; 9177 9178 p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 9179 vars.immediateRender = (vars.immediateRender != false); 9180 vars.runBackwards = true; 9181 return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 9182 }; 9183 9184 p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 9185 toVars.startAt = fromVars; 9186 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 9187 return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 9188 }; 9189 9190 p.call = function(callback, params, scope, position) { 9191 return this.add( TweenLite.delayedCall(0, callback, params, scope), position); 9192 }; 9193 9194 p.set = function(target, vars, position) { 9195 position = this._parseTimeOrLabel(position, 0, true); 9196 if (vars.immediateRender == null) { 9197 vars.immediateRender = (position === this._time && !this._paused); 9198 } 9199 return this.add( new TweenLite(target, 0, vars), position); 9200 }; 9201 9202 TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) { 9203 vars = vars || {}; 9204 if (vars.smoothChildTiming == null) { 9205 vars.smoothChildTiming = true; 9206 } 9207 var tl = new TimelineLite(vars), 9208 root = tl._timeline, 9209 tween, next; 9210 if (ignoreDelayedCalls == null) { 9211 ignoreDelayedCalls = true; 9212 } 9213 root._remove(tl, true); 9214 tl._startTime = 0; 9215 tl._rawPrevTime = tl._time = tl._totalTime = root._time; 9216 tween = root._first; 9217 while (tween) { 9218 next = tween._next; 9219 if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) { 9220 tl.add(tween, tween._startTime - tween._delay); 9221 } 9222 tween = next; 9223 } 9224 root.add(tl, 0); 9225 return tl; 9226 }; 9227 9228 p.add = function(value, position, align, stagger) { 9229 var curTime, l, i, child, tl, beforeRawTime; 9230 if (typeof(position) !== "number") { 9231 position = this._parseTimeOrLabel(position, 0, true, value); 9232 } 9233 if (!(value instanceof Animation)) { 9234 if ((value instanceof Array) || (value && value.push && _isArray(value))) {
9235 align = align || "normal"; 9236 stagger = stagger || 0; 9237 curTime = position; 9238 l = value.length; 9239 for (i = 0; i < l; i++) { 9240 if (_isArray(child = value[i])) { 9241 child = new TimelineLite({tweens:child}); 9242 } 9243 this.add(child, curTime); 9244 if (typeof(child) !== "string" && typeof(child) !== "function") { 9245 if (align === "sequence") { 9246 curTime = child._startTime + (child.totalDuration() / child._timeScale); 9247 } else if (align === "start") { 9248 child._startTime -= child.delay(); 9249 } 9250 } 9251 curTime += stagger; 9252 } 9253 return this._uncache(true); 9254 } else if (typeof(value) === "string") { 9255 return this.addLabel(value, position); 9256 } else if (typeof(value) === "function") { 9257 value = TweenLite.delayedCall(0, value); 9258 } else { 9259 throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string."); 9260 } 9261 } 9262 9263 SimpleTimeline.prototype.add.call(this, value, position); 9264 9265 //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. 9266 if (this._gc || this._time === this._duration) if (!this._paused) if (this._duration < this.duration()) { 9267 //in case any of the ancestors had completed but should now be enabled... 9268 tl = this; 9269 beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect. 9270 while (tl._timeline) { 9271 if (beforeRawTime && tl._timeline.smoothChildTiming) { 9272 tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it. 9273 } else if (tl._gc) { 9274 tl._enabled(true, false); 9275 } 9276 tl = tl._timeline; 9277 } 9278 } 9279 9280 return this; 9281 }; 9282 9283 p.remove = function(value) { 9284 if (value instanceof Animation) { 9285 this._remove(value, false); 9286 var tl = value._timeline = value.vars.useFrames ? Animation._rootFramesTimeline : Animation._rootTimeline; //now that it's removed, default it to the root timeline so that if it gets played again, it doesn't jump back into this timeline. 9287 value._startTime = (value._paused ? value._pauseTime : tl._time) - ((!value._reversed ? value._totalTime : value.totalDuration() - value._totalTime) / value._timeScale); //ensure that if it gets played again, the timing is correct. 9288 return this; 9289 } else if (value instanceof Array || (value && value.push && _isArray(value))) { 9290 var i = value.length; 9291 while (--i > -1) { 9292 this.remove(value[i]); 9293 } 9294 return this; 9295 } else if (typeof(value) === "string") { 9296 return this.removeLabel(value); 9297 } 9298 return this.kill(null, value); 9299 }; 9300 9301 p._remove = function(tween, skipDisable) { 9302 SimpleTimeline.prototype._remove.call(this, tween, skipDisable); 9303 var last = this._last; 9304 if (!last) { 9305 this._time = this._totalTime = this._duration = this._totalDuration = 0; 9306 } else if (this._time > last._startTime + last._totalDuration / last._timeScale) { 9307 this._time = this.duration(); 9308 this._totalTime = this._totalDuration; 9309 } 9310 return this; 9311 }; 9312 9313 p.append = function(value, offsetOrLabel) { 9314 return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value)); 9315 }; 9316 9317 p.insert = p.insertMultiple = function(value, position, align, stagger) { 9318 return this.add(value, position || 0, align, stagger); 9319 }; 9320 9321 p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) { 9322 return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger); 9323 }; 9324 9325 p.addLabel = function(label, position) { 9326 this._labels[label] = this._parseTimeOrLabel(position); 9327 return this; 9328 }; 9329 9330 p.addPause = function(position, callback, params, scope) { 9331 var t = TweenLite.delayedCall(0, _pauseCallback, params, scope || this); 9332 t.vars.onComplete = t.vars.onReverseComplete = callback;
9333 t.data = "isPause"; 9334 this._hasPause = true; 9335 return this.add(t, position); 9336 }; 9337 9338 p.removeLabel = function(label) { 9339 delete this._labels[label]; 9340 return this; 9341 }; 9342 9343 p.getLabelTime = function(label) { 9344 return (this._labels[label] != null) ? this._labels[label] : -1; 9345 }; 9346 9347 p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) { 9348 var i; 9349 //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration(). 9350 if (ignore instanceof Animation && ignore.timeline === this) { 9351 this.remove(ignore); 9352 } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) { 9353 i = ignore.length; 9354 while (--i > -1) { 9355 if (ignore[i] instanceof Animation && ignore[i].timeline === this) { 9356 this.remove(ignore[i]); 9357 } 9358 } 9359 } 9360 if (typeof(offsetOrLabel) === "string") { 9361 return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - this.duration() : 0, appendIfAbsent); 9362 } 9363 offsetOrLabel = offsetOrLabel || 0; 9364 if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). 9365 i = timeOrLabel.indexOf("="); 9366 if (i === -1) { 9367 if (this._labels[timeOrLabel] == null) { 9368 return appendIfAbsent ? (this._labels[timeOrLabel] = this.duration() + offsetOrLabel) : offsetOrLabel; 9369 } 9370 return this._labels[timeOrLabel] + offsetOrLabel; 9371 } 9372 offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1)); 9373 timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : this.duration(); 9374 } else if (timeOrLabel == null) { 9375 timeOrLabel = this.duration(); 9376 } 9377 return Number(timeOrLabel) + offsetOrLabel; 9378 }; 9379 9380 p.seek = function(position, suppressEvents) { 9381 return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false)); 9382 }; 9383 9384 p.stop = function() { 9385 return this.paused(true); 9386 }; 9387 9388 p.gotoAndPlay = function(position, suppressEvents) { 9389 return this.play(position, suppressEvents); 9390 }; 9391 9392 p.gotoAndStop = function(position, suppressEvents) { 9393 return this.pause(position, suppressEvents); 9394 }; 9395 9396 p.render = function(time, suppressEvents, force) { 9397 if (this._gc) { 9398 this._enabled(true, false); 9399 } 9400 var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(), 9401 prevTime = this._time, 9402 prevStart = this._startTime, 9403 prevTimeScale = this._timeScale, 9404 prevPaused = this._paused, 9405 tween, isComplete, next, callback, internalForce, pauseTween; 9406 if (time >= totalDur) { 9407 this._totalTime = this._time = totalDur; 9408 if (!this._reversed) if (!this._hasPausedChild()) { 9409 isComplete = true; 9410 callback = "onComplete"; 9411 internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 9412 if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) { 9413 internalForce = true; 9414 if (this._rawPrevTime > _tinyNum) { 9415 callback = "onReverseComplete"; 9416 } 9417 } 9418 } 9419 this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 9420 time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. 9421 9422 } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0. 9423 this._totalTime = this._time = 0; 9424 if (prevTime !== 0 || (this._duration === 0 && this._rawPrevTime !== _tinyNum && (this._rawPrevTime > 0 || (time < 0 && this._rawPrevTime >= 0)))) { 9425 callback = "onReverseComplete"; 9426 isComplete = this._reversed; 9427 } 9428 if (time < 0) { 9429 this._active = false; 9430 if (this._timeline.autoRemoveChildren && this._reversed) { //ensures proper GC if a timeline is resumed after it's finished reversing. 9431 internalForce = isComplete = true; 9432 callback = "onReverseComplete"; 9433 } else if (this._rawPrevTime >= 0 && this._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 9434 internalForce = true; 9435 } 9436 this._rawPrevTime = time; 9437 } else { 9438 this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 9439 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 9440 tween = this._first; 9441 while (tween && tween._startTime === 0) { 9442 if (!tween._duration) { 9443 isComplete = false; 9444 } 9445 tween = tween._next; 9446 } 9447 } 9448 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 9449 if (!this._initted) { 9450 internalForce = true; 9451 } 9452 } 9453 9454 } else { 9455 9456 if (this._hasPause && !this._forcingPlayhead && !suppressEvents) { 9457 if (time >= prevTime) { 9458 tween = this._first; 9459 while (tween && tween._startTime <= time && !pauseTween) { 9460 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && this._rawPrevTime === 0)) { 9461 pauseTween = tween; 9462 } 9463 tween = tween._next; 9464 } 9465 } else { 9466 tween = this._last; 9467 while (tween && tween._startTime >= time && !pauseTween) { 9468 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 9469 pauseTween = tween; 9470 } 9471 tween = tween._prev; 9472 } 9473 } 9474 if (pauseTween) { 9475 this._time = time = pauseTween._startTime; 9476 this._totalTime = time + (this._cycle * (this._totalDuration + this._repeatDelay)); 9477 } 9478 } 9479 9480 this._totalTime = this._time = this._rawPrevTime = time; 9481 } 9482 if ((this._time === prevTime || !this._first) && !force && !internalForce && !pauseTween) { 9483 return; 9484 } else if (!this._initted) { 9485 this._initted = true; 9486 } 9487 9488 if (!this._active) if (!this._paused && this._time !== prevTime && time > 0) { 9489 this._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 9490 } 9491 9492 if (prevTime === 0) if (this.vars.onStart) if (this._time !== 0) if (!suppressEvents) { 9493 this._callback("onStart"); 9494 } 9495 9496 if (this._time >= prevTime) { 9497 tween = this._first; 9498 while (tween) { 9499 next = tween._next; //record it here because the value could change after rendering... 9500 if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering 9501 break; 9502 } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) { 9503 if (pauseTween === tween) { 9504 this.pause(); 9505 } 9506 if (!tween._reversed) { 9507 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 9508 } else { 9509 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 9510 } 9511 } 9512 tween = next; 9513 } 9514 } else { 9515 tween = this._last; 9516 while (tween) { 9517 next = tween._prev; //record it here because the value could change after rendering... 9518 if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering 9519 break; 9520 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 9521 if (pauseTween === tween) { 9522 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 9523 while (pauseTween && pauseTween.endTime() > this._time) { 9524 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 9525 pauseTween = pauseTween._prev; 9526 } 9527 pauseTween = null; 9528 this.pause(); 9529 } 9530 if (!tween._reversed) { 9531 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 9532 } else { 9533 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 9534 } 9535 } 9536 tween = next; 9537 } 9538 } 9539 9540 if (this._onUpdate) if (!suppressEvents) { 9541 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 9542 _lazyRender(); 9543 }
9544 this._callback("onUpdate"); 9545 } 9546 9547 if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 9548 if (isComplete) { 9549 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values. 9550 _lazyRender(); 9551 } 9552 if (this._timeline.autoRemoveChildren) { 9553 this._enabled(false, false); 9554 } 9555 this._active = false; 9556 } 9557 if (!suppressEvents && this.vars[callback]) { 9558 this._callback(callback); 9559 } 9560 } 9561 }; 9562 9563 p._hasPausedChild = function() { 9564 var tween = this._first; 9565 while (tween) { 9566 if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) { 9567 return true; 9568 } 9569 tween = tween._next; 9570 } 9571 return false; 9572 }; 9573 9574 p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) { 9575 ignoreBeforeTime = ignoreBeforeTime || -9999999999; 9576 var a = [], 9577 tween = this._first, 9578 cnt = 0; 9579 while (tween) { 9580 if (tween._startTime < ignoreBeforeTime) { 9581 //do nothing 9582 } else if (tween instanceof TweenLite) { 9583 if (tweens !== false) { 9584 a[cnt++] = tween; 9585 } 9586 } else { 9587 if (timelines !== false) { 9588 a[cnt++] = tween; 9589 } 9590 if (nested !== false) { 9591 a = a.concat(tween.getChildren(true, tweens, timelines)); 9592 cnt = a.length; 9593 } 9594 } 9595 tween = tween._next; 9596 } 9597 return a; 9598 }; 9599 9600 p.getTweensOf = function(target, nested) { 9601 var disabled = this._gc, 9602 a = [], 9603 cnt = 0, 9604 tweens, i; 9605 if (disabled) { 9606 this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here. 9607 } 9608 tweens = TweenLite.getTweensOf(target); 9609 i = tweens.length; 9610 while (--i > -1) { 9611 if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) { 9612 a[cnt++] = tweens[i]; 9613 } 9614 } 9615 if (disabled) { 9616 this._enabled(false, true); 9617 } 9618 return a; 9619 }; 9620 9621 p.recent = function() { 9622 return this._recent; 9623 }; 9624 9625 p._contains = function(tween) { 9626 var tl = tween.timeline; 9627 while (tl) { 9628 if (tl === this) { 9629 return true; 9630 } 9631 tl = tl.timeline; 9632 } 9633 return false; 9634 }; 9635 9636 p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) { 9637 ignoreBeforeTime = ignoreBeforeTime || 0; 9638 var tween = this._first, 9639 labels = this._labels, 9640 p; 9641 while (tween) { 9642 if (tween._startTime >= ignoreBeforeTime) { 9643 tween._startTime += amount; 9644 } 9645 tween = tween._next; 9646 } 9647 if (adjustLabels) { 9648 for (p in labels) { 9649 if (labels[p] >= ignoreBeforeTime) { 9650 labels[p] += amount; 9651 } 9652 } 9653 } 9654 return this._uncache(true); 9655 }; 9656 9657 p._kill = function(vars, target) { 9658 if (!vars && !target) { 9659 return this._enabled(false, false); 9660 } 9661 var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target), 9662 i = tweens.length, 9663 changed = false; 9664 while (--i > -1) { 9665 if (tweens[i]._kill(vars, target)) { 9666 changed = true; 9667 } 9668 } 9669 return changed; 9670 }; 9671 9672 p.clear = function(labels) { 9673 var tweens = this.getChildren(false, true, true), 9674 i = tweens.length; 9675 this._time = this._totalTime = 0; 9676 while (--i > -1) { 9677 tweens[i]._enabled(false, false); 9678 } 9679 if (labels !== false) { 9680 this._labels = {}; 9681 } 9682 return this._uncache(true); 9683 }; 9684 9685 p.invalidate = function() { 9686 var tween = this._first; 9687 while (tween) { 9688 tween.invalidate(); 9689 tween = tween._next; 9690 } 9691 return Animation.prototype.invalidate.call(this);; 9692 }; 9693 9694 p._enabled = function(enabled, ignoreTimeline) { 9695 if (enabled === this._gc) { 9696 var tween = this._first; 9697 while (tween) { 9698 tween._enabled(enabled, true); 9699 tween = tween._next; 9700 } 9701 } 9702 return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline); 9703 }; 9704 9705 p.totalTime = function(time, suppressEvents, uncapped) { 9706 this._forcingPlayhead = true; 9707 var val = Animation.prototype.totalTime.apply(this, arguments); 9708 this._forcingPlayhead = false; 9709 return val; 9710 }; 9711 9712 p.duration = function(value) { 9713 if (!arguments.length) { 9714 if (this._dirty) { 9715 this.totalDuration(); //just triggers recalculation 9716 } 9717 return this._duration; 9718 } 9719 if (this.duration() !== 0 && value !== 0) { 9720 this.timeScale(this._duration / value); 9721 } 9722 return this; 9723 }; 9724 9725 p.totalDuration = function(value) { 9726 if (!arguments.length) { 9727 if (this._dirty) { 9728 var max = 0, 9729 tween = this._last, 9730 prevStart = 999999999999, 9731 prev, end; 9732 while (tween) { 9733 prev = tween._prev; //record it here in case the tween changes position in the sequence... 9734 if (tween._dirty) { 9735 tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it. 9736 } 9737 if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 9738 this.add(tween, tween._startTime - tween._delay); 9739 } else { 9740 prevStart = tween._startTime; 9741 } 9742 if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 9743 max -= tween._startTime; 9744 if (this._timeline.smoothChildTiming) { 9745 this._startTime += tween._startTime / this._timeScale; 9746 } 9747 this.shiftChildren(-tween._startTime, false, -9999999999); 9748 prevStart = 0; 9749 } 9750 end = tween._startTime + (tween._totalDuration / tween._timeScale); 9751 if (end > max) { 9752 max = end; 9753 } 9754 tween = prev; 9755 } 9756 this._duration = this._totalDuration = max; 9757 this._dirty = false; 9758 } 9759 return this._totalDuration; 9760 } 9761 if (this.totalDuration() !== 0) if (value !== 0) { 9762 this.timeScale(this._totalDuration / value); 9763 } 9764 return this; 9765 }; 9766 9767 p.paused = function(value) { 9768 if (!value) { //if there's a pause directly at the spot from where we're unpausing, skip it. 9769 var tween = this._first, 9770 time = this._time; 9771 while (tween) { 9772 if (tween._startTime === time && tween.data === "isPause") { 9773 tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire. 9774 } 9775 tween = tween._next; 9776 } 9777 } 9778 return Animation.prototype.paused.apply(this, arguments); 9779 }; 9780 9781 p.usesFrames = function() { 9782 var tl = this._timeline; 9783 while (tl._timeline) { 9784 tl = tl._timeline; 9785 } 9786 return (tl === Animation._rootFramesTimeline); 9787 }; 9788 9789 p.rawTime = function() { 9790 return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale; 9791 }; 9792 9793 return TimelineLite; 9794 9795 }, true); 9796 9797 9798}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } 9799 9800//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) 9801(function(name) { 9802 "use strict"; 9803 var getGlobal = function() { 9804 return (_gsScope.GreenSockGlobals || _gsScope)[name]; 9805 }; 9806 if (typeof(define) === "function" && define.amd) { //AMD 9807 define(["TweenLite"], getGlobal); 9808 } else if (typeof(module) !== "undefined" && module.exports) { //node 9809 require("./TweenLite.js"); //dependency 9810 module.exports = getGlobal(); 9811 } 9812}("TimelineLite")); 9813 9814/*! 9815 * VERSION: beta 1.15.2 9816 * DATE: 2015-01-27 9817 * UPDATES AND DOCS AT: http://greensock.com 9818 * 9819 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved. 9820 * This work is subject to the terms at http://greensock.com/standard-license or for
9821 * Club GreenSock members, the software agreement that was issued with your membership. 9822 * 9823 * @author: Jack Doyle, [email protected] 9824 **/ 9825var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 9826(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() { 9827 9828 "use strict"; 9829 9830 _gsScope._gsDefine("easing.Back", ["easing.Ease"], function(Ease) { 9831 9832 var w = (_gsScope.GreenSockGlobals || _gsScope), 9833 gs = w.com.greensock, 9834 _2PI = Math.PI * 2, 9835 _HALF_PI = Math.PI / 2, 9836 _class = gs._class, 9837 _create = function(n, f) { 9838 var C = _class("easing." + n, function(){}, true), 9839 p = C.prototype = new Ease(); 9840 p.constructor = C; 9841 p.getRatio = f; 9842 return C; 9843 }, 9844 _easeReg = Ease.register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist. 9845 _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) { 9846 var C = _class("easing."+name, { 9847 easeOut:new EaseOut(), 9848 easeIn:new EaseIn(), 9849 easeInOut:new EaseInOut() 9850 }, true); 9851 _easeReg(C, name); 9852 return C; 9853 }, 9854 EasePoint = function(time, value, next) { 9855 this.t = time; 9856 this.v = value; 9857 if (next) { 9858 this.next = next; 9859 next.prev = this; 9860 this.c = next.v - value; 9861 this.gap = next.t - time; 9862 } 9863 }, 9864 9865 //Back 9866 _createBack = function(n, f) { 9867 var C = _class("easing." + n, function(overshoot) { 9868 this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158; 9869 this._p2 = this._p1 * 1.525; 9870 }, true), 9871 p = C.prototype = new Ease(); 9872 p.constructor = C; 9873 p.getRatio = f; 9874 p.config = function(overshoot) { 9875 return new C(overshoot); 9876 }; 9877 return C; 9878 }, 9879 9880 Back = _wrap("Back", 9881 _createBack("BackOut", function(p) { 9882 return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1); 9883 }), 9884 _createBack("BackIn", function(p) { 9885 return p * p * ((this._p1 + 1) * p - this._p1); 9886 }), 9887 _createBack("BackInOut", function(p) { 9888 return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2); 9889 }) 9890 ), 9891 9892 9893 //SlowMo 9894 SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) { 9895 power = (power || power === 0) ? power : 0.7; 9896 if (linearRatio == null) { 9897 linearRatio = 0.7; 9898 } else if (linearRatio > 1) { 9899 linearRatio = 1; 9900 } 9901 this._p = (linearRatio !== 1) ? power : 0; 9902 this._p1 = (1 - linearRatio) / 2; 9903 this._p2 = linearRatio; 9904 this._p3 = this._p1 + this._p2; 9905 this._calcEnd = (yoyoMode === true); 9906 }, true), 9907 p = SlowMo.prototype = new Ease(), 9908 SteppedEase, RoughEase, _createElastic; 9909 9910 p.constructor = SlowMo; 9911 p.getRatio = function(p) { 9912 var r = p + (0.5 - p) * this._p; 9913 if (p < this._p1) { 9914 return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r); 9915 } else if (p > this._p3) { 9916 return this._calcEnd ? 1 - (p = (p - this._p3) / this._p1) * p : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p); 9917 } 9918 return this._calcEnd ? 1 : r; 9919 }; 9920 SlowMo.ease = new SlowMo(0.7, 0.7); 9921 9922 p.config = SlowMo.config = function(linearRatio, power, yoyoMode) { 9923 return new SlowMo(linearRatio, power, yoyoMode); 9924 }; 9925 9926 9927 //SteppedEase 9928 SteppedEase = _class("easing.SteppedEase", function(steps) { 9929 steps = steps || 1; 9930 this._p1 = 1 / steps; 9931 this._p2 = steps + 1; 9932 }, true); 9933 p = SteppedEase.prototype = new Ease(); 9934 p.constructor = SteppedEase; 9935 p.getRatio = function(p) { 9936 if (p < 0) { 9937 p = 0; 9938 } else if (p >= 1) { 9939 p = 0.999999999; 9940 } 9941 return ((this._p2 * p) >> 0) * this._p1; 9942 }; 9943 p.config = SteppedEase.config = function(steps) { 9944 return new SteppedEase(steps); 9945 }; 9946 9947 9948 //RoughEase 9949 RoughEase = _class("easing.RoughEase", function(vars) { 9950 vars = vars || {}; 9951 var taper = vars.taper || "none", 9952 a = [], 9953 cnt = 0, 9954 points = (vars.points || 20) | 0, 9955 i = points, 9956 randomize = (vars.randomize !== false), 9957 clamp = (vars.clamp === true), 9958 template = (vars.template instanceof Ease) ? vars.template : null,
9959 strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4, 9960 x, y, bump, invX, obj, pnt; 9961 while (--i > -1) { 9962 x = randomize ? Math.random() : (1 / points) * i; 9963 y = template ? template.getRatio(x) : x; 9964 if (taper === "none") { 9965 bump = strength; 9966 } else if (taper === "out") { 9967 invX = 1 - x; 9968 bump = invX * invX * strength; 9969 } else if (taper === "in") { 9970 bump = x * x * strength; 9971 } else if (x < 0.5) { //"both" (start) 9972 invX = x * 2; 9973 bump = invX * invX * 0.5 * strength; 9974 } else { //"both" (end) 9975 invX = (1 - x) * 2; 9976 bump = invX * invX * 0.5 * strength; 9977 } 9978 if (randomize) { 9979 y += (Math.random() * bump) - (bump * 0.5); 9980 } else if (i % 2) { 9981 y += bump * 0.5; 9982 } else { 9983 y -= bump * 0.5; 9984 } 9985 if (clamp) { 9986 if (y > 1) { 9987 y = 1; 9988 } else if (y < 0) { 9989 y = 0; 9990 } 9991 } 9992 a[cnt++] = {x:x, y:y}; 9993 } 9994 a.sort(function(a, b) { 9995 return a.x - b.x; 9996 }); 9997 9998 pnt = new EasePoint(1, 1, null); 9999 i = points; 10000 while (--i > -1) { 10001 obj = a[i]; 10002 pnt = new EasePoint(obj.x, obj.y, pnt); 10003 } 10004 10005 this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next); 10006 }, true); 10007 p = RoughEase.prototype = new Ease(); 10008 p.constructor = RoughEase; 10009 p.getRatio = function(p) { 10010 var pnt = this._prev; 10011 if (p > pnt.t) { 10012 while (pnt.next && p >= pnt.t) { 10013 pnt = pnt.next; 10014 } 10015 pnt = pnt.prev; 10016 } else { 10017 while (pnt.prev && p <= pnt.t) { 10018 pnt = pnt.prev; 10019 } 10020 } 10021 this._prev = pnt; 10022 return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c); 10023 }; 10024 p.config = function(vars) { 10025 return new RoughEase(vars); 10026 }; 10027 RoughEase.ease = new RoughEase(); 10028 10029 10030 //Bounce 10031 _wrap("Bounce", 10032 _create("BounceOut", function(p) { 10033 if (p < 1 / 2.75) { 10034 return 7.5625 * p * p; 10035 } else if (p < 2 / 2.75) { 10036 return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75; 10037 } else if (p < 2.5 / 2.75) { 10038 return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375; 10039 } 10040 return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375; 10041 }), 10042 _create("BounceIn", function(p) { 10043 if ((p = 1 - p) < 1 / 2.75) { 10044 return 1 - (7.5625 * p * p); 10045 } else if (p < 2 / 2.75) { 10046 return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75); 10047 } else if (p < 2.5 / 2.75) { 10048 return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375); 10049 } 10050 return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375); 10051 }), 10052 _create("BounceInOut", function(p) { 10053 var invert = (p < 0.5); 10054 if (invert) { 10055 p = 1 - (p * 2); 10056 } else { 10057 p = (p * 2) - 1; 10058 } 10059 if (p < 1 / 2.75) { 10060 p = 7.5625 * p * p; 10061 } else if (p < 2 / 2.75) { 10062 p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75; 10063 } else if (p < 2.5 / 2.75) { 10064 p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375; 10065 } else { 10066 p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375; 10067 } 10068 return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5; 10069 }) 10070 ); 10071 10072 10073 //CIRC 10074 _wrap("Circ", 10075 _create("CircOut", function(p) { 10076 return Math.sqrt(1 - (p = p - 1) * p); 10077 }), 10078 _create("CircIn", function(p) { 10079 return -(Math.sqrt(1 - (p * p)) - 1); 10080 }), 10081 _create("CircInOut", function(p) { 10082 return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1); 10083 }) 10084 ); 10085 10086 10087 //Elastic 10088 _createElastic = function(n, f, def) { 10089 var C = _class("easing." + n, function(amplitude, period) { 10090 this._p1 = (amplitude >= 1) ? amplitude : 1; //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1. 10091 this._p2 = (period || def) / (amplitude < 1 ? amplitude : 1); 10092 this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0); 10093 this._p2 = _2PI / this._p2; //precalculate to optimize 10094 }, true), 10095 p = C.prototype = new Ease(); 10096 p.constructor = C; 10097 p.getRatio = f; 10098 p.config = function(amplitude, period) { 10099 return new C(amplitude, period); 10100 }; 10101 return C;
10102 }; 10103 _wrap("Elastic", 10104 _createElastic("ElasticOut", function(p) { 10105 return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * this._p2 ) + 1; 10106 }, 0.3), 10107 _createElastic("ElasticIn", function(p) { 10108 return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2 )); 10109 }, 0.3), 10110 _createElastic("ElasticInOut", function(p) { 10111 return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * this._p2 ) * 0.5 + 1; 10112 }, 0.45) 10113 ); 10114 10115 10116 //Expo 10117 _wrap("Expo", 10118 _create("ExpoOut", function(p) { 10119 return 1 - Math.pow(2, -10 * p); 10120 }), 10121 _create("ExpoIn", function(p) { 10122 return Math.pow(2, 10 * (p - 1)) - 0.001; 10123 }), 10124 _create("ExpoInOut", function(p) { 10125 return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); 10126 }) 10127 ); 10128 10129 10130 //Sine 10131 _wrap("Sine", 10132 _create("SineOut", function(p) { 10133 return Math.sin(p * _HALF_PI); 10134 }), 10135 _create("SineIn", function(p) { 10136 return -Math.cos(p * _HALF_PI) + 1; 10137 }), 10138 _create("SineInOut", function(p) { 10139 return -0.5 * (Math.cos(Math.PI * p) - 1); 10140 }) 10141 ); 10142 10143 _class("easing.EaseLookup", { 10144 find:function(s) { 10145 return Ease.map[s]; 10146 } 10147 }, true); 10148 10149 //register the non-standard eases 10150 _easeReg(w.SlowMo, "SlowMo", "ease,"); 10151 _easeReg(RoughEase, "RoughEase", "ease,"); 10152 _easeReg(SteppedEase, "SteppedEase", "ease,"); 10153 10154 return Back; 10155 10156 }, true); 10157 10158}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } 10159 10160 10161/*! 10162 * VERSION: 1.18.0 10163 * DATE: 2015-09-05 10164 * UPDATES AND DOCS AT: http://greensock.com 10165 * 10166 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved. 10167 * This work is subject to the terms at http://greensock.com/standard-license or for 10168 * Club GreenSock members, the software agreement that was issued with your membership. 10169 * 10170 * @author: Jack Doyle, [email protected] 10171 */ 10172var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 10173(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() { 10174 10175 "use strict"; 10176 10177 _gsScope._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function(TweenPlugin, TweenLite) { 10178 10179 /** @constructor **/ 10180 var CSSPlugin = function() { 10181 TweenPlugin.call(this, "css"); 10182 this._overwriteProps.length = 0; 10183 this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method) 10184 }, 10185 _globals = _gsScope._gsDefine.globals, 10186 _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called. 10187 _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance 10188 _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter 10189 _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification. 10190 _specialProps = {}, 10191 p = CSSPlugin.prototype = new TweenPlugin("css"); 10192 10193 p.constructor = CSSPlugin; 10194 CSSPlugin.version = "1.18.0"; 10195 CSSPlugin.API = 2; 10196 CSSPlugin.defaultTransformPerspective = 0; 10197 CSSPlugin.defaultSkewType = "compensated"; 10198 CSSPlugin.defaultSmoothOrigin = true; 10199 p = "px"; //we'll reuse the "p" variable to keep file size down 10200 CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""}; 10201 10202 10203 var _numExp = /(?:\d|\-\d|\.\d|\-\.\d)+/g, 10204 _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
10205 _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)" 10206 _NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and += 10207 _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g, 10208 _opacityExp = /opacity *= *([^)]*)/i, 10209 _opacityValExp = /opacity:([^;]*)/i, 10210 _alphaFilterExp = /alpha\(opacity *=.+?\)/i, 10211 _rgbhslExp = /^(rgb|hsl)/, 10212 _capsExp = /([A-Z])/g, 10213 _camelExp = /-([a-z])/gi, 10214 _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage) 10215 _camelFunc = function(s, g) { return g.toUpperCase(); }, 10216 _horizExp = /(?:Left|Right|Width)/i, 10217 _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi, 10218 _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i, 10219 _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis 10220 _DEG2RAD = Math.PI / 180, 10221 _RAD2DEG = 180 / Math.PI, 10222 _forcePT = {}, 10223 _doc = document, 10224 _createElement = function(type) { 10225 return _doc.createElementNS ? _doc.createElementNS("http://www.w3.org/1999/xhtml", type) : _doc.createElement(type); 10226 }, 10227 _tempDiv = _createElement("div"), 10228 _tempImg = _createElement("img"), 10229 _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins 10230 _agent = navigator.userAgent, 10231 _autoRound, 10232 _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance). 10233 10234 _isSafari, 10235 _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element. 10236 _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!) 10237 _ieVers, 10238 _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version. 10239 var i = _agent.indexOf("Android"), 10240 a = _createElement("a"); 10241 _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || Number(_agent.substr(i+8, 1)) > 3)); 10242 _isSafariLT6 = (_isSafari && (Number(_agent.substr(_agent.indexOf("Version/")+8, 1)) < 6)); 10243 _isFirefox = (_agent.indexOf("Firefox") !== -1); 10244 if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) { 10245 _ieVers = parseFloat( RegExp.$1 ); 10246 } 10247 if (!a) { 10248 return false; 10249 } 10250 a.style.cssText = "top:1px;opacity:.55;"; 10251 return /^0.55/.test(a.style.opacity); 10252 }()), 10253 _getIEOpacity = function(v) { 10254 return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1); 10255 }, 10256 _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE. 10257 if (window.console) { 10258 console.log(s); 10259 } 10260 }, 10261 10262 _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-" 10263 _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz". 10264 10265 // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all) 10266 _checkPropPrefix = function(p, e) { 10267 e = e || _tempDiv; 10268 var s = e.style, 10269 a, i; 10270 if (s[p] !== undefined) { 10271 return p; 10272 } 10273 p = p.charAt(0).toUpperCase() + p.substr(1); 10274 a = ["O","Moz","ms","Ms","Webkit"]; 10275 i = 5; 10276 while (--i > -1 && s[a[i]+p] === undefined) { } 10277 if (i >= 0) { 10278 _prefix = (i === 3) ? "ms" : a[i]; 10279 _prefixCSS = "-" + _prefix.toLowerCase() + "-"; 10280 return _prefix + p; 10281 } 10282 return null; 10283 }, 10284 10285 _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {}, 10286 10287 /** 10288 * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do: 10289 * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left"); 10290 * 10291 * @param {!Object} t Target element whose style property you want to query 10292 * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.) 10293 * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call. 10294 * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value. 10295 * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto". 10296 * @return {?string} The current property value 10297 */ 10298 _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) { 10299 var rv; 10300 if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here. 10301 return _getIEOpacity(t); 10302 } 10303 if (!calc && t.style[p]) { 10304 rv = t.style[p]; 10305 } else if ((cs = cs || _getComputedStyle(t))) { 10306 rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase()); 10307 } else if (t.currentStyle) { 10308 rv = t.currentStyle[p]; 10309 } 10310 return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv; 10311 }, 10312 10313 /** 10314 * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number. 10315 * @param {!Object} t Target element 10316 * @param {!string} p Property name (like "left", "top", "marginLeft", etc.) 10317 * @param {!number} v Value 10318 * @param {string=} sfx Suffix (like "px" or "%" or "em") 10319 * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect. 10320 * @return {number} value in pixels 10321 */ 10322 _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) { 10323 if (sfx === "px" || !sfx) { return v; } 10324 if (sfx === "auto" || !v) { return 0; } 10325 var horiz = _horizExp.test(p), 10326 node = t, 10327 style = _tempDiv.style, 10328 neg = (v < 0), 10329 pix, cache, time; 10330 if (neg) { 10331 v = -v; 10332 } 10333 if (sfx === "%" && p.indexOf("border") !== -1) { 10334 pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight); 10335 } else { 10336 style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;"; 10337 if (sfx === "%" || !node.appendChild || sfx.charAt(0) === "v" || sfx === "rem") { 10338 node = t.parentNode || _doc.body; 10339 cache = node._gsCache; 10340 time = TweenLite.ticker.frame; 10341 if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick) 10342 return cache.width * v / 100; 10343 } 10344 style[(horiz ? "width" : "height")] = v + sfx; 10345 } else { 10346 style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx; 10347 } 10348 node.appendChild(_tempDiv); 10349 pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]); 10350 node.removeChild(_tempDiv); 10351 if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) { 10352 cache = node._gsCache = node._gsCache || {}; 10353 cache.time = time; 10354 cache.width = pix / v * 100; 10355 } 10356 if (pix === 0 && !recurse) { 10357 pix = _convertToPixels(t, p, v, sfx, true); 10358 } 10359 } 10360 return neg ? -pix : pix; 10361 }, 10362 _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop 10363 if (_getStyle(t, "position", cs) !== "absolute") { return 0; } 10364 var dim = ((p === "left") ? "Left" : "Top"),
10365 v = _getStyle(t, "margin" + dim, cs); 10366 return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0); 10367 }, 10368 10369 // @private returns at object containing ALL of the style properties in camelCase and their associated values. 10370 _getAllStyles = function(t, cs) { 10371 var s = {}, 10372 i, tr, p; 10373 if ((cs = cs || _getComputedStyle(t, null))) { 10374 if ((i = cs.length)) { 10375 while (--i > -1) { 10376 p = cs[i]; 10377 if (p.indexOf("-transform") === -1 || _transformPropCSS === p) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here. 10378 s[p.replace(_camelExp, _camelFunc)] = cs.getPropertyValue(p); 10379 } 10380 } 10381 } else { //some browsers behave differently - cs.length is always 0, so we must do a for...in loop. 10382 for (i in cs) { 10383 if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here. 10384 s[i] = cs[i]; 10385 } 10386 } 10387 } 10388 } else if ((cs = t.currentStyle || t.style)) { 10389 for (i in cs) { 10390 if (typeof(i) === "string" && s[i] === undefined) { 10391 s[i.replace(_camelExp, _camelFunc)] = cs[i]; 10392 } 10393 } 10394 } 10395 if (!_supportsOpacity) { 10396 s.opacity = _getIEOpacity(t); 10397 } 10398 tr = _getTransform(t, cs, false); 10399 s.rotation = tr.rotation; 10400 s.skewX = tr.skewX; 10401 s.scaleX = tr.scaleX; 10402 s.scaleY = tr.scaleY; 10403 s.x = tr.x; 10404 s.y = tr.y; 10405 if (_supports3D) { 10406 s.z = tr.z; 10407 s.rotationX = tr.rotationX; 10408 s.rotationY = tr.rotationY; 10409 s.scaleZ = tr.scaleZ; 10410 } 10411 if (s.filters) { 10412 delete s.filters; 10413 } 10414 return s; 10415 }, 10416 10417 // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object c
10417ontaining only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details. 10418 _cssDif = function(t, s1, s2, vars, forceLookup) { 10419 var difs = {}, 10420 style = t.style, 10421 val, p, mpt; 10422 for (p in s2) { 10423 if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") { 10424 difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween. 10425 if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes. 10426 mpt = new MiniPropTween(style, p, style[p], mpt); 10427 } 10428 } 10429 } 10430 if (vars) { 10431 for (p in vars) { //copy properties (except className) 10432 if (p !== "className") { 10433 difs[p] = vars[p]; 10434 } 10435 } 10436 } 10437 return {difs:difs, firstMPT:mpt}; 10438 }, 10439 _dimensions = {width:["Left","Right"], height:["Top","Bottom"]}, 10440 _margins = ["marginLeft","marginRight","marginTop","marginBottom"], 10441 10442 /** 10443 * @private Gets the width or height of an element 10444 * @param {!Object} t Target element 10445 * @param {!string} p Property name ("width" or "height") 10446 * @param {Object=} cs Computed style object (if one exists). Just a speed optimization. 10447 * @return {number} Dimension (in pixels) 10448 */ 10449 _getDimension = function(t, p, cs) { 10450 var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight), 10451 a = _dimensions[p], 10452 i = a.length; 10453 cs = cs || _getComputedStyle(t, null); 10454 while (--i > -1) { 10455 v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0; 10456 v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0; 10457 } 10458 return v; 10459 }, 10460 10461 // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value) 10462 _parsePosition = function(v, recObj) { 10463 if (v === "contain" || v === "auto" || v === "auto auto") { 10464 return v + " "; 10465 } 10466 if (v == null || v === "") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto". 10467 v = "0 0"; 10468 } 10469 var a = v.split(" "), 10470 x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0], 10471 y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1]; 10472 if (y == null) { 10473 y = (x === "center") ? "50%" : "0"; 10474 } else if (y === "center") { 10475 y = "50%"; 10476 } 10477 if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it c
10477ould be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative. 10478 x = "50%"; 10479 } 10480 v = x + " " + y + ((a.length > 2) ? " " + a[2] : ""); 10481 if (recObj) { 10482 recObj.oxp = (x.indexOf("%") !== -1); 10483 recObj.oyp = (y.indexOf("%") !== -1); 10484 recObj.oxr = (x.charAt(1) === "="); 10485 recObj.oyr = (y.charAt(1) === "="); 10486 recObj.ox = parseFloat(x.replace(_NaNExp, "")); 10487 recObj.oy = parseFloat(y.replace(_NaNExp, "")); 10488 recObj.v = v; 10489 } 10490 return recObj || v; 10491 }, 10492 10493 /** 10494 * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!) 10495 * @param {(number|string)} e End value which is typically a string, but could be a number 10496 * @param {(number|string)} b Beginning value which is typically a string but could be a number 10497 * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized) 10498 */ 10499 _parseChange = function(e, b) { 10500 return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b); 10501 }, 10502 10503 /** 10504 * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function. 10505 * @param {Object} v Value to be parsed 10506 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter) 10507 * @return {number} Parsed value 10508 */ 10509 _parseVal = function(v, d) { 10510 return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v); 10511 }, 10512 10513 /** 10514 * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly. 10515 * @param {Object} v Value to be parsed 10516 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter) 10517 * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY" 10518 * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation. 10519 * @return {number} parsed angle in radians 10520 */ 10521 _parseAngle = function(v, d, p, directionalEnd) { 10522 var min = 0.000001, 10523 cap, split, dif, result, isRelative; 10524 if (v == null) { 10525 result = d; 10526 } else if (typeof(v) === "number") { 10527 result = v; 10528 } else { 10529 cap = 360; 10530 split = v.split("_"); 10531 isRelative = (v.charAt(1) === "="); 10532 dif = (isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(split[0].substr(2)) : parseFloat(split[0])) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - (isRelative ? 0 : d); 10533 if (split.length) { 10534 if (directionalEnd) { 10535 directionalEnd[p] = d + dif; 10536 } 10537 if (v.indexOf("short") !== -1) { 10538 dif = dif % cap; 10539 if (dif !== dif % (cap / 2)) { 10540 dif = (dif < 0) ? dif + cap : dif - cap; 10541 } 10542 } 10543 if (v.indexOf("_cw") !== -1 && dif < 0) { 10544 dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 10545 } else if (v.indexOf("ccw") !== -1 && dif > 0) { 10546 dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 10547 } 10548 } 10549 result = d + dif; 10550 } 10551 if (result < min && result > -min) { 10552 result = 0; 10553 } 10554 return result; 10555 }, 10556 10557 _colorLookup = {aqua:[0,255,255], 10558 lime:[0,255,0], 10559 silver:[192,192,192], 10560 black:[0,0,0], 10561 maroon:[128,0,0], 10562 teal:[0,128,128], 10563 blue:[0,0,255], 10564 navy:[0,0,128], 10565 white:[255,255,255], 10566 fuchsia:[255,0,255], 10567 olive:[128,128,0], 10568 yellow:[255,255,0], 10569 orange:[255,165,0], 10570 gray:[128,128,128], 10571 purple:[128,0,128], 10572 green:[0,128,0], 10573 red:[255,0,0], 10574 pink:[255,192,203], 10575 cyan:[0,255,255], 10576 transparent:[255,255,255,0]}, 10577 10578 _hue = function(h, m1, m2) { 10579 h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h; 10580 return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0; 10581 }, 10582 10583 /** 10584 * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if toHSL parameter is true, it will populate the array with hue, saturation, and lightness values. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers). 10585 * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc. 10586 * @param {(boolean)} toHSL If true, an hsl() or hsla() value will be returned instead of rgb() or rgba() 10587 * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order, or if the toHSL parameter was true, the array will contain hue, saturation and lightness (and optionally alpha) in that order. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and toHSL is true. 10588 */ 10589 _parseColor = CSSPlugin.parseColor = function(v, toHSL) { 10590 var a, r, g, b, h, s, l, max, min, d, wasHSL; 10591 if (!v) { 10592 a = _colorLookup.black; 10593 } else if (typeof(v) === "number") { 10594 a = [v >> 16, (v >> 8) & 255, v & 255]; 10595 } else { 10596 if (v.charAt(v.length - 1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value. 10597 v = v.substr(0, v.length - 1); 10598 } 10599 if (_colorLookup[v]) { 10600 a = _colorLookup[v]; 10601 } else if (v.charAt(0) === "#") { 10602 if (v.length === 4) { //for shorthand like #9F0 10603 r = v.charAt(1); 10604 g = v.charAt(2); 10605 b = v.charAt(3); 10606 v = "#" + r + r + g + g + b + b; 10607 } 10608 v = parseInt(v.substr(1), 16); 10609 a = [v >> 16, (v >> 8) & 255, v & 255]; 10610 } else if (v.substr(0, 3) === "hsl") { 10611 a = wasHSL = v.match(_numExp); 10612 if (!toHSL) { 10613 h = (Number(a[0]) % 360) / 360;
10614 s = Number(a[1]) / 100; 10615 l = Number(a[2]) / 100; 10616 g = (l <= 0.5) ? l * (s + 1) : l + s - l * s; 10617 r = l * 2 - g; 10618 if (a.length > 3) { 10619 a[3] = Number(v[3]); 10620 } 10621 a[0] = _hue(h + 1 / 3, r, g); 10622 a[1] = _hue(h, r, g); 10623 a[2] = _hue(h - 1 / 3, r, g); 10624 } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place. 10625 return v.match(_relNumExp); 10626 } 10627 } else { 10628 a = v.match(_numExp) || _colorLookup.transparent; 10629 } 10630 a[0] = Number(a[0]); 10631 a[1] = Number(a[1]); 10632 a[2] = Number(a[2]); 10633 if (a.length > 3) { 10634 a[3] = Number(a[3]); 10635 } 10636 } 10637 if (toHSL && !wasHSL) { 10638 r = a[0] / 255; 10639 g = a[1] / 255; 10640 b = a[2] / 255; 10641 max = Math.max(r, g, b); 10642 min = Math.min(r, g, b); 10643 l = (max + min) / 2; 10644 if (max === min) { 10645 h = s = 0; 10646 } else { 10647 d = max - min; 10648 s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 10649 h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4; 10650 h *= 60; 10651 } 10652 a[0] = (h + 0.5) | 0; 10653 a[1] = (s * 100 + 0.5) | 0; 10654 a[2] = (l * 100 + 0.5) | 0; 10655 } 10656 return a; 10657 }, 10658 _formatColors = function(s, toHSL) { 10659 var colors = s.match(_colorExp) || [], 10660 charIndex = 0, 10661 parsed = colors.length ? "" : s, 10662 i, color, temp; 10663 for (i = 0; i < colors.length; i++) { 10664 color = colors[i]; 10665 temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex); 10666 charIndex += temp.length + color.length; 10667 color = _parseColor(color, toHSL); 10668 if (color.length === 3) { 10669 color.push(1); 10670 } 10671 parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")"; 10672 } 10673 return parsed; 10674 }, 10675 _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc. 10676 10677 for (p in _colorLookup) { 10678 _colorExp += "|" + p + "\\b"; 10679 } 10680 _colorExp = new RegExp(_colorExp+")", "gi"); 10681 10682 CSSPlugin.colorStringFilter = function(a) { 10683 var combined = a[0] + a[1], 10684 toHSL; 10685 _colorExp.lastIndex = 0; 10686 if (_colorExp.test(combined)) { 10687 toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1); 10688 a[0] = _formatColors(a[0], toHSL); 10689 a[1] = _formatColors(a[1], toHSL); 10690 } 10691 }; 10692 10693 if (!TweenLite.defaultStringFilter) { 10694 TweenLite.defaultStringFilter = CSSPlugin.colorStringFilter; 10695 } 10696 10697 /** 10698 * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned. 10699 * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned. 10700 * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't. 10701 * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc. 10702 * @return {Function} formatter function 10703 */ 10704 var _getFormatter = function(dflt, clr, collapsible, multi) { 10705 if (dflt == null) { 10706 return function(v) {return v;}; 10707 } 10708 var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "", 10709 dVals = dflt.split(dColor).join("").match(_valuesExp) || [], 10710 pfx = dflt.substr(0, dflt.indexOf(dVals[0])), 10711 sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "", 10712 delim = (dflt.indexOf(" ") !== -1) ? " " : ",", 10713 numVals = dVals.length, 10714 dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "", 10715 formatter; 10716 if (!numVals) { 10717 return function(v) {return v;}; 10718 } 10719 if (clr) { 10720 formatter = function(v) { 10721 var color, vals, i, a; 10722 if (typeof(v) === "number") { 10723 v += dSfx; 10724 } else if (multi && _commasOutsideParenExp.test(v)) { 10725 a = v.replace(_commasOutsideParenExp, "|").split("|"); 10726 for (i = 0; i < a.length; i++) { 10727 a[i] = formatter(a[i]); 10728 } 10729 return a.join(","); 10730 } 10731 color = (v.match(_colorExp) || [dColor])[0]; 10732 vals = v.split(color).join("").match(_valuesExp) || []; 10733 i = vals.length; 10734 if (numVals > i--) { 10735 while (++i < numVals) { 10736 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
10737 } 10738 } 10739 return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : ""); 10740 }; 10741 return formatter; 10742 10743 } 10744 formatter = function(v) { 10745 var vals, a, i; 10746 if (typeof(v) === "number") { 10747 v += dSfx; 10748 } else if (multi && _commasOutsideParenExp.test(v)) { 10749 a = v.replace(_commasOutsideParenExp, "|").split("|"); 10750 for (i = 0; i < a.length; i++) { 10751 a[i] = formatter(a[i]); 10752 } 10753 return a.join(","); 10754 } 10755 vals = v.match(_valuesExp) || []; 10756 i = vals.length; 10757 if (numVals > i--) { 10758 while (++i < numVals) { 10759 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i]; 10760 } 10761 } 10762 return pfx + vals.join(delim) + sfx; 10763 }; 10764 return formatter; 10765 }, 10766 10767 /** 10768 * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges. 10769 * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft" 10770 * @return {Function} a formatter function 10771 */ 10772 _getEdgeParser = function(props) { 10773 props = props.split(","); 10774 return function(t, e, p, cssp, pt, plugin, vars) { 10775 var a = (e + "").split(" "), 10776 i; 10777 vars = {}; 10778 for (i = 0; i < 4; i++) { 10779 vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)]; 10780 } 10781 return cssp.parse(t, vars, pt, plugin); 10782 }; 10783 }, 10784 10785 // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color. 10786 _setPluginRatio = _internals._setPluginRatio = function(v) { 10787 this.plugin.setRatio(v); 10788 var d = this.data, 10789 proxy = d.proxy, 10790 mpt = d.firstMPT, 10791 min = 0.000001, 10792 val, pt, i, str; 10793 while (mpt) { 10794 val = proxy[mpt.v]; 10795 if (mpt.r) { 10796 val = Math.round(val); 10797 } else if (val < min && val > -min) { 10798 val = 0; 10799 } 10800 mpt.t[mpt.p] = val; 10801 mpt = mpt._next; 10802 } 10803 if (d.autoRotate) { 10804 d.autoRotate.rotation = proxy.rotation; 10805 } 10806 //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. 10807 if (v === 1) { 10808 mpt = d.firstMPT; 10809 while (mpt) { 10810 pt = mpt.t; 10811 if (!pt.type) { 10812 pt.e = pt.s + pt.xs0; 10813 } else if (pt.type === 1) { 10814 str = pt.xs0 + pt.s + pt.xs1; 10815 for (i = 1; i < pt.l; i++) { 10816 str += pt["xn"+i] + pt["xs"+(i+1)]; 10817 } 10818 pt.e = str; 10819 } 10820 mpt = mpt._next; 10821 } 10822 } 10823 }, 10824 10825 /** 10826 * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value. 10827 * @param {!Object} t target object whose property we're tweening (often a CSSPropTween) 10828 * @param {!string} p property name 10829 * @param {(number|string|object)} v value 10830 * @param {MiniPropTween=} next next MiniPropTween in the linked list 10831 * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer 10832 */ 10833 MiniPropTween = function(t, p, v, next, r) { 10834 this.t = t; 10835 this.p = p; 10836 this.v = v; 10837 this.r = r; 10838 if (next) { 10839 next._prev = this; 10840 this._next = next; 10841 } 10842 }, 10843 10844 /** 10845 * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be roun
10845ded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element. 10846 * This method returns an object that has the following properties: 10847 * - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin. This is what we feed to the external _onInitTween() as the target 10848 * - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values 10849 * - firstMPT: the first MiniPropTween in the linked list 10850 * - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter. 10851 * @param {!Object} t target object to be tweened 10852 * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed 10853 * @param {!CSSPlugin} cssp The CSSPlugin instance 10854 * @param {CSSPropTween=} pt the next CSSPropTween in the linked list 10855 * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values 10856 * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter. 10857 * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions) 10858 */ 10859 _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) { 10860 var bpt = pt, 10861 start = {}, 10862 end = {}, 10863 transform = cssp._transform, 10864 oldForce = _forcePT, 10865 i, p, xp, mpt, firstPT; 10866 cssp._transform = null; 10867 _forcePT = vars; 10868 pt = firstPT = cssp.parse(t, vars, pt, plugin); 10869 _forcePT = oldForce; 10870 //break off from the linked list so the new ones are isolated. 10871 if (shallow) { 10872 cssp._transform = transform; 10873 if (bpt) { 10874 bpt._prev = null; 10875 if (bpt._prev) { 10876 bpt._prev._next = null; 10877 } 10878 } 10879 } 10880 while (pt && pt !== bpt) { 10881 if (pt.type <= 1) { 10882 p = pt.p; 10883 end[p] = pt.s + pt.c; 10884 start[p] = pt.s; 10885 if (!shallow) { 10886 mpt = new MiniPropTween(pt, "s", p, mpt, pt.r); 10887 pt.c = 0; 10888 } 10889 if (pt.type === 1) { 10890 i = pt.l; 10891 while (--i > 0) { 10892 xp = "xn" + i; 10893 p = pt.p + "_" + xp; 10894 end[p] = pt.data[xp]; 10895 start[p] = pt[xp]; 10896 if (!shallow) { 10897 mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]); 10898 } 10899 } 10900 } 10901 } 10902 pt = pt._next; 10903 } 10904 return {proxy:start, end:end, firstMPT:mpt, pt:firstPT}; 10905 }, 10906 10907 10908 10909 /** 10910 * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory. 10911 * CSSPropTweens have the following optional properties as well (not defined through the constructor): 10912 * - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc. 10913 * - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list) 10914 * - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subt
10914weens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request. 10915 * - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target. 10916 * - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible. 10917 * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything. 10918 * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width". 10919 * @param {number} s Starting numeric value 10920 * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95. 10921 * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it. 10922 * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update. 10923 * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip" 10924 * @param {boolean=} r If true, the value(s) should be rounded 10925 * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0. 10926 * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues. 10927 * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues. 10928 */ 10929 CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) { 10930 this.t = t; //target 10931 this.p = p; //property 10932 this.s = s; //starting value 10933 this.c = c; //change value 10934 this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at) 10935 if (!(t instanceof CSSPropTween)) { 10936 _overwriteProps.push(this.n); 10937 } 10938 this.r = r; //round (boolean) 10939 this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work 10940 if (pr) { 10941 this.pr = pr; 10942 _hasPriority = true; 10943 } 10944 this.b = (b === undefined) ? s : b; 10945 this.e = (e === undefined) ? s + c : e; 10946 if (next) { 10947 this._next = next; 10948 next._prev = this; 10949 } 10950 }, 10951 10952 _addNonTweeningNumericPT = function(target, prop, start, end, next, overwriteProp) { //cleans up some code redundancies and helps minification. Just a fast way to add a NUMERIC non-tweening CSSPropTween
10953 var pt = new CSSPropTween(target, prop, start, end - start, next, -1, overwriteProp); 10954 pt.b = start; 10955 pt.e = pt.xs0 = end; 10956 return pt; 10957 }, 10958 10959 /** 10960 * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example: 10961 * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt); 10962 * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio(). 10963 * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method. 10964 * 10965 * @param {!Object} t Target whose property will be tweened 10966 * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow") 10967 * @param {string} b Beginning value 10968 * @param {string} e Ending value 10969 * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization) 10970 * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match 10971 * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this). 10972 * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0. 10973 * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300} 10974 * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here. 10975 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call. 10976 */ 10977 _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) { 10978 //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e); 10979 b = b || dflt || ""; 10980 pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e); 10981 e += ""; //ensures it's a string 10982 var ba = b.split(", ").join(",").split(" "), //beginning array 10983 ea = e.split(", ").join(",").split(" "), //ending array 10984 l = ba.length, 10985 autoRound = (_autoRound !== false), 10986 i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL; 10987 if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) { 10988 ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" "); 10989 ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" "); 10990 l = ba.length; 10991 } 10992 if (l !== ea.length) { 10993 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")"); 10994 ba = (dflt || "").split(" "); 10995 l = ba.length; 10996 } 10997 pt.plugin = plugin; 10998 pt.setRatio = setRatio; 10999 _colorExp.lastIndex = 0; 11000 for (i = 0; i < l; i++) { 11001 bv = ba[i]; 11002 ev = ea[i]; 11003 bn = parseFloat(bv); 11004 //if the value begins with a number (most common). It's fine if it has a suffix like px 11005 if (bn || bn === 0) { 11006 pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true); 11007 11008 //if the value is a color 11009 } else if (clrs && _colorExp.test(bv)) { 11010 str = ev.charAt(ev.length - 1) === "," ? ")," : ")"; //if there's a comma at the end, retain it. 11011 useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity); 11012 bv = _parseColor(bv, useHSL); 11013 ev = _parseColor(ev, useHSL); 11014 hasAlpha = (bv.length + ev.length > 6); 11015 if (hasAlpha && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color 11016 pt["xs" + pt.l] += pt.l ? " transparent" : "transparent"; 11017 pt.e = pt.e.split(ea[i]).join("transparent"); 11018 } else { 11019 if (!_supportsOpacity) { //old versions of IE don't support rgba(). 11020 hasAlpha = false; 11021 } 11022 if (useHSL) { 11023 pt.appendXtra((hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true) 11024 .appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false) 11025 .appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false); 11026 } else { 11027 pt.appendXtra((hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true) 11028 .appendXtra("", bv[1], ev[1] - bv[1], ",", true) 11029 .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), true); 11030 } 11031 11032 if (hasAlpha) { 11033 bv = (bv.length < 4) ? 1 : bv[3]; 11034 pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false); 11035 } 11036 } 11037 _colorExp.lastIndex = 0; //otherwise the test() on the RegExp could move the lastIndex and taint future results. 11038 11039 } else { 11040 bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array 11041 11042 //if no number is found, treat it as a non-tweening value and just append the string to the current xs. 11043 if (!bnums) { 11044 pt["xs" + pt.l] += pt.l ? " " + bv : bv; 11045 11046 //loop through all the numbers that are found and construct the extra values on the pt. 11047 } else { 11048 enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5 11049 if (!enums || enums.length !== bnums.length) { 11050 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")"); 11051 return pt; 11052 } 11053 ni = 0; 11054 for (xi = 0; xi < bnums.length; xi++) { 11055 cv = bnums[xi]; 11056 temp = bv.indexOf(cv, ni); 11057 pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px"), (xi === 0)); 11058 ni = temp + cv.length; 11059 } 11060 pt["xs" + pt.l] += bv.substr(ni); 11061 } 11062 } 11063 } 11064 //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly. 11065 if (e.indexOf("=") !== -1) if (pt.data) { 11066 str = pt.xs0 + pt.data.s; 11067 for (i = 1; i < pt.l; i++) { 11068 str += pt["xs" + i] + pt.data["xn" + i]; 11069 } 11070 pt.e = str + pt["xs" + i]; 11071 } 11072 if (!pt.l) { 11073 pt.type = -1; 11074 pt.xs0 = pt.e; 11075 } 11076 return pt.xfirst || pt; 11077 }, 11078 i = 9; 11079 11080 11081 p = CSSPropTween.prototype; 11082 p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc. 11083 while (--i > 0) { 11084 p["xn" + i] = 0; 11085 p["xs" + i] = ""; 11086 } 11087 p.xs0 = ""; 11088 p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null; 11089 11090 11091 /** 11092 * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this: 11093 * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)" 11094 * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method). 11095 * @param {string=} pfx Prefix (if any) 11096 * @param {!number} s Starting value 11097 * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95. 11098 * @param {string=} sfx Suffix (if any) 11099 * @param {boolean=} r Round (if true). 11100 * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space. 11101 * @return {CSSPropTween} returns itself so that multiple methods can be chained together. 11102 */ 11103 p.appendXtra = function(pfx, s, c, sfx, r, pad) { 11104 var pt = this, 11105 l = pt.l; 11106 pt["xs" + l] += (pad && l) ? " " + pfx : pfx || ""; 11107 if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value! 11108 pt["xs" + l] += s + (sfx || ""); 11109 return pt; 11110 } 11111 pt.l++; 11112 pt.type = pt.setRatio ? 2 : 1; 11113 pt["xs" + pt.l] = sfx || ""; 11114 if (l > 0) { 11115 pt.data["xn" + l] = s + c; 11116 pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method) 11117 pt["xn" + l] = s; 11118 if (!pt.plugin) { 11119 pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr); 11120 pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly. 11121 } 11122 return pt; 11123 } 11124 pt.data = {s:s + c}; 11125 pt.rxp = {}; 11126 pt.s = s; 11127 pt.c = c; 11128 pt.r = r; 11129 return pt; 11130 }; 11131 11132 /** 11133 * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly. 11134 * @param {!string} p Property name (like "boxShadow" or "throwProps") 11135 * @param {Object=}
11135 options An object containing any of the following configuration options: 11136 * - defaultValue: the default value 11137 * - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker) 11138 * - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.) 11139 * - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O) 11140 * - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc. 11141 * - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0. 11142 * - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out. 11143 * - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc. 11144 * - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default). 11145 */ 11146 var SpecialProp = function(p, options) { 11147 options = options || {}; 11148 this.p = options.prefix ? _checkPropPrefix(p) || p : p; 11149 _specialProps[p] = _specialProps[this.p] = this; 11150 this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi); 11151 if (options.parser) { 11152 this.parse = options.parser; 11153 } 11154 this.clrs = options.color; 11155 this.multi = options.multi; 11156 this.keyword = options.keyword; 11157 this.dflt = options.defaultValue; 11158 this.pr = options.priority || 0; 11159 }, 11160 11161 //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin. 11162 _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) { 11163 if (typeof(options) !== "object") { 11164 options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin 11165 } 11166 var a = p.split(","), 11167 d = options.defaultValue, 11168 i, temp; 11169 defaults = defaults || [d]; 11170 for (i = 0; i < a.length; i++) { 11171 options.prefix = (i === 0 && options.prefix); 11172 options.defaultValue = defaults[i] || d; 11173 temp = new SpecialProp(a[i], options); 11174 } 11175 }, 11176 11177 //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file. 11178 _registerPluginProp = function(p) { 11179 if (!_specialProps[p]) { 11180 var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin"; 11181 _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) { 11182 var pluginClass = _globals.com.greensock.plugins[pluginName]; 11183 if (!pluginClass) { 11184 _log("Error: " + pluginName + " js file not loaded."); 11185 return pt; 11186 } 11187 pluginClass._cssRegister(); 11188 return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars); 11189 }}); 11190 } 11191 }; 11192 11193 11194 p = SpecialProp.prototype; 11195 11196 /** 11197 * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxSh
11197adow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list) 11198 * @param {!Object} t target element 11199 * @param {(string|number|object)} b beginning value 11200 * @param {(string|number|object)} e ending (destination) value 11201 * @param {CSSPropTween=} pt next CSSPropTween in the linked list 11202 * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here. 11203 * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here. 11204 * @return {CSSPropTween=} First CSSPropTween in the linked list 11205 */ 11206 p.parseComplex = function(t, b, e, pt, plugin, setRatio) { 11207 var kwd = this.keyword, 11208 i, ba, ea, l, bi, ei; 11209 //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example) 11210 if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) { 11211 ba = b.replace(_commasOutsideParenExp, "|").split("|"); 11212 ea = e.replace(_commasOutsideParenExp, "|").split("|"); 11213 } else if (kwd) { 11214 ba = [b]; 11215 ea = [e]; 11216 } 11217 if (ea) { 11218 l = (ea.length > ba.length) ? ea.length : ba.length; 11219 for (i = 0; i < l; i++) { 11220 b = ba[i] = ba[i] || this.dflt; 11221 e = ea[i] = ea[i] || this.dflt; 11222 if (kwd) { 11223 bi = b.indexOf(kwd); 11224 ei = e.indexOf(kwd); 11225 if (bi !== ei) { 11226 if (ei === -1) { //if the keyword isn't in the end value, remove it from the beginning one. 11227 ba[i] = ba[i].split(kwd).join(""); 11228 } else if (bi === -1) { //if the keyword isn't in the beginning, add it. 11229 ba[i] += " " + kwd; 11230 } 11231 } 11232 } 11233 } 11234 b = ba.join(", "); 11235 e = ea.join(", "); 11236 } 11237 return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio); 11238 }; 11239 11240 /** 11241 * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call: 11242 * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this); 11243 * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that). 11244 * @param {!Object} t Target object whose property is being tweened 11245 * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object). 11246 * @param {!string} p Property name 11247 * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween. 11248 * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it) 11249 * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance. 11250 * @param {Object=} vars Original vars object that contains the data for parsing. 11251 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call. 11252 */ 11253 p.parse = function(t, e, p, cssp, pt, plugin, vars) { 11254 return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin); 11255 }; 11256 11257 /** 11258 * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters: 11259 * 1) Target object whose property should be tweened (typically a DOM element) 11260 * 2) The end/destination value (could be a string, number, object, or whatever you want) 11261 * 3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration) 11262 * 11263 * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example: 11264 * 11265 * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) { 11266 * var start = target.style.width;
11267 * return function(ratio) { 11268 * target.style.width = (start + value * ratio) + "px"; 11269 * console.log("set width to " + target.style.width); 11270 * } 11271 * }, 0); 11272 * 11273 * Then, when I do this tween, it will trigger my special property: 11274 * 11275 * TweenLite.to(element, 1, {css:{myCustomProp:100}}); 11276 * 11277 * In the example, of course, we're just changing the width, but you can do anything you want. 11278 * 11279 * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}}) 11280 * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function. 11281 * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones. 11282 */ 11283 CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) { 11284 _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) { 11285 var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority); 11286 rv.plugin = plugin; 11287 rv.setRatio = onInitTween(t, e, cssp._tween, p); 11288 return rv; 11289 }, priority:priority}); 11290 }; 11291 11292 11293 11294 11295 11296 11297 //transform-related methods and properties 11298 CSSPlugin.useSVGTransformAttr = _isSafari || _isFirefox; //Safari and Firefox both have some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead (users can override this). 11299 var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","), 11300 _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform. 11301 _transformPropCSS = _prefixCSS + "transform", 11302 _transformOriginProp = _checkPropPrefix("transformOrigin"), 11303 _supports3D = (_checkPropPrefix("perspective") !== null), 11304 Transform = _internals.Transform = function() { 11305 this.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0; 11306 this.force3D = (CSSPlugin.defaultForce3D === false || !_supports3D) ? false : CSSPlugin.defaultForce3D || "auto"; 11307 }, 11308 _SVGElement = window.SVGElement, 11309 _useSVGTransformAttr, 11310 //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future. 11311 11312 _createSVG = function(type, container, attributes) { 11313 var element = _doc.createElementNS("http://www.w3.org/2000/svg", type), 11314 reg = /([a-z])([A-Z])/g, 11315 p; 11316 for (p in attributes) { 11317 element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]); 11318 } 11319 container.appendChild(element); 11320 return element; 11321 }, 11322 _docElement = _doc.documentElement, 11323 _forceSVGTransformAttr = (function() { 11324 //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element 11325 var force = _ieVers || (/Android/i.test(_agent) && !window.chrome), 11326 svg, rect, width; 11327 if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway 11328 svg = _createSVG("svg", _docElement); 11329 rect = _createSVG("rect", svg, {width:100, height:50, x:100}); 11330 width = rect.getBoundingClientRect().width; 11331 rect.style[_transformOriginProp] = "50% 50%"; 11332 rect.style[_transformProp] = "scaleX(0.5)"; 11333 force = (width === rect.getBoundingClientRect().width && !(_is
11333Firefox && _supports3D)); //note: Firefox fails the test even though it does support CSS transforms in 3D. Since we can't push 3D stuff into the transform attribute, we force Firefox to pass the test here (as long as it does truly support 3D). 11334 _docElement.removeChild(svg); 11335 } 11336 return force; 11337 })(), 11338 _parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin) { 11339 var tm = e._gsTransform, 11340 m = _getMatrix(e, true), 11341 v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld; 11342 if (tm) { 11343 xOriginOld = tm.xOrigin; //record the original values before we alter them. 11344 yOriginOld = tm.yOrigin; 11345 } 11346 if (!absolute || (v = absolute.split(" ")).length < 2) { 11347 b = e.getBBox(); 11348 local = _parsePosition(local).split(" "); 11349 v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * b.width : parseFloat(local[0])) + b.x, 11350 (local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * b.height : parseFloat(local[1])) + b.y]; 11351 } 11352 decoratee.xOrigin = xOrigin = parseFloat(v[0]); 11353 decoratee.yOrigin = yOrigin = parseFloat(v[1]); 11354 if (absolute && m !== _identity2DMatrix) { //if svgOrigin is being set, we must invert the matrix and determine where the absolute point is, factoring in the current transforms. Otherwise, the svgOrigin would be based on the element's non-transformed position on the canvas. 11355 a = m[0]; 11356 b = m[1]; 11357 c = m[2]; 11358 d = m[3]; 11359 tx = m[4]; 11360 ty = m[5]; 11361 determinant = (a * d - b * c); 11362 x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + ((c * ty - d * tx) / determinant); 11363 y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - ((a * ty - b * tx) / determinant); 11364 xOrigin = decoratee.xOrigin = v[0] = x; 11365 yOrigin = decoratee.yOrigin = v[1] = y; 11366 } 11367 if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly 11368 if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) { 11369 x = xOrigin - xOriginOld; 11370 y = yOrigin - yOriginOld; 11371 //originally, we simply adjusted the x and y values, but that would cause problems if, for example, you created a rotational tween part-way through an x/y tween. Managing the offset in a separate variable gives us ultimate flexibility. 11372 //tm.x -= x - (x * m[0] + y * m[2]); 11373 //tm.y -= y - (x * m[1] + y * m[3]); 11374 tm.xOffset += (x * m[0] + y * m[2]) - x; 11375 tm.yOffset += (x * m[1] + y * m[3]) - y; 11376 } else { 11377 tm.xOffset = tm.yOffset = 0; 11378 } 11379 } 11380 e.setAttribute("data-svg-origin", v.join(" ")); 11381 }, 11382 _isSVG = function(e) { 11383 return !!(_SVGElement && typeof(e.getBBox) === "function" && e.getCTM && (!e.parentNode || (e.parentNode.getBBox && e.parentNode.getCTM))); 11384 }, 11385 _identity2DMatrix = [1,0,0,1,0,0], 11386 _getMatrix = function(e, force2D) { 11387 var tm = e._gsTransform || new Transform(), 11388 rnd = 100000, 11389 isDefault, s, m, n, dec; 11390 if (_transformProp) { 11391 s = _getStyle(e, _transformPropCSS, null, true); 11392 } else if (e.currentStyle) { 11393 //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix. 11394 s = e.currentStyle.filter.match(_ieGetMatrixExp); 11395 s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : ""; 11396 }
11397 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)"); 11398 if (tm.svg || (e.getBBox && _isSVG(e))) { 11399 if (isDefault && (e.style[_transformProp] + "").indexOf("matrix") !== -1) { //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values 11400 s = e.style[_transformProp]; 11401 isDefault = 0; 11402 } 11403 m = e.getAttribute("transform"); 11404 if (isDefault && m) { 11405 if (m.indexOf("matrix") !== -1) { //just in case there's a "transform" value specified as an attribute instead of CSS style. Accept either a matrix() or simple translate() value though. 11406 s = m; 11407 isDefault = 0; 11408 } else if (m.indexOf("translate") !== -1) { 11409 s = "matrix(1,0,0,1," + m.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",") + ")"; 11410 isDefault = 0; 11411 } 11412 } 11413 } 11414 if (isDefault) { 11415 return _identity2DMatrix; 11416 } 11417 //split the matrix values out into an array (m for matrix) 11418 m = (s || "").match(/(?:\-|\b)[\d\-\.e]+\b/gi) || []; 11419 i = m.length; 11420 while (--i > -1) { 11421 n = Number(m[i]); 11422 m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example). 11423 } 11424 return (force2D && m.length > 6) ? [m[0], m[1], m[4], m[5], m[12], m[13]] : m; 11425 }, 11426 11427 /** 11428 * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10. 11429 * @param {!Object} t target element 11430 * @param {Object=} cs computed style object (optional) 11431 * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...} 11432 * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style) 11433 * @return {object}
11433 object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...} 11434 */ 11435 _getTransform = _internals.getTransform = function(t, cs, rec, parse) { 11436 if (t._gsTransform && rec && !parse) { 11437 return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things. 11438 } 11439 var tm = rec ? t._gsTransform || new Transform() : new Transform(), 11440 invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent. 11441 min = 0.00002, 11442 rnd = 100000, 11443 zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin || 0 : 0, 11444 defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0, 11445 m, i, scaleX, scaleY, rotation, skewX; 11446 11447 tm.svg = !!(t.getBBox && _isSVG(t)); 11448 if (tm.svg) { 11449 _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, _cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin")); 11450 _useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr; 11451 } 11452 m = _getMatrix(t); 11453 if (m !== _identity2DMatrix) { 11454 11455 if (m.length === 16) { 11456 //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values) 11457 var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3], 11458 a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7], 11459 a13 = m[8], a23 = m[9], a33 = m[10], 11460 a14 = m[12], a24 = m[13], a34 = m[14], 11461 a43 = m[11], 11462 angle = Math.atan2(a32, a33), 11463 t1, t2, t3, t4, cos, sin; 11464 11465 //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari 11466 if (tm.zOrigin) { 11467 a34 = -tm.zOrigin; 11468 a14 = a13*a34-m[12]; 11469 a24 = a23*a34-m[13]; 11470 a34 = a33*a34+tm.zOrigin-m[14]; 11471 } 11472 tm.rotationX = angle * _RAD2DEG; 11473 //rotationX 11474 if (angle) { 11475 cos = Math.cos(-angle); 11476 sin = Math.sin(-angle); 11477 t1 = a12*cos+a13*sin; 11478 t2 = a22*cos+a23*sin; 11479 t3 = a32*cos+a33*sin; 11480 a13 = a12*-sin+a13*cos; 11481 a23 = a22*-sin+a23*cos; 11482 a33 = a32*-sin+a33*cos; 11483 a43 = a42*-sin+a43*cos; 11484 a12 = t1; 11485 a22 = t2; 11486 a32 = t3; 11487 } 11488 //rotationY 11489 angle = Math.atan2(a13, a33); 11490 tm.rotationY = angle * _RAD2DEG; 11491 if (angle) { 11492 cos = Math.cos(-angle); 11493 sin = Math.sin(-angle); 11494 t1 = a11*cos-a13*sin; 11495 t2 = a21*cos-a23*sin; 11496 t3 = a31*cos-a33*sin; 11497 a23 = a21*sin+a23*cos; 11498 a33 = a31*sin+a33*cos; 11499 a43 = a41*sin+a43*cos; 11500 a11 = t1; 11501 a21 = t2; 11502 a31 = t3; 11503 } 11504 //rotationZ 11505 angle = Math.atan2(a21, a11); 11506 tm.rotation = angle * _RAD2DEG; 11507 if (angle) { 11508 cos = Math.cos(-angle); 11509 sin = Math.sin(-angle); 11510 a11 = a11*cos+a12*sin; 11511 t2 = a21*cos+a22*sin; 11512 a22 = a21*-sin+a22*cos; 11513 a32 = a31*-sin+a32*cos; 11514 a21 = t2; 11515 } 11516 11517 if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here. 11518 tm.rotationX = tm.rotation = 0; 11519 tm.rotationY += 180; 11520 } 11521 11522 tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd; 11523 tm.scaleY = ((Math.sqrt(a22 * a22 + a23 * a23) * rnd + 0.5) | 0) / rnd; 11524 tm.scaleZ = ((Math.sqrt(a32 * a32 + a33 * a33) * rnd + 0.5) | 0) / rnd; 11525 tm.skewX = 0; 11526 tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0; 11527 tm.x = a14; 11528 tm.y = a24; 11529 tm.z = a34; 11530 if (tm.svg) { 11531 tm.x -= tm.xOrigin - (tm.xOrigin * a11 - tm.yOrigin * a12); 11532 tm.y -= tm.yOrigin - (tm.yOrigin * a21 - tm.xOrigin * a22); 11533 } 11534 11535 } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY)) && !(tm.x !== undefined && _getStyle(t, "display", cs) === "
11535none")) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those. 11536 var k = (m.length >= 6), 11537 a = k ? m[0] : 1, 11538 b = m[1] || 0, 11539 c = m[2] || 0, 11540 d = k ? m[3] : 1; 11541 tm.x = m[4] || 0; 11542 tm.y = m[5] || 0; 11543 scaleX = Math.sqrt(a * a + b * b); 11544 scaleY = Math.sqrt(d * d + c * c); 11545 rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist). 11546 skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0; 11547 if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) { 11548 if (invX) { 11549 scaleX *= -1; 11550 skewX += (rotation <= 0) ? 180 : -180; 11551 rotation += (rotation <= 0) ? 180 : -180; 11552 } else { 11553 scaleY *= -1; 11554 skewX += (skewX <= 0) ? 180 : -180; 11555 } 11556 } 11557 tm.scaleX = scaleX; 11558 tm.scaleY = scaleY; 11559 tm.rotation = rotation; 11560 tm.skewX = skewX; 11561 if (_supports3D) { 11562 tm.rotationX = tm.rotationY = tm.z = 0; 11563 tm.perspective = defaultTransformPerspective; 11564 tm.scaleZ = 1; 11565 } 11566 if (tm.svg) { 11567 tm.x -= tm.xOrigin - (tm.xOrigin * a + tm.yOrigin * c); 11568 tm.y -= tm.yOrigin - (tm.xOrigin * b + tm.yOrigin * d); 11569 } 11570 } 11571 tm.zOrigin = zOrigin; 11572 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate. 11573 for (i in tm) { 11574 if (tm[i] < min) if (tm[i] > -min) { 11575 tm[i] = 0; 11576 } 11577 } 11578 } 11579 //DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective+ ", origin: "+ tm.xOrigin+ ","+ tm.yOrigin); 11580 if (rec) { 11581 t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method) 11582 if (tm.svg) { //if we're supposed to apply transforms to the SVG element's "transform" attribute, make sure there aren't any CSS transforms applied or they'll override the attribute ones. Also clear the transform attribute if we're using CSS, just to be clean. 11583 if (_useSVGTransformAttr && t.style[_transformProp]) { 11584 TweenLite.delayedCall(0.001, function(){ //if we apply this right away (before anything has rendered), we risk there being no transforms for a brief moment and it also interferes with adjusting the transformOrigin in a tween with immediateRender:true (it'd try reading the matrix and it wouldn't have the appropriate data in place because we just removed it). 11585 _removeProp(t.style, _transformProp); 11586 });
11587 } else if (!_useSVGTransformAttr && t.getAttribute("transform")) { 11588 TweenLite.delayedCall(0.001, function(){ 11589 t.removeAttribute("transform"); 11590 }); 11591 } 11592 } 11593 } 11594 return tm; 11595 }, 11596 11597 //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms) 11598 _setIETransformRatio = function(v) { 11599 var t = this.data, //refers to the element's _gsTransform object 11600 ang = -t.rotation * _DEG2RAD, 11601 skew = ang + t.skewX * _DEG2RAD, 11602 rnd = 100000, 11603 a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd, 11604 b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd, 11605 c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd, 11606 d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd, 11607 style = this.t.style, 11608 cs = this.t.currentStyle, 11609 filters, val; 11610 if (!cs) { 11611 return; 11612 } 11613 val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted) 11614 b = -c; 11615 c = -val; 11616 filters = cs.filter; 11617 style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight 11618 var w = this.t.offsetWidth, 11619 h = this.t.offsetHeight, 11620 clip = (cs.position !== "absolute"), 11621 m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d, 11622 ox = t.x + (w * t.xPercent / 100), 11623 oy = t.y + (h * t.yPercent / 100), 11624 dx, dy; 11625 11626 //if transformOrigin is being used, adjust the offset x and y 11627 if (t.ox != null) { 11628 dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2; 11629 dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2; 11630 ox += dx - (dx * a + dy * b); 11631 oy += dy - (dx * c + dy * d); 11632 } 11633 11634 if (!clip) { 11635 m += ", sizingMethod='auto expand')"; 11636 } else { 11637 dx = (w / 2); 11638 dy = (h / 2); 11639 //translate to ensure that transformations occur around the correct origin (default is center). 11640 m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")"; 11641 } 11642 if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) { 11643 style.filter = filters.replace(_ieSetMatrixExp, m); 11644 } else { 11645 style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha. 11646 } 11647 11648 //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance. 11649 if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf("gradient(" && filters.indexOf("Alpha")) === -1) { 11650 style.removeAttribute("filter"); 11651 } 11652 11653 //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration). 11654 if (!clip) { 11655 var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom 11656 marg, prop, dif; 11657 dx = t.ieOffsetX || 0; 11658 dy = t.ieOffsetY || 0; 11659 t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox); 11660 t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy); 11661 for (i = 0; i < 4; i++) { 11662 prop = _margins[i]; 11663 marg = cs[prop]; 11664 //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes) 11665 val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0; 11666 if (val !== t[prop]) { 11667 dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible. 11668 } else { 11669 dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY; 11670 } 11671 style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px"; 11672 } 11673 } 11674 }, 11675 11676 /* translates a super small decimal to a string WITHOUT scientific notation 11677 _safeDecimal = function(n) { 11678 var s = (n < 0 ? -n : n) + "", 11679 a = s.split("e-"); 11680 return (n < 0 ? "-0." : "0.") + new Array(parseInt(a[1], 10) || 0).join("0") + a[0].split(".").join(""); 11681 }, 11682 */ 11683 11684 _setTransformRatio = _internals.set3DTransformRatio = _internals.setTransformRatio = function(v) { 11685 var t = this.data, //refers to the element's _gsTransform object 11686 style = this.t.style, 11687 angle = t.rotation, 11688 rotationX = t.rotationX, 11689 rotationY = t.rotationY, 11690 sx = t.scaleX, 11691 sy = t.scaleY, 11692 sz = t.scaleZ, 11693 x = t.x, 11694 y = t.y, 11695 z = t.z, 11696 isSVG = t.svg, 11697 perspective = t.perspective, 11698 force3D = t.force3D, 11699 a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43, 11700 zOrigin, min, cos, sin, t1, t2, transform, comma, zero, skew, rnd; 11701 //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true) 11702 if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween. 11703 11704 //2D 11705 if (angle || t.skewX || isSVG) { 11706 angle *= _DEG2RAD; 11707 skew = t.skewX * _DEG2RAD; 11708 rnd = 100000; 11709 a11 = Math.cos(angle) * sx; 11710 a21 = Math.sin(angle) * sx; 11711 a12 = Math.sin(angle - skew) * -sy;
11712 a22 = Math.cos(angle - skew) * sy; 11713 if (skew && t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does 11714 t1 = Math.tan(skew); 11715 t1 = Math.sqrt(1 + t1 * t1); 11716 a12 *= t1; 11717 a22 *= t1; 11718 if (t.skewY) { 11719 a11 *= t1; 11720 a21 *= t1; 11721 } 11722 } 11723 if (isSVG) { 11724 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset; 11725 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset; 11726 if (_useSVGTransformAttr && (t.xPercent || t.yPercent)) { //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the matrix to simulate it. 11727 min = this.t.getBBox(); 11728 x += t.xPercent * 0.01 * min.width; 11729 y += t.yPercent * 0.01 * min.height; 11730 } 11731 min = 0.000001; 11732 if (x < min) if (x > -min) { 11733 x = 0; 11734 } 11735 if (y < min) if (y > -min) { 11736 y = 0; 11737 } 11738 } 11739 transform = (((a11 * rnd) | 0) / rnd) + "," + (((a21 * rnd) | 0) / rnd) + "," + (((a12 * rnd) | 0) / rnd) + "," + (((a22 * rnd) | 0) / rnd) + "," + x + "," + y + ")"; 11740 if (isSVG && _useSVGTransformAttr) {
11741 this.t.setAttribute("transform", "matrix(" + transform); 11742 } else { 11743 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places. 11744 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + transform; 11745 } 11746 } else { 11747 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")"; 11748 } 11749 return; 11750 11751 } 11752 if (_isFirefox) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue. 11753 min = 0.0001; 11754 if (sx < min && sx > -min) { 11755 sx = sz = 0.00002; 11756 } 11757 if (sy < min && sy > -min) { 11758 sy = sz = 0.00002; 11759 } 11760 if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z). 11761 perspective = 0; 11762 } 11763 } 11764 if (angle || t.skewX) { 11765 angle *= _DEG2RAD; 11766 cos = a11 = Math.cos(angle); 11767 sin = a21 = Math.sin(angle); 11768 if (t.skewX) { 11769 angle -= t.skewX * _DEG2RAD; 11770 cos = Math.cos(angle); 11771 sin = Math.sin(angle); 11772 if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does 11773 t1 = Math.tan(t.skewX * _DEG2RAD); 11774 t1 = Math.sqrt(1 + t1 * t1); 11775 cos *= t1; 11776 sin *= t1; 11777 if (t.skewY) { 11778 a11 *= t1; 11779 a21 *= t1; 11780 } 11781 } 11782 } 11783 a12 = -sin; 11784 a22 = cos; 11785 11786 } else if (!rotationY && !rotationX && sz === 1 && !perspective && !isSVG) { //if we're only translating and/or 2D scaling, this is faster... 11787 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : ""); 11788 return; 11789 } else { 11790 a11 = a22 = 1; 11791 a12 = a21 = 0; 11792 } 11793 // KEY INDEX AFFECTS 11794 // a11 0 rotation, rotationY, scaleX 11795 // a21 1 rotation, rotationY, scaleX 11796 // a31 2 rotationY, scaleX 11797 // a41 3 rotationY, scaleX 11798 // a12 4 rotation, skewX, rotationX, scaleY 11799 // a22 5 rotation, skewX, rotationX, scaleY 11800 // a32 6 rotationX, scaleY 11801 // a42 7 rotationX, scaleY 11802 // a13 8 rotationY, rotationX, scaleZ 11803 // a23 9 rotationY, rotationX, scaleZ 11804 // a33 10 rotationY, rotationX, scaleZ 11805 // a43 11 rotationY, rotationX, perspective, scaleZ 11806 // a14 12 x, zOrigin, svgOrigin 11807 // a24 13 y, zOrigin, svgOrigin 11808 // a34 14 z, zOrigin 11809 // a44 15 11810 // rotation: Math.atan2(a21, a11) 11811 // rotationY: Math.atan2(a13, a33) (or Math.atan2(a13, a11)) 11812 // rotationX: Math.atan2(a32, a33) 11813 a33 = 1; 11814 a13 = a23 = a31 = a32 = a41 = a42 = 0; 11815 a43 = (perspective) ? -1 / perspective : 0; 11816 zOrigin = t.zOrigin; 11817 min = 0.000001; //threshold below which browsers use scientific notation which won't work. 11818 comma = ","; 11819 zero = "0"; 11820 angle = rotationY * _DEG2RAD; 11821 if (angle) { 11822 cos = Math.cos(angle); 11823 sin = Math.sin(angle); 11824 a31 = -sin; 11825 a41 = a43*-sin; 11826 a13 = a11*sin; 11827 a23 = a21*sin; 11828 a33 = cos; 11829 a43 *= cos; 11830 a11 *= cos; 11831 a21 *= cos; 11832 } 11833 angle = rotationX * _DEG2RAD; 11834 if (angle) { 11835 cos = Math.cos(angle); 11836 sin = Math.sin(angle); 11837 t1 = a12*cos+a13*sin; 11838 t2 = a22*cos+a23*sin; 11839 a32 = a33*sin; 11840 a42 = a43*sin; 11841 a13 = a12*-sin+a13*cos; 11842 a23 = a22*-sin+a23*cos; 11843 a33 = a33*cos; 11844 a43 = a43*cos; 11845 a12 = t1; 11846 a22 = t2; 11847 } 11848 if (sz !== 1) { 11849 a13*=sz; 11850 a23*=sz; 11851 a33*=sz; 11852 a43*=sz; 11853 } 11854 if (sy !== 1) { 11855 a12*=sy; 11856 a22*=sy; 11857 a32*=sy; 11858 a42*=sy; 11859 } 11860 if (sx !== 1) { 11861 a11*=sx; 11862 a21*=sx; 11863 a31*=sx; 11864 a41*=sx; 11865 } 11866 11867 if (zOrigin || isSVG) { 11868 if (zOrigin) { 11869 x += a13*-zOrigin; 11870 y += a23*-zOrigin; 11871 z += a33*-zOrigin+zOrigin; 11872 } 11873 if (isSVG) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually 11874 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset; 11875 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset; 11876 } 11877 if (x < min && x > -min) { 11878 x = zero; 11879 } 11880 if (y < min && y > -min) { 11881 y = zero; 11882 } 11883 if (z < min && z > -min) { 11884 z = 0; //don't use string because we calculate perspective later and need the number. 11885 } 11886 } 11887 11888 //optimized way of concatenating all the values into a string. If we do it all in one shot, it's slower because of the way browsers have to create temp strings and the way it affects memory. If we do it piece-by-piece with +=, it's a bit slower too. We found that doing it in these sized chunks works best overall: 11889 transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d("); 11890 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31); 11891 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22); 11892 if (rotationX || rotationY) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations) 11893 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13); 11894 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma; 11895 } else { 11896 transform += ",0,0,0,0,1,0,"; 11897 } 11898 transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")"; 11899 11900 style[_transformProp] = transform; 11901 }; 11902 11903 p = Transform.prototype; 11904 p.x = p.y = p.z = p.skewX = p.skewY = p.rotation = p.rotationX = p.rotationY = p.zOrigin = p.xPercent = p.yPercent = p.xOffset = p.yOffset = 0; 11905 p.scaleX = p.scaleY = p.scaleZ = 1; 11906 11907 _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {parser:function(t, e, p, cssp, pt, plugin, vars) { 11908 if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it. 11909 cssp._lastParsedTransform = vars; 11910 var originalGSTransform = t._gsTransform, 11911 style = t.style, 11912 min = 0.000001, 11913 i = _transformProps.length, 11914 v = vars, 11915 endRotations = {}, 11916 transformOriginString = "transformOrigin", 11917 m1, m2, skewY, copy, orig, has3D, hasChange, dr, x, y; 11918 if (vars.display) { //if the user is setting display during this tween, it may not be instantiated yet but we must force it here in order to get accurate readings. If display is "none", some browsers refuse to report the transform properties correctly. 11919 copy = _getStyle(t, "display"); 11920 style.display = "block"; 11921 m1 = _getTransform(t, _cs, true, vars.parseTransform); 11922 style.display = copy; 11923 } else { 11924 m1 = _getTransform(t, _cs, true, vars.parseTransform); 11925 } 11926 cssp._transform = m1; 11927 if (typeof(v.transform) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)" 11928 copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly. 11929 copy[_transformProp] = v.transform; 11930 copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly. 11931 copy.position = "absolute"; 11932 _doc.body.appendChild(_tempDiv); 11933 m2 = _getTransform(_tempDiv, null, false); 11934 _doc.body.removeChild(_tempDiv); 11935 if (!m2.perspective) { 11936 m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case. 11937 } 11938 if (v.xPercent != null) { 11939 m2.xPercent = _parseVal(v.xPercent, m1.xPercent); 11940 } 11941 if (v.yPercent != null) { 11942 m2.yPercent = _parseVal(v.yPercent, m1.yPercent); 11943 } 11944 } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object) 11945 m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX), 11946 scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY), 11947 scaleZ:_parseVal(v.scaleZ, m1.scaleZ), 11948 x:_parseVal(v.x, m1.x), 11949 y:_parseVal(v.y, m1.y), 11950 z:_parseVal(v.z, m1.z), 11951 xPercent:_parseVal(v.xPercent, m1.xPercent), 11952 yPercent:_parseVal(v.yPercent, m1.yPercent), 11953 perspective:_parseVal(v.transformPerspective, m1.perspective)}; 11954 dr = v.directionalRotation; 11955 if (dr != null) { 11956 if (typeof(dr) === "object") { 11957 for (copy in dr) { 11958 v[copy] = dr[copy]; 11959 } 11960 } else { 11961 v.rotation = dr; 11962 } 11963 } 11964 if (typeof(v.x) === "string" && v.x.indexOf("%") !== -1) { 11965 m2.x = 0; 11966 m2.xPercent = _parseVal(v.x, m1.xPercent); 11967 } 11968 if (typeof(v.y) === "string" && v.y.indexOf("%") !== -1) { 11969 m2.y = 0; 11970 m2.yPercent = _parseVal(v.y, m1.yPercent); 11971 } 11972 11973 m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations); 11974 if (_supports3D) { 11975 m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations); 11976 m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations); 11977 }
11978 m2.skewX = (v.skewX == null) ? m1.skewX : _parseAngle(v.skewX, m1.skewX); 11979 11980 //note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees. 11981 m2.skewY = (v.skewY == null) ? m1.skewY : _parseAngle(v.skewY, m1.skewY); 11982 if ((skewY = m2.skewY - m1.skewY)) { 11983 m2.skewX += skewY; 11984 m2.rotation += skewY; 11985 } 11986 } 11987 if (_supports3D && v.force3D != null) { 11988 m1.force3D = v.force3D; 11989 hasChange = true; 11990 } 11991 11992 m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType; 11993 11994 has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective); 11995 if (!has3D && v.scale != null) { 11996 m2.scaleZ = 1; //no need to tween scaleZ. 11997 } 11998 11999 while (--i > -1) { 12000 p = _transformProps[i]; 12001 orig = m2[p] - m1[p]; 12002 if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) { 12003 hasChange = true; 12004 pt = new CSSPropTween(m1, p, m1[p], orig, pt); 12005 if (p in endRotations) { 12006 pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested 12007 } 12008 pt.xs0 = 0; //ensures the value stays numeric in setRatio() 12009 pt.plugin = plugin; 12010 cssp._overwriteProps.push(pt.n); 12011 } 12012 } 12013 12014 orig = v.transformOrigin; 12015 if (m1.svg && (orig || v.svgOrigin)) { 12016 x = m1.xOffset; //when we change the origin, in order to prevent things from jumping we adjust the x/y so we must record those here so that we can create PropTweens for them and flip them at the same time as the origin 12017 y = m1.yOffset; 12018 _parseSVGOrigin(t, _parsePosition(orig), m2, v.svgOrigin, v.smoothOrigin); 12019 pt = _addNonTweeningNumericPT(m1, "xOrigin", (originalGSTransform ? m1 : m2).xOrigin, m2.xOrigin, pt, transformOriginString); //note: if there wasn't a transformOrigin defined yet, just start with the destination one; it's wasteful otherwise, and it causes problems with fromTo() tweens. For example, TweenLite.to("#wheel", 3, {rotation:180, transformOrigin:"50% 50%", delay:1}); TweenLite.fromTo("#wheel", 3, {scale:0.5, transformOrigin:"50% 50%"}, {scale:1, delay:2}); would cause a jump when the from values revert at the beginning of the 2nd tween. 12020 pt = _addNonTweeningNumericPT(m1, "yOrigin", (originalGSTransform ? m1 : m2).yOrigin, m2.yOrigin, pt, transformOriginString); 12021 if (x !== m1.xOffset || y !== m1.yOffset) { 12022 pt = _addNonTweeningNumericPT(m1, "xOffset", (originalGSTransform ? x : m1.xOffset), m1.xOffset, pt, transformOriginString); 12023 pt = _addNonTweeningNumericPT(m1, "yOffset", (originalGSTransform ? y : m1.yOffset), m1.yOffset, pt, transformOriginString); 12024 } 12025 orig = _useSVGTransformAttr ? null : "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin 12026 } 12027 if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly). 12028 if (_transformProp) { 12029 hasChange = true; 12030 p = _transformOriginProp; 12031 orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors 12032 pt = new CSSPropTween(style, p, 0, 0, pt, -1, transformOriginString); 12033 pt.b = style[p]; 12034 pt.plugin = plugin; 12035 if (_supports3D) { 12036 copy = m1.zOrigin; 12037 orig = orig.split(" "); 12038 m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method. 12039 pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)! 12040 pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here) 12041 pt.b = copy; 12042 pt.xs0 = pt.e = m1.zOrigin; 12043 } else { 12044 pt.xs0 = pt.e = orig; 12045 } 12046 12047 //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp). 12048 } else { 12049 _parsePosition(orig + "", m1); 12050 } 12051 } 12052 if (hasChange) { 12053 cssp._transformType = (!(m1.svg && _useSVGTransformAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms(); 12054 } 12055 return pt; 12056 }, prefix:true}); 12057 12058 _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"}); 12059 12060 _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) { 12061 e = this.format(e); 12062 var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"], 12063 style = t.style, 12064 ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em; 12065 w = parseFloat(t.offsetWidth);
12066 h = parseFloat(t.offsetHeight); 12067 ea1 = e.split(" "); 12068 for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis! 12069 if (this.p.indexOf("border")) { //older browsers used a prefix 12070 props[i] = _checkPropPrefix(props[i]); 12071 } 12072 bs = bs2 = _getStyle(t, props[i], _cs, false, "0px"); 12073 if (bs.indexOf(" ") !== -1) { 12074 bs2 = bs.split(" "); 12075 bs = bs2[0]; 12076 bs2 = bs2[1]; 12077 } 12078 es = es2 = ea1[i]; 12079 bn = parseFloat(bs); 12080 bsfx = bs.substr((bn + "").length); 12081 rel = (es.charAt(1) === "="); 12082 if (rel) { 12083 en = parseInt(es.charAt(0)+"1", 10); 12084 es = es.substr(2); 12085 en *= parseFloat(es); 12086 esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || ""; 12087 } else { 12088 en = parseFloat(es); 12089 esfx = es.substr((en + "").length); 12090 } 12091 if (esfx === "") { 12092 esfx = _suffixMap[p] || bsfx; 12093 } 12094 if (esfx !== bsfx) { 12095 hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent. 12096 vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number 12097 if (esfx === "%") { 12098 bs = (hn / w * 100) + "%"; 12099 bs2 = (vn / h * 100) + "%"; 12100 } else if (esfx === "em") { 12101 em = _convertToPixels(t, "borderLeft", 1, "em"); 12102 bs = (hn / em) + "em"; 12103 bs2 = (vn / em) + "em"; 12104 } else { 12105 bs = hn + "px"; 12106 bs2 = vn + "px"; 12107 } 12108 if (rel) { 12109 es = (parseFloat(bs) + en) + esfx; 12110 es2 = (parseFloat(bs2) + en) + esfx; 12111 } 12112 } 12113 pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt); 12114 } 12115 return pt; 12116 }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)}); 12117 _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) { 12118 var bp = "background-position", 12119 cs = (_cs || _getComputedStyle(t, null)), 12120 bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase 12121 es = this.format(e), 12122 ba, ea, i, pct, overlap, src; 12123 if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1)) { 12124 src = _getStyle(t, "backgroundImage").replace(_urlExp, ""); 12125 if (src && src !== "none") { 12126 ba = bs.split(" "); 12127 ea = es.split(" "); 12128 _tempImg.setAttribute("src", src); //set the temp IMG's src to the background-image so that we can measure its width/height 12129 i = 2; 12130 while (--i > -1) { 12131 bs = ba[i]; 12132 pct = (bs.indexOf("%") !== -1); 12133 if (pct !== (ea[i].indexOf("%") !== -1)) { 12134 overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height; 12135 ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%"; 12136 } 12137 } 12138 bs = ba.join(" "); 12139 } 12140 } 12141 return this.parseComplex(t.style, bs, es, pt, plugin); 12142 }, formatter:_parsePosition}); 12143 _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:_parsePosition}); 12144 _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true}); 12145 _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true}); 12146 _registerComplexSpecialProp("transformStyle", {prefix:true}); 12147 _registerComplexSpecialProp("backfaceVisibility", {prefix:true}); 12148 _registerComplexSpecialProp("userSelect", {prefix:true}); 12149 _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")}); 12150 _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")}); 12151 _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){ 12152 var b, cs, delim; 12153 if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited. 12154 cs = t.currentStyle; 12155 delim = _ieVers < 8 ? " " : ","; 12156 b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")"; 12157 e = this.format(e).split(",").join(delim); 12158 } else { 12159 b = this.format(_getStyle(t, this.p, _cs, false, this.dflt)); 12160 e = this.format(e); 12161 } 12162 return this.parseComplex(t.style, b, e, pt, plugin); 12163 }}); 12164 _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true}); 12165 _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them) 12166 _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) { 12167 return this.parseComplex(t.style, this.format(_getStyle(t, "borderTopWidth", _cs, false, "0px") + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), this.format(e), pt, plugin); 12168 }, color:true, formatter:function(v) { 12169 var a = v.split(" "); 12170 return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0]; 12171 }}); 12172 _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline). 12173 _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) { 12174 var s = t.style, 12175 prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat"; 12176 return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e); 12177 }}); 12178 12179 //opacity-related 12180 var _setIEOpacityRatio = function(v) { 12181 var t = this.t, //refers to the element's style property 12182 filters = t.filter || _getStyle(this.data, "filter") || "", 12183 val = (this.s + this.c * v) | 0, 12184 skip; 12185 if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters. 12186 if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) { 12187 t.removeAttribute("filter"); 12188 skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check. 12189 } else {
12190 t.filter = filters.replace(_alphaFilterExp, ""); 12191 skip = true; 12192 } 12193 } 12194 if (!skip) { 12195 if (this.xn1) { 12196 t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame. 12197 } 12198 if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues 12199 if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween) 12200 t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly. 12201 } 12202 } else { 12203 t.filter = filters.replace(_opacityExp, "opacity=" + val); 12204 } 12205 } 12206 }; 12207 _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) { 12208 var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")), 12209 style = t.style, 12210 isAutoAlpha = (p === "autoAlpha"); 12211 if (typeof(e) === "string" && e.charAt(1) === "=") { 12212 e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b; 12213 } 12214 if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience) 12215 b = 0; 12216 } 12217 if (_supportsOpacity) { 12218 pt = new CSSPropTween(style, "opacity", b, e - b, pt); 12219 } else { 12220 pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt); 12221 pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug. 12222 style.zoom = 1; //helps correct an IE issue. 12223 pt.type = 2; 12224 pt.b = "alpha(opacity=" + pt.s + ")"; 12225 pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")"; 12226 pt.data = t; 12227 pt.plugin = plugin; 12228 pt.setRatio = _setIEOpacityRatio; 12229 } 12230 if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier 12231 pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit")); 12232 pt.xs0 = "inherit"; 12233 cssp._overwriteProps.push(pt.n); 12234 cssp._overwriteProps.push(p); 12235 } 12236 return pt; 12237 }}); 12238 12239 12240 var _removeProp = function(s, p) { 12241 if (p) { 12242 if (s.removeProperty) { 12243 if (p.substr(0,2) === "ms" || p.substr(0,6) === "webkit") { //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example) 12244 p = "-" + p; 12245 } 12246 s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase()); 12247 } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()" 12248 s.removeAttribute(p); 12249 } 12250 } 12251 }, 12252 _setClassNameRatio = function(v) { 12253 this.t._gsClassPT = this; 12254 if (v === 1 || v === 0) { 12255 this.t.setAttribute("class", (v === 0) ? this.b : this.e); 12256 var mpt = this.data, //first MiniPropTween 12257 s = this.t.style; 12258 while (mpt) { 12259 if (!mpt.v) { 12260 _removeProp(s, mpt.p); 12261 } else { 12262 s[mpt.p] = mpt.v; 12263 } 12264 mpt = mpt._next; 12265 } 12266 if (v === 1 && this.t._gsClassPT === this) { 12267 this.t._gsClassPT = null; 12268 } 12269 } else if (this.t.getAttribute("class") !== this.e) { 12270 this.t.setAttribute("class", this.e); 12271 } 12272 }; 12273 _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) { 12274 var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable. 12275 cssText = t.style.cssText, 12276 difData, bs, cnpt, cnptLookup, mpt; 12277 pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2); 12278 pt.setRatio = _setClassNameRatio; 12279 pt.pr = -11; 12280 _hasPriority = true; 12281 pt.b = b; 12282 bs = _getAllStyles(t, _cs); 12283 //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfer
12283ing that were there just for class-specific values) 12284 cnpt = t._gsClassPT; 12285 if (cnpt) { 12286 cnptLookup = {}; 12287 mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned. 12288 while (mpt) { 12289 cnptLookup[mpt.p] = 1; 12290 mpt = mpt._next; 12291 } 12292 cnpt.setRatio(1); 12293 } 12294 t._gsClassPT = pt; 12295 pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("\\s*\\b" + e.substr(2) + "\\b"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : ""); 12296 t.setAttribute("class", pt.e); 12297 difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup); 12298 t.setAttribute("class", b); 12299 pt.data = difData.firstMPT; 12300 t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity). 12301 pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself) 12302 return pt; 12303 }}); 12304 12305 12306 var _setClearPropsRatio = function(v) { 12307 if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in). 12308 var s = this.t.style, 12309 transformParse = _specialProps.transform.parse, 12310 a, p, i, clearTransform, transform; 12311 if (this.e === "all") { 12312 s.cssText = ""; 12313 clearTransform = true; 12314 } else { 12315 a = this.e.split(" ").join("").split(","); 12316 i = a.length; 12317 while (--i > -1) { 12318 p = a[i]; 12319 if (_specialProps[p]) { 12320 if (_specialProps[p].parse === transformParse) { 12321 clearTransform = true; 12322 } else { 12323 p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow" 12324 } 12325 } 12326 _removeProp(s, p); 12327 } 12328 } 12329 if (clearTransform) { 12330 _removeProp(s, _transformProp); 12331 transform = this.t._gsTransform; 12332 if (transform) { 12333 if (transform.svg) { 12334 this.t.removeAttribute("data-svg-origin"); 12335 } 12336 delete this.t._gsTransform; 12337 } 12338 } 12339 12340 } 12341 }; 12342 _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) { 12343 pt = new CSSPropTween(t, p, 0, 0, pt, 2); 12344 pt.setRatio = _setClearPropsRatio; 12345 pt.e = e; 12346 pt.pr = -10; 12347 pt.data = cssp._tween; 12348 _hasPriority = true; 12349 return pt; 12350 }}); 12351 12352 p = "bezier,throwProps,physicsProps,physics2D".split(","); 12353 i = p.length; 12354 while (i--) { 12355 _registerPluginProp(p[i]); 12356 } 12357 12358 12359 12360 12361 12362 12363 12364 12365 p = CSSPlugin.prototype; 12366 p._firstPT = p._lastParsedTransform = p._transform = null; 12367 12368 //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc. 12369 p._onInitTween = function(target, vars, tween) { 12370 if (!target.nodeType) { //css is only for dom elements 12371 return false; 12372 } 12373 this._target = target; 12374 this._tween = tween; 12375 this._vars = vars; 12376 _autoRound = vars.autoRound; 12377 _hasPriority = false; 12378 _suffixMap = vars.suffixMap || CSSPlugin.suffixMap; 12379 _cs = _getComputedStyle(target, ""); 12380 _overwriteProps = this._overwriteProps; 12381 var style = target.style, 12382 v, pt, pt2, first, last, next, zIndex, tpt, threeD; 12383 if (_reqSafariFix) if (style.zIndex === "") {
12384 v = _getStyle(target, "zIndex", _cs); 12385 if (v === "auto" || v === "") { 12386 //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive. 12387 this._addLazySet(style, "zIndex", 0); 12388 } 12389 } 12390 12391 if (typeof(vars) === "string") { 12392 first = style.cssText; 12393 v = _getAllStyles(target, _cs); 12394 style.cssText = first + ";" + vars; 12395 v = _cssDif(target, v, _getAllStyles(target)).difs; 12396 if (!_supportsOpacity && _opacityValExp.test(vars)) { 12397 v.opacity = parseFloat( RegExp.$1 ); 12398 } 12399 vars = v; 12400 style.cssText = first; 12401 } 12402 12403 if (vars.className) { //className tweens will combine any differences they find in the css with the vars that are passed in, so {className:"myClass", scale:0.5, left:20} would work. 12404 this._firstPT = pt = _specialProps.className.parse(target, vars.className, "className", this, null, null, vars); 12405 } else { 12406 this._firstPT = pt = this.parse(target, vars, null); 12407 } 12408 12409 if (this._transformType) { 12410 threeD = (this._transformType === 3); 12411 if (!_transformProp) { 12412 style.zoom = 1; //helps correct an IE issue. 12413 } else if (_isSafari) { 12414 _reqSafariFix = true; 12415 //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random). 12416 if (style.zIndex === "") { 12417 zIndex = _getStyle(target, "zIndex", _cs); 12418 if (zIndex === "auto" || zIndex === "") { 12419 this._addLazySet(style, "zIndex", 0); 12420 } 12421 } 12422 //Setting WebkitBackfaceVisibility corrects 3 bugs: 12423 // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update. 12424 // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. 12425 // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug. 12426 //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween. 12427 if (_isSafariLT6) { 12428 this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden")); 12429 } 12430 } 12431 pt2 = pt; 12432 while (pt2 && pt2._next) { 12433 pt2 = pt2._next; 12434 } 12435 tpt = new CSSPropTween(target, "transform", 0, 0, null, 2); 12436 this._linkCSSP(tpt, null, pt2); 12437 tpt.setRatio = _transformProp ? _setTransformRatio : _setIETransformRatio; 12438 tpt.data = this._transform || _getTransform(target, _cs, true); 12439 tpt.tween = tween; 12440 tpt.pr = -1; //ensures that the transforms get applied after the components are updated. 12441 _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here. 12442 } 12443 12444 if (_hasPriority) { 12445 //reorders the linked list in order of pr (priority) 12446 while (pt) { 12447 next = pt._next; 12448 pt2 = first; 12449 while (pt2 && pt2.pr > pt.pr) { 12450 pt2 = pt2._next; 12451 } 12452 if ((pt._prev = pt2 ? pt2._prev : last)) { 12453 pt._prev._next = pt; 12454 } else { 12455 first = pt; 12456 } 12457 if ((pt._next = pt2)) { 12458 pt2._prev = pt; 12459 } else { 12460 last = pt; 12461 } 12462 pt = next; 12463 } 12464 this._firstPT = first; 12465 } 12466 return true; 12467 }; 12468 12469 12470 p.parse = function(target, vars, pt, plugin) { 12471 var style = target.style, 12472 p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel; 12473 for (p in vars) { 12474 es = vars[p]; //ending value string 12475 sp = _specialProps[p]; //SpecialProp lookup. 12476 if (sp) { 12477 pt = sp.parse(target, es, p, this, pt, plugin, vars); 12478 12479 } else { 12480 bs = _getStyle(target, p, _cs) + ""; 12481 isStr = (typeof(es) === "string"); 12482 if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor: 12483 if (!isStr) { 12484 es = _parseColor(es); 12485 es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")"; 12486 } 12487 pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin); 12488 12489 } else if (isStr && (es.indexOf(" ") !== -1 || es.indexOf(",") !== -1)) { 12490 pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin); 12491 12492 } else { 12493 bn = parseFloat(bs); 12494 bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case. 12495 12496 if (bs === "" || bs === "auto") { 12497 if (p === "width" || p === "height") { 12498 bn = _getDimension(target, p, _cs); 12499 bsfx = "px"; 12500 } else if (p === "left" || p === "top") {
12501 bn = _calculateOffset(target, p, _cs); 12502 bsfx = "px"; 12503 } else { 12504 bn = (p !== "opacity") ? 0 : 1; 12505 bsfx = ""; 12506 } 12507 } 12508 12509 rel = (isStr && es.charAt(1) === "="); 12510 if (rel) { 12511 en = parseInt(es.charAt(0) + "1", 10); 12512 es = es.substr(2); 12513 en *= parseFloat(es); 12514 esfx = es.replace(_suffixExp, ""); 12515 } else { 12516 en = parseFloat(es); 12517 esfx = isStr ? es.replace(_suffixExp, "") : ""; 12518 } 12519 12520 if (esfx === "") { 12521 esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix. 12522 } 12523 12524 es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix. 12525 12526 //if the beginning/ending suffixes don't match, normalize them... 12527 if (bsfx !== esfx) if (esfx !== "") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units! 12528 bn = _convertToPixels(target, p, bn, bsfx); 12529 if (esfx === "%") { 12530 bn /= _convertToPixels(target, p, 100, "%") / 100; 12531 if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens. 12532 bs = bn + "%"; 12533 } 12534 12535 } else if (esfx === "em" || esfx === "rem") { 12536 bn /= _convertToPixels(target, p, 1, esfx); 12537 12538 //otherwise convert to pixels. 12539 } else if (esfx !== "px") { 12540 en = _convertToPixels(target, p, en, esfx); 12541 esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too. 12542 } 12543 if (rel) if (en || en === 0) { 12544 es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here. 12545 } 12546 } 12547 12548 if (rel) { 12549 en += bn; 12550 } 12551 12552 if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly. 12553 pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es); 12554 pt.xs0 = esfx; 12555 //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0); 12556 } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) { 12557 _log("invalid " + p + " tween value: " + vars[p]); 12558 } else { 12559 pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es); 12560 pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween. 12561 //DEBUG: _log("non-tweening value "+p+": "+pt.xs0); 12562 } 12563 } 12564 } 12565 if (plugin) if (pt && !pt.plugin) { 12566 pt.plugin = plugin; 12567 } 12568 } 12569 return pt; 12570 }; 12571 12572 12573 //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1. 12574 p.setRatio = function(v) { 12575 var pt = this._firstPT, 12576 min = 0.000001, 12577 val, str, i; 12578 //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards). 12579 if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) { 12580 while (pt) { 12581 if (pt.type !== 2) { 12582 if (pt.r && pt.type !== -1) { 12583 val = Math.round(pt.s + pt.c); 12584 if (!pt.type) { 12585 pt.t[pt.p] = val + pt.xs0; 12586 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)" 12587 i = pt.l; 12588 str = pt.xs0 + val + pt.xs1; 12589 for (i = 1; i < pt.l; i++) {
12590 str += pt["xn"+i] + pt["xs"+(i+1)]; 12591 } 12592 pt.t[pt.p] = str; 12593 } 12594 } else { 12595 pt.t[pt.p] = pt.e; 12596 } 12597 } else { 12598 pt.setRatio(v); 12599 } 12600 pt = pt._next; 12601 } 12602 12603 } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) { 12604 while (pt) { 12605 val = pt.c * v + pt.s; 12606 if (pt.r) { 12607 val = Math.round(val); 12608 } else if (val < min) if (val > -min) { 12609 val = 0; 12610 } 12611 if (!pt.type) { 12612 pt.t[pt.p] = val + pt.xs0; 12613 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)" 12614 i = pt.l; 12615 if (i === 2) { 12616 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2; 12617 } else if (i === 3) { 12618 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3; 12619 } else if (i === 4) { 12620 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4; 12621 } else if (i === 5) { 12622 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5; 12623 } else { 12624 str = pt.xs0 + val + pt.xs1; 12625 for (i = 1; i < pt.l; i++) { 12626 str += pt["xn"+i] + pt["xs"+(i+1)]; 12627 } 12628 pt.t[pt.p] = str; 12629 } 12630 12631 } else if (pt.type === -1) { //non-tweening value 12632 pt.t[pt.p] = pt.xs0; 12633 12634 } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc. 12635 pt.setRatio(v); 12636 } 12637 pt = pt._next; 12638 } 12639 12640 //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever). 12641 } else { 12642 while (pt) { 12643 if (pt.type !== 2) { 12644 pt.t[pt.p] = pt.b; 12645 } else { 12646 pt.setRatio(v); 12647 } 12648 pt = pt._next; 12649 } 12650 } 12651 }; 12652 12653 /** 12654 * @private 12655 * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called. 12656 * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked 12657 * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call 12658 * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin 12659 * doesn't have any transform-related properties of its own. You can call this method as many times as you 12660 * want and it won't create duplicate CSSPropTweens. 12661 * 12662 * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster) 12663 */ 12664 p._enableTransforms = function(threeD) { 12665 this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values. 12666 this._transformType = (!(this._transform.svg && _useSVGTransformAttr) && (threeD || this._transformType === 3)) ? 3 : 2; 12667 }; 12668 12669 var lazySet = function(v) { 12670 this.t[this.p] = this.e; 12671 this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop. 12672 }; 12673 /** @private Gives us a way to set a value on the first render (and only the first render). **/ 12674 p._addLazySet = function(t, p, v) { 12675 var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2); 12676 pt.e = v; 12677 pt.setRatio = lazySet; 12678 pt.data = this; 12679 }; 12680 12681 /** @private **/ 12682 p._linkCSSP = function(pt, next, prev, remove) { 12683 if (pt) { 12684 if (next) { 12685 next._prev = pt; 12686 } 12687 if (pt._next) { 12688 pt._next._prev = pt._prev; 12689 } 12690 if (pt._prev) { 12691 pt._prev._next = pt._next; 12692 } else if (this._firstPT === pt) { 12693 this._firstPT = pt._next; 12694 remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed) 12695 } 12696 if (prev) { 12697 prev._next = pt; 12698 } else if (!remove && this._firstPT === null) { 12699 this._firstPT = pt; 12700 } 12701 pt._next = next; 12702 pt._prev = prev; 12703 } 12704 return pt; 12705 }; 12706 12707 //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property. 12708 p._kill = function(lookup) { 12709 var copy = lookup, 12710 pt, p, xfirst; 12711 if (lookup.autoAlpha || lookup.alpha) { 12712 copy = {}; 12713 for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere. 12714 copy[p] = lookup[p]; 12715 } 12716 copy.opacity = 1; 12717 if (copy.autoAlpha) { 12718 copy.visibility = 1; 12719 } 12720 } 12721 if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst". 12722 xfirst = pt.xfirst; 12723 if (xfirst && xfirst._prev) { 12724 this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev 12725 } else if (xfirst === this._firstPT) { 12726 this._firstPT = pt._next; 12727 } 12728 if (pt._next) { 12729 this._linkCSSP(pt._next, pt._next._next, xfirst._prev); 12730 } 12731 this._classNamePT = null; 12732 } 12733 return TweenPlugin.prototype._kill.call(this, copy); 12734 }; 12735 12736 12737 12738 //used by cascadeTo() for gathering all the style properties of each child element into an array for c
12738omparison. 12739 var _getChildStyles = function(e, props, targets) { 12740 var children, i, child, type; 12741 if (e.slice) { 12742 i = e.length; 12743 while (--i > -1) { 12744 _getChildStyles(e[i], props, targets); 12745 } 12746 return; 12747 } 12748 children = e.childNodes; 12749 i = children.length; 12750 while (--i > -1) { 12751 child = children[i]; 12752 type = child.type; 12753 if (child.style) { 12754 props.push(_getAllStyles(child)); 12755 if (targets) { 12756 targets.push(child); 12757 } 12758 } 12759 if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) { 12760 _getChildStyles(child, props, targets); 12761 } 12762 } 12763 }; 12764 12765 /** 12766 * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite 12767 * and then compares the style properties of all the target's child elements at the tween's start and end, and 12768 * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting 12769 * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is 12770 * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens 12771 * is because it creates entirely new tweens that may have completely different targets than the original tween, 12772 * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API 12773 * and it would create other problems. For example: 12774 * - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted) 12775 * - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others. 12776 * - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed. 12777 * 12778 * @param {Object} target object to be tweened 12779 * @param {number} Duration in seconds (or frames for frames-based tweens) 12780 * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone} 12781 * @return {Array} An array of TweenLite instances 12782 */ 12783 CSSPlugin.cascadeTo = function(target, duration, vars) { 12784 var tween = TweenLite.to(target, duration, vars), 12785 results = [tween], 12786 b = [], 12787 e = [], 12788 targets = [], 12789 _reservedProps = TweenLite._internals.reservedProps, 12790 i, difs, p, from; 12791 target = tween._targets || tween.target; 12792 _getChildStyles(target, b, targets); 12793 tween.render(duration, true, true); 12794 _getChildStyles(target, e); 12795 tween.render(0, true, true); 12796 tween._enabled(true); 12797 i = targets.length; 12798 while (--i > -1) { 12799 difs = _cssDif(targets[i], b[i], e[i]); 12800 if (difs.firstMPT) { 12801 difs = difs.difs;
12802 for (p in vars) { 12803 if (_reservedProps[p]) { 12804 difs[p] = vars[p]; 12805 } 12806 } 12807 from = {}; 12808 for (p in difs) { 12809 from[p] = b[i][p]; 12810 } 12811 results.push(TweenLite.fromTo(targets[i], duration, from, difs)); 12812 } 12813 } 12814 return results; 12815 }; 12816 12817 TweenPlugin.activate([CSSPlugin]); 12818 return CSSPlugin; 12819 12820 }, true); 12821 12822}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } 12823 12824//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) 12825(function(name) { 12826 "use strict"; 12827 var getGlobal = function() { 12828 return (_gsScope.GreenSockGlobals || _gsScope)[name]; 12829 }; 12830 if (typeof(define) === "function" && define.amd) { //AMD 12831 define(["TweenLite"], getGlobal); 12832 } else if (typeof(module) !== "undefined" && module.exports) { //node 12833 require("../TweenLite.js"); 12834 module.exports = getGlobal(); 12835 } 12836}("CSSPlugin")); 12837 12838 12839 12840/*! 12841 * VERSION: beta 0.3.4 12842 * DATE: 2015-08-15 12843 * UPDATES AND DOCS AT: http://greensock.com 12844 * 12845 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved. 12846 * SplitText is a Club GreenSock membership benefit; You must have a valid membership to use 12847 * this code without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details. 12848 * This work is subject to the software agreement that was issued with your membership. 12849 * 12850 * @author: Jack Doyle, [email protected] 12851 */ 12852var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node 12853(function(window) { 12854 12855 "use strict"; 12856 var _globals = window.GreenSockGlobals || window, 12857 _namespace = function(ns) { 12858 var a = ns.split("."), 12859 p = _globals, i; 12860 for (i = 0; i < a.length; i++) { 12861 p[a[i]] = p = p[a[i]] || {}; 12862 } 12863 return p; 12864 }, 12865 pkg = _namespace("com.greensock.utils"), 12866 _getText = function(e) { 12867 var type = e.nodeType, 12868 result = ""; 12869 if (type === 1 || type === 9 || type === 11) { 12870 if (typeof(e.textContent) === "string") { 12871 return e.textContent; 12872 } else { 12873 for ( e = e.firstChild; e; e = e.nextSibling ) { 12874 result += _getText(e); 12875 } 12876 } 12877 } else if (type === 3 || type === 4) { 12878 return e.nodeValue; 12879 } 12880 return result; 12881 }, 12882 _doc = document, 12883 _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {}, 12884 _capsExp = /([A-Z])/g, 12885 _getStyle = function(t, p, cs, str) { 12886 var result; 12887 if ((cs = cs || _getComputedStyle(t, null))) { 12888 t = cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase()); 12889 result = (t || cs.length) ? t : cs[p]; //Opera behaves VERY strangely - length is usually 0 and cs[p] is the only way to get accurate results EXCEPT when checking for -o-transform which only works with cs.getPropertyValue()! 12890 } else if (t.currentStyle) { 12891 cs = t.currentStyle; 12892 result = cs[p]; 12893 } 12894 return str ? result : parseInt(result, 10) || 0; 12895 }, 12896 _isArrayLike = function(e) { 12897 return (e.length && e[0] && ((e[0].nodeType && e[0].style && !e.nodeType) || (e[0].length && e[0][0]))) ? true : false; //could be an array of jQuery objects too, so accommodate that. 12898 }, 12899 _flattenArray = function(a) { 12900 var result = [], 12901 l = a.length, 12902 i, e, j; 12903 for (i = 0; i < l; i++) { 12904 e = a[i]; 12905 if (_isArrayLike(e)) { 12906 j = e.length; 12907 for (j = 0; j < e.length; j++) { 12908 result.push(e[j]); 12909 } 12910 } else { 12911 result.push(e); 12912 } 12913 } 12914 return result; 12915 }, 12916 _brSwap = ")eefec303079ad17405c", 12917 _brExp = /(?:<br>|<br\/>|<br \/>)/gi, 12918 _isOldIE = (_doc.all && !_doc.addEventListener), 12919 _divStart = "<div style='position:relative;display:inline-block;" + (_isOldIE ? "*display:inline;*zoom:1;'" : "'"), //note: we must use both display:inline-block and *display:inline for IE8 and earlier, otherwise it won't flow correctly (and if we only use display:inline, IE won't render most of the property tweens - very odd). 12920 _cssClassFunc = function(cssClass) { 12921 cssClass = cssClass || ""; 12922 var iterate = (cssClass.indexOf("++") !== -1), 12923 num = 1; 12924 if (iterate) { 12925 cssClass = cssClass.split("++").join(""); 12926 } 12927 return function() { 12928 return _divStart + (cssClass ? " class='" + cssClass + (iterate ? num++ : "") + "'>" : ">"); 12929 }; 12930 }, 12931 SplitText = pkg.SplitText = _globals.SplitText = function(element, vars) { 12932 if (typeof(element) === "string") { 12933 element = SplitText.selector(element); 12934 } 12935 if (!element) { 12936 throw("cannot split a null element."); 12937 } 12938 this.elements = _isArrayLike(element) ? _flattenArray(element) : [element]; 12939 this.chars = []; 12940 this.words = []; 12941 this.lines = []; 12942 this._originals = []; 12943 this.vars = vars || {}; 12944 this.split(vars); 12945 }, 12946 _swapText = function(element, oldText, newText) { 12947 var type = element.nodeType; 12948 if (type === 1 || type === 9 || type === 11) { 12949 for ( element = element.firstChild; element; element = element.nextSibling ) { 12950 _swapText(element, oldText, newText); 12951 } 12952 } else if (type === 3 || type === 4) { 12953 element.nodeValue = element.nodeValue.split(oldText).join(newText); 12954 } 12955 }, 12956 _pushReversed = function(a, merge) { 12957 var i = merge.length; 12958 while (--i > -1) { 12959 a.push(merge[i]); 12960 } 12961 }, 12962 _split = function(element, vars, allChars, allWords, allLines) { 12963 if (_brExp.test(element.innerHTML)) { 12964 element.innerHTML = element.innerHTML.replace(_brExp, _brSwap); //swap in a unique string for <br/> tags so that we can identify it when we loop through later, and replace it appropriately 12965 } 12966 var text = _getText(element), 12967 types = vars.type || vars.split || "chars,words,lines", 12968 lines = (types.indexOf("lines") !== -1) ? [] : null, 12969 words = (types.indexOf("words") !== -1), 12970 chars = (types.indexOf("chars") !== -1), 12971 absolute = (vars.position === "absolute" || vars.absolute === true), 12972 space = absolute ? "­ " : " ", 12973 lineOffsetY = -999, 12974 cs = _getComputedStyle(element), 12975 paddingLeft = _getStyle(element, "paddingLeft", cs), 12976 borderTopAndBottom = _getStyle(element, "borderBottomWidth", cs) + _get
12976Style(element, "borderTopWidth", cs), 12977 borderLeftAndRight = _getStyle(element, "borderLeftWidth", cs) + _getStyle(element, "borderRightWidth", cs), 12978 padTopAndBottom = _getStyle(element, "paddingTop", cs) + _getStyle(element, "paddingBottom", cs), 12979 padLeftAndRight = _getStyle(element, "paddingLeft", cs) + _getStyle(element, "paddingRight", cs), 12980 textAlign = _getStyle(element, "textAlign", cs, true), 12981 origHeight = element.clientHeight, 12982 origWidth = element.clientWidth, 12983 wordEnd = "</div>", 12984 wordStart = _cssClassFunc(vars.wordsClass), 12985 charStart = _cssClassFunc(vars.charsClass), 12986 iterateLine = ((vars.linesClass || "").indexOf("++") !== -1), 12987 linesClass = vars.linesClass, 12988 hasTagStart = text.indexOf("<") !== -1, 12989 wordIsOpen = true, 12990 charArray = [], 12991 wordArray = [], 12992 lineArray = [], 12993 l, curLine, isChild, splitText, i, j, character, nodes, node, offset, lineNode, style, lineWidth, addWordSpaces; 12994 12995 if (iterateLine) { 12996 linesClass = linesClass.split("++").join(""); 12997 } 12998 if (hasTagStart) { 12999 text = text.split("<").join("{{LT}}"); //we can't leave "<" in the string, or when we set the innerHTML, it can be interpreted as 13000 } 13001 l = text.length; 13002 13003 splitText = wordStart(); 13004 for (i = 0; i < l; i++) { 13005 character = text.charAt(i); 13006 if (character === ")" && text.substr(i, 20) === _brSwap) { 13007 splitText += (wordIsOpen ? wordEnd : "") + "<BR/>"; 13008 wordIsOpen = false; 13009 if (i !== l - 20 && text.substr(i+20, 20) !== _brSwap) { 13010 splitText += " " + wordStart(); 13011 wordIsOpen = true; 13012 } 13013 i += 19; 13014 13015 } else if (character === " " && text.charAt(i-1) !== " " && i !== l-1 && text.substr(i-20, 20) !== _brSwap) { 13016 splitText += wordIsOpen ? wordEnd : ""; 13017 wordIsOpen = false; 13018 while (text.charAt(i + 1) === " ") { //skip over empty spaces (to avoid making them words) 13019 splitText += space; 13020 i++; 13021 } 13022 if (text.charAt(i + 1) !== ")" || text.substr(i + 1, 20) !== _brSwap) { 13023 splitText += space + wordStart(); 13024 wordIsOpen = true; 13025 } 13026 13027 } else if (character === "{" && text.substr(i, 6) === "{{LT}}") { 13028 splitText += chars ? charStart() + "{{LT}}" + "</div>" : "{{LT}}"; 13029 i += 5; 13030 } else { 13031 splitText += (chars && character !== " ") ? charStart() + character + "</div>" : character; 13032 } 13033 } 13034 element.innerHTML = splitText + (wordIsOpen ? wordEnd : ""); 13035 13036 if (hasTagStart) { 13037 _swapText(element, "{{LT}}", "<"); 13038 } 13039 //copy all the descendant nodes into an array (we can't use a regular nodeList because it's live and we may need to renest things) 13040 j = element.getElementsByTagName("*"); 13041 l = j.length; 13042 nodes = []; 13043 for (i = 0; i < l; i++) { 13044 nodes[i] = j[i]; 13045 } 13046 13047 //for absolute positioning, we need to record the x/y offsets and width/height for every <div>. And even if we're not positioning things absolutely, in order to accommodate lines, we must figure out where the y offset changes so that we can sense where the lines break, and we populate the lines array. 13048 if (lines || absolute) { 13049 for (i = 0; i < l; i++) { 13050 node = nodes[i]; 13051 isChild = (node.parentNode === element); 13052 if (isChild || absolute || (chars && !words)) { 13053 offset = node.offsetTop; 13054 if (lines && isChild && offset !== lineOffsetY && node.nodeName !== "BR") { 13055 curLine = []; 13056 lines.push(curLine); 13057 lineOffsetY = offset; 13058 } 13059 if (absolute) { //record offset x and y, as well as width and height so that we can access them later for positioning. Grabbing them at once ensures we don't trigger a browser paint & we maximize performance. 13060 node._x = node.offsetLeft; 13061 node._y = offset; 13062 node._w = node.offsetWidth; 13063 node._h = node.offsetHeight; 13064 } 13065 if (lines) { 13066 if (words === isChild || !chars) { 13067 curLine.push(node); 13068 node._x -= paddingLeft; 13069 } 13070 if (isChild && i) { 13071 nodes[i-1]._wordEnd = true; 13072 } 13073 if (node.nodeName === "BR" && node.nextSibling && node.nextSibling.nodeName === "BR") { //two consecutive <br> tags signify a new [empty] line. 13074 lines.push([]); 13075 } 13076 } 13077 } 13078 } 13079 } 13080 13081 for (i = 0; i < l; i++) { 13082 node = nodes[i];
13083 isChild = (node.parentNode === element); 13084 if (node.nodeName === "BR") { 13085 if (lines || absolute) { 13086 element.removeChild(node); 13087 nodes.splice(i--, 1); 13088 l--; 13089 } else if (!words) { 13090 element.appendChild(node); 13091 } 13092 continue; 13093 } 13094 13095 if (absolute) { 13096 style = node.style; 13097 if (!words && !isChild) { 13098 node._x += node.parentNode._x; 13099 node._y += node.parentNode._y; 13100 } 13101 style.left = node._x + "px"; 13102 style.top = node._y + "px"; 13103 style.position = "absolute"; 13104 style.display = "block"; 13105 //if we don't set the width/height, things collapse in older versions of IE and the origin for transforms is thrown off in all browsers. 13106 style.width = (node._w + 1) + "px"; //IE is 1px short sometimes. Avoid wrapping 13107 style.height = node._h + "px"; 13108 } 13109 13110 if (!words) { 13111 //we always start out wrapping words in their own <div> so that line breaks happen correctly, but here we'll remove those <div> tags if necessary and renest the characters directly into the element rather than inside the word <div> 13112 if (isChild) { 13113 element.removeChild(node); 13114 nodes.splice(i--, 1); 13115 l--; 13116 } else if (!isChild && chars) { 13117 offset = (!lines && !absolute && node.nextSibling); //if this is the last letter in the word (and we're not breaking by lines and not positioning things absolutely), we need to add a space afterwards so that the characters don't just mash together 13118 element.appendChild(node); 13119 if (!offset) { 13120 element.appendChild(_doc.createTextNode(" ")); 13121 } 13122 charArray.push(node); //TODO: push() 13123 } 13124 } else if (isChild && node.innerHTML !== "") { 13125 wordArray.push(node); //TODO: push() 13126 } else if (chars) { 13127 charArray.push(node); //TODO: push() 13128 } 13129 } 13130 13131 if (lines) { 13132 //the next 7 lines just give us the line width in the most reliable way and figure out the left offset (if position isn't relative or absolute). We must set the width along with text-align to ensure everything works properly for various alignments. 13133 if (absolute) { 13134 lineNode = _doc.createElement("div"); 13135 element.appendChild(lineNode); 13136 lineWidth = lineNode.offsetWidth + "px"; 13137 offset = (lineNode.offsetParent === element) ? 0 : element.offsetLeft; 13138 element.removeChild(lineNode); 13139 } 13140 style = element.style.cssText; 13141 element.style.cssText = "display:none;"; //to improve performance, set display:none on the element so that the browser doesn't have to worry about reflowing or rendering while we're renesting things. We'll revert the cssText later. 13142 //we can't use element.innerHTML = "" because that causes IE to literally delete all the nodes and their content even though we've stored them in an array! So we must loop through the children and remove them. 13143 while (element.firstChild) { 13144 element.removeChild(element.firstChild); 13145 } 13146 addWordSpaces = (!absolute || (!words && !chars)); 13147 for (i = 0; i < lines.length; i++) { 13148 curLine = lines[i]; 13149 lineNode = _doc.createElement("div"); 13150 lineNode.style.cssText = "display:block;text-align:" + textAlign + ";position:" + (absolute ? "absolute;" : "relative;"); 13151 if (linesClass) { 13152 lineNode.className = linesClass + (iterateLine ? i+1 : ""); 13153 } 13154 lineArray.push(lineNode); //TODO: push() 13155 l = curLine.length; 13156 for (j = 0; j < l; j++) { 13157 if (curLine[j].nodeName !== "BR") { 13158 node = curLine[j]; 13159 lineNode.appendChild(node); 13160 if (addWordSpaces && (node._wordEnd || words)) { 13161 lineNode.appendChild(_doc.createTextNode(" ")); 13162 } 13163 if (absolute) { 13164 if (j === 0) { 13165 lineNode.style.top = node._y + "px"; 13166 lineNode.style.left = (paddingLeft + offset) + "px"; 13167 } 13168 node.style.top = "0px"; 13169 if (offset) { 13170 node.style.left = (node._x - offset) + "px"; 13171 } 13172 } 13173 } 13174 } 13175 if (l === 0) { //if there are no nodes in the line (typically meaning there were tw
13175o consecutive <br> tags, just add a non-breaking space so that things display properly. 13176 lineNode.innerHTML = " "; 13177 } 13178 if (!words && !chars) { 13179 lineNode.innerHTML = _getText(lineNode).split(String.fromCharCode(160)).join(" "); 13180 } 13181 if (absolute) { 13182 lineNode.style.width = lineWidth; 13183 lineNode.style.height = node._h + "px"; 13184 } 13185 element.appendChild(lineNode); 13186 } 13187 element.style.cssText = style; 13188 } 13189 13190 //if everything shifts to being position:absolute, the container can collapse in terms of height or width, so fix that here. 13191 if (absolute) { 13192 if (origHeight > element.clientHeight) { 13193 element.style.height = (origHeight - padTopAndBottom) + "px"; 13194 if (element.clientHeight < origHeight) { //IE8 and earlier use a different box model - we must include padding and borders 13195 element.style.height = (origHeight + borderTopAndBottom)+ "px"; 13196 } 13197 } 13198 if (origWidth > element.clientWidth) { 13199 element.style.width = (origWidth - padLeftAndRight) + "px"; 13200 if (element.clientWidth < origWidth) { //IE8 and earlier use a different box model - we must include padding and borders 13201 element.style.width = (origWidth + borderLeftAndRight)+ "px"; 13202 } 13203 } 13204 } 13205 _pushReversed(allChars, charArray); 13206 _pushReversed(allWords, wordArray); 13207 _pushReversed(allLines, lineArray); 13208 }, 13209 p = SplitText.prototype; 13210 13211 p.split = function(vars) { 13212 if (this.isSplit) { 13213 this.revert(); 13214 } 13215 this.vars = vars || this.vars; 13216 this._originals.length = this.chars.length = this.words.length = this.lines.length = 0; 13217 var i = this.elements.length; 13218 //we split in reversed order so that if/when we position:absolute elements, they don't affect the position of the ones after them in the document flow (shifting them up as they're taken out of the document flow). 13219 while (--i > -1) { 13220 this._originals[i] = this.elements[i].innerHTML; 13221 _split(this.elements[i], this.vars, this.chars, this.words, this.lines); 13222 } 13223 this.chars.reverse(); 13224 this.words.reverse(); 13225 this.lines.reverse(); 13226 this.isSplit = true; 13227 return this; 13228 }; 13229 13230 p.revert = function() { 13231 if (!this._originals) { 13232 throw("revert() call wasn't scoped properly."); 13233 } 13234 var i = this._originals.length; 13235 while (--i > -1) { 13236 this.elements[i].innerHTML = this._originals[i]; 13237 } 13238 this.chars = []; 13239 this.words = []; 13240 this.lines = []; 13241 this.isSplit = false; 13242 return this; 13243 }; 13244 13245 SplitText.selector = window.$ || window.jQuery || function(e) { 13246 var selector = window.$ || window.jQuery; 13247 if (selector) { 13248 SplitText.selector = selector; 13249 return selector(e); 13250 } 13251 return (typeof(document) === "undefined") ? e : (document.querySelectorAll ? document.querySelectorAll(e) : document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e)); 13252 }; 13253 SplitText.version = "0.3.4"; 13254 13255})(_gsScope); 13256 13257//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) 13258(function(name) { 13259 "use strict"; 13260 var getGlobal = function() { 13261 return (_gsScope.GreenSockGlobals || _gsScope)[name]; 13262 }; 13263 if (typeof(define) === "function" && define.amd) { //AMD 13264 define(["TweenLite"], getGlobal); 13265 } else if (typeof(module) !== "undefined" && module.exports) { //node 13266 module.exports = getGlobal(); 13267 } 13268}("SplitText")); 13269 13270 13271// Sandboxing Greensock 13272try{ 13273 window.GreenSockGlobals = null; 13274 window._gsQueue = null; 13275 window._gsDefine = null; 13276 13277 delete(window.GreenSockGlobals); 13278 delete(window._gsQueue); 13279 delete(window._gsDefine); 13280 } catch(e) {} 13281 13282try{ 13283 window.GreenSockGlobals = oldgs; 13284 window._gsQueue = oldgs_queue; 13285 } catch(e) {} 13286 13287if (window.tplogs==true) 13288 try { 13289 console.groupEnd(); 13290 } catch(e) {} 13291 13292 13293;(function (factory) { 13294 if (typeof define === 'function' && define.amd) { 13295 // AMD. Register as an anonymous module. 13296 define(['jquery'], factory); 13297 } else if (typeof exports === 'object') { 13298 // CommonJS / nodejs module 13299 module.exports = factory(require('jquery')); 13300 } else { 13301 // Browser globals 13302 factory(jQuery); 13303 } 13304}(function ($) { 13305 // Namespace all events. 13306 var eventNamespace = 'waitForImages'; 13307 13308 // CSS properties which contain references to images. 13309 $.waitForImages = { 13310 hasImageProperties: [ 13311 'backgroundImage', 13312 'listStyleImage', 13313 'borderImage', 13314 'borderCornerImage', 13315 'cursor' 13316 ], 13317 hasImageAttributes: ['srcset'] 13318 }; 13319 13320 // Custom selector to find all `img` elements with a valid `src` attribute. 13321 $.expr[':']['has-src'] = function (obj) { 13322 // Ensure we are dealing with an `img` element with a valid 13323 // `src` attribute. 13324 return $(obj).is('img[src][src!=""]'); 13325 }; 13326 13327 // Custom selector to find images which are not already cached by the 13328 // browser. 13329 $.expr[':'].uncached = function (obj) { 13330 // Ensure we are dealing with an `img` element with a valid 13331 // `src` attribute. 13332 if (!$(obj).is(':has-src')) { 13333 return false; 13334 } 13335 13336 return !obj.complete; 13337 }; 13338 13339 $.fn.waitForImages = function () { 13340 13341 var allImgsLength = 0; 13342 var allImgsLoaded = 0; 13343 var deferred = $.Deferred(); 13344 13345 var finishedCallback; 13346 var eachCallback; 13347 var waitForAll; 13348 13349 // Handle options object (if passed). 13350 if ($.isPlainObject(arguments[0])) { 13351 13352 waitForAll = arguments[0].waitForAll; 13353 eachCallback = arguments[0].each; 13354 finishedCallback = arguments[0].finished; 13355 13356 } else { 13357 13358 // Handle if using deferred object and only one param was passed in. 13359 if (arguments.length === 1 && $.type(arguments[0]) === 'boolean') { 13360 waitForAll = arguments[0]; 13361 } else { 13362 finishedCallback = arguments[0]; 13363 eachCallback = arguments[1]; 13364 waitForAll = arguments[2]; 13365 } 13366 13367 } 13368 13369 // Handle missing callbacks. 13370 finishedCallback = finishedCallback || $.noop; 13371 eachCallback = eachCallback || $.noop; 13372 13373 // Convert waitForAll to Boolean 13374 waitForAll = !! waitForAll; 13375 13376 // Ensure callbacks are functions. 13377 if (!$.isFunction(finishedCallback) || !$.isFunction(eachCallback)) { 13378 throw new TypeError('An invalid callback was supplied.'); 13379 } 13380 13381 this.each(function () { 13382 // Build a list of all imgs, dependent on what images will 13383 // be considered. 13384 var obj = $(this); 13385 var allImgs = []; 13386 // CSS properties which may contain an image. 13387 var hasImgProperties = $.waitForImages.hasImageProperties || []; 13388 // Element attributes which may contain an image. 13389 var hasImageAttributes = $.waitForImages.hasImageAttributes || []; 13390 // To match `url()` references. 13391 // Spec: http://www.w3.org/TR/CSS2/syndata.html#value-def-uri 13392 var matchUrl = /url\(\s*(['"]?)(.*?)\1\s*\)/g; 13393 13394 if (waitForAll) { 13395 13396 // Get all elements (including the original), as any one of 13397 // them could have a background image. 13398 obj.find('*').addBack().each(function () { 13399 var element = $(this); 13400 13401 // If an `img` element, add it. But keep iterating in 13402 // case it has a background image too. 13403 if (element.is('img:has-src')) { 13404 allImgs.push({ 13405 src: element.attr('src'), 13406 element: element[0] 13407 }); 13408 } 13409 13410 $.each(hasImgProperties, function (i, property) { 13411 var propertyValue = element.css(property); 13412 var match; 13413 13414 // If it doesn't contain this property, skip. 13415 if (!propertyValue) { 13416 return true; 13417 } 13418 13419 // Get all url() of this element. 13420 while (match = matchUrl.exec(propertyValue)) { 13421 allImgs.push({ 13422 src: match[2], 13423 element: element[0] 13424 }); 13425 } 13426 }); 13427 13428 $.each(hasImageAttributes, function (i, attribute) { 13429 var attributeValue = element.attr(attribute); 13430 var attributeValues; 13431 13432 // If it doesn't contain this property, skip. 13433 if (!attributeValue) { 13434 return true; 13435 } 13436 13437 // Check for multiple comma separated images 13438 attributeValues = attributeValue.split(','); 13439 13440 $.each(attributeValues, function(i, value) { 13441 // Trim value and get string before first 13442 // whitespace (for use with srcset). 13443 value = $.trim(value).split(' ')[0]; 13444 allImgs.push({ 13445 src: value, 13446 element: element[0] 13447 }); 13448 }); 13449 }); 13450 }); 13451 } else { 13452 // For images only, the task is simpler. 13453 obj.find('img:has-src') 13454 .each(function () { 13455 allImgs.push({ 13456 src: this.src, 13457 element: this 13458 }); 13459 }); 13460 } 13461 13462 allImgsLength = allImgs.length; 13463 allImgsLoaded = 0; 13464 13465 // If no images found, don't bother. 13466 if (allImgsLength === 0) { 13467 finishedCallback.call(obj[0]); 13468 deferred.resolveWith(obj[0]); 13469 } 13470 13471 $.each(allImgs, function (i, img) { 13472 13473 var image = new Image(); 13474 var events = 13475 'load.' + eventNamespace + ' error.' + eventNamespace; 13476 13477 // Handle the image loading and error with the same callback. 13478 $(image).one(events, function me (event) { 13479 // If an error occurred with loading the image, set the 13480 // third argument accordingly. 13481 var eachArguments = [ 13482 allImgsLoaded, 13483 allImgsLength, 13484 event.type == 'load' 13485 ]; 13486 allImgsLoaded++; 13487 13488 eachCallback.apply(img.element, eachArguments); 13489 deferred.notifyWith(img.element, eachArguments); 13490 13491 // Unbind the event listeners. I use this in addition to 13492 // `one` as one of those events won't be called (either 13493 // 'load' or 'error' will be called). 13494 $(this).off(events, me); 13495 13496 if (allImgsLoaded == allImgsLength) { 13497 finishedCallback.call(obj[0]); 13498 deferred.resolveWith(obj[0]); 13499 return false; 13500 } 13501 13502 }); 13503 13504 image.src = img.src; 13505 }); 13506 }); 13507 13508 return deferred.promise(); 13509 13510 }; 13511})); 13512 13513; 13514/************************************************************************** 13515 * jquery.themepunch.revolution.js - jQuery Plugin for Revolution Slider 13516 * @version: 5.2.5.3 (30.05.2016) 13517 * @requires jQuery v1.7 or later (tested on 1.9) 13518 * @author ThemePunch 13519**************************************************************************/ 13520(function(jQuery,undefined){ 13521 "use strict"; 13522 13523 jQuery.fn.extend({ 13524 13525 revolution: function(options) { 13526 13527 // SET DEFAULT VALUES OF ITEM // 13528 var defaults = { 13529 delay:9000, 13530 responsiveLevels:4064, // Single or Array for Responsive Levels i.e.: 4064 or i.e. [2048, 1024, 768, 480] 13531 visibilityLevels:[2048,1024,778,480], // Single or Array for Responsive Visibility Levels i.e.: 4064 or i.e. [2048, 1024, 768, 480] 13532 gridwidth:960, // Single or Array i.e. 960 or [960, 840,760,460] 13533 gridheight:500, // Single or Array i.e. 500 or [500, 450,400,350] 13534 minHeight:0, 13535 autoHeight:"off", 13536 sliderType : "standard", // standard, carousel, hero 13537 sliderLayout : "auto", // auto, fullwidth, fullscreen 13538 13539 fullScreenAutoWidth:"off", // Turns the FullScreen Slider to be a FullHeight but auto Width Slider 13540 fullScreenAlignForce:"off", 13541 fullScreenOffsetContainer:"", // Size for FullScreen Slider minimising Calculated on the Container sizes 13542 fullScreenOffset:"0", // Size for FullScreen Slider minimising 13543 13544 hideCaptionAtLimit:0, // It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser) 13545 hideAllCaptionAtLimit:0, // Hide all The Captions if Width of Browser is less then this value 13546 hideSliderAtLimit:0, // Hide the whole slider, and stop also functions if Width of Browser is less than this value 13547 disableProgressBar:"off", // Hides Progress Bar if is set to "on" 13548 stopAtSlide:-1, // Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case. 13549 stopAfterLoops:-1, // Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic 13550 shadow:0, //0 = no Shadow, 1,2,3 = 3 Different Art of Shadows (No Shadow in Fullwidth Version !) 13551 dottedOverlay:"none", //twoxtwo, threexthree, twoxtwowhite, threexthreewhite 13552 startDelay:0, // Delay before the first Animation starts. 13553 lazyType : "smart", //full, smart, single 13554 spinner:"spinner0", 13555 shuffle:"off", // Random Order of Slides, 13556 13557 13558 viewPort:{ 13559 enable:false, // if enabled, slider wait with start or wait at first slide. 13560 outof:"wait", // wait,pause 13561 visible_area:"60%" 13562 }, 13563 13564 fallbacks:{ 13565 isJoomla:false, 13566 panZoomDisableOnMobile:"off", 13567 simplifyAll:"on", 13568 nextSlideOnWindowFocus:"off", 13569 disableFocusListener:true, 13570 ignoreHeightChanges:"off", // off, mobile, always 13571 ignoreHeightChangesSize:0 13572 }, 13573 13574 parallax : { 13575 type : "off", // off, mouse, scroll, mouse+scroll 13576 levels: [5, 10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85], 13577 origo:"slidercenter", // slidercenter or enterpoint 13578 speed:500, 13579 bgparallax:"off", 13580 opacity:"off", 13581 disable_onmobile:"off", 13582 ddd_shadow:"on", 13583 ddd_bgfreeze:"off", 13584 ddd_overflow:"visible", 13585 ddd_layer_overflow:"visible", 13586 ddd_z_correction:65, 13587 ddd_path:"mouse" 13588 }, 13589 13590 carousel : { 13591 horizontal_align : "center", 13592 vertical_align : "center", 13593 infinity : "on", 13594 space : 0, 13595 maxVisibleItems : 3, 13596 stretch:"off", 13597 fadeout:"on", 13598 maxRotation:0, 13599 minScale:0, 13600 vary_fade:"off", 13601 vary_rotation:"on", 13602 vary_scale:"off", 13603 border_radius:"0px", 13604 padding_top:0, 13605 padding_bottom:0 13606 }, 13607 13608 navigation : { 13609 keyboardNavigation:"off", 13610 keyboard_direction:"horizontal", // horizontal - left/right arrows, vertical - top/bottom arrows 13611 mouseScrollNavigation:"off", // on, off, carousel 13612 onHoverStop:"on", // Stop Banner Timet at Hover on Slide on/off 13613 13614 touch:{ 13615 touchenabled:"off", // Enable Swipe Function : on/off 13616 swipe_treshold : 75, // The number of pixels that the user must move their finger by before it is considered a swipe. 13617 swipe_min_touches : 1,
13617// Min Finger (touch) used for swipe 13618 drag_block_vertical:false, // Prevent Vertical Scroll during Swipe 13619 swipe_direction:"horizontal" 13620 }, 13621 arrows: { 13622 style:"", 13623 enable:false, 13624 hide_onmobile:false, 13625 hide_onleave:true, 13626 hide_delay:200, 13627 hide_delay_mobile:1200, 13628 hide_under:0, 13629 hide_over:9999, 13630 tmp:'', 13631 rtl:false, 13632 left : { 13633 h_align:"left", 13634 v_align:"center", 13635 h_offset:20, 13636 v_offset:0, 13637 container:"slider", 13638 }, 13639 right : { 13640 h_align:"right", 13641 v_align:"center", 13642 h_offset:20, 13643 v_offset:0, 13644 container:"slider", 13645 } 13646 }, 13647 bullets: { 13648 container:"slider", 13649 rtl:false, 13650 style:"", 13651 enable:false, 13652 hide_onmobile:false, 13653 hide_onleave:true, 13654 hide_delay:200, 13655 hide_delay_mobile:1200, 13656 hide_under:0, 13657 hide_over:9999, 13658 direction:"horizontal", 13659 h_align:"left", 13660 v_align:"center", 13661 space:0, 13662 h_offset:20, 13663 v_offset:0, 13664 tmp:'<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>' 13665 }, 13666 thumbnails: { 13667 container:"slider", 13668 rtl:false, 13669 style:"", 13670 enable:false, 13671 width:100, 13672 height:50, 13673 min_width:100, 13674 wrapper_padding:2, 13675 wrapper_color:"#f5f5f5", 13676 wrapper_opacity:1, 13677 tmp:'<span class="tp-thumb-image"></span><span class="tp-thumb-title"></span>', 13678 visibleAmount:5, 13679 hide_onmobile:false, 13680 hide_onleave:true, 13681 hide_delay:200, 13682 hide_delay_mobile:1200, 13683 hide_under:0, 13684 hide_over:9999, 13685 direction:"horizontal", 13686 span:false, 13687 position:"inner", 13688 space:2, 13689 h_align:"left", 13690 v_align:"center", 13691 h_offset:20, 13692 v_offset:0 13693 }, 13694 tabs: { 13695 container:"slider", 13696 rtl:false, 13697 style:"", 13698 enable:false, 13699 width:100, 13700 min_width:100, 13701 height:50, 13702 wrapper_padding:10, 13703 wrapper_color:"#f5f5f5", 13704 wrapper_opacity:1, 13705 tmp:'<span class="tp-tab-image"></span>', 13706 visibleAmount:5, 13707 hide_onmobile:false, 13708 hide_onleave:true, 13709 hide_delay:200, 13710 hide_delay_mobile: 1200, 13711 hide_under:0, 13712 hide_over:9999, 13713 direction:"horizontal", 13714 span:false, 13715 space:0, 13716 position:"inner", 13717 h_align:"left", 13718 v_align:"center", 13719 h_offset:20, 13720 v_offset:0 13721 } 13722 }, 13723 extensions:"extensions/", //example extensions/ or extensions/source/ 13724 extensions_suffix:".min.js", 13725 //addons:[{fileprefix:"revolution.addon.whiteboard",init:"initWhiteBoard",params:"opt",handel:"whiteboard"}], 13726 debugMode:false 13727 }; 13728 13729 // Merge of Defaults 13730 options = jQuery.extend(true,{},defaults, options); 13731 13732 return this.each(function() { 13733 13734 13735 var c = jQuery(this); 13736 13737 // Prepare maxHeight 13738 options.minHeight = options.minHeight!=undefined ? parseInt(options.minHeight,0) : options.minHeight; 13739 13740 //REMOVE SLIDES IF SLIDER IS HERO 13741 if (options.sliderType=="hero") { 13742 c.find('>ul>li').each(function(i) { 13743 if (i>0) jQuery(this).remove(); 13744 }) 13745 } 13746 options.jsFileLocation = options.jsFileLocation || getScriptLocation("themepunch.revolution.min.js"); 13747 options.jsFileLocation = options.jsFileLocation + options.extensions; 13748 options.scriptsneeded = getNeededScripts(options,c); 13749 options.curWinRange = 0; 13750 13751 options.rtl = true; //jQuery('body').hasClass("rtl"); 13752 13753 if (options.navigation!=undefined && options.navigation.touch!=undefined) 13754 options.navigation.touch.swipe_min_touches = options.navigation.touch.swipe_min_touches >5 ? 1 : options.navigation.touch.swipe_min_touches; 13755 13756 13757 13758 jQuery(this).on("scriptsloaded",function() { 13759 if (options.modulesfailing ) { 13760 c.html('<div style="margin:auto;line-height:40px;font-size:14px;color:#fff;padding:15px;background:#e74c3c;margin:20px 0px;">!! Error at loading Slider Revolution 5.0 Extrensions.'+options.errorm
13760+'</div>').show(); 13761 return false; 13762 } 13763 13764 // CHECK FOR MIGRATION 13765 if (_R.migration!=undefined) options = _R.migration(c,options); 13766 punchgs.force3D = true; 13767 if (options.simplifyAll!=="on") punchgs.TweenLite.lagSmoothing(1000,16); 13768 prepareOptions(c,options); 13769 initSlider(c,options); 13770 }); 13771 c.data('opt',options); 13772 waitForScripts(c,options); 13773 }) 13774 }, 13775 13776 // Remove a Slide from the Slider 13777 revremoveslide : function(sindex) { 13778 13779 return this.each(function() { 13780 13781 var container=jQuery(this); 13782 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) { 13783 var bt = container.parent().find('.tp-bannertimer'), 13784 opt = bt.data('opt'); 13785 if (opt && opt.li.length>0) { 13786 if (sindex>0 || sindex<=opt.li.length) { 13787 13788 var li = jQuery(opt.li[sindex]), 13789 ref = li.data("index"), 13790 nextslideafter = false; 13791 13792 opt.slideamount = opt.slideamount-1; 13793 removeNavWithLiref('.tp-bullet',ref,opt); 13794 removeNavWithLiref('.tp-tab',ref,opt); 13795 removeNavWithLiref('.tp-thumb',ref,opt); 13796 if (li.hasClass('active-revslide')) 13797 nextslideafter = true; 13798 li.remove(); 13799 opt.li = removeArray(opt.li,sindex); 13800 if (opt.carousel && opt.carousel.slides) 13801 opt.carousel.slides = removeArray(opt.carousel.slides,sindex) 13802 opt.thumbs = removeArray(opt.thumbs,sindex); 13803 if (_R.updateNavIndexes) _R.updateNavIndexes(opt); 13804 if (nextslideafter) container.revnext(); 13805 punchgs.TweenLite.set(opt.li,{minWidth:"99%"}); 13806 punchgs.TweenLite.set(opt.li,{minWidth:"100%"}); 13807 } 13808 } 13809 } 13810 }); 13811 13812 }, 13813 13814 // Add a New Call Back to some Module 13815 revaddcallback: function(callback) { 13816 return this.each(function() { 13817 var container=jQuery(this); 13818 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) { 13819 var bt = container.parent().find('.tp-bannertimer'), 13820 opt = bt.data('opt'); 13821 if (opt.callBackArray === undefined) 13822 opt.callBackArray = new Array(); 13823 opt.callBackArray.push(callback); 13824 } 13825 }) 13826 }, 13827 13828 // Get Current Parallax Proc 13829 revgetparallaxproc : function() { 13830 var container=jQuery(this); 13831 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) { 13832 var bt = container.parent().find('.tp-bannertimer'), 13833 opt = bt.data('opt'); 13834 return opt.scrollproc; 13835 } 13836 13837 }, 13838 13839 // ENABLE DEBUG MODE 13840 revdebugmode: function() { 13841 return this.each(function() { 13842 var container=jQuery(this); 13843 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) { 13844 var bt = container.parent().find('.tp-bannertimer'), 13845 opt = bt.data('opt'); 13846 opt.debugMode = true; 13847 containerResized(container,opt); 13848 } 13849 }) 13850 }, 13851 13852 // METHODE SCROLL 13853 revscroll: function(oy) { 13854 return this.each(function() { 13855 var container=jQuery(this); 13856 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) 13857 jQuery('body,html').animate({scrollTop:(container.offset().top+(container.height())-oy)+"px"},{duration:400}); 13858 }) 13859 }, 13860 13861 // METHODE PAUSE 13862 revredraw: function(oy) { 13863 return this.each(function() { 13864 13865 var container=jQuery(this); 13866 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) { 13867 var bt = container.parent().find('.tp-bannertimer'); 13868 var opt = bt.data('opt'); 13869 containerResized(container,opt); 13870 } 13871 }) 13872 }, 13873 // METHODE PAUSE 13874 revkill: function(oy) { 13875 13876 var self = this, 13877 container=jQuery(this); 13878 13879 punchgs.TweenLite.killDelayedCallsTo(_R.showHideNavElements); 13880 if (_R.endMoveCaption) 13881 if (opt.endtimeouts && opt.endtimeouts.length>0) 13882 jQuery.each(opt.endtimeouts,function(i,timeo) { clearTimeout(timeo);}); 13883 13884 //punchgs.TweenLite.killDelayedCallsTo(_R.endMoveCaption); 13885 13886 if (container!=undefined && container.length>0 && jQuery('body').find('#'+container.attr('id')).length>0) { 13887 13888 container.data('conthover',1); 13889 container.data('conthover-changed',1); 13890 container.trigger('revolution.slide.onpause'); 13891 var bt = container.parent().find('.tp-bannertimer'), 13892 opt = bt.data('opt'); 13893 opt.tonpause = true; 13894 container.trigger('stoptimer'); 13895 13896 punchgs.TweenLite.killTweensOf(container.find('*'),false); 13897 punchgs.TweenLite.killTweensOf(container,false); 13898 container.unbind('hover, mouseover, mouseenter,mouseleave, resize'); 13899 var resizid = "resize.revslider-"+container.attr('id'); 13900 jQuery(window).off(resizid); 13901 container.find('*').each(function() { 13902 var el = jQuery(this); 13903 13904 el.unbind('on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer'); 13905 el.off('on, hover, mouseenter,mouseleave,mouseover, resize'); 13906 el.data('mySplitText',null); 13907 el.data('ctl',null); 13908 if (el.data('tween')!=undefined) 13909 el.data('tween').kill(); 13910 if (el.data('kenburn')!=undefined) 13911 el.data('kenburn').kill(); 13912 if (el.data('timeline_out')!=undefined) 13913 el.data('timeline_out').kill(); 13914 if (el.data('timeline')!=undefined) 13915 el.data('timeline').kill(); 13916 13917 el.remove(); 13918 el.empty(); 13919 el=null; 13920 }) 13921 13922 13923 punchgs.TweenLite.killTweensOf(container.find('*'),false); 13924 punchgs.TweenLite.killTweensOf(container,false); 13925 bt.remove(); 13926 try{container.closest('.forcefullwidth_wrapper_tp_banner').remove();} catch(e) {} 13927 try{container.closest('.rev_slider_wrapper').remove()} catch(e) {} 13928 try{container.remove();} catch(e) {} 13929 container.empty(); 13930 container.html(); 13931 container = null; 13932 13933 opt = null; 13934 delete(self.c); 13935 delete(self.opt); 13936 13937 return true; 13938 } else { 13939 return false; 13940 } 13941 13942 13943 }, 13944 13945 // METHODE PAUSE 13946 revpause: function() { 13947 return this.each(function() { 13948 var c=jQuery(this); 13949 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 13950 c.data('conthover',1); 13951 c.data('conthover-changed',1); 13952 c.trigger('revolution.slide.onpause'); 13953 var bt = c.parent().find('.tp-bannertimer'); 13954 var opt = bt.data('opt'); 13955 opt.tonpause = true; 13956 c.trigger('stoptimer'); 13957 } 13958 }) 13959 }, 13960 13961 // METHODE RESUME 13962 revresume: function() { 13963 return this.each(function() { 13964 var c=jQuery(this); 13965 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 13966 c.data('conthover',0); 13967 c.data('conthover-changed',1); 13968 c.trigger('revolution.slide.onresume'); 13969 var bt = c.parent().find('.tp-bannertimer'); 13970 var opt = bt.data('opt'); 13971 opt.tonpause = false; 13972 c.trigger('starttimer'); 13973 } 13974 }) 13975 }, 13976 13977 revstart: function() { 13978 //return this.each(function() { 13979 var c=jQuery(this); 13980 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0 && c.data('opt')) { 13981 if (!c.data('opt')["sliderisrunning"]) { 13982 runSlider(c,c.data('opt')); 13983 return true; 13984 } 13985 else { 13986 console.log("Slider Is Running Already"); 13987 return false; 13988 } 13989 13990 } 13991 //}) 13992 13993 }, 13994 13995 // METHODE NEXT 13996 revnext: function() { 13997 return this.each(function() { 13998 // CATCH THE CONTAINER 13999 var c=jQuery(this); 14000 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 14001 var bt = c.parent().find('.tp-bannertimer'), 14002 opt = bt.data('opt'); 14003 _R.callingNewSlide(opt,c,1); 14004 } 14005 }) 14006 }, 14007 14008 // METHODE RESUME 14009 revprev: function() { 14010 return this.each(function() { 14011 // CATCH THE CONTAINER 14012 var c=jQuery(this); 14013 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 14014 var bt = c.parent().find('.tp-bannertimer'), 14015 opt = bt.data('opt'); 14016 _R.callingNewSlide(opt,c,-1);
14017 } 14018 }) 14019 }, 14020 14021 // METHODE LENGTH 14022 revmaxslide: function() { 14023 // CATCH THE CONTAINER 14024 return jQuery(this).find('.tp-revslider-mainul >li').length; 14025 }, 14026 14027 14028 // METHODE CURRENT 14029 revcurrentslide: function() { 14030 // CATCH THE CONTAINER 14031 var c=jQuery(this); 14032 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 14033 var bt = c.parent().find('.tp-bannertimer'); 14034 var opt = bt.data('opt'); 14035 return parseInt(opt.act,0)+1; 14036 } 14037 }, 14038 14039 // METHODE CURRENT 14040 revlastslide: function() { 14041 // CATCH THE CONTAINER 14042 return jQuery(this).find('.tp-revslider-mainul >li').length; 14043 }, 14044 14045 14046 // METHODE JUMP TO SLIDE 14047 revshowslide: function(slide) { 14048 return this.each(function() { 14049 // CATCH THE CONTAINER 14050 var c=jQuery(this); 14051 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 14052 var bt = c.parent().find('.tp-bannertimer'), 14053 opt = bt.data('opt'); 14054 _R.callingNewSlide(opt,c,"to"+(slide-1)); 14055 } 14056 }) 14057 }, 14058 revcallslidewithid: function(slide) { 14059 return this.each(function() { 14060 // CATCH THE CONTAINER 14061 var c=jQuery(this); 14062 if (c!=undefined && c.length>0 && jQuery('body').find('#'+c.attr('id')).length>0) { 14063 var bt = c.parent().find('.tp-bannertimer'), 14064 opt = bt.data('opt'); 14065 _R.callingNewSlide(opt,c,slide); 14066 } 14067 }) 14068 } 14069}); 14070 14071 14072 14073////////////////////////////////////////////////////////////// 14074// - REVOLUTION FUNCTION EXTENSIONS FOR GLOBAL USAGE - // 14075////////////////////////////////////////////////////////////// 14076var _R = jQuery.fn.revolution; 14077 14078jQuery.extend(true, _R, { 14079 14080 simp : function(a,b,basic) { 14081 var c = Math.abs(a) - (Math.floor(Math.abs(a / b))*b); 14082 if (basic) 14083 return c; 14084 else 14085 return a<0 ? -1*c : c; 14086 }, 14087 14088 // - IS IOS VERSION OLDER THAN 5 ?? 14089 iOSVersion : function() { 14090 var oldios = false; 14091 if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) { 14092 if (navigator.userAgent.match(/OS 4_\d like Mac OS X/i)) { 14093 oldios = true; 14094 } 14095 } else { 14096 oldios = false; 14097 } 14098 return oldios; 14099 }, 14100 14101 14102 // - CHECK IF BROWSER IS IE - 14103 isIE : function( version, comparison ){ 14104 var $div = jQuery('<div style="display:none;"/>').appendTo(jQuery('body')); 14105 $div.html('<!--[if '+(comparison||'')+' IE '+(version||'')+']><a> </a><![endif]-->'); 14106 var ieTest = $div.find('a').length; 14107 $div.remove(); 14108 return ieTest; 14109 }, 14110 14111 // - IS MOBILE ?? 14112 is_mobile : function() { 14113 var agents = ['android', 'webos', 'iphone', 'ipad', 'blackberry','Android', 'webos', ,'iPod', 'iPhone', 'iPad', 'Blackberry', 'BlackBerry']; 14114 var ismobile=false; 14115 for(var i in agents) { 14116
14117 if (navigator.userAgent.split(agents[i]).length>1) { 14118 ismobile = true; 14119 14120 } 14121 } 14122 return ismobile; 14123 }, 14124 14125 // - CALL BACK HANDLINGS - // 14126 callBackHandling : function(opt,type,position) { 14127 try{ 14128 if (opt.callBackArray) 14129 jQuery.each(opt.callBackArray,function(i,c) { 14130 if (c) { 14131 if (c.inmodule && c.inmodule === type) 14132 if (c.atposition && c.atposition === position) 14133 if (c.callback) 14134 c.callback.call(); 14135 } 14136 }); 14137 } catch(e) { 14138 console.log("Call Back Failed"); 14139 } 14140 }, 14141 14142 get_browser : function(){ 14143 var N=navigator.appName, ua=navigator.userAgent, tem; 14144 var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); 14145 if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1]; 14146 M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?']; 14147 return M[0]; 14148 }, 14149 14150 get_browser_version : function(){ 14151 var N=navigator.appName, ua=navigator.userAgent, tem; 14152 var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); 14153 if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1]; 14154 M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?']; 14155 return M[1]; 14156 }, 14157 14158 // GET THE HORIZONTAL OFFSET OF SLIDER BASED ON THE THU`MBNAIL AND TABS LEFT AND RIGHT SIDE 14159 getHorizontalOffset : function(container,side) { 14160 var thumbloff = gWiderOut(container,'.outer-left'), 14161 thumbroff = gWiderOut(container,'.outer-right'); 14162 14163 switch (side) { 14164 case "left": 14165 return thumbloff; 14166 break; 14167 case "right": 14168 return thumbroff; 14169 break; 14170 case "both": 14171 return thumbloff+thumbroff; 14172 break; 14173 } 14174 }, 14175 14176 14177 // - CALLING THE NEW SLIDE - // 14178 callingNewSlide : function(opt,container,direction) { 14179 14180 14181 var aindex = container.find('.next-revslide').length>0 ? container.find('.next-revslide').index() : container.find('.processing-revslide').length>0 ? container.find('.processing-revslide').index() : container.find('.active-revslide').index(), 14182 nindex = 0; 14183 14184 container.find('.next-revslide').removeClass("next-revslide"); 14185 14186 // IF WE ARE ON AN INVISIBLE SLIDE CURRENTLY 14187 if (container.find('.active-revslide').hasClass("tp-invisible-slide")) 14188 aindex = opt.last_shown_slide; 14189 14190 // SET NEXT DIRECTION 14191 if (direction && jQuery.isNumeric(direction) || direction.match(/to/g)) { 14192 if (direction===1 || direction === -1) { 14193 14194 nindex = aindex + direction; 14195 nindex = nindex<0 ? opt.slideamount-1 : nindex>=opt.slideamount ? 0 : nindex; 14196 } else { 14197 14198 direction=jQuery.isNumeric(direction) ? direction : parseInt(direction.split("to")[1],0); 14199 nindex = direction<0 ? 0 : direction>opt.slideamount-1 ? opt.slideamount-1 : direction; 14200 } 14201 container.find('.tp-revslider-slidesli:eq('+nindex+')').addClass("next-revslide"); 14202 } else 14203 if (direction) { 14204 14205 container.find('.tp-revslider-slidesli').each(function() { 14206 var li=jQuery(this); 14207 if (li.data('index')===direction) li.addClass("next-revslide"); 14208 }) 14209 } 14210 14211 14212 nindex = container.find('.next-revslide').index(); 14213 container.trigger("revolution.nextslide.waiting"); 14214 14215 14216 if ((aindex===nindex && aindex === opt.last_shown_slide) || (nindex !== aindex && nindex!=-1)) 14217 swapSlide(container,opt); 14218 else 14219 container.find('.next-revslide').removeClass("next-revslide"); 14220 }, 14221 14222 slotSize : function(img,opt) { 14223 opt.slotw=Math.ceil(opt.width/opt.slots); 14224 14225 if (opt.sliderLayout=="fullscreen") 14226 opt.sloth=Math.ceil(jQuery(window).height()/opt.slots); 14227 else 14228 opt.sloth=Math.ceil(opt.height/opt.slots); 14229 14230 if (opt.autoHeight=="on" && img!==undefined && img!=="") 14231 opt.sloth=Math.ceil(img.height()/opt.slots); 14232 14233 14234 }, 14235 14236 setSize : function(opt) { 14237 14238 var ofh = (opt.top_outer || 0) + (opt.bottom_outer || 0), 14239 cpt = parseInt((opt.carousel.padding_top||0),0), 14240 cpb = parseInt((opt.carousel.padding_bottom||0),0), 14241 maxhei = opt.gridheight[opt.curWinRange]; 14242 14243 opt.paddings = opt.paddings === undefined ? {top:(parseInt(opt.c.parent().css("paddingTop"),0) || 0), bottom:(parseInt(opt.c.parent().css("paddingBottom"),0) || 0)} : opt.paddings; 14244 14245 maxhei = maxhei<opt.minHeight ? opt.minHeight : maxhei; 14246 if (opt.sliderLayout=="fullwidth" && opt.autoHeight=="off") punchgs.TweenLite.set(opt.c,{maxHeight:maxhei+"px"}); 14247 opt.c.css({marginTop:cpt,marginBottom:cpb}); 14248 opt.width=opt.ul.width(); 14249 opt.height=opt.ul.height(); 14250 setScale(opt); 14251 14252 opt.height = Math.round(opt.gridheight[opt.curWinRange] * (opt.width/opt.gridwidth[opt.curWinRange])); 14253 14254 if (opt.height>opt.gridheight[opt.curWinRange] && opt.autoHeight!="on") opt.height=opt.gridheight[opt.curWinRange]; 14255 14256 if (opt.sliderLayout=="fullscreen" || opt.infullscreenmode) { 14257 opt.height = opt.bw * opt.gridheight[opt.curWinRange]; 14258 var cow = opt.c.parent().width(); 14259 var coh = jQuery(window).height(); 14260 14261 if (opt.fullScreenOffsetContainer!=undefined) { 14262 try{ 14263 var offcontainers = opt.fullScreenOffsetContainer.split(",");
14264 if (offcontainers) 14265 jQuery.each(offcontainers,function(index,searchedcont) { 14266 coh = jQuery(searchedcont).length>0 ? coh - jQuery(searchedcont).outerHeight(true) : coh; 14267 }); 14268 } catch(e) {} 14269 try{ 14270 if (opt.fullScreenOffset.split("%").length>1 && opt.fullScreenOffset!=undefined && opt.fullScreenOffset.length>0) 14271 coh = coh - (jQuery(window).height()* parseInt(opt.fullScreenOffset,0)/100); 14272 else 14273 if (opt.fullScreenOffset!=undefined && opt.fullScreenOffset.length>0) 14274 coh = coh - parseInt(opt.fullScreenOffset,0); 14275 } catch(e) {} 14276 } 14277 14278 coh = coh<opt.minHeight ? opt.minHeight : coh; 14279 coh = coh - ofh; 14280 opt.c.parent().height(coh); 14281 14282 opt.c.closest('.rev_slider_wrapper').height(coh); 14283 opt.c.css({'height':'100%'}); 14284 14285 opt.height=coh; 14286 if (opt.minHeight!=undefined && opt.height<opt.minHeight) 14287 opt.height = opt.minHeight; 14288 } else { 14289 14290 if (opt.minHeight!=undefined && opt.height<opt.minHeight) 14291 opt.height = opt.minHeight; 14292 opt.c.height(opt.height); 14293 14294 } 14295 var si = { height:(cpt+cpb+ofh+opt.height+opt.paddings.top+opt.paddings.bottom)}; 14296 14297 opt.c.closest('.forcefullwidth_wrapper_tp_banner').find('.tp-fullwidth-forcer').css(si); 14298 opt.c.closest('.rev_slider_wrapper').css(si); 14299 setScale(opt); 14300 }, 14301 14302 enterInViewPort : function(opt) { 14303 // START COUNTER IF VP ENTERED, AND COUNTDOWN WAS NOT ON YET 14304 if (opt.waitForCountDown) { 14305 countDown(opt.c,opt); 14306 opt.waitForCountDown=false; 14307 } 14308 // START FIRST SLIDE IF NOT YET STARTED AND VP ENTERED 14309 if (opt.waitForFirstSlide) { 14310 swapSlide(opt.c,opt); 14311 opt.waitForFirstSlide=false; 14312 } 14313 14314 if (opt.sliderlaststatus == "playing" || opt.sliderlaststatus==undefined) { 14315 opt.c.trigger("starttimer"); 14316 } 14317 14318 14319 if (opt.lastplayedvideos != undefined && opt.lastplayedvideos.length>0) { 14320 14321 jQuery.each(opt.lastplayedvideos,function(i,_nc) { 14322 14323 _R.playVideo(_nc,opt); 14324 }); 14325 } 14326 }, 14327 14328 leaveViewPort : function(opt) { 14329 opt.sliderlaststatus = opt.sliderstatus; 14330 opt.c.trigger("stoptimer"); 14331 if (opt.playingvideos != undefined && opt.playingvideos.length>0) { 14332 opt.lastplayedvideos = jQuery.extend(true,[],opt.playingvideos); 14333 if (opt.playingvideos) 14334 jQuery.each(opt.playingvideos,function(i,_nc) { 14335 opt.leaveViewPortBasedStop = true; 14336 if (_R.stopVideo) _R.stopVideo(_nc,opt); 14337 }); 14338 } 14339 }, 14340 14341 unToggleState : function(a) { 14342 if (a!=undefined && a.length>0) 14343 jQuery.each(a,function(i,layer) { 14344 layer.removeClass("rs-toggle-content-active"); 14345 }); 14346 }, 14347 14348 toggleState : function(a) { 14349 if (a!=undefined && a.length>0) 14350 jQuery.each(a,function(i,layer) { 14351 layer.addClass("rs-toggle-content-active"); 14352 }); 14353 }, 14354 lastToggleState : function(a) { 14355 var state = 0; 14356 if (a!=undefined && a.length>0) 14357 jQuery.each(a,function(i,layer) { 14358 state = layer.hasClass("rs-toggle-content-active"); 14359 }); 14360 return state; 14361 } 14362 14363}); 14364 14365 14366var _ISM = _R.is_mobile(); 14367 14368 14369 14370//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 14371//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 14372//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 14373//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 14374var removeArray = function(arr,i) { 14375 var newarr = []; 14376 jQuery.each(arr,function(a,b) { 14377 if (a!=i) newarr.push(b); 14378 }) 14379 return newarr; 14380 } 14381 14382var removeNavWithLiref = function(a,ref,opt) { 14383 opt.c.find(a).each(function() { 14384 var a = jQuery(this); 14385 if (a.data('liref')===ref) 14386 a.remove(); 14387 }) 14388} 14389 14390 14391var lAjax = function(s,o) { 14392 if (jQuery('body').data(s)) return false; 14393 if (o.filesystem) { 14394 if (o.errorm===undefined) 14395 o.errorm = "<br>Local Filesystem Detected !<br>Put this to your header:"; 14396 console.warn('Local Filesystem detected !');
14397 o.errorm = o.errorm+'<br><script type="text/javascript" src="'+o.jsFileLocation+s+o.extensions_suffix+'"></script>'; 14398 console.warn(o.jsFileLocation+s+o.extensions_suffix+' could not be loaded !'); 14399 console.warn('Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document.'); 14400 console.log(" "); 14401 o.modulesfailing = true; 14402 return false; 14403 } 14404 jQuery.ajax({ 14405 url:o.jsFileLocation+s+o.extensions_suffix, 14406 'dataType':'script', 14407 'cache':true, 14408 "error":function(e) { 14409 console.warn("Slider Revolution 5.0 Error !") 14410 console.error("Failure at Loading:"+s+o.extensions_suffix+" on Path:"+o.jsFileLocation) 14411 console.info(e); 14412 } 14413 }); 14414 jQuery('body').data(s,true); 14415} 14416 14417var getNeededScripts = function(o,c) { 14418 var n = new Object(), 14419 _n = o.navigation; 14420 14421 n.kenburns = false; 14422 n.parallax = false; 14423 n.carousel = false; 14424 n.navigation = false; 14425 n.videos = false; 14426 n.actions = false; 14427 n.layeranim = false; 14428 n.migration = false; 14429 14430 14431 14432 14433 // MIGRATION EXTENSION 14434 if (!c.data('version') || !c.data('version').toString().match(/5./gi)) { 14435 n.kenburns = true; 14436 n.parallax = true; 14437 n.carousel = false; 14438 n.navigation = true; 14439 n.videos = true; 14440 n.actions = true; 14441 n.layeranim = true; 14442 n.migration = true; 14443 } 14444 else { 14445 // KEN BURN MODUL 14446 c.find('img').each(function(){ 14447 if (jQuery(this).data('kenburns')=="on") n.kenburns = true; 14448 }); 14449 14450 // NAVIGATION EXTENSTION 14451 if (o.sliderType =="carousel" || _n.keyboardNavigation=="on" || _n.mouseScrollNavigation=="on" || _n.touch.touchenabled=="on" || _n.arrows.enable || _n.bullets.enable || _n.thumbnails.enable || _n.tabs.enable ) 14452 n.navigation = true; 14453 14454 // LAYERANIM, VIDEOS, ACTIONS EXTENSIONS 14455 c.find('.tp-caption, .tp-static-layer, .rs-background-video-layer').each(function(){ 14456 var _nc = jQuery(this); 14457 if ((_nc.data('ytid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('youtube')>0)) 14458 n.videos = true; 14459 if ((_nc.data('vimeoid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('vimeo')>0)) 14460 n.videos = true; 14461 if (_nc.data('actions')!==undefined) 14462 n.actions = true; 14463 n.layeranim = true; 14464 }); 14465 14466 14467 c.find('li').each(function() { 14468 if (jQuery(this).data('link') && jQuery(this).data('link')!=undefined) { 14469 n.layeranim = true; 14470 n.actions = true; 14471 } 14472 }) 14473 14474 // VIDEO EXTENSION 14475 if (!n.videos && (c.find('.rs-background-video-layer').length>0 || c.find(".tp-videolayer").length>0 || c.find(".tp-audiolayer").length>0 || c.find('iframe').length>0 || c.find('video').length>0)) 14476 n.videos = true; 14477 14478 14479 // VIDEO EXTENSION 14480 if (o.sliderType =="carousel") 14481 n.carousel = true; 14482 14483 14484 14485 if (o.parallax.type!=="off" || o.viewPort.enable || o.viewPort.enable=="true") 14486 n.parallax = true; 14487 } 14488 14489 if (o.sliderType=="hero") { 14490 n.carousel = false; 14491 n.navigation = false; 14492 } 14493 14494 if (window.location.href.match(/file:/gi)) { 14495 n.filesystem = true; 14496 o.filesystem = true; 14497 } 14498 14499
14500 // LOAD THE NEEDED LIBRARIES 14501 //if (n.videos && typeof _R.isVideoPlaying=='undefined') lAjax('revolution.extension.video',o); 14502 //if (n.carousel && typeof _R.prepareCarousel=='undefined') lAjax('revolution.extension.carousel',o); 14503 //if (!n.carousel && typeof _R.animateSlide=='undefined') lAjax('revolution.extension.slideanims',o); 14504 //if (n.actions && typeof _R.checkActions=='undefined') lAjax('revolution.extension.actions',o); 14505 //if (n.layeranim && typeof _R.handleStaticLayers=='undefined') lAjax('revolution.extension.layeranimation',o); 14506 //if (n.kenburns && typeof _R.stopKenBurn=='undefined') lAjax('revolution.extension.kenburn',o); 14507 //if (n.navigation && typeof _R.createNavigation=='undefined') lAjax('revolution.extension.navigation',o); 14508 //if (n.migration && typeof _R.migration=='undefined') lAjax('revolution.extension.migration',o); 14509 //if (n.parallax && typeof _R.checkForParallax=='undefined') lAjax('revolution.extension.parallax',o); 14510 14511 if (o.addons!=undefined && o.addons.length>0) { 14512 jQuery.each(o.addons, function(i,obj) { 14513 if (typeof obj === "object" && obj.fileprefix!=undefined) 14514 lAjax(obj.fileprefix,o); 14515 }) 14516 } 14517 14518 14519 return n; 14520} 14521 14522/////////////////////////////////// 14523// - WAIT FOR SCRIPT LOADS - // 14524/////////////////////////////////// 14525var waitForScripts = function(c,o) { 14526 // CHECK KEN BURN DEPENDENCIES 14527 var addonsloaded = true, 14528 n = o.scriptsneeded; 14529 14530 // CHECK FOR ADDONS 14531 if (o.addons!=undefined && o.addons.length>0) { 14532 jQuery.each(o.addons, function(i,obj) { 14533 if (typeof obj === "object" && obj.init!=undefined) { 14534 if (_R[obj.init]===undefined) addonsloaded = false; 14535 } 14536 }) 14537 } 14538 14539 if (n.filesystem || 14540 (typeof punchgs !== 'undefined' && 14541 (addonsloaded) && 14542 (!n.kenburns || (n.kenburns && typeof _R.stopKenBurn !== 'undefined')) && 14543 (!n.navigation || (n.navigation && typeof _R.createNavigation !== 'undefined')) && 14544 (!n.carousel || (n.carousel && typeof _R.prepareCarousel !== 'undefined')) && 14545 (!n.videos || (n.videos && typeof _R.resetVideo !== 'undefined')) && 14546 (!n.actions || (n.actions && typeof _R.checkActions !== 'undefined')) && 14547 (!n.layeranim || (n.layeranim && typeof _R.handleStaticLayers !== 'undefined')) && 14548 (!n.migration || (n.migration && typeof _R.migration !== 'undefined')) && 14549 (!n.parallax || (n.parallax && typeof _R.checkForParallax !== 'undefined')) && 14550 (n.carousel || (!n.carousel && typeof _R.animateSlide !== 'undefined')) 14551 )) 14552 c.trigger("scriptsloaded"); 14553 else 14554 setTimeout(function() { 14555 waitForScripts(c,o); 14556 },50); 14557 14558} 14559 14560////////////////////////////////// 14561// - GET SCRIPT LOCATION - // 14562////////////////////////////////// 14563var getScriptLocation = function(a) { 14564 14565 var srcexp = new RegExp("themepunch.revolution.min.js","gi"), 14566 ret = ""; 14567 jQuery("script").each(function() { 14568 var src = jQuery(this).attr("src"); 14569 if (src && src.match(srcexp)) 14570 ret = src; 14571 }); 14572 14573 ret = ret.replace('jquery.themepunch.revolution.min.js', ''); 14574 ret = ret.replace('jquery.themepunch.revolution.js', ''); 14575 ret = ret.split("?")[0]; 14576 return ret; 14577} 14578 14579////////////////////////////////////////// 14580// - ADVANCED RESPONSIVE LEVELS - // 14581////////////////////////////////////////// 14582var setCurWinRange = function(opt,vis) { 14583 var curlevel = 0, 14584 curwidth = 9999, 14585 lastmaxlevel = 0, 14586 lastmaxid = 0, 14587 curid = 0, 14588 winw = jQuery(window).width(), 14589 l = vis && opt.responsiveLevels==9999 ? opt.visibilityLevels : opt.responsiveLevels; 14590 14591 if (l && l.length) 14592 jQuery.each(l,function(index,level) { 14593 if (winw<level) { 14594 if (lastmaxlevel==0 || lastmaxlevel>level) { 14595 curwidth = level; 14596 curid = index; 14597 lastmaxlevel = level; 14598 } 14599 } 14600 14601 if (winw>level && lastmaxlevel<level) { 14602 lastmaxlevel = level; 14603 lastmaxid = index; 14604 } 14605 }); 14606 14607 if (lastmaxlevel<curwidth) 14608 curid = lastmaxid; 14609 14610 14611 if (!vis) 14612 opt.curWinRange = curid; 14613 else 14614 opt.forcedWinRange = curid; 14615 14616 14617} 14618 14619 14620 14621 14622////////////////////////////////////////// 14623// - INITIALISATION OF OPTIONS - // 14624////////////////////////////////////////// 14625var prepareOptions = function(container,opt) { 14626 opt.carousel.maxVisibleItems = opt.carousel.maxVisibleItems < 1 ? 999 : opt.carousel.maxVisibleItems; // === 1 ? 2 : opt.carousel.maxVisibleItems; 14627 opt.carousel.vertical_align = opt.carousel.vertical_align === "top" ? "0%" : opt.carousel.vertical_align==="bottom" ? "100%" : "50%"; 14628} 14629 14630var gWiderOut = function(c,cl) { 14631 var r = 0; 14632 c.find(cl).each(function() { 14633 var a = jQuery(this); 14634 if (!a.hasClass("tp-forcenotvisible") && r<a.outerWidth()) 14635 r = a.outerWidth(); 14636 }); 14637 return r; 14638} 14639 14640 14641 14642 14643////////////////////////////////////////// 14644// - INITIALISATION OF SLIDER - // 14645////////////////////////////////////////// 14646var initSlider = function (container,opt) { 14647 if (container==undefined) return false; 14648 14649 // CHECK FOR ALTERNATIVE IMAGE, AND IFRAM EXIST, AND WE ARE IN IE8, MOBILE, DRAW IT SIMPLE 14650 if (container.data('aimg')!=undefined) 14651 if ((container.data('aie8')=="enabled" && _R.isIE(8)) || (container.data('amobile')=="enabled" && _ISM)) 14652 container.html('<img class="tp-slider-alternative-image" src="'+container.data("aimg")+'">'); 14653 14654 // PREPRARE SOME CLASSES AND VARIABLES 14655 container.find('>ul').addClass("tp-revslider-mainul"); 14656 14657 14658 // CREATE SOME DEFAULT OPTIONS FOR LATER 14659 opt.c=container; 14660 opt.ul = container.find('.tp-revslider-mainul'); 14661 14662 // Remove Not Needed Slides for Mobile Devices 14663 opt.ul.find('>li').each(function(i) { 14664 var li = jQuery(this); 14665 if (li.data('hideslideonmobile')=="on" && _ISM) li.remove(); 14666 if (li.data('invisible') || li.data('invisible')===true) { 14667 li.addClass("tp-invisible-slide"); 14668 li.appendTo(opt.ul); 14669 } 14670 }); 14671 14672 14673 if (opt.addons!=undefined && opt.addons.length>0) { 14674 jQuery.each(opt.addons, function(i,obj) { 14675 if (typeof obj === "object" && obj.init!=undefined) { 14676 _R[obj.init](eval(obj.params)); 14677 } 14678 }) 14679 } 14680 14681
14682 14683 opt.cid = container.attr('id'); 14684 opt.ul.css({visibility:"visible"}); 14685 opt.slideamount = opt.ul.find('>li').not('.tp-invisible-slide').length; 14686 opt.slayers = container.find('.tp-static-layers'); 14687 14688 if (opt.waitForInit == true) 14689 return; 14690 else { 14691 container.data('opt',opt); 14692 runSlider(container,opt); 14693 } 14694 14695 } 14696 14697 var onFullScreenChange = function() { 14698 jQuery("body").data('rs-fullScreenMode',!jQuery("body").data('rs-fullScreenMode')); 14699 if (jQuery("body").data('rs-fullScreenMode')) { 14700 setTimeout(function() { 14701 jQuery(window).trigger("resize"); 14702 },200); 14703 } 14704 } 14705 14706 var runSlider = function(container,opt) { 14707 14708 14709 opt.sliderisrunning = true; 14710 // Save Original Index of Slides 14711 opt.ul.find('>li').each(function(i) { 14712 jQuery(this).data('originalindex',i); 14713 }); 14714 14715 14716 14717 14718 // RANDOMIZE THE SLIDER SHUFFLE MODE 14719 if (opt.shuffle=="on") { 14720 var fsa = new Object, 14721 fli = opt.ul.find('>li:first-child'); 14722 fsa.fstransition = fli.data('fstransition'); 14723 fsa.fsmasterspeed = fli.data('fsmasterspeed'); 14724 fsa.fsslotamount = fli.data('fsslotamount'); 14725 14726 for (var u=0;u<opt.slideamount;u++) { 14727 var it = Math.round(Math.random()*opt.slideamount); 14728 opt.ul.find('>li:eq('+it+')').prependTo(opt.ul); 14729 } 14730 14731 var newfli = opt.ul.find('>li:first-child'); 14732 newfli.data('fstransition',fsa.fstransition); 14733 newfli.data('fsmasterspeed',fsa.fsmasterspeed); 14734 newfli.data('fsslotamount',fsa.fsslotamount); 14735 14736 // COLLECT ALL LI INTO AN ARRAY 14737 opt.li = opt.ul.find('>li').not('.tp-invisible-slide'); 14738 } 14739 14740 opt.allli = opt.ul.find('>li'); 14741 opt.li = opt.ul.find('>li').not('.tp-invisible-slide'); 14742 opt.inli = opt.ul.find('>li.tp-invisible-slide'); 14743 14744 14745 opt.thumbs = new Array(); 14746 14747 opt.slots=4; 14748 opt.act=-1; 14749 opt.firststart=1; 14750 opt.loadqueue = new Array(); 14751 opt.syncload = 0; 14752 opt.conw = container.width(); 14753 opt.conh = container.height(); 14754 14755 if (opt.responsiveLevels.length>1) 14756 opt.responsiveLevels[0] = 9999; 14757 else 14758 opt.responsiveLevels = 9999; 14759 14760 // RECORD THUMBS AND SET INDEXES 14761 jQuery.each(opt.allli,function(index,li) { 14762 var li = jQuery(li), 14763 img = li.find('.rev-slidebg') || li.find('img').first(), 14764 i = 0; 14765 14766 14767 li.addClass("tp-revslider-slidesli"); 14768 if (li.data('index')===undefined) li.data('index','rs-'+Math.round(Math.random()*999999)); 14769 14770 var obj = new Object; 14771 obj.params = new Array(); 14772 14773 obj.id = li.data('index'); 14774 obj.src = li.data('thumb')!==undefined ? li.data('thumb') : img.data('lazyload') !== undefined ? img.data('lazyload') : img.attr('src'); 14775 if (li.data('title') !== undefined) obj.params.push({from:RegExp("\\{\\{title\\}\\}","g"), to:li.data("title")}) 14776 if (li.data('description') !== undefined) obj.params.push({from:RegExp("\\{\\{description\\}\\}","g"), to:li.data("description")}) 14777 for (var i=1;i<=10;i++) { 14778 if (li.data("param"+i)!==undefined) 14779 obj.params.push({from:RegExp("\\{\\{param"+i+"\\}\\}","g"), to:li.data("param"+i)}) 14780 } 14781 opt.thumbs.push(obj); 14782 14783 li.data('origindex',li.index()); 14784 14785 // IF LINK ON SLIDE EXISTS, NEED TO CREATE A PROPER LAYER FOR IT. 14786 if (li.data('link')!=undefined) { 14787 var link = li.data('link'), 14788 target= li.data('target') || "_self", 14789 zindex= li.data('slideindex')==="back" ? 0 : 60, 14790 linktoslide=li.data('linktoslide'), 14791 checksl = linktoslide; 14792 14793 if (linktoslide != undefined) 14794 if (linktoslide!="next" && linktoslide!="prev") 14795 opt.allli.each(function() { 14796 var t = jQuery(this); 14797 if (t.data('origindex')+1==checksl) linktoslide = t.data('index'); 14798 }); 14799 14800 14801 if (link!="slide") linktoslide="no"; 14802 14803 var apptxt = '<div class="tp-caption slidelink" style="cursor:pointer;width:100%;height:100%;z-index:'+zindex+';" data-x="center" data-y="center" data-basealign="slide" ', 14804 jts = linktoslide==="scroll_under" ? '[{"event":"click","action":"scrollbelow","offset":"100px","delay":"0"}]' : 14805 linktoslide==="prev" ? '[{"event":"click","action":"jumptoslide","slide":"prev","delay":"0.2"}]' : 14806 linktoslide==="next" ? '[{"event":"click","action":"jumptoslide","slide":"next","delay":"0.2"}]' : '[{"event":"click","action":"jumptoslide","slide":"'+linktoslide+'","delay":"0.2"}]' 14807 14808 apptxt = linktoslide=="no" ? apptxt +' data-start="0">' : apptxt + 'data-actions='+"'"+jts + "'"+' data-start="0">'; 14809 apptxt = apptxt + '<a style="width:100%;height:100%;display:block"'; 14810 apptxt = link!="slide" ? apptxt + ' target="'+target+'" href="'+link+'"' : apptxt; 14811 apptxt = apptxt + '><span style="width:100%;height:100%;display:block"></span></a></div>'; 14812 li.append(apptxt); 14813 } 14814 }); 14815 14816 14817 // CREATE GRID WIDTH AND HEIGHT ARRAYS 14818 opt.rle = opt.responsiveLevels.length || 1; 14819 opt.gridwidth = cArray(opt.gridwidth,opt.rle); 14820 opt.gridheight = cArray(opt.gridheight,opt.rle); 14821 // END OF VERSION 5.0 INIT MODIFICATION 14822 14823 14824 14825 // SIMPLIFY ANIMATIONS ON OLD IOS AND IE8 IF NEEDED 14826 if (opt.simplifyAll=="on" && (_R.isIE(8) || _R.iOSVersion())) { 14827 container.find('.tp-caption').each(function() { 14828 var tc = jQuery(this); 14829 tc.removeClass("customin customout").addClass("fadein fadeout"); 14830 tc.data('splitin',""); 14831 tc.data('speed',400);
14832 }) 14833 opt.allli.each(function() { 14834 var li= jQuery(this); 14835 li.data('transition',"fade"); 14836 li.data('masterspeed',500); 14837 li.data('slotamount',1); 14838 var img = li.find('.rev-slidebg') || li.find('>img').first(); 14839 img.data('kenburns',"off"); 14840 }); 14841 } 14842 14843 opt.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i); 14844 14845 // SOME OPTIONS WHICH SHOULD CLOSE OUT SOME OTHER SETTINGS 14846 opt.autoHeight = opt.sliderLayout=="fullscreen" ? "on" : opt.autoHeight; 14847 14848 if (opt.sliderLayout=="fullwidth" && opt.autoHeight=="off") container.css({maxHeight:opt.gridheight[opt.curWinRange]+"px"}); 14849 14850 // BUILD A FORCE FULLWIDTH CONTAINER, TO SPAN THE FULL SLIDER TO THE FULL WIDTH OF BROWSER 14851 if (opt.sliderLayout!="auto" && container.closest('.forcefullwidth_wrapper_tp_banner').length==0) { 14852 if (opt.sliderLayout!=="fullscreen" || opt.fullScreenAutoWidth!="on") { 14853 var cp = container.parent(), 14854 mb = cp.css('marginBottom'), 14855 mt = cp.css('marginTop'), 14856 cid = container.attr('id')+"_forcefullwidth"; 14857 mb = mb===undefined ? 0 : mb; 14858 mt = mt===undefined ? 0 : mt; 14859 14860 cp.wrap('<div class="forcefullwidth_wrapper_tp_banner" id="'+cid+'" style="position:relative;width:100%;height:auto;margin-top:'+mt+';margin-bottom:'+mb+'"></div>'); 14861 container.closest('.forcefullwidth_wrapper_tp_banner').append('<div class="tp-fullwidth-forcer" style="width:100%;height:'+container.height()+'px"></div>'); 14862 container.parent().css({marginTop:"0px",marginBottom:"0px"}); 14863 //container.css({'backgroundColor':container.parent().css('backgroundColor'),'backgroundImage':container.parent().css('backgroundImage')}); 14864 container.parent().css({position:'absolute'}); 14865 } 14866 } 14867 14868 14869 14870 // SHADOW ADD ONS 14871 if (opt.shadow!==undefined && opt.shadow>0) { 14872 container.parent().addClass('tp-shadow'+opt.shadow); 14873 container.parent().append('<div class="tp-shadowcover"></div>'); 14874 container.parent().find('.tp-shadowcover').css({'backgroundColor':container.parent().css('backgroundColor'),'backgroundImage':container.parent().css('backgroundImage')}); 14875 } 14876 14877 // ESTIMATE THE CURRENT WINDOWS RANGE INDEX 14878 setCurWinRange(opt); 14879 setCurWinRange(opt,true); 14880 14881 // IF THE CONTAINER IS NOT YET INITIALISED, LETS GO FOR IT 14882 if (!container.hasClass("revslider-initialised")) { 14883 // MARK THAT THE CONTAINER IS INITIALISED WITH SLIDER REVOLUTION ALREADY 14884 container.addClass("revslider-initialised"); 14885 14886 // FOR BETTER SELECTION, ADD SOME BASIC CLASS 14887 container.addClass("tp-simpleresponsive"); 14888 14889 // WE DONT HAVE ANY ID YET ? WE NEED ONE ! LETS GIVE ONE RANDOMLY FOR RUNTIME 14890 if (container.attr('id')==undefined) container.attr('id',"revslider-"+Math.round(Math.random()*1000+5)); 14891 14892 // CHECK IF FIREFOX 13 IS ON WAY.. IT HAS A STRANGE BUG, CSS ANIMATE SHOULD NOT BE USED 14893 opt.firefox13 = false; 14894 opt.ie = !jQuery.support.opacity; 14895 opt.ie9 = (document.documentMode == 9); 14896 14897 opt.origcd=opt.delay; 14898 14899 14900 14901 // CHECK THE jQUERY VERSION 14902 var version = jQuery.fn.jquery.split('.'), 14903 versionTop = parseFloat(version[0]), 14904 versionMinor = parseFloat(version[1]), 14905 versionIncrement = parseFloat(version[2] || '0'); 14906 if (versionTop==1 && versionMinor < 7) 14907 container.html('<div style="text-align:center; padding:40px 0px; font-size:20px; color:#992222;"> The Current Version of jQuery:'+version+' <br>Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin</div>'); 14908 if (versionTop>1) opt.ie=false; 14909 14910 14911 14912 // PREPARE VIDEO PLAYERS 14913 var addedApis = new Object(); 14914 addedApis.addedyt=0; 14915 addedApis.addedvim=0; 14916 addedApis.addedvid=0; 14917 14918 container.find('.tp-caption, .rs-background-video-layer').each(function(i) { 14919 var _nc = jQuery(this), 14920 an = _nc.data('autoplayonlyfirsttime'), 14921 ap = _nc.data('autoplay'), 14922 al = _nc.hasClass("tp-audiolayer"), 14923 loop = _nc.data('videoloop'); 14924 14925 14926 if (_nc.hasClass("tp-static-layer") && _R.handleStaticLayers) 14927 _R.handleStaticLayers(_nc,opt); 14928 14929 var pom = _nc.data('noposteronmobile') || _nc.data('noPosterOnMobile') || _nc.data('posteronmobile') || _nc.data('posterOnMobile') || _nc.data('posterOnMObile'); 14930 _nc.data('noposteronmobile',pom); 14931 14932 // FIX VISIBLE IFRAME BUG IN SAFARI 14933 var iff = 0; 14934 _nc.find('iframe').each(function() { 14935 punchgs.TweenLite.set(jQuery(this),{autoAlpha:0}); 14936 iff++; 14937 }) 14938 if (iff>0) 14939 _nc.data('iframes',true) 14940 14941 if (_nc.hasClass("tp-caption")) { 14942 // PREPARE LAYERS AND WRAP THEM WITH PARALLAX, LOOP, MASK HELP CONTAINERS 14943 var ec = _nc.hasClass("slidelink") ? "width:100% !important;height:100% !important;" : ""; 14944 _nc.wrap('<div class="tp-parallax-wrap" style="'+ec+'position:absolute;visibility:hidden"><div class="tp-loop-wrap" style="'+ec+'position:absolute;"><div class="tp-mask-wrap" style="'+ec+'position:absolute" ></div></div></div>'); 14945 var lar = ['pendulum', 'rotate','slideloop','pulse','wave'], 14946 _lc = _nc.closest('.tp-loop-wrap'); 14947 14948 jQuery.each(lar,function(i,k) { 14949 var lw = _nc.find('.rs-'+k), 14950 f = lw.data() || ""; 14951 if (f!="") { 14952 _lc.data(f); 14953 _lc.addClass("rs-"+k); 14954 lw.children(0).unwrap(); 14955 _nc.data('loopanimation',"on"); 14956 } 14957 }); 14958 punchgs.TweenLite.set(_nc,{visibility:"hidden"}); 14959 } 14960 14961 var as = _nc.data('actions');
14962 if (as!==undefined) _R.checkActions(_nc,opt,as); 14963 14964 checkHoverDependencies(_nc,opt); 14965 14966 if (_R.checkVideoApis) 14967 addedApis = _R.checkVideoApis(_nc,opt,addedApis); 14968 14969 // REMOVE VIDEO AUTOPLAYS FOR MOBILE DEVICES 14970 if (_ISM) { 14971 if (an == true || an=="true") { 14972 _nc.data('autoplayonlyfirsttime',"false"); 14973 an=false; 14974 } 14975 if (ap==true || ap=="true" || ap=="on" || ap=="1sttime") { 14976 _nc.data('autoplay',"off"); 14977 ap="off"; 14978 } 14979 } 14980 14981 //loop = loop=="none" && _nc.hasClass('rs-background-video-layer') ? "loopandnoslidestop" : loop; 14982 14983 _nc.data('videoloop',loop); 14984 14985 14986 // PREPARE TIMER BEHAVIOUR BASED ON AUTO PLAYED VIDEOS IN SLIDES 14987 if (!al && (an == true || an=="true" || ap == "1sttime") && loop !="loopandnoslidestop") 14988 _nc.closest('li.tp-revslider-slidesli').addClass("rs-pause-timer-once"); 14989 14990 14991 if (!al && (ap==true || ap=="true" || ap == "on" || ap == "no1sttime") && loop !="loopandnoslidestop") 14992 _nc.closest('li.tp-revslider-slidesli').addClass("rs-pause-timer-always"); 14993 14994 14995 14996 14997 }); 14998 14999 container[0].addEventListener('mouseenter',function() { 15000 container.trigger('tp-mouseenter'); 15001 opt.overcontainer=true; 15002 },{passive:true}); 15003 15004 container[0].addEventListener('mouseover',function() { 15005 container.trigger('tp-mouseover'); 15006 opt.overcontainer=true; 15007 },{passive:true}); 15008 15009 container[0].addEventListener('mouseleave',function() { 15010 container.trigger('tp-mouseleft'); 15011 opt.overcontainer=false; 15012 },{passive:true}); 15013 15014 // REMOVE ANY VIDEO JS SETTINGS OF THE VIDEO IF NEEDED (OLD FALL BACK, AND HELP FOR 3THD PARTY PLUGIN CONFLICTS) 15015 container.find('.tp-caption video').each(function(i) { 15016 var v = jQuery(this); 15017 v.removeClass("video-js vjs-default-skin"); 15018 v.attr("preload",""); 15019 v.css({display:"none"}); 15020 }); 15021 15022 //PREPARE LOADINGS ALL IN SEQUENCE 15023 if (opt.sliderType!=="standard") opt.lazyType = "all"; 15024 15025 15026 // PRELOAD STATIC LAYERS 15027 loadImages(container.find('.tp-static-layers'),opt,0,true); 15028 15029 waitForCurrentImages(container.find('.tp-static-layers'),opt,function() { 15030 container.find('.tp-static-layers img').each(function() { 15031 var e = jQuery(this), 15032 src = e.data('lazyload') != undefined ? e.data('lazyload') : e.attr('src'), 15033 loadobj = getLoadObj(opt,src); 15034 e.attr('src',loadobj.src) 15035 }) 15036 }) 15037 15038 15039 15040 // SET ALL LI AN INDEX AND INIT LAZY LOADING 15041 opt.allli.each(function(i) { 15042 var li = jQuery(this); 15043 15044 if (opt.lazyType=="all" || (opt.lazyType=="smart" && (i==0 || i == 1 || i == opt.slideamount || i == opt.slideamount-1))) { 15045 loadImages(li,opt,i); 15046 waitForCurrentImages(li,opt,function() { 15047 if (opt.sliderType=="carousel") 15048 punchgs.TweenLite.to(li,1,{autoAlpha:1,ease:punchgs.Power3.easeInOut}); 15049 }); 15050 } 15051 15052 }); 15053 15054 15055 15056 // IF DEEPLINK HAS BEEN SET 15057 var deeplink = getUrlVars("#")[0]; 15058 if (deeplink.length<9) { 15059 if (deeplink.split('slide').length>1) { 15060 var dslide=parseInt(deeplink.split('slide')[1],0); 15061 if (dslide<1) dslide=1; 15062 if (dslide>opt.slideamount) dslide=opt.slideamount; 15063 opt.startWithSlide=dslide-1; 15064 } 15065 } 15066 15067 // PREPARE THE SPINNER 15068 container.append( '<div class="tp-loader '+opt.spinner+'">'+ 15069 '<div class="dot1"></div>'+ 15070 '<div class="dot2"></div>'+ 15071 '<div class="bounce1"></div>'+ 15072 '<div class="bounce2"></div>'+ 15073 '<div class="bounce3"></div>'+ 15074 '</div>'); 15075 15076 15077 // RESET THE TIMER 15078 if (container.find('.tp-bannertimer').length===0) container.append('<div class="tp-bannertimer" style="visibility:hidden"></div>'); 15079 container.find('.tp-bannertimer').css({'width':'0%'}); 15080 container.find('.tp-bannertimer').data('opt',opt); 15081 15082 15083 // PREPARE THE SLIDES 15084 opt.ul.css({'display':'block'}); 15085 prepareSlides(container,opt); 15086 if (opt.parallax.type!=="off" && _R.checkForParallax) _R.checkForParallax(container,opt); 15087 15088 15089 // PREPARE SLIDER SIZE 15090 _R.setSize(opt); 15091 15092 15093 // Call the Navigation Builder 15094 if (opt.sliderType!=="hero" && _R.createNavigation) _R.createNavigation(container,opt); 15095 if (_R.resizeThumbsTabs && _R.resizeThumbsTabs) _R.resizeThumbsTabs(opt); 15096 contWidthManager(opt); 15097 var _v = opt.viewPort; 15098 opt.inviewport = false; 15099 15100 if (_v !=undefined && _v.enable) { 15101 if (!jQuery.isNumeric(_v.visible_area)) 15102 if (_v.visible_area.indexOf('%')!==-1) 15103 _v.visible_area = parseInt(_v.visible_area)/100; 15104 15105 if (_R.scrollTicker) _R.scrollTicker(opt,container); 15106 } 15107 15108 15109 15110 // START THE SLIDER 15111 setTimeout(function() { 15112 if ( opt.sliderType =="carousel" && _R.prepareCarousel) _R.prepareCarousel(opt); 15113 15114 if (!_v.enable || (_v.enable && opt.inviewport) || (_v.enable && !opt.inviewport && !_v.outof=="wait")) { 15115 swapSlide(container,opt); 15116 } 15117 else 15118 opt.waitForFirstSlide = true; 15119 15120 if (_R.manageNavigation) _R.manageNavigation(opt); 15121 15122 15123 // START COUNTDOWN 15124 if (opt.slideamount>1) { 15125 if (!_v.enable || (_v.enable && opt.inviewport)) 15126 countDown(container,opt); 15127 else 15128 opt.waitForCountDown = true; 15129 } 15130 setTimeout(function() { 15131 container.trigger('revolution.slide.onloaded'); 15132 },100); 15133 },opt.startDelay); 15134 opt.startDelay=0; 15135 15136 15137 15138 /****************************** 15139 - FULLSCREEN CHANGE - 15140 ********************************/ 15141 // FULLSCREEN MODE TESTING 15142 jQuery("body").data('rs-fullScreenMode',false); 15143 15144 15145 window.addEventListener('fullscreenchange',onFullScreenChange,{passive:true}); 15146 window.addEventListener('mozfullscreenchange',onFullScreenChange,{passive:true}); 15147 window.addEventListener('webkitfullscreenchange',onFullScreenChange,{passive:true}); 15148 15149 15150 15151 var resizid = "resize.revslider-"+container.attr('id'); 15152 15153 // IF RESIZED, NEED TO STOP ACTUAL TRANSITION AND RESIZE ACTUAL IMAGES 15154 jQuery(window).on(resizid,function() { 15155 console.log("happening") 15156 if (container==undefined) return false; 15157 15158 if (jQuery('body').find(container)!=0) 15159 contWidthManager(opt); 15160 15161 var hchange = false; 15162 15163 if (opt.sliderLayout=="fullscreen") { 15164 var jwh = jQuery(window).height(); 15165 if ((opt.fallbacks.ignoreHeightChanges=="mobile" && _ISM) || opt.fallbacks.ignoreHeightChanges=="always") { 15166 opt.fallbacks.ignoreHeightChangesSize = opt.fallbacks.ignoreHeightChangesSize == undefined ? 0 : opt.fallbacks.ignoreHeightChangesSize; 15167 hchange = (jwh!=opt.lastwindowheight) && (Math.abs(jwh-opt.lastwindowheight) > opt.fallbacks.ignoreHeightChangesSize) 15168 } else { 15169 hchange = (jwh!=opt.lastwindowheight) 15170 } 15171 } 15172 15173 15174 if (container.outerWidth(true)!=opt.width || container.is(":hidden") || (hchange)) { 15175 opt.lastwindowheight = jQuery(window).height(); 15176 containerResized(container,opt); 15177 } 15178 15179 15180 }); 15181 15182 hideSliderUnder(container,opt); 15183 contWidthManager(opt); 15184 if (!opt.fallbacks.disableFocusListener && opt.fallbacks.disableFocusListener != "true" && opt.fallbacks.disableFocusListener !== true) tabBlurringCheck(container,opt); 15185 } 15186} 15187 15188/************************************* 15189 - CREATE SIMPLE ARRAYS - 15190**************************************/ 15191var cArray = function(b,l) { 15192 if (!jQuery.isArray(b)) { 15193 var t = b; 15194 b = new Array(); 15195 b.push(t); 15196 } 15197 if (b.length<l) { 15198 var t = b[b.length-1]; 15199 for (var i=0;i<(l-b.length)+2;i++) 15200 b.push(t) 15201 } 15202 return b; 15203} 15204 15205 15206
15207var checkHoverDependencies = function(_nc,opt) { 15208 15209 if (_nc.data('start')==="sliderenter") { 15210 if (opt.layersonhover===undefined) { 15211 opt.c.on('tp-mouseenter',function() { 15212 if (opt.layersonhover) 15213 jQuery.each(opt.layersonhover,function(i,tnc) { 15214 tnc.data('animdirection',"in"); 15215 var otl = tnc.data('timeline_out'), 15216 base_offsetx = opt.sliderType==="carousel" ? 0 : opt.width/2 - (opt.gridwidth[opt.curWinRange]*opt.bw)/2, 15217 base_offsety=0, 15218 cli = tnc.closest('.tp-revslider-slidesli'), 15219 stl = tnc.closest('.tp-static-layers'); 15220 15221 if ((cli.length>0 && (cli.hasClass("active-revslide")) || cli.hasClass("processing-revslide")) || (stl.length>0)) { 15222 15223 if (otl!=undefined) { 15224 otl.pause(0); 15225 otl.kill(); 15226 } 15227 _R.animateSingleCaption(tnc,opt,base_offsetx,base_offsety,0,false,true); 15228 var tl = tnc.data('timeline'); 15229 tnc.data('triggerstate',"on"); 15230 tl.play(0); 15231 } 15232 }); 15233 }); 15234 opt.c.on('tp-mouseleft',function() { 15235 if (opt.layersonhover) 15236 jQuery.each(opt.layersonhover,function(i,tnc) { 15237 tnc.data('animdirection',"out"); 15238 tnc.data('triggered',true); 15239 tnc.data('triggerstate',"off"); 15240 if (_R.stopVideo) _R.stopVideo(tnc,opt); 15241 if (_R.endMoveCaption) _R.endMoveCaption(tnc,null,null,opt); 15242 }); 15243 }); 15244 opt.layersonhover = new Array; 15245 } 15246 opt.layersonhover.push(_nc); 15247 } 15248} 15249 15250 15251 15252var contWidthManager = function(opt) { 15253 15254 var rl = _R.getHorizontalOffset(opt.c,"left"); 15255 15256 if (opt.sliderLayout!="auto" && (opt.sliderLayout!=="fullscreen" || opt.fullScreenAutoWidth!="on")) { 15257 var loff = Math.ceil(opt.c.closest('.forcefullwidth_wrapper_tp_banner').offset().left - rl); 15258 punchgs.TweenLite.set(opt.c.parent(),{'left':(0-loff)+"px",'width':jQuery(window).width()-_R.getHorizontalOffset(opt.c,"both")}); 15259 } else { 15260 if (opt.sliderLayout=="fullscreen" && opt.fullScreenAutoWidth=="on") 15261 punchgs.TweenLite.set(opt.ul,{left:0,width:opt.c.width()}); 15262 else 15263 punchgs.TweenLite.set(opt.ul,{left:rl,width:opt.c.width()-_R.getHorizontalOffset(opt.c,"both")}); 15264 } 15265 15266 15267 // put Static Layer Wrapper in Position 15268 if (opt.slayers && (opt.sliderLayout!="fullwidth" && opt.sliderLayout!="fullscreen")) 15269 punchgs.TweenLite.set(opt.slayers,{left:rl}); 15270} 15271 15272 15273var cv = function(a,d) { 15274 return a===undefined ? d : a; 15275} 15276 15277 15278var hideSliderUnder = function(container,opt,resized) { 15279 // FIRST TIME STOP/START HIDE / SHOW SLIDER 15280 //REMOVE AND SHOW SLIDER ON DEMAND 15281 var contpar= container.parent(); 15282 if (jQuery(window).width()<opt.hideSliderAtLimit) { 15283 container.trigger('stoptimer'); 15284 if (contpar.css('display')!="none") 15285 contpar.data('olddisplay',contpar.css('display')); 15286 contpar.css({display:"none"}); 15287 } else { 15288 if (container.is(":hidden") && resized) { 15289 if (contpar.data('olddisplay')!=undefined && contpar.data('olddisplay')!="undefined" && contpar.data('olddisplay') != "none") 15290 contpar.css({display:contpar.data('olddisplay')}); 15291 else 15292 contpar.css({display:"block"}); 15293 container.trigger('restarttimer'); 15294 setTimeout(function() { 15295 containerResized(container,opt); 15296 },150) 15297 } 15298 } 15299 if (_R.hideUnHideNav) _R.hideUnHideNav(opt); 15300} 15301 15302 15303////////////////////////// 15304// CONTAINER RESIZED // 15305///////////////////////// 15306var containerResized = function (c,opt) { 15307 if (opt.infullscreenmode == true) 15308 opt.minHeight = jQuery(window).height(); 15309 15310 15311 setCurWinRange(opt); 15312 setCurWinRange(opt,true); 15313 if (!_R.resizeThumbsTabs || _R.resizeThumbsTabs(opt)===true) { 15314 15315 hideSliderUnder(c,opt,true); 15316 contWidthManager(opt); 15317 15318 if ( opt.sliderType =="carousel") _R.prepareCarousel(opt,true); 15319 15320 if (c===undefined) return false; 15321 15322 _R.setSize(opt); 15323 15324 opt.conw = opt.c.width(); 15325 opt.conh = opt.infullscreenmode ? opt.minHeight : opt.c.height(); 15326 15327 15328 var actsh = c.find('.active-revslide .slotholder'), 15329 nextsh = c.find('.processing-revslide .slotholder'); 15330 15331 removeSlots(c,opt,c,2); 15332 15333 if (opt.sliderType==="standard") { 15334 punchgs.TweenLite.set(nextsh.find('.defaultimg'),{opacity:0}
15334); 15335 actsh.find('.defaultimg').css({'opacity':1}); 15336 } 15337 15338 15339 if ( opt.sliderType =="carousel" && opt.lastconw != opt.conw) { 15340 clearTimeout(opt.pcartimer); 15341 opt.pcartimer = setTimeout(function() { 15342 _R.prepareCarousel(opt,true); 15343 },100); 15344 opt.lastconw = opt.conw; 15345 } 15346 15347 if (_R.manageNavigation) _R.manageNavigation(opt); 15348 15349 15350 if (_R.animateTheCaptions) _R.animateTheCaptions(c.find('.active-revslide'), opt,true); 15351 15352 if (nextsh.data('kenburns')=="on") 15353 _R.startKenBurn(nextsh,opt,nextsh.data('kbtl').progress()); 15354 15355 if (actsh.data('kenburns')=="on") 15356 _R.startKenBurn(actsh,opt,actsh.data('kbtl').progress()); 15357 15358 // DOUBLE CALL FOR SOME FUNCTION TO AVOID PORTRAIT/LANDSCAPE ISSUES, AND TO AVOID FULLSCREEN/NORMAL SWAP ISSUES 15359 if (_R.animateTheCaptions) _R.animateTheCaptions(nextsh.closest('li'), opt,true); 15360 if (_R.manageNavigation) _R.manageNavigation(opt); 15361 15362 } 15363 15364} 15365 15366 15367 15368 15369 15370 15371//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 15372/////////////////////////////////////////////////////////////////////////////// PREPARING / REMOVING //////////////////////////////////////////////////////// 15373//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 15374var setScale = function(opt) { 15375 opt.bw = (opt.width / opt.gridwidth[opt.curWinRange]); 15376 opt.bh = (opt.height / opt.gridheight[opt.curWinRange]); 15377 15378 15379 if (opt.bh>opt.bw) 15380 opt.bh=opt.bw 15381 else 15382 opt.bw = opt.bh; 15383 15384 if (opt.bh>1 || opt.bw>1) { opt.bw=1; opt.bh=1; } 15385} 15386 15387 15388 15389 15390 15391///////////////////////////////////////// 15392// - PREPARE THE SLIDES / SLOTS - // 15393/////////////////////////////////////// 15394var prepareSlides = function(container,opt) { 15395 15396 container.find('.tp-caption').each(function() { 15397 var c = jQuery(this); 15398 if (c.data('transition')!==undefined) c.addClass(c.data('transition')); 15399 }); 15400 15401 // PREPARE THE UL CONTAINER TO HAVEING MAX HEIGHT AND HEIGHT FOR ANY SITUATION 15402 opt.ul.css({overflow:'hidden',width:'100%',height:'100%',maxHeight:container.parent().css('maxHeight')}) 15403 if (opt.autoHeight=="on") { 15404 opt.ul.css({overflow:'hidden',width:'100%',height:'100%',maxHeight:"none"}); 15405 container.css({'maxHeight':'none'}); 15406 container.parent().css({'maxHeight':'none'}); 15407 } 15408 //_R.setSize("",opt); 15409 opt.allli.each(function(j) { 15410 var li=jQuery(this), 15411 originalIndex = li.data('originalindex'); 15412 15413 //START WITH CORRECT SLIDE 15414 if ((opt.startWithSlide !=undefined && originalIndex==opt.startWithSlide) || opt.startWithSlide ===undefined && j==0) 15415 li.addClass("next-revslide"); 15416 15417 15418 // MAKE LI OVERFLOW HIDDEN FOR FURTHER ISSUES 15419 li.css({'width':'100%','height':'100%','overflow':'hidden'}); 15420 15421 }); 15422 15423 if (opt.sliderType === "carousel") { 15424 //SET CAROUSEL 15425 opt.ul.css({overflow:"visible"}).wrap('<div class="tp-carousel-wrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden;"></div>'); 15426 var apt = '<div style="clear:both;display:block;width:100%;height:1px;position:relative;margin-bottom:-1px"></div>'; 15427 opt.c.parent().prepend(apt); 15428 opt.c.parent().append(apt); 15429 _R.prepareCarousel(opt); 15430 } 15431 15432 // RESOLVE OVERFLOW HIDDEN OF MAIN CONTAINER 15433 container.parent().css({'overflow':'visible'}); 15434 15435 opt.allli.find('>img').each(function(j) { 15436 15437 var img=jQuery(this), 15438 bgvid = img.closest('li').find('.rs-background-video-layer'); 15439 15440 bgvid.addClass("defaultvid").css({zIndex:30}); 15441 15442 img.addClass('defaultimg'); 15443 15444 // TURN OF KEN BURNS IF WE ARE ON MOBILE AND IT IS WISHED SO 15445 if (opt.fallbacks.panZoomDisableOnMobile == "on" && _ISM) { 15446 img.data('kenburns',"off"); 15447 img.data('bgfit',"cover"); 15448 } 15449 15450 img.wrap('<div class="slotholder" style="position:absolute; top:0px; left:0px; z-index:0;width:100%;height:100%;"></div>'); 15451 bgvid.appendTo(img.closest('li').find('.slotholder')); 15452 var dts = img.data(); 15453 img.closest('.slotholder').data(dts); 15454 15455 if (bgvid.length>0 && dts.bgparallax!=undefined) 15456 bgvid.data('bgparallax',dts.bgparallax); 15457 15458 if (opt.dottedOverlay!="none" && opt.dottedOverlay!=undefined) 15459 img.closest('.slotholder').append('<div class="tp-dottedoverlay '+opt.dottedOverlay+'"></div>'); 15460 15461 var src=img.attr('src'); 15462 dts.src = src; 15463 dts.bgfit = dts.bgfit || "cover"; 15464 dts.bgrepeat = dts.bgrepeat || "no-repeat", 15465 dts.bgposition = dts.bgposition || "center center"; 15466 15467 var pari = img.closest('.slotholder'); 15468 img.parent().append('<div class="tp-bgimg defaultimg" style="background-color:'+img.css("backgroundColor")+';background-repeat:'+dts.bgrepeat+';background-image:url('+src+');background-size:'+dts.bgfit+';background-position:'+dts.bgposition+';width:100%;height:100%;"></div>'); 15469 var comment = document.createComment("Runtime Modification - Img tag is Still Available for SEO Goals in Source - " + img.get(0).outerHTML); 15470 img.replaceWith(comment); 15471 img = pari.find('.tp-bgimg'); 15472 img.data(dts); 15473 img.attr("src",src); 15474 15475 if (opt.sliderType === "standard" || opt.sliderType==="undefined") 15476 img.css({'opacity':0}); 15477 15478 }) 15479 15480 15481} 15482 15483 15484// REMOVE SLOTS // 15485var removeSlots = function(container,opt,where,addon) { 15486 opt.removePrepare = opt.removePrepare + addon; 15487 where.find('.slot, .slot-circle-wrapper').each(function() { 15488 jQuery(this).remove(); 15489 }); 15490 opt.transition = 0; 15491 opt.removePrepare = 0; 15492} 15493 15494 15495////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
15496/////////////////////////////////////////////////////////////////////////////// SLIDE SWAPS //////////////////////////////////////////////////////////// 15497//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 15498 15499 15500// THE IMAGE IS LOADED, WIDTH, HEIGHT CAN BE SAVED 15501var cutParams = function(a) { 15502 var b = a; 15503 if (a!=undefined && a.length>0) 15504 b = a.split("?")[0]; 15505 return b; 15506} 15507 15508var relativeRedir = function(redir){ 15509 return location.pathname.replace(/(.*)\/[^/]*/, "$1/"+redir); 15510} 15511 15512var abstorel = function (base, relative) { 15513 var stack = base.split("/"), 15514 parts = relative.split("/"); 15515 stack.pop(); // remove current file name (or empty string) 15516 // (omit if "base" is the current folder without trailing slash) 15517 for (var i=0; i<parts.length; i++) { 15518 if (parts[i] == ".") 15519 continue; 15520 if (parts[i] == "..") 15521 stack.pop(); 15522 else 15523 stack.push(parts[i]); 15524 } 15525 return stack.join("/"); 15526} 15527 15528var imgLoaded = function(img,opt,progress) { 15529 opt.syncload--; 15530 if (opt.loadqueue) 15531 jQuery.each(opt.loadqueue, function(index,queue) { 15532 15533 var mqsrc = queue.src.replace(/\.\.\/\.\.\//gi,""), 15534 fullsrc = self.location.href, 15535 origin = document.location.origin, 15536 fullsrc_b = fullsrc.substring(0,fullsrc.length-1)+"/"+mqsrc, 15537 origin_b = origin+"/"+mqsrc, 15538 absolute = abstorel(self.location.href,queue.src); 15539 15540 fullsrc = fullsrc.substring(0,fullsrc.length-1)+mqsrc; 15541 origin = origin+mqsrc; 15542 15543 if (cutParams(origin) === cutParams(decodeURIComponent(img.src)) || 15544 cutParams(fullsrc)=== cutParams(decodeURIComponent(img.src)) || 15545 cutParams(absolute)=== cutParams(decodeURIComponent(img.src)) || 15546 cutParams(origin_b) === cutParams(decodeURIComponent(img.src)) || 15547 cutParams(fullsrc_b)=== cutParams(decodeURIComponent(img.src)) || 15548 cutParams(queue.src) === cutParams(decodeURIComponent(img.src)) || 15549 cutParams(queue.src).replace(/^.*\/\/[^\/]+/, '') === cutParams(decodeURIComponent(img.src)).replace(/^.*\/\/[^\/]+/, '') || 15550 (window.location.origin==="file://" && cutParams(img.src).match(new RegExp(mqsrc)))) { 15551 queue.progress = progress; 15552 queue.width = img.width; 15553 queue.height = img.height; 15554 } 15555 }); 15556 progressImageLoad(opt); 15557} 15558 15559// PRELOAD IMAGES 3 PIECES ON ONE GO, CHECK LOAD PRIORITY 15560var progressImageLoad = function(opt) { 15561 if (opt.syncload == 3) return; 15562 if (opt.loadqueue) 15563 jQuery.each(opt.loadqueue, function(index,queue) { 15564 if (queue.progress.match(/prepared/g)) { 15565 if (opt.syncload<=3) { 15566 opt.syncload++; 15567 if (queue.type=="img") { 15568 var img = new Image(); 15569 15570 img.onload = function() { 15571 imgLoaded(this,opt,"loaded"); 15572 queue.error = false; 15573 }; 15574 img.onerror = function() { 15575 imgLoaded(this,opt,"failed"); 15576 queue.error = true; 15577 }; 15578 15579 img.src=queue.src; 15580 } else { 15581 jQuery.get(queue.src, function(data) { 15582 queue.innerHTML = new XMLSerializer().serializeToString(data.documentElement); 15583 queue.progress="loaded"; 15584 opt.syncload--; 15585 progressImageLoad(opt); 15586 }).fail(function() { 15587 queue.progress="failed"; 15588 opt.syncload--; 15589 progressImageLoad(opt); 15590 }); 15591 } 15592 queue.progress="inload"; 15593 } 15594 } 15595 }); 15596} 15597 15598 15599 15600// ADD TO QUEUE THE NOT LOADED IMAGES YES 15601var addToLoadQueue = function(src,opt,prio,type,staticlayer) { 15602 var alreadyexist = false; 15603 if (opt.loadqueue) 15604 jQuery.each(opt.loadqueue, function(index,queue) { 15605 if (queue.src === src) alreadyexist = true; 15606 }); 15607 15608 15609 if (!alreadyexist) { 15610 var loadobj = new Object(); 15611 loadobj.src = src; 15612 loadobj.starttoload = jQuery.now(); 15613 loadobj.type = type || "img"; 15614 loadobj.prio = prio; 15615 loadobj.progress = "prepared"; 15616 loadobj.static = staticlayer; 15617 opt.loadqueue.push(loadobj); 15618 } 15619 15620} 15621 15622// LOAD THE IMAGES OF THE PREDEFINED CONTAINER 15623var loadImages = function(container,opt,prio,staticlayer) { 15624 15625 container.find('img,.defaultimg, .tp-svg-layer').each(function() { 15626 var element = jQuery(this), 15627 src = element.data('lazyload') !== undefined && element.data('lazyload')!=="undefined" ? element.data('lazyload') : element.data('svg_src') !=u
15627ndefined ? element.data('svg_src') : element.attr('src'), 15628 type = element.data('svg_src') !=undefined ? "svg" : "img"; 15629 15630 element.data('start-to-load',jQuery.now()); 15631 addToLoadQueue(src,opt,prio,type,staticlayer); 15632 }); 15633 progressImageLoad(opt); 15634} 15635 15636 15637// FIND SEARCHED IMAGE/SRC IN THE LOAD QUEUE 15638var getLoadObj = function(opt,src) { 15639 var obj = new Object(); 15640 if (opt.loadqueue) 15641 jQuery.each(opt.loadqueue, function(index,queue) { 15642 if (queue.src == src) obj = queue; 15643 }); 15644 return obj; 15645} 15646 15647// WAIT PROGRESS TILL THE PREDEFINED CONTAINER HAS ALL IMAGES LOADED INSIDE 15648var waitForCurrentImages = function(nextli,opt,callback) { 15649 15650 var waitforload = false; 15651 15652 15653 // PRELOAD ALL IMAGES 15654 nextli.find('img,.defaultimg, .tp-svg-layer').each(function() { 15655 var element = jQuery(this), 15656 src = element.data('lazyload') != undefined ? element.data('lazyload') : element.data('svg_src') !=undefined ? element.data('svg_src') : element.attr('src'), 15657 loadobj = getLoadObj(opt,src); 15658 15659 15660 // IF ELEMENTS IS NOT LOADED YET, AND IT IS NOW LOADED 15661 if (element.data('loaded')===undefined && loadobj !==undefined && loadobj.progress && loadobj.progress.match(/loaded/g)) { 15662 15663 element.attr('src',loadobj.src); 15664 15665 15666 // IF IT IS A DEFAULT IMG, WE NEED TO ASSIGN SOME SPECIAL VALUES TO IT 15667 if (loadobj.type=="img") { 15668 if (element.hasClass("defaultimg")) { 15669 if (!_R.isIE(8)) 15670 element.css({backgroundImage:'url("'+loadobj.src+'")'}); 15671 else { 15672 defimg.attr('src',loadobj.src); 15673 } 15674 nextli.data('owidth',loadobj.width); 15675 nextli.data('oheight',loadobj.height); 15676 nextli.find('.slotholder').data('owidth',loadobj.width); 15677 nextli.find('.slotholder').data('oheight',loadobj.height); 15678 } else { 15679 var w = element.data('ww'), 15680 h = element.data('hh'); 15681 15682 element.data('owidth',loadobj.width); 15683 element.data('oheight',loadobj.height); 15684 15685 w = w==undefined || w =="auto" || w=="" ? loadobj.width : w; 15686 h = h==undefined || h =="auto" || h=="" ? loadobj.height : h; 15687 15688 15689 element.data('ww',w); 15690 element.data('hh',h); 15691 15692 } 15693 } else 15694 15695 if (loadobj.type=="svg" && loadobj.progress=="loaded") { 15696 15697 element.append('<div class="tp-svg-innercontainer"></div>'); 15698 element.find('.tp-svg-innercontainer').append(loadobj.innerHTML); 15699 } 15700 // ELEMENT IS NOW FULLY LOADED 15701 element.data('loaded',true); 15702 } 15703 15704 15705 if (loadobj && loadobj.progress && loadobj.progress.match(/inprogress|inload|prepared/g)) 15706 if (!loadobj.error && jQuery.now()-element.data('start-to-load')<5000) 15707 waitforload = true; 15708 else { 15709 loadobj.progress="failed"; 15710 if (!loadobj.reported_img) { 15711 loadobj.reported_img = true; 15712 console.warn(src+" Could not be loaded !"); 15713 } 15714 } 15715 15716 // WAIT FOR VIDEO API'S 15717 if (opt.youtubeapineeded == true && (!window['YT'] || YT.Player==undefined)) { 15718 waitforload = true; 15719 if (jQuery.now()-opt.youtubestarttime>5000 && opt.youtubewarning!=true) { 15720 opt.youtubewarning = true; 15721 var txt = "YouTube Api Could not be loaded !"; 15722 if (location.protocol === 'https:') txt = txt + " Please Check and Renew SSL Certificate !"; 15723 console.error(txt); 15724 opt.c.append('<div style="position:absolute;top:50%;width:100%;color:#e74c3c; font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+txt+'</strong></div>') 15725 } 15726 } 15727 15728 if (opt.vimeoapineeded == true && !window['Froogaloop']) { 15729 waitforload = true; 15730 if (jQuery.now()-opt.vimeostarttime>5000 && opt.vimeowarning!=true) { 15731 opt.vimeowarning= true; 15732 var txt = "Vimeo Froogaloop Api Could not be loaded !"; 15733 if (location.protocol === 'https:') txt = txt + " Please Check and Renew SSL Certificate !"; 15734 console.error(txt); 15735 opt.c.append('<div style="position:absolute;top:50%;width:100%;color:#e74c3c; font-size:16px; text-align:center; padding:15px;background:#000; display:block;"><strong>'+txt+'</strong></div>') 15736 } 15737 } 15738 15739 }); 15740 15741 if (!_ISM && opt.audioqueue && opt.audioqueue.length>0) { 15742 jQuery.each(opt.audioqueue,function(i,obj) { 15743 if (obj.status && obj.status==="prepared") 15744 if (jQuery.now() - obj.start<obj.waittime) 15745 waitforload = true; 15746 }); 15747 } 15748 15749 jQuery.each(opt.loadqueue,function(i,o) { 15750 if (o.static===true && (o.progress!="loaded" || o.progress==="failed")) { 15751 if (o.progress=="failed") { 15752 if (!o.reported) { 15753 o.reported = true; 15754 console.warn("Static Image "+o.src+" Could not be loaded in time. Error Exists:"+o.error); 15755 } 15756 } 15757 else 15758 if (!o.error && jQuery.now()-o.starttoload<5000) { 15759 waitforload = true; 15760 } 15761 else { 15762 if (!o.reported) { 15763 o.reported = true; 15764 console.warn("Static Image "+o.src+" Could not be loaded within 5s! Error E
15764xists:"+o.error); 15765 } 15766 } 15767 15768 } 15769 }); 15770 15771 if (waitforload) 15772 setTimeout(function() { 15773 waitForCurrentImages(nextli,opt,callback) ; 15774 },19); 15775 else 15776 setTimeout(callback,19); 15777 15778} 15779 15780 15781 15782 15783////////////////////////////////////// 15784// - CALL TO SWAP THE SLIDES - // 15785///////////////////////////////////// 15786var swapSlide = function(container,opt) { 15787 15788 clearTimeout(opt.waitWithSwapSlide); 15789 15790 15791 15792 if (container.find('.processing-revslide').length>0) { 15793 opt.waitWithSwapSlide = setTimeout(function() { 15794 swapSlide(container,opt); 15795 15796 },150); 15797 return false; 15798 } 15799 15800 var actli = container.find('.active-revslide'), 15801 nextli = container.find('.next-revslide'), 15802 defimg= nextli.find('.defaultimg'); 15803 15804 15805 if (nextli.index() === actli.index()) { 15806 nextli.removeClass("next-revslide"); 15807 return false; 15808 } 15809 15810 15811 nextli.removeClass("next-revslide").addClass("processing-revslide"); 15812 15813 nextli.data('slide_on_focus_amount',(nextli.data('slide_on_focus_amount')+1) || 1); 15814 // CHECK IF WE ARE ALREADY AT LAST ITEM TO PLAY IN REAL LOOP SESSION 15815 if (opt.stopLoop=="on" && nextli.index()==opt.lastslidetoshow-1) { 15816 container.find('.tp-bannertimer').css({'visibility':'hidden'}); 15817 container.trigger('revolution.slide.onstop'); 15818 opt.noloopanymore = 1; 15819 } 15820 15821 // INCREASE LOOP AMOUNTS 15822 if (nextli.index()===opt.slideamount-1) { 15823 opt.looptogo=opt.looptogo-1; 15824 if (opt.looptogo<=0) 15825 opt.stopLoop="on"; 15826 } 15827 15828 opt.tonpause = true; 15829 container.trigger('stoptimer'); 15830 opt.cd=0; 15831 if (opt.spinner==="off") 15832 container.find('.tp-loader').css({display:"none"}); 15833 else 15834 container.find('.tp-loader').css({display:"block"}); 15835 15836 15837 loadImages(nextli,opt,1); 15838 if (_R.preLoadAudio) _R.preLoadAudio(nextli,opt,1); 15839 15840 // WAIT FOR SWAP SLIDE PROGRESS 15841 waitForCurrentImages(nextli,opt,function() { 15842 15843 15844 // MANAGE BG VIDEOS 15845 nextli.find('.rs-background-video-layer').each(function() { 15846 var _nc = jQuery(this); 15847 if (!_nc.hasClass("HasListener")) { 15848 _nc.data('bgvideo',1); 15849 if (_R.manageVideoLayer) _R.manageVideoLayer(_nc,opt); 15850 } 15851 if (_nc.find('.rs-fullvideo-cover').length==0) 15852 _nc.append('<div class="rs-fullvideo-cover"></div>') 15853 }); 15854 swapSlideProgress(opt,defimg,container) 15855 }); 15856 15857} 15858 15859////////////////////////////////////// 15860// - PROGRESS SWAP THE SLIDES - // 15861///////////////////////////////////// 15862var swapSlideProgress = function(opt,defimg,container) { 15863 15864 var actli = container.find('.active-revslide'), 15865 nextli = container.find('.processing-revslide'), 15866 actsh = actli.find('.slotholder'), 15867 nextsh = nextli.find('.slotholder'); 15868 15869 15870 opt.tonpause=false; 15871 15872 opt.cd=0; 15873 15874 15875 15876 15877 container.find('.tp-loader').css({display:"none"}); 15878 // if ( opt.sliderType =="carousel") _R.prepareCarousel(opt); 15879 _R.setSize(opt); 15880 _R.slotSize(defimg,opt); 15881 15882 if (_R.manageNavigation) _R.manageNavigation(opt); 15883 var data={}; 15884 data.nextslide=nextli; 15885 data.currentslide=actli; 15886 container.trigger('revolution.slide.onbeforeswap',data); 15887 15888 opt.transition = 1; 15889 opt.videoplaying = false; 15890 15891 // IF DELAY HAS BEEN SET VIA THE SLIDE, WE TAKE THE NEW VALUE, OTHER WAY THE OLD ONE... 15892 if (nextli.data('delay')!=undefined) { 15893 opt.cd=0; 15894 opt.delay=nextli.data('delay'); 15895 } else 15896 opt.delay=opt.origcd; 15897 15898 15899 if (nextli.data('ssop')=="true" || nextli.data('ssop')===true) 15900 opt.ssop = true 15901 else 15902 opt.ssop = false; 15903 15904 15905 15906 container.trigger('nulltimer'); 15907 15908 var ai = actli.index(), 15909 ni = nextli.index(); 15910 opt.sdir = ni<ai ? 1 : 0; 15911 15912 if (opt.sc_indicator=="arrow") { 15913 if (ai==0 && ni==opt.slideamount-1) opt.sdir = 1; 15914 if (ai==opt.slideamount-1 && ni==0) opt.sdir = 0; 15915 } 15916 15917 opt.lsdir = opt.lsdir === undefined ? opt.sdir : opt.lsdir; 15918 opt.dirc = opt.lsdir != opt.sdir; 15919 opt.lsdir = opt.sdir; 15920 15921 /////////////////////////// 15922 // REMOVE THE CAPTIONS // 15923 /////////////////////////// 15924 15925 15926 15927 if (actli.index() != nextli.index() && opt.firststart!=1) 15928 if (_R.removeTheCaptions) _R.removeTheCaptions(actli,opt); 15929 15930 15931 if (!nextli.hasClass('rs-pause-timer-once') && !nextli.hasClass("rs-pause-timer-always")) 15932 container.trigger('restarttimer'); 15933 else 15934 opt.videoplaying = true; 15935 15936 nextli.removeClass("rs-pause-timer-once"); 15937 15938 var nexttrans, 15939 direction=-1, 15940 mtl; 15941 15942 // SELECT SLIDER TYPE 15943 if ( opt.sliderType =="carousel") { 15944 mtl = new punchgs.TimelineLite(); 15945 _R.prepareCarousel(opt,mtl); 15946 letItFree(container,opt,nextsh,actsh,nextli,actli,mtl); 15947 opt.transition = 0; 15948 opt.firststart = 0; 15949 } else { 15950 mtl = new punchgs.TimelineLite({onComplete:function() { 15951 letItFree(container,opt,nextsh,actsh,nextli,actli,mtl); 15952 }}); 15953 mtl.add(punchgs.TweenLite.set(nextsh.find('.defaultimg'),{opacity:0}
15953)); 15954 mtl.pause(); 15955 15956 if (opt.firststart==1) { 15957 punchgs.TweenLite.set(actli,{autoAlpha:0}); 15958 opt.firststart=0; 15959 } 15960 15961 15962 punchgs.TweenLite.set(actli,{zIndex:18}); 15963 punchgs.TweenLite.set(nextli,{autoAlpha:0,zIndex:20}); 15964 15965 15966 // IF THERE IS AN OTHER FIRST SLIDE START HAS BEED SELECTED 15967 if (nextli.data('differentissplayed') =='prepared') { 15968 nextli.data('differentissplayed','done'); 15969 nextli.data('transition',nextli.data('savedtransition')); 15970 nextli.data('slotamount',nextli.data('savedslotamount')); 15971 nextli.data('masterspeed',nextli.data('savedmasterspeed')); 15972 } 15973 15974 15975 if (nextli.data('fstransition') != undefined && nextli.data('differentissplayed') !="done") { 15976 15977 nextli.data('savedtransition',nextli.data('transition')); 15978 nextli.data('savedslotamount',nextli.data('slotamount')); 15979 nextli.data('savedmasterspeed',nextli.data('masterspeed')); 15980 nextli.data('transition',nextli.data('fstransition')); 15981 nextli.data('slotamount',nextli.data('fsslotamount')); 15982 nextli.data('masterspeed',nextli.data('fsmasterspeed')); 15983 nextli.data('differentissplayed','prepared'); 15984 } 15985 15986 if (nextli.data('transition')==undefined) nextli.data('transition',"random"); 15987 15988 nexttrans = 0; 15989 var transtext = nextli.data('transition') !== undefined ? nextli.data('transition').split(",") : "fade", 15990 curtransid = nextli.data('nexttransid') == undefined ? -1 : nextli.data('nexttransid'); 15991 if (nextli.data('randomtransition')=="on") 15992 curtransid = Math.round(Math.random()*transtext.length); 15993 else 15994 curtransid=curtransid+1; 15995 15996 if (curtransid==transtext.length) curtransid=0; 15997 nextli.data('nexttransid',curtransid); 15998 15999 var comingtransition = transtext[curtransid]; 16000 16001 if (opt.ie) { 16002 if (comingtransition=="boxfade") comingtransition = "boxslide"; 16003 if (comingtransition=="slotfade-vertical") comingtransition = "slotzoom-vertical"; 16004 if (comingtransition=="slotfade-horizontal") comingtransition = "slotzoom-horizontal"; 16005 } 16006 16007 if (_R.isIE(8)) 16008 comingtransition = 11; 16009 16010 16011 16012 mtl = _R.animateSlide(nexttrans, comingtransition, container, opt, nextli, actli, nextsh, actsh, mtl); 16013 if (nextsh.data('kenburns')=="on") { 16014 _R.startKenBurn(nextsh,opt); 16015 mtl.add(punchgs.TweenLite.set(nextsh,{autoAlpha:0})) 16016 } 16017 16018 // SHOW FIRST LI && ANIMATE THE CAPTIONS 16019 mtl.pause(); 16020 } 16021 16022 if (_R.scrollHandling) { 16023 _R.scrollHandling(opt, true); 16024 mtl.eventCallback("onUpdate",function() { 16025 _R.scrollHandling(opt, true); 16026 }); 16027 } 16028 16029 // START PARALLAX IF NEEDED 16030 if (opt.parallax.type!="off" && opt.parallax.firstgo==undefined && _R.scrollHandling) { 16031 opt.parallax.firstgo = true; 16032 opt.lastscrolltop = -999; 16033 _R.scrollHandling(opt,true); 16034 setTimeout(function() { 16035 opt.lastscrolltop = -999; 16036 _R.scrollHandling(opt,true); 16037 },210); 16038 setTimeout(function() { 16039 opt.lastscrolltop = -999; 16040 _R.scrollHandling(opt,true); 16041 },420); 16042 } 16043 16044 16045 if (_R.animateTheCaptions) { 16046 _R.animateTheCaptions(nextli, opt,null,mtl); 16047 } else { 16048 if (mtl != undefined) setTimeout(function() { 16049 mtl.resume(); 16050 },30); 16051 } 16052 punchgs.TweenLite.to(nextli,0.001,{autoAlpha:1}); 16053 16054 16055 //if (_R.callStaticDDDParallax) _R.callStaticDDDParallax(container,opt,nextli); 16056 16057} 16058 16059 16060////////////////////////////////////////// 16061// GIVE FREE THE TRANSITIOSN // 16062////////////////////////////////////////// 16063var letItFree = function(container,opt,nextsh,actsh,nextli,actli,mtl) { 16064 16065 if (opt.sliderType==="carousel") { 16066 // CAROUSEL SLIDER 16067 } else { 16068 opt.removePrepare = 0; 16069 punchgs.TweenLite.to(nextsh.find('.defaultimg'),0.001,{zIndex:20,autoAlpha:1,onComplete:function() { 16070 removeSlots(container,opt,nextli,1); 16071 16072 }}); 16073 if (nextli.index()!=actli.index()) { 16074 punchgs.TweenLite.to(actli,0.2,{zIndex:18,autoAlpha:0,onComplete:function() { 16075 removeSlots(container,opt,actli,1); 16076 }}); 16077 } 16078 } 16079 16080 16081 container.find('.active-revslide').removeClass("active-revslide"); 16082 container.find('.processing-revslide').removeClass("processing-revslide").addClass("active-revslide"); 16083 opt.act=nextli.index(); 16084
16085 opt.c.attr('data-slideactive',container.find('.active-revslide').data('index')); 16086 16087 16088 if (opt.parallax.type=="scroll" || opt.parallax.type=="scroll+mouse" || opt.parallax.type=="mouse+scroll") { 16089 opt.lastscrolltop = -999; 16090 _R.scrollHandling(opt); 16091 } 16092 16093 mtl.clear(); 16094 16095 16096 if (actsh.data('kbtl')!=undefined) { 16097 actsh.data('kbtl').reverse(); 16098 actsh.data('kbtl').timeScale(25); 16099 } 16100 if (nextsh.data('kenburns')=="on") { 16101 if (nextsh.data('kbtl')!=undefined) { 16102 nextsh.data('kbtl').timeScale(1); 16103 nextsh.data('kbtl').play(); 16104 } 16105 else 16106 _R.startKenBurn(nextsh,opt); 16107 } 16108 16109 nextli.find('.rs-background-video-layer').each(function(i) { 16110 if (_ISM) return false; 16111 var _nc = jQuery(this) 16112 _R.resetVideo(_nc,opt); 16113 16114 punchgs.TweenLite.fromTo(_nc,1,{autoAlpha:0},{autoAlpha:1,ease:punchgs.Power3.easeInOut,delay:0.2,onComplete:function() { 16115 if (_R.animcompleted) _R.animcompleted(_nc,opt); 16116 }}); 16117 }); 16118 16119 16120 actli.find('.rs-background-video-layer').each(function(i) { 16121 if (_ISM) return false; 16122 var _nc = jQuery(this); 16123 if (_R.stopVideo) { 16124 _R.resetVideo(_nc,opt); 16125 _R.stopVideo(_nc,opt); 16126 } 16127 punchgs.TweenLite.to(_nc,1,{autoAlpha:0,ease:punchgs.Power3.easeInOut,delay:0.2}); 16128 }); 16129 // TIRGGER THE ON CHANGE EVENTS 16130 var data={}; 16131 data.slideIndex=nextli.index()+1; 16132 data.slideLIIndex=nextli.index(); 16133 data.slide = nextli; 16134 data.currentslide=nextli; 16135 data.prevslide = actli; 16136 opt.last_shown_slide = actli.index(); 16137 16138 container.trigger('revolution.slide.onchange',data); 16139 container.trigger('revolution.slide.onafterswap',data); 16140 16141 opt.duringslidechange = false; 16142 16143 var lastSlideLoop = actli.data('slide_on_focus_amount'), 16144 lastSlideMaxLoop = actli.data('hideafterloop'); 16145 if (lastSlideMaxLoop!=0 && lastSlideMaxLoop<=lastSlideLoop) { 16146 opt.c.revremoveslide(actli.index()); 16147 } 16148 //if (_R.callStaticDDDParallax) _R.callStaticDDDParallax(container,opt,nextli); 16149 16150} 16151 16152 16153 16154 16155 16156/////////////////////////// 16157// REMOVE THE LISTENERS // 16158/////////////////////////// 16159var removeAllListeners = function(container,opt) { 16160 container.children().each(function() { 16161 try{ jQuery(this).die('click'); } catch(e) {} 16162 try{ jQuery(this).die('mouseenter');} catch(e) {} 16163 try{ jQuery(this).die('mouseleave');} catch(e) {} 16164 try{ jQuery(this).unbind('hover');} catch(e) {} 16165 }) 16166 try{ container.die('click','mouseenter','mouseleave');} catch(e) {} 16167 clearInterval(opt.cdint); 16168 container=null; 16169} 16170 16171/////////////////////////// 16172// - countDown - // 16173///////////////////////// 16174var countDown = function(container,opt) { 16175 opt.cd=0; 16176 opt.loop=0; 16177 if (opt.stopAfterLoops!=undefined && opt.stopAfterLoops>-1) 16178 opt.looptogo=opt.stopAfterLoops; 16179 else 16180 opt.looptogo=9999999; 16181 16182 if (opt.stopAtSlide!=undefined && opt.stopAtSlide>-1) 16183 opt.lastslidetoshow=opt.stopAtSlide; 16184 else 16185 opt.lastslidetoshow=999; 16186 16187 opt.stopLoop="off"; 16188 16189 if (opt.looptogo==0) opt.stopLoop="on"; 16190 16191 16192 var bt=container.find('.tp-bannertimer'); 16193 16194 // LISTENERS //container.trigger('stoptimer'); 16195 container.on('stoptimer',function() { 16196 16197 var bt = jQuery(this).find('.tp-bannertimer'); 16198 bt.data('tween').pause(); 16199 if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"}); 16200 opt.sliderstatus = "paused"; 16201 _R.unToggleState(opt.slidertoggledby); 16202 }); 16203 16204 16205 container.on('starttimer',function() { 16206 if (opt.forcepause_viatoggle) return; 16207 if (opt.conthover!=1 && opt.videoplaying!=true && opt.width>opt.hideSliderAtLimit && opt.tonpause != true && opt.overnav !=true && opt.ssop!=true) 16208 if (opt.noloopanymore !== 1 && (!opt.viewPort.enable || opt.inviewport)) { 16209 16210 bt.css({visibility:"visible"}); 16211 bt.data('tween').resume(); 16212 opt.sliderstatus = "playing"; 16213 } 16214 16215 if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"}); 16216 _R.toggleState(opt.slidertoggledby); 16217 }); 16218 16219 16220 container.on('restarttimer',function() { 16221 if (opt.forcepause_viatoggle) return; 16222 var bt = jQuery(this).find('.tp-bannertimer'); 16223 if (opt.mouseoncontainer && opt.navigation.onHoverStop=="on" && (!_ISM)) return false; 16224 if (opt.noloopanymore !== 1 && (!opt.viewPort.enable || opt.inviewport) && opt.ssop!=true) { 16225 bt.css({visibility:"visible"}); 16226 bt.data('tween').kill(); 16227 16228 bt.data('tween',punchgs.TweenLite.fromTo(bt,opt.delay/1000,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:countDownNext,delay:1})); 16229 opt.sliderstatus = "playing"; 16230 } 16231 if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"}); 16232 _R.toggleState(opt.slidertoggledby); 16233 }); 16234 16235 container.on('nulltimer',function() { 16236 bt.data('tween').kill(); 16237 bt.data('tween',punchgs.TweenLite.fromTo(bt,opt.delay/1000,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:countDownNext,delay:1})); 16238 bt.data('tween').pause(0);
16239 if (opt.disableProgressBar=="on") bt.css({visibility:"hidden"}); 16240 opt.sliderstatus = "paused"; 16241 }); 16242 16243 var countDownNext = function() { 16244 if (jQuery('body').find(container).length==0) { 16245 removeAllListeners(container,opt); 16246 clearInterval(opt.cdint); 16247 } 16248 16249 container.trigger("revolution.slide.slideatend"); 16250 16251 //STATE OF API CHANGED -> MOVE TO AIP BETTER 16252 if (container.data('conthover-changed') == 1) { 16253 opt.conthover= container.data('conthover'); 16254 container.data('conthover-changed',0); 16255 } 16256 16257 _R.callingNewSlide(opt,container,1); 16258 } 16259 16260 bt.data('tween',punchgs.TweenLite.fromTo(bt,opt.delay/1000,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:countDownNext,delay:1})); 16261 bt.data('opt',opt); 16262 16263 if (opt.slideamount >1 && !(opt.stopAfterLoops==0 && opt.stopAtSlide==1)) { 16264 container.trigger("starttimer"); 16265 } 16266 else { 16267 opt.noloopanymore = 1; 16268 16269 container.trigger("nulltimer"); 16270 } 16271 16272 container.on('tp-mouseenter',function() { 16273 opt.mouseoncontainer = true; 16274 if (opt.navigation.onHoverStop=="on" && (!_ISM)) { 16275 container.trigger('stoptimer'); 16276 container.trigger('revolution.slide.onpause'); 16277 } 16278 }); 16279 container.on('tp-mouseleft',function() { 16280 opt.mouseoncontainer = false; 16281 if (container.data('conthover')!=1 && opt.navigation.onHoverStop=="on" && ((opt.viewPort.enable==true && opt.inviewport) || opt.viewPort.enable==false)) { 16282 container.trigger('revolution.slide.onresume'); 16283 container.trigger('starttimer'); 16284 } 16285 }); 16286 16287} 16288 16289 16290 16291 16292////////////////////////////////////////////////////// 16293// * Revolution Slider - NEEDFULL FUNCTIONS 16294// * @version: 1.0 (30.10.2014) 16295// * @author ThemePunch 16296////////////////////////////////////////////////////// 16297 16298 16299 16300// - BLUR / FOXUS FUNCTIONS ON BROWSER 16301 16302var vis = (function(){ 16303 var stateKey, 16304 eventKey, 16305 keys = { 16306 hidden: "visibilitychange", 16307 webkitHidden: "webkitvisibilitychange", 16308 mozHidden: "mozvisibilitychange", 16309 msHidden: "msvisibilitychange" 16310 }; 16311 for (stateKey in keys) { 16312 if (stateKey in document) { 16313 eventKey = keys[stateKey]; 16314 break; 16315 } 16316 } 16317 return function(c) { 16318 if (c) document.addEventListener(eventKey, c,{pasive:true}); 16319 return !document[stateKey]; 16320 } 16321 })(); 16322 16323var restartOnFocus = function(opt) { 16324 if (opt==undefined || opt.c==undefined) return false; 16325 if (opt.windowfocused!=true) { 16326 opt.windowfocused = true; 16327 punchgs.TweenLite.delayedCall(0.3,function(){ 16328 // TAB IS ACTIVE, WE CAN START ANY PART OF THE SLIDER 16329 if (opt.fallbacks.nextSlideOnWindowFocus=="on") opt.c.revnext(); 16330 opt.c.revredraw(); 16331 if (opt.lastsliderstatus=="playing") 16332 opt.c.revresume(); 16333 }); 16334 } 16335} 16336 16337var lastStatBlur = function(opt) { 16338 opt.windowfocused = false; 16339 opt.lastsliderstatus = opt.sliderstatus; 16340 opt.c.revpause(); 16341 var actsh = opt.c.find('.active-revslide .slotholder'), 16342 nextsh = opt.c.find('.processing-revslide .slotholder'); 16343 16344 if (nextsh.data('kenburns')=="on") 16345 _R.stopKenBurn(nextsh,opt); 16346 16347 if (actsh.data('kenburns')=="on") 16348 _R.stopKenBurn(actsh,opt); 16349 16350 16351} 16352 16353var tabBlurringCheck = function(container,opt) { 16354 var notIE = (document.documentMode === undefined), 16355 isChromium = window.chrome; 16356 16357 if (notIE && !isChromium) { 16358 // checks for Firefox and other NON IE Chrome versions 16359 jQuery(window).on("focusin", function () { 16360 restartOnFocus(opt); 16361 }).on("focusout", function () { 16362 lastStatBlur(opt); 16363 }); 16364 } else { 16365 // checks for IE and Chromium versions 16366 if (window.addEventListener) { 16367 // bind focus event 16368 window.addEventListener("focus", function (event) { 16369 restartOnFocus(opt); 16370 }, {capture:false,passive:true}); 16371 // bind blur event 16372 window.addEventListener("blur", function (event) { 16373 lastStatBlur(opt); 16374 }, {capture:false,passive:true}); 16375 16376 } else { 16377 // bind focus event 16378 window.attachEvent("focus", function (event) { 16379 restartOnFocus(opt); 16380 }); 16381 // bind focus event 16382 window.attachEvent("blur", function (event) { 16383 lastStatBlur(opt); 16384 }); 16385 } 16386 } 16387} 16388 16389 16390// - GET THE URL PARAMETER // 16391 16392var getUrlVars = function (hashdivider){ 16393 var vars = [], hash; 16394 var hashes = window.location.href.slice(window.location.href.indexOf(hashdivider) + 1).split('_'); 16395 for(var i = 0; i < hashes.length; i++) 16396 { 16397 hashes[i] = hashes[i].replace('%3D',"="); 16398 hash = hashes[i].split('='); 16399 vars.push(hash[0]); 16400 vars[hash[0]] = hash[1]; 16401 } 16402 return vars; 16403} 16404})(jQuery);; 16405/******************************************** 16406 * REVOLUTION 5.3 EXTENSION - ACTIONS 16407 * @version: 1.3.2 (12.04.2016) 16408 * @requires jquery.themepunch.revolution.js 16409 * @author ThemePunch 16410*********************************************/ 16411!function($){var _R=jQuery.fn.revolution,_ISM=_R.is_mobile();jQuery.extend(!0,_R,{checkActions:function(e,t,o){checkActions_intern(e,t,o)}});var checkActions_intern=function(e,t,o){o&&jQuery.each(o,function(o,a){a.delay=parseInt(a.delay,0)/1e3,e.addClass("noSwipe"),t.fullscreen_esclistener||("exitfullscreen"==a.action||"togglefullscreen"==a.action)&&(jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#rs-go-fullscreen").length>0&&e.trigger(a.event)}),t.fullscreen_esclistener=!0);var l="backgroundvideo"==a.layer?jQuery(".rs-background-video-layer"):"firstvideo"==a.layer?jQuery(".tp-revslider-slidesli").find(".tp-vi
16411deolayer"):jQuery("#"+a.layer);switch(-1!=jQuery.inArray(a.action,["toggleslider","toggle_mute_video","toggle_global_mute_video","togglefullscreen"])&&e.data("togglelisteners",!0),a.action){case"togglevideo":jQuery.each(l,function(t,o){o=jQuery(o);var a=o.data("videotoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videotoggledby",a)});break;case"togglelayer":jQuery.each(l,function(t,o){o=jQuery(o);var a=o.data("layertoggledby");void 0==a&&(a=new Array),a.push(e),o.data("layertoggledby",a)});break;case"toggle_mute_video":jQuery.each(l,function(t,o){o=jQuery(o);var a=o.data("videomutetoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videomutetoggledby",a)});break;case"toggle_global_mute_video":jQuery.each(l,function(t,o){o=jQuery(o);var a=o.data("videomutetoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videomutetoggledby",a)});break;case"toggleslider":void 0==t.slidertoggledby&&(t.slidertoggledby=new Array),t.slidertoggledby.push(e);break;case"togglefullscreen":void 0==t.fullscreentoggledby&&(t.fullscreentoggledby=new Array),t.fullscreentoggledby.push(e)}switch(e.on(a.event,function(){var o="backgroundvideo"==a.layer?jQuery(".active-revslide .slotholder .rs-background-video-layer"):"firstvideo"==a.layer?jQuery(".active-revslide .tp-videolayer").first():jQuery("#"+a.layer);if("stoplayer"==a.action||"togglelayer"==a.action||"startlayer"==a.action){if(o.length>0)if("startlayer"==a.action||"togglelayer"==a.action&&"in"!=o.data("animdirection")){o.data("animdirection","in");var l=o.data("timeline_out"),i="carousel"===t.sliderType?0:t.width/2-t.gridwidth[t.curWinRange]*t.bw/2,r=0;void 0!=l&&l.pause(0).kill(),_R.animateSingleCaption&&_R.animateSingleCaption(o,t,i,r,0,!1,!0);var n=o.data("timeline");o.data("triggerstate","on"),_R.toggleState(o.data("layertoggledby")),punchgs.TweenLite.delayedCall(a.delay,function(){n.play(0)},[n])}else("stoplayer"==a.action||"togglelayer"==a.action&&"out"!=o.data("animdirection"))&&(o.data("animdirection","out"),o.data("triggered",!0),o.data("triggerstate","off"),_R.stopVideo&&_R.stopVideo(o,t),_R.endMoveCaption&&punchgs.TweenLite.delayedCall(a.delay,_R.endMoveCaption,[o,null,null,t]),_R.unToggleState(o.data("layertoggledby")))}else!_ISM||"playvideo"!=a.action&&"stopvideo"!=a.action&&"togglevideo"!=a.action&&"mutevideo"!=a.action&&"unmutevideo"!=a.action&&"toggle_mute_video"!=a.action&&"toggle_global_mute_video"!=a.action?punchgs.TweenLite.delayedCall(a.delay,function(){actionSwitches(o,t,a,e)},[o,t,a,e]):actionSwitches(o,t,a,e)}),a.action){case"togglelayer":case"startlayer":case"playlayer":case"stoplayer":var l=jQuery("#"+a.layer);"bytrigger"!=l.data("start")&&(l.data("triggerstate","on"),l.data("animdirection","in"))}})},actionSwitches=function(tnc,opt,a,_nc){switch(a.action){case"scrollbelow":_nc.addClass("tp-scrollbelowslider"),_nc.data("scrolloffset",a.offset),_nc.data("scrolldelay",a.delay);var off=getOffContH(opt.fullScreenOffsetContainer)||0,aof=parseInt(a.offset,0)||0;off=off-aof||0,jQuery("body,html").animate({scrollTop:opt.c.offset().top+jQuery(opt.li[0]).height()-off+"px"},{duration:400});break;case"callback":eval(a.callback);break;case"jumptoslide":switch(a.slide.toLowerCase()){case"+1":case"next":opt.sc_indicator="arrow",_R.callingNewSlide(opt,opt.c,1);break;case"previous":case"prev":case"-1":opt.sc_indicator="arrow",_R.callingNewSlide(opt,opt.c,-1);break;default:var ts=jQuery.isNumeric(a.slide)?parseInt(a.slide,0):a.slide;_R.callingNewSlide(opt,opt.c,ts)}break;case"simplelink":window.open(a.url,a.target);break;case"toggleslider":opt.noloopanymore=0,"playing"==opt.sliderstatus?(opt.c.revpause(),opt.forcepause_viatoggle=!0,_R.unToggleState(opt.slidertoggledby)):(opt.forcepause_viatoggle=!1,opt.c.revresume(),_R.toggleState(opt.slidertoggledby));break;case"pauseslider":opt.c.revpause(),_R.unToggleState(opt.slidertoggledby);break;case"playslider":opt.noloopanymore=0,opt.c.revresume(),_R.toggleState(opt.slidertoggledby);break;case"playvideo":tnc.length>0&&_R.playVideo(tnc,opt);break;case"stopvideo":tnc.length>0&&_R.stopVideo&&_R.stopVideo(tnc,opt);break;case"togglevideo":tnc.length>0&&(_R.isVideoPlaying(tnc,opt)?_R.stopVideo&&_R.stopVideo(tnc,opt):_R.playVideo(tnc,opt));break;case"mutevideo":tnc.length>0&&_R.muteVideo(tnc,opt);break;case"unmutevideo":tnc.length>0&&_R.unMuteVideo&&_R.unMuteVideo(tnc,opt);break;case"toggle_mute_video":tnc.length>0&&(_R.isVideoMuted(tnc,opt)?_R.unMuteVideo(tnc,opt):_R.muteVideo&&_R.muteVideo(tnc,opt)),_nc.toggleClass("rs-toggle-content-active");break;case"toggle_global_mute_video":_nc.hasClass("rs-toggle-content-active")?(opt.globalmute=!1,void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jQuery.each(opt.playingvideos,function(e,t){_R.unMuteVideo&&_R.unMuteVideo(t,opt)})):(opt.globalmute=!0,void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jQuery.each(opt.playingvideos,function(e,t){_R.muteVideo&&_R.muteVideo(t,opt)})),_nc.toggleClass("rs-toggle-content-active");break;case"simulateclick":tnc.length>0&&tnc.click();break;case"toggleclass":tnc.length>0&&(tnc.hasClass(a.classname)?tnc.removeClass(a.classname):tnc.addClass(a.classname));break;case"gofullscreen":case"exitfullscreen":case"togglefullscreen":if(jQuery("#rs-go-fullscreen").length>0&&("togglefullscreen"==a.action||"exitfullscreen"==a.action)){jQuery("#rs-go-fullscreen").appendTo(jQuery("#rs-was-here"));var paw=opt.c.closest(".forcefullwidth_wrapper_tp_banner").length>0?opt.c.closest(".forcefullwidth_wrapper_tp_banner"):opt.c.closest(".rev_slider_wrapper");paw.unwrap(),paw.unwrap(),opt.minHeight=opt.oldminheight,opt.infullscreenmode=!1,opt.c.revredraw(),void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jQuery.each(opt.playingvideos,function(e,t){_R.playVideo(t,opt)}),_R.unToggleState(opt.fullscreentoggledby)}else if(0==jQuery("#rs-go-fullscreen").length&&("togglefullscreen"==a.action||"gofullscreen"==a.action)){var paw=opt.c.closest(".forcefullwidth_wrapper_tp_banner").length>0?opt.c.closest(".forcefullwidth_wrapper_tp_banner"):opt.c.closest(".rev_slider_wrapper");paw.wrap('<div id="rs-was-here"><div id="rs-go-fullscreen"></div></div>');var gf=jQuery("#rs-go-fullscreen");gf.appendTo(jQuery("body")),gf.css({position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",zIndex:"9999999",background:"#ffffff"}),opt.oldminheight=opt.minHeight,opt.minHeight=jQuery(window).height(),opt.infullscreenmode=!0,opt.c.revredraw(),void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jQuery.each(opt.playingvideos,function(e,t){_R.playVideo(t,opt)}),_R.toggleState(opt.fullscreentoggledby)}break;default:var obj={};obj.event=a,obj.layer=_nc,opt.c.trigger("layeraction",[obj])}},getOffContH=function(e){if(void 0==e)return 0;if(e.split(",").length>1){oc=e.split(",");var t=0;return oc&&jQuery.each(oc,function(e,o){jQuery(o).length>0&&(t+=jQuery(o).outerHeight(!0))}),t}return jQuery(e).height()}}(jQuery);; 16412/******************************************** 16413 * REVOLUTION 5.0 EXTENSION - CAROUSEL 16414 * @version: 1.0.2 (01.10.2015) 16415 * @requires jquery.themepunch.revolution.js 16416 * @author ThemePunch 16417*********************************************/ 16418!function(){var e=jQuery.fn.revolution;jQuery.extend(!0,e,{prepareCarousel:function(i,l,o){o=i.carousel.lastdirection=a(o,i.carousel.lastdirection),t(i),i.carousel.slide_offset_target=r(i),void 0==l?e.carouselToEvalPosition(i,o):s(i,o,!1)},carouselToEvalPosition:function(i,t){var l=i.carousel;t=l.lastdirection=a(t,l.lastdirection);var o="center"===l.horizontal_align?(l.wrapwidth/2-l.slide_width/2-l.slide_globaloffset)/l.slide_width:(0-l.slide_globaloffset)/l.slide_width,r=e.simp(o,i.slideamount,!1),n=r-Math.floor(r),d=0,f=-1*(Math.ceil(r)-r),h=-1*(Math.floor(r)-r);d=n>=.3&&"left"===t||n>=.7&&"right"===t?f:.3>n&&"left"===t||.7>n&&"right"===t?h:d,d="off"===l.infinity?0>r?r:o>i.slideamount-1?o-(i.slideamount-1):d:d,l.slide_offset_target=d*l.slide_width,0!==Math.abs(l.slide_offset_target)?s(i,t,!0):e.organiseCarousel(i,t)},organiseCarousel:function(e,i,t,a){i=void 0===i||"down"==i||"up"==i||null===i||jQuery.isEmptyObject(i)?"left":i;
vendor: 4,838 bytes, line 16418
16418for(var s=e.carousel,l=new Array,o=s.slides.length,r="right"===s.horizontal_align?r=e.width:0,n=0;o>n;n++){var d=n*s.slide_width+s.slide_offset;"on"===s.infinity&&(d=d>s.wrapwidth-s.inneroffset&&"right"==i?s.slide_offset-(s.slides.length-n)*s.slide_width:d,d=d<0-s.inneroffset-s.slide_width&&"left"==i?d+s.maxwidth:d),l[n]=d}var f=999;s.slides&&jQuery.each(s.slides,function(a,r){var n=l[a];"on"===s.infinity&&(n=n>s.wrapwidth-s.inneroffset&&"left"===i?l[0]-(o-a)*s.slide_width:n,n=n<0-s.inneroffset-s.slide_width?"left"==i?n+s.maxwidth:"right"===i?l[o-1]+(a+1)*s.slide_width:n:n);var d=new Object;d.left=n+s.inneroffset;var h="center"===s.horizontal_align?(Math.abs(s.wrapwidth/2)-(d.left+s.slide_width/2))/s.slide_width:(s.inneroffset-d.left)/s.slide_width,w="center"===s.horizontal_align?2:1;if((t&&Math.abs(h)<f||0===h)&&(f=Math.abs(h),s.focused=a),d.width=s.slide_width,d.x=0,d.transformPerspective=1200,d.transformOrigin="50% "+s.vertical_align,"on"===s.fadeout)if("on"===s.vary_fade)d.autoAlpha=1-Math.abs(1/Math.ceil(s.maxVisibleItems/w)*h);else switch(s.horizontal_align){case"center":d.autoAlpha=Math.abs(h)<Math.ceil(s.maxVisibleItems/w-1)?1:1-(Math.abs(h)-Math.floor(Math.abs(h)));break;case"left":d.autoAlpha=1>h&&h>0?1-h:Math.abs(h)>s.maxVisibleItems-1?1-(Math.abs(h)-(s.maxVisibleItems-1)):1;break;case"right":d.autoAlpha=h>-1&&0>h?1-Math.abs(h):h>s.maxVisibleItems-1?1-(Math.abs(h)-(s.maxVisibleItems-1)):1}else d.autoAlpha=Math.abs(h)<Math.ceil(s.maxVisibleItems/w)?1:0;if(void 0!==s.minScale&&s.minScale>0)if("on"===s.vary_scale){d.scale=1-Math.abs(s.minScale/100/Math.ceil(s.maxVisibleItems/w)*h);var c=(s.slide_width-s.slide_width*d.scale)*Math.abs(h)}else{d.scale=h>=1||-1>=h?1-s.minScale/100:(100-s.minScale*Math.abs(h))/100;var c=(s.slide_width-s.slide_width*(1-s.minScale/100))*Math.abs(h)}void 0!==s.maxRotation&&0!=Math.abs(s.maxRotation)&&("on"===s.vary_rotation?(d.rotationY=Math.abs(s.maxRotation)-Math.abs((1-Math.abs(1/Math.ceil(s.maxVisibleItems/w)*h))*s.maxRotation),d.autoAlpha=Math.abs(d.rotationY)>90?0:d.autoAlpha):d.rotationY=h>=1||-1>=h?s.maxRotation:Math.abs(h)*s.maxRotation,d.rotationY=0>h?-1*d.rotationY:d.rotationY),d.x=-1*s.space*h,d.left=Math.floor(d.left),d.x=Math.floor(d.x),void 0!==d.scale?0>h?d.x-c:d.x+c:d.x,d.zIndex=Math.round(100-Math.abs(5*h)),d.transformStyle="3D"!=e.parallax.type&&"3d"!=e.parallax.type?"flat":"preserve-3d",punchgs.TweenLite.set(r,d)}),a&&(e.c.find(".next-revslide").removeClass("next-revslide"),jQuery(s.slides[s.focused]).addClass("next-revslide"),e.c.trigger("revolution.nextslide.waiting"));s.wrapwidth/2-s.slide_offset,s.maxwidth+s.slide_offset-s.wrapwidth/2}});var i=function(e){var i=e.carousel;i.infbackup=i.infinity,i.maxVisiblebackup=i.maxVisibleItems,i.slide_globaloffset="none",i.slide_offset=0,i.wrap=e.c.find(".tp-carousel-wrapper"),i.slides=e.c.find(".tp-revslider-slidesli"),0!==i.maxRotation&&("3D"!=e.parallax.type&&"3d"!=e.parallax.type?punchgs.TweenLite.set(i.wrap,{perspective:1200,transformStyle:"flat"}):punchgs.TweenLite.set(i.wrap,{perspective:1600,transformStyle:"preserve-3d"})),void 0!==i.border_radius&&parseInt(i.border_radius,0)>0&&punchgs.TweenLite.set(e.c.find(".tp-revslider-slidesli"),{borderRadius:i.border_radius})},t=function(t){void 0===t.bw&&e.setSize(t);var a=t.carousel,s=e.getHorizontalOffset(t.c,"left"),l=e.getHorizontalOffset(t.c,"right");void 0===a.wrap&&i(t),a.slide_width="on"!==a.stretch?t.gridwidth[t.curWinRange]*t.bw:t.c.width(),a.maxwidth=t.slideamount*a.slide_width,a.maxVisiblebackup>a.slides.length+1&&(a.maxVisibleItems=a.slides.length+2),a.wrapwidth=a.maxVisibleItems*a.slide_width+(a.maxVisibleItems-1)*a.space,a.wrapwidth="auto"!=t.sliderLayout?a.wrapwidth>t.c.closest(".tp-simpleresponsive").width()?t.c.closest(".tp-simpleresponsive").width():a.wrapwidth:a.wrapwidth>t.ul.width()?t.ul.width():a.wrapwidth,a.infinity=a.wrapwidth>=a.maxwidth?"off":a.infbackup,a.wrapoffset="center"===a.horizontal_align?(t.c.width()-l-s-a.wrapwidth)/2:0,a.wrapoffset="auto"!=t.sliderLayout&&t.outernav?0:a.wrapoffset<s?s:a.wrapoffset;var o="hidden";("3D"==t.parallax.type||"3d"==t.parallax.type)&&(o="visible"),"right"===a.horizontal_align?punchgs.TweenLite.set(a.wrap,{left:"auto",right:a.wrapoffset+"px",width:a.wrapwidth,overflow:o}):punchgs.TweenLite.set(a.wrap,{right:"auto",left:a.wrapoffset+"px",width:a.wrapwidth,overflow:o}),a.inneroffset="right"===a.horizontal_align?a.wrapwidth-a.slide_width:0,a.realoffset=Math.abs(a.wrap.position().left),a.windhalf=jQuery(window).width()/2},a=function(e,i){return null===e||jQuery.isEmptyObject(e)?i:void 0===e?"right":e},s=function(i,t,s){var l=i.carousel;t=l.lastdirection=a(t,l.lastdirection);var o=new Object;o.from=0,o.to=l.slide_offset_target,void 0!==l.positionanim&&l.positionanim.pause(),l.positionanim=punchgs.TweenLite.to(o,1.2,{from:o.to,onUpdate:function(){l.
16418slide_offset=l.slide_globaloffset+o.from,l.slide_offset=e.simp(l.slide_offset,l.maxwidth),e.organiseCarousel(i,t,!1,!1)},onComplete:function(){l.slide_globaloffset="off"===l.infinity?l.slide_globaloffset+l.slide_offset_target:e.simp(l.slide_globaloffset+l.slide_offset_target,l.maxwidth),l.slide_offset=e.simp(l.slide_offset,l.maxwidth),e.organiseCarousel(i,t,!1,!0);var a=jQuery(i.li[l.focused]);i.c.find(".next-revslide").removeClass("next-revslide"),s&&e.callingNewSlide(i,i.c,a.data("index"))},ease:punchgs.Expo.easeOut})},l=function(e,i){return Math.abs(e)>Math.abs(i)?e>0?e-Math.abs(Math.floor(e/i)*i):e+Math.abs(Math.floor(e/i)*i):e},o=function(e,i,t){var t,t,a=i-e,s=i-t-e;return a=l(a,t),s=l(s,t),Math.abs(a)>Math.abs(s)?s:a},r=function(i){var t=0,a=i.carousel;if(void 0!==a.positionanim&&a.positionanim.kill(),"none"==a.slide_globaloffset)a.slide_globaloffset=t="center"===a.horizontal_align?a.wrapwidth/2-a.slide_width/2:0;else{a.slide_globaloffset=a.slide_offset,a.slide_offset=0;var s=i.c.find(".processing-revslide").index(),l="center"===a.horizontal_align?(a.wrapwidth/2-a.slide_width/2-a.slide_globaloffset)/a.slide_width:(0-a.slide_globaloffset)/a.slide_width;l=e.simp(l,i.slideamount,!1),s=s>=0?s:i.c.find(".active-revslide").index(),s=s>=0?s:0,t="off"===a.infinity?l-s:-o(l,s,i.slideamount),t*=a.slide_width}return t}}(jQuery);; 16419/******************************************** 16420 * REVOLUTION 5.0 EXTENSION - KEN BURN 16421 * @version: 1.0.0 (03.08.2015) 16422 * @requires jquery.themepunch.revolution.js 16423 * @author ThemePunch 16424*********************************************/ 16425!function(){var t=jQuery.fn.revolution;jQuery.extend(!0,t,{stopKenBurn:function(t){void 0!=t.data("kbtl")&&t.data("kbtl").pause()},startKenBurn:function(t,e,a){var r=t.data(),n=t.find(".defaultimg"),s=n.data("lazyload")||n.data("src"),i=(r.owidth/r.oheight,"carousel"===e.sliderType?e.carousel.slide_width:e.ul.width()),o=e.ul.height();t.data("kbtl")&&t.data("kbtl").kill(),a=a||0,0==t.find(".tp-kbimg").length&&(t.append('<div class="tp-kbimg-wrap" style="z-index:2;width:100%;height:100%;top:0px;left:0px;position:absolute;"><img class="tp-kbimg" src="'+s+'" style="position:absolute;" width="'+r.owidth+'" height="'+r.oheight+'"></div>'),t.data("kenburn",t.find(".tp-kbimg")));var d=function(t,e,a,r,n,s,i){var o=t*a,d=e*a,l=Math.abs(r-o),h=Math.abs(n-d),p=new Object;return p.l=(0-s)*l,p.r=p.l+o,p.t=(0-i)*h,p.b=p.t+d,p.h=s,p.v=i,p},l=function(t,e,a,r,n){var s=t.bgposition.split(" ")||"center center",i="center"==s[0]?"50%":"left"==s[0]||"left"==s[1]?"0%":"right"==s[0]||"right"==s[1]?"100%":s[0],o="center"==s[1]?"50%":"top"==s[0]||"top"==s[1]?"0%":"bottom"==s[0]||"bottom"==s[1]?"100%":s[1];i=parseInt(i,0)/100||0,o=parseInt(o,0)/100||0;var l=new Object;return l.start=d(n.start.width,n.start.height,n.start.scale,e,a,i,o),l.end=d(n.start.width,n.start.height,n.end.scale,e,a,i,o),l},h=function(t,e,a){var r=a.scalestart/100,n=a.scaleend/100,s=void 0!=a.oofsetstart?a.offsetstart.split(" ")||[0,0]:[0,0],i=void 0!=a.offsetend?a.offsetend.split(" ")||[0,0]:[0,0];a.bgposition="center center"==a.bgposition?"50% 50%":a.bgposition;{var o=new Object,d=t*r,h=(d/a.owidth*a.oheight,t*n);h/a.owidth*a.oheight}if(o.start=new Object,o.starto=new Object,o.end=new Object,o.endo=new Object,o.start.width=t,o.start.height=o.start.width/a.owidth*a.oheight,o.start.height<e){var p=e/o.start.height;o.start.height=e,o.start.width=o.start.width*p}o.start.transformOrigin=a.bgposition,o.start.scale=r,o.end.scale=n,o.start.rotation=a.rotatestart+"deg",o.end.rotation=a.rotateend+"deg";var g=l(a,t,e,s,o);s[0]=parseFloat(s[0])+g.start.l,i[0]=parseFloat(i[0])+g.end.l,s[1]=parseFloat(s[1])+g.start.t,i[1]=parseFloat(i[1])+g.end.t;var c=g.start.r-g.start.l,b=g.start.b-g.start.t,u=g.end.r-g.end.l,f=g.end.b-g.end.t;return s[0]=s[0]>0?0:c+s[0]<t?t-c:s[0],i[0]=i[0]>0?0:u+i[0]<t?t-u:i[0],s[1]=s[1]>0?0:b+s[1]<e?e-b:s[1],i[1]=i[1]>0?0:f+i[1]<e?e-f:i[1],o.starto.x=s[0]+"px",o.starto.y=s[1]+"px",o.endo.x=i[0]+"px",o.endo.y=i[1]+"px",o.end.ease=o.endo.ease=a.ease,o.end.force3D=o.endo.force3D=!0,o};void 0!=t.data("kbtl")&&(t.data("kbtl").kill(),t.removeData("kbtl"));var p=t.data("kenburn"),g=p.parent(),c=h(i,o,r),b=new punchgs.TimelineLite;b.pause(),c.start.transformOrigin="0% 0%",c.starto.transformOrigin="0% 0%",b.add(punchgs.TweenLite.fromTo(p,r.duration/1e3,c.start,c.end),0),b.add(punchgs.TweenLite.fromTo(g,r.duration/1e3,c.starto,c.endo),0),b.progress(a),b.play(),t.data("kbtl",b)}})}(jQuery);; 16426/************************************************ 16427 * REVOLUTION 5.2 EXTENSION - LAYER ANIMATION 16428 * @version: 2.6 (30.05.2016) 16429 * @requires jquery.themepunch.revolution.js 16430 * @author ThemePunch 16431************************************************/ 16432 16433!function(a){function e(a,e,t,i,n,o,r){var d=a.find(e);d.css("borderWidth",o+"px"),d.css(t,0-o+"px"),d.css(i,"0px solid transparent"),d.css(n,r)}var t=jQuery.fn.revolution;t.is_mobile();jQuery.extend(!0,t,{animcompleted:function(a,e){var i=a.data("videotype"),n=a.data("autoplay"),o=a.data("autoplayonlyfirsttime");void 0!=i&&"none"!=i&&(1==n||"true"==n||"on"==n||"1sttime"==n||o?(t.playVideo(a,e),t.toggleState(a.data("videotoggledby")),(
16433o||"1sttime"==n)&&(a.data("autoplayonlyfirsttime",!1),a.data("autoplay","off"))):("no1sttime"==n&&a.data("autoplay","on"),t.unToggleState(a.data("videotoggledby"))))},handleStaticLayers:function(a,e){var t=parseInt(a.data("startslide"),0),i=parseInt(a.data("endslide"),0);0>t&&(t=0),0>i&&(i=e.slideamount),0===t&&i===e.slideamount-1&&(i=e.slideamount+1),a.data("startslide",t),a.data("endslide",i)},animateTheCaptions:function(a,e,i,n){var o="carousel"===e.sliderType?0:e.width/2-e.gridwidth[e.curWinRange]*e.bw/2,r=0,d=a.data("index");e.layers=e.layers||new Object,e.layers[d]=e.layers[d]||a.find(".tp-caption"),e.layers["static"]=e.layers["static"]||e.c.find(".tp-static-layers").find(".tp-caption");var s=new Array;if(e.conh=e.c.height(),e.conw=e.c.width(),e.ulw=e.ul.width(),e.ulh=e.ul.height(),e.debugMode){a.addClass("indebugmode"),a.find(".helpgrid").remove(),e.c.find(".hglayerinfo").remove(),a.append('<div class="helpgrid" style="width:'+e.gridwidth[e.curWinRange]*e.bw+"px;height:"+e.gridheight[e.curWinRange]*e.bw+'px;"></div>');var l=a.find(".helpgrid");l.append('<div class="hginfo">Zoom:'+Math.round(100*e.bw)+"% Device Level:"+e.curWinRange+" Grid Preset:"+e.gridwidth[e.curWinRange]+"x"+e.gridheight[e.curWinRange]+"</div>"),e.c.append('<div class="hglayerinfo"></div>'),l.append('<div class="tlhg"></div>')}s&&jQuery.each(s,function(a){var e=jQuery(this);punchgs.TweenLite.set(e.find(".tp-videoposter"),{autoAlpha:1}),punchgs.TweenLite.set(e.find("iframe"),{autoAlpha:0})}),e.layers[d]&&jQuery.each(e.layers[d],function(a,e){s.push(e)}),e.layers["static"]&&jQuery.each(e.layers["static"],function(a,e){s.push(e)}),s&&jQuery.each(s,function(a){t.animateSingleCaption(jQuery(this),e,o,r,a,i)});var p=jQuery("body").find("#"+e.c.attr("id")).find(".tp-bannertimer");p.data("opt",e),void 0!=n&&setTimeout(function(){n.resume()},30)},animateSingleCaption:function(a,r,s,f,b,x,T){var L=x,W=g(a,r,"in",!0),j=a.data("_pw")||a.closest(".tp-parallax-wrap"),I=a.data("_lw")||a.closest(".tp-loop-wrap"),C=a.data("_mw")||a.closest(".tp-mask-wrap"),R=a.data("responsive")||"on",k=a.data("responsive_offset")||"on",_=a.data("basealign")||"grid",z="grid"===_?r.width:r.ulw,Q="grid"===_?r.height:r.ulh,S=jQuery("body").hasClass("rtl");if(a.data("_pw")||(a.data("staticlayer")?a.data("_li",a.closest(".tp-static-layers")):a.data("_li",a.closest(".tp-revslider-slidesli")),a.data("slidelink",a.hasClass("slidelink")),a.data("_pw",j),a.data("_lw",I),a.data("_mw",C)),!a.data("togglelisteners")&&a.find(".rs-toggled-content")&&(a.on("click",function(){a.toggleClass("rs-toggle-content-active")}),a.data("togglelisteners",!0)),"fullscreen"==r.sliderLayout&&(f=Q/2-r.gridheight[r.curWinRange]*r.bh/2),("on"==r.autoHeight||void 0!=r.minHeight&&r.minHeight>0)&&(f=r.conh/2-r.gridheight[r.curWinRange]*r.bh/2),0>f&&(f=0),r.debugMode){a.closest("li").find(".helpgrid").css({top:f+"px",left:s+"px"});var M=r.c.find(".hglayerinfo");a.on("hover, mouseenter",function(){var e="";a.data()&&jQuery.each(a.data(),function(a,t){"object"!=typeof t&&(e=e+'<span style="white-space:nowrap"><span style="color:#27ae60">'+a+":</span>"+t+"</span> ")}),M.html(e)})}var O=c(a.data("visibility"),r)[r.forcedWinRange]||c(a.data("visibility"),r)||"on";if("off"==O||z<r.hideCaptionAtLimit&&"on"==a.data("captionhidden")||z<r.hideAllCaptionAtLimit?a.addClass("tp-hidden-caption"):a.removeClass("tp-hidden-caption"),a.data("layertype","html"),0>s&&(s=0),void 0!=a.data("thumbimage")&&void 0==a.data("videoposter")&&a.data("videoposter",a.data("thumbimage")),a.find("img").length>0){var H=a.find("img");a.data("layertype","image"),0==H.width()&&H.css({width:"auto"}),0==H.height()&&H.css({height:"auto"}),void 0==H.data("ww")&&H.width()>0&&H.data("ww",H.width()),void 0==H.data("hh")&&H.height()>0&&H.data("hh",H.height());var B=H.data("ww"),P=H.data("hh"),A="slide"==_?r.ulw:r.gridwidth[r.curWinRange],D="slide"==_?r.ulh:r.gridheight[r.curWinRange],B=c(H.data("ww"),r)[r.curWinRange]||c(H.data("ww"),r)||"auto",P=c(H.data("hh"),r)[r.curWinRange]||c(H.data("hh"),r)||"auto",F="full"===B||"full-proportional"===B,X="full"===P||"full-proportional"===P;if("full-proportional"===B){var Y=H.data("owidth"),V=H.data("oheight");V/D>Y/A?(B=A,P=V*(A/Y)):(P=D,B=Y*(D/V))}else B=F?A:parseFloat(B),P=X?D:parseFloat(P);void 0==B&&(B=0),void 0==P&&(P=0),"off"!==R?("grid"!=_&&F?H.width(B):H.width(B*r.bw),"grid"!=_&&X?H.height(P):H.height(P*r.bh)):(H.width(B),H.height(P))}"slide"===_&&(s=0,f=0);var N="html5"==a.data("audio")?"audio":"video";if(a.hasClass("tp-videolayer")||a.hasClass("tp-audiolayer")||a.find("iframe").length>0||a.find(N).length>0){if(a.data("layertype","video"),t.manageVideoLayer&&t.manageVideoLayer(a,r,x,L),!x&&!L){a.data("videotype");t.resetVideo&&t.resetVideo(a,r)}var $=a.data("aspectratio");void 0!=$&&$.split(":").length>1&&t.prepareCoveredVideo($,r,a);var H=a.find("iframe")?a.find("iframe"):H=a.find(N),Z=a.find("iframe")?!1:!0,G=a.hasClass("coverscreenvideo");H.css({display:"block"}),void 0==a.data("videowidth")&&(a.data("videowidth",H.width()),a.data("videoheight",H.height()));var U,B=c(a.data("videowidth"),r)[r.curWinRange]||c(a.data("videowidth"),r)||"auto",P=c(a.data("videoheight"),r)[r.curWinRange]||c(a.data("videoheight"),r)||"auto";B=parseFloat(B),P=parseFloat(P),void 0===a.data("cssobj")&&(U=v(a,0),a.data("cssobj",U));var q=u(a.data("cssobj"),r);if("auto"==q.lineHeight&&(q.lineHeight=q.fontSize+4),a.hasClass("fullscreenvideo")||G){s=0,f=0,a.data("x",0),a.data("y",0);var E=Q;"on"==r.autoHeight&&(E=r.conh),a.css({width:z,height:E})}else punchgs.TweenLite.set(a,{paddingTop:Math.round(q.paddingTop*r.bh)+"px",paddingBottom:Math.round(q.paddingBottom*r.bh)+"px",paddingLeft:Math.round(q.paddingLeft*r.bw)+"px",paddingRight:Math.round(q.paddingRight*r.bw)+"px",marginTop:q.marginTop*r.bh+"px",marginBottom:q.marginBottom*r.bh+"px",marginLeft:q.marginLeft*r.bw+"px",marginRight:q.marginRight*r.bw+"px",borderTopWidth:Math.round(q.borderTopWidth*r.bh)+"px",borderBottomWidth:Math.round(q.borderBottomWidth*r.bh)+"px",borderLeftWidth:Math.round(q.borderLeftWidth*r.bw)+"px",borderRightWidth:Math.round(q.borderRightWidth*r.bw)+"px",width:B*r.bw+"px",height:P*r.bh+"px"});(0==Z&&!G||1!=a.data("forcecover")&&!a.hasClass("fullscreenvideo")&&!G)&&(H.width(B*r.bw),H.height(P*r.bh))}var J=a.data("slidelink")||!1;a.find(".tp-resizeme, .tp-resizeme *").each(function(){w(jQuery(this),r,"rekursive",R)}),a.hasClass("tp-resizeme")&&a.find("*").each(function(){w(jQuery(this),r,"rekursive",R)}),w(a,r,0,R);var K=a.outerHeight(),aa=a.css("backgroundColor");e(a,".frontcorner","left","borderRight","borderTopColor",K,aa),e(a,".frontcornertop","left","borderRight","borderBottomColor",K,aa),e(a,".backcorner","right","borderLeft","borderBottomColor",K,aa),e(a,".backcornertop","right","borderLeft","borderTopColor",K,aa),"on"==r.fullScreenAlignForce&&(s=0,f=0);var ea=a.data("arrobj");if(void 0===ea){var ea=new Object;ea.voa=c(a.data("voffset"),r)[r.curWinRange]||c(a.data("voffset"),r)[0],ea.hoa=c(a.data("hoffset"),r)[r.curWinRange]||c(a.data("hoffset"),r)[0],ea.elx=c(a.data("x"),r)[r.curWinRange]||c(a.data("x"),r)[0],ea.ely=c(a.data("y"),r)[r.curWinRange]||c(a.data("y"),r)[0]}var ta=0==ea.voa.length?0:ea.voa,ia=0==ea.hoa.length?0:ea.hoa,na=0==ea.elx.length?0:ea.elx,oa=0==ea.ely.length?0:ea.ely,ra=a.outerWidth(!0),da=a.outerHeight(!0);0==ra&&0==da&&(ra=r.ulw,da=r.ulh);var sa="off"!==k?parseInt(ta,0)*r.bw:parseInt(ta,0),la="off"!==k?parseInt(ia,0)*r.bw:parseInt(ia,0),pa="grid"===_?r.gridwidth[r.curWinRange]*r.bw:z,ha="grid"===_?r.gridheight[r.curWinRange]*r.bw:Q;"on"==r.fullScreenAlignForce&&(pa=r.ulw,ha=r.ulh),na="center"===na||"middle"===na?pa/2-ra/2+la:"left"===na?la:"right"===na?pa-ra-la:"off"!==k?na*r.bw:na,oa="center"==oa||"middle"==oa?ha/2-da/2+sa:"top"==oa?sa:"bottom"==oa?ha-da-sa:"off"!==k?oa*r.bw:oa,S&&!J&&(na+=ra),J&&(na=0);var ca=a.data("lasttriggerstate"),ga=a.data("triggerstate"),ma=void 0!=a.data("start")?a.data("start"):100,va=a.data("end"),ua=T?0:"bytrigger"===ma||"sliderenter"
16433===ma?0:parseFloat(ma)/1e3,fa=na+s,wa=oa+f,ya=a.css("z-Index");T||("reset"==ca&&"bytrigger"!=ma?(a.data("triggerstate","on"),a.data("animdirection","in"),ga="on"):"reset"==ca&&"bytrigger"==ma&&(a.data("triggerstate","off"),a.data("animdirection","out"),ga="off")),punchgs.TweenLite.set(j,{zIndex:ya,top:wa,left:fa,overwrite:"auto"}),0==W&&(L=!0),void 0==a.data("timeline")||L||(2!=W&&a.data("timeline").gotoAndPlay(0),L=!0),!x&&a.data("timeline_out")&&2!=W&&0!=W&&(a.data("timeline_out").kill(),a.data("outstarted",0)),T&&void 0!=a.data("timeline")&&(a.removeData("$anims"),a.data("timeline").pause(0),a.data("timeline").kill(),void 0!=a.data("newhoveranim")&&(a.data("newhoveranim").progress(0),a.data("newhoveranim").kill()),a.removeData("timeline"),punchgs.TweenLite.killTweensOf(a),a.unbind("hover"),a.removeClass("rs-hover-ready"),a.removeData("newhoveranim"));var ba=a.data("timeline")?a.data("timeline").time():0,xa=void 0!==a.data("timeline")?a.data("timeline").progress():0,Ta=a.data("timeline")||new punchgs.TimelineLite({smoothChildTiming:!0});xa=jQuery.isNumeric(xa)?xa:0,Ta.pause();var La={};if(La.svg=void 0!=a.data("svg_src")?a.find("svg"):!1,1>xa&&1!=a.data("outstarted")||2==W||T){var Wa=a;if(void 0!=a.data("mySplitText")&&a.data("mySplitText").revert(),void 0!=a.data("splitin")&&a.data("splitin").match(/chars|words|lines/g)||void 0!=a.data("splitout")&&a.data("splitout").match(/chars|words|lines/g)){var ja=a.find("a").length>0?a.find("a"):a;a.data("mySplitText",new punchgs.SplitText(ja,{type:"lines,words,chars",charsClass:"tp-splitted tp-charsplit",wordsClass:"tp-splitted tp-wordsplit",linesClass:"tp-splitted tp-linesplit"})),a.addClass("splitted")}void 0!==a.data("mySplitText")&&a.data("splitin")&&a.data("splitin").match(/chars|words|lines/g)&&(Wa=a.data("mySplitText")[a.data("splitin")]);var Ia=new Object;La.svg&&(La.idle=o(a.data("svg_idle"),n()),punchgs.TweenLite.set(La.svg,La.idle.anim));
16433var Ca=void 0!=a.data("transform_in")?a.data("transform_in").match(/\(R\)/gi):!1;if(!a.data("$anims")||T||Ca){var Ra=i(),ka=i(),_a=d(),za=void 0!==a.data("transform_hover")||void 0!==a.data("style_hover");ka=p(ka,a.data("transform_idle")),Ra=p(ka,a.data("transform_in"),1==r.sdir),za&&(_a=p(_a,a.data("transform_hover")),_a=m(_a,a.data("style_hover")),La.svg&&($svghover=o(a.data("svg_hover"),n()),void 0!=_a.anim.color&&($svghover.anim.fill=_a.anim.color),a.data("hoversvg",$svghover)),a.data("hover",_a)),Ra.elemdelay=void 0==a.data("elementdelay")?0:a.data("elementdelay"),ka.anim.ease=Ra.anim.ease=Ra.anim.ease||punchgs.Power1.easeInOut,za&&!a.hasClass("rs-hover-ready")&&(a.addClass("rs-hover-ready"),a.hover(function(a){var e=jQuery(a.currentTarget),t=e.data("hover"),i=e.data("timeline");i&&1==i.progress()&&(void 0===e.data("newhoveranim")||"none"===e.data("newhoveranim")?(e.data("newhoveranim",punchgs.TweenLite.to(e,t.speed,t.anim)),t.anim&&t.anim.zIndex&&e.data("newhoverparanim",punchgs.TweenLite.to(e.data("_pw"),t.speed,{zIndex:t.anim.zIndex})),La.svg&&e.data("newsvghoveranim",punchgs.TweenLite.to(La.svg,t.speed,e.data("hoversvg").anim))):(e.data("newhoveranim").progress(0).play(),(t.anim&&t.anim.zIndex||t.anim.css&&t.anim.css.zIndex)&&e.data("newhoverparanim").progress(0).play(),La.svg&&e.data("newsvghoveranim").progress(0).play()))},function(a){var e=jQuery(a.currentTarget),t=e.data("timeline");t&&1==t.progress()&&void 0!=e.data("newhoveranim")&&(e.data("newhoveranim").reverse(),e.data("newhoverparanim")&&e.data("newhoverparanim").reverse(),La.svg&&e.data("newsvghoveranim").reverse())})),Ia=new Object,Ia.f=Ra,Ia.r=ka,a.data("$anims")}else Ia=a.data("$anims");var Qa=h(a.data("mask_in")),Sa=new punchgs.TimelineLite;if(Ia.f.anim.x=Ia.f.anim.x*r.bw||l(Ia.f.anim.x,r,ra,da,wa,fa,"horizontal"),Ia.f.anim.y=Ia.f.anim.y*r.bw||l(Ia.f.anim.y,r,ra,da,wa,fa,"vertical"),2!=W||T){if(Wa!=a){var Ma=Ia.r.anim.ease;Ta.add(punchgs.TweenLite.set(a,Ia.r.anim)),Ia.r=i(),Ia.r.anim.ease=Ma}if(Ia.f.anim.visibility="hidden",a.data("eow",ra),a.data("eoh",da),a.data("speed",Ia.f.speed),a.data("ease",Ia.r.anim.ease),Sa.eventCallback("onStart",function(){punchgs.TweenLite.set(a,{visibility:"visible"}),a.data("iframes")&&a.find("iframe").each(function(){punchgs.TweenLite.set(jQuery(this),{autoAlpha:1})}),punchgs.TweenLite.set(j,{visibility:"visible"});var e={};e.layer=a,e.eventtype="enterstage",e.layertype=a.data("layertype"),a.data("active",!0),e.layersettings=a.data(),r.c.trigger("revolution.layeraction",[e])}),Sa.eventCallback("onComplete",function(){var e={};e.layer=a,e.eventtype="enteredstage",e.layertype=a.data("layertype"),e.layersettings=a.data(),r.c.trigger("revolution.layeraction",[e]),t.animcompleted(a,r)}),"sliderenter"==ma&&r.overcontainer&&(ua=.6),Ta.add(Sa.staggerFromTo(Wa,Ia.f.speed,Ia.f.anim,Ia.r.anim,Ia.f.elemdelay),ua),Qa){var Oa=new Object;Oa.ease=Ia.r.anim.ease,Oa.overflow=Qa.anim.overflow="hidden",Oa.overwrite="all",Oa.x=Oa.y=0,Qa.anim.x=Qa.anim.x*r.bw||l(Qa.anim.x,r,ra,da,wa,fa,"horizontal"),Qa.anim.y=Qa.anim.y*r.bw||l(Qa.anim.y,r,ra,da,wa,fa,"vertical"),Ta.add(punchgs.TweenLite.fromTo(C,Ia.f.speed,Qa.anim,Oa,Ra.elemdelay),ua)}else Ta.add(punchgs.TweenLite.set(C,{overflow:"visible"},Ra.elemdelay),0)}if(a.data("timeline",Ta),r.sliderscrope=void 0===r.sliderscrope?Math.round(99999*Math.random()):r.sliderscrope,W=g(a,r,"in"),void 0===r.endtimeouts&&(r.endtimeouts=[]),(0===xa||2==W)&&"bytrigger"!==va&&!T&&"sliderleave"!=va){if(void 0!=va&&(-1==W||2==W)&&"bytriger"!==va)var Ha=setTimeout(function(){t.endMoveCaption(a,C,j,r)},parseInt(a.data("end"),0));r.endtimeouts.push(Ha)}Ta=a.data("timeline"),"on"==a.data("loopanimation")&&y(I,r.bw),("sliderenter"!=ma||"sliderenter"==ma&&r.overcontainer)&&(-1==W||1==W||T||0==W&&1>xa&&a.hasClass("rev-static-visbile"))&&(1>xa&&xa>0||0==xa&&"bytrigger"!=ma&&"keep"!=ca||0==xa&&"bytrigger"!=ma&&"keep"==ca&&"on"==ga||"bytrigger"==ma&&"keep"==ca&&"on"==ga)&&(Ta.resume(ba),t.toggleState(a.data("layertoggledby")))}"on"==a.data("loopanimation")&&punchgs.TweenLite.set(I,{minWidth:ra,minHeight:da}),0==a.data("slidelink")||1!=a.data("slidelink")&&!a.hasClass("slidelink")?(punchgs.TweenLite.set(C,{width:"auto",height:"auto"}),a.data("slidelink",0)):(punchgs.TweenLite.set(C,{width:"100%",height:"100%"}),a.data("slidelink",1))},endMoveCaption:function(a,e,n,o){if(e=void 0!=e?e:a.data("_mw"),n=void 0!=n?n:a.data("_pw"),a.data("outstarted",1),a.data("timeline"))a.data("timeline").pause();else if(void 0===a.data("_pw"))return;var d=new punchgs.TimelineLite,s=new punchgs.TimelineLite,c=new punchgs.TimelineLite,g=p(i(),a.data("transform_in"),1==o.sdir),m=a.data("transform_out")?p(r(),a.data("transform_out"),1==o.sdir):p(r(),a.data("transform_in"),1==o.sdir),v=a.data("splitout")&&a.data("splitout").match(/words|chars|lines/g)?a.data("mySplitText")[a.data("splitout")]:a,u=void 0==a.data("endelementdelay")?0:a.data("endelementdelay"),f=a.innerWidth(),w=a.innerHeight(),y=n.position();a.data("transform_out")&&a.data("transform_out").match(/auto:auto/g)&&(g.speed=m.speed,g.anim.ease=m.anim.ease,m=g);var b=h(a.data("mask_out"));m.anim.x=m.anim.x*o.bw||l(m.anim.x,o,f,w,y.top,y.left,"horizontal"),m.anim.y=m.anim.y*o.bw||l(m.anim.y,o,f,w,y.top,y.left,"vertical"),s.eventCallback("onStart",function(){var e={};e.layer=a,e.eventtype="leavestage",e.layertype=a.data("layertype"),e.layersettings=a.data(),a.data("active",!1),o.c.trigger("revolution.layeraction",[e])}),s.eventCallback("onComplete",function(){punchgs.TweenLite.set(a,{visibility:"hidden"}),punchgs.TweenLite.set(n,{visibility:"hidden"});var e={};
16433e.layer=a,e.eventtype="leftstage",a.data("active",!1),e.layertype=a.data("layertype"),e.layersettings=a.data(),o.c.trigger("revolution.layeraction",[e]),t.stopVideo&&t.stopVideo(a,o)}),d.add(s.staggerTo(v,m.speed,m.anim,u),0),b?(b.anim.ease=m.anim.ease,b.anim.overflow="hidden",b.anim.x=b.anim.x*o.bw||l(b.anim.x,o,f,w,y.top,y.left,"horizontal"),b.anim.y=b.anim.y*o.bw||l(b.anim.y,o,f,w,y.top,y.left,"vertical"),d.add(c.to(e,m.speed,b.anim,u),0)):d.add(c.set(e,{overflow:"visible",overwrite:"auto"},u),0),a.data("timeline_out",d)},removeTheCaptions:function(a,e){var i=a.data("index"),n=new Array;e.layers[i]&&jQuery.each(e.layers[i],function(a,e){n.push(e)}),e.layers["static"]&&jQuery.each(e.layers["static"],function(a,e){n.push(e)}),e.endtimeouts&&e.endtimeouts.length>0&&jQuery.each(e.endtimeouts,function(a,e){clearTimeout(e)}),e.endtimeouts=new Array,n&&jQuery.each(n,function(a){var i=jQuery(this),n=g(i,e,"out");0!=n&&(b(i),clearTimeout(i.data("videoplaywait")),t.stopVideo&&t.stopVideo(i,e),t.endMoveCaption(i,null,null,e),t.removeMediaFromList&&t.removeMediaFromList(i,e),e.lastplayedvideos=[])})}});var i=function(){var a=new Object;return a.anim=new Object,a.anim.x=0,a.anim.y=0,a.anim.z=0,a.anim.rotationX=0,a.anim.rotationY=0,a.anim.rotationZ=0,a.anim.scaleX=1,a.anim.scaleY=1,a.anim.skewX=0,a.anim.skewY=0,a.anim.opacity=1,a.anim.transformOrigin="50% 50%",a.anim.transformPerspective=600,a.anim.rotation=0,a.anim.ease=punchgs.Power3.easeOut,a.anim.force3D="auto",a.speed=.3,a.anim.autoAlpha=1,a.anim.visibility="visible",a.anim.overwrite="all",a},n=function(){var a=new Object;return a.anim=new Object,a.anim.stroke="none",a.anim.strokeWidth=0,a.anim.strokeDasharray="none",a.anim.strokeDashoffset="0",a},o=function(a,e){var t=a.split(";");return t&&jQuery.each(t,function(a,t){var i=t.split(":"),n=i[0],o=i[1];"sc"==n&&(e.anim.stroke=o),"sw"==n&&(e.anim.strokeWidth=o),"sda"==n&&(e.anim.strokeDasharray=o),"sdo"==n&&(e.anim.strokeDashoffset=o)}),e},r=function(){var a=new Object;return a.anim=new Object,a.anim.x=0,a.anim.y=0,a.anim.z=0,a},d=function(){var a=new Object;return a.anim=new Object,a.speed=.2,a},s=function(a,e){if(jQuery.isNumeric(parseFloat(a)))return parseFloat(a);if(void 0===a||"inherit"===a)return e;if(a.split("{").length>1){var t=a.split(","),i=parseFloat(t[1].split("}")[0]);t=parseFloat(t[0].split("{")[1]),a=Math.random()*(i-t)+t}return a},l=function(a,e,t,i,n,o,r){return!jQuery.isNumeric(a)&&a.match(/%]/g)?(a=a.split("[")[1].split("]")[0],"horizontal"==r?a=(t+2)*parseInt(a,0)/100:"vertical"==r&&(a=(i+2)*parseInt(a,0)/100)):(a="layer_left"===a?0-t:"layer_right"===a?t:a,a="layer_top"===a?0-i:"layer_bottom"===a?i:a,a="left"===a||"stage_left"===a?0-t-o:"right"===a||"stage_right"===a?e.conw-o:"center"===a||"stage_center"===a?e.conw/2-t/2-o:a,a="top"===a||"stage_top"===a?0-i-n:"bottom"===a||"stage_bottom"===a?e.conh-n:"middle"===a||"stage_middle"===a?e.conh/2-i/2-n:a),a},p=function(a,e,t){var i=new Object;if(i=jQuery.extend(!0,{},i,a),void 0===e)return i;var n=e.split(";");return n&&jQuery.each(n,function(a,e){var n=e.split(":"),o=n[0],r=n[1];t&&void 0!=r&&r.length>0&&r.match(/\(R\)/)&&(r=r.replace("(R)",""),r="right"===r?"left":"left"===r?"right":"top"===r?"bottom":"bottom"===r?"top":r,"["===r[0]&&"-"===r[1]?r=r.replace("[-","["):"["===r[0]&&"-"!==r[1]?r=r.replace("[","[-"):"-"===r[0]?r=r.replace("-",""):r[0].match(/[1-9]/)&&(r="-"+r)),void 0!=r&&(r=r.replace(/\(R\)/,""),("rotationX"==o||"rX"==o)&&(i.anim.rotationX=s(r,i.anim.rotationX)+"deg"),("rotationY"==o||"rY"==o)&&(i.anim.rotationY=s(r,i.anim.rotationY)+"deg"),("rotationZ"==o||"rZ"==o)&&(i.anim.rotation=s(r,i.anim.rotationZ)+"deg"),("scaleX"==o||"sX"==o)&&(i.anim.scaleX=s(r,i.anim.scaleX)),("scaleY"==o||"sY"==o)&&(i.anim.scaleY=s(r,i.anim.scaleY)),("opacity"==o||"o"==o)&&(i.anim.opacity=s(r,i.anim.opacity)),i.anim.opacity=0==i.anim.opacity?1e-4:i.anim.opacity,("skewX"==o||"skX"==o)&&(i.anim.skewX=s(r,i.anim.skewX)),("skewY"==o||"skY"==o)&&(i.anim.skewY=s(r,i.anim.skewY)),"x"==o&&(i.anim.x=s(r,i.anim.x)),"y"==o&&(i.anim.y=s(r,i.anim.y)),"z"==o&&(i.anim.z=s(r,i.anim.z)),("transformOrigin"==o||"tO"==o)&&(i.anim.transformOrigin=r.toString()),("transformPerspective"==o||"tP"==o)&&(i.anim.transformPerspective=parseInt(r,0)),("speed"==o||"s"==o)&&(i.speed=parseFloat(r)/1e3),("ease"==o||"e"==o)&&(i.anim.ease=r))}),i}
16433,h=function(a){if(void 0===a)return!1;var e=new Object;e.anim=new Object;var t=a.split(";");return t&&jQuery.each(t,function(a,t){t=t.split(":");var i=t[0],n=t[1];"x"==i&&(e.anim.x=n),"y"==i&&(e.anim.y=n),"s"==i&&(e.speed=parseFloat(n)/1e3),("e"==i||"ease"==i)&&(e.anim.ease=n)}),e},c=function(a,e,t){if(void 0==a&&(a=0),!jQuery.isArray(a)&&"string"===jQuery.type(a)&&(a.split(",").length>1||a.split("[").length>1)){a=a.replace("[",""),a=a.replace("]","");var i=a.match(/'/g)?a.split("',"):a.split(",");a=new Array,i&&jQuery.each(i,function(e,t){t=t.replace("'",""),t=t.replace("'",""),a.push(t)})}else{var n=a;jQuery.isArray(a)||(a=new Array,a.push(n))}var n=a[a.length-1];if(a.length<e.rle)for(var o=1;o<=e.curWinRange;o++)a.push(n);return a},g=function(a,e,t,i){var n=-1;if(a.hasClass("tp-static-layer")){a.data("staticlayer",!0);var o=parseInt(a.data("startslide"),0),r=parseInt(a.data("endslide"),0),d=e.c.find(".processing-revslide").index(),s=-1!=d?d:e.c.find(".active-revslide").index();s=-1==s?0:s,"in"===t?a.hasClass("rev-static-visbile")?n=r==s||o>s||s>r?2:0:s>=o&&r>=s||o==s||r==s?(i||(a.addClass("rev-static-visbile"),a.removeClass("rev-static-hidden")),n=1):n=0:a.hasClass("rev-static-visbile")?o>s||s>r?(n=2,i||(a.removeClass("rev-static-visbile"),a.addClass("rev-static-hidden"))):n=0:n=2}return n},m=function(a,e){if(void 0===e)return a;e=e.replace("c:","color:"),e=e.replace("bg:","background-color:"),e=e.replace("bw:","border-width:"),e=e.replace("bc:","border-color:"),e=e.replace("br:","borderRadius:"),e=e.replace("bs:","border-style:"),e=e.replace("td:","text-decoration:"),e=e.replace("zi:","zIndex:");var t=e.split(";");return t&&jQuery.each(t,function(e,t){var i=t.split(":");i[0].length>0&&(a.anim[i[0]]=i[1])}),a},v=function(a,e){var t,i=new Object,n=!1;if("rekursive"==e&&(t=a.closest(".tp-caption"),t&&a.css("fontSize")===t.css("fontSize")&&(n=!0)),i.basealign=a.data("basealign")||"grid",i.fontSize=n?void 0===t.data("fontsize")?parseInt(t.css("fontSize"),0)||0:t.data("fontsize"):void 0===a.data("fontsize")?parseInt(a.css("fontSize"),0)||0:a.data("fontsize"),i.fontWeight=n?void 0===t.data("fontweight")?parseInt(t.css("fontWeight"),0)||0:t.data("fontweight"):void 0===a.data("fontweight")?parseInt(a.css("fontWeight"),0)||0:a.data("fontweight"),i.whiteSpace=n?void 0===t.data("whitespace")?t.css("whitespace")||"normal":t.data("whitespace"):void 0===a.data("whitespace")?a.css("whitespace")||"normal":a.data("whitespace"),i.zIndex=n?void 0===t.data("zIndex")?t.css("zIndex")||"inherit":t.data("zIndex"):void 0===a.data("zIndex")?a.css("zIndex")||"inherit":a.data("zIndex"),-1!==jQuery.inArray(a.data("layertype"),["video","image","audio"])||a.is("img")?i.lineHeight=0:i.lineHeight=n?void 0===t.data("lineheight")?parseInt(t.css("lineHeight"),0)||0:t.data("lineheight"):void 0===a.data("lineheight")?parseInt(a.css("lineHeight"),0)||0:a.data("lineheight"),i.letterSpacing=n?void 0===t.data("letterspacing")?parseFloat(t.css("letterSpacing"),0)||0:t.data("letterspacing"):void 0===a.data("letterspacing")?parseFloat(a.css("letterSpacing"))||0:a.data("letterspacing"),i.paddingTop=void 0===a.data("paddingtop")?parseInt(a.css("paddingTop"),0)||0:a.data("paddingtop"),i.paddingBottom=void 0===a.data("paddingbottom")?parseInt(a.css("paddingBottom"),0)||0:a.data("paddingbottom"),i.paddingLeft=void 0===a.data("paddingleft")?parseInt(a.css("paddingLeft"),0)||0:a.data("paddingleft"),i.paddingRight=void 0===a.data("paddingright")?parseInt(a.css("paddingRight"),0)||0:a.data("paddingright"),i.marginTop=void 0===a.data("margintop")?parseInt(a.css("marginTop"),0)||0:a.data("margintop"),i.marginBottom=void 0===a.data("marginbottom")?parseInt(a.css("marginBottom"),0)||0:a.data("marginbottom"),i.marginLeft=void 0===a.data("marginleft")?parseInt(a.css("marginLeft"),0)||0:a.data("marginleft"),i.marginRight=void 0===a.data("marginright")?parseInt(a.css("marginRight"),0)||0:a.data("marginright"),i.borderTopWidth=void 0===a.data("bordertopwidth")?parseInt(a.css("borderTopWidth"),0)||0:a.data("bordertopwidth"),i.borderBottomWidth=void 0===a.data("borderbottomwidth")?parseInt(a.css("borderBottomWidth"),0)||0:a.data("borderbottomwidth"),i.borderLeftWidth=void 0===a.data("borderleftwidth")?parseInt(a.css("borderLeftWidth"),0)||0:a.data("borderleftwidth"),i.borderRightWidth=void 0===a.data("borderrightwidth")?parseInt(a.css("borderRightWidth"),0)||0:a.data("borderrightwidth"),"rekursive"!=e){if(i.color=void 0===a.data("c
16433olor")?"nopredefinedcolor":a.data("color"),i.whiteSpace=n?void 0===t.data("whitespace")?t.css("whiteSpace")||"nowrap":t.data("whitespace"):void 0===a.data("whitespace")?a.css("whiteSpace")||"nowrap":a.data("whitespace"),i.minWidth=void 0===a.data("width")?parseInt(a.css("minWidth"),0)||0:a.data("width"),i.minHeight=void 0===a.data("height")?parseInt(a.css("minHeight"),0)||0:a.data("height"),void 0!=a.data("videowidth")&&void 0!=a.data("videoheight")){var o=a.data("videowidth"),r=a.data("videoheight");o="100%"===o?"none":o,r="100%"===r?"none":r,a.data("width",o),a.data("height",r)}i.maxWidth=void 0===a.data("width")?parseInt(a.css("maxWidth"),0)||"none":a.data("width"),i.maxHeight=void 0===a.data("height")?parseInt(a.css("maxHeight"),0)||"none":a.data("height"),i.wan=void 0===a.data("wan")?parseInt(a.css("-webkit-transition"),0)||"none":a.data("wan"),i.moan=void 0===a.data("moan")?parseInt(a.css("-moz-animation-transition"),0)||"none":a.data("moan"),i.man=void 0===a.data("man")?parseInt(a.css("-ms-animation-transition"),0)||"none":a.data("man"),i.ani=void 0===a.data("ani")?parseInt(a.css("transition"),0)||"none":a.data("ani")}return i.styleProps=a.css(["background-color","border-top-color","border-bottom-color","border-right-color","border-left-color","border-top-style","border-bottom-style","border-left-style","border-right-style","border-left-width","border-right-width","border-bottom-width","border-top-width","color","text-decoration","font-style","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]),i},u=function(a,e){var t=new Object;return a&&jQuery.each(a,function(i,n){t[i]=c(n,e)[e.curWinRange]||a[i]}),t},f=function(a,e,t,i){return a=jQuery.isNumeric(a)?a*e+"px":a,a="full"===a?i:"auto"===a||"none"===a?t:a},w=function(a,e,t,i){var n;try{if("BR"==a[0].nodeName||"br"==a[0].tagName)return!1}catch(o){}void 0===a.data("cssobj")?(n=v(a,t),a.data("cssobj",n)):n=a.data("cssobj");var r=u(n,e),d=e.bw,s=e.bh;if("off"===i&&(d=1,s=1),"auto"==r.lineHeight&&(r.lineHeight=r.fontSize+4),!a.hasClass("tp-splitted")){a.css("-webkit-transition","none"),a.css("-moz-transition","none"),a.css("-ms-transition","none"),a.css("transition","none");var l=void 0!==a.data("transform_hover")||void 0!==a.data("style_hover");if(l&&punchgs.TweenLite.set(a,r.styleProps),punchgs.TweenLite.set(a,{fontSize:Math.round(r.fontSize*d)+"px",fontWeight:r.fontWeight,letterSpacing:Math.floor(r.letterSpacing*d)+"px",paddingTop:Math.round(r.paddingTop*s)+"px",paddingBottom:Math.round(r.paddingBottom*s)+"px",paddingLeft:Math.round(r.paddingLeft*d)+"px",paddingRight:Math.round(r.paddingRight*d)+"px",marginTop:r.marginTop*s+"px",marginBottom:r.marginBottom*s+"px",marginLeft:r.marginLeft*d+"px",marginRight:r.marginRight*d+"px",borderTopWidth:Math.round(r.borderTopWidth*s)+"px",borderBottomWidth:Math.round(r.borderBottomWidth*s)+"px",borderLeftWidth:Math.round(r.borderLeftWidth*d)+"px",borderRightWidth:Math.round(r.borderRightWidth*d)+"px",lineHeight:Math.round(r.lineHeight*s)+"px",overwrite:"auto"}),"rekursive"!=t){var p="slide"==r.basealign?e.ulw:e.gridwidth[e.curWinRange],h="slide"==r.basealign?e.ulh:e.gridheight[e.curWinRange],c=f(r.maxWidth,d,"none",p),g=f(r.maxHeight,s,"none",h),m=f(r.minWidth,d,"0px",p),w=f(r.minHeight,s,"0px",h);if(punchgs.TweenLite.set(a,{maxWidth:c,maxHeight:g,minWidth:m,minHeight:w,whiteSpace:r.whiteSpace,overwrite:"auto"}),"nopredefinedcolor"!=r.color&&punchgs.TweenLite.set(a,{color:r.color,overwrite:"auto"}),void 0!=a.data("svg_src")){var y="nopredefinedcolor"!=r.color&&void 0!=r.color?r.color:void 0!=r.css&&"nopredefinedcolor"!=r.css.color&&void 0!=r.css.color?r.css.color:void 0!=r.styleProps.color?r.styleProps.color:void 0!=r.styleProps.css&&void 0!=r.styleProps.css.color?r.styleProps.css.color:!1;0!=y&&punchgs.TweenLite.set(a.find("svg"),{fill:y,overwrite:"auto"})}}setTimeout(function(){a.css("-webkit-transition",a.data("wan")),a.css("-moz-transition",a.data("moan")),a.css("-ms-transition",a.data("man")),a.css("transition",a.data("ani"))},30)}},y=function(a,e){if(a.hasClass("rs-pendulum")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.TimelineLite);var t=void 0==a.data("startdeg")?-20:a.data("startdeg"),i=void 0==a.data("enddeg")?20:a.data("enddeg"),n=void 0==a.data("speed")?2:a.data("speed"),o=void 0==a.data("origin")?"50% 50%":a.data("origin"),r=void 0==a.data("easing")?punchgs.Power2.easeInOut:a.data("ease");t*=e,i*=e,a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",rotation:t,transformOrigin:o},{rotation:i,ease:r})),a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",rotation:i,transformOrigin:o},{rotation:t,ease:r,onComplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasClass("rs-rotate")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.TimelineLite);var t=void 0==a.data("startdeg")?0:a.data("startdeg"),i=void 0==a.data("enddeg")?360:a.data("enddeg");n=void 0==a.data("speed")?2:a.data("speed"),o=void 0==a.data("origin")?"50% 50%":a.data("origin"),r=void 0==a.data("easing")?punchgs.Power2.easeInOut:a.data("easing"),t*=e,i*=e,a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",rotation:t,transformOrigin:o},{rotation:i,ease:r,onComplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasClass("rs-slideloop")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.TimelineLite);var d=void 0==a.data("xs")?0:a.data("xs"),s=void 0==a.data("ys")?0:a.data("ys"),l=void 0==a.data("xe")?0:a.data("xe"),p=void 0==a.data("ye")?0:a.data("ye"),n=void 0==a.data("speed")?2:a.data("speed"),r=void 0==a.data("easing")?punchgs.Power2.easeInOut:a.data("easing");d*=e,s*=e,l*=e,p*=e,a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",x:d,y:s},{x:l,y:p,ease:r})),a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",x:l,y:p},{x:d,y:s,onComplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasClass("rs-pulse")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.TimelineLite);var h=void 0==a.data("zoomstart")?0:a.data("zoomstart"),c=void 0==a.data("zoomend")?0:a.data("zoomend"),n=void 0==a.data("speed")?2:a.data("speed"),r=void 0==a.data("easing")?punchgs.Power2.easeInOut:a.data("easing");a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",scale:h},{scale:c,ease:r})),a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a,n,{force3D:"auto",scale:c},{scale:h,onComplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasClass("rs-wave")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.TimelineLite);var g=void 0==a.data("angle")?10:parseInt(a.data("angle"),0),m=void 0==a.data("radius")?10:parseInt(a.data("radius"),0),n=void 0==a.data("speed")?-20:a.data("speed"),o=void 0==a.data("origin")?"50% 50%":a.data("origin"),v=o.split(" "),u=new Object;v.length>=1?(u.x=v[0],u.y=v[1]):(u.x="50%",u.y="50%"),g*=e,m*=e;var f=0-a.height()/2+m*(-1+parseInt(u.y,0)/100),w=a.width()*(-.5+parseInt(u.x,0)/100),y={a:0,ang:g,element:a,unit:m,xoffset:w,yoffset:f};a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(y,n,{ 16434a:360},{a:0,force3D:"auto",ease:punchgs.Linear.easeNone,onUpdate:function(){var a=(y.a+y.ang)*(Math.PI/180);punchgs.TweenLite.to(y.element,.1,{force3D:"auto",x:y.xoffset+Math.cos(a)*y.unit,y:y.unit*(1-Math.sin(a))+y.yoffset/.5})},onComplete:function(){a.data("loop-timeline").restart()}}))}},b=function(a){a.find(".rs-pendulum, .rs-slideloop, .rs-pulse, .rs-wave").each(function(){var a=jQuery(this);void 0!=a.data("loop-timeline")&&(a.data("loop-timeline").pause(),a.data("loop-timeline",null))})}}(jQuery);; 16435/***************************************************************************************************** 16436 * jquery.themepunch.revmigrate.js - jQuery Plugin for Revolution Slider Migration from 4.x to 5.0 16437 * @version: 1.0.2 (20.01.2016) 16438 * @requires jQuery v1.7 or later (tested on 1.9) 16439 * @author ThemePunch 16440*****************************************************************************************************/ 16441!function(t){var a=jQuery.fn.revolution;jQuery.extend(!0,a,{migration:function(t,a){return a=o(a),e(t,a),a}});var o=function(t){if(t.parallaxLevels||t.parallaxBgFreeze){var a=new Object;a.type=t.parallax,a.levels=t.parallaxLevels,a.bgparallax="on"==t.parallaxBgFreeze?"off":"on",a.disable_onmobile=t.parallaxDisableOnMobile,t.parallax=a}if(void 0===t.disableProgressBar&&(t.disableProgressBar=t.hideTimerBar||"off"),(t.startwidth||t.startheight)&&(t.gridwidth=t.startwidth,t.gridheight=t.startheight),void 0===t.sliderType&&(t.sliderType="standard"),"on"===t.fullScreen&&(t.sliderLayout="fullscreen"),"on"===t.fullWidth&&(t.sliderLayout="fullwidth"),void 0===t.sliderLayout&&(t.sliderLayout="auto"),void 0===t.navigation){var o=new Object;if("solo"==t.navigationArrows||"nextto"==t.navigationArrows){var e=new Object;e.enable=!0,e.style=t.navigationStyle||"",e.hide_onmobile="on"===t.hideArrowsOnMobile?!0:!1,e.hide_onleave=t.hideThumbs>0?!0:!1,e.hide_delay=t.hideThumbs>0?t.hideThumbs:200,e.hide_delay_mobile=t.hideNavDelayOnMobile||1500,e.hide_under=0,e.tmp="",e.left={h_align:t.soloArrowLeftHalign,v_align:t.soloArrowLeftValign,h_offset:t.soloArrowLeftHOffset,v_offset:t.soloArrowLeftVOffset},e.right={h_align:t.soloArrowRightHalign,v_align:t.soloArrowRightValign,h_offset:t.soloArrowRightHOffset,v_offset:t.soloArrowRightVOffset},o.arrows=e}if("bullet"==t.navigationType){var r=new Object;r.style=t.navigationStyle||"",r.enable=!0,r.hide_onmobile="on"===t.hideArrowsOnMobile?!0:!1,r.hide_onleave=t.hideThumbs>0?!0:!1,r.hide_delay=t.hideThumbs>0?t.hideThumbs:200,r.hide_delay_mobile=t.hideNavDelayOnMobile||1500,r.hide_under=0,r.direction="horizontal",r.h_align=t.navigationHAlign||"center",r.v_align=t.navigationVAlign||"bottom",r.space=5,r.h_offset=t.navigationHOffset||0,r.v_offset=t.navigationVOffset||20,r.tmp='<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>',o.bullets=r}if("thumb"==t.navigationType){var i=new Object;i.style=t.navigationStyle||"",i.enable=!0,i.width=t.thumbWidth||100,i.height=t.thumbHeight||50,i.min_width=t.thumbWidth||100,i.wrapper_padding=2,i.wrapper_color="#f5f5f5",i.wrapper_opacity=1,i.visibleAmou
16441nt=t.thumbAmount||3,i.hide_onmobile="on"===t.hideArrowsOnMobile?!0:!1,i.hide_onleave=t.hideThumbs>0?!0:!1,i.hide_delay=t.hideThumbs>0?t.hideThumbs:200,i.hide_delay_mobile=t.hideNavDelayOnMobile||1500,i.hide_under=0,i.direction="horizontal",i.span=!1,i.position="inner",i.space=2,i.h_align=t.navigationHAlign||"center",i.v_align=t.navigationVAlign||"bottom",i.h_offset=t.navigationHOffset||0,i.v_offset=t.navigationVOffset||20,i.tmp='<span class="tp-thumb-image"></span><span class="tp-thumb-title"></span>',o.thumbnails=i}t.navigation=o,t.navigation.keyboardNavigation=t.keyboardNavigation||"on",t.navigation.onHoverStop=t.onHoverStop||"on",t.navigation.touch={touchenabled:t.touchenabled||"on",swipe_treshold:t.swipe_treshold||75,swipe_min_touches:t.swipe_min_touches||1,drag_block_vertical:t.drag_block_vertical||!1}}return void 0==t.fallbacks&&(t.fallbacks={isJoomla:t.isJoomla||!1,panZoomDisableOnMobile:t.parallaxDisableOnMobile||"off",simplifyAll:t.simplifyAll||"on",nextSlideOnWindowFocus:t.nextSlideOnWindowFocus||"off",disableFocusListener:t.disableFocusListener||!0}),t},e=function(t,a){var o=new Object,e=t.width(),r=t.height();o.skewfromleftshort="x:-50;skX:85;o:0",o.skewfromrightshort="x:50;skX:-85;o:0",o.sfl="x:-50;o:0",o.sfr="x:50;o:0",o.sft="y:-50;o:0",o.sfb="y:50;o:0",o.skewfromleft="x:top;skX:85;o:0",o.skewfromright="x:bottom;skX:-85;o:0",o.lfl="x:top;o:0",o.lfr="x:bottom;o:0",o.lft="y:left;o:0",o.lfb="y:right;o:0",o.fade="o:0";720*Math.random()-360;t.find(".tp-caption").each(function(){var t=jQuery(this),a=(Math.random()*(2*e)-e,Math.random()*(2*r)-r,3*Math.random(),720*Math.random()-360,70*Math.random()-35,70*Math.random()-35,t.attr("class"));o.randomrotate="x:{-400,400};y:{-400,400};sX:{0,2};sY:{0,2};rZ:{-180,180};rX:{-180,180};rY:{-180,180};o:0;",a.match("randomrotate")?t.data("transform_in",o.randomrotate):a.match(/\blfl\b/)?t.data("transform_in",o.lfl):a.match(/\blfr\b/)?t.data("transform_in",o.lfr):a.match(/\blft\b/)?t.data("transform_in",o.lft):a.match(/\blfb\b/)?t.data("transform_in",o.lfb):a.match(/\bsfl\b/)?t.data("transform_in",o.sfl):a.match(/\bsfr\b/)?t.data("transform_in",o.sfr):a.match(/\bsft\b/)?t.data("transform_in",o.sft):a.match(/\bsfb\b/)?t.data("transform_in",o.sfb):a.match(/\bskewfromleftshort\b/)?t.data("transform_in",o.skewfromleftshort):a.match(/\bskewfromrightshort\b/)?t.data("transform_in",o.skewfromrightshort):a.match(/\bskewfromleft\b/)?t.data("transform_in",o.skewfromleft):a.match(/\bskewfromright\b/)?t.data("transform_in",o.skewfromright):a.match(/\bfade\b/)&&t.data("transform_in",o.fade),a.match(/\brandomrotateout\b/)?t.data("transform_out",o.randomrotate):a.match(/\bltl\b/)?t.data("transform_out",o.lfl):a.match(/\bltr\b/)?t.data("transform_out",o.lfr):a.match(/\bltt\b/)?t.data("transform_out",o.lft):a.match(/\bltb\b/)?t.data("transform_out",o.lfb):a.match(/\bstl\b/)?t.data("transform_out",o.sfl):a.match(/\bstr\b/)?t.data("transform_out",o.sfr):a.match(/\bstt\b/)?t.data("transform_out",o.sft):a.match(/\bstb\b/)?t.data("transform_out",o.sfb):a.match(/\bskewtoleftshortout\b/)?t.data("transform_out",o.skewfromleftshort):a.match(/\bskewtorightshortout\b/)?t.data("transform_out",o.skewfromrightshort):a.match(/\bskewtoleftout\b/)?t.data("transform_out",o.skewfromleft):a.match(/\bskewtorightout\b/)?t.data("transform_out",o.skewfromright):a.match(/\bfadeout\b/)&&t.data("transform_out",o.fade),void 0!=t.data("customin")&&t.data("transform_in",t.data("customin")),void 0!=t.data("customout")&&t.data("transform_out",t.data("customout"))})}}(jQuery);; 16442/******************************************** 16443 * REVOLUTION 5.2 EXTENSION - NAVIGATION 16444 * @version: 1.2.4 (10.03.2016) 16445 * @requires jquery.themepunch.revolution.js 16446 * @author ThemePunch 16447*********************************************/ 16448!function(t){var e=jQuery.fn.revolution,i=e.is_mobile();jQuery.extend(!0,e,{hideUnHideNav:function(t){var e=t.c.width(),i=t.navigation.arrows,a=t.navigation.bullets,n=t.navigation.thumbnails,r=t.navigation.tabs;p(i)&&T(t.c.find(".tparrows"),i.hide_under,e,i.hide_over),p(a)&&T(t.c.find(".tp-bullets"),a.hide_under,e,a.hide_over),p(n)&&T(t.c.parent().find(".tp-thumbs"),n.hide_under,e,n.hide_over),p(r)&&T(t.c.parent().find(".tp-tabs"),r.hide_under,e,r.hide_over),y(t)},resizeThumbsTabs:function(t,e){if(t.navigation&&t.navigation.tabs.enable||t.navigation&&t.navigation.thumbnails.enable){var i=(jQuery(window).width()-480)/500,a=new punchgs.TimelineLite,r=t.navigation.tabs,s=t.navigation.thumbnails,o=t.navigation.bullets;if(a.pause(),i=i>1?1:0>i?0:i,p(r)&&(e||r.width>r.min_width)&&n(i,a,t.c,r,t.slideamount,"tab"),p(s)&&(e||s.width>s.min_width)&&n(i,a,t.c,s,t.slideamount,"thumb"),p(o)&&e){var d=t.c.find(".tp-bullets");d.find(".tp-bullet").each(function(t){var e=jQuery(this),i=t+1,a=e.outerWidth()+parseInt(void 0===o.space?0:o.space,0),n=e.outerHeight()+parseInt(void 0===o.space?0:o.space,0);"vertical"===o.direction?(e.css({top:(i-1)*n+"px",left:"0px"}),d.css({height:(i-1)*n+e.outerHeight(),width:e.outerWidth()})):(e.css({left:(i-1)*a+"px",top:"0px"}),d.css({width:(i-1)*a+e.outerWidth(),height:e.outerHeight()}))})}a.play(),y(t)}return!0},updateNavIndexes:function(t){function i(t){a.find(t).lenght>0&&a.find(t).each(function(t){jQuery(this).data("liindex",t)})}var a=t.c;i(".tp-tab"),i(".tp-bullet"),i(".tp-thumb"),e.resizeThumbsTabs(t,!0),e.manageNavigation(t)},manageNavigation:function(t){var i=e.getHorizontalOffset(t.c.parent(),"left"),n=e.getHorizontalOffset(t.c.parent(),"right");p(t.navigation.bullets)&&("fullscreen"!=t.sliderLayout&&"fullwidth"!=t.sliderLayout&&(t.navigation.bullets.h_offset_old=void 0===t.navigation.bullets.h_offset_old?t.navigation.bullets.h_offset:t.navigation.bullets.h_offset_old,t.n
vendor: 23,511 bytes, line 16448
16448avigation.bullets.h_offset="center"===t.navigation.bullets.h_align?t.navigation.bullets.h_offset_old+i/2-n/2:t.navigation.bullets.h_offset_old+i-n),b(t.c.find(".tp-bullets"),t.navigation.bullets,t)),p(t.navigation.thumbnails)&&b(t.c.parent().find(".tp-thumbs"),t.navigation.thumbnails,t),p(t.navigation.tabs)&&b(t.c.parent().find(".tp-tabs"),t.navigation.tabs,t),p(t.navigation.arrows)&&("fullscreen"!=t.sliderLayout&&"fullwidth"!=t.sliderLayout&&(t.navigation.arrows.left.h_offset_old=void 0===t.navigation.arrows.left.h_offset_old?t.navigation.arrows.left.h_offset:t.navigation.arrows.left.h_offset_old,t.navigation.arrows.left.h_offset="right"===t.navigation.arrows.left.h_align?t.navigation.arrows.left.h_offset_old+n:t.navigation.arrows.left.h_offset_old+i,t.navigation.arrows.right.h_offset_old=void 0===t.navigation.arrows.right.h_offset_old?t.navigation.arrows.right.h_offset:t.navigation.arrows.right.h_offset_old,t.navigation.arrows.right.h_offset="right"===t.navigation.arrows.right.h_align?t.navigation.arrows.right.h_offset_old+n:t.navigation.arrows.right.h_offset_old+i),b(t.c.find(".tp-leftarrow.tparrows"),t.navigation.arrows.left,t),b(t.c.find(".tp-rightarrow.tparrows"),t.navigation.arrows.right,t)),p(t.navigation.thumbnails)&&a(t.c.parent().find(".tp-thumbs"),t.navigation.thumbnails),p(t.navigation.tabs)&&a(t.c.parent().find(".tp-tabs"),t.navigation.tabs)},createNavigation:function(t,e){var n=t.parent(),r=e.navigation.arrows,d=e.navigation.bullets,u=e.navigation.thumbnails,f=e.navigation.tabs,m=p(r),b=p(d),_=p(u),y=p(f);s(t,e),o(t,e),m&&v(t,r,e),e.li.each(function(i){var a=jQuery(e.li[e.li.length-1-i]),n=jQuery(this);b&&(e.navigation.bullets.rtl?w(t,d,a,e):w(t,d,n,e)),_&&(e.navigation.thumbnails.rtl?x(t,u,a,"tp-thumb",e):x(t,u,n,"tp-thumb",e)),y&&(e.navigation.tabs.rtl?x(t,f,a,"tp-tab",e):x(t,f,n,"tp-tab",e))}),t.bind("revolution.slide.onafterswap revolution.nextslide.waiting",function(){var i=0==t.find(".next-revslide").length?t.find(".active-revslide").data("index"):t.find(".next-revslide").data("index");t.find(".tp-bullet").each(function(){var t=jQuery(this);t.data("liref")===i?t.addClass("selected"):t.removeClass("selected")}),n.find(".tp-thumb, .tp-tab").each(function(){var t=jQuery(this);t.data("liref")===i?(t.addClass("selected"),t.hasClass("tp-tab")?a(n.find(".tp-tabs"),f):a(n.find(".tp-thumbs"),u)):t.removeClass("selected")});var s=0,o=!1;e.thumbs&&jQuery.each(e.thumbs,function(t,e){s=o===!1?t:s,o=e.id===i||t===i?!0:o});var d=s>0?s-1:e.slideamount-1,l=s+1==e.slideamount?0:s+1;if(r.enable===!0){var h=r.tmp;if(jQuery.each(e.thumbs[d].params,function(t,e){h=h.replace(e.from,e.to)}),r.left.j.html(h),h=r.tmp,l>e.slideamount)return;jQuery.each(e.thumbs[l].params,function(t,e){h=h.replace(e.from,e.to)}),r.right.j.html(h),punchgs.TweenLite.set(r.left.j.find(".tp-arr-imgholder"),{backgroundImage:"url("+e.thumbs[d].src+")"}),punchgs.TweenLite.set(r.right.j.find(".tp-arr-imgholder"),{backgroundImage:"url("+e.thumbs[l].src+")"})}}),h(r),h(d),h(u),h(f),n.on("mouseenter mousemove",function(){n.hasClass("tp-mouseover")||(n.addClass("tp-mouseover"),punchgs.TweenLite.killDelayedCallsTo(g),m&&r.hide_onleave&&g(n.find(".tparrows"),r,"show"),b&&d.hide_onleave&&g(n.find(".tp-bullets"),d,"show"),_&&u.hide_onleave&&g(n.find(".tp-thumbs"),u,"show"),y&&f.hide_onleave&&g(n.find(".tp-tabs"),f,"show"),i&&(n.removeClass("tp-mouseover"),c(t,e)))}),n.on("mouseleave",function(){n.removeClass("tp-mouseover"),c(t,e)}),m&&r.hide_onleave&&g(n.find(".tparrows"),r,"hide",0),b&&d.hide_onleave&&g(n.find(".tp-bullets"),d,"hide",0),_&&u.hide_onleave&&g(n.find(".tp-thumbs"),u,"hide",0),y&&f.hide_onleave&&g(n.find(".tp-tabs"),f,"hide",0),_&&l(n.find(".tp-thumbs"),e),y&&l(n.find(".tp-tabs"),e),"carousel"===e.sliderType&&l(t,e,!0),"on"==e.navigation.touch.touchenabled&&l(t,e,"swipebased")}});var a=function(t,e){var i=(t.hasClass("tp-thumbs")?".tp-thumbs":".tp-tabs",t.hasClass("tp-thumbs")?".tp-thumb-mask":".tp-tab-mask"),a=t.hasClass("tp-thumbs")?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",n=t.hasClass("tp-thumbs")?".tp-thumb":".tp-tab",r=t.find(i),s=r.find(a),o=e.direction,d="vertical"===o?r.find(n).first().outerHeight(!0)+e.space:r.find(n).first().outerWidth(!0)+e.space,l="vertical"===o?r.height():r.width(),h=parseInt(r.find(n+".selected").data("liindex"),0),p=l/d,u="vertical"===o?r.height():r.width(),c=0-h*d,g="vertical"===o?s.height():s.width(),v=0-(g-u)>c?0-(g-u):v>0?0:c,f=s.data("offset");p>2&&(v=0>=c-(f+d)?0-d>c-(f+d)?f:v+d:v,v=d>c-d+f+l&&c+(Math.round(p)-2)*d<f?c+(Math.round(p)-2)*d:v),v=0-(g-u)>v?0-(g-u):v>0?0:v,"vertical"!==o&&r.width()>=s.width()&&(v=0),"vertical"===o&&r.height()>=s.height()&&(v=0),t.hasClass("dragged")||("vertical"===o?s.data("tmmove",punchgs.TweenLite.to(s,.5,{top:v+"px",ease:punchgs.Power3.easeInOut})):s.data("tmmove",punchgs.TweenLite.to(s,.5,{left:v+"px",ease:punchgs.Power3.easeInOut})),s.data("offset",v))},n=function(t,e,i,a,n,r){var s=i.parent().find(".tp-"+r+"s"),o=s.find(".tp-"+r+"s-inner-wrapper"),d=s.find(".tp-"+r+"-mask"),l=a.width*t<a.min_width?a.min_width:Math.round(a.width*t),h=Math.round(l/a.width*a.height),p="vertical"===a.direction?l:l*n+a.space*(n-1),u="vertical"===a.direction?h*n+a.space*(n-1):h,c="vertical"===a.direction?{width:l+"px"}:{height:h+"px"};e.add(punchgs.TweenLite.set(s,c)),e.add(punchgs.TweenLite.set(o,{width:p+"px",height:u+"px"})),e.add(punchgs.TweenLite.set(d,{width:p+"px",height:u+"px"}));var g=o.find(".tp-"+r);return g&&jQuery.each(g,function(t,i){"vertical"===a.direction?e.add(punchgs.TweenLite.set(i,{top:t*(h+parseInt(void 0===a.space?0:a.space,0)),width:l+"px",height:h+"px"})):"horizontal"===a.direction&&e.add(punchgs.TweenLite.set(i,{left:t*(l+parseInt(void 0===a.space?0:a.space,0)),width:l+"px",height:h+"px"}))}),e},r=function(t){var e=0,i=0,a=0,n=0,r=1,s=1,o=1;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),a=e*r,n=i*r,"deltaY"in t&&(n=t.deltaY),"deltaX"in t&&(a=t.deltaX),(a||n)&&t.deltaMode&&(1==t.deltaMode?(a*=s,n*=s):(a*=o,n*=o)),a&&!e&&(e=1>a?-1:1),n&&!i&&(i=1>n?-1:1),n=navigator.userAgent.match(/mozilla/i)?10*n:n,(n>300||-300>n)&&(n/=10),{spinX:e,spinY:i,pixelX:a,pixelY:n}},s=function(t,i){"on"===i.navigation.keyboardNavigation&&jQuery(document).keydown(function(a){("horizontal"==i.navigation.keyboard_direction&&39==a.keyCode||"vertical"==i.navigation.keyboard_direction&&40==a.keyCode)&&(i.sc_indicator="arrow",i.sc_indicator_dir=0,e.callingNewSlide(i,t,1)),("horizontal"==i.navigation.keyboard_direction&&37==a.keyCode||"vertical"==i.navigation.keyboard_direction&&38==a.keyCode)&&(i.sc_indicator="arrow",i.sc_indicator_dir=1,e.callingNewSlide(i,t,-1))})},o=function(t,i){if("on"===i.navigation.mouseScrollNavigation||"carousel"===i.navigation.mouseScrollNavigation){i.isIEEleven=!!navigator.userAgent.match(/Trident.*rv\:11\./),i.isSafari=!!navigator.userAgent.match(/safari/i),i.ischrome=!!navigator.userAgent.match(/chrome/i);var a=i.ischrome?-49:i.isIEEleven||i.isSafari?-9:navigator.userAgent.match(/mozilla/i)?-29:-49,n=i.ischrome?49:i.isIEEleven||i.isSafari?9:navigator.userAgent.match(/mozilla/i)?29:49;t.on("mousewheel DOMMouseScroll",function(s){var o=r(s.originalEvent),d=t.find(".tp-revslider-slidesli.active-revslide").index(),l=t.find(".tp-revslider-slidesli.processing-revslide").index(),h=-1!=d&&0==d||-1!=l&&0==l?!0:!1,p=-1!=d&&d==i.slideamount-1||1!=l&&l==i.slideamount-1?!0:!1,u=!0;"carousel"==i.navigation.mouseScrollNavigation&&(h=p=!1),-1==l?o.pixelY<a?(h||(i.sc_indicator="arrow","reverse"!==i.navigation.mouseScrollReverse&&(i.sc_indicator_dir=0,e.callingNewSlide(i,t,-1)),u=!1),p||(i.sc_indicator="arrow","reverse"===i.navigation.mouseScrollReverse&&(i.sc_indicator_dir=1,e.callingNewSlide(i,t,1)),u=!1)):o.pixelY>n&&(p||(i.sc_indicator="arrow","reverse"!==i.navigation.mouseScrollReverse&&(i.sc_indicator_dir=1,e.callingNewSlide(i,t,1)),u=!1),h||(i.sc_indicator="arrow","reverse"===i.navigation.mouseScrollReverse&&(i.sc_indicator_dir=0,e.callingNewSlide(i,t,-1)),u=!1)):u=!1;var c=i.c.offset().top-jQuery("body").scrollTop(),g=c+i.c.height();return"carousel"!=i.navigation.mouseScrollNavigation?("reverse"!==i.navigation.mouseScrollReverse&&(c>0&&o.pixelY>0||g<jQuery(window).height()&&o.pixelY<0)&&(u=!0),"reverse"===i.navigation.mouseScrollReverse&&(0>c&&o.pixelY<0||g>jQuery(window).height()&&o.pixelY>0)&&(u=!0)):u=!1,0==u?(s.preventDefault(s),!1):void 0})}},d=function(t,e,a){return t=i?jQuery(a.target).closest("."+t).length||jQuery(a.srcElement).closest("."+t).length:jQuery(a.toElement).closest("."+t).length||jQuery(a.originalTarget).closest("."+t).length,t===!0||1===t?1:0},l=function(t,a,n){t.data("opt",a);var r=a.carousel;jQuery(".bullet, .bullets, .tp-bullets, .tparrows").addClass("noSwipe"),r.Limit="endless";var s=(i||"Firefox"===e.get_browser(),t),o="vertical"===a.navigation.thumbnails.direction||"vertical"===a.navigation.tabs.direction?"none":"vertical",l=a.navigation.touch.swipe_direction||"horizontal";o="swipebased"==n&&"vertical"==l?"none":n?"vertical":o,jQuery.fn.swipetp||(jQuery.fn.swipetp=jQuery.fn.swipe),jQuery.fn.swipetp.defaults&&jQuery.fn.swipetp.defaults.excludedElements||jQuery.fn.swipetp.defaults||(jQuery.fn.swipetp.defaults=new Object),jQuery.fn.swipetp.defaults.excludedElements="label, button, input, select, textarea, .noSwipe",s.swipetp({allowPageScroll:o,triggerOnTouchLeave:!0,treshold:a.navigation.touch.swipe_treshold,fingers:a.navigation.touch.swipe_min_touches,excludeElements:jQuery.fn.swipetp.defaults.excludedElements,swipeStatus:function(i,n,s,o,h,p,u){var c=d("rev_slider_wrapper",t,i),g=d("tp-thumbs",t,i),v=d("tp-tabs",t,i),f=jQuery(this).attr("class"),m=f.match(/tp-tabs|tp-thumb/gi)?!0:!1;if("carousel"===a.sliderType&&(("move"===n||"end"===n||"cancel"==n)&&a.dragStartedOverSlider&&!a.dragStartedOverThumbs&&!a.dragStartedOverTabs||"start"===n&&c>0&&0===g&&0===v))switch(a.dragStartedOverSlider=!0,o=s&&s.match(/left|up/g)?Math.round(-1*o):o=Math.round(1*o),n){case"start":void 0!==r.positionanim&&(r.positionanim.kill(),r.slide_globaloffset="off"===r.infinity?r.slide_offset:e.simp(r.slide_offset,r.maxwidth)),r.overpull="none",r.wrap.addClass("dragged");break;case"move":if(r.slide_offset="off"===r.infinity?r.slide_globaloffset+o:e.simp(r.slide_globaloffset+o,r.maxwidth),"off"===r.infinity){var b="center"===r.horizontal_align?(r.wrapwidth/2-r.slide_width/2-r.slide_offset)/r.slide_width:(0-r.slide_offset)/r.slide_width;"none"!==r.overpull&&0!==r.overpull||!(0>b||b>a.slideamount-1)?b>=0&&b<=a.slideamount-1&&(b>=0&&o>r.overpull||b<=a.slideamount-1&&o<r.overpull)&&(r.overpull=0):r.overpull=o,r.slide_offset=0>b?r.slide_offset+(r.overpull-o)/1.1+Math.sqrt(Math.abs((r.overpull-o)/1.1)):b>a.slideamount-1?r.slide_offset+(r.overpull-o)/1.1-Math.sqrt(Math.abs((r.overpull-o)/1.1)):r.slide_offset}e.organiseCarousel(a,s,!0,!0);break;case"end":case"cancel":r.slide_globaloffset=r.slide_offset,r.wrap.removeClass("dragged"),e.carouselToEvalPosition(a,s),a.dragStartedOverSlider=!1,a.dragStartedOverThumbs=!1,a.dragStartedOverTabs=!1}else{if(("move"!==n&&"end"!==n&&"cancel"!=n||a.dragStartedOverSlider||!a.dragStartedOverThumbs&&!a.dragStartedOverTabs)&&!("start"===n&&c>0&&(g>0||v>0))){if("end"==n&&!m){if(a.sc_indicator="arrow","horizontal"==l&&"left"==s||"vertical"==l&&"up"==s)return a.sc_indicator_dir=0,e.callingNewSlide(a,a.c,1),!1;if("horizontal"==l&&"right"==s||"vertical"==l&&"down"==s)return a.sc_indicator_dir=1,e.callingNewSlide(a,a.c,-1),!1}return a.dragStartedOverSlider=!1,a.dragStartedOverThumbs=!1,a.dragStartedOverTabs=!1,!0}g>0&&(a.dragStartedOverThumbs=!0),v>0&&(a.dragStartedOverTabs=!0);var w=a.dragStartedOverThumbs?".tp-thumbs":".tp-tabs",_=a.dragStartedOverThumbs?".tp-thumb-mask":".tp-tab-mask",x=a.dragStartedOverThumbs?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",y=a.dragStartedOverThumbs?".tp-thumb":".tp-tab",T=a.dragStartedOverThumbs?a.navigation.thumbnails:a.navigation.tabs;o=s&&s.match(/left|up/g)?Math.round(-1*o):o=Math.round(1*o);var S=t.parent().find(_),j=S.find(x),C=T.direction,L="vertical"===C?j.height():j.width(),Q="vertical"===C?S.height():S.width(),k="vertical"===C?S.find(y).first().outerHeight(!0)+T.space:S.find(y).first().outerWidth(!0)+T.space,I=void 0===j.data("offset")?0:parseInt(j.data("offset"),0),O=0;switch(n){case"start":t.parent().find(w).addClass("dragged"),I="vertical"===C?j.position().top:j.position().left,j.data("offset",I),j.data("tmmove")&&j.data("tmmove").pause();break;case"move":if(Q>=L)return!1;O=I+o,O=O>0?"horizontal"===C?O-j.width()*(O/j.width()*O/j.width()):O-j.height()*(O/j.height()*O/j.height()):O;var H="vertical"===C?0-(j.height()-S.height()):0-(j.width()-S.width());O=H>O?"horizontal"===C?O+j.width()*(O-H)/j.width()*(O-H)/j.width():O+j.height()*(O-H)/j.height()*(O-H)/j.height():O,"vertical"===C?punchgs.TweenLite.set(j,{top:O+"px"}):punchgs.TweenLite.set(j,{left:O+"px"});break;case"end":case"cancel":if(m)return O=I+o,O="vertical"===C?O<0-(j.height()-S.height())?0-(j.height()-S.height()):O:O<0-(j.width()-S.width())?0-(j.width()-S.width()):O,O=O>0?0:O,O=Math.abs(o)>k/10?0>=o?Math.floor(O/k)*k:Math.ceil(O/k)*k:0>o?Math.ceil(O/k)*k:Math.floor(O/k)*k,O="vertical"===C?O<0-(j.height()-S.height())?0-(j.height()-S.height()):O:O<0-(j.width()-S.width())?0-(j.width()-S.width()):O,O=O>0?0:O,"vertical"===C?punchgs.TweenLite.to(j,.5,{top:O+"px",ease:punchgs.Power3.easeOut}):punchgs.TweenLite.to(j,.5,{left:O+"px",ease:punchgs.Power3.easeOut}),O=O?O:"vertical"===C?j.position().top:j.position().left,j.data("offset",O),j.data("distance",o),setTimeout(function(){a.dragStartedOverSlider=!1,a.dragStartedOverThumbs=!1,a.dragStartedOverTabs=!1},100),t.parent().find(w).removeClass("dragged"),!1}}}})},h=function(t){t.hide_delay=jQuery.isNumeric(parseInt(t.hide_delay,0))?t.hide_delay/1e3:.2,t.hide_delay_mobile=jQuery.isNumeric(parseInt(t.hide_delay_mobile,0))?t.hide_delay_mobile/1e3:.2},p=function(t){return t&&t.enable},u=function(t){return t&&t.enable&&t.hide_onleave===!0&&(void 0===t.position?!0:!t.position.match(/outer/g))},c=function(t,e){var a=t.parent();u(e.navigation.arrows)&&punchgs.TweenLite.delayedCall(i?e.navigation.arrows.hide_delay_mobile:e.navigation.arrows.hide_delay,g,[a.find(".tparrows"),e.navigation.arrows,"hide"]),u(e.navigation.bullets)&&punchgs.TweenLite.delayedCall(i?e.navigation.bullets.hide_delay_mobile:e.navigation.bullets.hide_delay,g,[a.find(".tp-bullets"),e.navigation.bullets,"hide"]),u(e.navigation.thumbnails)&&punchgs.TweenLite.delayedCall(i?e.navigation.thumbnails.hide_delay_mobile:e.navigation.thumbnails.hide_delay,g,[a.find(".tp-thumbs"),e.navigation.thumbnails,"hide"]),u(e.navigation.tabs)&&punchgs.TweenLite.delayedCall(i?e.navigation.tabs.hide_delay_mobile:e.navigation.tabs.hide_delay,g,[a.find(".tp-tabs"),e.navigation.tabs,"hide"])},g=function(t,e,i,a){switch(a=void 0===a?.5:a,i){case"show":punchgs.TweenLite.to(t,a,{autoAlpha:1,ease:punchgs.Power3.easeInOut,overwrite:"auto"});break;case"hide":punchgs.TweenLite.to(t,a,{autoAlpha:0,ease:punchgs.Power3.easeInOu,overwrite:"auto"})}},v=function(t,e,i){e.style=void 0===e.style?"":e.style,e.left.style=void 0===e.left.style?"":e.left.style,e.right.style=void 0===e.right.style?"":e.right.style,0===t.find(".tp-leftarrow.tparrows").length&&t.append('<div class="tp-leftarrow tparrows '+e.style+" "+e.left.style+'">'+e.tmp+"</div>"),0===t.find(".tp-rightarrow.tparrows").length&&t.append('<div class="tp-rightarrow tparrows '+e.style+" "+e.right.style+'">'+e.tmp+"</div>");var a=t.find(".tp-leftarrow.tparrows"),n=t.find(".tp-rightarrow.tparrows");e.rtl?(a.click(function(){i.sc_indicator="arrow",i.sc_indicator_dir=0,t.revnext()}),n.click(function(){i.sc_indicator="arrow",i.sc_indicator_dir=1,t.revprev()})):(n.click(function(){i.sc_indicator="arrow",i.sc_indicator_dir=0,t.revnext()}),a.click(function(){i.sc_indicator="arrow",i.sc_indicator_dir=1,t.revprev()})),e.right.j=t.find(".tp-rightarrow.tparrows"),e.left.j=t.find(".tp-leftarrow.tparrows"),e.padding_top=parseInt(i.carousel.padding_top||0,0),e.padding_bottom=parseInt(i.carousel.padding_bottom||0,0),b(a,e.left,i),b(n,e.right,i),e.left.opt=i,e.right.opt=i,("outer-left"==e.position||"outer-right"==e.position)&&(i.outernav=!0)},f=function(t,e,i){var a=t.outerHeight(!0),n=(t.outerWidth(!0),void 0==e.opt?0:0==i.conh?i.height:i.conh),r="layergrid"==e.container?"fullscreen"==i.sliderLayout?i.height/2-i.gridheight[i.curWinRange]*i.bh/2:"on"==i.autoHeight||void 0!=i.minHeight&&i.minHeight>0?n/2-i.gridheight[i.curWinRange]*i.bh/2:0:0,s="top"===e.v_align?{top:"0px",y:Math.round(e.v_offset+r)+"px"}:"center"===e.v_align?{top:"50%",y:Math.round(0-a/2+e.v_offset)+"px"}:{top:"100%",y:Math.round(0-(a+e.v_offset+r))+"px"};t.hasClass("outer-bottom")||punchgs.TweenLite.set(t,s)},m=function(t,e,i){var a=(t.outerHeight(!0),t.outerWidth(!0)),n="layergrid"==e.container?"carousel"===i.sliderType?0:i.width/2-i.gridwidth[i.curWinRange]*i.bw/2:0,r="left"===e.h_align?{left:"0px",x:Math.round(e.h_offset+n)+"px"}:"center"===e.h_align?{left:"50%",x:Math.round(0-a/2+e.h_offset)+"px"}:{left:"100%",x:Math.round(0-(a+e.h_offset+n))+"px"};punchgs.TweenLite.set(t,r)},b=function(t,e,i){var a=t.closest(".tp-simpleresponsive").length>0?t.closest(".tp-simpleresponsive"):t.closest(".tp-revslider-mainul").length>0?t.closest(".tp-revslider-mainul"):t.closest(".rev_slider_wrapper").length>0?t.closest(".rev_slider_wrapper"):t.parent().find(".tp-revslider-mainul"),n=a.width(),r=a.height();if(f(t,e,i),m(t,e,i),"outer-left"!==e.position||"fullwidth"!=e.sliderLayout&&"fullscreen"!=e.sliderLayout?"outer-right"!==e.position||"fullwidth"!=e.sliderLayout&&"fullscreen"!=e.sliderLayout||punchgs.TweenLite.set(t,{right:0-t.outerWidth()+"px",x:e.h_offset+"px"}):punchgs.TweenLite.set(t,{left:0-t.outerWidth()+"px",x:e.h_offset+"px"}),t.hasClass("tp-thumbs")||t.hasClass("tp-tabs")){var s=t.data("wr_padding"),o=t.data("maxw"),d=t.data("maxh"),l=t.hasClass("tp-thumbs")?t.find(".tp-thumb-mask"):t.find(".tp-tab-mask"),h=parseInt(e.padding_top||0,0),p=parseInt(e.padding_bottom||0,0);o>n&&"outer-left"!==e.position&&"outer-right"!==e.position?(punchgs.TweenLite.set(t,{left:"0px",x:0,maxWidth:n-2*s+"px"}),punchgs.TweenLite.set(l,{maxWidth:n-2*s+"px"})):(punchgs.TweenLite.set(t,{maxWidth:o+"px"}),punchgs.TweenLite.set(l,{maxWidth:o+"px"})),d+2*s>r&&"outer-bottom"!==e.position&&"outer-top"!==e.position?(punchgs.TweenLite.set(t,{top:"0px",y:0,maxHeight:h+p+(r-2*s)+"px"}),punchgs.TweenLite.set(l,{maxHeight:h+p+(r-2*s)+"px"})):(punchgs.TweenLite.set(t,{maxHeight:d+"px"}),punchgs.TweenLite.set(l,{maxHeight:d+"px"})),"outer-left"!==e.position&&"outer-right"!==e.position&&(h=0,p=0),e.span===!0&&"vertical"===e.direction?(punchgs.TweenLite.set(t,{maxHeight:h+p+(r-2*s)+"px",height:h+p+(r-2*s)+"px",top:0-h,y:0}),f(l,e,i)):e.span===!0&&"horizontal"===e.direction&&(punchgs.TweenLite.set(t,{maxWidth:"100%",width:n-2*s+"px",left:0,x:0}),m(l,e,i))}},w=function(t,e,i,a){0===t.find(".tp-bullets").length&&(e.style=void 0===e.style?"":e.style,t.append('<div class="tp-bullets '+e.style+" "+e.direction+'"></div>'));var n=t.find(".tp-bullets"),r=i.data("index"),s=e.tmp;jQuery.each(a.thumbs[i.index()].params,function(t,e){s=s.replace(e.from,e.to)}),n.append('<div class="justaddedbullet tp-bullet">'+s+"</div>");var o=t.find(".justaddedbullet"),d=t.find(".tp-bullet").length,l=o.outerWidth()+parseInt(void 0===e.space?0:e.space,0),h=o.outerHeight()+parseInt(void 0===e.space?0:e.space,0);"vertical"===e.direction?(o.css({top:(d-1)*h+"px",left:"0px"}),n.css({height:(d-1)*h+o.outerHeight(),width:o.outerWidth()})):(o.css({left:(d-1)*l+"px",top:"0px"}),n.css({width:(d-1)*l+o.outerWidth(),height:o.outerHeight()})),o.find(".tp-bullet-image").css({backgroundImage:"url("+a.thumbs[i.index()].src+")"}),o.data("liref",r),o.click(function(){a.sc_indicator="bullet",t.revcallslidewithid(r),t.find(".tp-bullet").removeClass("selected"),jQuery(this).addClass("selected")}),o.removeClass("justaddedbullet"),e.padding_top=parseInt(a.carousel.padding_top||0,0),e.padding_bottom=parseInt(a.carousel.padding_bottom||0,0),e.opt=a,("outer-left"==e.position||"outer-right"==e.position)&&(a.outernav=!0),n.addClass("nav-pos-hor-"+e.h_align),n.addClass("nav-pos-ver-"+e.v_align),n.addClass("nav-dir-"+e.direction),b(n,e,a)},_=function(t,e){e=parseFloat(e),t=t.replace("#","");var i=parseInt(t.substring(0,2),16),a=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16),r="rgba("+i+","+a+","+n+","+e+")";return r},x=function(t,e,i,a,n){var r="tp-thumb"===a?".tp-thumbs":".tp-tabs",s="tp-thumb"===a?".tp-thumb-mask":".tp-tab-mask",o="tp-thumb"===a?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",d="tp-thumb"===a?".tp-thumb":".tp-tab",l="tp-thumb"===a?".tp-thumb-image":".tp-tab-image";if(e.visibleAmount=e.visibleAmount>n.slideamount?n.slideamount:e.visibleAmount,e.sliderLayout=n.sliderLayout,0===t.parent().find(r).length){e.style=void 0===e.style?"":e.style;var h=e.span===!0?"tp-span-wrapper":"",p='<div class="'+a+"s "+h+" "+e.position+" "+e.style+'"><div class="'+a+'-mask"><div class="'+a+'s-inner-wrapper" style="position:relative;"></div></div></div>';"outer-top"===e.position?t.parent().prepend(p):"outer-bottom"===e.position?t.after(p):t.append(p),e.padding_top=parseInt(n.carousel.padding_top||0,0),e.padding_bottom=parseInt(n.carousel.padding_bottom||0,0),("outer-left"==e.position||"outer-right"==e.position)&&(n.outernav=!0)}var u=i.data("index"),c=t.parent().find(r),g=c.find(s),v=g.find(o),f="horizontal"===e.direction?e.width*e.visibleAmount+e.space*(e.visibleAmount-1):e.width,m="horizontal"===e.direction?e.height:e.height*e.visibleAmount+e.space*(e.visibleAmount-1),w=e.tmp;jQuery.each(n.thumbs[i.index()].params,function(t,e){w=w.replace(e.from,e.to)}),v.append('<div data-liindex="'+i.index()+'" data-liref="'+u+'" class="justaddedthumb '+a+'" style="width:'+e.width+"px;height:"+e.height+'px;">'+w+"</div>");var x=c.find(".justaddedthumb"),y=c.find(d).length,T=x.outerWidth()+parseInt(void 0===e.space?0:e.space,0),S=x.outerHeight()+parseInt(void 0===e.space?0:e.space,0);x.find(l).css({backgroundImage:"url("+n.thumbs[i.index()].src+")"}),"vertical"===e.direction?(x.css({top:(y-1)*S+"px",left:"0px"}),v.css({height:(y-1)*S+x.outerHeight(),width:x.outerWidth()})):(x.css({left:(y-1)*T+"px",top:"0px"}),v.css({width:(y-1)*T+x.outerWidth(),height:x.outerHeight()})),c.data("maxw",f),c.data("maxh",m),c.data("wr_padding",e.wrapper_padding);var j="outer-top"===e.position||"outer-bottom"===e.position?"relative":"absolute";"outer-top"!==e.position&&"outer-bottom"!==e.position||"center"!==e.h_align?"0":"auto";g.css({maxWidth:f+"px",maxHeight:m+"px",overflow:"hidden",position:"relative"}),c.css({maxWidth:f+"px",maxHeight:m+"px",overflow:"visible",position:j,background:_(e.wrapper_color,e.wrapper_opacity),padding:e.wrapper_padding+"px",boxSizing:"contet-box"}),x.click(function(){n.sc_indicator="bullet";var e=t.parent().find(o).data("distance");e=void 0===e?0:e,Math.abs(e)<10&&(t.revcallslidewithid(u),t.parent().find(r).removeClass("selected"),jQuery(this).addClass("selected"))}),x.removeClass("justaddedthumb"),e.opt=n,c.addClass("nav-pos-hor-"+e.h_align),c.addClass("nav-pos-ver-"+e.v_align),c.addClass("nav-dir-"+e.direction),b(c,e,n)},y=function(t){var e=t.c.parent().find(".outer-top"),i=t.c.parent().find(".outer-bottom");t.top_outer=e.hasClass("tp-forcenotvisible")?0:e.outerHeight()||0,t.bottom_outer=i.hasClass("tp-forcenotvisible")?0:i.outerHeight()||0}
vendor: 5,724 bytes, lines 16448-16455
16448,T=function(t,e,i,a){e>i||i>a?t.addClass("tp-forcenotvisible"):t.removeClass("tp-forcenotvisible")}}(jQuery);; 16449/******************************************** 16450 * REVOLUTION 5.2.6 EXTENSION - PARALLAX 16451 * @version: 1.5 (23.06.2016) 16452 * @requires jquery.themepunch.revolution.js 16453 * @author ThemePunch 16454*********************************************/ 16455!function(e){function r(e,r){e.lastscrolltop=r}var t=jQuery.fn.revolution,a=t.is_mobile();jQuery.extend(!0,t,{checkForParallax:function(e,r){function o(e){if("3D"==s.type||"3d"==s.type){e.find(".slotholder").wrapAll('<div class="dddwrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden"></div>'),e.find(".tp-parallax-wrap").wrapAll('<div class="dddwrapper-layer" style="width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:5;overflow:'+s.ddd_layer_overflow+';"></div>'),e.find(".rs-parallaxlevel-tobggroup").closest(".tp-parallax-wrap").wrapAll('<div class="dddwrapper-layertobggroup" style="position:absolute;top:0px;left:0px;z-index:50;width:100%;height:100%"></div>');var t=e.find(".dddwrapper"),a=e.find(".dddwrapper-layer"),o=e.find(".dddwrapper-layertobggroup");o.appendTo(t),"carousel"==r.sliderType&&("on"==s.ddd_shadow&&t.addClass("dddwrappershadow"),punchgs.TweenLite.set(t,{borderRadius:r.carousel.border_radius})),punchgs.TweenLite.set(e,{overflow:"visible",transformStyle:"preserve-3d",perspective:1600}),punchgs.TweenLite.set(t,{force3D:"auto",transformOrigin:"50% 50%"}),punchgs.TweenLite.set(a,{force3D:"auto",transformOrigin:"50% 50%",zIndex:5}),punchgs.TweenLite.set(r.ul,{transformStyle:"preserve-3d",transformPerspective:1600})}}var s=r.parallax;if(!s.done){if(s.done=!0,a&&"on"==s.disable_onmobile)return!1;("3D"==s.type||"3d"==s.type)&&(punchgs.TweenLite.set(r.c,{overflow:s.ddd_overflow}),punchgs.TweenLite.set(r.ul,{overflow:s.ddd_overflow}),"carousel"!=r.sliderType&&"on"==s.ddd_shadow&&(r.c.prepend('<div class="dddwrappershadow"></div>'),punchgs.TweenLite.set(r.c.find(".dddwrappershadow"),{force3D:"auto",transformPerspective:1600,transformOrigin:"50% 50%",width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:0}))),r.li.each(function(){o(jQuery(this))}),("3D"==s.type||"3d"==s.type&&r.c.find(".tp-static-layers").length>0)&&(punchgs.TweenLite.set(r.c.find(".tp-static-layers"),{top:0,left:0,width:"100%",height:"100%"}),o(r.c.find(".tp-static-layers"))),s.pcontainers=new Array,s.pcontainer_depths=new Array,s.bgcontainers=new Array,s.bgcontainer_depths=new Array,r.c.find(".tp-revslider-slidesli .slotholder, .tp-revslider-slidesli .rs-background-video-layer").each(function(){var e=jQuery(this),t=e.data("bgparallax")||r.parallax.bgparallax;t="on"==t?1:t,void 0!==t&&"off"!==t&&(s.bgcontainers.push(e),s.bgcontainer_depths.push(r.parallax.levels[parseInt(t,0)-1]/100))});for(var i=1;i<=s.levels.length;i++)r.c.find(".rs-parallaxlevel-"+i).each(function(){var e=jQuery(this),r=e.closest(".tp-parallax-wrap");r.data("parallaxlevel",s.levels[i-1]),r.addClass("tp-parallax-container"),s.pcontainers.push(r),s.pcontainer_depths.push(s.levels[i-1])});("mouse"==s.type||"scroll+mouse"==s.type||"mouse+scroll"==s.type||"3D"==s.type||"3d"==s.type)&&(e.mouseenter(function(r){var t=e.find(".active-revslide"),a=e.offset().top,o=e.offset().left,s=r.pageX-o,i=r.pageY-a;t.data("enterx",s),t.data("entery",i)}),e.on("mousemove.hoverdir, mouseleave.hoverdir, trigger3dpath",function(t,a){var o=a&&a.li?a.li:e.find(".active-revslide");if("enterpoint"==s.origo){var i=e.offset().top,l=e.offset().left;void 0==o.data("enterx")&&o.data("enterx",t.pageX-l),void 0==o.data("entery")&&o.data("entery",t.pageY-i);var n=o.data("enterx")||t.pageX-l,d=o.data("entery")||t.pageY-i,p=n-(t.pageX-l),c=d-(t.pageY-i),h=s.speed/1e3||.4}else var i=e.offset().top,l=e.offset().left,p=r.conw/2-(t.pageX-l),c=r.conh/2-(t.pageY-i),h=s.speed/1e3||3;"mouseleave"==t.type&&(p=s.ddd_lasth||0,c=s.ddd_lastv||0,h=1.5);for(var u=0;u<s.pcontainers.length;u++){var w=s.pcontainers[u],f=s.pcontainer_depths[u],v="3D"==s.type||"3d"==s.type?f/200:f/100,g=p*v,y=c*v;"scroll+mouse"==s.type||"mouse+scroll"==s.type?punchgs.TweenLite.to(w,h,{force3D:"auto",x:g,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(w,h,{force3D:"auto",x:g,y:y,ease:punchgs.Power3.easeOut,overwrite:"all"})}if("3D"==s.type||"3d"==s.type){var x=".tp-revslider-slidesli .dddwrapper, .dddwrappershadow, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer";"carousel"===r.sliderType&&(x=".tp-revslider-slidesli .dddwrapper, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer"),r.c.find(x).each(function(){var e=jQuery(this),a=s.levels[s.levels.length-1]/200,o=p*a,i=c*a,l=0==r.conw?0:Math.round(p/r.conw*a*100)||0,n=0==r.conh?0:Math.round(c/r.conh*a*100)||0,d=e.closest("li"),u=0,w=!1;e.hasClass("dddwrapper-layer")&&(u=s.ddd_z_correction||65,w=!0),e.hasClass("dddwrapper-layer")&&(o=0,i=0),d.hasClass("active-revslide")||"carousel"!=r.sliderType?"on"!=s.ddd_bgfreeze||w?punchgs.TweenLite.to(e,h,{rotationX:n,rotationY:-l,x:o,z:u,y:i,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(e,.5,{force3D:"auto",rotationY:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(e,.5,{force3D:"auto",rotationY:0,z:0,x:0,y:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}),"mouseleave"==t.type&&punchgs.TweenLite.to(jQuery(this),3.8,{z:0,ease:punchgs.Power3.easeOut})})}}),a&&(window.ondeviceorientation=function(t){var a=Math.round(t.beta||0)-70,o=Math.round(t.gamma||0),i=e.find(".active-revslide");if(jQuery(window).width()>jQuery(window).height()){var l=o;o=a,a=l}var n=e.width(),d=e.height(),p=360/n*o,c=180/d*a,h=s.speed/1e3||3,u=[];
16455if(i.find(".tp-parallax-container").each(function(e){u.push(jQuery(this))}),e.find(".tp-static-layers .tp-parallax-container").each(function(){u.push(jQuery(this))}),jQuery.each(u,function(){var e=jQuery(this),r=parseInt(e.data("parallaxlevel"),0),t=r/100,a=p*t*2,o=c*t*4;punchgs.TweenLite.to(e,h,{force3D:"auto",x:a,y:o,ease:punchgs.Power3.easeOut,overwrite:"all"})}),"3D"==s.type||"3d"==s.type){var w=".tp-revslider-slidesli .dddwrapper, .dddwrappershadow, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer";"carousel"===r.sliderType&&(w=".tp-revslider-slidesli .dddwrapper, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer"),r.c.find(w).each(function(){var e=jQuery(this),a=s.levels[s.levels.length-1]/200;offsh=p*a,offsv=c*a*3,offrv=0==r.conw?0:Math.round(p/r.conw*a*500)||0,offrh=0==r.conh?0:Math.round(c/r.conh*a*700)||0,li=e.closest("li"),zz=0,itslayer=!1,e.hasClass("dddwrapper-layer")&&(zz=s.ddd_z_correction||65,itslayer=!0),e.hasClass("dddwrapper-layer")&&(offsh=0,offsv=0),li.hasClass("active-revslide")||"carousel"!=r.sliderType?"on"!=s.ddd_bgfreeze||itslayer?punchgs.TweenLite.to(e,h,{rotationX:offrh,rotationY:-offrv,x:offsh,z:zz,y:offsv,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(e,.5,{force3D:"auto",rotationY:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(e,.5,{force3D:"auto",rotationY:0,z:0,x:0,y:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}),"mouseleave"==t.type&&punchgs.TweenLite.to(jQuery(this),3.8,{z:0,ease:punchgs.Power3.easeOut})})}})),t.scrollTicker(r,e)}},scrollTicker:function(e,r){1!=e.scrollTicker&&(e.scrollTicker=!0,a?(punchgs.TweenLite.ticker.fps(150),punchgs.TweenLite.ticker.addEventListener("tick",function(){t.scrollHandling(e)},r,!1,1)):document.addEventListener("scroll",function(r){t.scrollHandling(e,!0)},{passive:!0})),t.scrollHandling(e,!0)},scrollHandling:function(e,o){if(e.lastwindowheight=e.lastwindowheight||window.innerHeight,e.lastscrolltop==window.scrollY&&!e.duringslidechange&&!o)return!1;punchgs.TweenLite.delayedCall(.2,r,[e,window.scrollY]);var s=e.c[0].getBoundingClientRect(),i=e.viewPort,l=e.parallax,n=s.top<0||s.height>e.lastwindowheight?s.top/s.height:s.bottom>e.lastwindowheight?(s.bottom-e.lastwindowheight)/s.height:0;if(e.scrollproc=n,t.callBackHandling&&t.callBackHandling(e,"parallax","start"),i.enable){var d=1-Math.abs(n);d=0>d?0:d,jQuery.isNumeric(i.visible_area)||-1!==i.visible_area.indexOf("%")&&(i.visible_area=parseInt(i.visible_area)/100),1-i.visible_area<=d?e.inviewport||(e.inviewport=!0,t.enterInViewPort(e)):e.inviewport&&(e.inviewport=!1,t.leaveViewPort(e))}if(a&&"on"==l.disable_onmobile)return!1;if("3d"!=l.type&&"3D"!=l.type){if(("scroll"==l.type||"scroll+mouse"==l.type||"mouse+scroll"==l.type)&&l.pcontainers)for(var p=0;p<l.pcontainers.length;p++)if(l.pcontainers[p].length>0){var c=l.pcontainers[p],h=l.pcontainer_depths[p]/100,u=Math.round(n*-(h*e.conh)*10)/10||0;c.data("parallaxoffset",u),punchgs.TweenLite.set(c,{overwrite:"auto",force3D:"auto",y:u})}if(l.bgcontainers)for(var p=0;p<l.bgcontainers.length;p++){var w=l.bgcontainers[p],f=l.bgcontainer_depths[p],u=n*-(f*e.conh)||0;punchgs.TweenLite.set(w,{position:"absolute",top:"0px",left:"0px",backfaceVisibility:"hidden",force3D:"true",y:u+"px"})}}t.callBackHandling&&t.callBackHandling(e,"parallax","end")}})}(jQuery);; 16456/************************************************ 16457 * REVOLUTION 5.2 EXTENSION - SLIDE ANIMATIONS 16458 * @version: 1.1.2 (23.02.2016) 16459 * @requires jquery.themepunch.revolution.js 16460 * @author ThemePunch 16461************************************************/ 16462!function(t){var e=jQuery.fn.revolution;jQuery.extend(!0,e,{animateSlide:function(t,e,o,a,i,r,s,l,d){return n(t,e,o,a,i,r,s,l,d)}});var o=function(t,o,a,i){var n=t,r=n.find(".defaultimg"),s=n.data("zoomstart"),l=n.data("rotationstart");void 0!=r.data("currotate")&&(l=r.data("currotate")),void 0!=r.data("curscale")&&"box"==i?s=100*r.data("curscale"):void 0!=r.data("curscale")&&(s=r.data("curscale")),e.slotSize(r,o);var d=r.attr("src"),h=r.css("backgroundColor"),f=o.width,c=o.height,p=r.data("fxof"),u=0;
16462"on"==o.autoHeight&&(c=o.c.height()),void 0==p&&(p=0);var g=0,w=r.data("bgfit"),v=r.data("bgrepeat"),m=r.data("bgposition");switch(void 0==w&&(w="cover"),void 0==v&&(v="no-repeat"),void 0==m&&(m="center center"),i){case"box":for(var x=0,y=0,T=0;T<o.slots;T++){y=0;for(var z=0;z<o.slots;z++)n.append('<div class="slot" style="position:absolute;top:'+(u+y)+"px;left:"+(p+x)+"px;width:"+o.slotw+"px;height:"+o.sloth+'px;overflow:hidden;"><div class="slotslide" data-x="'+x+'" data-y="'+y+'" style="position:absolute;top:0px;left:0px;width:'+o.slotw+"px;height:"+o.sloth+'px;overflow:hidden;"><div style="position:absolute;top:'+(0-y)+"px;left:"+(0-x)+"px;width:"+f+"px;height:"+c+"px;background-color:"+h+";background-image:url("+d+");background-repeat:"+v+";background-size:"+w+";background-position:"+m+';"></div></div></div>'),y+=o.sloth,void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l});x+=o.slotw}break;case"vertical":case"horizontal":if("horizontal"==i){if(!a)var g=0-o.slotw;for(var z=0;z<o.slots;z++)n.append('<div class="slot" style="position:absolute;top:'+(0+u)+"px;left:"+(p+z*o.slotw)+"px;overflow:hidden;width:"+(o.slotw+.6)+"px;height:"+c+'px"><div class="slotslide" style="position:absolute;top:0px;left:'+g+"px;width:"+(o.slotw+.6)+"px;height:"+c+'px;overflow:hidden;"><div style="background-color:'+h+";position:absolute;top:0px;left:"+(0-z*o.slotw)+"px;width:"+f+"px;height:"+c+"px;background-image:url("+d+");background-repeat:"+v+";background-size:"+w+";background-position:"+m+';"></div></div></div>'),void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l})}else{if(!a)var g=0-o.sloth;for(var z=0;z<o.slots+2;z++)n.append('<div class="slot" style="position:absolute;top:'+(u+z*o.sloth)+"px;left:"+p+"px;overflow:hidden;width:"+f+"px;height:"+o.sloth+'px"><div class="slotslide" style="position:absolute;top:'+g+"px;left:0px;width:"+f+"px;height:"+o.sloth+'px;overflow:hidden;"><div style="background-color:'+h+";position:absolute;top:"+(0-z*o.sloth)+"px;left:0px;width:"+f+"px;height:"+c+"px;background-image:url("+d+");background-repeat:"+v+";background-size:"+w+";background-position:"+m+';"></div></div></div>'),void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l})}}},a=function(t,e,o,a,i){function n(){jQuery.each(y,function(t,e){(e[0]==o||e[8]==o)&&(w=e[1],v=e[2],m=x),x+=1})}var r=punchgs.Power1.easeIn,s=punchgs.Power1.easeOut,l=punchgs.Power1.easeInOut,d=punchgs.Power2.easeIn,h=punchgs.Power2.easeOut,f=punchgs.Power2.easeInOut,c=(punchgs.Power3.easeIn,punchgs.Power3.easeOut),p=punchgs.Power3.easeInOut,u=[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=[16,17,18,19,20,21,22,23,24,25,27],w=0,v=1,m=0,x=0,y=(new Array,[["boxslide",0,1,10,0,"box",!1,null,0,s,s,500,6],["boxfade",1,0,10,0,"box",!1,null,1,l,l,700,5],["slotslide-horizontal",2,0,0,200,"horizontal",!0,!1,2,f,f,700,3],["slotslide-vertical",3,0,0,200,"vertical",!0,!1,3,f,f,700,3],["curtain-1",4,3,0,0,"horizontal",!0,!0,4,s,s,300,5],["curtain-2",5,3,0,0,"horizontal",!0,!0,5,s,s,300,5],["curtain-3",6,3,25,0,"horizontal",!0,!0,6,s,s,300,5],["slotzoom-horizontal",7,0,0,400,"horizontal",!0,!0,7,s,s,300,7],["slotzoom-vertical",8,0,0,0,"vertical",!0,!0,8,h,h,500,8],["slotfade-horizontal",9,0,0,500,"horizontal",!0,null,9,h,h,500,25],["slotfade-vertical",10,0,0,500,"vertical",!0,null,10,h,h,500,25],["fade",11,0,1,300,"horizontal",!0,null,11,f,f,1e3,1],["crossfade",11,1,1,300,"horizontal",!0,null,11,f,f,1e3,1],["fadethroughdark",11,2,1,300,"horizontal",!0,null,11,f,f,1e3,1],["fadethroughlight",11,3,1,300,"horizontal",!0,null,11,f,f,1e3,1],["fadethroughtransparent",11,4,1,300,"horizontal",!0,null,11,f,f,1e3,1],["slideleft",12,0,1,0,"horizontal",!0,!0,12,p,p,1e3,1],["slideup",13,0,1,0,"horizontal",!0,!0,13,p,p,1e3,1],["slidedown",14,0,1,0,"horizontal",!0,!0,14,p,p,1e3,1],["slideright",15,0,1,0,"horizontal",!0,!0,15,p,p,1e3,1],["slideoverleft",12,7,1,0,"horizontal",!0,!0,12,p,p,1e3,1],["slideoverup",13,7,1,0,"horizontal",!0,!0,13,p,p,1e3,1],["slideoverdown",14,7,1,0,"horizontal",!0,!0,14,p,p,1e3,1],["slideoverright",15,7,1,0,"horizontal",!0,!0,15,p,p,1e3,1],["slideremoveleft",12,8,1,0,"horizontal",!0,!0,12,p,p,1e3,1],["slideremoveup",13,8,1,0,"horizontal",!0,!0,13,p,p,1e3,1],["slideremovedown",14,8,1,0,"horizontal",!0,!0,14,p,p,1e3,1],["slideremoveright",15,8,1,0,"horizontal",!0,!0,15,p,p,1e3,1],["papercut",16,0,0,600,"",null,null,16,p,p,1e3,2],["3dcurtain-horizontal",17,0,20,100,"vertical",!1,!0,17,l,l,500,7],["3dcurtain-vertical",18,0,10,100,"horizontal",!1,!0,18,l,l,500,5],["cubic",19,0,20,600,"horizontal",!1,!0,19,p,p,500,1],["cube",19,0,20,600,"horizontal",!1,!0,20,p,p,500,1],["flyin",20,0,4,600,"vertical",!1,!0,21,c,p,500,1],["turnoff",21,0,1,500,"horizontal",!1,!0,22,p,p,500,1],["incube",22,0,20,200,"horizontal",!1,!0,23,f,f,500,1],["cubic-horizontal",23,0,20,500,"vertical",!1,!0,24,h,h,500,1],["cube-horizontal",23,0,20,500,"vertical",!1,!0,25,h,h,500,1],["incube-horizontal",24,0,20,500,"vertical",!1,!0,26,f,f,500,1],["turnoff-vertical",25,0,1,200,"horizontal",!1,!0,27,f,f,500,1],["fadefromright",12,1,1,0,"horizontal",!0,!0,28,f,f,1e3,1],["fadefromleft",15,1,1,0,"horizontal",!0,!0,29,f,f,1e3,1],["fadefromto
16462p",14,1,1,0,"horizontal",!0,!0,30,f,f,1e3,1],["fadefrombottom",13,1,1,0,"horizontal",!0,!0,31,f,f,1e3,1],["fadetoleftfadefromright",12,2,1,0,"horizontal",!0,!0,32,f,f,1e3,1],["fadetorightfadefromleft",15,2,1,0,"horizontal",!0,!0,33,f,f,1e3,1],["fadetobottomfadefromtop",14,2,1,0,"horizontal",!0,!0,34,f,f,1e3,1],["fadetotopfadefrombottom",13,2,1,0,"horizontal",!0,!0,35,f,f,1e3,1],["parallaxtoright",12,3,1,0,"horizontal",!0,!0,36,f,d,1500,1],["parallaxtoleft",15,3,1,0,"horizontal",!0,!0,37,f,d,1500,1],["parallaxtotop",14,3,1,0,"horizontal",!0,!0,38,f,r,1500,1],["parallaxtobottom",13,3,1,0,"horizontal",!0,!0,39,f,r,1500,1],["scaledownfromright",12,4,1,0,"horizontal",!0,!0,40,f,d,1e3,1],["scaledownfromleft",15,4,1,0,"horizontal",!0,!0,41,f,d,1e3,1],["scaledownfromtop",14,4,1,0,"horizontal",!0,!0,42,f,d,1e3,1],["scaledownfrombottom",13,4,1,0,"horizontal",!0,!0,43,f,d,1e3,1],["zoomout",13,5,1,0,"horizontal",!0,!0,44,f,d,1e3,1],["zoomin",13,6,1,0,"horizontal",!0,!0,45,f,d,1e3,1],["slidingoverlayup",27,0,1,0,"horizontal",!0,!0,47,l,s,2e3,1],["slidingoverlaydown",28,0,1,0,"horizontal",!0,!0,48,l,s,2e3,1],["slidingoverlayright",30,0,1,0,"horizontal",!0,!0,49,l,s,2e3,1],["slidingoverlayleft",29,0,1,0,"horizontal",!0,!0,50,l,s,2e3,1],["parallaxcirclesup",31,0,1,0,"horizontal",!0,!0,51,f,r,1500,1],["parallaxcirclesdown",32,0,1,0,"horizontal",!0,!0,52,f,r,1500,1],["parallaxcirclesright",33,0,1,0,"horizontal",!0,!0,53,f,r,1500,1],["parallaxcirclesleft",34,0,1,0,"horizontal",!0,!0,54,f,r,1500,1],["notransition",26,0,1,0,"horizontal",!0,null,46,f,d,1e3,1],["parallaxright",12,3,1,0,"horizontal",!0,!0,55,f,d,1500,1],["parallaxleft",15,3,1,0,"horizontal",!0,!0,56,f,d,1500,1],["parallaxup",14,3,1,0,"horizontal",!0,!0,57,f,r,1500,1],["parallaxdown",13,3,1,0,"horizontal",!0,!0,58,f,r,1500,1]]);e.duringslidechange=!0,e.testanims=!1,1==e.testanims&&(e.nexttesttransform=void 0===e.nexttesttransform?34:e.nexttesttransform+1,e.nexttesttransform=e.nexttesttransform>70?0:e.nexttesttransform,o=y[e.nexttesttransform][0],console.log(o+" "+e.nexttesttransform+" "+y[e.nexttesttransform][1]+" "+y[e.nexttesttransform][2])),jQuery.each(["parallaxcircles","slidingoverlay","slide","slideover","slideremove","parallax"],function(t,e){o==e+"horizontal"&&(o=1!=i?e+"left":e+"right"),o==e+"vertical"&&(o=1!=i?e+"up":e+"down")}),"random"==o&&(o=Math.round(Math.random()*y.length-1),o>y.length-1&&(o=y.length-1)),"random-static"==o&&(o=Math.round(Math.random()*u.length-1),o>u.length-1&&(o=u.length-1),o=u[o]),"random-premium"==o&&(o=Math.round(Math.random()*g.length-1),o>g.length-1&&(o=g.length-1),o=g[o]);var T=[12,13,14,15,16,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45];if(1==e.isJoomla&&void 0!=window.MooTools&&-1!=T.indexOf(o)){var z=Math.round(Math.random()*(g.length-2))+1;z>g.length-1&&(z=g.length-1),0==z&&(z=1),o=g[z]}n(),w>30&&(w=30),0>w&&(w=0);var L=new Object;return L.nexttrans=w,L.STA=y[m],L.specials=v,L},i=function(t,e){return void 0==e||jQuery.isNumeric(t)?t:void 0==t?t:t.split(",")[e]},n=function(t,e,n,r,s,l,d,h,f){function c(t,e,o,a,i){var n=t.find(".slot"),r=6,s=[2,1.2,.9,.7,.55,.42],l=t.width(),h=t.height();n.wrap('<div class="slot-circle-wrapper" style="overflow:hidden;position:absolute;border:1px solid #fff"></div>');for(var c=0;r>c;c++)n.parent().clone(!1).appendTo(d);t.find(".slot-circle-wrapper").each(function(t){if(r>t){var a=jQuery(this),n=a.find(".slot"),d=l>h?s[t]*l:s[t]*h,c=d,p=0+(c/2-l/2),u=0+(d/2-h/2),g=0!=t?"50%":"0",w=31==o?h/2-d/2:32==o?h/2-d/2:h/2-d/2,v=33==o?l/2-c/2:34==o?l-c:l/2-c/2,m={scale:1,transformOrigo:"50% 50%",width:c+"px",height:d+"px",top:w+"px",left:v+"px",borderRadius:g},x={scale:1,top:h/2-d/2,left:l/2-c/2,ease:i},y=31==o?u:32==o?u:u,T=33==o?p:34==o?p+l/2:p,z={width:l,height:h,autoAlpha:1,top:y+"px",position:"absolute",left:T+"px"},L={top:u+"px",left:p+"px",ease:i},b=e,D=0;f.add(punchgs.TweenLite.fromTo(a,b,m,x),D),f.add(punchgs.TweenLite.fromTo(n,b,z,L),D),f.add(punchgs.TweenLite.fromTo(a,.001,{autoAlpha:0},{autoAlpha:1}),0)}})}var p=l.index(),u=s.index(),g=p>u?1:0;"arrow"==r.sc_indicator&&(g=r.sc_indicator_dir);var w=a(n,r,e,d,g),v=w.STA,m=w.specials,t=w.nexttrans;"on"==d.data("kenburns")&&(t=11);var x=s.data("nexttransid")||0,y=i(s.data("masterspeed"),x);
vendor: 4,167 bytes, line 16462
16462y="default"===y?v[11]:"random"===y?Math.round(1e3*Math.random()+300):void 0!=y?parseInt(y,0):v[11],y=y>r.delay?r.delay:y,y+=v[4],r.slots=i(s.data("slotamount"),x),r.slots=void 0==r.slots||"default"==r.slots?v[12]:"random"==r.slots?Math.round(12*Math.random()+4):r.slots,r.slots=r.slots<1?"boxslide"==e?Math.round(6*Math.random()+3):"flyin"==e?Math.round(4*Math.random()+1):r.slots:r.slots,r.slots=(4==t||5==t||6==t)&&r.slots<3?3:r.slots,r.slots=0!=v[3]?Math.min(r.slots,v[3]):r.slots,r.slots=9==t?r.width/20:10==t?r.height/20:r.slots,r.rotate=i(s.data("rotate"),x),r.rotate=void 0==r.rotate||"default"==r.rotate?0:999==r.rotate||"random"==r.rotate?Math.round(360*Math.random()):r.rotate,r.rotate=!jQuery.support.transition||r.ie||r.ie9?0:r.rotate,11!=t&&(null!=v[7]&&o(h,r,v[7],v[5]),null!=v[6]&&o(d,r,v[6],v[5])),f.add(punchgs.TweenLite.set(d.find(".defaultvid"),{y:0,x:0,top:0,left:0,scale:1}),0),f.add(punchgs.TweenLite.set(h.find(".defaultvid"),{y:0,x:0,top:0,left:0,scale:1}),0),f.add(punchgs.TweenLite.set(d.find(".defaultvid"),{y:"+0%",x:"+0%"}),0),f.add(punchgs.TweenLite.set(h.find(".defaultvid"),{y:"+0%",x:"+0%"}),0),f.add(punchgs.TweenLite.set(d,{autoAlpha:1,y:"+0%",x:"+0%"}),0),f.add(punchgs.TweenLite.set(h,{autoAlpha:1,y:"+0%",x:"+0%"}),0),f.add(punchgs.TweenLite.set(d.parent(),{backgroundColor:"transparent"}),0),f.add(punchgs.TweenLite.set(h.parent(),{backgroundColor:"transparent"}),0);var T=i(s.data("easein"),x),z=i(s.data("easeout"),x);if(T="default"===T?v[9]||punchgs.Power2.easeInOut:T||v[9]||punchgs.Power2.easeInOut,z="default"===z?v[10]||punchgs.Power2.easeInOut:z||v[10]||punchgs.Power2.easeInOut,0==t){var L=Math.ceil(r.height/r.sloth),b=0;d.find(".slotslide").each(function(t){var e=jQuery(this);b+=1,b==L&&(b=0),f.add(punchgs.TweenLite.from(e,y/600,{opacity:0,top:0-r.sloth,left:0-r.slotw,rotation:r.rotate,force3D:"auto",ease:T}),(15*t+30*b)/1500)})}if(1==t){var D,A=0;d.find(".slotslide").each(function(t){var e=jQuery(this),o=Math.random()*y+300,a=500*Math.random()+200;o+a>D&&(D=a+a,A=t),f.add(punchgs.TweenLite.from(e,o/1e3,{autoAlpha:0,force3D:"auto",rotation:r.rotate,ease:T}),a/1e3)})}if(2==t){var j=new punchgs.TimelineLite;h.find(".slotslide").each(function(){var t=jQuery(this);j.add(punchgs.TweenLite.to(t,y/1e3,{left:r.slotw,ease:T,force3D:"auto",rotation:0-r.rotate}),0),f.add(j,0)}),d.find(".slotslide").each(function(){var t=jQuery(this);j.add(punchgs.TweenLite.from(t,y/1e3,{left:0-r.slotw,ease:T,force3D:"auto",rotation:r.rotate}),0),f.add(j,0)})}if(3==t){var j=new punchgs.TimelineLite;h.find(".slotslide").each(function(){var t=jQuery(this);j.add(punchgs.TweenLite.to(t,y/1e3,{top:r.sloth,ease:T,rotation:r.rotate,force3D:"auto",transformPerspective:600}),0),f.add(j,0)}),d.find(".slotslide").each(function(){var t=jQuery(this);j.add(punchgs.TweenLite.from(t,y/1e3,{top:0-r.sloth,rotation:r.rotate,ease:z,force3D:"auto",transformPerspective:600}),0),f.add(j,0)})}if(4==t||5==t){setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100);var k=y/1e3,j=new punchgs.TimelineLite;h.find(".slotslide").each(function(e){var o=jQuery(this),a=e*k/r.slots;5==t&&(a=(r.slots-e-1)*k/r.slots/1.5),j.add(punchgs.TweenLite.to(o,3*k,{transformPerspective:600,force3D:"auto",top:0+r.height,opacity:.5,rotation:r.rotate,ease:T,delay:a}),0),f.add(j,0)}),d.find(".slotslide").each(function(e){var o=jQuery(this),a=e*k/r.slots;5==t&&(a=(r.slots-e-1)*k/r.slots/1.5),j.add(punchgs.TweenLite.from(o,3*k,{top:0-r.height,opacity:.5,rotation:r.rotate,force3D:"auto",ease:punchgs.eo,delay:a}),0),f.add(j,0)})}if(6==t){r.slots<2&&(r.slots=2),r.slots%2&&(r.slots=r.slots+1);var j=new punchgs.TimelineLite;setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100),h.find(".slotslide").each(function(t){var e=jQuery(this);if(t+1<r.slots/2)var o=90*(t+2);else var o=90*(2+r.slots-t);j.add(punchgs.TweenLite.to(e,(y+o)/1e3,{top:0+r.height,opacity:1,force3D:"auto",rotation:r.rotate,ease:T}),0),f.add(j,0)}),d.find(".slotslide").each(function(t){var e=jQuery(this);if(t+1<r.slots/2)var o=90*(t+2);else var o=90*(2+r.slots-t);j.add(punchgs.TweenLite.from(e,(y+o)/1e3,{top:0-r.height,opacity:1,force3D:"auto",rotation:r.rotate,ease:z}
16462),0),f.add(j,0)})}if(7==t){y=2*y,y>r.delay&&(y=r.delay);var j=new punchgs.TimelineLite;setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100),h.find(".slotslide").each(function(){var t=jQuery(this).find("div");j.add(punchgs.TweenLite.to(t,y/1e3,{left:0-r.slotw/2+"px",top:0-r.height/2+"px",width:2*r.slotw+"px",height:2*r.height+"px",opacity:0,rotation:r.rotate,force3D:"auto",ease:T}),0),f.add(j,0)}),d.find(".slotslide").each(function(t){var e=jQuery(this).find("div");j.add(punchgs.TweenLite.fromTo(e,y/1e3,{left:0,top:0,opacity:0,transformPerspective:600},{left:0-t*r.slotw+"px",ease:z,force3D:"auto",top:"0px",width:r.width,height:r.height,opacity:1,rotation:0,delay:.1}),0),f.add(j,0)})}if(8==t){y=3*y,y>r.delay&&(y=r.delay);var j=new punchgs.TimelineLite;h.find(".slotslide").each(function(){var t=jQuery(this).find("div");j.add(punchgs.TweenLite.to(t,y/1e3,{left:0-r.width/2+"px",top:0-r.sloth/2+"px",width:2*r.width+"px",height:2*r.sloth+"px",force3D:"auto",ease:T,opacity:0,rotation:r.rotate}),0),f.add(j,0)}),d.find(".slotslide").each(function(t){var e=jQuery(this).find("div");j.add(punchgs.TweenLite.fromTo(e,y/1e3,{left:0,top:0,opacity:0,force3D:"auto"},{left:"0px",top:0-t*r.sloth+"px",width:d.find(".defaultimg").data("neww")+"px",height:d.find(".defaultimg").data("newh")+"px",opacity:1,ease:z,rotation:0}),0),f.add(j,0)})}if(9==t||10==t){var M=0;d.find(".slotslide").each(function(t){var e=jQuery(this);M++,f.add(punchgs.TweenLite.fromTo(e,y/1e3,{autoAlpha:0,force3D:"auto",transformPerspective:600},{autoAlpha:1,ease:T,delay:5*t/1e3}),0)})}if(27==t||28==t||29==t||30==t){var P=d.find(".slot"),Q=27==t||28==t?1:2,O=27==t||29==t?"-100%":"+100%",I=27==t||29==t?"+100%":"-100%",X=27==t||29==t?"-80%":"80%",Y=27==t||29==t?"80%":"-80%",S=27==t||29==t?"10%":"-10%",_={overwrite:"all"},C={autoAlpha:0,zIndex:1,force3D:"auto",ease:T},V={position:"inherit",autoAlpha:0,overwrite:"all",zIndex:1},Z={autoAlpha:1,force3D:"auto",ease:z},H={overwrite:"all",zIndex:2},J={autoAlpha:1,force3D:"auto",overwrite:"all",ease:T},N={overwrite:"all",zIndex:2},R={autoAlpha:1,force3D:"auto",ease:T},q=1==Q?"y":"x";_[q]="0px",C[q]=O,V[q]=S,Z[q]="0%",H[q]=I,J[q]=O,N[q]=X,R[q]=Y,P.append('<span style="background-color:rgba(0,0,0,0.6);width:100%;height:100%;position:absolute;top:0px;left:0px;display:block;z-index:2"></span>'),f.add(punchgs.TweenLite.fromTo(h,y/1e3,_,C),0),f.add(punchgs.TweenLite.fromTo(d.find(".defaultimg"),y/2e3,V,Z),y/2e3),f.add(punchgs.TweenLite.fromTo(P,y/1e3,H,J),0),f.add(punchgs.TweenLite.fromTo(P.find(".slotslide div"),y/1e3,N,R),0)}if(31==t||32==t||33==t||34==t){y=6e3,T=punchgs.Power3.easeInOut;var B=y/1e3;mas=B-B/5,_nt=t,fy=31==_nt?"+100%":32==_nt?"-100%":"0%",fx=33==_nt?"+100%":34==_nt?"-100%":"0%",ty=31==_nt?"-100%":32==_nt?"+100%":"0%",tx=33==_nt?"-100%":34==_nt?"+100%":"0%",f.add(punchgs.TweenLite.fromTo(h,B-.2*B,{y:0,x:0},{y:ty,x:tx,ease:z}),.2*B),f.add(punchgs.TweenLite.fromTo(d,B,{y:fy,x:fx},{y:"0%",x:"0%",ease:T}),0),d.find(".slot").remove(),d.find(".defaultimg").clone().appendTo(d).addClass("slot"),c(d,B,_nt,"in",T)}if(11==t){m>4&&(m=0);var M=0,E=2==m?"#000000":3==m?"#ffffff":"transparent";switch(m){case 0:f.add(punchgs.TweenLite.fromTo(d,y/1e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:T}),0);break;case 1:f.add(punchgs.TweenLite.fromTo(d,y/1e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:T}),0),f.add(punchgs.TweenLite.fromTo(h,y/1e3,{autoAlpha:1},{autoAlpha:0,force3D:"auto",ease:T}),0);break;case 2:case 3:case 4:f.add(punchgs.TweenLite.set(h.parent(),{backgroundColor:E,force3D:"auto"}),0),f.add(punchgs.TweenLite.set(d.parent(),{backgroundColor:"transparent",force3D:"auto"}),0),f.add(punchgs.TweenLite.to(h,y/2e3,{autoAlpha:0,force3D:"auto",ease:T}),0),f.add(punchgs.TweenLite.fromTo(d,y/2e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:T}),y/2e3)}f.add(punchgs.TweenLite.set(d.find(".defaultimg"),{autoAlpha:1}),0),f.add(punchgs.TweenLite.set(h.find("defaultimg"),{autoAlpha:1}),0)}if(26==t){var M=0;y=0,f.add(punchgs.TweenLite.fromTo(d,y/1e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:T}),0),f.add(punchgs.TweenLite.to(h,y/1e3,{autoAlpha:0,force3D:"auto",ease:T}),0),f.add(punchgs.TweenLite.set(d.find(".defaultimg"),{autoAlpha:1}),0),f.add(punchgs.TweenLite.set(h.find("defaultimg"),{autoAlpha:1}),0)}if(12==t||13==t||14==t||15==t){y=y,y>r.delay&&(y=r.delay),setTimeout(function(){punchgs.TweenLite.set(h.find(".defaultimg"),{autoAlpha:0})},100);var F=r.width,G=r.height,K=d.find(".slotslide, .defaultvid"),U=0,W=0,$=1,tt=1,et=1,ot=y/1e3,at=ot;("fullwidth"==r.sliderLayout||"fullscreen"==r.sliderLayout)&&(F=K.width(),G=K.height()),12==t?U=F:15==t?U=0-F:13==t?W=G:14==t&&(W=0-G),1==m&&($=0),2==m&&($=0),3==m&&(ot=y/1300),(4==m||5==m)&&(tt=.6),6==m&&(tt=1.4),(5==m||6==m)&&(et=1.4,$=0,F=0,G=0,U=0,W=0),6==m&&(et=.6);7==m&&(F=0,G=0);var it=d.find(".slotslide"),nt=h.find(".slotslide, .defaultvid");if(f.add(punchgs.TweenLite.set(l,{zIndex:15}),0),f.add(punchgs.TweenLite.set(s,{zIndex:20}),0),8==m?(f.add(punchgs.TweenLite.set(l,{zIndex:20}),0),f.add(punchgs.TweenLite.set(s,{zIndex:15}
vendor: 4,234 bytes, line 16462
16462),0),f.add(punchgs.TweenLite.set(it,{left:0,top:0,scale:1,opacity:1,rotation:0,ease:T,force3D:"auto"}),0)):f.add(punchgs.TweenLite.from(it,ot,{left:U,top:W,scale:et,opacity:$,rotation:r.rotate,ease:T,force3D:"auto"}),0),(4==m||5==m)&&(F=0,G=0),1!=m)switch(t){case 12:f.add(punchgs.TweenLite.to(nt,at,{left:0-F+"px",force3D:"auto",scale:tt,opacity:$,rotation:r.rotate,ease:z}),0);break;case 15:f.add(punchgs.TweenLite.to(nt,at,{left:F+"px",force3D:"auto",scale:tt,opacity:$,rotation:r.rotate,ease:z}),0);break;case 13:f.add(punchgs.TweenLite.to(nt,at,{top:0-G+"px",force3D:"auto",scale:tt,opacity:$,rotation:r.rotate,ease:z}),0);break;case 14:f.add(punchgs.TweenLite.to(nt,at,{top:G+"px",force3D:"auto",scale:tt,opacity:$,rotation:r.rotate,ease:z}),0)}}if(16==t){var j=new punchgs.TimelineLite;f.add(punchgs.TweenLite.set(l,{position:"absolute","z-index":20}),0),f.add(punchgs.TweenLite.set(s,{position:"absolute","z-index":15}),0),l.wrapInner('<div class="tp-half-one" style="position:relative; width:100%;height:100%"></div>'),l.find(".tp-half-one").clone(!0).appendTo(l).addClass("tp-half-two"),l.find(".tp-half-two").removeClass("tp-half-one");var F=r.width,G=r.height;"on"==r.autoHeight&&(G=n.height()),l.find(".tp-half-one .defaultimg").wrap('<div class="tp-papercut" style="width:'+F+"px;height:"+G+'px;"></div>'),l.find(".tp-half-two .defaultimg").wrap('<div class="tp-papercut" style="width:'+F+"px;height:"+G+'px;"></div>'),l.find(".tp-half-two .defaultimg").css({position:"absolute",top:"-50%"}),l.find(".tp-half-two .tp-caption").wrapAll('<div style="position:absolute;top:-50%;left:0px;"></div>'),f.add(punchgs.TweenLite.set(l.find(".tp-half-two"),{width:F,height:G,overflow:"hidden",zIndex:15,position:"absolute",top:G/2,left:"0px",transformPerspective:600,transformOrigin:"center bottom"}),0),f.add(punchgs.TweenLite.set(l.find(".tp-half-one"),{width:F,height:G/2,overflow:"visible",zIndex:10,position:"absolute",top:"0px",left:"0px",transformPerspective:600,transformOrigin:"center top"}),0);var rt=(l.find(".defaultimg"),Math.round(20*Math.random()-10)),st=Math.round(20*Math.random()-10),lt=Math.round(20*Math.random()-10),dt=.4*Math.random()-.2,ht=.4*Math.random()-.2,ft=1*Math.random()+1,ct=1*Math.random()+1,pt=.3*Math.random()+.3;f.add(punchgs.TweenLite.set(l.find(".tp-half-one"),{overflow:"hidden"}),0),f.add(punchgs.TweenLite.fromTo(l.find(".tp-half-one"),y/800,{width:F,height:G/2,position:"absolute",top:"0px",left:"0px",force3D:"auto",transformOrigin:"center top"},{scale:ft,rotation:rt,y:0-G-G/4,autoAlpha:0,ease:T}),0),f.add(punchgs.TweenLite.fromTo(l.find(".tp-half-two"),y/800,{width:F,height:G,overflow:"hidden",position:"absolute",top:G/2,left:"0px",force3D:"auto",transformOrigin:"center bottom"},{scale:ct,rotation:st,y:G+G/4,ease:T,autoAlpha:0,onComplete:function(){punchgs.TweenLite.set(l,{position:"absolute","z-index":15}),punchgs.TweenLite.set(s,{position:"absolute","z-index":20}),l.find(".tp-half-one").length>0&&(l.find(".tp-half-one .defaultimg").unwrap(),l.find(".tp-half-one .slotholder").unwrap()),l.find(".tp-half-two").remove()}}),0),j.add(punchgs.TweenLite.set(d.find(".defaultimg"),{autoAlpha:1}),0),null!=l.html()&&f.add(punchgs.TweenLite.fromTo(s,(y-200)/1e3,{scale:pt,x:r.width/4*dt,y:G/4*ht,rotation:lt,force3D:"auto",transformOrigin:"center center",ease:z},{autoAlpha:1,scale:1,x:0,y:0,rotation:0}),0),f.add(j,0)}if(17==t&&d.find(".slotslide").each(function(t){var e=jQuery(this);f.add(punchgs.TweenLite.fromTo(e,y/800,{opacity:0,rotationY:0,scale:.9,rotationX:-110,force3D:"auto",transformPerspective:600,transformOrigin:"center center"},{opacity:1,top:0,left:0,scale:1,rotation:0,rotationX:0,force3D:"auto",rotationY:0,ease:T,delay:.06*t}),0)}),18==t&&d.find(".slotslide").each(function(t){var e=jQuery(this);f.add(punchgs.TweenLite.fromTo(e,y/500,{autoAlpha:0,rotationY:110,scale:.9,rotationX:10,force3D:"auto",transformPerspective:600,transformOrigin:"center center"},{autoAlpha:1,top:0,left:0,scale:1,rotation:0,rotationX:0,force3D:"auto",rotationY:0,ease:T,delay:.06*t}),0)}),19==t||22==t){var j=new punchgs.TimelineLite;f.add(punchgs.TweenLite.set(l,{zIndex:20}),0),f.add(punchgs.TweenLite.set(s,{zIndex:20}),0),setTimeout(function(){h.find(".defaultimg").css({opacity:0}
16462)},100);var ut=90,$=1,gt="center center ";1==g&&(ut=-90),19==t?(gt=gt+"-"+r.height/2,$=0):gt+=r.height/2,punchgs.TweenLite.set(n,{transformStyle:"flat",backfaceVisibility:"hidden",transformPerspective:600}),d.find(".slotslide").each(function(t){var e=jQuery(this);j.add(punchgs.TweenLite.fromTo(e,y/1e3,{transformStyle:"flat",backfaceVisibility:"hidden",left:0,rotationY:r.rotate,z:10,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:gt,rotationX:ut},{left:0,rotationY:0,top:0,z:0,scale:1,force3D:"auto",rotationX:0,delay:50*t/1e3,ease:T}),0),j.add(punchgs.TweenLite.to(e,.1,{autoAlpha:1,delay:50*t/1e3}),0),f.add(j)}),h.find(".slotslide").each(function(t){var e=jQuery(this),o=-90;1==g&&(o=90),j.add(punchgs.TweenLite.fromTo(e,y/1e3,{transformStyle:"flat",backfaceVisibility:"hidden",autoAlpha:1,rotationY:0,top:0,z:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:gt,rotationX:0},{autoAlpha:1,rotationY:r.rotate,top:0,z:10,scale:1,rotationX:o,delay:50*t/1e3,force3D:"auto",ease:z}),0),f.add(j)}),f.add(punchgs.TweenLite.set(l,{zIndex:18}),0)}if(20==t){if(setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100),1==g)var wt=-r.width,ut=80,gt="20% 70% -"+r.height/2;else var wt=r.width,ut=-80,gt="80% 70% -"+r.height/2;d.find(".slotslide").each(function(t){var e=jQuery(this),o=50*t/1e3;f.add(punchgs.TweenLite.fromTo(e,y/1e3,{left:wt,rotationX:40,z:-600,opacity:$,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:gt,transformStyle:"flat",rotationY:ut},{left:0,rotationX:0,opacity:1,top:0,z:0,scale:1,rotationY:0,delay:o,ease:T}),0)}),h.find(".slotslide").each(function(t){var e=jQuery(this),o=50*t/1e3;if(o=t>0?o+y/9e3:0,1!=g)var a=-r.width/2,i=30,n="20% 70% -"+r.height/2;else var a=r.width/2,i=-30,n="80% 70% -"+r.height/2;z=punchgs.Power2.easeInOut,f.add(punchgs.TweenLite.fromTo(e,y/1e3,{opacity:1,rotationX:0,top:0,z:0,scale:1,left:0,force3D:"auto",transformPerspective:600,transformOrigin:n,transformStyle:"flat",rotationY:0},{opacity:1,rotationX:20,top:0,z:-600,left:a,force3D:"auto",rotationY:i,delay:o,ease:z}),0)})}if(21==t||25==t){setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100);var ut=90,wt=-r.width,vt=-ut;if(1==g)if(25==t){var gt="center top 0";ut=r.rotate}else{var gt="left center 0";vt=r.rotate}else if(wt=r.width,ut=-90,25==t){var gt="center bottom 0";vt=-ut,ut=r.rotate}else{var gt="right center 0";vt=r.rotate}d.find(".slotslide").each(function(t){var e=jQuery(this),o=y/1.5/3;f.add(punchgs.TweenLite.fromTo(e,2*o/1e3,{left:0,transformStyle:"flat",rotationX:vt,z:0,autoAlpha:0,top:0,scale:1,force3D:"auto",transformPerspective:1200,transformOrigin:gt,rotationY:ut},{left:0,rotationX:0,top:0,z:0,autoAlpha:1,scale:1,rotationY:0,force3D:"auto",delay:o/1e3,ease:T}),0)}),1!=g?(wt=-r.width,ut=90,25==t?(gt="center top 0",vt=-ut,ut=r.rotate):(gt="left center 0",vt=r.rotate)):(wt=r.width,ut=-90,25==t?(gt="center bottom 0",vt=-ut,ut=r.rotate):(gt="right center 0",vt=r.rotate)),h.find(".slotslide").each(function(t){var e=jQuery(this);f.add(punchgs.TweenLite.fromTo(e,y/1e3,{left:0,transformStyle:"flat",rotationX:0,z:0,autoAlpha:1,top:0,scale:1,force3D:"auto",transformPerspective:1200,transformOrigin:gt,rotationY:0},{left:0,rotationX:vt,top:0,z:0,autoAlpha:1,force3D:"auto",scale:1,rotationY:ut,ease:z}
16462),0)})}if(23==t||24==t){setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100);var ut=-90,$=1,mt=0;if(1==g&&(ut=90),23==t){var gt="center center -"+r.width/2;$=0}else var gt="center center "+r.width/2;punchgs.TweenLite.set(n,{transformStyle:"preserve-3d",backfaceVisibility:"hidden",perspective:2500}),d.find(".slotslide").each(function(t){var e=jQuery(this);f.add(punchgs.TweenLite.fromTo(e,y/1e3,{left:mt,rotationX:r.rotate,force3D:"auto",opacity:$,top:0,scale:1,transformPerspective:1200,transformOrigin:gt,rotationY:ut},{left:0,rotationX:0,autoAlpha:1,top:0,z:0,scale:1,rotationY:0,delay:50*t/500,ease:T}),0)}),ut=90,1==g&&(ut=-90),h.find(".slotslide").each(function(e){var o=jQuery(this);f.add(punchgs.TweenLite.fromTo(o,y/1e3,{left:0,rotationX:0,top:0,z:0,scale:1,force3D:"auto",transformStyle:"flat",transformPerspective:1200,transformOrigin:gt,rotationY:0},{left:mt,rotationX:r.rotate,top:0,scale:1,rotationY:ut,delay:50*e/500,ease:z}),0),23==t&&f.add(punchgs.TweenLite.fromTo(o,y/2e3,{autoAlpha:1},{autoAlpha:0,delay:50*e/500+y/3e3,ease:z}),0)})}return f}}(jQuery);; 16463/******************************************** 16464 * REVOLUTION 5.2.5.1 EXTENSION - VIDEO FUNCTIONS 16465 * @version: 1.8 (05.04.2016) 16466 * @requires jquery.themepunch.revolution.js 16467 * @author ThemePunch 16468*********************************************/ 16469(function($) { 16470var _R = jQuery.fn.revolution, 16471 _ISM = _R.is_mobile(); 16472 16473 16474 16475/////////////////////////////////////////// 16476// EXTENDED FUNCTIONS AVAILABLE GLOBAL // 16477/////////////////////////////////////////// 16478jQuery.extend(true,_R, { 16479 16480 16481 preLoadAudio : function(li,opt) { 16482 li.find('.tp-audiolayer').each(function() { 16483 16484 var element = jQuery(this), 16485 obj = {}; 16486 if (element.find('audio').length===0) { 16487 obj.src = element.data('videomp4') !=undefined ? element.data('videomp4') : '', 16488 obj.pre = element.data('videopreload') || ''; 16489 if (element.attr('id')===undefined) element.attr('audio-layer-'+Math.round(Math.random()*199999)); 16490 obj.id = element.attr('id'); 16491 obj.status = "prepared"; 16492 obj.start = jQuery.now(); 16493 obj.waittime = element.data('videopreloadwait')*1000 || 5000; 16494 16495 16496 if (obj.pre=="auto" || obj.pre=="canplaythrough" || obj.pre=="canplay" || obj.pre=="progress") { 16497 if (opt.audioqueue===undefined) opt.audioqueue = []; 16498 opt.audioqueue.push(obj); 16499 _R.manageVideoLayer(element,opt); 16500 } 16501 } 16502 }); 16503 }, 16504 16505 preLoadAudioDone : function(nc,opt,event) { 16506 16507 if (opt.audioqueue && opt.audioqueue.length>0) 16508 jQuery.each(opt.audioqueue,function(i,obj) { 16509 if (nc.data('videomp4') === obj.src && (obj.pre === event || obj.pre==="auto")) { 16510 obj.status = "loaded"; 16511 } 16512 }); 16513 }, 16514 16515 resetVideo : function(_nc,opt) { 16516 switch (_nc.data('videotype')) { 16517 case "youtube": 16518 var player=_nc.data('player'); 16519 try{ 16520 if (_nc.data('forcerewind')=="on") { //Removed Force Rewind Protection for Handy here !!! 16521 var s = getStartSec(_nc.data('videostartat')); 16522 s= s==-1 ? 0 : s; 16523 if (_nc.data('player')!=undefined) { 16524 _nc.data('player').seekTo(s); 16525 _nc.data('player').pauseVideo(); 16526 } 16527 } 16528 } catch(e) {} 16529 if (_nc.find('.tp-videoposter').length==0) 16530 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 16531 break; 16532 16533 case "vimeo": 16534 var f = $f(_nc.find('iframe').attr("id")); 16535 try{ 16536 if (_nc.data('forcerewind')=="on") { //Removed Force Rewind Protection for Handy here !!! 16537 var s = getStartSec(_nc.data('videostartat')), 16538 ct = 0; 16539 s= s==-1 ? 0 : s; 16540 f.api("seekTo",s); 16541 f.api("pause"); 16542 16543 } 16544 16545 } catch(e) {}
16546 if (_nc.find('.tp-videoposter').length==0) 16547 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 16548 break; 16549 16550 case "html5": 16551 if (_ISM && _nc.data('disablevideoonmobile')==1) return false; 16552 16553 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 16554 jvideo = _nc.find(tag), 16555 video = jvideo[0]; 16556 16557 16558 punchgs.TweenLite.to(jvideo,0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 16559 16560 if (_nc.data('forcerewind')=="on" && !_nc.hasClass("videoisplaying")) { 16561 try{ 16562 16563 var s = getStartSec(_nc.data('videostartat')); 16564 video.currentTime = s == -1 ? 0 : s; 16565 } catch(e) {} 16566 } 16567 16568 if (_nc.data('volume')=="mute" || _R.lastToggleState(_nc.data('videomutetoggledby')) || opt.globalmute===true) 16569 video.muted = true; 16570 break; 16571 } 16572 }, 16573 16574 16575 isVideoMuted : function(_nc,opt) { 16576 var muted = false; 16577 switch (_nc.data('videotype')) { 16578 case "youtube": 16579 try{ 16580 var player=_nc.data('player'); 16581 muted = player.isMuted(); 16582 } catch(e) {} 16583 break; 16584 case "vimeo": 16585 try{ 16586 var f = $f(_nc.find('iframe').attr("id")); 16587 if (_nc.data('volume')=="mute") 16588 muted = true; 16589 16590 } catch(e) {} 16591 break; 16592 case "html5": 16593 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 16594 jvideo = _nc.find(tag), 16595 video = jvideo[0]; 16596 16597 if (video.muted) 16598 muted = true; 16599 break; 16600 } 16601 return muted; 16602 }, 16603 16604 muteVideo : function(_nc,opt) { 16605 switch (_nc.data('videotype')) { 16606 case "youtube": 16607 try{ 16608 var player=_nc.data('player'); 16609 16610 player.mute(); 16611 } catch(e) {} 16612 break; 16613 case "vimeo": 16614 try{ 16615 var f = $f(_nc.find('iframe').attr("id")); 16616 _nc.data('volume',"mute"); 16617 f.api('setVolume',0); 16618 } catch(e) {} 16619 break; 16620 case "html5": 16621 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 16622 jvideo = _nc.find(tag), 16623 video = jvideo[0]; 16624 video.muted = true; 16625 break; 16626 } 16627 }, 16628 16629 unMuteVideo : function(_nc,opt) { 16630 if (opt.globalmute===true) return; 16631 switch (_nc.data('videotype')) { 16632 case "youtube": 16633 try{ 16634 var player=_nc.data('player'); 16635 player.unMute(); 16636 } catch(e) {} 16637 break; 16638 case "vimeo": 16639 try{ 16640 var f = $f(_nc.find('iframe').attr("id")); 16641 _nc.data('volume',"1"); 16642 f.api('setVolume',1); 16643 } catch(e) {} 16644 break; 16645 case "html5": 16646 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 16647 jvideo = _nc.find(tag), 16648 video = jvideo[0]; 16649 video.muted = false; 16650 break; 16651 } 16652 }, 16653 16654 16655 16656 16657 16658 stopVideo : function(_nc,opt) { 16659 16660 if (!opt.leaveViewPortBasedStop) 16661 opt.lastplayedvideos = []; 16662 16663 opt.leaveViewPortBasedStop = false; 16664 16665 switch (_nc.data('videotype')) { 16666 case "youtube": 16667 try{ 16668 var player=_nc.data('player'); 16669 player.pauseVideo(); 16670 } catch(e) {} 16671 break; 16672 case "vimeo": 16673 try{ 16674 var f = $f(_nc.find('iframe').attr("id")); 16675 f.api("pause"); 16676 16677 } catch(e) {} 16678 break; 16679 case "html5": 16680 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 16681 jvideo = _nc.find(tag), 16682 video = jvideo[0]; 16683 if (jvideo!=undefined && video!=undefined) video.pause(); 16684 break; 16685 } 16686 }, 16687 16688 playVideo : function(_nc,opt) { 16689 16690 clearTimeout(_nc.data('videoplaywait')); 16691 switch (_nc.data('videotype')) { 16692 case "youtube": 16693 16694 if (_nc.find('iframe').length==0) { 16695 _nc.append(_nc.data('videomarkup')); 16696 addVideoListener(_nc,opt,true); 16697 } else { 16698 if (_nc.data('player').playVideo !=undefined) { 16699 16700 var s = getStartSec(_nc.data('videostartat')), 16701 ct = _nc.data('player').getCurrentTime(); 16702 if (_nc.data('nextslideatend-triggered')==1) { 16703 ct=-1; 16704 _nc.data('nextslideatend-triggered',0); 16705 } 16706 if (s!=-1 && s>ct) _nc.data('player').seekTo(s); 16707 _nc.data('player').playVideo(); 16708 } else { 16709 _nc.data('videoplaywait',setTimeout(function() { 16710 _R.playVideo(_nc,opt); 16711 },50)); 16712 } 16713 } 16714 break; 16715 case "vimeo": 16716 16717 if (_nc.find('iframe').length==0) { 16718 _nc.append(_nc.data('videomarkup')); 16719 addVideoListener(_nc,opt,true); 16720 16721 } else { 16722 if (_nc.hasClass("rs-apiready")) { 16723 var id = _nc.find('iframe').attr("id"), 16724 f = $f(id); 16725 if (f.api("play")==undefined) { 16726 _nc.data('videoplaywait',setTimeout(function() { 16727 16728 _R.playVideo(_nc,opt); 16729 },50)); 16730 } else { 16731 setTimeout(function() { 16732 16733 f.api("play"); 16734 var s = getStartSec(_nc.data('videostartat')), 16735 ct = _nc.data('currenttime'); 16736 if (_nc.data('nextslideatend-triggered')==1) { 16737 ct=-1; 16738 _nc.data('nextslideatend-triggered',0); 16739 } 16740 if (s!=-1 && s>ct) f.api("seekTo",s); 16741 },510); 16742 } 16743 } else { 16744 _nc.data('videoplaywait',setTimeout(function() { 16745 16746 _R.playVideo(_nc,opt); 16747 },50)); 16748 } 16749 } 16750 break; 16751 case "html5": 16752 if (_ISM && _nc.data('disablevideoonmobile')==1) return false; 16753 16754 16755 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 16756 jvideo = _nc.find(tag), 16757 video = jvideo[0], 16758 html5vid = jvideo.parent(); 16759 16760 if (html5vid.data('metaloaded') != 1) { 16761 addEvent(video,'loadedmetadata',function(_nc) { 16762 _R.resetVideo(_nc,opt); 16763 video.play(); 16764 var s = getStartSec(_nc.data('videostartat')), 16765 ct = video.currentTime; 16766 if (_nc.data('nextslideatend-triggered')==1) { 16767 ct=-1; 16768 _nc.data('nextslideatend-triggered',0); 16769 } 16770 if (s!=-1 && s>ct) video.currentTime = s; 16771 }(_nc)); 16772 } else { 16773 video.play(); 16774 var s = getStartSec(_nc.data('videostartat')), 16775 ct = video.currentTime; 16776 if (_nc.data('nextslideatend-triggered')==1) { 16777 ct=-1; 16778 _nc.data('nextslideatend-triggered',0); 16779 } 16780 if (s!=-1 && s>ct) video.currentTime = s; 16781 } 16782 break; 16783 } 16784 }, 16785 16786 isVideoPlaying : function(_nc,opt) { 16787 16788 var ret = false; 16789 if (opt.playingvideos != undefined) { 16790 jQuery.each(opt.playingvideos,function(i,nc) { 16791 if (_nc.attr('id') == nc.attr('id')) 16792 ret = true; 16793 }); 16794 } 16795 return ret; 16796 }, 16797 16798 removeMediaFromList : function(_nc,opt) { 16799 remVidfromList(_nc,opt); 16800 }, 16801 16802 prepareCoveredVideo : function(asprat,opt,nextcaption) { 16803 var ifr = nextcaption.find('iframe, video'), 16804 wa = asprat.split(':')[0], 16805 ha = asprat.split(':')[1], 16806 li = nextcaption.closest('.tp-revslider-slidesli'), 16807 od = li.width()/li.height(), 16808 vd = wa/ha, 16809 nvh = (od/vd)*100, 16810 nvw = (vd/od)*100; 16811 16812 if (od>vd) 16813 punchgs.TweenLite.to(ifr,0.001,{height:nvh+"%", width:"100%", top:-(nvh-100)/2+"%",left:"0px",position:"absolute"}); 16814 else 16815 punchgs.TweenLite.to(ifr,0.001,{width:nvw+"%", height:"100%", left:-(nvw-100)/2+"%",top:"0px",position:"absolute"}); 16816 16817 if (!ifr.hasClass("resizelistener")) { 16818 ifr.addClass("resizelistener"); 16819 jQuery(window).resize(function() { 16820 clearTimeout(ifr.data('resizelistener')); 16821 ifr.data('resizelistener',setTimeout(function() { 16822 _R.prepareCoveredVideo(asprat,opt,nextcaption); 16823 },30)); 16824 }) 16825 } 16826 }, 16827 16828 checkVideoApis : function(_nc,opt,addedApis) { 16829 var httpprefix = location.protocol === 'https:' ? "https" : "http"; 16830 16831 if ((_nc.data('ytid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('youtube')>0)) opt.youtubeapineeded = true; 16832 if ((_nc.data('ytid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('youtube')>0) && addedApis.addedyt==0) { 16833 opt.youtubestarttime = jQuery.now(); 16834 addedApis.addedyt=1; 16835 var s = document.createElement("script"); 16836 s.src = "https://www.youtube.com/iframe_api"; /* Load Player API*/ 16837 var before = document.getElementsByTagName("script")[0], 16838 loadit = true; 16839 jQuery('head').find('*').each(function(){ 16840 if (jQuery(this).attr('src') == "https://www.youtube.com/iframe_api") 16841 loadit = false; 16842 }); 16843 if (loadit) before.parentNode.insertBefore(s, before); 16844 16845 } 16846 16847 16848 16849 if ((_nc.data('vimeoid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('vimeo')>0)) opt.vimeoapineeded = true; 16850 if ((_nc.data('vimeoid')!=undefined || _nc.find('iframe').length>0 && _nc.find('iframe').attr('src').toLowerCase().indexOf('vimeo')>0) && addedApis.addedvim==0) { 16851 opt.vimeostarttime = jQuery.now(); 16852 addedApis.addedvim=1; 16853 var f = document.createElement("script"), 16854 before = document.getElementsByTagName("script")[0], 16855 loadit = true; 16856 f.src = "https://secure-a.vimeocdn.com/js/froogaloop2.min.js"; /* Load Player API*/ 16857 16858 jQuery('head').find('*').each(function(){ 16859 if (jQuery(this).attr('src') == "https://secure-a.vimeocdn.com/js/froogaloop2.min.js") 16860 loadit = false; 16861 }); 16862 if (loadit) 16863 before.parentNode.insertBefore(f, before); 16864 } 16865 return addedApis; 16866 }, 16867 16868 manageVideoLayer : function(_nc,opt,recalled,internrecalled) { 16869 // YOUTUBE AND VIMEO LISTENRES INITIALISATION 16870 var vida = _nc.data("videoattributes"), 16871 vidytid = _nc.data('ytid'), 16872 vimeoid = _nc.data('vimeoid'), 16873 videopreload = _nc.data('videopreload') === "auto" || _nc.data('videopreload') === "canplay" || _nc.data('videopreload') === "canplaythrough" || _nc.data('videopreload') === "progress" ? "auto" : _nc.data('videopreload'), 16874 videomp = _nc.data('videomp4'), 16875 videowebm = _nc.data('videowebm'), 16876 videoogv = _nc.data('videoogv'), 16877 videoafs = _nc.data('allowfullscreenvideo'), 16878 videocontrols = _nc.data('videocontrols'), 16879 httpprefix = "http", 16880 videoloop = _nc.data('videoloop')=="loop" ? "loop" : _nc.data('videoloop')=="loopandnoslidestop" ? "loop" : "", 16881 videotype = (videomp!=undefined || videowebm!=undefined) ? "html5" : 16882 (vidytid!=undefined && String(vidytid).length>1) ? "youtube" : 16883 (vimeoid!=undefined && String(vimeoid).length>1) ? "vimeo" : "none", 16884 tag = _nc.data('audio')=="html5" ? "audio" : "video", 16885 newvideotype = (videotype=="html5" && _nc.find(tag).length==0) ? "html5" : 16886 (videotype=="youtube" && _nc.find('iframe').length==0) ? "youtube" : 16887 (videotype=="vimeo" && _nc.find('iframe').length==0) ? "vimeo" : "none"; 16888 16889 // VideLoop reset if Next Slide at End is set ! 16890 videoloop = _nc.data('nextslideatend') === true ? "" : videoloop;
16891 16892 16893 _nc.data('videotype',videotype); 16894 // ADD HTML5 VIDEO IF NEEDED 16895 switch (newvideotype) { 16896 case "html5": 16897 16898 if (videocontrols!="controls") videocontrols=""; 16899 var tag = "video" 16900 16901 //_nc.data('audio',"html5"); 16902 if (_nc.data('audio')=="html5") { 16903 tag = "audio"; 16904 _nc.addClass("tp-audio-html5"); 16905 } 16906 16907 var apptxt = '<'+tag+' style="object-fit:cover;background-size:cover;visible:hidden;width:100%; height:100%" class="" '+videoloop+' preload="'+videopreload+'">'; 16908 16909 if (videopreload=="auto") opt.mediapreload = true; 16910 //if (_nc.data('videoposter')!=undefined) apptxt = apptxt + 'poster="'+_nc.data('videoposter')+'">'; 16911 if (videowebm!=undefined && _R.get_browser().toLowerCase()=="firefox") apptxt = apptxt + '<source src="'+videowebm+'" type="video/webm" />'; 16912 if (videomp!=undefined) apptxt = apptxt + '<source src="'+videomp+'" type="video/mp4" />'; 16913 if (videoogv!=undefined) apptxt = apptxt + '<source src="'+videoogv+'" type="video/ogg" />'; 16914 apptxt = apptxt + '</'+tag+'>'; 16915 var hfm =""; 16916 if (videoafs==="true" || videoafs===true) 16917 hfm = '<div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-full-screen">Full-Screen</button></div>'; 16918 16919 if (videocontrols=="controls") 16920 apptxt = apptxt + ('<div class="tp-video-controls">'+ 16921 '<div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-play-pause">Play</button></div>'+ 16922 '<div class="tp-video-seek-bar-wrap">
16922<input type="range" class="tp-seek-bar" value="0"></div>'+ 16923 '<div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-mute">Mute</button></div>'+ 16924 '<div class="tp-video-vol-bar-wrap"><input type="range" class="tp-volume-bar" min="0" max="1" step="0.1" value="1"></div>'+ 16925 hfm+ 16926 '</div>'); 16927 16928 _nc.data('videomarkup',apptxt) 16929 _nc.append(apptxt); 16930 16931 // START OF HTML5 VIDEOS 16932 if ((_ISM && _nc.data('disablevideoonmobile')==1) ||_R.isIE(8)) _nc.find(tag).remove(); 16933 16934 // ADD HTML5 VIDEO CONTAINER 16935 _nc.find(tag).each(function(i) { 16936 var video = this, 16937 jvideo = jQuery(this); 16938 16939 if (!jvideo.parent().hasClass("html5vid")) 16940 jvideo.wrap('<div class="html5vid" style="position:relative;top:0px;left:0px;width:100%;height:100%; overflow:hidden;"></div>'); 16941 16942 var html5vid = jvideo.parent(); 16943 if (html5vid.data('metaloaded') != 1) { 16944 addEvent(video,'loadedmetadata',function(_nc) { 16945 htmlvideoevents(_nc,opt); 16946 _R.resetVideo(_nc,opt); 16947 }(_nc)); 16948 } 16949 }); 16950 break; 16951 case "youtube": 16952 httpprefix = "https"; 16953 if (location.protocol === 'https:') 16954 httpprefix = "https"; 16955 if (videocontrols=="none") { 16956 vida = vida.replace("controls=1","controls=0"); 16957 if (vida.toLowerCase().indexOf('controls')==-1) 16958 vida = vida+"&controls=0"; 16959 } 16960 16961 var s = getStartSec(_nc.data('videostartat')), 16962 e = getStartSec(_nc.data('videoendat')); 16963 16964 if (s!=-1) vida=vida+"&start="+s; 16965 if (e!=-1) vida=vida+"&end="+e; 16966 16967 // CHECK VIDEO ORIGIN, AND EXTEND WITH WWW IN CASE IT IS MISSING ! 16968 var orig = vida.split('origin='+httpprefix+'://'), 16969 vida_new = ""; 16970 16971 if (orig.length>1) { 16972 vida_new = orig[0]+'origin='+httpprefix+'://'; 16973 if (self.location.href.match(/www/gi) && !orig[1].match(/www/gi)) 16974 vida_new=vida_new+"www." 16975 vida_new=vida_new+orig[1]; 16976 } else { 16977 vida_new = vida; 16978 } 16979 16980 var yafv = videoafs==="true" || videoafs===true ? "allowfullscreen" : ""; 16981 _nc.data('videomarkup','<iframe style="visible:hidden" src="'+httpprefix+'://www.youtube.com/embed/'+vidytid+'?'+vida_new+'" '+yafv+' allow="autoplay; encrypted-media" width="100%" height="100%" style="width:100%;height:100%"></iframe>'); 16982 break; 16983 16984 case "vimeo": 16985 if (location.protocol === 'https:') 16986 httpprefix = "https"; 16987 _nc.data('videomarkup','<iframe style="visible:hidden" src="'+httpprefix+'://player.vimeo.com/video/'+vimeoid+'?autoplay=0&'+vida+'" webkitallowfullscreen mozallowfullscreen allowfullscreen width="100%" height="100%" style="100%;height:100%"></iframe>'); 16988 16989 break; 16990 } 16991 16992 //if (videotype=="vimeo" || videotype=="youtube") { 16993 16994 // IF VIDEOPOSTER EXISTING 16995 var noposteronmobile = _ISM && _nc.data('noposteronmobile')=="on"; 16996 16997 if (_nc.data('videoposter')!=undefined && _nc.data('videoposter').length>2 && !noposteronmobile) { 16998 if (_nc.find('.tp-videoposter').length==0) 16999 _nc.append('<div class="tp-videoposter noSwipe" style="cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:3;background-image:url('+_nc.data('videoposter')+'); background-size:cover;background-position:center center;"></div>'); 17000 if (_nc.find('iframe').length==0)
17001 _nc.find('.tp-videoposter').click(function() { 17002 _R.playVideo(_nc,opt); 17003 if (_ISM) { 17004 if (_nc.data('disablevideoonmobile')==1) return false; 17005 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17006 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 17007 } 17008 }) 17009 } else { 17010 if (_ISM && _nc.data('disablevideoonmobile')==1) return false; 17011 if (_nc.find('iframe').length==0 && (videotype=="youtube" || videotype=="vimeo")) { 17012 _nc.append(_nc.data('videomarkup')); 17013 addVideoListener(_nc,opt,false); 17014 } 17015 } 17016 17017 // ADD DOTTED OVERLAY IF NEEDED 17018 if (_nc.data('dottedoverlay')!="none" && _nc.data('dottedoverlay')!=undefined && _nc.find('.tp-dottedoverlay').length!=1) 17019 _nc.append('<div class="tp-dottedoverlay '+_nc.data('dottedoverlay')+'"></div>'); 17020 17021 _nc.addClass("HasListener"); 17022 17023 if (_nc.data('bgvideo')==1) { 17024 punchgs.TweenLite.set(_nc.find('video, iframe'),{autoAlpha:0}); 17025 } 17026 } 17027 17028}); 17029 17030 17031 17032 17033 17034////////////////////////////////////////////////////// 17035// * Revolution Slider - VIDEO / API FUNCTIONS // 17036// * @version: 1.0 (30.10.2014) // 17037// * @author ThemePunch // 17038////////////////////////////////////////////////////// 17039 17040function getStartSec(st) { 17041 return st == undefined ? -1 :jQuery.isNumeric(st) ? st : st.split(":").length>1 ? parseInt(st.split(":")[0],0)*60 + parseInt(st.split(":")[1],0) : st; 17042}; 17043 17044// - VIMEO ADD EVENT ///// 17045var addEvent = function(element, eventName, callback) { 17046 if (element.addEventListener) 17047 element.addEventListener(eventName, callback, {capture:false,passive:true}); 17048 else 17049 element.attachEvent(eventName, callback, {capture:false,passive:true}); 17050}; 17051 17052var getVideoDatas = function(p,t,d) { 17053 var a = {}; 17054 a.video = p; 17055 a.videotype = t; 17056 a.settings = d; 17057 return a; 17058} 17059 17060 17061var addVideoListener = function(_nc,opt,startnow) { 17062 17063 var ifr = _nc.find('iframe'), 17064 frameID = "iframe"+Math.round(Math.random()*100000+1), 17065 loop = _nc.data('videoloop'), 17066 pforv = loop != "loopandnoslidestop"; 17067 17068 loop = loop =="loop" || loop =="loopandnoslidestop"; 17069 17070 // CARE ABOUT ASPECT RATIO 17071 17072 if (_nc.data('forcecover')==1) { 17073 _nc.removeClass("fullscreenvideo").addClass("coverscreenvideo"); 17074 var asprat = _nc.data('aspectratio'); 17075 if (asprat!=undefined && asprat.split(":").length>1) 17076 _R.prepareCoveredVideo(asprat,opt,_nc); 17077 } 17078 17079 if (_nc.data('bgvideo')==1) { 17080 var asprat = _nc.data('aspectratio'); 17081 if (asprat!=undefined && asprat.split(":").length>1) 17082 _R.prepareCoveredVideo(asprat,opt,_nc); 17083 } 17084 17085 17086 17087 // IF LISTENER DOES NOT EXIST YET 17088 ifr.attr('id',frameID); 17089 17090 if (startnow) _nc.data('startvideonow',true); 17091 17092 if (_nc.data('videolistenerexist')!==1) { 17093 switch (_nc.data('videotype')) { 17094 // YOUTUBE LISTENER 17095 case "youtube": 17096 17097 var player = new YT.Player(frameID, { 17098 events: { 17099 "onStateChange": function(event) { 17100 17101 var container = _nc.closest('.tp-simpleresponsive'), 17102 videorate = _nc.data('videorate'), 17103 videostart = _nc.data('videostart'), 17104 fsmode = checkfullscreenEnabled(); 17105 17106 if (event.data == YT.PlayerState.PLAYING) { 17107 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17108 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 17109 if (_nc.data('volume')=="mute" || _R.lastToggleState(_nc.data('videomutetoggledby')) || opt.globalmute===true) { 17110 player.mute(); 17111 } else { 17112 player.unMute(); 17113 player.setVolume(parseInt(_nc.data('volume'),0) || 75); 17114 } 17115 17116 opt.videoplaying=true; 17117 addVidtoList(_nc,opt); 17118 if (pforv) 17119 opt.c.trigger('stoptimer'); 17120 else 17121 opt.videoplaying=false; 17122 17123 opt.c.trigger('revolution.slide.onvideoplay',getVideoDatas(player,"youtube",_nc.data())); 17124 _R.toggleState(_nc.data('videotoggledby')); 17125 } else { 17126 if (event.data==0 && loop) { 17127 //player.playVideo(); 17128 var s = getStartSec(_nc.data('videostartat')); 17129 if (s!=-1) player.seekTo(s);
17130 player.playVideo(); 17131 _R.toggleState(_nc.data('videotoggledby')); 17132 } 17133 17134 if (!fsmode && (event.data==0 || event.data==2) && _nc.data('showcoveronpause')=="on" && _nc.find('.tp-videoposter').length>0) { 17135 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17136 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut}); 17137 } 17138 if ((event.data!=-1 && event.data!=3)) { 17139 17140 opt.videoplaying=false; 17141 opt.tonpause = false; 17142 17143 remVidfromList(_nc,opt); 17144 container.trigger('starttimer'); 17145 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(player,"youtube",_nc.data())); 17146 17147 if (opt.currentLayerVideoIsPlaying==undefined || opt.currentLayerVideoIsPlaying.attr("id") == _nc.attr("id")) 17148 _R.unToggleState(_nc.data('videotoggledby')); 17149 17150 } 17151 17152 if (event.data==0 && _nc.data('nextslideatend')==true) { 17153 exitFullscreen(); 17154 _nc.data('nextslideatend-triggered',1); 17155 opt.c.revnext(); 17156 remVidfromList(_nc,opt); 17157 } else { 17158 remVidfromList(_nc,opt); 17159 opt.videoplaying=false; 17160 container.trigger('starttimer'); 17161 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(player,"youtube",_nc.data())); 17162 if (opt.currentLayerVideoIsPlaying==undefined || opt.currentLayerVideoIsPlaying.attr("id") == _nc.attr("id")) 17163 _R.unToggleState(_nc.data('videotoggledby')); 17164 } 17165 } 17166 }, 17167 'onReady': function(event) { 17168 17169 17170 var videorate = _nc.data('videorate'), 17171 videostart = _nc.data('videostart'); 17172 17173 _nc.addClass("rs-apiready"); 17174 if (videorate!=undefined) 17175 event.target.setPlaybackRate(parseFloat(videorate)); 17176 17177 // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED 17178 _nc.find('.tp-videoposter').unbind("click"); 17179 _nc.find('.tp-videoposter').click(function() { 17180 if (!_ISM) { 17181 player.playVideo(); 17182 } 17183 }) 17184 17185 if (_nc.data('startvideonow')) { 17186 17187 _nc.data('player').playVideo(); 17188 var s = getStartSec(_nc.data('videostartat')); 17189 if (s!=-1) _nc.data('player').seekTo(s); 17190 //_nc.find('.tp-videoposter').click(); 17191 } 17192 _nc.data('videolistenerexist',1); 17193 } 17194 } 17195 }); 17196 _nc.data('player',player); 17197 break; 17198 17199 // VIMEO LISTENER 17200 case "vimeo": 17201 var isrc = ifr.attr('src'), 17202 queryParameters = {}, queryString = isrc, 17203 re = /([^&=]+)=([^&]*)/g, m; 17204 // Creates a map with the query string parameters 17205 while (m = re.exec(queryString)) { 17206 queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]); 17207 } 17208 if (queryParameters['player_id']!=undefined) 17209 isrc = isrc.replace(queryParameters['player_id'],frameID); 17210 else 17211 isrc=isrc+"&player_id="+frameID; 17212 try{ isrc = isrc.replace('api=0','api=1'); } catch(e) {} 17213 isrc=isrc+"&api=1"; 17214 ifr.attr('src',isrc); 17215 17216 17217 var player = _nc.find('iframe')[0], 17218 vimcont = jQuery('#'+frameID), 17219 f = $f(frameID); 17220 17221 f.addEvent('ready', function(){ 17222 17223 _nc.addClass("rs-apiready"); 17224 f.addEvent('play', function(data) { 17225 _nc.data('nextslidecalled',0);
17226 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17227 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 17228 opt.c.trigger('revolution.slide.onvideoplay',getVideoDatas(f,"vimeo",_nc.data())); 17229 opt.videoplaying=true; 17230 17231 addVidtoList(_nc,opt); 17232 if (pforv) 17233 opt.c.trigger('stoptimer'); 17234 else 17235 opt.videoplaying=false; 17236 if (_nc.data('volume')=="mute" || _R.lastToggleState(_nc.data('videomutetoggledby')) || opt.globalmute===true) 17237 f.api('setVolume',"0") 17238 else 17239 f.api('setVolume',(parseInt(_nc.data('volume'),0)/100 || 0.75)); 17240 _R.toggleState(_nc.data('videotoggledby')); 17241 }); 17242 17243 f.addEvent('playProgress',function(data) { 17244 var et = getStartSec(_nc.data('videoendat')) 17245 17246 _nc.data('currenttime',data.seconds); 17247 if (et!=0 && (Math.abs(et-data.seconds) <0.3 && et>data.seconds) && _nc.data('nextslidecalled') != 1) { 17248 if (loop) { 17249 17250 f.api("play"); 17251 var s = getStartSec(_nc.data('videostartat')); 17252 if (s!=-1) f.api("seekTo",s); 17253 } else { 17254 if (_nc.data('nextslideatend')==true) { 17255 _nc.data('nextslideatend-triggered',1); 17256 _nc.data('nextslidecalled',1); 17257 opt.c.revnext(); 17258 } 17259 f.api("pause"); 17260 } 17261 } 17262 }); 17263 17264 f.addEvent('finish', function(data) { 17265 remVidfromList(_nc,opt); 17266 opt.videoplaying=false; 17267 opt.c.trigger('starttimer'); 17268 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(f,"vimeo",_nc.data())); 17269 if (_nc.data('nextslideatend')==true) { 17270 _nc.data('nextslideatend-triggered',1); 17271 opt.c.revnext(); 17272 } 17273 if (opt.currentLayerVideoIsPlaying==undefined || opt.currentLayerVideoIsPlaying.attr("id") == _nc.attr("id")) 17274 _R.unToggleState(_nc.data('videotoggledby')); 17275 17276 }); 17277 17278 f.addEvent('pause', function(data) { 17279 17280 if (_nc.find('.tp-videoposter').length>0 && _nc.data('showcoveronpause')=="on") { 17281 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17282 punchgs.TweenLite.to(_nc.find('iframe'),0.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut}); 17283 } 17284 opt.videoplaying=false; 17285 opt.tonpause = false; 17286 17287 remVidfromList(_nc,opt); 17288 opt.c.trigger('starttimer'); 17289 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(f,"vimeo",_nc.data())); 17290 if (opt.currentLayerVideoIsPlaying==undefined || opt.currentLayerVideoIsPlaying.attr("id") == _nc.attr("id")) 17291 _R.unToggleState(_nc.data('videotoggledby')); 17292 }); 17293 17294 17295 17296 _nc.find('.tp-videoposter').unbind("click"); 17297 _nc.find('.tp-videoposter').click(function() { 17298 if (!_ISM) { 17299 17300 f.api("play"); 17301 return false; 17302 } 17303 }) 17304 if (_nc.data('startvideonow')) { 17305 17306 f.api("play"); 17307 var s = getStartSec(_nc.data('videostartat')); 17308 if (s!=-1) f.api("seekTo",s); 17309 } 17310 _nc.data('videolistenerexist',1); 17311 }); 17312 break; 17313 } 17314 } else { 17315 var s = getStartSec(_nc.data('videostartat')); 17316 switch (_nc.data('videotype')) { 17317 // YOUTUBE LISTENER 17318 case "youtube": 17319 if (startnow) { 17320 _nc.data('player').playVideo(); 17321 if (s!=-1) _nc.data('player').seekTo() 17322 } 17323 break; 17324 case "vimeo": 17325 if (startnow) { 17326 17327 var f = $f(_nc.find('iframe').attr("id")); 17328 f.api("play"); 17329 if (s!=-1) f.api("seekTo",s); 17330 } 17331 break; 17332 } 17333 } 17334} 17335 17336 17337var exitFullscreen = function() { 17338 if(document.exitFullscreen) { 17339 document.exitFullscreen(); 17340 } else if(document.mozCancelFullScreen) { 17341 document.mozCancelFullScreen(); 17342 } else if(document.webkitExitFullscreen) { 17343 document.webkitExitFullscreen(); 17344 } 17345} 17346 17347 17348var checkfullscreenEnabled = function() { 17349 try{ 17350 // FF provides nice flag, maybe others will add support for this later on? 17351 if(window['fullScreen'] !== undefined) { 17352 return window.fullScreen;
17353 } 17354 // 5px height margin, just in case (needed by e.g. IE) 17355 var heightMargin = 5; 17356 if(jQuery.browser.webkit && /Apple Computer/.test(navigator.vendor)) { 17357 // Safari in full screen mode shows the navigation bar, 17358 // which is 40px 17359 heightMargin = 42; 17360 } 17361 return screen.width == window.innerWidth && 17362 Math.abs(screen.height - window.innerHeight) < heightMargin; 17363 } catch(e) { 17364 17365 } 17366 } 17367///////////////////////////////////////// HTML5 VIDEOS /////////////////////////////////////////// 17368 17369var htmlvideoevents = function(_nc,opt,startnow) { 17370 17371 17372 17373 if (_ISM && _nc.data('disablevideoonmobile')==1) return false; 17374 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 17375 jvideo = _nc.find(tag), 17376 video = jvideo[0], 17377 html5vid = jvideo.parent(), 17378 loop = _nc.data('videoloop'), 17379 pforv = loop != "loopandnoslidestop"; 17380 17381 loop = loop =="loop" || loop =="loopandnoslidestop"; 17382 17383 html5vid.data('metaloaded',1); 17384 // FIRST TIME LOADED THE HTML5 VIDEO 17385 17386 if (_nc.data('bgvideo')==1 && (_nc.data('videoloop')==="none" || _nc.data('videoloop')===false)) 17387 pforv = false; 17388 17389 17390 17391 17392 //PLAY, STOP VIDEO ON CLICK OF PLAY, POSTER ELEMENTS 17393 if (jvideo.attr('control') == undefined ) { 17394 if (_nc.find('.tp-video-play-button').length==0 && !_ISM) 17395 _nc.append('<div class="tp-video-play-button"><i class="revicon-right-dir"></i><span class="tp-revstop"> </span></div>'); 17396 _nc.find('video, .tp-poster, .tp-video-play-button').click(function() { 17397 if (_nc.hasClass("videoisplaying")) 17398 video.pause(); 17399 else 17400 video.play(); 17401 }) 17402 } 17403 17404 // PRESET FULLCOVER VIDEOS ON DEMAND 17405 if (_nc.data('forcecover')==1 || _nc.hasClass('fullscreenvideo') || _nc.data('bgvideo')==1) { 17406 if (_nc.data('forcecover')==1 || _nc.data('bgvideo')==1) { 17407 html5vid.addClass("fullcoveredvideo"); 17408 var asprat = _nc.data('aspectratio') || "4:3"; 17409 _R.prepareCoveredVideo(asprat,opt,_nc); 17410 } 17411 else 17412 html5vid.addClass("fullscreenvideo"); 17413 } 17414 17415 17416 // FIND CONTROL BUTTONS IN VIDEO, AND ADD EVENT LISTENERS ON THEM 17417 var playButton = _nc.find('.tp-vid-play-pause')[0], 17418 muteButton = _nc.find('.tp-vid-mute')[0], 17419 fullScreenButton = _nc.find('.tp-vid-full-screen')[0], 17420 seekBar = _nc.find('.tp-seek-bar')[0], 17421 volumeBar = _nc.find('.tp-volume-bar')[0]; 17422 17423 if (playButton!=undefined) { 17424 // Event listener for the play/pause button 17425 addEvent(playButton,"click", function() { 17426 if (video.paused == true) 17427 video.play(); 17428 else 17429 video.pause(); 17430 }); 17431 } 17432 17433 if (muteButton!=undefined) { 17434 17435 // Event listener for the mute button 17436 addEvent(muteButton,"click", function() { 17437 if (video.muted == false) { 17438 video.muted = true; 17439 muteButton.innerHTML = "Unmute"; 17440 } else { 17441 video.muted = false; 17442 muteButton.innerHTML = "Mute"; 17443 } 17444 }); 17445 } 17446 17447 if (fullScreenButton!=undefined) { 17448 17449 // Event listener for the full-screen button 17450 if (fullScreenButton) 17451 addEvent(fullScreenButton,"click", function() { 17452 if (video.requestFullscreen) { 17453 video.requestFullscreen(); 17454 } else if (video.mozRequestFullScreen) { 17455 video.mozRequestFullScreen(); // Firefox 17456 } else if (video.webkitRequestFullscreen) { 17457 video.webkitRequestFullscreen(); // Chrome and Safari 17458 } 17459 }); 17460 17461 } 17462 17463 if (seekBar !=undefined) { 17464 17465 // Event listener for the seek bar 17466 addEvent(seekBar,"change", function() { 17467 var time = video.duration * (seekBar.value / 100); 17468 video.currentTime = time; 17469 17470 }); 17471 17472 // Pause the video when the seek handle is being dragged 17473 addEvent(seekBar,"mousedown", function() { 17474 _nc.addClass("seekbardragged"); 17475 video.pause(); 17476 17477 }); 17478 17479 // Play the video when the seek handle is dropped 17480 addEvent(seekBar,"mouseup", function() { 17481 _nc.removeClass("seekbardragged"); 17482 video.play(); 17483 17484 }); 17485 } 17486 17487 addEvent(video,"canplaythrough", function() { 17488 _R.preLoadAudioDone(_nc,opt,"canplaythrough"); 17489 }); 17490 17491 addEvent(video,"canplay", function() { 17492 _R.preLoadAudioDone(_nc,opt,"canplay"); 17493 }); 17494 17495 addEvent(video,"progress", function() { 17496 _R.preLoadAudioDone(_nc,opt,"progress"); 17497 }); 17498 17499 // Update the seek bar as the video plays 17500 addEvent(video,"timeupdate", function() { 17501 17502 var value = (100 / video.duration) * video.currentTime, 17503 et = getStartSec(_nc.data('videoendat')), 17504 cs =video.currentTime; 17505 if (seekBar != undefined) 17506 seekBar.value = value; 17507 17508 if (et!=0 && et!=-1 && (Math.abs(et-cs) <=0.3 && et>cs) && _nc.data('nextslidecalled') != 1) { 17509 if (loop) { 17510 video.play(); 17511 var s = getStartSec(_nc.data('videostartat')); 17512 if (s!=-1) video.currentTime = s; 17513 } else { 17514 17515 17516 if (_nc.data('nextslideatend')==true) { 17517 _nc.data('nextslideatend-triggered',1); 17518 _nc.data('nextslidecalled',1); 17519 opt.just_called_nextslide_at_htmltimer = true; 17520 opt.c.revnext(); 17521 setTimeout(function() { 17522 opt.just_called_nextslide_at_htmltimer = false; 17523 },1000); 17524 } 17525 video.pause(); 17526 } 17527 } 17528 }); 17529 17530 17531 if (volumeBar != undefined) { 17532 17533 // Event listener for the volume bar 17534 addEvent(volumeBar,"change", function() { 17535 // Update the video volume 17536 video.volume = volumeBar.value; 17537 }); 17538 } 17539 17540 17541 // VIDEO EVENT LISTENER FOR "PLAY" 17542 addEvent(video,"play",function() { 17543 17544 17545 _nc.data('nextslidecalled',0); 17546 17547 var vol = _nc.data('volume');
17548 vol = vol!=undefined && vol!="mute" ?parseFloat(vol)/100 : vol; 17549 17550 if (opt.globalmute===true) 17551 video.muted = true; 17552 else 17553 video.muted = false; 17554 17555 if (vol>1) vol = vol/100; 17556 if (vol=="mute") 17557 video.muted=true; 17558 else 17559 if (vol!=undefined) 17560 video.volume = vol; 17561 17562 17563 17564 _nc.addClass("videoisplaying"); 17565 17566 var tag = _nc.data('audio')=="html5" ? "audio" : "video"; 17567 17568 addVidtoList(_nc,opt); 17569 17570 if (!pforv || tag=="audio") { 17571 opt.videoplaying=false; 17572 if (tag!="audio") opt.c.trigger('starttimer'); 17573 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(video,"html5",_nc.data())); 17574 } else { 17575 opt.videoplaying=true; 17576 opt.c.trigger('stoptimer'); 17577 opt.c.trigger('revolution.slide.onvideoplay',getVideoDatas(video,"html5",_nc.data())); 17578 } 17579 17580 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17581 punchgs.TweenLite.to(_nc.find(tag),0.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}); 17582 17583 var playButton = _nc.find('.tp-vid-play-pause')[0], 17584 muteButton = _nc.find('.tp-vid-mute')[0]; 17585 if (playButton!=undefined) 17586 playButton.innerHTML = "Pause"; 17587 if (muteButton!=undefined && video.muted) 17588 muteButton.innerHTML = "Unmute"; 17589 17590 _R.toggleState(_nc.data('videotoggledby')); 17591 }); 17592 17593 // VIDEO EVENT LISTENER FOR "PAUSE" 17594 addEvent(video,"pause",function() { 17595 17596 var tag = _nc.data('audio')=="html5" ? "audio" : "video", 17597 fsmode = checkfullscreenEnabled(); 17598 17599 17600 if (!fsmode && _nc.find('.tp-videoposter').length>0 && _nc.data('showcoveronpause')=="on" && !_nc.hasClass("seekbardragged")) { 17601 punchgs.TweenLite.to(_nc.find('.tp-videoposter'),0.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}); 17602 punchgs.TweenLite.to(_nc.find(tag),0.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut}); 17603 } 17604 17605 _nc.removeClass("videoisplaying"); 17606 opt.videoplaying=false; 17607 remVidfromList(_nc,opt); 17608 if (tag!="audio") opt.c.trigger('starttimer'); 17609 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(video,"html5",_nc.data())); 17610 var playButton = _nc.find('.tp-vid-play-pause')[0]; 17611 if (playButton!=undefined) 17612 playButton.innerHTML = "Play"; 17613 17614 if (opt.currentLayerVideoIsPlaying==undefined || opt.currentLayerVideoIsPlaying.attr("id") == _nc.attr("id")) 17615 _R.unToggleState(_nc.data('videotoggledby')); 17616 }); 17617 17618 // VIDEO EVENT LISTENER FOR "END" 17619 17620 17621 addEvent(video,"ended",function() { 17622 exitFullscreen(); 17623 17624 remVidfromList(_nc,opt); 17625 opt.videoplaying=false; 17626 remVidfromList(_nc,opt); 17627 if (tag!="audio") opt.c.trigger('starttimer'); 17628 opt.c.trigger('revolution.slide.onvideostop',getVideoDatas(video,"html5",_nc.data())); 17629 17630 17631 if (_nc.data('nextslideatend')===true && video.currentTime>0) { 17632 17633 if (!opt.just_called_nextslide_at_htmltimer==true) { 17634 _nc.data('nextslideatend-triggered',1); 17635 opt.c.revnext(); 17636 opt.just_called_nextslide_at_htmltimer = true; 17637 } 17638 setTimeout(function() { 17639 opt.just_called_nextslide_at_htmltimer = false; 17640 },1500) 17641 } 17642 _nc.removeClass("videoisplaying"); 17643 17644 17645 }); 17646} 17647 17648 17649 17650var addVidtoList = function(_nc,opt) { 17651 17652 if (opt.playingvideos == undefined) opt.playingvideos = new Array(); 17653 17654 // STOP OTHER VIDEOS 17655 if (_nc.data('stopallvideos')) { 17656 if (opt.playingvideos != undefined && opt.playingvideos.length>0) { 17657 opt.lastplayedvideos = jQuery.extend(true,[],opt.playingvideos); 17658 jQuery.each(opt.playingvideos,function(i,_nc) { 17659 _R.stopVideo(_nc,opt); 17660 }); 17661 } 17662 } 17663 opt.playingvideos.push(_nc); 17664 opt.currentLayerVideoIsPlaying = _nc; 17665 17666} 17667 17668 17669var remVidfromList = function(_nc,opt) { 17670 if (opt.playingvideos != undefined && jQuery.inArray(_nc,opt.playingvideos)>=0) 17671 opt.playingvideos.splice(jQuery.inArray(_nc,opt.playingvideos),1); 17672} 17673 17674 17675 17676 17677 17678 17679 17680})(jQuery);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.