!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),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("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("':"vimeo"===g.type&&(c=''),f.addClass("owl-video-playing"),this._playing=f,d=a('
'+c+"
"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.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=d}(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){"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){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){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&&this.core.support3d){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.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},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.transitionEnd()},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){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay() },this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.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.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,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){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value").addClass(d.dotClass).append(a("")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("
").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("
").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("
").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.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)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.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.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.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},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.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=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.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=c}(window.Zepto||window.jQuery,window,document); (function(e){e.extend(e.fn,{validate:function(t){if(!this.length){t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.");return}var n=e.data(this[0],"validator");return n?n:(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){n.settings.submitHandler&&(n.submitButton=t.target),e(t.target).hasClass("cancel")&&(n.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return n.settings.submitHandler?(n.submitButton&&(r=e("").attr("name",n.submitButton.name).val(n.submitButton.value).appendTo(n.currentForm)),n.settings.submitHandler.call(n,n.currentForm,t),n.submitButton&&r.remove(),!1):!0}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)})),n)},valid:function(){if(e(this[0]).is("form"))return this.validate().form();var t=!0,n=e(this[0].form).validate();return this.each(function(){t&=n.element(this)}),t},removeAttrs:function(t){var n={},r=this;return e.each(t.split(/\s/),function(e,t){n[t]=r.attr(t),r.removeAttr(t)}),n},rules:function(t,n){var r=this[0];if(t){var i=e.data(r.form,"validator").settings,s=i.rules,o=e.validator.staticRules(r);switch(t){case"add":e.extend(o,e.validator.normalizeRule(n)),s[r.name]=o,n.messages&&(i.messages[r.name]=e.extend(i.messages[r.name],n.messages));break;case"remove":if(!n)return delete s[r.name],o;var u={};return e.each(n.split(/\s/),function(e,t){u[t]=o[t],delete o[t]}),u}}var a=e.validator.normalizeRules(e.extend({},e.validator.classRules(r),e.validator.attributeRules(r),e.validator.dataRules(r),e.validator.staticRules(r)),r);if(a.required){var f=a.required;delete a.required,a=e.extend({required:f},a)}return a}}),e.extend(e.expr[":"],{blank:function(t){return!e.trim(""+t.value)},filled:function(t){return!!e.trim(""+t.value)},unchecked:function(e){return!e.checked}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return arguments.length===1?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e,t){this.lastActive=e,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(e)).hide())},onfocusout:function(e,t){!this.checkable(e)&&(e.name in this.submitted||!this.optional(e))&&this.element(e)},onkeyup:function(e,t){if(t.which===9&&this.elementValue(e)==="")return;(e.name in this.submitted||e===this.lastElement)&&this.element(e)},onclick:function(e,t){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,r){t.type==="radio"?this.findByName(t.name).addClass(n).removeClass(r):e(t).addClass(n).removeClass(r)},unhighlight:function(t,n,r){t.type==="radio"?this.findByName(t.name).removeClass(n).addClass(r):e(t).removeClass(n).addClass(r)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function r(t){var n=e.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");n.settings[r]&&n.settings[r].call(n,this[0],t)}this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var t=this.groups={};e.each(this.settings.groups,function(n,r){typeof r=="string"&&(r=r.split(/\s/)),e.each(r,function(e,r){t[r]=n})});var n=this.settings.rules;e.each(n,function(t,r){n[t]=e.validator.normalizeRule(r)}),e(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",r).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",r),this.settings.invalidHandler&&e(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t)),this.lastElement=t,this.prepareElement(t),this.currentElements=e(t);var n=this.check(t)!==!1;return n?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),n},showErrors:function(t){if(t){e.extend(this.errorMap,t),this.errorList=[];for(var n in t)this.errorList.push({message:t[n],element:this.findByName(n)[0]});this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t=0;for(var n in e)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&e.grep(this.errorList,function(e){return e.element.name===t.name}).length===1&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in n||!t.objectLength(e(this).rules())?!1:(n[this.name]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return e(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([]),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n=e(t).attr("type"),r=e(t).val();return n==="radio"||n==="checkbox"?e("input[name='"+e(t).attr("name")+"']:checked").val():typeof r=="string"?r.replace(/\r/g,""):r},check:function(t){t=this.validationTargetFor(this.clean(t));var n=e(t).rules(),r=!1,i=this.elementValue(t),s;for(var o in n){var u={method:o,parameters:n[o]};try{s=e.validator.methods[o].call(this,i,t,u.parameters);if(s==="dependency-mismatch"){r=!0;continue}r=!1;if(s==="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!s)return this.formatAndAdd(t,u),!1}catch(a){throw this.settings.debug&&window.console&&console.log("Exception occured when checking element "+t.id+", check the '"+u.method+"' method.",a),a}}if(r)return;return this.objectLength(n)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg-"+n.toLowerCase())||t.attributes&&e(t).attr("data-msg-"+n.toLowerCase())},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;eWarning: No message defined for "+t.name+"")},formatAndAdd:function(t,n){var r=this.defaultMessage(t,n.method),i=/\$?\{(\d+)\}/g;typeof r=="function"?r=r.call(this,n.parameters,t):i.test(r)&&(r=e.validator.format(r.replace(i,"{$1}"),n.parameters)),this.errorList.push({message:r,element:t}),this.errorMap[t.name]=r,this.submitted[t.name]=r},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t;for(e=0;this.errorList[e];e++){var n=this.errorList[e];this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message)}this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(n)):(r=e("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,e(t)):r.insertAfter(t))),!n&&this.settings.success&&(r.text(""),typeof this.settings.success=="string"?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var n=this.idOrName(t);return this.errors().filter(function(){return e(this).attr("for")===n})},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name).not(this.settings.ignore)[0]),e},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+t+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return this.dependTypes[typeof e]?this.dependTypes[typeof e](e,t):!0},dependTypes:{"boolean":function(e,t){return e},string:function(t,n){return!!e(t,n.form).length},"function":function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,this.pending[e.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],n&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.formSubmitted=!1):!n&&this.pendingRequest===0&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},r=e(t).attr("class");return r&&e.each(r.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},attributeRules:function(t){var n={},r=e(t);for(var i in e.validator.methods){var s;i==="required"?(s=r.get(0).getAttribute(i),s===""&&(s=!0),s=!!s):s=r.attr(i),s?n[i]=s:r[0].getAttribute("type")===i&&(n[i]=!0)}return n.maxlength&&/-1|2147483647|524288/.test(n.maxlength)&&delete n.maxlength,n},dataRules:function(t){var n,r,i={},s=e(t);for(n in e.validator.methods)r=s.data("rule-"+n.toLowerCase()),r!==undefined&&(i[n]=r);return i},staticRules:function(t){var n={},r=e.data(t.form,"validator");return r.settings.rules&&(n=e.validator.normalizeRule(r.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(r,i){if(i===!1){delete t[r];return}if(i.param||i.depends){var s=!0;switch(typeof i.depends){case"string":s=!!e(i.depends,n.form).length;break;case"function":s=i.depends.call(n,n)}s?t[r]=i.param!==undefined?i.param:!0:delete t[r]}}),e.each(t,function(r,i){t[r]=e.isFunction(i)?i(n):i}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength"],function(){var n;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:typeof t[this]=="string"&&(n=t[this].split(/[\s,]+/),t[this]=[Number(n[0]),Number(n[1])]))}),e.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if(typeof t=="string"){var n={};e.each(t.split(/\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,r){e.validator.methods[t]=n,e.validator.messages[t]=r!==undefined?r:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,r){if(!this.depend(r,n))return"dependency-mismatch";if(n.nodeName.toLowerCase()==="select"){var i=e(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(t,n)>0:e.trim(t).length>0},remote:function(t,n,r){if(this.optional(n))return"dependency-mismatch";var i=this.previousValue(n);this.settings.messages[n.name]||(this.settings.messages[n.name]={}),i.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=i.message,r=typeof r=="string"&&{url:r}||r;if(i.old===t)return i.valid;i.old=t;var s=this;this.startRequest(n);var o={};return o[n.name]=t,e.ajax(e.extend(!0,{url:r,mode:"abort",port:"validate"+n.name,dataType:"json",data:o,success:function(r){s.settings.messages[n.name].remote=i.originalMessage;var o=r===!0||r==="true";if(o){var u=s.formSubmitted;s.prepareElement(n),s.formSubmitted=u,s.successList.push(n),delete s.invalid[n.name],s.showErrors()}else{var a={},f=r||s.defaultMessage(n,"remote");a[n.name]=i.message=e.isFunction(f)?f(t):f,s.invalid[n.name]=!0,s.showErrors(a)}i.valid=o,s.stopRequest(n,o)}},r)),"pending"},minlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r},maxlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i<=r},rangelength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r[0]&&i<=r[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},email:function(e,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(e)},url:function(e,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test((new Date(e)).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(e)},number:function(e,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},creditcard:function(e,t){if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(e))return!1;var n=0,r=0,i=!1;e=e.replace(/\D/g,"");for(var s=e.length-1;s>=0;s--){var o=e.charAt(s);r=parseInt(o,10),i&&(r*=2)>9&&(r-=9),n+=r,i=!i}return n%10===0},equalTo:function(t,n,r){var i=e(r);return this.settings.onfocusout&&i.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){e(n).valid()}),t===i.val()}}}),e.format=e.validator.format})(jQuery),function(e){var t={};if(e.ajaxPrefilter)e.ajaxPrefilter(function(e,n,r){var i=e.port;e.mode==="abort"&&(t[i]&&t[i].abort(),t[i]=r)});else{var n=e.ajax;e.ajax=function(r){var i=("mode"in r?r:e.ajaxSettings).mode,s=("port"in r?r:e.ajaxSettings).port;return i==="abort"?(t[s]&&t[s].abort(),t[s]=n.apply(this,arguments)):n.apply(this,arguments)}}}(jQuery),function(e){e.extend(e.fn,{validateDelegate:function(t,n,r){return this.bind(n,function(n){var i=e(n.target);if(i.is(t))return r.apply(i,arguments)})}})}(jQuery); jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g=0)&&focusable(element, !isTabIndexNaN); }}); if(!$("").outerWidth(1).jquery){ $.each([ "Width", "Height" ], function(i, name){ var side=name==="Width" ? [ "Left", "Right" ]:[ "Top", "Bottom" ], type=name.toLowerCase(), orig={ innerWidth: $.fn.innerWidth, innerHeight: $.fn.innerHeight, outerWidth: $.fn.outerWidth, outerHeight: $.fn.outerHeight }; function reduce(elem, size, border, margin){ $.each(side, function(){ size -=parseFloat($.css(elem, "padding" + this))||0; if(border){ size -=parseFloat($.css(elem, "border" + this + "Width"))||0; } if(margin){ size -=parseFloat($.css(elem, "margin" + this))||0; }}); return size; } $.fn[ "inner" + name ]=function(size){ if(size===undefined){ return orig[ "inner" + name ].call(this); } return this.each(function(){ $(this).css(type, reduce(this, size) + "px"); }); }; $.fn[ "outer" + name]=function(size, margin){ if(typeof size!=="number"){ return orig[ "outer" + name ].call(this, size); } return this.each(function(){ $(this).css(type, reduce(this, size, true, margin) + "px"); }); };}); } if(!$.fn.addBack){ $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };} if($("").data("a-b", "a").removeData("a-b").data("a-b")){ $.fn.removeData=(function(removeData){ return function(key){ if(arguments.length){ return removeData.call(this, $.camelCase(key)); }else{ return removeData.call(this); }};})($.fn.removeData); } $.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); $.fn.extend({ focus: (function(orig){ return function(delay, fn){ return typeof delay==="number" ? this.each(function(){ var elem=this; setTimeout(function(){ $(elem).focus(); if(fn){ fn.call(elem); }}, delay); }) : orig.apply(this, arguments); };})($.fn.focus), disableSelection: (function(){ var eventType="onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function(){ return this.bind(eventType + ".ui-disableSelection", function(event){ event.preventDefault(); }); };})(), enableSelection: function(){ return this.unbind(".ui-disableSelection"); }, zIndex: function(zIndex){ if(zIndex!==undefined){ return this.css("zIndex", zIndex); } if(this.length){ var elem=$(this[ 0 ]), position, value; while(elem.length&&elem[ 0 ]!==document){ position=elem.css("position"); if(position==="absolute"||position==="relative"||position==="fixed"){ value=parseInt(elem.css("zIndex"), 10); if(!isNaN(value)&&value!==0){ return value; }} elem=elem.parent(); }} return 0; }}); $.ui.plugin={ add: function(module, option, set){ var i, proto=$.ui[ module ].prototype; for(i in set){ proto.plugins[ i ]=proto.plugins[ i ]||[]; proto.plugins[ i ].push([ option, set[ i ] ]); }}, call: function(instance, name, args, allowDisconnected){ var i, set=instance.plugins[ name ]; if(!set){ return; } if(!allowDisconnected&&(!instance.element[ 0 ].parentNode||instance.element[ 0 ].parentNode.nodeType===11)){ return; } for(i=0; i < set.length; i++){ if(instance.options[ set[ i ][ 0 ] ]){ set[ i ][ 1 ].apply(instance.element, args); }} }}; var widget_uuid=0, widget_slice=Array.prototype.slice; $.cleanData=(function(orig){ return function(elems){ var events, elem, i; for(i=0; (elem=elems[i])!=null; i++){ try { events=$._data(elem, "events"); if(events&&events.remove){ $(elem).triggerHandler("remove"); }} catch(e){}} orig(elems); };})($.cleanData); $.widget=function(name, base, prototype){ var fullName, existingConstructor, constructor, basePrototype, proxiedPrototype={}, namespace=name.split(".")[ 0 ]; name=name.split(".")[ 1 ]; fullName=namespace + "-" + name; if(!prototype){ prototype=base; base=$.Widget; } $.expr[ ":" ][ fullName.toLowerCase() ]=function(elem){ return !!$.data(elem, fullName); }; $[ namespace ]=$[ namespace ]||{}; existingConstructor=$[ namespace ][ name ]; constructor=$[ namespace ][ name ]=function(options, element){ if(!this._createWidget){ return new constructor(options, element); } if(arguments.length){ this._createWidget(options, element); }}; $.extend(constructor, existingConstructor, { version: prototype.version, _proto: $.extend({}, prototype), _childConstructors: [] }); basePrototype=new base(); basePrototype.options=$.widget.extend({}, basePrototype.options); $.each(prototype, function(prop, value){ if(!$.isFunction(value)){ proxiedPrototype[ prop ]=value; return; } proxiedPrototype[ prop ]=(function(){ var _super=function(){ return base.prototype[ prop ].apply(this, arguments); }, _superApply=function(args){ return base.prototype[ prop ].apply(this, args); }; return function(){ var __super=this._super, __superApply=this._superApply, returnValue; this._super=_super; this._superApply=_superApply; returnValue=value.apply(this, arguments); this._super=__super; this._superApply=__superApply; return returnValue; };})(); }); constructor.prototype=$.widget.extend(basePrototype, { widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix||name):name }, proxiedPrototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName }); if(existingConstructor){ $.each(existingConstructor._childConstructors, function(i, child){ var childPrototype=child.prototype; $.widget(childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto); }); delete existingConstructor._childConstructors; }else{ base._childConstructors.push(constructor); } $.widget.bridge(name, constructor); return constructor; }; $.widget.extend=function(target){ var input=widget_slice.call(arguments, 1), inputIndex=0, inputLength=input.length, key, value; for(; inputIndex < inputLength; inputIndex++){ for(key in input[ inputIndex ]){ value=input[ inputIndex ][ key ]; if(input[ inputIndex ].hasOwnProperty(key)&&value!==undefined){ if($.isPlainObject(value)){ target[ key ]=$.isPlainObject(target[ key ]) ? $.widget.extend({}, target[ key ], value) : $.widget.extend({}, value); }else{ target[ key ]=value; }} }} return target; }; $.widget.bridge=function(name, object){ var fullName=object.prototype.widgetFullName||name; $.fn[ name ]=function(options){ var isMethodCall=typeof options==="string", args=widget_slice.call(arguments, 1), returnValue=this; if(isMethodCall){ this.each(function(){ var methodValue, instance=$.data(this, fullName); if(options==="instance"){ returnValue=instance; return false; } if(!instance){ return $.error("cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'"); } if(!$.isFunction(instance[options])||options.charAt(0)==="_"){ return $.error("no such method '" + options + "' for " + name + " widget instance"); } methodValue=instance[ options ].apply(instance, args); if(methodValue!==instance&&methodValue!==undefined){ returnValue=methodValue&&methodValue.jquery ? returnValue.pushStack(methodValue.get()) : methodValue; return false; }}); }else{ if(args.length){ options=$.widget.extend.apply(null, [ options ].concat(args)); } this.each(function(){ var instance=$.data(this, fullName); if(instance){ instance.option(options||{}); if(instance._init){ instance._init(); }}else{ $.data(this, fullName, new object(options, this)); }}); } return returnValue; };}; $.Widget=function(){}; $.Widget._childConstructors=[]; $.Widget.prototype={ widgetName: "widget", widgetEventPrefix: "", defaultElement: "
", options: { disabled: false, create: null }, _createWidget: function(options, element){ element=$(element||this.defaultElement||this)[ 0 ]; this.element=$(element); this.uuid=widget_uuid++; this.eventNamespace="." + this.widgetName + this.uuid; this.bindings=$(); this.hoverable=$(); this.focusable=$(); if(element!==this){ $.data(element, this.widgetFullName, this); this._on(true, this.element, { remove: function(event){ if(event.target===element){ this.destroy(); }} }); this.document=$(element.style ? element.ownerDocument : element.document||element); this.window=$(this.document[0].defaultView||this.document[0].parentWindow); } this.options=$.widget.extend({}, this.options, this._getCreateOptions(), options); this._create(); this._trigger("create", null, this._getCreateEventData()); this._init(); }, _getCreateOptions: $.noop, _getCreateEventData: $.noop, _create: $.noop, _init: $.noop, destroy: function(){ this._destroy(); this.element .unbind(this.eventNamespace) .removeData(this.widgetFullName) .removeData($.camelCase(this.widgetFullName)); this.widget() .unbind(this.eventNamespace) .removeAttr("aria-disabled") .removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"); this.bindings.unbind(this.eventNamespace); this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus"); }, _destroy: $.noop, widget: function(){ return this.element; }, option: function(key, value){ var options=key, parts, curOption, i; if(arguments.length===0){ return $.widget.extend({}, this.options); } if(typeof key==="string"){ options={}; parts=key.split("."); key=parts.shift(); if(parts.length){ curOption=options[ key ]=$.widget.extend({}, this.options[ key ]); for(i=0; i < parts.length - 1; i++){ curOption[ parts[ i ] ]=curOption[ parts[ i ] ]||{}; curOption=curOption[ parts[ i ] ]; } key=parts.pop(); if(arguments.length===1){ return curOption[ key ]===undefined ? null:curOption[ key ]; } curOption[ key ]=value; }else{ if(arguments.length===1){ return this.options[ key ]===undefined ? null:this.options[ key ]; } options[ key ]=value; }} this._setOptions(options); return this; }, _setOptions: function(options){ var key; for(key in options){ this._setOption(key, options[ key ]); } return this; }, _setOption: function(key, value){ this.options[ key ]=value; if(key==="disabled"){ this.widget() .toggleClass(this.widgetFullName + "-disabled", !!value); if(value){ this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus"); }} return this; }, enable: function(){ return this._setOptions({ disabled: false }); }, disable: function(){ return this._setOptions({ disabled: true }); }, _on: function(suppressDisabledCheck, element, handlers){ var delegateElement, instance=this; if(typeof suppressDisabledCheck!=="boolean"){ handlers=element; element=suppressDisabledCheck; suppressDisabledCheck=false; } if(!handlers){ handlers=element; element=this.element; delegateElement=this.widget(); }else{ element=delegateElement=$(element); this.bindings=this.bindings.add(element); } $.each(handlers, function(event, handler){ function handlerProxy(){ if(!suppressDisabledCheck && (instance.options.disabled===true || $(this).hasClass("ui-state-disabled"))){ return; } return(typeof handler==="string" ? instance[ handler ]:handler) .apply(instance, arguments); } if(typeof handler!=="string"){ handlerProxy.guid=handler.guid = handler.guid||handlerProxy.guid||$.guid++; } var match=event.match(/^([\w:-]*)\s*(.*)$/), eventName=match[1] + instance.eventNamespace, selector=match[2]; if(selector){ delegateElement.delegate(selector, eventName, handlerProxy); }else{ element.bind(eventName, handlerProxy); }}); }, _off: function(element, eventName){ eventName=(eventName||"").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; element.unbind(eventName).undelegate(eventName); this.bindings=$(this.bindings.not(element).get()); this.focusable=$(this.focusable.not(element).get()); this.hoverable=$(this.hoverable.not(element).get()); }, _delay: function(handler, delay){ function handlerProxy(){ return(typeof handler==="string" ? instance[ handler ]:handler) .apply(instance, arguments); } var instance=this; return setTimeout(handlerProxy, delay||0); }, _hoverable: function(element){ this.hoverable=this.hoverable.add(element); this._on(element, { mouseenter: function(event){ $(event.currentTarget).addClass("ui-state-hover"); }, mouseleave: function(event){ $(event.currentTarget).removeClass("ui-state-hover"); }}); }, _focusable: function(element){ this.focusable=this.focusable.add(element); this._on(element, { focusin: function(event){ $(event.currentTarget).addClass("ui-state-focus"); }, focusout: function(event){ $(event.currentTarget).removeClass("ui-state-focus"); }}); }, _trigger: function(type, event, data){ var prop, orig, callback=this.options[ type ]; data=data||{}; event=$.Event(event); event.type=(type===this.widgetEventPrefix ? type : this.widgetEventPrefix + type).toLowerCase(); event.target=this.element[ 0 ]; orig=event.originalEvent; if(orig){ for(prop in orig){ if(!(prop in event)){ event[ prop ]=orig[ prop ]; }} } this.element.trigger(event, data); return !($.isFunction(callback) && callback.apply(this.element[0], [ event ].concat(data))===false || event.isDefaultPrevented()); }}; $.each({ show: "fadeIn", hide: "fadeOut" }, function(method, defaultEffect){ $.Widget.prototype[ "_" + method ]=function(element, options, callback){ if(typeof options==="string"){ options={ effect: options };} var hasOptions, effectName = !options ? method : options===true||typeof options==="number" ? defaultEffect : options.effect||defaultEffect; options=options||{}; if(typeof options==="number"){ options={ duration: options };} hasOptions = !$.isEmptyObject(options); options.complete=callback; if(options.delay){ element.delay(options.delay); } if(hasOptions&&$.effects&&$.effects.effect[ effectName ]){ element[ method ](options); }else if(effectName!==method&&element[ effectName ]){ element[ effectName ](options.duration, options.easing, callback); }else{ element.queue(function(next){ $(this)[ method ](); if(callback){ callback.call(element[ 0 ]); } next(); }); }};}); var widget=$.widget; var mouseHandled=false; $(document).mouseup(function(){ mouseHandled=false; }); var mouse=$.widget("ui.mouse", { version: "1.11.4", options: { cancel: "input,textarea,button,select,option", distance: 1, delay: 0 }, _mouseInit: function(){ var that=this; this.element .bind("mousedown." + this.widgetName, function(event){ return that._mouseDown(event); }) .bind("click." + this.widgetName, function(event){ if(true===$.data(event.target, that.widgetName + ".preventClickEvent")){ $.removeData(event.target, that.widgetName + ".preventClickEvent"); event.stopImmediatePropagation(); return false; }}); this.started=false; }, _mouseDestroy: function(){ this.element.unbind("." + this.widgetName); if(this._mouseMoveDelegate){ this.document .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); }}, _mouseDown: function(event){ if(mouseHandled){ return; } this._mouseMoved=false; (this._mouseStarted&&this._mouseUp(event)); this._mouseDownEvent=event; var that=this, btnIsLeft=(event.which===1), elIsCancel=(typeof this.options.cancel==="string"&&event.target.nodeName ? $(event.target).closest(this.options.cancel).length:false); if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){ return true; } this.mouseDelayMet = !this.options.delay; if(!this.mouseDelayMet){ this._mouseDelayTimer=setTimeout(function(){ that.mouseDelayMet=true; }, this.options.delay); } if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){ this._mouseStarted=(this._mouseStart(event)!==false); if(!this._mouseStarted){ event.preventDefault(); return true; }} if(true===$.data(event.target, this.widgetName + ".preventClickEvent")){ $.removeData(event.target, this.widgetName + ".preventClickEvent"); } this._mouseMoveDelegate=function(event){ return that._mouseMove(event); }; this._mouseUpDelegate=function(event){ return that._mouseUp(event); }; this.document .bind("mousemove." + this.widgetName, this._mouseMoveDelegate) .bind("mouseup." + this.widgetName, this._mouseUpDelegate); event.preventDefault(); mouseHandled=true; return true; }, _mouseMove: function(event){ if(this._mouseMoved){ if($.ui.ie&&(!document.documentMode||document.documentMode < 9)&&!event.button){ return this._mouseUp(event); }else if(!event.which){ return this._mouseUp(event); }} if(event.which||event.button){ this._mouseMoved=true; } if(this._mouseStarted){ this._mouseDrag(event); return event.preventDefault(); } if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){ this._mouseStarted = (this._mouseStart(this._mouseDownEvent, event)!==false); (this._mouseStarted ? this._mouseDrag(event):this._mouseUp(event)); } return !this._mouseStarted; }, _mouseUp: function(event){ this.document .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if(this._mouseStarted){ this._mouseStarted=false; if(event.target===this._mouseDownEvent.target){ $.data(event.target, this.widgetName + ".preventClickEvent", true); } this._mouseStop(event); } mouseHandled=false; return false; }, _mouseDistanceMet: function(event){ return (Math.max(Math.abs(this._mouseDownEvent.pageX - event.pageX), Math.abs(this._mouseDownEvent.pageY - event.pageY) ) >=this.options.distance ); }, _mouseDelayMet: function(){ return this.mouseDelayMet; }, _mouseStart: function(){}, _mouseDrag: function(){}, _mouseStop: function(){}, _mouseCapture: function(){ return true; }}); (function(){ $.ui=$.ui||{}; var cachedScrollbarWidth, supportsOffsetFractions, max=Math.max, abs=Math.abs, round=Math.round, rhorizontal=/left|center|right/, rvertical=/top|center|bottom/, roffset=/[\+\-]\d+(\.[\d]+)?%?/, rposition=/^\w+/, rpercent=/%$/, _position=$.fn.position; function getOffsets(offsets, width, height){ return [ parseFloat(offsets[ 0 ]) *(rpercent.test(offsets[ 0 ]) ? width / 100:1), parseFloat(offsets[ 1 ]) *(rpercent.test(offsets[ 1 ]) ? height / 100:1) ]; } function parseCss(element, property){ return parseInt($.css(element, property), 10)||0; } function getDimensions(elem){ var raw=elem[0]; if(raw.nodeType===9){ return { width: elem.width(), height: elem.height(), offset: { top: 0, left: 0 }};} if($.isWindow(raw)){ return { width: elem.width(), height: elem.height(), offset: { top: elem.scrollTop(), left: elem.scrollLeft() }};} if(raw.preventDefault){ return { width: 0, height: 0, offset: { top: raw.pageY, left: raw.pageX }};} return { width: elem.outerWidth(), height: elem.outerHeight(), offset: elem.offset() };} $.position={ scrollbarWidth: function(){ if(cachedScrollbarWidth!==undefined){ return cachedScrollbarWidth; } var w1, w2, div=$("
"), innerDiv=div.children()[0]; $("body").append(div); w1=innerDiv.offsetWidth; div.css("overflow", "scroll"); w2=innerDiv.offsetWidth; if(w1===w2){ w2=div[0].clientWidth; } div.remove(); return (cachedScrollbarWidth=w1 - w2); }, getScrollInfo: function(within){ var overflowX=within.isWindow||within.isDocument ? "" : within.element.css("overflow-x"), overflowY=within.isWindow||within.isDocument ? "" : within.element.css("overflow-y"), hasOverflowX=overflowX==="scroll" || (overflowX==="auto"&&within.width < within.element[0].scrollWidth), hasOverflowY=overflowY==="scroll" || (overflowY==="auto"&&within.height < within.element[0].scrollHeight); return { width: hasOverflowY ? $.position.scrollbarWidth():0, height: hasOverflowX ? $.position.scrollbarWidth():0 };}, getWithinInfo: function(element){ var withinElement=$(element||window), isWindow=$.isWindow(withinElement[0]), isDocument = !!withinElement[ 0 ]&&withinElement[ 0 ].nodeType===9; return { element: withinElement, isWindow: isWindow, isDocument: isDocument, offset: withinElement.offset()||{ left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), width: isWindow||isDocument ? withinElement.width():withinElement.outerWidth(), height: isWindow||isDocument ? withinElement.height():withinElement.outerHeight() };}}; $.fn.position=function(options){ if(!options||!options.of){ return _position.apply(this, arguments); } options=$.extend({}, options); var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, target=$(options.of), within=$.position.getWithinInfo(options.within), scrollInfo=$.position.getScrollInfo(within), collision=(options.collision||"flip").split(" "), offsets={}; dimensions=getDimensions(target); if(target[0].preventDefault){ options.at="left top"; } targetWidth=dimensions.width; targetHeight=dimensions.height; targetOffset=dimensions.offset; basePosition=$.extend({}, targetOffset); $.each([ "my", "at" ], function(){ var pos=(options[ this ]||"").split(" "), horizontalOffset, verticalOffset; if(pos.length===1){ pos=rhorizontal.test(pos[ 0 ]) ? pos.concat([ "center" ]) : rvertical.test(pos[ 0 ]) ? [ "center" ].concat(pos) : [ "center", "center" ]; } pos[ 0 ]=rhorizontal.test(pos[ 0 ]) ? pos[ 0 ]:"center"; pos[ 1 ]=rvertical.test(pos[ 1 ]) ? pos[ 1 ]:"center"; horizontalOffset=roffset.exec(pos[ 0 ]); verticalOffset=roffset.exec(pos[ 1 ]); offsets[ this ]=[ horizontalOffset ? horizontalOffset[ 0 ]:0, verticalOffset ? verticalOffset[ 0 ]:0 ]; options[ this ]=[ rposition.exec(pos[ 0 ])[ 0 ], rposition.exec(pos[ 1 ])[ 0 ] ]; }); if(collision.length===1){ collision[ 1 ]=collision[ 0 ]; } if(options.at[ 0 ]==="right"){ basePosition.left +=targetWidth; }else if(options.at[ 0 ]==="center"){ basePosition.left +=targetWidth / 2; } if(options.at[ 1 ]==="bottom"){ basePosition.top +=targetHeight; }else if(options.at[ 1 ]==="center"){ basePosition.top +=targetHeight / 2; } atOffset=getOffsets(offsets.at, targetWidth, targetHeight); basePosition.left +=atOffset[ 0 ]; basePosition.top +=atOffset[ 1 ]; return this.each(function(){ var collisionPosition, using, elem=$(this), elemWidth=elem.outerWidth(), elemHeight=elem.outerHeight(), marginLeft=parseCss(this, "marginLeft"), marginTop=parseCss(this, "marginTop"), collisionWidth=elemWidth + marginLeft + parseCss(this, "marginRight") + scrollInfo.width, collisionHeight=elemHeight + marginTop + parseCss(this, "marginBottom") + scrollInfo.height, position=$.extend({}, basePosition), myOffset=getOffsets(offsets.my, elem.outerWidth(), elem.outerHeight()); if(options.my[ 0 ]==="right"){ position.left -=elemWidth; }else if(options.my[ 0 ]==="center"){ position.left -=elemWidth / 2; } if(options.my[ 1 ]==="bottom"){ position.top -=elemHeight; }else if(options.my[ 1 ]==="center"){ position.top -=elemHeight / 2; } position.left +=myOffset[ 0 ]; position.top +=myOffset[ 1 ]; if(!supportsOffsetFractions){ position.left=round(position.left); position.top=round(position.top); } collisionPosition={ marginLeft: marginLeft, marginTop: marginTop }; $.each([ "left", "top" ], function(i, dir){ if($.ui.position[ collision[ i ] ]){ $.ui.position[ collision[ i ] ][ dir ](position, { targetWidth: targetWidth, targetHeight: targetHeight, elemWidth: elemWidth, elemHeight: elemHeight, collisionPosition: collisionPosition, collisionWidth: collisionWidth, collisionHeight: collisionHeight, offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], my: options.my, at: options.at, within: within, elem: elem }); }}); if(options.using){ using=function(props){ var left=targetOffset.left - position.left, right=left + targetWidth - elemWidth, top=targetOffset.top - position.top, bottom=top + targetHeight - elemHeight, feedback={ target: { element: target, left: targetOffset.left, top: targetOffset.top, width: targetWidth, height: targetHeight }, element: { element: elem, left: position.left, top: position.top, width: elemWidth, height: elemHeight }, horizontal: right < 0 ? "left":left > 0 ? "right":"center", vertical: bottom < 0 ? "top":top > 0 ? "bottom":"middle" }; if(targetWidth < elemWidth&&abs(left + right) < targetWidth){ feedback.horizontal="center"; } if(targetHeight < elemHeight&&abs(top + bottom) < targetHeight){ feedback.vertical="middle"; } if(max(abs(left), abs(right)) > max(abs(top), abs(bottom))){ feedback.important="horizontal"; }else{ feedback.important="vertical"; } options.using.call(this, props, feedback); };} elem.offset($.extend(position, { using: using })); }); }; $.ui.position={ fit: { left: function(position, data){ var within=data.within, withinOffset=within.isWindow ? within.scrollLeft:within.offset.left, outerWidth=within.width, collisionPosLeft=position.left - data.collisionPosition.marginLeft, overLeft=withinOffset - collisionPosLeft, overRight=collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, newOverRight; if(data.collisionWidth > outerWidth){ if(overLeft > 0&&overRight <=0){ newOverRight=position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; position.left +=overLeft - newOverRight; }else if(overRight > 0&&overLeft <=0){ position.left=withinOffset; }else{ if(overLeft > overRight){ position.left=withinOffset + outerWidth - data.collisionWidth; }else{ position.left=withinOffset; }} }else if(overLeft > 0){ position.left +=overLeft; }else if(overRight > 0){ position.left -=overRight; }else{ position.left=max(position.left - collisionPosLeft, position.left); }}, top: function(position, data){ var within=data.within, withinOffset=within.isWindow ? within.scrollTop:within.offset.top, outerHeight=data.within.height, collisionPosTop=position.top - data.collisionPosition.marginTop, overTop=withinOffset - collisionPosTop, overBottom=collisionPosTop + data.collisionHeight - outerHeight - withinOffset, newOverBottom; if(data.collisionHeight > outerHeight){ if(overTop > 0&&overBottom <=0){ newOverBottom=position.top + overTop + data.collisionHeight - outerHeight - withinOffset; position.top +=overTop - newOverBottom; }else if(overBottom > 0&&overTop <=0){ position.top=withinOffset; }else{ if(overTop > overBottom){ position.top=withinOffset + outerHeight - data.collisionHeight; }else{ position.top=withinOffset; }} }else if(overTop > 0){ position.top +=overTop; }else if(overBottom > 0){ position.top -=overBottom; }else{ position.top=max(position.top - collisionPosTop, position.top); }} }, flip: { left: function(position, data){ var within=data.within, withinOffset=within.offset.left + within.scrollLeft, outerWidth=within.width, offsetLeft=within.isWindow ? within.scrollLeft:within.offset.left, collisionPosLeft=position.left - data.collisionPosition.marginLeft, overLeft=collisionPosLeft - offsetLeft, overRight=collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, myOffset=data.my[ 0 ]==="left" ? -data.elemWidth : data.my[ 0 ]==="right" ? data.elemWidth : 0, atOffset=data.at[ 0 ]==="left" ? data.targetWidth : data.at[ 0 ]==="right" ? -data.targetWidth : 0, offset=-2 * data.offset[ 0 ], newOverRight, newOverLeft; if(overLeft < 0){ newOverRight=position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; if(newOverRight < 0||newOverRight < abs(overLeft)){ position.left +=myOffset + atOffset + offset; }}else if(overRight > 0){ newOverLeft=position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; if(newOverLeft > 0||abs(newOverLeft) < overRight){ position.left +=myOffset + atOffset + offset; }} }, top: function(position, data){ var within=data.within, withinOffset=within.offset.top + within.scrollTop, outerHeight=within.height, offsetTop=within.isWindow ? within.scrollTop:within.offset.top, collisionPosTop=position.top - data.collisionPosition.marginTop, overTop=collisionPosTop - offsetTop, overBottom=collisionPosTop + data.collisionHeight - outerHeight - offsetTop, top=data.my[ 1 ]==="top", myOffset=top ? -data.elemHeight : data.my[ 1 ]==="bottom" ? data.elemHeight : 0, atOffset=data.at[ 1 ]==="top" ? data.targetHeight : data.at[ 1 ]==="bottom" ? -data.targetHeight : 0, offset=-2 * data.offset[ 1 ], newOverTop, newOverBottom; if(overTop < 0){ newOverBottom=position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; if(newOverBottom < 0||newOverBottom < abs(overTop)){ position.top +=myOffset + atOffset + offset; }}else if(overBottom > 0){ newOverTop=position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; if(newOverTop > 0||abs(newOverTop) < overBottom){ position.top +=myOffset + atOffset + offset; }} }}, flipfit: { left: function(){ $.ui.position.flip.left.apply(this, arguments); $.ui.position.fit.left.apply(this, arguments); }, top: function(){ $.ui.position.flip.top.apply(this, arguments); $.ui.position.fit.top.apply(this, arguments); }} }; (function(){ var testElement, testElementParent, testElementStyle, offsetLeft, i, body=document.getElementsByTagName("body")[ 0 ], div=document.createElement("div"); testElement=document.createElement(body ? "div":"body"); testElementStyle={ visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }; if(body){ $.extend(testElementStyle, { position: "absolute", left: "-1000px", top: "-1000px" }); } for(i in testElementStyle){ testElement.style[ i ]=testElementStyle[ i ]; } testElement.appendChild(div); testElementParent=body||document.documentElement; testElementParent.insertBefore(testElement, testElementParent.firstChild); div.style.cssText="position: absolute; left: 10.7432222px;"; offsetLeft=$(div).offset().left; supportsOffsetFractions=offsetLeft > 10&&offsetLeft < 11; testElement.innerHTML=""; testElementParent.removeChild(testElement); })(); })(); var position=$.ui.position; var accordion=$.widget("ui.accordion", { version: "1.11.4", options: { active: 0, animate: {}, collapsible: false, event: "click", header: "> li > :first-child,> :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function(){ var options=this.options; this.prevShow=this.prevHide=$(); this.element.addClass("ui-accordion ui-widget ui-helper-reset") .attr("role", "tablist"); if(!options.collapsible&&(options.active===false||options.active==null)){ options.active=0; } this._processPanels(); if(options.active < 0){ options.active +=this.headers.length; } this._refresh(); }, _getCreateEventData: function(){ return { header: this.active, panel: !this.active.length ? $():this.active.next() };}, _createIcons: function(){ var icons=this.options.icons; if(icons){ $("") .addClass("ui-accordion-header-icon ui-icon " + icons.header) .prependTo(this.headers); this.active.children(".ui-accordion-header-icon") .removeClass(icons.header) .addClass(icons.activeHeader); this.headers.addClass("ui-accordion-icons"); }}, _destroyIcons: function(){ this.headers .removeClass("ui-accordion-icons") .children(".ui-accordion-header-icon") .remove(); }, _destroy: function(){ var contents; this.element .removeClass("ui-accordion ui-widget ui-helper-reset") .removeAttr("role"); this.headers .removeClass("ui-accordion-header ui-accordion-header-active ui-state-default " + "ui-corner-all ui-state-active ui-state-disabled ui-corner-top") .removeAttr("role") .removeAttr("aria-expanded") .removeAttr("aria-selected") .removeAttr("aria-controls") .removeAttr("tabIndex") .removeUniqueId(); this._destroyIcons(); contents=this.headers.next() .removeClass("ui-helper-reset ui-widget-content ui-corner-bottom " + "ui-accordion-content ui-accordion-content-active ui-state-disabled") .css("display", "") .removeAttr("role") .removeAttr("aria-hidden") .removeAttr("aria-labelledby") .removeUniqueId(); if(this.options.heightStyle!=="content"){ contents.css("height", ""); }}, _setOption: function(key, value){ if(key==="active"){ this._activate(value); return; } if(key==="event"){ if(this.options.event){ this._off(this.headers, this.options.event); } this._setupEvents(value); } this._super(key, value); if(key==="collapsible"&&!value&&this.options.active===false){ this._activate(0); } if(key==="icons"){ this._destroyIcons(); if(value){ this._createIcons(); }} if(key==="disabled"){ this.element .toggleClass("ui-state-disabled", !!value) .attr("aria-disabled", value); this.headers.add(this.headers.next()) .toggleClass("ui-state-disabled", !!value); }}, _keydown: function(event){ if(event.altKey||event.ctrlKey){ return; } var keyCode=$.ui.keyCode, length=this.headers.length, currentIndex=this.headers.index(event.target), toFocus=false; switch(event.keyCode){ case keyCode.RIGHT: case keyCode.DOWN: toFocus=this.headers[(currentIndex + 1) % length ]; break; case keyCode.LEFT: case keyCode.UP: toFocus=this.headers[(currentIndex - 1 + length) % length ]; break; case keyCode.SPACE: case keyCode.ENTER: this._eventHandler(event); break; case keyCode.HOME: toFocus=this.headers[ 0 ]; break; case keyCode.END: toFocus=this.headers[ length - 1 ]; break; } if(toFocus){ $(event.target).attr("tabIndex", -1); $(toFocus).attr("tabIndex", 0); toFocus.focus(); event.preventDefault(); }}, _panelKeyDown: function(event){ if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){ $(event.currentTarget).prev().focus(); }}, refresh: function(){ var options=this.options; this._processPanels(); if(( options.active===false&&options.collapsible===true)||!this.headers.length){ options.active=false; this.active=$(); }else if(options.active===false){ this._activate(0); }else if(this.active.length&&!$.contains(this.element[ 0 ], this.active[ 0 ])){ if(this.headers.length===this.headers.find(".ui-state-disabled").length){ options.active=false; this.active=$(); }else{ this._activate(Math.max(0, options.active - 1)); }}else{ options.active=this.headers.index(this.active); } this._destroyIcons(); this._refresh(); }, _processPanels: function(){ var prevHeaders=this.headers, prevPanels=this.panels; this.headers=this.element.find(this.options.header) .addClass("ui-accordion-header ui-state-default ui-corner-all"); this.panels=this.headers.next() .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom") .filter(":not(.ui-accordion-content-active)") .hide(); if(prevPanels){ this._off(prevHeaders.not(this.headers)); this._off(prevPanels.not(this.panels)); }}, _refresh: function(){ var maxHeight, options=this.options, heightStyle=options.heightStyle, parent=this.element.parent(); this.active=this._findActive(options.active) .addClass("ui-accordion-header-active ui-state-active ui-corner-top") .removeClass("ui-corner-all"); this.active.next() .addClass("ui-accordion-content-active") .show(); this.headers .attr("role", "tab") .each(function(){ var header=$(this), headerId=header.uniqueId().attr("id"), panel=header.next(), panelId=panel.uniqueId().attr("id"); header.attr("aria-controls", panelId); panel.attr("aria-labelledby", headerId); }) .next() .attr("role", "tabpanel"); this.headers .not(this.active) .attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }) .next() .attr({ "aria-hidden": "true" }) .hide(); if(!this.active.length){ this.headers.eq(0).attr("tabIndex", 0); }else{ this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) .next() .attr({ "aria-hidden": "false" }); } this._createIcons(); this._setupEvents(options.event); if(heightStyle==="fill"){ maxHeight=parent.height(); this.element.siblings(":visible").each(function(){ var elem=$(this), position=elem.css("position"); if(position==="absolute"||position==="fixed"){ return; } maxHeight -=elem.outerHeight(true); }); this.headers.each(function(){ maxHeight -=$(this).outerHeight(true); }); this.headers.next() .each(function(){ $(this).height(Math.max(0, maxHeight - $(this).innerHeight() + $(this).height())); }) .css("overflow", "auto"); }else if(heightStyle==="auto"){ maxHeight=0; this.headers.next() .each(function(){ maxHeight=Math.max(maxHeight, $(this).css("height", "").height()); }) .height(maxHeight); }}, _activate: function(index){ var active=this._findActive(index)[ 0 ]; if(active===this.active[ 0 ]){ return; } active=active||this.active[ 0 ]; this._eventHandler({ target: active, currentTarget: active, preventDefault: $.noop }); }, _findActive: function(selector){ return typeof selector==="number" ? this.headers.eq(selector):$(); }, _setupEvents: function(event){ var events={ keydown: "_keydown" }; if(event){ $.each(event.split(" "), function(index, eventName){ events[ eventName ]="_eventHandler"; }); } this._off(this.headers.add(this.headers.next())); this._on(this.headers, events); this._on(this.headers.next(), { keydown: "_panelKeyDown" }); this._hoverable(this.headers); this._focusable(this.headers); }, _eventHandler: function(event){ var options=this.options, active=this.active, clicked=$(event.currentTarget), clickedIsActive=clicked[ 0 ]===active[ 0 ], collapsing=clickedIsActive&&options.collapsible, toShow=collapsing ? $():clicked.next(), toHide=active.next(), eventData={ oldHeader: active, oldPanel: toHide, newHeader: collapsing ? $():clicked, newPanel: toShow }; event.preventDefault(); if((clickedIsActive&&!options.collapsible) || (this._trigger("beforeActivate", event, eventData)===false)){ return; } options.active=collapsing ? false:this.headers.index(clicked); this.active=clickedIsActive ? $():clicked; this._toggle(eventData); active.removeClass("ui-accordion-header-active ui-state-active"); if(options.icons){ active.children(".ui-accordion-header-icon") .removeClass(options.icons.activeHeader) .addClass(options.icons.header); } if(!clickedIsActive){ clicked .removeClass("ui-corner-all") .addClass("ui-accordion-header-active ui-state-active ui-corner-top"); if(options.icons){ clicked.children(".ui-accordion-header-icon") .removeClass(options.icons.header) .addClass(options.icons.activeHeader); } clicked .next() .addClass("ui-accordion-content-active"); }}, _toggle: function(data){ var toShow=data.newPanel, toHide=this.prevShow.length ? this.prevShow:data.oldPanel; this.prevShow.add(this.prevHide).stop(true, true); this.prevShow=toShow; this.prevHide=toHide; if(this.options.animate){ this._animate(toShow, toHide, data); }else{ toHide.hide(); toShow.show(); this._toggleComplete(data); } toHide.attr({ "aria-hidden": "true" }); toHide.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }); if(toShow.length&&toHide.length){ toHide.prev().attr({ "tabIndex": -1, "aria-expanded": "false" }); }else if(toShow.length){ this.headers.filter(function(){ return parseInt($(this).attr("tabIndex"), 10)===0; }) .attr("tabIndex", -1); } toShow .attr("aria-hidden", "false") .prev() .attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); }, _animate: function(toShow, toHide, data){ var total, easing, duration, that=this, adjust=0, boxSizing=toShow.css("box-sizing"), down=toShow.length && (!toHide.length||(toShow.index() < toHide.index())), animate=this.options.animate||{}, options=down&&animate.down||animate, complete=function(){ that._toggleComplete(data); }; if(typeof options==="number"){ duration=options; } if(typeof options==="string"){ easing=options; } easing=easing||options.easing||animate.easing; duration=duration||options.duration||animate.duration; if(!toHide.length){ return toShow.animate(this.showProps, duration, easing, complete); } if(!toShow.length){ return toHide.animate(this.hideProps, duration, easing, complete); } total=toShow.show().outerHeight(); toHide.animate(this.hideProps, { duration: duration, easing: easing, step: function(now, fx){ fx.now=Math.round(now); }}); toShow .hide() .animate(this.showProps, { duration: duration, easing: easing, complete: complete, step: function(now, fx){ fx.now=Math.round(now); if(fx.prop!=="height"){ if(boxSizing==="content-box"){ adjust +=fx.now; }}else if(that.options.heightStyle!=="content"){ fx.now=Math.round(total - toHide.outerHeight() - adjust); adjust=0; }} }); }, _toggleComplete: function(data){ var toHide=data.oldPanel; toHide .removeClass("ui-accordion-content-active") .prev() .removeClass("ui-corner-top") .addClass("ui-corner-all"); if(toHide.length){ toHide.parent()[ 0 ].className=toHide.parent()[ 0 ].className; } this._trigger("activate", null, data); }}); var menu=$.widget("ui.menu", { version: "1.11.4", defaultElement: "
" + ""; thead=(showWeek ? "":""); for (dow=0; dow < 7; dow++){ day=(dow + firstDay) % 7; thead +=""; } calender +=thead + ""; daysInMonth=this._getDaysInMonth(drawYear, drawMonth); if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){ inst.selectedDay=Math.min(inst.selectedDay, daysInMonth); } leadDays=(this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; curRows=Math.ceil((leadDays + daysInMonth) / 7); numRows=(isMultiMonth ? this.maxRows > curRows ? this.maxRows:curRows:curRows); this.maxRows=numRows; printDate=this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); for (dRow=0; dRow < numRows; dRow++){ calender +=""; tbody=(!showWeek ? "":""); for (dow=0; dow < 7; dow++){ daySettings=(beforeShowDay ? beforeShowDay.apply((inst.input ? inst.input[0]:null), [printDate]):[true, ""]); otherMonth=(printDate.getMonth()!==drawMonth); unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0] || (minDate&&printDate < minDate)||(maxDate&&printDate > maxDate); tbody +=""; printDate.setDate(printDate.getDate() + 1); printDate=this._daylightSavingAdjust(printDate); } calender +=tbody + ""; } drawMonth++; if(drawMonth > 11){ drawMonth=0; drawYear++; } calender +="
" + this._get(inst, "weekHeader") + "=5 ? " class='ui-datepicker-week-end'":"") + ">" + "" + dayNamesMin[day] + "
" + this._get(inst, "calculateWeek")(printDate) + "" + (otherMonth&&!showOtherMonths ? " " : (unselectable ? "" + printDate.getDate() + "":"" + printDate.getDate() + "")) + "
" + (isMultiMonth ? "" + ((numMonths[0] > 0&&col===numMonths[1]-1) ? "
":""):""); group +=calender; } html +=group; } html +=buttonPanel; inst._keyEvent=false; return html; }, _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, secondary, monthNames, monthNamesShort){ var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, changeMonth=this._get(inst, "changeMonth"), changeYear=this._get(inst, "changeYear"), showMonthAfterYear=this._get(inst, "showMonthAfterYear"), html="
", monthHtml=""; if(secondary||!changeMonth){ monthHtml +="" + monthNames[drawMonth] + ""; }else{ inMinYear=(minDate&&minDate.getFullYear()===drawYear); inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear); monthHtml +=""; } if(!showMonthAfterYear){ html +=monthHtml + (secondary||!(changeMonth&&changeYear) ? " ":""); } if(!inst.yearshtml){ inst.yearshtml=""; if(secondary||!changeYear){ html +="" + drawYear + ""; }else{ years=this._get(inst, "yearRange").split(":"); thisYear=new Date().getFullYear(); determineYear=function(value){ var year=(value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : parseInt(value, 10))); return (isNaN(year) ? thisYear:year); }; year=determineYear(years[0]); endYear=Math.max(year, determineYear(years[1]||"")); year=(minDate ? Math.max(year, minDate.getFullYear()):year); endYear=(maxDate ? Math.min(endYear, maxDate.getFullYear()):endYear); inst.yearshtml +=""; html +=inst.yearshtml; inst.yearshtml=null; }} html +=this._get(inst, "yearSuffix"); if(showMonthAfterYear){ html +=(secondary||!(changeMonth&&changeYear) ? " ":"") + monthHtml; } html +="
"; return html; }, _adjustInstDate: function(inst, offset, period){ var year=inst.drawYear + (period==="Y" ? offset:0), month=inst.drawMonth + (period==="M" ? offset:0), day=Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period==="D" ? offset:0), date=this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); inst.selectedDay=date.getDate(); inst.drawMonth=inst.selectedMonth=date.getMonth(); inst.drawYear=inst.selectedYear=date.getFullYear(); if(period==="M"||period==="Y"){ this._notifyChange(inst); }}, _restrictMinMax: function(inst, date){ var minDate=this._getMinMaxDate(inst, "min"), maxDate=this._getMinMaxDate(inst, "max"), newDate=(minDate&&date < minDate ? minDate:date); return (maxDate&&newDate > maxDate ? maxDate:newDate); }, _notifyChange: function(inst){ var onChange=this._get(inst, "onChangeMonthYear"); if(onChange){ onChange.apply((inst.input ? inst.input[0]:null), [inst.selectedYear, inst.selectedMonth + 1, inst]); }}, _getNumberOfMonths: function(inst){ var numMonths=this._get(inst, "numberOfMonths"); return (numMonths==null ? [1, 1]:(typeof numMonths==="number" ? [1, numMonths]:numMonths)); }, _getMinMaxDate: function(inst, minMax){ return this._determineDate(inst, this._get(inst, minMax + "Date"), null); }, _getDaysInMonth: function(year, month){ return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); }, _getFirstDayOfMonth: function(year, month){ return new Date(year, month, 1).getDay(); }, _canAdjustMonth: function(inst, offset, curYear, curMonth){ var numMonths=this._getNumberOfMonths(inst), date=this._daylightSavingAdjust(new Date(curYear, curMonth + (offset < 0 ? offset:numMonths[0] * numMonths[1]), 1)); if(offset < 0){ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); } return this._isInRange(inst, date); }, _isInRange: function(inst, date){ var yearSplit, currentYear, minDate=this._getMinMaxDate(inst, "min"), maxDate=this._getMinMaxDate(inst, "max"), minYear=null, maxYear=null, years=this._get(inst, "yearRange"); if(years){ yearSplit=years.split(":"); currentYear=new Date().getFullYear(); minYear=parseInt(yearSplit[0], 10); maxYear=parseInt(yearSplit[1], 10); if(yearSplit[0].match(/[+\-].*/)){ minYear +=currentYear; } if(yearSplit[1].match(/[+\-].*/)){ maxYear +=currentYear; }} return ((!minDate||date.getTime() >=minDate.getTime()) && (!maxDate||date.getTime() <=maxDate.getTime()) && (!minYear||date.getFullYear() >=minYear) && (!maxYear||date.getFullYear() <=maxYear)); }, _getFormatConfig: function(inst){ var shortYearCutoff=this._get(inst, "shortYearCutoff"); shortYearCutoff=(typeof shortYearCutoff!=="string" ? shortYearCutoff : new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); return {shortYearCutoff: shortYearCutoff, dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};}, _formatDate: function(inst, day, month, year){ if(!day){ inst.currentDay=inst.selectedDay; inst.currentMonth=inst.selectedMonth; inst.currentYear=inst.selectedYear; } var date=(day ? (typeof day==="object" ? day : this._daylightSavingAdjust(new Date(year, month, day))) : this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); }}); function datepicker_bindHover(dpDiv){ var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return dpDiv.delegate(selector, "mouseout", function(){ $(this).removeClass("ui-state-hover"); if(this.className.indexOf("ui-datepicker-prev")!==-1){ $(this).removeClass("ui-datepicker-prev-hover"); } if(this.className.indexOf("ui-datepicker-next")!==-1){ $(this).removeClass("ui-datepicker-next-hover"); }}) .delegate(selector, "mouseover", datepicker_handleMouseover); } function datepicker_handleMouseover(){ if(!$.datepicker._isDisabledDatepicker(datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])){ $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); $(this).addClass("ui-state-hover"); if(this.className.indexOf("ui-datepicker-prev")!==-1){ $(this).addClass("ui-datepicker-prev-hover"); } if(this.className.indexOf("ui-datepicker-next")!==-1){ $(this).addClass("ui-datepicker-next-hover"); }} } function datepicker_extendRemove(target, props){ $.extend(target, props); for (var name in props){ if(props[name]==null){ target[name]=props[name]; }} return target; } $.fn.datepicker=function(options){ if(!this.length){ return this; } if(!$.datepicker.initialized){ $(document).mousedown($.datepicker._checkExternalClick); $.datepicker.initialized=true; } if($("#"+$.datepicker._mainDivId).length===0){ $("body").append($.datepicker.dpDiv); } var otherArgs=Array.prototype.slice.call(arguments, 1); if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){ return $.datepicker["_" + options + "Datepicker"]. apply($.datepicker, [this[0]].concat(otherArgs)); } if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){ return $.datepicker["_" + options + "Datepicker"]. apply($.datepicker, [this[0]].concat(otherArgs)); } return this.each(function(){ typeof options==="string" ? $.datepicker["_" + options + "Datepicker"]. apply($.datepicker, [this].concat(otherArgs)) : $.datepicker._attachDatepicker(this, options); }); }; $.datepicker=new Datepicker(); $.datepicker.initialized=false; $.datepicker.uuid=new Date().getTime(); $.datepicker.version="1.11.4"; var datepicker=$.datepicker; $.widget("ui.draggable", $.ui.mouse, { version: "1.11.4", widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false, drag: null, start: null, stop: null }, _create: function(){ if(this.options.helper==="original"){ this._setPositionRelative(); } if(this.options.addClasses){ this.element.addClass("ui-draggable"); } if(this.options.disabled){ this.element.addClass("ui-draggable-disabled"); } this._setHandleClassName(); this._mouseInit(); }, _setOption: function(key, value){ this._super(key, value); if(key==="handle"){ this._removeHandleClassName(); this._setHandleClassName(); }}, _destroy: function(){ if(( this.helper||this.element).is(".ui-draggable-dragging")){ this.destroyOnClear=true; return; } this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"); this._removeHandleClassName(); this._mouseDestroy(); }, _mouseCapture: function(event){ var o=this.options; this._blurActiveElement(event); if(this.helper||o.disabled||$(event.target).closest(".ui-resizable-handle").length > 0){ return false; } this.handle=this._getHandle(event); if(!this.handle){ return false; } this._blockFrames(o.iframeFix===true ? "iframe":o.iframeFix); return true; }, _blockFrames: function(selector){ this.iframeBlocks=this.document.find(selector).map(function(){ var iframe=$(this); return $("
") .css("position", "absolute") .appendTo(iframe.parent()) .outerWidth(iframe.outerWidth()) .outerHeight(iframe.outerHeight()) .offset(iframe.offset())[ 0 ]; }); }, _unblockFrames: function(){ if(this.iframeBlocks){ this.iframeBlocks.remove(); delete this.iframeBlocks; }}, _blurActiveElement: function(event){ var document=this.document[ 0 ]; if(!this.handleElement.is(event.target)){ return; } try { if(document.activeElement&&document.activeElement.nodeName.toLowerCase()!=="body"){ $(document.activeElement).blur(); }} catch(error){}}, _mouseStart: function(event){ var o=this.options; this.helper=this._createHelper(event); this.helper.addClass("ui-draggable-dragging"); this._cacheHelperProportions(); if($.ui.ddmanager){ $.ui.ddmanager.current=this; } this._cacheMargins(); this.cssPosition=this.helper.css("position"); this.scrollParent=this.helper.scrollParent(true); this.offsetParent=this.helper.offsetParent(); this.hasFixedAncestor=this.helper.parents().filter(function(){ return $(this).css("position")==="fixed"; }).length > 0; this.positionAbs=this.element.offset(); this._refreshOffsets(event); this.originalPosition=this.position=this._generatePosition(event, false); this.originalPageX=event.pageX; this.originalPageY=event.pageY; (o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt)); this._setContainment(); if(this._trigger("start", event)===false){ this._clear(); return false; } this._cacheHelperProportions(); if($.ui.ddmanager&&!o.dropBehaviour){ $.ui.ddmanager.prepareOffsets(this, event); } this._normalizeRightBottom(); this._mouseDrag(event, true); if($.ui.ddmanager){ $.ui.ddmanager.dragStart(this, event); } return true; }, _refreshOffsets: function(event){ this.offset={ top: this.positionAbs.top - this.margins.top, left: this.positionAbs.left - this.margins.left, scroll: false, parent: this._getParentOffset(), relative: this._getRelativeOffset() }; this.offset.click={ left: event.pageX - this.offset.left, top: event.pageY - this.offset.top };}, _mouseDrag: function(event, noPropagation){ if(this.hasFixedAncestor){ this.offset.parent=this._getParentOffset(); } this.position=this._generatePosition(event, true); this.positionAbs=this._convertPositionTo("absolute"); if(!noPropagation){ var ui=this._uiHash(); if(this._trigger("drag", event, ui)===false){ this._mouseUp({}); return false; } this.position=ui.position; } this.helper[ 0 ].style.left=this.position.left + "px"; this.helper[ 0 ].style.top=this.position.top + "px"; if($.ui.ddmanager){ $.ui.ddmanager.drag(this, event); } return false; }, _mouseStop: function(event){ var that=this, dropped=false; if($.ui.ddmanager&&!this.options.dropBehaviour){ dropped=$.ui.ddmanager.drop(this, event); } if(this.dropped){ dropped=this.dropped; this.dropped=false; } if((this.options.revert==="invalid"&&!dropped)||(this.options.revert==="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element, dropped))){ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function(){ if(that._trigger("stop", event)!==false){ that._clear(); }}); }else{ if(this._trigger("stop", event)!==false){ this._clear(); }} return false; }, _mouseUp: function(event){ this._unblockFrames(); if($.ui.ddmanager){ $.ui.ddmanager.dragStop(this, event); } if(this.handleElement.is(event.target)){ this.element.focus(); } return $.ui.mouse.prototype._mouseUp.call(this, event); }, cancel: function(){ if(this.helper.is(".ui-draggable-dragging")){ this._mouseUp({}); }else{ this._clear(); } return this; }, _getHandle: function(event){ return this.options.handle ? !!$(event.target).closest(this.element.find(this.options.handle)).length : true; }, _setHandleClassName: function(){ this.handleElement=this.options.handle ? this.element.find(this.options.handle):this.element; this.handleElement.addClass("ui-draggable-handle"); }, _removeHandleClassName: function(){ this.handleElement.removeClass("ui-draggable-handle"); }, _createHelper: function(event){ var o=this.options, helperIsFunction=$.isFunction(o.helper), helper=helperIsFunction ? $(o.helper.apply(this.element[ 0 ], [ event ])) : (o.helper==="clone" ? this.element.clone().removeAttr("id") : this.element); if(!helper.parents("body").length){ helper.appendTo((o.appendTo==="parent" ? this.element[0].parentNode:o.appendTo)); } if(helperIsFunction&&helper[ 0 ]===this.element[ 0 ]){ this._setPositionRelative(); } if(helper[0]!==this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){ helper.css("position", "absolute"); } return helper; }, _setPositionRelative: function(){ if(!(/^(?:r|a|f)/).test(this.element.css("position"))){ this.element[ 0 ].style.position="relative"; }}, _adjustOffsetFromHelper: function(obj){ if(typeof obj==="string"){ obj=obj.split(" "); } if($.isArray(obj)){ obj={ left: +obj[0], top: +obj[1]||0 };} if("left" in obj){ this.offset.click.left=obj.left + this.margins.left; } if("right" in obj){ this.offset.click.left=this.helperProportions.width - obj.right + this.margins.left; } if("top" in obj){ this.offset.click.top=obj.top + this.margins.top; } if("bottom" in obj){ this.offset.click.top=this.helperProportions.height - obj.bottom + this.margins.top; }}, _isRootNode: function(element){ return(/(html|body)/i).test(element.tagName)||element===this.document[ 0 ]; }, _getParentOffset: function(){ var po=this.offsetParent.offset(), document=this.document[ 0 ]; if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0], this.offsetParent[0])){ po.left +=this.scrollParent.scrollLeft(); po.top +=this.scrollParent.scrollTop(); } if(this._isRootNode(this.offsetParent[ 0 ])){ po={ top: 0, left: 0 };} return { top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10)||0), left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10)||0) };}, _getRelativeOffset: function(){ if(this.cssPosition!=="relative"){ return { top: 0, left: 0 };} var p=this.element.position(), scrollIsRootNode=this._isRootNode(this.scrollParent[ 0 ]); return { top: p.top -(parseInt(this.helper.css("top"), 10)||0) +(!scrollIsRootNode ? this.scrollParent.scrollTop():0), left: p.left -(parseInt(this.helper.css("left"), 10)||0) +(!scrollIsRootNode ? this.scrollParent.scrollLeft():0) };}, _cacheMargins: function(){ this.margins={ left: (parseInt(this.element.css("marginLeft"), 10)||0), top: (parseInt(this.element.css("marginTop"), 10)||0), right: (parseInt(this.element.css("marginRight"), 10)||0), bottom: (parseInt(this.element.css("marginBottom"), 10)||0) };}, _cacheHelperProportions: function(){ this.helperProportions={ width: this.helper.outerWidth(), height: this.helper.outerHeight() };}, _setContainment: function(){ var isUserScrollable, c, ce, o=this.options, document=this.document[ 0 ]; this.relativeContainer=null; if(!o.containment){ this.containment=null; return; } if(o.containment==="window"){ this.containment=[ $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, $(window).scrollLeft() + $(window).width() - this.helperProportions.width - this.margins.left, $(window).scrollTop() +($(window).height()||document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top ]; return; } if(o.containment==="document"){ this.containment=[ 0, 0, $(document).width() - this.helperProportions.width - this.margins.left, ($(document).height()||document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top ]; return; } if(o.containment.constructor===Array){ this.containment=o.containment; return; } if(o.containment==="parent"){ o.containment=this.helper[ 0 ].parentNode; } c=$(o.containment); ce=c[ 0 ]; if(!ce){ return; } isUserScrollable=/(scroll|auto)/.test(c.css("overflow")); this.containment=[ (parseInt(c.css("borderLeftWidth"), 10)||0) +(parseInt(c.css("paddingLeft"), 10)||0), (parseInt(c.css("borderTopWidth"), 10)||0) +(parseInt(c.css("paddingTop"), 10)||0), (isUserScrollable ? Math.max(ce.scrollWidth, ce.offsetWidth):ce.offsetWidth) - (parseInt(c.css("borderRightWidth"), 10)||0) - (parseInt(c.css("paddingRight"), 10)||0) - this.helperProportions.width - this.margins.left - this.margins.right, (isUserScrollable ? Math.max(ce.scrollHeight, ce.offsetHeight):ce.offsetHeight) - (parseInt(c.css("borderBottomWidth"), 10)||0) - (parseInt(c.css("paddingBottom"), 10)||0) - this.helperProportions.height - this.margins.top - this.margins.bottom ]; this.relativeContainer=c; }, _convertPositionTo: function(d, pos){ if(!pos){ pos=this.position; } var mod=d==="absolute" ? 1:-1, scrollIsRootNode=this._isRootNode(this.scrollParent[ 0 ]); return { top: ( pos.top + this.offset.relative.top * mod + this.offset.parent.top * mod - (( this.cssPosition==="fixed" ? -this.offset.scroll.top:(scrollIsRootNode ? 0:this.offset.scroll.top)) * mod) ), left: ( pos.left + this.offset.relative.left * mod + this.offset.parent.left * mod - (( this.cssPosition==="fixed" ? -this.offset.scroll.left:(scrollIsRootNode ? 0:this.offset.scroll.left)) * mod) ) };}, _generatePosition: function(event, constrainPosition){ var containment, co, top, left, o=this.options, scrollIsRootNode=this._isRootNode(this.scrollParent[ 0 ]), pageX=event.pageX, pageY=event.pageY; if(!scrollIsRootNode||!this.offset.scroll){ this.offset.scroll={ top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() };} if(constrainPosition){ if(this.containment){ if(this.relativeContainer){ co=this.relativeContainer.offset(); containment=[ this.containment[ 0 ] + co.left, this.containment[ 1 ] + co.top, this.containment[ 2 ] + co.left, this.containment[ 3 ] + co.top ]; }else{ containment=this.containment; } if(event.pageX - this.offset.click.left < containment[0]){ pageX=containment[0] + this.offset.click.left; } if(event.pageY - this.offset.click.top < containment[1]){ pageY=containment[1] + this.offset.click.top; } if(event.pageX - this.offset.click.left > containment[2]){ pageX=containment[2] + this.offset.click.left; } if(event.pageY - this.offset.click.top > containment[3]){ pageY=containment[3] + this.offset.click.top; }} if(o.grid){ top=o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]:this.originalPageY; pageY=containment ? ((top - this.offset.click.top >=containment[1]||top - this.offset.click.top > containment[3]) ? top:((top - this.offset.click.top >=containment[1]) ? top - o.grid[1]:top + o.grid[1])):top; left=o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]:this.originalPageX; pageX=containment ? ((left - this.offset.click.left >=containment[0]||left - this.offset.click.left > containment[2]) ? left:((left - this.offset.click.left >=containment[0]) ? left - o.grid[0]:left + o.grid[0])):left; } if(o.axis==="y"){ pageX=this.originalPageX; } if(o.axis==="x"){ pageY=this.originalPageY; }} return { top: ( pageY - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition==="fixed" ? -this.offset.scroll.top:(scrollIsRootNode ? 0:this.offset.scroll.top)) ), left: ( pageX - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition==="fixed" ? -this.offset.scroll.left:(scrollIsRootNode ? 0:this.offset.scroll.left)) ) };}, _clear: function(){ this.helper.removeClass("ui-draggable-dragging"); if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){ this.helper.remove(); } this.helper=null; this.cancelHelperRemoval=false; if(this.destroyOnClear){ this.destroy(); }}, _normalizeRightBottom: function(){ if(this.options.axis!=="y"&&this.helper.css("right")!=="auto"){ this.helper.width(this.helper.width()); this.helper.css("right", "auto"); } if(this.options.axis!=="x"&&this.helper.css("bottom")!=="auto"){ this.helper.height(this.helper.height()); this.helper.css("bottom", "auto"); }}, _trigger: function(type, event, ui){ ui=ui||this._uiHash(); $.ui.plugin.call(this, type, [ event, ui, this ], true); if(/^(drag|start|stop)/.test(type)){ this.positionAbs=this._convertPositionTo("absolute"); ui.offset=this.positionAbs; } return $.Widget.prototype._trigger.call(this, type, event, ui); }, plugins: {}, _uiHash: function(){ return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs };}}); $.ui.plugin.add("draggable", "connectToSortable", { start: function(event, ui, draggable){ var uiSortable=$.extend({}, ui, { item: draggable.element }); draggable.sortables=[]; $(draggable.options.connectToSortable).each(function(){ var sortable=$(this).sortable("instance"); if(sortable&&!sortable.options.disabled){ draggable.sortables.push(sortable); sortable.refreshPositions(); sortable._trigger("activate", event, uiSortable); }}); }, stop: function(event, ui, draggable){ var uiSortable=$.extend({}, ui, { item: draggable.element }); draggable.cancelHelperRemoval=false; $.each(draggable.sortables, function(){ var sortable=this; if(sortable.isOver){ sortable.isOver=0; draggable.cancelHelperRemoval=true; sortable.cancelHelperRemoval=false; sortable._storedCSS={ position: sortable.placeholder.css("position"), top: sortable.placeholder.css("top"), left: sortable.placeholder.css("left") }; sortable._mouseStop(event); sortable.options.helper=sortable.options._helper; }else{ sortable.cancelHelperRemoval=true; sortable._trigger("deactivate", event, uiSortable); }}); }, drag: function(event, ui, draggable){ $.each(draggable.sortables, function(){ var innermostIntersecting=false, sortable=this; sortable.positionAbs=draggable.positionAbs; sortable.helperProportions=draggable.helperProportions; sortable.offset.click=draggable.offset.click; if(sortable._intersectsWith(sortable.containerCache)){ innermostIntersecting=true; $.each(draggable.sortables, function(){ this.positionAbs=draggable.positionAbs; this.helperProportions=draggable.helperProportions; this.offset.click=draggable.offset.click; if(this!==sortable && this._intersectsWith(this.containerCache) && $.contains(sortable.element[ 0 ], this.element[ 0 ])){ innermostIntersecting=false; } return innermostIntersecting; }); } if(innermostIntersecting){ if(!sortable.isOver){ sortable.isOver=1; draggable._parent=ui.helper.parent(); sortable.currentItem=ui.helper .appendTo(sortable.element) .data("ui-sortable-item", true); sortable.options._helper=sortable.options.helper; sortable.options.helper=function(){ return ui.helper[ 0 ]; }; event.target=sortable.currentItem[ 0 ]; sortable._mouseCapture(event, true); sortable._mouseStart(event, true, true); sortable.offset.click.top=draggable.offset.click.top; sortable.offset.click.left=draggable.offset.click.left; sortable.offset.parent.left -=draggable.offset.parent.left - sortable.offset.parent.left; sortable.offset.parent.top -=draggable.offset.parent.top - sortable.offset.parent.top; draggable._trigger("toSortable", event); draggable.dropped=sortable.element; $.each(draggable.sortables, function(){ this.refreshPositions(); }); draggable.currentItem=draggable.element; sortable.fromOutside=draggable; } if(sortable.currentItem){ sortable._mouseDrag(event); ui.position=sortable.position; }}else{ if(sortable.isOver){ sortable.isOver=0; sortable.cancelHelperRemoval=true; sortable.options._revert=sortable.options.revert; sortable.options.revert=false; sortable._trigger("out", event, sortable._uiHash(sortable)); sortable._mouseStop(event, true); sortable.options.revert=sortable.options._revert; sortable.options.helper=sortable.options._helper; if(sortable.placeholder){ sortable.placeholder.remove(); } ui.helper.appendTo(draggable._parent); draggable._refreshOffsets(event); ui.position=draggable._generatePosition(event, true); draggable._trigger("fromSortable", event); draggable.dropped=false; $.each(draggable.sortables, function(){ this.refreshPositions(); }); }} }); }}); $.ui.plugin.add("draggable", "cursor", { start: function(event, ui, instance){ var t=$("body"), o=instance.options; if(t.css("cursor")){ o._cursor=t.css("cursor"); } t.css("cursor", o.cursor); }, stop: function(event, ui, instance){ var o=instance.options; if(o._cursor){ $("body").css("cursor", o._cursor); }} }); $.ui.plugin.add("draggable", "opacity", { start: function(event, ui, instance){ var t=$(ui.helper), o=instance.options; if(t.css("opacity")){ o._opacity=t.css("opacity"); } t.css("opacity", o.opacity); }, stop: function(event, ui, instance){ var o=instance.options; if(o._opacity){ $(ui.helper).css("opacity", o._opacity); }} }); $.ui.plugin.add("draggable", "scroll", { start: function(event, ui, i){ if(!i.scrollParentNotHidden){ i.scrollParentNotHidden=i.helper.scrollParent(false); } if(i.scrollParentNotHidden[ 0 ]!==i.document[ 0 ]&&i.scrollParentNotHidden[ 0 ].tagName!=="HTML"){ i.overflowOffset=i.scrollParentNotHidden.offset(); }}, drag: function(event, ui, i){ var o=i.options, scrolled=false, scrollParent=i.scrollParentNotHidden[ 0 ], document=i.document[ 0 ]; if(scrollParent!==document&&scrollParent.tagName!=="HTML"){ if(!o.axis||o.axis!=="x"){ if(( i.overflowOffset.top + scrollParent.offsetHeight) - event.pageY < o.scrollSensitivity){ scrollParent.scrollTop=scrolled=scrollParent.scrollTop + o.scrollSpeed; }else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity){ scrollParent.scrollTop=scrolled=scrollParent.scrollTop - o.scrollSpeed; }} if(!o.axis||o.axis!=="y"){ if(( i.overflowOffset.left + scrollParent.offsetWidth) - event.pageX < o.scrollSensitivity){ scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft + o.scrollSpeed; }else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity){ scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft - o.scrollSpeed; }} }else{ if(!o.axis||o.axis!=="x"){ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity){ scrolled=$(document).scrollTop($(document).scrollTop() - o.scrollSpeed); }else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity){ scrolled=$(document).scrollTop($(document).scrollTop() + o.scrollSpeed); }} if(!o.axis||o.axis!=="y"){ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity){ scrolled=$(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); }else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity){ scrolled=$(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); }} } if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){ $.ui.ddmanager.prepareOffsets(i, event); }} }); $.ui.plugin.add("draggable", "snap", { start: function(event, ui, i){ var o=i.options; i.snapElements=[]; $(o.snap.constructor!==String ?(o.snap.items||":data(ui-draggable)"):o.snap).each(function(){ var $t=$(this), $o=$t.offset(); if(this!==i.element[0]){ i.snapElements.push({ item: this, width: $t.outerWidth(), height: $t.outerHeight(), top: $o.top, left: $o.left }); }}); }, drag: function(event, ui, inst){ var ts, bs, ls, rs, l, r, t, b, i, first, o=inst.options, d=o.snapTolerance, x1=ui.offset.left, x2=x1 + inst.helperProportions.width, y1=ui.offset.top, y2=y1 + inst.helperProportions.height; for (i=inst.snapElements.length - 1; i >=0; i--){ l=inst.snapElements[i].left - inst.margins.left; r=l + inst.snapElements[i].width; t=inst.snapElements[i].top - inst.margins.top; b=t + inst.snapElements[i].height; if(x2 < l - d||x1 > r + d||y2 < t - d||y1 > b + d||!$.contains(inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item)){ if(inst.snapElements[i].snapping){ (inst.options.snap.release&&inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); } inst.snapElements[i].snapping=false; continue; } if(o.snapMode!=="inner"){ ts=Math.abs(t - y2) <=d; bs=Math.abs(b - y1) <=d; ls=Math.abs(l - x2) <=d; rs=Math.abs(r - x1) <=d; if(ts){ ui.position.top=inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top; } if(bs){ ui.position.top=inst._convertPositionTo("relative", { top: b, left: 0 }).top; } if(ls){ ui.position.left=inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left; } if(rs){ ui.position.left=inst._convertPositionTo("relative", { top: 0, left: r }).left; }} first=(ts||bs||ls||rs); if(o.snapMode!=="outer"){ ts=Math.abs(t - y1) <=d; bs=Math.abs(b - y2) <=d; ls=Math.abs(l - x1) <=d; rs=Math.abs(r - x2) <=d; if(ts){ ui.position.top=inst._convertPositionTo("relative", { top: t, left: 0 }).top; } if(bs){ ui.position.top=inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top; } if(ls){ ui.position.left=inst._convertPositionTo("relative", { top: 0, left: l }).left; } if(rs){ ui.position.left=inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left; }} if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){ (inst.options.snap.snap&&inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); } inst.snapElements[i].snapping=(ts||bs||ls||rs||first); }} }); $.ui.plugin.add("draggable", "stack", { start: function(event, ui, instance){ var min, o=instance.options, group=$.makeArray($(o.stack)).sort(function(a, b){ return (parseInt($(a).css("zIndex"), 10)||0) - (parseInt($(b).css("zIndex"), 10)||0); }); if(!group.length){ return; } min=parseInt($(group[0]).css("zIndex"), 10)||0; $(group).each(function(i){ $(this).css("zIndex", min + i); }); this.css("zIndex", (min + group.length)); }}); $.ui.plugin.add("draggable", "zIndex", { start: function(event, ui, instance){ var t=$(ui.helper), o=instance.options; if(t.css("zIndex")){ o._zIndex=t.css("zIndex"); } t.css("zIndex", o.zIndex); }, stop: function(event, ui, instance){ var o=instance.options; if(o._zIndex){ $(ui.helper).css("zIndex", o._zIndex); }} }); var draggable=$.ui.draggable; $.widget("ui.resizable", $.ui.mouse, { version: "1.11.4", widgetEventPrefix: "resize", options: { alsoResize: false, animate: false, animateDuration: "slow", animateEasing: "swing", aspectRatio: false, autoHide: false, containment: false, ghost: false, grid: false, handles: "e,s,se", helper: false, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 90, resize: null, start: null, stop: null }, _num: function(value){ return parseInt(value, 10)||0; }, _isNumber: function(value){ return !isNaN(parseInt(value, 10)); }, _hasScroll: function(el, a){ if($(el).css("overflow")==="hidden"){ return false; } var scroll=(a&&a==="left") ? "scrollLeft":"scrollTop", has=false; if(el[ scroll ] > 0){ return true; } el[ scroll ]=1; has=(el[ scroll ] > 0); el[ scroll ]=0; return has; }, _create: function(){ var n, i, handle, axis, hname, that=this, o=this.options; this.element.addClass("ui-resizable"); $.extend(this, { _aspectRatio: !!(o.aspectRatio), aspectRatio: o.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: o.helper||o.ghost||o.animate ? o.helper||"ui-resizable-helper":null }); if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){ this.element.wrap($("
").css({ position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left") }) ); this.element=this.element.parent().data("ui-resizable", this.element.resizable("instance") ); this.elementIsWrapper=true; this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0 }); this.originalResizeStyle=this.originalElement.css("resize"); this.originalElement.css("resize", "none"); this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })); this.originalElement.css({ margin: this.originalElement.css("margin") }); this._proportionallyResize(); } this.handles=o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se":{ n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" }); this._handles=$(); if(this.handles.constructor===String){ if(this.handles==="all"){ this.handles="n,e,s,w,se,sw,ne,nw"; } n=this.handles.split(","); this.handles={}; for (i=0; i < n.length; i++){ handle=$.trim(n[i]); hname="ui-resizable-" + handle; axis=$("
"); axis.css({ zIndex: o.zIndex }); if("se"===handle){ axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); } this.handles[handle]=".ui-resizable-" + handle; this.element.append(axis); }} this._renderAxis=function(target){ var i, axis, padPos, padWrapper; target=target||this.element; for (i in this.handles){ if(this.handles[i].constructor===String){ this.handles[i]=this.element.children(this.handles[ i ]).first().show(); }else if(this.handles[ i ].jquery||this.handles[ i ].nodeType){ this.handles[ i ]=$(this.handles[ i ]); this._on(this.handles[ i ], { "mousedown": that._mouseDown }); } if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){ axis=$(this.handles[i], this.element); padWrapper=/sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight():axis.outerWidth(); padPos=[ "padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right":"Left" ].join(""); target.css(padPos, padWrapper); this._proportionallyResize(); } this._handles=this._handles.add(this.handles[ i ]); }}; this._renderAxis(this.element); this._handles=this._handles.add(this.element.find(".ui-resizable-handle")); this._handles.disableSelection(); this._handles.mouseover(function(){ if(!that.resizing){ if(this.className){ axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); } that.axis=axis&&axis[1] ? axis[1]:"se"; }}); if(o.autoHide){ this._handles.hide(); $(this.element) .addClass("ui-resizable-autohide") .mouseenter(function(){ if(o.disabled){ return; } $(this).removeClass("ui-resizable-autohide"); that._handles.show(); }) .mouseleave(function(){ if(o.disabled){ return; } if(!that.resizing){ $(this).addClass("ui-resizable-autohide"); that._handles.hide(); }}); } this._mouseInit(); }, _destroy: function(){ this._mouseDestroy(); var wrapper, _destroy=function(exp){ $(exp) .removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") .removeData("resizable") .removeData("ui-resizable") .unbind(".resizable") .find(".ui-resizable-handle") .remove(); }; if(this.elementIsWrapper){ _destroy(this.element); wrapper=this.element; this.originalElement.css({ position: wrapper.css("position"), width: wrapper.outerWidth(), height: wrapper.outerHeight(), top: wrapper.css("top"), left: wrapper.css("left") }).insertAfter(wrapper); wrapper.remove(); } this.originalElement.css("resize", this.originalResizeStyle); _destroy(this.originalElement); return this; }, _mouseCapture: function(event){ var i, handle, capture=false; for (i in this.handles){ handle=$(this.handles[i])[0]; if(handle===event.target||$.contains(handle, event.target)){ capture=true; }} return !this.options.disabled&&capture; }, _mouseStart: function(event){ var curleft, curtop, cursor, o=this.options, el=this.element; this.resizing=true; this._renderProxy(); curleft=this._num(this.helper.css("left")); curtop=this._num(this.helper.css("top")); if(o.containment){ curleft +=$(o.containment).scrollLeft()||0; curtop +=$(o.containment).scrollTop()||0; } this.offset=this.helper.offset(); this.position={ left: curleft, top: curtop }; this.size=this._helper ? { width: this.helper.width(), height: this.helper.height() }:{ width: el.width(), height: el.height() }; this.originalSize=this._helper ? { width: el.outerWidth(), height: el.outerHeight() }:{ width: el.width(), height: el.height() }; this.sizeDiff={ width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; this.originalPosition={ left: curleft, top: curtop }; this.originalMousePosition={ left: event.pageX, top: event.pageY }; this.aspectRatio=(typeof o.aspectRatio==="number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height)||1); cursor=$(".ui-resizable-" + this.axis).css("cursor"); $("body").css("cursor", cursor==="auto" ? this.axis + "-resize":cursor); el.addClass("ui-resizable-resizing"); this._propagate("start", event); return true; }, _mouseDrag: function(event){ var data, props, smp=this.originalMousePosition, a=this.axis, dx=(event.pageX - smp.left)||0, dy=(event.pageY - smp.top)||0, trigger=this._change[a]; this._updatePrevProperties(); if(!trigger){ return false; } data=trigger.apply(this, [ event, dx, dy ]); this._updateVirtualBoundaries(event.shiftKey); if(this._aspectRatio||event.shiftKey){ data=this._updateRatio(data, event); } data=this._respectSize(data, event); this._updateCache(data); this._propagate("resize", event); props=this._applyChanges(); if(!this._helper&&this._proportionallyResizeElements.length){ this._proportionallyResize(); } if(!$.isEmptyObject(props)){ this._updatePrevProperties(); this._trigger("resize", event, this.ui()); this._applyChanges(); } return false; }, _mouseStop: function(event){ this.resizing=false; var pr, ista, soffseth, soffsetw, s, left, top, o=this.options, that=this; if(this._helper){ pr=this._proportionallyResizeElements; ista=pr.length&&(/textarea/i).test(pr[0].nodeName); soffseth=ista&&this._hasScroll(pr[0], "left") ? 0:that.sizeDiff.height; soffsetw=ista ? 0:that.sizeDiff.width; s={ width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }; left=(parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left))||null; top=(parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top))||null; if(!o.animate){ this.element.css($.extend(s, { top: top, left: left })); } that.helper.height(that.size.height); that.helper.width(that.size.width); if(this._helper&&!o.animate){ this._proportionallyResize(); }} $("body").css("cursor", "auto"); this.element.removeClass("ui-resizable-resizing"); this._propagate("stop", event); if(this._helper){ this.helper.remove(); } return false; }, _updatePrevProperties: function(){ this.prevPosition={ top: this.position.top, left: this.position.left }; this.prevSize={ width: this.size.width, height: this.size.height };}, _applyChanges: function(){ var props={}; if(this.position.top!==this.prevPosition.top){ props.top=this.position.top + "px"; } if(this.position.left!==this.prevPosition.left){ props.left=this.position.left + "px"; } if(this.size.width!==this.prevSize.width){ props.width=this.size.width + "px"; } if(this.size.height!==this.prevSize.height){ props.height=this.size.height + "px"; } this.helper.css(props); return props; }, _updateVirtualBoundaries: function(forceAspectRatio){ var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, o=this.options; b={ minWidth: this._isNumber(o.minWidth) ? o.minWidth:0, maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth:Infinity, minHeight: this._isNumber(o.minHeight) ? o.minHeight:0, maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight:Infinity }; if(this._aspectRatio||forceAspectRatio){ pMinWidth=b.minHeight * this.aspectRatio; pMinHeight=b.minWidth / this.aspectRatio; pMaxWidth=b.maxHeight * this.aspectRatio; pMaxHeight=b.maxWidth / this.aspectRatio; if(pMinWidth > b.minWidth){ b.minWidth=pMinWidth; } if(pMinHeight > b.minHeight){ b.minHeight=pMinHeight; } if(pMaxWidth < b.maxWidth){ b.maxWidth=pMaxWidth; } if(pMaxHeight < b.maxHeight){ b.maxHeight=pMaxHeight; }} this._vBoundaries=b; }, _updateCache: function(data){ this.offset=this.helper.offset(); if(this._isNumber(data.left)){ this.position.left=data.left; } if(this._isNumber(data.top)){ this.position.top=data.top; } if(this._isNumber(data.height)){ this.size.height=data.height; } if(this._isNumber(data.width)){ this.size.width=data.width; }}, _updateRatio: function(data){ var cpos=this.position, csize=this.size, a=this.axis; if(this._isNumber(data.height)){ data.width=(data.height * this.aspectRatio); }else if(this._isNumber(data.width)){ data.height=(data.width / this.aspectRatio); } if(a==="sw"){ data.left=cpos.left + (csize.width - data.width); data.top=null; } if(a==="nw"){ data.top=cpos.top + (csize.height - data.height); data.left=cpos.left + (csize.width - data.width); } return data; }, _respectSize: function(data){ var o=this._vBoundaries, a=this.axis, ismaxw=this._isNumber(data.width)&&o.maxWidth&&(o.maxWidth < data.width), ismaxh=this._isNumber(data.height)&&o.maxHeight&&(o.maxHeight < data.height), isminw=this._isNumber(data.width)&&o.minWidth&&(o.minWidth > data.width), isminh=this._isNumber(data.height)&&o.minHeight&&(o.minHeight > data.height), dw=this.originalPosition.left + this.originalSize.width, dh=this.position.top + this.size.height, cw=/sw|nw|w/.test(a), ch=/nw|ne|n/.test(a); if(isminw){ data.width=o.minWidth; } if(isminh){ data.height=o.minHeight; } if(ismaxw){ data.width=o.maxWidth; } if(ismaxh){ data.height=o.maxHeight; } if(isminw&&cw){ data.left=dw - o.minWidth; } if(ismaxw&&cw){ data.left=dw - o.maxWidth; } if(isminh&&ch){ data.top=dh - o.minHeight; } if(ismaxh&&ch){ data.top=dh - o.maxHeight; } if(!data.width&&!data.height&&!data.left&&data.top){ data.top=null; }else if(!data.width&&!data.height&&!data.top&&data.left){ data.left=null; } return data; }, _getPaddingPlusBorderDimensions: function(element){ var i=0, widths=[], borders=[ element.css("borderTopWidth"), element.css("borderRightWidth"), element.css("borderBottomWidth"), element.css("borderLeftWidth") ], paddings=[ element.css("paddingTop"), element.css("paddingRight"), element.css("paddingBottom"), element.css("paddingLeft") ]; for(; i < 4; i++){ widths[ i ]=(parseInt(borders[ i ], 10)||0); widths[ i ] +=(parseInt(paddings[ i ], 10)||0); } return { height: widths[ 0 ] + widths[ 2 ], width: widths[ 1 ] + widths[ 3 ] };}, _proportionallyResize: function(){ if(!this._proportionallyResizeElements.length){ return; } var prel, i=0, element=this.helper||this.element; for(; i < this._proportionallyResizeElements.length; i++){ prel=this._proportionallyResizeElements[i]; if(!this.outerDimensions){ this.outerDimensions=this._getPaddingPlusBorderDimensions(prel); } prel.css({ height: (element.height() - this.outerDimensions.height)||0, width: (element.width() - this.outerDimensions.width)||0 }); }}, _renderProxy: function(){ var el=this.element, o=this.options; this.elementOffset=el.offset(); if(this._helper){ this.helper=this.helper||$("
"); this.helper.addClass(this._helper).css({ width: this.element.outerWidth() - 1, height: this.element.outerHeight() - 1, position: "absolute", left: this.elementOffset.left + "px", top: this.elementOffset.top + "px", zIndex: ++o.zIndex }); this.helper .appendTo("body") .disableSelection(); }else{ this.helper=this.element; }}, _change: { e: function(event, dx){ return { width: this.originalSize.width + dx };}, w: function(event, dx){ var cs=this.originalSize, sp=this.originalPosition; return { left: sp.left + dx, width: cs.width - dx };}, n: function(event, dx, dy){ var cs=this.originalSize, sp=this.originalPosition; return { top: sp.top + dy, height: cs.height - dy };}, s: function(event, dx, dy){ return { height: this.originalSize.height + dy };}, se: function(event, dx, dy){ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [ event, dx, dy ])); }, sw: function(event, dx, dy){ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [ event, dx, dy ])); }, ne: function(event, dx, dy){ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [ event, dx, dy ])); }, nw: function(event, dx, dy){ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [ event, dx, dy ])); }}, _propagate: function(n, event){ $.ui.plugin.call(this, n, [ event, this.ui() ]); (n!=="resize"&&this._trigger(n, event, this.ui())); }, plugins: {}, ui: function(){ return { originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition };}}); $.ui.plugin.add("resizable", "animate", { stop: function(event){ var that=$(this).resizable("instance"), o=that.options, pr=that._proportionallyResizeElements, ista=pr.length&&(/textarea/i).test(pr[0].nodeName), soffseth=ista&&that._hasScroll(pr[0], "left") ? 0:that.sizeDiff.height, soffsetw=ista ? 0:that.sizeDiff.width, style={ width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, left=(parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left))||null, top=(parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top))||null; that.element.animate($.extend(style, top&&left ? { top: top, left: left }:{}), { duration: o.animateDuration, easing: o.animateEasing, step: function(){ var data={ width: parseInt(that.element.css("width"), 10), height: parseInt(that.element.css("height"), 10), top: parseInt(that.element.css("top"), 10), left: parseInt(that.element.css("left"), 10) }; if(pr&&pr.length){ $(pr[0]).css({ width: data.width, height: data.height }); } that._updateCache(data); that._propagate("resize", event); }} ); }}); $.ui.plugin.add("resizable", "containment", { start: function(){ var element, p, co, ch, cw, width, height, that=$(this).resizable("instance"), o=that.options, el=that.element, oc=o.containment, ce=(oc instanceof $) ? oc.get(0):(/parent/.test(oc)) ? el.parent().get(0):oc; if(!ce){ return; } that.containerElement=$(ce); if(/document/.test(oc)||oc===document){ that.containerOffset={ left: 0, top: 0 }; that.containerPosition={ left: 0, top: 0 }; that.parentData={ element: $(document), left: 0, top: 0, width: $(document).width(), height: $(document).height()||document.body.parentNode.scrollHeight };}else{ element=$(ce); p=[]; $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name){ p[ i ]=that._num(element.css("padding" + name)); }); that.containerOffset=element.offset(); that.containerPosition=element.position(); that.containerSize={ height:(element.innerHeight() - p[ 3 ]), width:(element.innerWidth() - p[ 1 ]) }; co=that.containerOffset; ch=that.containerSize.height; cw=that.containerSize.width; width=(that._hasScroll(ce, "left") ? ce.scrollWidth:cw); height=(that._hasScroll(ce) ? ce.scrollHeight:ch) ; that.parentData={ element: ce, left: co.left, top: co.top, width: width, height: height };}}, resize: function(event){ var woset, hoset, isParent, isOffsetRelative, that=$(this).resizable("instance"), o=that.options, co=that.containerOffset, cp=that.position, pRatio=that._aspectRatio||event.shiftKey, cop={ top: 0, left: 0 }, ce=that.containerElement, continueResize=true; if(ce[ 0 ]!==document&&(/static/).test(ce.css("position"))){ cop=co; } if(cp.left <(that._helper ? co.left:0)){ that.size.width=that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); if(pRatio){ that.size.height=that.size.width / that.aspectRatio; continueResize=false; } that.position.left=o.helper ? co.left:0; } if(cp.top <(that._helper ? co.top:0)){ that.size.height=that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); if(pRatio){ that.size.width=that.size.height * that.aspectRatio; continueResize=false; } that.position.top=that._helper ? co.top:0; } isParent=that.containerElement.get(0)===that.element.parent().get(0); isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position")); if(isParent&&isOffsetRelative){ that.offset.left=that.parentData.left + that.position.left; that.offset.top=that.parentData.top + that.position.top; }else{ that.offset.left=that.element.offset().left; that.offset.top=that.element.offset().top; } woset=Math.abs(that.sizeDiff.width + (that._helper ? that.offset.left - cop.left : (that.offset.left - co.left))); hoset=Math.abs(that.sizeDiff.height + (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top))); if(woset + that.size.width >=that.parentData.width){ that.size.width=that.parentData.width - woset; if(pRatio){ that.size.height=that.size.width / that.aspectRatio; continueResize=false; }} if(hoset + that.size.height >=that.parentData.height){ that.size.height=that.parentData.height - hoset; if(pRatio){ that.size.width=that.size.height * that.aspectRatio; continueResize=false; }} if(!continueResize){ that.position.left=that.prevPosition.left; that.position.top=that.prevPosition.top; that.size.width=that.prevSize.width; that.size.height=that.prevSize.height; }}, stop: function(){ var that=$(this).resizable("instance"), o=that.options, co=that.containerOffset, cop=that.containerPosition, ce=that.containerElement, helper=$(that.helper), ho=helper.offset(), w=helper.outerWidth() - that.sizeDiff.width, h=helper.outerHeight() - that.sizeDiff.height; if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); } if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); }} }); $.ui.plugin.add("resizable", "alsoResize", { start: function(){ var that=$(this).resizable("instance"), o=that.options; $(o.alsoResize).each(function(){ var el=$(this); el.data("ui-resizable-alsoresize", { width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) }); }); }, resize: function(event, ui){ var that=$(this).resizable("instance"), o=that.options, os=that.originalSize, op=that.originalPosition, delta={ height: (that.size.height - os.height)||0, width: (that.size.width - os.width)||0, top: (that.position.top - op.top)||0, left: (that.position.left - op.left)||0 }; $(o.alsoResize).each(function(){ var el=$(this), start=$(this).data("ui-resizable-alsoresize"), style={}, css=el.parents(ui.originalElement[0]).length ? [ "width", "height" ] : [ "width", "height", "top", "left" ]; $.each(css, function(i, prop){ var sum=(start[prop]||0) + (delta[prop]||0); if(sum&&sum >=0){ style[prop]=sum||null; }}); el.css(style); }); }, stop: function(){ $(this).removeData("resizable-alsoresize"); }}); $.ui.plugin.add("resizable", "ghost", { start: function(){ var that=$(this).resizable("instance"), o=that.options, cs=that.size; that.ghost=that.originalElement.clone(); that.ghost .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) .addClass("ui-resizable-ghost") .addClass(typeof o.ghost==="string" ? o.ghost:""); that.ghost.appendTo(that.helper); }, resize: function(){ var that=$(this).resizable("instance"); if(that.ghost){ that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width }); }}, stop: function(){ var that=$(this).resizable("instance"); if(that.ghost&&that.helper){ that.helper.get(0).removeChild(that.ghost.get(0)); }} }); $.ui.plugin.add("resizable", "grid", { resize: function(){ var outerDimensions, that=$(this).resizable("instance"), o=that.options, cs=that.size, os=that.originalSize, op=that.originalPosition, a=that.axis, grid=typeof o.grid==="number" ? [ o.grid, o.grid ]:o.grid, gridX=(grid[0]||1), gridY=(grid[1]||1), ox=Math.round((cs.width - os.width) / gridX) * gridX, oy=Math.round((cs.height - os.height) / gridY) * gridY, newWidth=os.width + ox, newHeight=os.height + oy, isMaxWidth=o.maxWidth&&(o.maxWidth < newWidth), isMaxHeight=o.maxHeight&&(o.maxHeight < newHeight), isMinWidth=o.minWidth&&(o.minWidth > newWidth), isMinHeight=o.minHeight&&(o.minHeight > newHeight); o.grid=grid; if(isMinWidth){ newWidth +=gridX; } if(isMinHeight){ newHeight +=gridY; } if(isMaxWidth){ newWidth -=gridX; } if(isMaxHeight){ newHeight -=gridY; } if(/^(se|s|e)$/.test(a)){ that.size.width=newWidth; that.size.height=newHeight; }else if(/^(ne)$/.test(a)){ that.size.width=newWidth; that.size.height=newHeight; that.position.top=op.top - oy; }else if(/^(sw)$/.test(a)){ that.size.width=newWidth; that.size.height=newHeight; that.position.left=op.left - ox; }else{ if(newHeight - gridY <=0||newWidth - gridX <=0){ outerDimensions=that._getPaddingPlusBorderDimensions(this); } if(newHeight - gridY > 0){ that.size.height=newHeight; that.position.top=op.top - oy; }else{ newHeight=gridY - outerDimensions.height; that.size.height=newHeight; that.position.top=op.top + os.height - newHeight; } if(newWidth - gridX > 0){ that.size.width=newWidth; that.position.left=op.left - ox; }else{ newWidth=gridX - outerDimensions.width; that.size.width=newWidth; that.position.left=op.left + os.width - newWidth; }} }}); var resizable=$.ui.resizable; var dialog=$.widget("ui.dialog", { version: "1.11.4", options: { appendTo: "body", autoOpen: true, buttons: [], closeOnEscape: true, closeText: "Close", dialogClass: "", draggable: true, hide: null, height: "auto", maxHeight: null, maxWidth: null, minHeight: 150, minWidth: 150, modal: false, position: { my: "center", at: "center", of: window, collision: "fit", using: function(pos){ var topOffset=$(this).css(pos).offset().top; if(topOffset < 0){ $(this).css("top", pos.top - topOffset); }} }, resizable: true, show: null, title: null, width: 300, beforeClose: null, close: null, drag: null, dragStart: null, dragStop: null, focus: null, open: null, resize: null, resizeStart: null, resizeStop: null }, sizeRelatedOptions: { buttons: true, height: true, maxHeight: true, maxWidth: true, minHeight: true, minWidth: true, width: true }, resizableRelatedOptions: { maxHeight: true, maxWidth: true, minHeight: true, minWidth: true }, _create: function(){ this.originalCss={ display: this.element[ 0 ].style.display, width: this.element[ 0 ].style.width, minHeight: this.element[ 0 ].style.minHeight, maxHeight: this.element[ 0 ].style.maxHeight, height: this.element[ 0 ].style.height }; this.originalPosition={ parent: this.element.parent(), index: this.element.parent().children().index(this.element) }; this.originalTitle=this.element.attr("title"); this.options.title=this.options.title||this.originalTitle; this._createWrapper(); this.element .show() .removeAttr("title") .addClass("ui-dialog-content ui-widget-content") .appendTo(this.uiDialog); this._createTitlebar(); this._createButtonPane(); if(this.options.draggable&&$.fn.draggable){ this._makeDraggable(); } if(this.options.resizable&&$.fn.resizable){ this._makeResizable(); } this._isOpen=false; this._trackFocus(); }, _init: function(){ if(this.options.autoOpen){ this.open(); }}, _appendTo: function(){ var element=this.options.appendTo; if(element&&(element.jquery||element.nodeType)){ return $(element); } return this.document.find(element||"body").eq(0); }, _destroy: function(){ var next, originalPosition=this.originalPosition; this._untrackInstance(); this._destroyOverlay(); this.element .removeUniqueId() .removeClass("ui-dialog-content ui-widget-content") .css(this.originalCss) .detach(); this.uiDialog.stop(true, true).remove(); if(this.originalTitle){ this.element.attr("title", this.originalTitle); } next=originalPosition.parent.children().eq(originalPosition.index); if(next.length&&next[ 0 ]!==this.element[ 0 ]){ next.before(this.element); }else{ originalPosition.parent.append(this.element); }}, widget: function(){ return this.uiDialog; }, disable: $.noop, enable: $.noop, close: function(event){ var activeElement, that=this; if(!this._isOpen||this._trigger("beforeClose", event)===false){ return; } this._isOpen=false; this._focusedElement=null; this._destroyOverlay(); this._untrackInstance(); if(!this.opener.filter(":focusable").focus().length){ try { activeElement=this.document[ 0 ].activeElement; if(activeElement&&activeElement.nodeName.toLowerCase()!=="body"){ $(activeElement).blur(); }} catch(error){}} this._hide(this.uiDialog, this.options.hide, function(){ that._trigger("close", event); }); }, isOpen: function(){ return this._isOpen; }, moveToTop: function(){ this._moveToTop(); }, _moveToTop: function(event, silent){ var moved=false, zIndices=this.uiDialog.siblings(".ui-front:visible").map(function(){ return +$(this).css("z-index"); }).get(), zIndexMax=Math.max.apply(null, zIndices); if(zIndexMax >=+this.uiDialog.css("z-index")){ this.uiDialog.css("z-index", zIndexMax + 1); moved=true; } if(moved&&!silent){ this._trigger("focus", event); } return moved; }, open: function(){ var that=this; if(this._isOpen){ if(this._moveToTop()){ this._focusTabbable(); } return; } this._isOpen=true; this.opener=$(this.document[ 0 ].activeElement); this._size(); this._position(); this._createOverlay(); this._moveToTop(null, true); if(this.overlay){ this.overlay.css("z-index", this.uiDialog.css("z-index") - 1); } this._show(this.uiDialog, this.options.show, function(){ that._focusTabbable(); that._trigger("focus"); }); this._makeFocusTarget(); this._trigger("open"); }, _focusTabbable: function(){ var hasFocus=this._focusedElement; if(!hasFocus){ hasFocus=this.element.find("[autofocus]"); } if(!hasFocus.length){ hasFocus=this.element.find(":tabbable"); } if(!hasFocus.length){ hasFocus=this.uiDialogButtonPane.find(":tabbable"); } if(!hasFocus.length){ hasFocus=this.uiDialogTitlebarClose.filter(":tabbable"); } if(!hasFocus.length){ hasFocus=this.uiDialog; } hasFocus.eq(0).focus(); }, _keepFocus: function(event){ function checkFocus(){ var activeElement=this.document[0].activeElement, isActive=this.uiDialog[0]===activeElement || $.contains(this.uiDialog[0], activeElement); if(!isActive){ this._focusTabbable(); }} event.preventDefault(); checkFocus.call(this); this._delay(checkFocus); }, _createWrapper: function(){ this.uiDialog=$("
") .addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass) .hide() .attr({ tabIndex: -1, role: "dialog" }) .appendTo(this._appendTo()); this._on(this.uiDialog, { keydown: function(event){ if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode && event.keyCode===$.ui.keyCode.ESCAPE){ event.preventDefault(); this.close(event); return; } if(event.keyCode!==$.ui.keyCode.TAB||event.isDefaultPrevented()){ return; } var tabbables=this.uiDialog.find(":tabbable"), first=tabbables.filter(":first"), last=tabbables.filter(":last"); if(( event.target===last[0]||event.target===this.uiDialog[0])&&!event.shiftKey){ this._delay(function(){ first.focus(); }); event.preventDefault(); }else if(( event.target===first[0]||event.target===this.uiDialog[0])&&event.shiftKey){ this._delay(function(){ last.focus(); }); event.preventDefault(); }}, mousedown: function(event){ if(this._moveToTop(event)){ this._focusTabbable(); }} }); if(!this.element.find("[aria-describedby]").length){ this.uiDialog.attr({ "aria-describedby": this.element.uniqueId().attr("id") }); }}, _createTitlebar: function(){ var uiDialogTitle; this.uiDialogTitlebar=$("
") .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix") .prependTo(this.uiDialog); this._on(this.uiDialogTitlebar, { mousedown: function(event){ if(!$(event.target).closest(".ui-dialog-titlebar-close")){ this.uiDialog.focus(); }} }); this.uiDialogTitlebarClose=$("") .button({ label: this.options.closeText, icons: { primary: "ui-icon-closethick" }, text: false }) .addClass("ui-dialog-titlebar-close") .appendTo(this.uiDialogTitlebar); this._on(this.uiDialogTitlebarClose, { click: function(event){ event.preventDefault(); this.close(event); }}); uiDialogTitle=$("") .uniqueId() .addClass("ui-dialog-title") .prependTo(this.uiDialogTitlebar); this._title(uiDialogTitle); this.uiDialog.attr({ "aria-labelledby": uiDialogTitle.attr("id") }); }, _title: function(title){ if(!this.options.title){ title.html(" "); } title.text(this.options.title); }, _createButtonPane: function(){ this.uiDialogButtonPane=$("
") .addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"); this.uiButtonSet=$("
") .addClass("ui-dialog-buttonset") .appendTo(this.uiDialogButtonPane); this._createButtons(); }, _createButtons: function(){ var that=this, buttons=this.options.buttons; this.uiDialogButtonPane.remove(); this.uiButtonSet.empty(); if($.isEmptyObject(buttons)||($.isArray(buttons)&&!buttons.length)){ this.uiDialog.removeClass("ui-dialog-buttons"); return; } $.each(buttons, function(name, props){ var click, buttonOptions; props=$.isFunction(props) ? { click: props, text: name } : props; props=$.extend({ type: "button" }, props); click=props.click; props.click=function(){ click.apply(that.element[ 0 ], arguments); }; buttonOptions={ icons: props.icons, text: props.showText }; delete props.icons; delete props.showText; $("", props) .button(buttonOptions) .appendTo(that.uiButtonSet); }); this.uiDialog.addClass("ui-dialog-buttons"); this.uiDialogButtonPane.appendTo(this.uiDialog); }, _makeDraggable: function(){ var that=this, options=this.options; function filteredUi(ui){ return { position: ui.position, offset: ui.offset };} this.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function(event, ui){ $(this).addClass("ui-dialog-dragging"); that._blockFrames(); that._trigger("dragStart", event, filteredUi(ui)); }, drag: function(event, ui){ that._trigger("drag", event, filteredUi(ui)); }, stop: function(event, ui){ var left=ui.offset.left - that.document.scrollLeft(), top=ui.offset.top - that.document.scrollTop(); options.position={ my: "left top", at: "left" + (left >=0 ? "+":"") + left + " " + "top" + (top >=0 ? "+":"") + top, of: that.window }; $(this).removeClass("ui-dialog-dragging"); that._unblockFrames(); that._trigger("dragStop", event, filteredUi(ui)); }}); }, _makeResizable: function(){ var that=this, options=this.options, handles=options.resizable, position=this.uiDialog.css("position"), resizeHandles=typeof handles==="string" ? handles : "n,e,s,w,se,sw,ne,nw"; function filteredUi(ui){ return { originalPosition: ui.originalPosition, originalSize: ui.originalSize, position: ui.position, size: ui.size };} this.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: this.element, maxWidth: options.maxWidth, maxHeight: options.maxHeight, minWidth: options.minWidth, minHeight: this._minHeight(), handles: resizeHandles, start: function(event, ui){ $(this).addClass("ui-dialog-resizing"); that._blockFrames(); that._trigger("resizeStart", event, filteredUi(ui)); }, resize: function(event, ui){ that._trigger("resize", event, filteredUi(ui)); }, stop: function(event, ui){ var offset=that.uiDialog.offset(), left=offset.left - that.document.scrollLeft(), top=offset.top - that.document.scrollTop(); options.height=that.uiDialog.height(); options.width=that.uiDialog.width(); options.position={ my: "left top", at: "left" + (left >=0 ? "+":"") + left + " " + "top" + (top >=0 ? "+":"") + top, of: that.window }; $(this).removeClass("ui-dialog-resizing"); that._unblockFrames(); that._trigger("resizeStop", event, filteredUi(ui)); }}) .css("position", position); }, _trackFocus: function(){ this._on(this.widget(), { focusin: function(event){ this._makeFocusTarget(); this._focusedElement=$(event.target); }}); }, _makeFocusTarget: function(){ this._untrackInstance(); this._trackingInstances().unshift(this); }, _untrackInstance: function(){ var instances=this._trackingInstances(), exists=$.inArray(this, instances); if(exists!==-1){ instances.splice(exists, 1); }}, _trackingInstances: function(){ var instances=this.document.data("ui-dialog-instances"); if(!instances){ instances=[]; this.document.data("ui-dialog-instances", instances); } return instances; }, _minHeight: function(){ var options=this.options; return options.height==="auto" ? options.minHeight : Math.min(options.minHeight, options.height); }, _position: function(){ var isVisible=this.uiDialog.is(":visible"); if(!isVisible){ this.uiDialog.show(); } this.uiDialog.position(this.options.position); if(!isVisible){ this.uiDialog.hide(); }}, _setOptions: function(options){ var that=this, resize=false, resizableOptions={}; $.each(options, function(key, value){ that._setOption(key, value); if(key in that.sizeRelatedOptions){ resize=true; } if(key in that.resizableRelatedOptions){ resizableOptions[ key ]=value; }}); if(resize){ this._size(); this._position(); } if(this.uiDialog.is(":data(ui-resizable)")){ this.uiDialog.resizable("option", resizableOptions); }}, _setOption: function(key, value){ var isDraggable, isResizable, uiDialog=this.uiDialog; if(key==="dialogClass"){ uiDialog .removeClass(this.options.dialogClass) .addClass(value); } if(key==="disabled"){ return; } this._super(key, value); if(key==="appendTo"){ this.uiDialog.appendTo(this._appendTo()); } if(key==="buttons"){ this._createButtons(); } if(key==="closeText"){ this.uiDialogTitlebarClose.button({ label: "" + value }); } if(key==="draggable"){ isDraggable=uiDialog.is(":data(ui-draggable)"); if(isDraggable&&!value){ uiDialog.draggable("destroy"); } if(!isDraggable&&value){ this._makeDraggable(); }} if(key==="position"){ this._position(); } if(key==="resizable"){ isResizable=uiDialog.is(":data(ui-resizable)"); if(isResizable&&!value){ uiDialog.resizable("destroy"); } if(isResizable&&typeof value==="string"){ uiDialog.resizable("option", "handles", value); } if(!isResizable&&value!==false){ this._makeResizable(); }} if(key==="title"){ this._title(this.uiDialogTitlebar.find(".ui-dialog-title")); }}, _size: function(){ var nonContentHeight, minContentHeight, maxContentHeight, options=this.options; this.element.show().css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }); if(options.minWidth > options.width){ options.width=options.minWidth; } nonContentHeight=this.uiDialog.css({ height: "auto", width: options.width }) .outerHeight(); minContentHeight=Math.max(0, options.minHeight - nonContentHeight); maxContentHeight=typeof options.maxHeight==="number" ? Math.max(0, options.maxHeight - nonContentHeight) : "none"; if(options.height==="auto"){ this.element.css({ minHeight: minContentHeight, maxHeight: maxContentHeight, height: "auto" }); }else{ this.element.height(Math.max(0, options.height - nonContentHeight)); } if(this.uiDialog.is(":data(ui-resizable)")){ this.uiDialog.resizable("option", "minHeight", this._minHeight()); }}, _blockFrames: function(){ this.iframeBlocks=this.document.find("iframe").map(function(){ var iframe=$(this); return $("
") .css({ position: "absolute", width: iframe.outerWidth(), height: iframe.outerHeight() }) .appendTo(iframe.parent()) .offset(iframe.offset())[0]; }); }, _unblockFrames: function(){ if(this.iframeBlocks){ this.iframeBlocks.remove(); delete this.iframeBlocks; }}, _allowInteraction: function(event){ if($(event.target).closest(".ui-dialog").length){ return true; } return !!$(event.target).closest(".ui-datepicker").length; }, _createOverlay: function(){ if(!this.options.modal){ return; } var isOpening=true; this._delay(function(){ isOpening=false; }); if(!this.document.data("ui-dialog-overlays")){ this._on(this.document, { focusin: function(event){ if(isOpening){ return; } if(!this._allowInteraction(event)){ event.preventDefault(); this._trackingInstances()[ 0 ]._focusTabbable(); }} }); } this.overlay=$("
") .addClass("ui-widget-overlay ui-front") .appendTo(this._appendTo()); this._on(this.overlay, { mousedown: "_keepFocus" }); this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays")||0) + 1); }, _destroyOverlay: function(){ if(!this.options.modal){ return; } if(this.overlay){ var overlays=this.document.data("ui-dialog-overlays") - 1; if(!overlays){ this.document .unbind("focusin") .removeData("ui-dialog-overlays"); }else{ this.document.data("ui-dialog-overlays", overlays); } this.overlay.remove(); this.overlay=null; }} }); $.widget("ui.droppable", { version: "1.11.4", widgetEventPrefix: "drop", options: { accept: "*", activeClass: false, addClasses: true, greedy: false, hoverClass: false, scope: "default", tolerance: "intersect", activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function(){ var proportions, o=this.options, accept=o.accept; this.isover=false; this.isout=true; this.accept=$.isFunction(accept) ? accept:function(d){ return d.is(accept); }; this.proportions=function(){ if(arguments.length){ proportions=arguments[ 0 ]; }else{ return proportions ? proportions : proportions={ width: this.element[ 0 ].offsetWidth, height: this.element[ 0 ].offsetHeight };}}; this._addToManager(o.scope); o.addClasses&&this.element.addClass("ui-droppable"); }, _addToManager: function(scope){ $.ui.ddmanager.droppables[ scope ]=$.ui.ddmanager.droppables[ scope ]||[]; $.ui.ddmanager.droppables[ scope ].push(this); }, _splice: function(drop){ var i=0; for(; i < drop.length; i++){ if(drop[ i ]===this){ drop.splice(i, 1); }} }, _destroy: function(){ var drop=$.ui.ddmanager.droppables[ this.options.scope ]; this._splice(drop); this.element.removeClass("ui-droppable ui-droppable-disabled"); }, _setOption: function(key, value){ if(key==="accept"){ this.accept=$.isFunction(value) ? value:function(d){ return d.is(value); };}else if(key==="scope"){ var drop=$.ui.ddmanager.droppables[ this.options.scope ]; this._splice(drop); this._addToManager(value); } this._super(key, value); }, _activate: function(event){ var draggable=$.ui.ddmanager.current; if(this.options.activeClass){ this.element.addClass(this.options.activeClass); } if(draggable){ this._trigger("activate", event, this.ui(draggable)); }}, _deactivate: function(event){ var draggable=$.ui.ddmanager.current; if(this.options.activeClass){ this.element.removeClass(this.options.activeClass); } if(draggable){ this._trigger("deactivate", event, this.ui(draggable)); }}, _over: function(event){ var draggable=$.ui.ddmanager.current; if(!draggable||(draggable.currentItem||draggable.element)[ 0 ]===this.element[ 0 ]){ return; } if(this.accept.call(this.element[ 0 ],(draggable.currentItem||draggable.element))){ if(this.options.hoverClass){ this.element.addClass(this.options.hoverClass); } this._trigger("over", event, this.ui(draggable)); }}, _out: function(event){ var draggable=$.ui.ddmanager.current; if(!draggable||(draggable.currentItem||draggable.element)[ 0 ]===this.element[ 0 ]){ return; } if(this.accept.call(this.element[ 0 ],(draggable.currentItem||draggable.element))){ if(this.options.hoverClass){ this.element.removeClass(this.options.hoverClass); } this._trigger("out", event, this.ui(draggable)); }}, _drop: function(event, custom){ var draggable=custom||$.ui.ddmanager.current, childrenIntersection=false; if(!draggable||(draggable.currentItem||draggable.element)[ 0 ]===this.element[ 0 ]){ return false; } this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){ var inst=$(this).droppable("instance"); if(inst.options.greedy && !inst.options.disabled && inst.options.scope===draggable.options.scope && inst.accept.call(inst.element[ 0 ],(draggable.currentItem||draggable.element)) && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance, event) ){ childrenIntersection=true; return false; }}); if(childrenIntersection){ return false; } if(this.accept.call(this.element[ 0 ],(draggable.currentItem||draggable.element))){ if(this.options.activeClass){ this.element.removeClass(this.options.activeClass); } if(this.options.hoverClass){ this.element.removeClass(this.options.hoverClass); } this._trigger("drop", event, this.ui(draggable)); return this.element; } return false; }, ui: function(c){ return { draggable:(c.currentItem||c.element), helper: c.helper, position: c.position, offset: c.positionAbs };}}); $.ui.intersect=(function(){ function isOverAxis(x, reference, size){ return(x >=reference)&&(x <(reference + size)); } return function(draggable, droppable, toleranceMode, event){ if(!droppable.offset){ return false; } var x1=(draggable.positionAbs||draggable.position.absolute).left + draggable.margins.left, y1=(draggable.positionAbs||draggable.position.absolute).top + draggable.margins.top, x2=x1 + draggable.helperProportions.width, y2=y1 + draggable.helperProportions.height, l=droppable.offset.left, t=droppable.offset.top, r=l + droppable.proportions().width, b=t + droppable.proportions().height; switch(toleranceMode){ case "fit": return(l <=x1&&x2 <=r&&t <=y1&&y2 <=b); case "intersect": return(l < x1 +(draggable.helperProportions.width / 2) && x2 -(draggable.helperProportions.width / 2) < r && t < y1 +(draggable.helperProportions.height / 2) && y2 -(draggable.helperProportions.height / 2) < b); case "pointer": return isOverAxis(event.pageY, t, droppable.proportions().height)&&isOverAxis(event.pageX, l, droppable.proportions().width); case "touch": return ( (y1 >=t&&y1 <=b) || (y2 >=t&&y2 <=b) || (y1 < t&&y2 > b) )&&( (x1 >=l&&x1 <=r) || (x2 >=l&&x2 <=r) || (x1 < l&&x2 > r) ); default: return false; }};})(); $.ui.ddmanager={ current: null, droppables: { "default": [] }, prepareOffsets: function(t, event){ var i, j, m=$.ui.ddmanager.droppables[ t.options.scope ]||[], type=event ? event.type:null, list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack(); droppablesLoop: for(i=0; i < m.length; i++){ if(m[ i ].options.disabled||(t&&!m[ i ].accept.call(m[ i ].element[ 0 ],(t.currentItem||t.element)))){ continue; } for(j=0; j < list.length; j++){ if(list[ j ]===m[ i ].element[ 0 ]){ m[ i ].proportions().height=0; continue droppablesLoop; }} m[ i ].visible=m[ i ].element.css("display")!=="none"; if(!m[ i ].visible){ continue; } if(type==="mousedown"){ m[ i ]._activate.call(m[ i ], event); } m[ i ].offset=m[ i ].element.offset(); m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight }); }}, drop: function(draggable, event){ var dropped=false; $.each(( $.ui.ddmanager.droppables[ draggable.options.scope ]||[]).slice(), function(){ if(!this.options){ return; } if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable, this, this.options.tolerance, event)){ dropped=this._drop.call(this, event)||dropped; } if(!this.options.disabled&&this.visible&&this.accept.call(this.element[ 0 ],(draggable.currentItem||draggable.element))){ this.isout=true; this.isover=false; this._deactivate.call(this, event); }}); return dropped; }, dragStart: function(draggable, event){ draggable.element.parentsUntil("body").bind("scroll.droppable", function(){ if(!draggable.options.refreshPositions){ $.ui.ddmanager.prepareOffsets(draggable, event); }}); }, drag: function(draggable, event){ if(draggable.options.refreshPositions){ $.ui.ddmanager.prepareOffsets(draggable, event); } $.each($.ui.ddmanager.droppables[ draggable.options.scope ]||[], function(){ if(this.options.disabled||this.greedyChild||!this.visible){ return; } var parentInstance, scope, parent, intersects=$.ui.intersect(draggable, this, this.options.tolerance, event), c = !intersects&&this.isover ? "isout":(intersects&&!this.isover ? "isover":null); if(!c){ return; } if(this.options.greedy){ scope=this.options.scope; parent=this.element.parents(":data(ui-droppable)").filter(function(){ return $(this).droppable("instance").options.scope===scope; }); if(parent.length){ parentInstance=$(parent[ 0 ]).droppable("instance"); parentInstance.greedyChild=(c==="isover"); }} if(parentInstance&&c==="isover"){ parentInstance.isover=false; parentInstance.isout=true; parentInstance._out.call(parentInstance, event); } this[ c ]=true; this[c==="isout" ? "isover":"isout"]=false; this[c==="isover" ? "_over":"_out"].call(this, event); if(parentInstance&&c==="isout"){ parentInstance.isout=false; parentInstance.isover=true; parentInstance._over.call(parentInstance, event); }}); }, dragStop: function(draggable, event){ draggable.element.parentsUntil("body").unbind("scroll.droppable"); if(!draggable.options.refreshPositions){ $.ui.ddmanager.prepareOffsets(draggable, event); }} }; var droppable=$.ui.droppable; var dataSpace="ui-effects-", jQuery=$; $.effects={ effect: {}}; (function(jQuery, undefined){ var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", rplusequals=/^([\-+])=\s*(\d+\.?\d*)/, stringParsers=[ { re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(execResult){ return [ execResult[ 1 ], execResult[ 2 ], execResult[ 3 ], execResult[ 4 ] ]; }}, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(execResult){ return [ execResult[ 1 ] * 2.55, execResult[ 2 ] * 2.55, execResult[ 3 ] * 2.55, execResult[ 4 ] ]; }}, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function(execResult){ return [ parseInt(execResult[ 1 ], 16), parseInt(execResult[ 2 ], 16), parseInt(execResult[ 3 ], 16) ]; }}, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function(execResult){ return [ parseInt(execResult[ 1 ] + execResult[ 1 ], 16), parseInt(execResult[ 2 ] + execResult[ 2 ], 16), parseInt(execResult[ 3 ] + execResult[ 3 ], 16) ]; }}, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function(execResult){ return [ execResult[ 1 ], execResult[ 2 ] / 100, execResult[ 3 ] / 100, execResult[ 4 ] ]; }} ], color=jQuery.Color=function(color, green, blue, alpha){ return new jQuery.Color.fn.parse(color, green, blue, alpha); }, spaces={ rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" }} }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" }} }}, propTypes={ "byte": { floor: true, max: 255 }, "percent": { max: 1 }, "degrees": { mod: 360, floor: true }}, support=color.support={}, supportElem=jQuery("

")[ 0 ], colors, each=jQuery.each; supportElem.style.cssText="background-color:rgba(1,1,1,.5)"; support.rgba=supportElem.style.backgroundColor.indexOf("rgba") > -1; each(spaces, function(spaceName, space){ space.cache="_" + spaceName; space.props.alpha={ idx: 3, type: "percent", def: 1 };}); function clamp(value, prop, allowEmpty){ var type=propTypes[ prop.type ]||{}; if(value==null){ return (allowEmpty||!prop.def) ? null:prop.def; } value=type.floor ? ~~value:parseFloat(value); if(isNaN(value)){ return prop.def; } if(type.mod){ return (value + type.mod) % type.mod; } return 0 > value ? 0:type.max < value ? type.max:value; } function stringParse(string){ var inst=color(), rgba=inst._rgba=[]; string=string.toLowerCase(); each(stringParsers, function(i, parser){ var parsed, match=parser.re.exec(string), values=match&&parser.parse(match), spaceName=parser.space||"rgba"; if(values){ parsed=inst[ spaceName ](values); inst[ spaces[ spaceName ].cache ]=parsed[ spaces[ spaceName ].cache ]; rgba=inst._rgba=parsed._rgba; return false; }}); if(rgba.length){ if(rgba.join()==="0,0,0,0"){ jQuery.extend(rgba, colors.transparent); } return inst; } return colors[ string ]; } color.fn=jQuery.extend(color.prototype, { parse: function(red, green, blue, alpha){ if(red===undefined){ this._rgba=[ null, null, null, null ]; return this; } if(red.jquery||red.nodeType){ red=jQuery(red).css(green); green=undefined; } var inst=this, type=jQuery.type(red), rgba=this._rgba=[]; if(green!==undefined){ red=[ red, green, blue, alpha ]; type="array"; } if(type==="string"){ return this.parse(stringParse(red)||colors._default); } if(type==="array"){ each(spaces.rgba.props, function(key, prop){ rgba[ prop.idx ]=clamp(red[ prop.idx ], prop); }); return this; } if(type==="object"){ if(red instanceof color){ each(spaces, function(spaceName, space){ if(red[ space.cache ]){ inst[ space.cache ]=red[ space.cache ].slice(); }}); }else{ each(spaces, function(spaceName, space){ var cache=space.cache; each(space.props, function(key, prop){ if(!inst[ cache ]&&space.to){ if(key==="alpha"||red[ key ]==null){ return; } inst[ cache ]=space.to(inst._rgba); } inst[ cache ][ prop.idx ]=clamp(red[ key ], prop, true); }); if(inst[ cache ]&&jQuery.inArray(null, inst[ cache ].slice(0, 3)) < 0){ inst[ cache ][ 3 ]=1; if(space.from){ inst._rgba=space.from(inst[ cache ]); }} }); } return this; }}, is: function(compare){ var is=color(compare), same=true, inst=this; each(spaces, function(_, space){ var localCache, isCache=is[ space.cache ]; if(isCache){ localCache=inst[ space.cache ]||space.to&&space.to(inst._rgba)||[]; each(space.props, function(_, prop){ if(isCache[ prop.idx ]!=null){ same=(isCache[ prop.idx ]===localCache[ prop.idx ]); return same; }}); } return same; }); return same; }, _space: function(){ var used=[], inst=this; each(spaces, function(spaceName, space){ if(inst[ space.cache ]){ used.push(spaceName); }}); return used.pop(); }, transition: function(other, distance){ var end=color(other), spaceName=end._space(), space=spaces[ spaceName ], startColor=this.alpha()===0 ? color("transparent"):this, start=startColor[ space.cache ]||space.to(startColor._rgba), result=start.slice(); end=end[ space.cache ]; each(space.props, function(key, prop){ var index=prop.idx, startValue=start[ index ], endValue=end[ index ], type=propTypes[ prop.type ]||{}; if(endValue===null){ return; } if(startValue===null){ result[ index ]=endValue; }else{ if(type.mod){ if(endValue - startValue > type.mod / 2){ startValue +=type.mod; }else if(startValue - endValue > type.mod / 2){ startValue -=type.mod; }} result[ index ]=clamp(( endValue - startValue) * distance + startValue, prop); }}); return this[ spaceName ](result); }, blend: function(opaque){ if(this._rgba[ 3 ]===1){ return this; } var rgb=this._rgba.slice(), a=rgb.pop(), blend=color(opaque)._rgba; return color(jQuery.map(rgb, function(v, i){ return(1 - a) * blend[ i ] + a * v; })); }, toRgbaString: function(){ var prefix="rgba(", rgba=jQuery.map(this._rgba, function(v, i){ return v==null ?(i > 2 ? 1:0):v; }); if(rgba[ 3 ]===1){ rgba.pop(); prefix="rgb("; } return prefix + rgba.join() + ")"; }, toHslaString: function(){ var prefix="hsla(", hsla=jQuery.map(this.hsla(), function(v, i){ if(v==null){ v=i > 2 ? 1:0; } if(i&&i < 3){ v=Math.round(v * 100) + "%"; } return v; }); if(hsla[ 3 ]===1){ hsla.pop(); prefix="hsl("; } return prefix + hsla.join() + ")"; }, toHexString: function(includeAlpha){ var rgba=this._rgba.slice(), alpha=rgba.pop(); if(includeAlpha){ rgba.push(~~(alpha * 255)); } return "#" + jQuery.map(rgba, function(v){ v=(v||0).toString(16); return v.length===1 ? "0" + v:v; }).join(""); }, toString: function(){ return this._rgba[ 3 ]===0 ? "transparent":this.toRgbaString(); }}); color.fn.parse.prototype=color.fn; function hue2rgb(p, q, h){ h=(h + 1) % 1; if(h * 6 < 1){ return p +(q - p) * h * 6; } if(h * 2 < 1){ return q; } if(h * 3 < 2){ return p +(q - p) *(( 2 / 3) - h) * 6; } return p; } spaces.hsla.to=function(rgba){ if(rgba[ 0 ]==null||rgba[ 1 ]==null||rgba[ 2 ]==null){ return [ null, null, null, rgba[ 3 ] ]; } var r=rgba[ 0 ] / 255, g=rgba[ 1 ] / 255, b=rgba[ 2 ] / 255, a=rgba[ 3 ], max=Math.max(r, g, b), min=Math.min(r, g, b), diff=max - min, add=max + min, l=add * 0.5, h, s; if(min===max){ h=0; }else if(r===max){ h=(60 *(g - b) / diff) + 360; }else if(g===max){ h=(60 *(b - r) / diff) + 120; }else{ h=(60 *(r - g) / diff) + 240; } if(diff===0){ s=0; }else if(l <=0.5){ s=diff / add; }else{ s=diff /(2 - add); } return [ Math.round(h) % 360, s, l, a==null ? 1:a ]; }; spaces.hsla.from=function(hsla){ if(hsla[ 0 ]==null||hsla[ 1 ]==null||hsla[ 2 ]==null){ return [ null, null, null, hsla[ 3 ] ]; } var h=hsla[ 0 ] / 360, s=hsla[ 1 ], l=hsla[ 2 ], a=hsla[ 3 ], q=l <=0.5 ? l *(1 + s):l + s - l * s, p=2 * l - q; return [ Math.round(hue2rgb(p, q, h +(1 / 3)) * 255), Math.round(hue2rgb(p, q, h) * 255), Math.round(hue2rgb(p, q, h -(1 / 3)) * 255), a ]; }; each(spaces, function(spaceName, space){ var props=space.props, cache=space.cache, to=space.to, from=space.from; color.fn[ spaceName ]=function(value){ if(to&&!this[ cache ]){ this[ cache ]=to(this._rgba); } if(value===undefined){ return this[ cache ].slice(); } var ret, type=jQuery.type(value), arr=(type==="array"||type==="object") ? value:arguments, local=this[ cache ].slice(); each(props, function(key, prop){ var val=arr[ type==="object" ? key:prop.idx ]; if(val==null){ val=local[ prop.idx ]; } local[ prop.idx ]=clamp(val, prop); }); if(from){ ret=color(from(local)); ret[ cache ]=local; return ret; }else{ return color(local); }}; each(props, function(key, prop){ if(color.fn[ key ]){ return; } color.fn[ key ]=function(value){ var vtype=jQuery.type(value), fn=(key==="alpha" ?(this._hsla ? "hsla":"rgba"):spaceName), local=this[ fn ](), cur=local[ prop.idx ], match; if(vtype==="undefined"){ return cur; } if(vtype==="function"){ value=value.call(this, cur); vtype=jQuery.type(value); } if(value==null&&prop.empty){ return this; } if(vtype==="string"){ match=rplusequals.exec(value); if(match){ value=cur + parseFloat(match[ 2 ]) *(match[ 1 ]==="+" ? 1:-1); }} local[ prop.idx ]=value; return this[ fn ](local); };}); }); color.hook=function(hook){ var hooks=hook.split(" "); each(hooks, function(i, hook){ jQuery.cssHooks[ hook ]={ set: function(elem, value){ var parsed, curElem, backgroundColor=""; if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){ value=color(parsed||value); if(!support.rgba&&value._rgba[ 3 ]!==1){ curElem=hook==="backgroundColor" ? elem.parentNode:elem; while ( (backgroundColor===""||backgroundColor==="transparent") && curElem&&curElem.style ){ try { backgroundColor=jQuery.css(curElem, "backgroundColor"); curElem=curElem.parentNode; } catch(e){ }} value=value.blend(backgroundColor&&backgroundColor!=="transparent" ? backgroundColor : "_default"); } value=value.toRgbaString(); } try { elem.style[ hook ]=value; } catch(e){ }} }; jQuery.fx.step[ hook ]=function(fx){ if(!fx.colorInit){ fx.start=color(fx.elem, hook); fx.end=color(fx.end); fx.colorInit=true; } jQuery.cssHooks[ hook ].set(fx.elem, fx.start.transition(fx.end, fx.pos)); };}); }; color.hook(stepHooks); jQuery.cssHooks.borderColor={ expand: function(value){ var expanded={}; each([ "Top", "Right", "Bottom", "Left" ], function(i, part){ expanded[ "border" + part + "Color" ]=value; }); return expanded; }}; colors=jQuery.Color.names={ aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [ null, null, null, 0 ], _default: "#ffffff" };})(jQuery); (function(){ var classAnimationActions=[ "add", "remove", "toggle" ], shorthandStyles={ border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; $.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function(_, prop){ $.fx.step[ prop ]=function(fx){ if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){ jQuery.style(fx.elem, prop, fx.end); fx.setAttr=true; }};}); function getElementStyles(elem){ var key, len, style=elem.ownerDocument.defaultView ? elem.ownerDocument.defaultView.getComputedStyle(elem, null) : elem.currentStyle, styles={}; if(style&&style.length&&style[ 0 ]&&style[ style[ 0 ] ]){ len=style.length; while(len--){ key=style[ len ]; if(typeof style[ key ]==="string"){ styles[ $.camelCase(key) ]=style[ key ]; }} }else{ for(key in style){ if(typeof style[ key ]==="string"){ styles[ key ]=style[ key ]; }} } return styles; } function styleDifference(oldStyle, newStyle){ var diff={}, name, value; for(name in newStyle){ value=newStyle[ name ]; if(oldStyle[ name ]!==value){ if(!shorthandStyles[ name ]){ if($.fx.step[ name ]||!isNaN(parseFloat(value))){ diff[ name ]=value; }} }} return diff; } if(!$.fn.addBack){ $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };} $.effects.animateClass=function(value, duration, easing, callback){ var o=$.speed(duration, easing, callback); return this.queue(function(){ var animated=$(this), baseClass=animated.attr("class")||"", applyClassChange, allAnimations=o.children ? animated.find("*").addBack():animated; allAnimations=allAnimations.map(function(){ var el=$(this); return { el: el, start: getElementStyles(this) };}); applyClassChange=function(){ $.each(classAnimationActions, function(i, action){ if(value[ action ]){ animated[ action + "Class" ](value[ action ]); }}); }; applyClassChange(); allAnimations=allAnimations.map(function(){ this.end=getElementStyles(this.el[ 0 ]); this.diff=styleDifference(this.start, this.end); return this; }); animated.attr("class", baseClass); allAnimations=allAnimations.map(function(){ var styleInfo=this, dfd=$.Deferred(), opts=$.extend({}, o, { queue: false, complete: function(){ dfd.resolve(styleInfo); }}); this.el.animate(this.diff, opts); return dfd.promise(); }); $.when.apply($, allAnimations.get()).done(function(){ applyClassChange(); $.each(arguments, function(){ var el=this.el; $.each(this.diff, function(key){ el.css(key, ""); }); }); o.complete.call(animated[ 0 ]); }); }); }; $.fn.extend({ addClass: (function(orig){ return function(classNames, speed, easing, callback){ return speed ? $.effects.animateClass.call(this, { add: classNames }, speed, easing, callback) : orig.apply(this, arguments); };})($.fn.addClass), removeClass: (function(orig){ return function(classNames, speed, easing, callback){ return arguments.length > 1 ? $.effects.animateClass.call(this, { remove: classNames }, speed, easing, callback) : orig.apply(this, arguments); };})($.fn.removeClass), toggleClass: (function(orig){ return function(classNames, force, speed, easing, callback){ if(typeof force==="boolean"||force===undefined){ if(!speed){ return orig.apply(this, arguments); }else{ return $.effects.animateClass.call(this, (force ? { add: classNames }:{ remove: classNames }), speed, easing, callback); }}else{ return $.effects.animateClass.call(this, { toggle: classNames }, force, speed, easing); }};})($.fn.toggleClass), switchClass: function(remove, add, speed, easing, callback){ return $.effects.animateClass.call(this, { add: add, remove: remove }, speed, easing, callback); }}); })(); (function(){ $.extend($.effects, { version: "1.11.4", save: function(element, set){ for(var i=0; i < set.length; i++){ if(set[ i ]!==null){ element.data(dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ]); }} }, restore: function(element, set){ var val, i; for(i=0; i < set.length; i++){ if(set[ i ]!==null){ val=element.data(dataSpace + set[ i ]); if(val===undefined){ val=""; } element.css(set[ i ], val); }} }, setMode: function(el, mode){ if(mode==="toggle"){ mode=el.is(":hidden") ? "show":"hide"; } return mode; }, getBaseline: function(origin, original){ var y, x; switch(origin[ 0 ]){ case "top": y=0; break; case "middle": y=0.5; break; case "bottom": y=1; break; default: y=origin[ 0 ] / original.height; } switch(origin[ 1 ]){ case "left": x=0; break; case "center": x=0.5; break; case "right": x=1; break; default: x=origin[ 1 ] / original.width; } return { x: x, y: y };}, createWrapper: function(element){ if(element.parent().is(".ui-effects-wrapper")){ return element.parent(); } var props={ width: element.outerWidth(true), height: element.outerHeight(true), "float": element.css("float") }, wrapper=$("

") .addClass("ui-effects-wrapper") .css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), size={ width: element.width(), height: element.height() }, active=document.activeElement; try { active.id; } catch(e){ active=document.body; } element.wrap(wrapper); if(element[ 0 ]===active||$.contains(element[ 0 ], active)){ $(active).focus(); } wrapper=element.parent(); if(element.css("position")==="static"){ wrapper.css({ position: "relative" }); element.css({ position: "relative" }); }else{ $.extend(props, { position: element.css("position"), zIndex: element.css("z-index") }); $.each([ "top", "left", "bottom", "right" ], function(i, pos){ props[ pos ]=element.css(pos); if(isNaN(parseInt(props[ pos ], 10))){ props[ pos ]="auto"; }}); element.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" }); } element.css(size); return wrapper.css(props).show(); }, removeWrapper: function(element){ var active=document.activeElement; if(element.parent().is(".ui-effects-wrapper")){ element.parent().replaceWith(element); if(element[ 0 ]===active||$.contains(element[ 0 ], active)){ $(active).focus(); }} return element; }, setTransition: function(element, list, factor, value){ value=value||{}; $.each(list, function(i, x){ var unit=element.cssUnit(x); if(unit[ 0 ] > 0){ value[ x ]=unit[ 0 ] * factor + unit[ 1 ]; }}); return value; }}); function _normalizeArguments(effect, options, speed, callback){ if($.isPlainObject(effect)){ options=effect; effect=effect.effect; } effect={ effect: effect }; if(options==null){ options={};} if($.isFunction(options)){ callback=options; speed=null; options={};} if(typeof options==="number"||$.fx.speeds[ options ]){ callback=speed; speed=options; options={};} if($.isFunction(speed)){ callback=speed; speed=null; } if(options){ $.extend(effect, options); } speed=speed||options.duration; effect.duration=$.fx.off ? 0 : typeof speed==="number" ? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default; effect.complete=callback||options.complete; return effect; } function standardAnimationOption(option){ if(!option||typeof option==="number"||$.fx.speeds[ option ]){ return true; } if(typeof option==="string"&&!$.effects.effect[ option ]){ return true; } if($.isFunction(option)){ return true; } if(typeof option==="object"&&!option.effect){ return true; } return false; } $.fn.extend({ effect: function(){ var args=_normalizeArguments.apply(this, arguments), mode=args.mode, queue=args.queue, effectMethod=$.effects.effect[ args.effect ]; if($.fx.off||!effectMethod){ if(mode){ return this[ mode ](args.duration, args.complete); }else{ return this.each(function(){ if(args.complete){ args.complete.call(this); }}); }} function run(next){ var elem=$(this), complete=args.complete, mode=args.mode; function done(){ if($.isFunction(complete)){ complete.call(elem[0]); } if($.isFunction(next)){ next(); }} if(elem.is(":hidden") ? mode==="hide":mode==="show"){ elem[ mode ](); done(); }else{ effectMethod.call(elem[0], args, done); }} return queue===false ? this.each(run):this.queue(queue||"fx", run); }, show: (function(orig){ return function(option){ if(standardAnimationOption(option)){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="show"; return this.effect.call(this, args); }};})($.fn.show), hide: (function(orig){ return function(option){ if(standardAnimationOption(option)){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="hide"; return this.effect.call(this, args); }};})($.fn.hide), toggle: (function(orig){ return function(option){ if(standardAnimationOption(option)||typeof option==="boolean"){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="toggle"; return this.effect.call(this, args); }};})($.fn.toggle), cssUnit: function(key){ var style=this.css(key), val=[]; $.each([ "em", "px", "%", "pt" ], function(i, unit){ if(style.indexOf(unit) > 0){ val=[ parseFloat(style), unit ]; }}); return val; }}); })(); (function(){ var baseEasings={}; $.each([ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function(i, name){ baseEasings[ name ]=function(p){ return Math.pow(p, i + 2); };}); $.extend(baseEasings, { Sine: function(p){ return 1 - Math.cos(p * Math.PI / 2); }, Circ: function(p){ return 1 - Math.sqrt(1 - p * p); }, Elastic: function(p){ return p===0||p===1 ? p : -Math.pow(2, 8 * (p - 1)) * Math.sin(( (p - 1) * 80 - 7.5) * Math.PI / 15); }, Back: function(p){ return p * p *(3 * p - 2); }, Bounce: function(p){ var pow2, bounce=4; while(p <(( pow2=Math.pow(2, --bounce)) - 1) / 11){} return 1 / Math.pow(4, 3 - bounce) - 7.5625 * Math.pow(( pow2 * 3 - 2) / 22 - p, 2); }}); $.each(baseEasings, function(name, easeIn){ $.easing[ "easeIn" + name ]=easeIn; $.easing[ "easeOut" + name ]=function(p){ return 1 - easeIn(1 - p); }; $.easing[ "easeInOut" + name ]=function(p){ return p < 0.5 ? easeIn(p * 2) / 2 : 1 - easeIn(p * -2 + 2) / 2; };}); })(); var effect=$.effects; var effectBlind=$.effects.effect.blind=function(o, done){ var el=$(this), rvertical=/up|down|vertical/, rpositivemotion=/up|left|vertical|horizontal/, props=[ "position", "top", "bottom", "left", "right", "height", "width" ], mode=$.effects.setMode(el, o.mode||"hide"), direction=o.direction||"up", vertical=rvertical.test(direction), ref=vertical ? "height":"width", ref2=vertical ? "top":"left", motion=rpositivemotion.test(direction), animation={}, show=mode==="show", wrapper, distance, margin; if(el.parent().is(".ui-effects-wrapper")){ $.effects.save(el.parent(), props); }else{ $.effects.save(el, props); } el.show(); wrapper=$.effects.createWrapper(el).css({ overflow: "hidden" }); distance=wrapper[ ref ](); margin=parseFloat(wrapper.css(ref2))||0; animation[ ref ]=show ? distance:0; if(!motion){ el .css(vertical ? "bottom":"right", 0) .css(vertical ? "top":"left", "auto") .css({ position: "absolute" }); animation[ ref2 ]=show ? margin:distance + margin; } if(show){ wrapper.css(ref, 0); if(!motion){ wrapper.css(ref2, margin + distance); }} wrapper.animate(animation, { duration: o.duration, easing: o.easing, queue: false, complete: function(){ if(mode==="hide"){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }}); }; var effectBounce=$.effects.effect.bounce=function(o, done){ var el=$(this), props=[ "position", "top", "bottom", "left", "right", "height", "width" ], mode=$.effects.setMode(el, o.mode||"effect"), hide=mode==="hide", show=mode==="show", direction=o.direction||"up", distance=o.distance, times=o.times||5, anims=times * 2 +(show||hide ? 1:0), speed=o.duration / anims, easing=o.easing, ref=(direction==="up"||direction==="down") ? "top":"left", motion=(direction==="up"||direction==="left"), i, upAnim, downAnim, queue=el.queue(), queuelen=queue.length; if(show||hide){ props.push("opacity"); } $.effects.save(el, props); el.show(); $.effects.createWrapper(el); if(!distance){ distance=el[ ref==="top" ? "outerHeight":"outerWidth" ]() / 3; } if(show){ downAnim={ opacity: 1 }; downAnim[ ref ]=0; el.css("opacity", 0) .css(ref, motion ? -distance * 2:distance * 2) .animate(downAnim, speed, easing); } if(hide){ distance=distance / Math.pow(2, times - 1); } downAnim={}; downAnim[ ref ]=0; for(i=0; i < times; i++){ upAnim={}; upAnim[ ref ]=(motion ? "-=":"+=") + distance; el.animate(upAnim, speed, easing) .animate(downAnim, speed, easing); distance=hide ? distance * 2:distance / 2; } if(hide){ upAnim={ opacity: 0 }; upAnim[ ref ]=(motion ? "-=":"+=") + distance; el.animate(upAnim, speed, easing); } el.queue(function(){ if(hide){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }); if(queuelen > 1){ queue.splice.apply(queue, [ 1, 0 ].concat(queue.splice(queuelen, anims + 1))); } el.dequeue(); }; var effectClip=$.effects.effect.clip=function(o, done){ var el=$(this), props=[ "position", "top", "bottom", "left", "right", "height", "width" ], mode=$.effects.setMode(el, o.mode||"hide"), show=mode==="show", direction=o.direction||"vertical", vert=direction==="vertical", size=vert ? "height":"width", position=vert ? "top":"left", animation={}, wrapper, animate, distance; $.effects.save(el, props); el.show(); wrapper=$.effects.createWrapper(el).css({ overflow: "hidden" }); animate=(el[0].tagName==="IMG") ? wrapper:el; distance=animate[ size ](); if(show){ animate.css(size, 0); animate.css(position, distance / 2); } animation[ size ]=show ? distance:0; animation[ position ]=show ? 0:distance / 2; animate.animate(animation, { queue: false, duration: o.duration, easing: o.easing, complete: function(){ if(!show){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }}); }; var effectDrop=$.effects.effect.drop=function(o, done){ var el=$(this), props=[ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], mode=$.effects.setMode(el, o.mode||"hide"), show=mode==="show", direction=o.direction||"left", ref=(direction==="up"||direction==="down") ? "top":"left", motion=(direction==="up"||direction==="left") ? "pos":"neg", animation={ opacity: show ? 1:0 }, distance; $.effects.save(el, props); el.show(); $.effects.createWrapper(el); distance=o.distance||el[ ref==="top" ? "outerHeight":"outerWidth" ](true) / 2; if(show){ el .css("opacity", 0) .css(ref, motion==="pos" ? -distance:distance); } animation[ ref ]=(show ? (motion==="pos" ? "+=":"-=") : (motion==="pos" ? "-=":"+=")) + distance; el.animate(animation, { queue: false, duration: o.duration, easing: o.easing, complete: function(){ if(mode==="hide"){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }}); }; var effectExplode=$.effects.effect.explode=function(o, done){ var rows=o.pieces ? Math.round(Math.sqrt(o.pieces)):3, cells=rows, el=$(this), mode=$.effects.setMode(el, o.mode||"hide"), show=mode==="show", offset=el.show().css("visibility", "hidden").offset(), width=Math.ceil(el.outerWidth() / cells), height=Math.ceil(el.outerHeight() / rows), pieces=[], i, j, left, top, mx, my; function childComplete(){ pieces.push(this); if(pieces.length===rows * cells){ animComplete(); }} for(i=0; i < rows ; i++){ top=offset.top + i * height; my=i -(rows - 1) / 2 ; for(j=0; j < cells ; j++){ left=offset.left + j * width; mx=j -(cells - 1) / 2 ; el .clone() .appendTo("body") .wrap("
") .css({ position: "absolute", visibility: "visible", left: -j * width, top: -i * height }) .parent() .addClass("ui-effects-explode") .css({ position: "absolute", overflow: "hidden", width: width, height: height, left: left +(show ? mx * width:0), top: top +(show ? my * height:0), opacity: show ? 0:1 }).animate({ left: left +(show ? 0:mx * width), top: top +(show ? 0:my * height), opacity: show ? 1:0 }, o.duration||500, o.easing, childComplete); }} function animComplete(){ el.css({ visibility: "visible" }); $(pieces).remove(); if(!show){ el.hide(); } done(); }}; var effectFade=$.effects.effect.fade=function(o, done){ var el=$(this), mode=$.effects.setMode(el, o.mode||"toggle"); el.animate({ opacity: mode }, { queue: false, duration: o.duration, easing: o.easing, complete: done }); }; var effectFold=$.effects.effect.fold=function(o, done){ var el=$(this), props=[ "position", "top", "bottom", "left", "right", "height", "width" ], mode=$.effects.setMode(el, o.mode||"hide"), show=mode==="show", hide=mode==="hide", size=o.size||15, percent=/([0-9]+)%/.exec(size), horizFirst = !!o.horizFirst, widthFirst=show!==horizFirst, ref=widthFirst ? [ "width", "height" ]:[ "height", "width" ], duration=o.duration / 2, wrapper, distance, animation1={}, animation2={}; $.effects.save(el, props); el.show(); wrapper=$.effects.createWrapper(el).css({ overflow: "hidden" }); distance=widthFirst ? [ wrapper.width(), wrapper.height() ] : [ wrapper.height(), wrapper.width() ]; if(percent){ size=parseInt(percent[ 1 ], 10) / 100 * distance[ hide ? 0:1 ]; } if(show){ wrapper.css(horizFirst ? { height: 0, width: size }:{ height: size, width: 0 }); } animation1[ ref[ 0 ] ]=show ? distance[ 0 ]:size; animation2[ ref[ 1 ] ]=show ? distance[ 1 ]:0; wrapper .animate(animation1, duration, o.easing) .animate(animation2, duration, o.easing, function(){ if(hide){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }); }; var effectHighlight=$.effects.effect.highlight=function(o, done){ var elem=$(this), props=[ "backgroundImage", "backgroundColor", "opacity" ], mode=$.effects.setMode(elem, o.mode||"show"), animation={ backgroundColor: elem.css("backgroundColor") }; if(mode==="hide"){ animation.opacity=0; } $.effects.save(elem, props); elem .show() .css({ backgroundImage: "none", backgroundColor: o.color||"#ffff99" }) .animate(animation, { queue: false, duration: o.duration, easing: o.easing, complete: function(){ if(mode==="hide"){ elem.hide(); } $.effects.restore(elem, props); done(); }}); }; var effectSize=$.effects.effect.size=function(o, done){ var original, baseline, factor, el=$(this), props0=[ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], props1=[ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], props2=[ "width", "height", "overflow" ], cProps=[ "fontSize" ], vProps=[ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], hProps=[ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], mode=$.effects.setMode(el, o.mode||"effect"), restore=o.restore||mode!=="effect", scale=o.scale||"both", origin=o.origin||[ "middle", "center" ], position=el.css("position"), props=restore ? props0:props1, zero={ height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; if(mode==="show"){ el.show(); } original={ height: el.height(), width: el.width(), outerHeight: el.outerHeight(), outerWidth: el.outerWidth() }; if(o.mode==="toggle"&&mode==="show"){ el.from=o.to||zero; el.to=o.from||original; }else{ el.from=o.from||(mode==="show" ? zero:original); el.to=o.to||(mode==="hide" ? zero:original); } factor={ from: { y: el.from.height / original.height, x: el.from.width / original.width }, to: { y: el.to.height / original.height, x: el.to.width / original.width }}; if(scale==="box"||scale==="both"){ if(factor.from.y!==factor.to.y){ props=props.concat(vProps); el.from=$.effects.setTransition(el, vProps, factor.from.y, el.from); el.to=$.effects.setTransition(el, vProps, factor.to.y, el.to); } if(factor.from.x!==factor.to.x){ props=props.concat(hProps); el.from=$.effects.setTransition(el, hProps, factor.from.x, el.from); el.to=$.effects.setTransition(el, hProps, factor.to.x, el.to); }} if(scale==="content"||scale==="both"){ if(factor.from.y!==factor.to.y){ props=props.concat(cProps).concat(props2); el.from=$.effects.setTransition(el, cProps, factor.from.y, el.from); el.to=$.effects.setTransition(el, cProps, factor.to.y, el.to); }} $.effects.save(el, props); el.show(); $.effects.createWrapper(el); el.css("overflow", "hidden").css(el.from); if(origin){ baseline=$.effects.getBaseline(origin, original); el.from.top=(original.outerHeight - el.outerHeight()) * baseline.y; el.from.left=(original.outerWidth - el.outerWidth()) * baseline.x; el.to.top=(original.outerHeight - el.to.outerHeight) * baseline.y; el.to.left=(original.outerWidth - el.to.outerWidth) * baseline.x; } el.css(el.from); if(scale==="content"||scale==="both"){ vProps=vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); hProps=hProps.concat([ "marginLeft", "marginRight" ]); props2=props0.concat(vProps).concat(hProps); el.find("*[width]").each(function(){ var child=$(this), c_original={ height: child.height(), width: child.width(), outerHeight: child.outerHeight(), outerWidth: child.outerWidth() }; if(restore){ $.effects.save(child, props2); } child.from={ height: c_original.height * factor.from.y, width: c_original.width * factor.from.x, outerHeight: c_original.outerHeight * factor.from.y, outerWidth: c_original.outerWidth * factor.from.x }; child.to={ height: c_original.height * factor.to.y, width: c_original.width * factor.to.x, outerHeight: c_original.height * factor.to.y, outerWidth: c_original.width * factor.to.x }; if(factor.from.y!==factor.to.y){ child.from=$.effects.setTransition(child, vProps, factor.from.y, child.from); child.to=$.effects.setTransition(child, vProps, factor.to.y, child.to); } if(factor.from.x!==factor.to.x){ child.from=$.effects.setTransition(child, hProps, factor.from.x, child.from); child.to=$.effects.setTransition(child, hProps, factor.to.x, child.to); } child.css(child.from); child.animate(child.to, o.duration, o.easing, function(){ if(restore){ $.effects.restore(child, props2); }}); }); } el.animate(el.to, { queue: false, duration: o.duration, easing: o.easing, complete: function(){ if(el.to.opacity===0){ el.css("opacity", el.from.opacity); } if(mode==="hide"){ el.hide(); } $.effects.restore(el, props); if(!restore){ if(position==="static"){ el.css({ position: "relative", top: el.to.top, left: el.to.left }); }else{ $.each([ "top", "left" ], function(idx, pos){ el.css(pos, function(_, str){ var val=parseInt(str, 10), toRef=idx ? el.to.left:el.to.top; if(str==="auto"){ return toRef + "px"; } return val + toRef + "px"; }); }); }} $.effects.removeWrapper(el); done(); }}); }; var effectScale=$.effects.effect.scale=function(o, done){ var el=$(this), options=$.extend(true, {}, o), mode=$.effects.setMode(el, o.mode||"effect"), percent=parseInt(o.percent, 10) || (parseInt(o.percent, 10)===0 ? 0:(mode==="hide" ? 0:100)), direction=o.direction||"both", origin=o.origin, original={ height: el.height(), width: el.width(), outerHeight: el.outerHeight(), outerWidth: el.outerWidth() }, factor={ y: direction!=="horizontal" ? (percent / 100):1, x: direction!=="vertical" ? (percent / 100):1 }; options.effect="size"; options.queue=false; options.complete=done; if(mode!=="effect"){ options.origin=origin||[ "middle", "center" ]; options.restore=true; } options.from=o.from||(mode==="show" ? { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }:original); options.to={ height: original.height * factor.y, width: original.width * factor.x, outerHeight: original.outerHeight * factor.y, outerWidth: original.outerWidth * factor.x }; if(options.fade){ if(mode==="show"){ options.from.opacity=0; options.to.opacity=1; } if(mode==="hide"){ options.from.opacity=1; options.to.opacity=0; }} el.effect(options); }; var effectPuff=$.effects.effect.puff=function(o, done){ var elem=$(this), mode=$.effects.setMode(elem, o.mode||"hide"), hide=mode==="hide", percent=parseInt(o.percent, 10)||150, factor=percent / 100, original={ height: elem.height(), width: elem.width(), outerHeight: elem.outerHeight(), outerWidth: elem.outerWidth() }; $.extend(o, { effect: "scale", queue: false, fade: true, mode: mode, complete: done, percent: hide ? percent:100, from: hide ? original : { height: original.height * factor, width: original.width * factor, outerHeight: original.outerHeight * factor, outerWidth: original.outerWidth * factor }}); elem.effect(o); }; var effectPulsate=$.effects.effect.pulsate=function(o, done){ var elem=$(this), mode=$.effects.setMode(elem, o.mode||"show"), show=mode==="show", hide=mode==="hide", showhide=(show||mode==="hide"), anims=(( o.times||5) * 2) +(showhide ? 1:0), duration=o.duration / anims, animateTo=0, queue=elem.queue(), queuelen=queue.length, i; if(show||!elem.is(":visible")){ elem.css("opacity", 0).show(); animateTo=1; } for(i=1; i < anims; i++){ elem.animate({ opacity: animateTo }, duration, o.easing); animateTo=1 - animateTo; } elem.animate({ opacity: animateTo }, duration, o.easing); elem.queue(function(){ if(hide){ elem.hide(); } done(); }); if(queuelen > 1){ queue.splice.apply(queue, [ 1, 0 ].concat(queue.splice(queuelen, anims + 1))); } elem.dequeue(); }; var effectShake=$.effects.effect.shake=function(o, done){ var el=$(this), props=[ "position", "top", "bottom", "left", "right", "height", "width" ], mode=$.effects.setMode(el, o.mode||"effect"), direction=o.direction||"left", distance=o.distance||20, times=o.times||3, anims=times * 2 + 1, speed=Math.round(o.duration / anims), ref=(direction==="up"||direction==="down") ? "top":"left", positiveMotion=(direction==="up"||direction==="left"), animation={}, animation1={}, animation2={}, i, queue=el.queue(), queuelen=queue.length; $.effects.save(el, props); el.show(); $.effects.createWrapper(el); animation[ ref ]=(positiveMotion ? "-=":"+=") + distance; animation1[ ref ]=(positiveMotion ? "+=":"-=") + distance * 2; animation2[ ref ]=(positiveMotion ? "-=":"+=") + distance * 2; el.animate(animation, speed, o.easing); for(i=1; i < times; i++){ el.animate(animation1, speed, o.easing).animate(animation2, speed, o.easing); } el .animate(animation1, speed, o.easing) .animate(animation, speed / 2, o.easing) .queue(function(){ if(mode==="hide"){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }); if(queuelen > 1){ queue.splice.apply(queue, [ 1, 0 ].concat(queue.splice(queuelen, anims + 1))); } el.dequeue(); }; var effectSlide=$.effects.effect.slide=function(o, done){ var el=$(this), props=[ "position", "top", "bottom", "left", "right", "width", "height" ], mode=$.effects.setMode(el, o.mode||"show"), show=mode==="show", direction=o.direction||"left", ref=(direction==="up"||direction==="down") ? "top":"left", positiveMotion=(direction==="up"||direction==="left"), distance, animation={}; $.effects.save(el, props); el.show(); distance=o.distance||el[ ref==="top" ? "outerHeight":"outerWidth" ](true); $.effects.createWrapper(el).css({ overflow: "hidden" }); if(show){ el.css(ref, positiveMotion ? (isNaN(distance) ? "-" + distance:-distance):distance); } animation[ ref ]=(show ? (positiveMotion ? "+=":"-=") : (positiveMotion ? "-=":"+=")) + distance; el.animate(animation, { queue: false, duration: o.duration, easing: o.easing, complete: function(){ if(mode==="hide"){ el.hide(); } $.effects.restore(el, props); $.effects.removeWrapper(el); done(); }}); }; var effectTransfer=$.effects.effect.transfer=function(o, done){ var elem=$(this), target=$(o.to), targetFixed=target.css("position")==="fixed", body=$("body"), fixTop=targetFixed ? body.scrollTop():0, fixLeft=targetFixed ? body.scrollLeft():0, endPosition=target.offset(), animation={ top: endPosition.top - fixTop, left: endPosition.left - fixLeft, height: target.innerHeight(), width: target.innerWidth() }, startPosition=elem.offset(), transfer=$("
") .appendTo(document.body) .addClass(o.className) .css({ top: startPosition.top - fixTop, left: startPosition.left - fixLeft, height: elem.innerHeight(), width: elem.innerWidth(), position: targetFixed ? "fixed":"absolute" }) .animate(animation, o.duration, o.easing, function(){ transfer.remove(); done(); }); }; var progressbar=$.widget("ui.progressbar", { version: "1.11.4", options: { max: 100, value: 0, change: null, complete: null }, min: 0, _create: function(){ this.oldValue=this.options.value=this._constrainedValue(); this.element .addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all") .attr({ role: "progressbar", "aria-valuemin": this.min }); this.valueDiv=$("
") .appendTo(this.element); this._refreshValue(); }, _destroy: function(){ this.element .removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all") .removeAttr("role") .removeAttr("aria-valuemin") .removeAttr("aria-valuemax") .removeAttr("aria-valuenow"); this.valueDiv.remove(); }, value: function(newValue){ if(newValue===undefined){ return this.options.value; } this.options.value=this._constrainedValue(newValue); this._refreshValue(); }, _constrainedValue: function(newValue){ if(newValue===undefined){ newValue=this.options.value; } this.indeterminate=newValue===false; if(typeof newValue!=="number"){ newValue=0; } return this.indeterminate ? false : Math.min(this.options.max, Math.max(this.min, newValue)); }, _setOptions: function(options){ var value=options.value; delete options.value; this._super(options); this.options.value=this._constrainedValue(value); this._refreshValue(); }, _setOption: function(key, value){ if(key==="max"){ value=Math.max(this.min, value); } if(key==="disabled"){ this.element .toggleClass("ui-state-disabled", !!value) .attr("aria-disabled", value); } this._super(key, value); }, _percentage: function(){ return this.indeterminate ? 100:100 *(this.options.value - this.min) /(this.options.max - this.min); }, _refreshValue: function(){ var value=this.options.value, percentage=this._percentage(); this.valueDiv .toggle(this.indeterminate||value > this.min) .toggleClass("ui-corner-right", value===this.options.max) .width(percentage.toFixed(0) + "%"); this.element.toggleClass("ui-progressbar-indeterminate", this.indeterminate); if(this.indeterminate){ this.element.removeAttr("aria-valuenow"); if(!this.overlayDiv){ this.overlayDiv=$("
").appendTo(this.valueDiv); }}else{ this.element.attr({ "aria-valuemax": this.options.max, "aria-valuenow": value }); if(this.overlayDiv){ this.overlayDiv.remove(); this.overlayDiv=null; }} if(this.oldValue!==value){ this.oldValue=value; this._trigger("change"); } if(value===this.options.max){ this._trigger("complete"); }} }); var selectable=$.widget("ui.selectable", $.ui.mouse, { version: "1.11.4", options: { appendTo: "body", autoRefresh: true, distance: 0, filter: "*", tolerance: "touch", selected: null, selecting: null, start: null, stop: null, unselected: null, unselecting: null }, _create: function(){ var selectees, that=this; this.element.addClass("ui-selectable"); this.dragged=false; this.refresh=function(){ selectees=$(that.options.filter, that.element[0]); selectees.addClass("ui-selectee"); selectees.each(function(){ var $this=$(this), pos=$this.offset(); $.data(this, "selectable-item", { element: this, $element: $this, left: pos.left, top: pos.top, right: pos.left + $this.outerWidth(), bottom: pos.top + $this.outerHeight(), startselected: false, selected: $this.hasClass("ui-selected"), selecting: $this.hasClass("ui-selecting"), unselecting: $this.hasClass("ui-unselecting") }); }); }; this.refresh(); this.selectees=selectees.addClass("ui-selectee"); this._mouseInit(); this.helper=$("
"); }, _destroy: function(){ this.selectees .removeClass("ui-selectee") .removeData("selectable-item"); this.element .removeClass("ui-selectable ui-selectable-disabled"); this._mouseDestroy(); }, _mouseStart: function(event){ var that=this, options=this.options; this.opos=[ event.pageX, event.pageY ]; if(this.options.disabled){ return; } this.selectees=$(options.filter, this.element[0]); this._trigger("start", event); $(options.appendTo).append(this.helper); this.helper.css({ "left": event.pageX, "top": event.pageY, "width": 0, "height": 0 }); if(options.autoRefresh){ this.refresh(); } this.selectees.filter(".ui-selected").each(function(){ var selectee=$.data(this, "selectable-item"); selectee.startselected=true; if(!event.metaKey&&!event.ctrlKey){ selectee.$element.removeClass("ui-selected"); selectee.selected=false; selectee.$element.addClass("ui-unselecting"); selectee.unselecting=true; that._trigger("unselecting", event, { unselecting: selectee.element }); }}); $(event.target).parents().addBack().each(function(){ var doSelect, selectee=$.data(this, "selectable-item"); if(selectee){ doSelect=(!event.metaKey&&!event.ctrlKey)||!selectee.$element.hasClass("ui-selected"); selectee.$element .removeClass(doSelect ? "ui-unselecting":"ui-selected") .addClass(doSelect ? "ui-selecting":"ui-unselecting"); selectee.unselecting = !doSelect; selectee.selecting=doSelect; selectee.selected=doSelect; if(doSelect){ that._trigger("selecting", event, { selecting: selectee.element }); }else{ that._trigger("unselecting", event, { unselecting: selectee.element }); } return false; }}); }, _mouseDrag: function(event){ this.dragged=true; if(this.options.disabled){ return; } var tmp, that=this, options=this.options, x1=this.opos[0], y1=this.opos[1], x2=event.pageX, y2=event.pageY; if(x1 > x2){ tmp=x2; x2=x1; x1=tmp; } if(y1 > y2){ tmp=y2; y2=y1; y1=tmp; } this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 }); this.selectees.each(function(){ var selectee=$.data(this, "selectable-item"), hit=false; if(!selectee||selectee.element===that.element[0]){ return; } if(options.tolerance==="touch"){ hit=(!(selectee.left > x2||selectee.right < x1||selectee.top > y2||selectee.bottom < y1)); }else if(options.tolerance==="fit"){ hit=(selectee.left > x1&&selectee.right < x2&&selectee.top > y1&&selectee.bottom < y2); } if(hit){ if(selectee.selected){ selectee.$element.removeClass("ui-selected"); selectee.selected=false; } if(selectee.unselecting){ selectee.$element.removeClass("ui-unselecting"); selectee.unselecting=false; } if(!selectee.selecting){ selectee.$element.addClass("ui-selecting"); selectee.selecting=true; that._trigger("selecting", event, { selecting: selectee.element }); }}else{ if(selectee.selecting){ if((event.metaKey||event.ctrlKey)&&selectee.startselected){ selectee.$element.removeClass("ui-selecting"); selectee.selecting=false; selectee.$element.addClass("ui-selected"); selectee.selected=true; }else{ selectee.$element.removeClass("ui-selecting"); selectee.selecting=false; if(selectee.startselected){ selectee.$element.addClass("ui-unselecting"); selectee.unselecting=true; } that._trigger("unselecting", event, { unselecting: selectee.element }); }} if(selectee.selected){ if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){ selectee.$element.removeClass("ui-selected"); selectee.selected=false; selectee.$element.addClass("ui-unselecting"); selectee.unselecting=true; that._trigger("unselecting", event, { unselecting: selectee.element }); }} }}); return false; }, _mouseStop: function(event){ var that=this; this.dragged=false; $(".ui-unselecting", this.element[0]).each(function(){ var selectee=$.data(this, "selectable-item"); selectee.$element.removeClass("ui-unselecting"); selectee.unselecting=false; selectee.startselected=false; that._trigger("unselected", event, { unselected: selectee.element }); }); $(".ui-selecting", this.element[0]).each(function(){ var selectee=$.data(this, "selectable-item"); selectee.$element.removeClass("ui-selecting").addClass("ui-selected"); selectee.selecting=false; selectee.selected=true; selectee.startselected=true; that._trigger("selected", event, { selected: selectee.element }); }); this._trigger("stop", event); this.helper.remove(); return false; }}); var selectmenu=$.widget("ui.selectmenu", { version: "1.11.4", defaultElement: "", widgetEventPrefix: "spin", options: { culture: null, icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, incremental: true, max: null, min: null, numberFormat: null, page: 10, step: 1, change: null, spin: null, start: null, stop: null }, _create: function(){ this._setOption("max", this.options.max); this._setOption("min", this.options.min); this._setOption("step", this.options.step); if(this.value()!==""){ this._value(this.element.val(), true); } this._draw(); this._on(this._events); this._refresh(); this._on(this.window, { beforeunload: function(){ this.element.removeAttr("autocomplete"); }}); }, _getCreateOptions: function(){ var options={}, element=this.element; $.each([ "min", "max", "step" ], function(i, option){ var value=element.attr(option); if(value!==undefined&&value.length){ options[ option ]=value; }}); return options; }, _events: { keydown: function(event){ if(this._start(event)&&this._keydown(event)){ event.preventDefault(); }}, keyup: "_stop", focus: function(){ this.previous=this.element.val(); }, blur: function(event){ if(this.cancelBlur){ delete this.cancelBlur; return; } this._stop(); this._refresh(); if(this.previous!==this.element.val()){ this._trigger("change", event); }}, mousewheel: function(event, delta){ if(!delta){ return; } if(!this.spinning&&!this._start(event)){ return false; } this._spin((delta > 0 ? 1:-1) * this.options.step, event); clearTimeout(this.mousewheelTimer); this.mousewheelTimer=this._delay(function(){ if(this.spinning){ this._stop(event); }}, 100); event.preventDefault(); }, "mousedown .ui-spinner-button": function(event){ var previous; previous=this.element[0]===this.document[0].activeElement ? this.previous:this.element.val(); function checkFocus(){ var isActive=this.element[0]===this.document[0].activeElement; if(!isActive){ this.element.focus(); this.previous=previous; this._delay(function(){ this.previous=previous; }); }} event.preventDefault(); checkFocus.call(this); this.cancelBlur=true; this._delay(function(){ delete this.cancelBlur; checkFocus.call(this); }); if(this._start(event)===false){ return; } this._repeat(null, $(event.currentTarget).hasClass("ui-spinner-up") ? 1:-1, event); }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function(event){ if(!$(event.currentTarget).hasClass("ui-state-active")){ return; } if(this._start(event)===false){ return false; } this._repeat(null, $(event.currentTarget).hasClass("ui-spinner-up") ? 1:-1, event); }, "mouseleave .ui-spinner-button": "_stop" }, _draw: function(){ var uiSpinner=this.uiSpinner=this.element .addClass("ui-spinner-input") .attr("autocomplete", "off") .wrap(this._uiSpinnerHtml()) .parent() .append(this._buttonHtml()); this.element.attr("role", "spinbutton"); this.buttons=uiSpinner.find(".ui-spinner-button") .attr("tabIndex", -1) .button() .removeClass("ui-corner-all"); if(this.buttons.height() > Math.ceil(uiSpinner.height() * 0.5) && uiSpinner.height() > 0){ uiSpinner.height(uiSpinner.height()); } if(this.options.disabled){ this.disable(); }}, _keydown: function(event){ var options=this.options, keyCode=$.ui.keyCode; switch(event.keyCode){ case keyCode.UP: this._repeat(null, 1, event); return true; case keyCode.DOWN: this._repeat(null, -1, event); return true; case keyCode.PAGE_UP: this._repeat(null, options.page, event); return true; case keyCode.PAGE_DOWN: this._repeat(null, -options.page, event); return true; } return false; }, _uiSpinnerHtml: function(){ return ""; }, _buttonHtml: function(){ return "" + "" + "" + "" + "" + "" + ""; }, _start: function(event){ if(!this.spinning&&this._trigger("start", event)===false){ return false; } if(!this.counter){ this.counter=1; } this.spinning=true; return true; }, _repeat: function(i, steps, event){ i=i||500; clearTimeout(this.timer); this.timer=this._delay(function(){ this._repeat(40, steps, event); }, i); this._spin(steps * this.options.step, event); }, _spin: function(step, event){ var value=this.value()||0; if(!this.counter){ this.counter=1; } value=this._adjustValue(value + step * this._increment(this.counter)); if(!this.spinning||this._trigger("spin", event, { value: value })!==false){ this._value(value); this.counter++; }}, _increment: function(i){ var incremental=this.options.incremental; if(incremental){ return $.isFunction(incremental) ? incremental(i) : Math.floor(i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1); } return 1; }, _precision: function(){ var precision=this._precisionOf(this.options.step); if(this.options.min!==null){ precision=Math.max(precision, this._precisionOf(this.options.min)); } return precision; }, _precisionOf: function(num){ var str=num.toString(), decimal=str.indexOf("."); return decimal===-1 ? 0:str.length - decimal - 1; }, _adjustValue: function(value){ var base, aboveMin, options=this.options; base=options.min!==null ? options.min:0; aboveMin=value - base; aboveMin=Math.round(aboveMin / options.step) * options.step; value=base + aboveMin; value=parseFloat(value.toFixed(this._precision())); if(options.max!==null&&value > options.max){ return options.max; } if(options.min!==null&&value < options.min){ return options.min; } return value; }, _stop: function(event){ if(!this.spinning){ return; } clearTimeout(this.timer); clearTimeout(this.mousewheelTimer); this.counter=0; this.spinning=false; this._trigger("stop", event); }, _setOption: function(key, value){ if(key==="culture"||key==="numberFormat"){ var prevValue=this._parse(this.element.val()); this.options[ key ]=value; this.element.val(this._format(prevValue)); return; } if(key==="max"||key==="min"||key==="step"){ if(typeof value==="string"){ value=this._parse(value); }} if(key==="icons"){ this.buttons.first().find(".ui-icon") .removeClass(this.options.icons.up) .addClass(value.up); this.buttons.last().find(".ui-icon") .removeClass(this.options.icons.down) .addClass(value.down); } this._super(key, value); if(key==="disabled"){ this.widget().toggleClass("ui-state-disabled", !!value); this.element.prop("disabled", !!value); this.buttons.button(value ? "disable":"enable"); }}, _setOptions: spinner_modifier(function(options){ this._super(options); }), _parse: function(val){ if(typeof val==="string"&&val!==""){ val=window.Globalize&&this.options.numberFormat ? Globalize.parseFloat(val, 10, this.options.culture):+val; } return val===""||isNaN(val) ? null:val; }, _format: function(value){ if(value===""){ return ""; } return window.Globalize&&this.options.numberFormat ? Globalize.format(value, this.options.numberFormat, this.options.culture) : value; }, _refresh: function(){ this.element.attr({ "aria-valuemin": this.options.min, "aria-valuemax": this.options.max, "aria-valuenow": this._parse(this.element.val()) }); }, isValid: function(){ var value=this.value(); if(value===null){ return false; } return value===this._adjustValue(value); }, _value: function(value, allowAny){ var parsed; if(value!==""){ parsed=this._parse(value); if(parsed!==null){ if(!allowAny){ parsed=this._adjustValue(parsed); } value=this._format(parsed); }} this.element.val(value); this._refresh(); }, _destroy: function(){ this.element .removeClass("ui-spinner-input") .prop("disabled", false) .removeAttr("autocomplete") .removeAttr("role") .removeAttr("aria-valuemin") .removeAttr("aria-valuemax") .removeAttr("aria-valuenow"); this.uiSpinner.replaceWith(this.element); }, stepUp: spinner_modifier(function(steps){ this._stepUp(steps); }), _stepUp: function(steps){ if(this._start()){ this._spin((steps||1) * this.options.step); this._stop(); }}, stepDown: spinner_modifier(function(steps){ this._stepDown(steps); }), _stepDown: function(steps){ if(this._start()){ this._spin((steps||1) * -this.options.step); this._stop(); }}, pageUp: spinner_modifier(function(pages){ this._stepUp((pages||1) * this.options.page); }), pageDown: spinner_modifier(function(pages){ this._stepDown((pages||1) * this.options.page); }), value: function(newVal){ if(!arguments.length){ return this._parse(this.element.val()); } spinner_modifier(this._value).call(this, newVal); }, widget: function(){ return this.uiSpinner; }}); var tabs=$.widget("ui.tabs", { version: "1.11.4", delay: 300, options: { active: null, collapsible: false, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _isLocal: (function(){ var rhash=/#.*$/; return function(anchor){ var anchorUrl, locationUrl; anchor=anchor.cloneNode(false); anchorUrl=anchor.href.replace(rhash, ""); locationUrl=location.href.replace(rhash, ""); try { anchorUrl=decodeURIComponent(anchorUrl); } catch(error){} try { locationUrl=decodeURIComponent(locationUrl); } catch(error){} return anchor.hash.length > 1&&anchorUrl===locationUrl; };})(), _create: function(){ var that=this, options=this.options; this.running=false; this.element .addClass("ui-tabs ui-widget ui-widget-content ui-corner-all") .toggleClass("ui-tabs-collapsible", options.collapsible); this._processTabs(); options.active=this._initialActive(); if($.isArray(options.disabled)){ options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"), function(li){ return that.tabs.index(li); }) )).sort(); } if(this.options.active!==false&&this.anchors.length){ this.active=this._findActive(options.active); }else{ this.active=$(); } this._refresh(); if(this.active.length){ this.load(options.active); }}, _initialActive: function(){ var active=this.options.active, collapsible=this.options.collapsible, locationHash=location.hash.substring(1); if(active===null){ if(locationHash){ this.tabs.each(function(i, tab){ if($(tab).attr("aria-controls")===locationHash){ active=i; return false; }}); } if(active===null){ active=this.tabs.index(this.tabs.filter(".ui-tabs-active")); } if(active===null||active===-1){ active=this.tabs.length ? 0:false; }} if(active!==false){ active=this.tabs.index(this.tabs.eq(active)); if(active===-1){ active=collapsible ? false:0; }} if(!collapsible&&active===false&&this.anchors.length){ active=0; } return active; }, _getCreateEventData: function(){ return { tab: this.active, panel: !this.active.length ? $():this._getPanelForTab(this.active) };}, _tabKeydown: function(event){ var focusedTab=$(this.document[0].activeElement).closest("li"), selectedIndex=this.tabs.index(focusedTab), goingForward=true; if(this._handlePageNav(event)){ return; } switch(event.keyCode){ case $.ui.keyCode.RIGHT: case $.ui.keyCode.DOWN: selectedIndex++; break; case $.ui.keyCode.UP: case $.ui.keyCode.LEFT: goingForward=false; selectedIndex--; break; case $.ui.keyCode.END: selectedIndex=this.anchors.length - 1; break; case $.ui.keyCode.HOME: selectedIndex=0; break; case $.ui.keyCode.SPACE: event.preventDefault(); clearTimeout(this.activating); this._activate(selectedIndex); return; case $.ui.keyCode.ENTER: event.preventDefault(); clearTimeout(this.activating); this._activate(selectedIndex===this.options.active ? false:selectedIndex); return; default: return; } event.preventDefault(); clearTimeout(this.activating); selectedIndex=this._focusNextTab(selectedIndex, goingForward); if(!event.ctrlKey&&!event.metaKey){ focusedTab.attr("aria-selected", "false"); this.tabs.eq(selectedIndex).attr("aria-selected", "true"); this.activating=this._delay(function(){ this.option("active", selectedIndex); }, this.delay); }}, _panelKeydown: function(event){ if(this._handlePageNav(event)){ return; } if(event.ctrlKey&&event.keyCode===$.ui.keyCode.UP){ event.preventDefault(); this.active.focus(); }}, _handlePageNav: function(event){ if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP){ this._activate(this._focusNextTab(this.options.active - 1, false)); return true; } if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN){ this._activate(this._focusNextTab(this.options.active + 1, true)); return true; }}, _findNextTab: function(index, goingForward){ var lastTabIndex=this.tabs.length - 1; function constrain(){ if(index > lastTabIndex){ index=0; } if(index < 0){ index=lastTabIndex; } return index; } while($.inArray(constrain(), this.options.disabled)!==-1){ index=goingForward ? index + 1:index - 1; } return index; }, _focusNextTab: function(index, goingForward){ index=this._findNextTab(index, goingForward); this.tabs.eq(index).focus(); return index; }, _setOption: function(key, value){ if(key==="active"){ this._activate(value); return; } if(key==="disabled"){ this._setupDisabled(value); return; } this._super(key, value); if(key==="collapsible"){ this.element.toggleClass("ui-tabs-collapsible", value); if(!value&&this.options.active===false){ this._activate(0); }} if(key==="event"){ this._setupEvents(value); } if(key==="heightStyle"){ this._setupHeightStyle(value); }}, _sanitizeSelector: function(hash){ return hash ? hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&"):""; }, refresh: function(){ var options=this.options, lis=this.tablist.children(":has(a[href])"); options.disabled=$.map(lis.filter(".ui-state-disabled"), function(tab){ return lis.index(tab); }); this._processTabs(); if(options.active===false||!this.anchors.length){ options.active=false; this.active=$(); }else if(this.active.length&&!$.contains(this.tablist[ 0 ], this.active[ 0 ])){ if(this.tabs.length===options.disabled.length){ options.active=false; this.active=$(); }else{ this._activate(this._findNextTab(Math.max(0, options.active - 1), false)); }}else{ options.active=this.tabs.index(this.active); } this._refresh(); }, _refresh: function(){ this._setupDisabled(this.options.disabled); this._setupEvents(this.options.event); this._setupHeightStyle(this.options.heightStyle); this.tabs.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }); this.panels.not(this._getPanelForTab(this.active)) .hide() .attr({ "aria-hidden": "true" }); if(!this.active.length){ this.tabs.eq(0).attr("tabIndex", 0); }else{ this.active .addClass("ui-tabs-active ui-state-active") .attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); this._getPanelForTab(this.active) .show() .attr({ "aria-hidden": "false" }); }}, _processTabs: function(){ var that=this, prevTabs=this.tabs, prevAnchors=this.anchors, prevPanels=this.panels; this.tablist=this._getList() .addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all") .attr("role", "tablist") .delegate("> li", "mousedown" + this.eventNamespace, function(event){ if($(this).is(".ui-state-disabled")){ event.preventDefault(); }}) .delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function(){ if($(this).closest("li").is(".ui-state-disabled")){ this.blur(); }}); this.tabs=this.tablist.find("> li:has(a[href])") .addClass("ui-state-default ui-corner-top") .attr({ role: "tab", tabIndex: -1 }); this.anchors=this.tabs.map(function(){ return $("a", this)[ 0 ]; }) .addClass("ui-tabs-anchor") .attr({ role: "presentation", tabIndex: -1 }); this.panels=$(); this.anchors.each(function(i, anchor){ var selector, panel, panelId, anchorId=$(anchor).uniqueId().attr("id"), tab=$(anchor).closest("li"), originalAriaControls=tab.attr("aria-controls"); if(that._isLocal(anchor)){ selector=anchor.hash; panelId=selector.substring(1); panel=that.element.find(that._sanitizeSelector(selector)); }else{ panelId=tab.attr("aria-controls")||$({}).uniqueId()[ 0 ].id; selector="#" + panelId; panel=that.element.find(selector); if(!panel.length){ panel=that._createPanel(panelId); panel.insertAfter(that.panels[ i - 1 ]||that.tablist); } panel.attr("aria-live", "polite"); } if(panel.length){ that.panels=that.panels.add(panel); } if(originalAriaControls){ tab.data("ui-tabs-aria-controls", originalAriaControls); } tab.attr({ "aria-controls": panelId, "aria-labelledby": anchorId }); panel.attr("aria-labelledby", anchorId); }); this.panels .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") .attr("role", "tabpanel"); if(prevTabs){ this._off(prevTabs.not(this.tabs)); this._off(prevAnchors.not(this.anchors)); this._off(prevPanels.not(this.panels)); }}, _getList: function(){ return this.tablist||this.element.find("ol,ul").eq(0); }, _createPanel: function(id){ return $("
") .attr("id", id) .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") .data("ui-tabs-destroy", true); }, _setupDisabled: function(disabled){ if($.isArray(disabled)){ if(!disabled.length){ disabled=false; }else if(disabled.length===this.anchors.length){ disabled=true; }} for(var i=0, li;(li=this.tabs[ i ]); i++){ if(disabled===true||$.inArray(i, disabled)!==-1){ $(li) .addClass("ui-state-disabled") .attr("aria-disabled", "true"); }else{ $(li) .removeClass("ui-state-disabled") .removeAttr("aria-disabled"); }} this.options.disabled=disabled; }, _setupEvents: function(event){ var events={}; if(event){ $.each(event.split(" "), function(index, eventName){ events[ eventName ]="_eventHandler"; }); } this._off(this.anchors.add(this.tabs).add(this.panels)); this._on(true, this.anchors, { click: function(event){ event.preventDefault(); }}); this._on(this.anchors, events); this._on(this.tabs, { keydown: "_tabKeydown" }); this._on(this.panels, { keydown: "_panelKeydown" }); this._focusable(this.tabs); this._hoverable(this.tabs); }, _setupHeightStyle: function(heightStyle){ var maxHeight, parent=this.element.parent(); if(heightStyle==="fill"){ maxHeight=parent.height(); maxHeight -=this.element.outerHeight() - this.element.height(); this.element.siblings(":visible").each(function(){ var elem=$(this), position=elem.css("position"); if(position==="absolute"||position==="fixed"){ return; } maxHeight -=elem.outerHeight(true); }); this.element.children().not(this.panels).each(function(){ maxHeight -=$(this).outerHeight(true); }); this.panels.each(function(){ $(this).height(Math.max(0, maxHeight - $(this).innerHeight() + $(this).height())); }) .css("overflow", "auto"); }else if(heightStyle==="auto"){ maxHeight=0; this.panels.each(function(){ maxHeight=Math.max(maxHeight, $(this).height("").height()); }).height(maxHeight); }}, _eventHandler: function(event){ var options=this.options, active=this.active, anchor=$(event.currentTarget), tab=anchor.closest("li"), clickedIsActive=tab[ 0 ]===active[ 0 ], collapsing=clickedIsActive&&options.collapsible, toShow=collapsing ? $():this._getPanelForTab(tab), toHide = !active.length ? $():this._getPanelForTab(active), eventData={ oldTab: active, oldPanel: toHide, newTab: collapsing ? $():tab, newPanel: toShow }; event.preventDefault(); if(tab.hasClass("ui-state-disabled") || tab.hasClass("ui-tabs-loading") || this.running || (clickedIsActive&&!options.collapsible) || (this._trigger("beforeActivate", event, eventData)===false)){ return; } options.active=collapsing ? false:this.tabs.index(tab); this.active=clickedIsActive ? $():tab; if(this.xhr){ this.xhr.abort(); } if(!toHide.length&&!toShow.length){ $.error("jQuery UI Tabs: Mismatching fragment identifier."); } if(toShow.length){ this.load(this.tabs.index(tab), event); } this._toggle(event, eventData); }, _toggle: function(event, eventData){ var that=this, toShow=eventData.newPanel, toHide=eventData.oldPanel; this.running=true; function complete(){ that.running=false; that._trigger("activate", event, eventData); } function show(){ eventData.newTab.closest("li").addClass("ui-tabs-active ui-state-active"); if(toShow.length&&that.options.show){ that._show(toShow, that.options.show, complete); }else{ toShow.show(); complete(); }} if(toHide.length&&this.options.hide){ this._hide(toHide, this.options.hide, function(){ eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"); show(); }); }else{ eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"); toHide.hide(); show(); } toHide.attr("aria-hidden", "true"); eventData.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }); if(toShow.length&&toHide.length){ eventData.oldTab.attr("tabIndex", -1); }else if(toShow.length){ this.tabs.filter(function(){ return $(this).attr("tabIndex")===0; }) .attr("tabIndex", -1); } toShow.attr("aria-hidden", "false"); eventData.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); }, _activate: function(index){ var anchor, active=this._findActive(index); if(active[ 0 ]===this.active[ 0 ]){ return; } if(!active.length){ active=this.active; } anchor=active.find(".ui-tabs-anchor")[ 0 ]; this._eventHandler({ target: anchor, currentTarget: anchor, preventDefault: $.noop }); }, _findActive: function(index){ return index===false ? $():this.tabs.eq(index); }, _getIndex: function(index){ if(typeof index==="string"){ index=this.anchors.index(this.anchors.filter("[href$='" + index + "']")); } return index; }, _destroy: function(){ if(this.xhr){ this.xhr.abort(); } this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"); this.tablist .removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all") .removeAttr("role"); this.anchors .removeClass("ui-tabs-anchor") .removeAttr("role") .removeAttr("tabIndex") .removeUniqueId(); this.tablist.unbind(this.eventNamespace); this.tabs.add(this.panels).each(function(){ if($.data(this, "ui-tabs-destroy")){ $(this).remove(); }else{ $(this) .removeClass("ui-state-default ui-state-active ui-state-disabled " + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel") .removeAttr("tabIndex") .removeAttr("aria-live") .removeAttr("aria-busy") .removeAttr("aria-selected") .removeAttr("aria-labelledby") .removeAttr("aria-hidden") .removeAttr("aria-expanded") .removeAttr("role"); }}); this.tabs.each(function(){ var li=$(this), prev=li.data("ui-tabs-aria-controls"); if(prev){ li .attr("aria-controls", prev) .removeData("ui-tabs-aria-controls"); }else{ li.removeAttr("aria-controls"); }}); this.panels.show(); if(this.options.heightStyle!=="content"){ this.panels.css("height", ""); }}, enable: function(index){ var disabled=this.options.disabled; if(disabled===false){ return; } if(index===undefined){ disabled=false; }else{ index=this._getIndex(index); if($.isArray(disabled)){ disabled=$.map(disabled, function(num){ return num!==index ? num:null; }); }else{ disabled=$.map(this.tabs, function(li, num){ return num!==index ? num:null; }); }} this._setupDisabled(disabled); }, disable: function(index){ var disabled=this.options.disabled; if(disabled===true){ return; } if(index===undefined){ disabled=true; }else{ index=this._getIndex(index); if($.inArray(index, disabled)!==-1){ return; } if($.isArray(disabled)){ disabled=$.merge([ index ], disabled).sort(); }else{ disabled=[ index ]; }} this._setupDisabled(disabled); }, load: function(index, event){ index=this._getIndex(index); var that=this, tab=this.tabs.eq(index), anchor=tab.find(".ui-tabs-anchor"), panel=this._getPanelForTab(tab), eventData={ tab: tab, panel: panel }, complete=function(jqXHR, status){ if(status==="abort"){ that.panels.stop(false, true); } tab.removeClass("ui-tabs-loading"); panel.removeAttr("aria-busy"); if(jqXHR===that.xhr){ delete that.xhr; }}; if(this._isLocal(anchor[ 0 ])){ return; } this.xhr=$.ajax(this._ajaxSettings(anchor, event, eventData)); if(this.xhr&&this.xhr.statusText!=="canceled"){ tab.addClass("ui-tabs-loading"); panel.attr("aria-busy", "true"); this.xhr .done(function(response, status, jqXHR){ setTimeout(function(){ panel.html(response); that._trigger("load", event, eventData); complete(jqXHR, status); }, 1); }) .fail(function(jqXHR, status){ setTimeout(function(){ complete(jqXHR, status); }, 1); }); }}, _ajaxSettings: function(anchor, event, eventData){ var that=this; return { url: anchor.attr("href"), beforeSend: function(jqXHR, settings){ return that._trigger("beforeLoad", event, $.extend({ jqXHR: jqXHR, ajaxSettings: settings }, eventData)); }};}, _getPanelForTab: function(tab){ var id=$(tab).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + id)); }}); var tooltip=$.widget("ui.tooltip", { version: "1.11.4", options: { content: function(){ var title=$(this).attr("title")||""; return $("").text(title).html(); }, hide: true, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: true, tooltipClass: null, track: false, close: null, open: null }, _addDescribedBy: function(elem, id){ var describedby=(elem.attr("aria-describedby")||"").split(/\s+/); describedby.push(id); elem .data("ui-tooltip-id", id) .attr("aria-describedby", $.trim(describedby.join(" "))); }, _removeDescribedBy: function(elem){ var id=elem.data("ui-tooltip-id"), describedby=(elem.attr("aria-describedby")||"").split(/\s+/), index=$.inArray(id, describedby); if(index!==-1){ describedby.splice(index, 1); } elem.removeData("ui-tooltip-id"); describedby=$.trim(describedby.join(" ")); if(describedby){ elem.attr("aria-describedby", describedby); }else{ elem.removeAttr("aria-describedby"); }}, _create: function(){ this._on({ mouseover: "open", focusin: "open" }); this.tooltips={}; this.parents={}; if(this.options.disabled){ this._disable(); } this.liveRegion=$("
") .attr({ role: "log", "aria-live": "assertive", "aria-relevant": "additions" }) .addClass("ui-helper-hidden-accessible") .appendTo(this.document[ 0 ].body); }, _setOption: function(key, value){ var that=this; if(key==="disabled"){ this[ value ? "_disable":"_enable" ](); this.options[ key ]=value; return; } this._super(key, value); if(key==="content"){ $.each(this.tooltips, function(id, tooltipData){ that._updateContent(tooltipData.element); }); }}, _disable: function(){ var that=this; $.each(this.tooltips, function(id, tooltipData){ var event=$.Event("blur"); event.target=event.currentTarget=tooltipData.element[ 0 ]; that.close(event, true); }); this.element.find(this.options.items).addBack().each(function(){ var element=$(this); if(element.is("[title]")){ element .data("ui-tooltip-title", element.attr("title")) .removeAttr("title"); }}); }, _enable: function(){ this.element.find(this.options.items).addBack().each(function(){ var element=$(this); if(element.data("ui-tooltip-title")){ element.attr("title", element.data("ui-tooltip-title")); }}); }, open: function(event){ var that=this, target=$(event ? event.target:this.element) .closest(this.options.items); if(!target.length||target.data("ui-tooltip-id")){ return; } if(target.attr("title")){ target.data("ui-tooltip-title", target.attr("title")); } target.data("ui-tooltip-open", true); if(event&&event.type==="mouseover"){ target.parents().each(function(){ var parent=$(this), blurEvent; if(parent.data("ui-tooltip-open")){ blurEvent=$.Event("blur"); blurEvent.target=blurEvent.currentTarget=this; that.close(blurEvent, true); } if(parent.attr("title")){ parent.uniqueId(); that.parents[ this.id ]={ element: this, title: parent.attr("title") }; parent.attr("title", ""); }}); } this._registerCloseHandlers(event, target); this._updateContent(target, event); }, _updateContent: function(target, event){ var content, contentOption=this.options.content, that=this, eventType=event ? event.type:null; if(typeof contentOption==="string"){ return this._open(event, target, contentOption); } content=contentOption.call(target[0], function(response){ that._delay(function(){ if(!target.data("ui-tooltip-open")){ return; } if(event){ event.type=eventType; } this._open(event, target, response); }); }); if(content){ this._open(event, target, content); }}, _open: function(event, target, content){ var tooltipData, tooltip, delayedShow, a11yContent, positionOption=$.extend({}, this.options.position); if(!content){ return; } tooltipData=this._find(target); if(tooltipData){ tooltipData.tooltip.find(".ui-tooltip-content").html(content); return; } if(target.is("[title]")){ if(event&&event.type==="mouseover"){ target.attr("title", ""); }else{ target.removeAttr("title"); }} tooltipData=this._tooltip(target); tooltip=tooltipData.tooltip; this._addDescribedBy(target, tooltip.attr("id")); tooltip.find(".ui-tooltip-content").html(content); this.liveRegion.children().hide(); if(content.clone){ a11yContent=content.clone(); a11yContent.removeAttr("id").find("[id]").removeAttr("id"); }else{ a11yContent=content; } $("
").html(a11yContent).appendTo(this.liveRegion); function position(event){ positionOption.of=event; if(tooltip.is(":hidden")){ return; } tooltip.position(positionOption); } if(this.options.track&&event&&/^mouse/.test(event.type)){ this._on(this.document, { mousemove: position }); position(event); }else{ tooltip.position($.extend({ of: target }, this.options.position)); } tooltip.hide(); this._show(tooltip, this.options.show); if(this.options.show&&this.options.show.delay){ delayedShow=this.delayedShow=setInterval(function(){ if(tooltip.is(":visible")){ position(positionOption.of); clearInterval(delayedShow); }}, $.fx.interval); } this._trigger("open", event, { tooltip: tooltip }); }, _registerCloseHandlers: function(event, target){ var events={ keyup: function(event){ if(event.keyCode===$.ui.keyCode.ESCAPE){ var fakeEvent=$.Event(event); fakeEvent.currentTarget=target[0]; this.close(fakeEvent, true); }} }; if(target[ 0 ]!==this.element[ 0 ]){ events.remove=function(){ this._removeTooltip(this._find(target).tooltip); };} if(!event||event.type==="mouseover"){ events.mouseleave="close"; } if(!event||event.type==="focusin"){ events.focusout="close"; } this._on(true, target, events); }, close: function(event){ var tooltip, that=this, target=$(event ? event.currentTarget:this.element), tooltipData=this._find(target); if(!tooltipData){ target.removeData("ui-tooltip-open"); return; } tooltip=tooltipData.tooltip; if(tooltipData.closing){ return; } clearInterval(this.delayedShow); if(target.data("ui-tooltip-title")&&!target.attr("title")){ target.attr("title", target.data("ui-tooltip-title")); } this._removeDescribedBy(target); tooltipData.hiding=true; tooltip.stop(true); this._hide(tooltip, this.options.hide, function(){ that._removeTooltip($(this)); }); target.removeData("ui-tooltip-open"); this._off(target, "mouseleave focusout keyup"); if(target[ 0 ]!==this.element[ 0 ]){ this._off(target, "remove"); } this._off(this.document, "mousemove"); if(event&&event.type==="mouseleave"){ $.each(this.parents, function(id, parent){ $(parent.element).attr("title", parent.title); delete that.parents[ id ]; }); } tooltipData.closing=true; this._trigger("close", event, { tooltip: tooltip }); if(!tooltipData.hiding){ tooltipData.closing=false; }}, _tooltip: function(element){ var tooltip=$("
") .attr("role", "tooltip") .addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass||"")), id=tooltip.uniqueId().attr("id"); $("
") .addClass("ui-tooltip-content") .appendTo(tooltip); tooltip.appendTo(this.document[0].body); return this.tooltips[ id ]={ element: element, tooltip: tooltip };}, _find: function(target){ var id=target.data("ui-tooltip-id"); return id ? this.tooltips[ id ]:null; }, _removeTooltip: function(tooltip){ tooltip.remove(); delete this.tooltips[ tooltip.attr("id") ]; }, _destroy: function(){ var that=this; $.each(this.tooltips, function(id, tooltipData){ var event=$.Event("blur"), element=tooltipData.element; event.target=event.currentTarget=element[ 0 ]; that.close(event, true); $("#" + id).remove(); if(element.data("ui-tooltip-title")){ if(!element.attr("title")){ element.attr("title", element.data("ui-tooltip-title")); } element.removeData("ui-tooltip-title"); }}); this.liveRegion.remove(); }}); })); (function (e){ function t(){ var e=location.href; hashtag=e.indexOf("#prettyPhoto")!==-1 ? decodeURI(e.substring(e.indexOf("#prettyPhoto") + 1, e.length)):false; return hashtag } function n(){ if(typeof theRel=="undefined")return; location.hash=theRel + "/" + rel_index + "/" } function r(){ if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto" } function i(e, t){ e=e.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var n="[\\?&]" + e + "=([^&#]*)"; var r=new RegExp(n); var i=r.exec(t); return i==null ? "":i[1] } e.prettyPhoto={version: "3.1.5"}; e.fn.prettyPhoto=function (s){ function g(){ e(".pp_loaderIcon").hide(); projectedTop=scroll_pos["scrollTop"] + (d / 2 - a["containerHeight"] / 2); if(projectedTop < 0)projectedTop=0; $ppt.fadeTo(settings.animation_speed, 1); $pp_pic_holder.find(".pp_content").animate({height: a["contentHeight"], width: a["contentWidth"]}, settings.animation_speed); $pp_pic_holder.animate({top: projectedTop, left: v / 2 - a["containerWidth"] / 2 < 0 ? 0:v / 2 - a["containerWidth"] / 2, width: a["containerWidth"]}, settings.animation_speed, function (){ $pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]); $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed); if(isSet&&S(pp_images[set_position])=="image"){ $pp_pic_holder.find(".pp_hoverContainer").show() }else{ $pp_pic_holder.find(".pp_hoverContainer").hide() } if(settings.allow_expand){ if(a["resized"]){ e("a.pp_expand,a.pp_contract").show() }else{ e("a.pp_expand").hide() }} if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow(); settings.changepicturecallback(); f=true }); C(); s.ajaxcallback() } function y(t){ $pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden"); $pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function (){ e(".pp_loaderIcon").show(); t() }) } function b(t){ t > 1 ? e(".pp_nav").show():e(".pp_nav").hide() } function w(e, t){ resized=false; E(e, t); imageWidth=e, imageHeight=t; if((p > v||h > d)&&doresize&&settings.allow_resize&&!u){ resized=true, fitting=false; while (!fitting){ if(p > v){ imageWidth=v - 200; imageHeight=t / e * imageWidth }else if(h > d){ imageHeight=d - 200; imageWidth=e / t * imageHeight }else{ fitting=true } h=imageHeight, p=imageWidth } if(p > v||h > d){ w(p, h) } E(imageWidth, imageHeight) } return{width: Math.floor(imageWidth), height: Math.floor(imageHeight), containerHeight: Math.floor(h), containerWidth: Math.floor(p) + settings.horizontal_padding * 2, contentHeight: Math.floor(l), contentWidth: Math.floor(c), resized: resized}} function E(t, n){ t=parseFloat(t); n=parseFloat(n); $pp_details=$pp_pic_holder.find(".pp_details"); $pp_details.width(t); detailsHeight=parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom")); $pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position: "absolute", top: -1e4}); detailsHeight +=$pp_details.height(); detailsHeight=detailsHeight <=34 ? 36:detailsHeight; $pp_details.remove(); $pp_title=$pp_pic_holder.find(".ppt"); $pp_title.width(t); titleHeight=parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom")); $pp_title=$pp_title.clone().appendTo(e("body")).css({position: "absolute", top: -1e4}); titleHeight +=$pp_title.height(); $pp_title.remove(); l=n + detailsHeight; c=t; h=l + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height(); p=t } function S(e){ if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){ return"youtube" }else if(e.match(/vimeo\.com/i)){ return"vimeo" }else if(e.match(/\b.mov\b/i)){ return"quicktime" }else if(e.match(/\b.swf\b/i)){ return"flash" }else if(e.match(/\biframe=true\b/i)){ return"iframe" }else if(e.match(/\bajax=true\b/i)){ return"ajax" }else if(e.match(/\bcustom=true\b/i)){ return"custom" }else if(e.substr(0, 1)=="#"){ return"inline" }else{ return"image" }} function x(){ if(doresize&&typeof $pp_pic_holder!="undefined"){ scroll_pos=T(); contentHeight=$pp_pic_holder.height(), contentwidth=$pp_pic_holder.width(); projectedTop=d / 2 + scroll_pos["scrollTop"] - contentHeight / 2; if(projectedTop < 0)projectedTop=0; if(contentHeight > d)return; $pp_pic_holder.css({top: projectedTop, left: v / 2 + scroll_pos["scrollLeft"] - contentwidth / 2}) }} function T(){ if(self.pageYOffset){ return{scrollTop: self.pageYOffset, scrollLeft: self.pageXOffset}}else if(document.documentElement&&document.documentElement.scrollTop){ return{scrollTop: document.documentElement.scrollTop, scrollLeft: document.documentElement.scrollLeft}}else if(document.body){ return{scrollTop: document.body.scrollTop, scrollLeft: document.body.scrollLeft}} } function N(){ d=e(window).height(), v=e(window).width(); if(typeof $pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v) } function C(){ if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){ itemWidth=52 + 5; navWidth=settings.theme=="facebook"||settings.theme=="pp_default" ? 50:30; itemsPerPage=Math.floor((a["containerWidth"] - 100 - navWidth) / itemWidth); itemsPerPage=itemsPerPage < pp_images.length ? itemsPerPage:pp_images.length; totalPage=Math.ceil(pp_images.length / itemsPerPage) - 1; if(totalPage==0){ navWidth=0; $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide() }else{ $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show() } galleryWidth=itemsPerPage * itemWidth; fullGalleryWidth=pp_images.length * itemWidth; $pp_gallery.css("margin-left", -(galleryWidth / 2 + navWidth / 2)).find("div:first").width(galleryWidth + 5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"); goToPage=Math.floor(set_position / itemsPerPage) < totalPage ? Math.floor(set_position / itemsPerPage):totalPage; e.prettyPhoto.changeGalleryPage(goToPage); $pp_gallery_li.filter(":eq(" + set_position + ")").addClass("selected") }else{ $pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave") }} function k(t){ if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}", encodeURIComponent(location.href)); settings.markup=settings.markup.replace("{pp_social}", ""); e("body").append(settings.markup); $pp_pic_holder=e(".pp_pic_holder"), $ppt=e(".ppt"), $pp_overlay=e("div.pp_overlay"); if(isSet&&settings.overlay_gallery){ currentGalleryPage=0; toInject=""; for (var n=0; n < pp_images.length; n++){ if(!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)){ classname="default"; img_src="" }else{ classname=""; img_src=pp_images[n] } toInject +="
  • " } toInject=settings.gallery_markup.replace(/{gallery}/g, toInject); $pp_pic_holder.find("#pp_full_res").after(toInject); $pp_gallery=e(".pp_pic_holder .pp_gallery"), $pp_gallery_li=$pp_gallery.find("li"); $pp_gallery.find(".pp_arrow_next").click(function (){ e.prettyPhoto.changeGalleryPage("next"); e.prettyPhoto.stopSlideshow(); return false }); $pp_gallery.find(".pp_arrow_previous").click(function (){ e.prettyPhoto.changeGalleryPage("previous"); e.prettyPhoto.stopSlideshow(); return false }); $pp_pic_holder.find(".pp_content").hover(function (){ $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn() }, function (){ $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut() }); itemWidth=52 + 5; $pp_gallery_li.each(function (t){ e(this).find("a").click(function (){ e.prettyPhoto.changePage(t); e.prettyPhoto.stopSlideshow(); return false }) }) } if(settings.slideshow){ $pp_pic_holder.find(".pp_nav").prepend('Play'); $pp_pic_holder.find(".pp_nav .pp_play").click(function (){ e.prettyPhoto.startSlideshow(); return false }) } $pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme); $pp_overlay.css({opacity: 0, height: e(document).height(), width: e(window).width()}).bind("click", function (){ if(!settings.modal)e.prettyPhoto.close() }); e("a.pp_close").bind("click", function (){ e.prettyPhoto.close(); return false }); if(settings.allow_expand){ e("a.pp_expand").bind("click", function (t){ if(e(this).hasClass("pp_expand")){ e(this).removeClass("pp_expand").addClass("pp_contract"); doresize=false }else{ e(this).removeClass("pp_contract").addClass("pp_expand"); doresize=true } y(function (){ e.prettyPhoto.open() }); return false }) } $pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function (){ e.prettyPhoto.changePage("previous"); e.prettyPhoto.stopSlideshow(); return false }); $pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function (){ e.prettyPhoto.changePage("next"); e.prettyPhoto.stopSlideshow(); return false }); x() } s=jQuery.extend({hook: "rel", animation_speed: "fast", ajaxcallback: function (){ }, slideshow: 5e3, autoplay_slideshow: false, opacity: .8, show_title: true, allow_resize: true, allow_expand: true, default_width: 500, default_height: 344, counter_separator_label: "/", theme: "pp_default", horizontal_padding: 20, hideflash: false, wmode: "opaque", autoplay: true, modal: false, deeplinking: true, overlay_gallery: true, overlay_gallery_max: 30, keyboard_shortcuts: true, changepicturecallback: function (){ }, callback: function (){ }, ie6_fallback: true, markup: '
     
    ', gallery_markup: '', image_markup: '', flash_markup: '', quicktime_markup: '', iframe_markup: '', inline_markup: '
    {content}
    ', custom_markup: "", social_tools: ''}, s); var o=this, u=false, a, f, l, c, h, p, d=e(window).height(), v=e(window).width(), m; doresize=true, scroll_pos=T(); e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto", function (){ x(); N() }); if(s.keyboard_shortcuts){ e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto", function (t){ if(typeof $pp_pic_holder!="undefined"){ if($pp_pic_holder.is(":visible")){ switch (t.keyCode){ case 37: e.prettyPhoto.changePage("previous"); t.preventDefault(); break; case 39: e.prettyPhoto.changePage("next"); t.preventDefault(); break; case 27: if(!settings.modal)e.prettyPhoto.close(); t.preventDefault(); break }} }}) } e.prettyPhoto.initialize=function (){ settings=s; if(settings.theme=="pp_default")settings.horizontal_padding=16; theRel=e(this).attr(settings.hook); galleryRegExp=/\[(?:.*)\]/; isSet=galleryRegExp.exec(theRel) ? true:false; pp_images=isSet ? jQuery.map(o, function (t, n){ if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("href") }):e.makeArray(e(this).attr("href")); pp_titles=isSet ? jQuery.map(o, function (t, n){ if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).find("img").attr("alt") ? e(t).find("img").attr("alt"):"" }):e.makeArray(e(this).find("img").attr("alt")); pp_descriptions=isSet ? jQuery.map(o, function (t, n){ if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("title") ? e(t).attr("title"):"" }):e.makeArray(e(this).attr("title")); if(pp_images.length > settings.overlay_gallery_max)settings.overlay_gallery=false; set_position=jQuery.inArray(e(this).attr("href"), pp_images); rel_index=isSet ? set_position:e("a[" + settings.hook + "^='" + theRel + "']").index(e(this)); k(this); if(settings.allow_resize)e(window).bind("scroll.prettyphoto", function (){ x() }); e.prettyPhoto.open(); return false }; e.prettyPhoto.open=function (t){ if(typeof settings=="undefined"){ settings=s; pp_images=e.makeArray(arguments[0]); pp_titles=arguments[1] ? e.makeArray(arguments[1]):e.makeArray(""); pp_descriptions=arguments[2] ? e.makeArray(arguments[2]):e.makeArray(""); isSet=pp_images.length > 1 ? true:false; set_position=arguments[3] ? arguments[3]:0; k(t.target) } if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "hidden"); b(e(pp_images).size()); e(".pp_loaderIcon").show(); if(settings.deeplinking)n(); if(settings.social_tools){ facebook_like_link=settings.social_tools.replace("{location_href}", encodeURIComponent(location.href)); $pp_pic_holder.find(".pp_social").html(facebook_like_link) } if($ppt.is(":hidden"))$ppt.css("opacity", 0).show(); $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); $pp_pic_holder.find(".currentTextHolder").text(set_position + 1 + settings.counter_separator_label + e(pp_images).size()); if(typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){ $pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])) }else{ $pp_pic_holder.find(".pp_description").hide() } movie_width=parseFloat(i("width", pp_images[set_position])) ? i("width", pp_images[set_position]):settings.default_width.toString(); movie_height=parseFloat(i("height", pp_images[set_position])) ? i("height", pp_images[set_position]):settings.default_height.toString(); u=false; if(movie_height.indexOf("%")!=-1){ movie_height=parseFloat(e(window).height() * parseFloat(movie_height) / 100 - 150); u=true } if(movie_width.indexOf("%")!=-1){ movie_width=parseFloat(e(window).width() * parseFloat(movie_width) / 100 - 150); u=true } $pp_pic_holder.fadeIn(function (){ settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined" ? $ppt.html(unescape(pp_titles[set_position])):$ppt.html(" "); imgPreloader=""; skipInjection=false; switch (S(pp_images[set_position])){ case"image": imgPreloader=new Image; nextImage=new Image; if(isSet&&set_position < e(pp_images).size() - 1)nextImage.src=pp_images[set_position + 1]; prevImage=new Image; if(isSet&&pp_images[set_position - 1])prevImage.src=pp_images[set_position - 1]; $pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g, pp_images[set_position]); imgPreloader.onload=function (){ a=w(imgPreloader.width, imgPreloader.height); g() }; imgPreloader.onerror=function (){ alert("Image cannot be loaded. Make sure the path is correct and image exist."); e.prettyPhoto.close() }; imgPreloader.src=pp_images[set_position]; break; case"youtube": a=w(movie_width, movie_height); movie_id=i("v", pp_images[set_position]); if(movie_id==""){ movie_id=pp_images[set_position].split("youtu.be/"); movie_id=movie_id[1]; if(movie_id.indexOf("?") > 0)movie_id=movie_id.substr(0, movie_id.indexOf("?")); if(movie_id.indexOf("&") > 0)movie_id=movie_id.substr(0, movie_id.indexOf("&")) } movie="http://www.youtube.com/embed/" + movie_id; i("rel", pp_images[set_position]) ? movie +="?rel=" + i("rel", pp_images[set_position]):movie +="?rel=1"; if(settings.autoplay)movie +="&autoplay=1"; toInject=settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie); break; case"vimeo": a=w(movie_width, movie_height); movie_id=pp_images[set_position]; var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/; var n=movie_id.match(t); movie="http://player.vimeo.com/video/" + n[3] + "?title=0&byline=0&portrait=0"; if(settings.autoplay)movie +="&autoplay=1;"; vimeo_width=a["width"] + "/embed/?moog_width=" + a["width"]; toInject=settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, a["height"]).replace(/{path}/g, movie); break; case"quicktime": a=w(movie_width, movie_height); a["height"] +=15; a["contentHeight"] +=15; a["containerHeight"] +=15; toInject=settings.quicktime_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); break; case"flash": a=w(movie_width, movie_height); flash_vars=pp_images[set_position]; flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars") + 10, pp_images[set_position].length); filename=pp_images[set_position]; filename=filename.substring(0, filename.indexOf("?")); toInject=settings.flash_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + "?" + flash_vars); break; case"iframe": a=w(movie_width, movie_height); frame_url=pp_images[set_position]; frame_url=frame_url.substr(0, frame_url.indexOf("iframe") - 1); toInject=settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{path}/g, frame_url); break; case"ajax": doresize=false; a=w(movie_width, movie_height); doresize=true; skipInjection=true; e.get(pp_images[set_position], function (e){ toInject=settings.inline_markup.replace(/{content}/g, e); $pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject; g() }); break; case"custom": a=w(movie_width, movie_height); toInject=settings.custom_markup; break; case"inline": myClone=e(pp_images[set_position]).clone().append('
    ').css({width: settings.default_width}).wrapInner('
    ').appendTo(e("body")).show(); doresize=false; a=w(e(myClone).width(), e(myClone).height()); doresize=true; e(myClone).remove(); toInject=settings.inline_markup.replace(/{content}/g, e(pp_images[set_position]).html()); break } if(!imgPreloader&&!skipInjection){ $pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject; g() }}); return false }; e.prettyPhoto.changePage=function (t){ currentGalleryPage=0; if(t=="previous"){ set_position--; if(set_position < 0)set_position=e(pp_images).size() - 1 }else if(t=="next"){ set_position++; if(set_position > e(pp_images).size() - 1)set_position=0 }else{ set_position=t } rel_index=set_position; if(!doresize)doresize=true; if(settings.allow_expand){ e(".pp_contract").removeClass("pp_contract").addClass("pp_expand") } y(function (){ e.prettyPhoto.open() }) }; e.prettyPhoto.changeGalleryPage=function (e){ if(e=="next"){ currentGalleryPage++; if(currentGalleryPage > totalPage)currentGalleryPage=0 }else if(e=="previous"){ currentGalleryPage--; if(currentGalleryPage < 0)currentGalleryPage=totalPage }else{ currentGalleryPage=e } slide_speed=e=="next"||e=="previous" ? settings.animation_speed:0; slide_to=currentGalleryPage * itemsPerPage * itemWidth; $pp_gallery.find("ul").animate({left: -slide_to}, slide_speed) }; e.prettyPhoto.startSlideshow=function (){ if(typeof m=="undefined"){ $pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function (){ e.prettyPhoto.stopSlideshow(); return false }); m=setInterval(e.prettyPhoto.startSlideshow, settings.slideshow) }else{ e.prettyPhoto.changePage("next") }}; e.prettyPhoto.stopSlideshow=function (){ $pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function (){ e.prettyPhoto.startSlideshow(); return false }); clearInterval(m); m=undefined }; e.prettyPhoto.close=function (){ if($pp_overlay.is(":animated"))return; e.prettyPhoto.stopSlideshow(); $pp_pic_holder.stop().find("object,embed").css("visibility", "hidden"); e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed, function (){ e(this).remove() }); $pp_overlay.fadeOut(settings.animation_speed, function (){ if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "visible"); e(this).remove(); e(window).unbind("scroll.prettyphoto"); r(); settings.callback(); doresize=true; f=false; delete settings }) }; if(!pp_alreadyInitialized&&t()){ pp_alreadyInitialized=true; hashIndex=t(); hashRel=hashIndex; hashIndex=hashIndex.substring(hashIndex.indexOf("/") + 1, hashIndex.length - 1); hashRel=hashRel.substring(0, hashRel.indexOf("/")); setTimeout(function (){ e("a[" + s.hook + "^='" + hashRel + "']:eq(" + hashIndex + ")").trigger("click") }, 50) } return this.unbind("click.prettyphoto").bind("click.prettyphoto", e.prettyPhoto.initialize) };})(jQuery); var pp_alreadyInitialized=false; (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var y="1.6.9",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipetp=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipetp")}}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}return G};f.fn.swipetp.version=y;f.fn.swipetp.defaults=n;f.fn.swipetp.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipetp.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipetp.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipetp.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipetp.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,aw){var aA=(a||d||!aw.fallbackToMouseEvents),K=aA?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",az=aA?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=aA?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=aA?null:"mouseleave",aE=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ah=0,aQ=null,ac=0,a2=0,a0=0,H=1,ar=0,aK=0,N=null;var aS=f(a5);var aa="start";var X=0;var aR=null;var U=0,a3=0,a6=0,ae=0,O=0;var aX=null,ag=null;try{aS.bind(K,aO);aS.bind(aE,ba)}catch(al){f.error("events not supported "+K+","+aE+" on jQuery.swipetp")}this.enable=function(){aS.bind(K,aO);aS.bind(aE,ba);return aS};this.disable=function(){aL();return aS};this.destroy=function(){aL();aS.data(C,null);aS=null};this.option=function(bd,bc){if(aw[bd]!==undefined){if(bc===undefined){return aw[bd]}else{aw[bd]=bc}}else{f.error("Option "+bd+" does not exist on jQuery.swipetp.options")}return null};function aO(be){if(aC()){return}if(f(be.target).closest(aw.excludedElements,aS).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{be.preventDefault()}ah=0;aQ=null;aK=null;ac=0;a2=0;a0=0;H=1;ar=0;aR=ak();N=ab();S();if(!bg||(X===aw.fingers||aw.fingers===i)||aY()){aj(0,bc);U=au();if(X==2){aj(1,bg[1]);a2=a0=av(aR[0].start,aR[1].start)}if(aw.swipeStatus||aw.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(aw.hold){ag=setTimeout(f.proxy(function(){aS.trigger("hold",[bf.target]);if(aw.hold){bd=aw.hold.call(aS,bf,bf.target)}},this),aw.longTapThreshold)}ap(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||an()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aI(bd);a3=au();if(bj){X=bj.length}if(aw.hold){clearTimeout(ag)}aa=k;if(X==2){if(a2==0){aj(1,bj[1]);a2=a0=av(aR[0].start,aR[1].start)}else{aI(bj[1]);a0=av(aR[0].end,aR[1].end);aK=at(aR[0].end,aR[1].end)}H=a8(a2,a0);ar=Math.abs(a2-a0)}if((X===aw.fingers||aw.fingers===i)||!bj||aY()){aQ=aM(bg.start,bg.end);am(bf,aQ);ah=aT(bg.start,bg.end);ac=aN();aJ(aQ,ah);if(aw.swipeStatus||aw.pinchStatus){be=P(bi,aa)}if(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave){var bc=true;if(aw.triggerOnTouchLeave){var bh=aZ(this);bc=F(bg.end,bh)}if(!aw.triggerOnTouchEnd&&bc){aa=aD(k)}else{if(aw.triggerOnTouchLeave&&!bc){aa=aD(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length){G();return true}}if(an()){X=ae}a3=au();ac=aN();if(bb()||!ao()){aa=q;P(bd,aa)}else{if(aw.triggerOnTouchEnd||(aw.triggerOnTouchEnd==false&&aa===k)){bc.preventDefault();aa=h;P(bd,aa)}else{if(!aw.triggerOnTouchEnd&&a7()){aa=h;aG(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}ap(false);return null}function ba(){X=0;a3=0;U=0;a2=0;a0=0;H=1;S();ap(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(aw.triggerOnTouchLeave){aa=aD(h);P(bd,aa)}}function aL(){aS.unbind(K,aO);aS.unbind(aE,ba);aS.unbind(az,a4);aS.unbind(V,M);if(T){aS.unbind(T,L)}ap(false)}function aD(bg){var bf=bg;var be=aB();var bd=ao();var bc=bb();if(!be||bc){bf=q}else{if(bd&&bg==k&&(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave)){bf=h}else{if(!bd&&bg==h&&aw.triggerOnTouchLeave){bf=q}}}return bf}function P(be,bc){var bd,bf=be.touches;if((J()||W())||(Q()||aY())){if(J()||W()){bd=aG(be,bc,l)}if((Q()||aY())&&bd!==false){bd=aG(be,bc,t)}}else{if(aH()&&bd!==false){bd=aG(be,bc,j)}else{if(aq()&&bd!==false){bd=aG(be,bc,b)}else{if(ai()&&bd!==false){bd=aG(be,bc,B)}}}}if(bc===q){ba(be)}if(bc===h){if(bf){if(!bf.length){ba(be)}}else{ba(be)}}return bd}function aG(bf,bc,be){var bd;if(be==l){aS.trigger("swipeStatus",[bc,aQ||null,ah||0,ac||0,X,aR]);if(aw.swipeStatus){bd=aw.swipeStatus.call(aS,bf,bc,aQ||null,ah||0,ac||0,X,aR);if(bd===false){return false}}if(bc==h&&aW()){aS.trigger("swipe",[aQ,ah,ac,X,aR]);if(aw.swipe){bd=aw.swipe.call(aS,bf,aQ,ah,ac,X,aR);if(bd===false){return false}}switch(aQ){case p:aS.trigger("swipeLeft",[aQ,ah,ac,X,aR]);if(aw.swipeLeft){bd=aw.swipeLeft.call(aS,bf,aQ,ah,ac,X,aR)}break;case o:aS.trigger("swipeRight",[aQ,ah,ac,X,aR]);if(aw.swipeRight){bd=aw.swipeRight.call(aS,bf,aQ,ah,ac,X,aR)}break;case e:aS.trigger("swipeUp",[aQ,ah,ac,X,aR]);if(aw.swipeUp){bd=aw.swipeUp.call(aS,bf,aQ,ah,ac,X,aR)}break;case x:aS.trigger("swipeDown",[aQ,ah,ac,X,aR]);if(aw.swipeDown){bd=aw.swipeDown.call(aS,bf,aQ,ah,ac,X,aR)}break}}}if(be==t){aS.trigger("pinchStatus",[bc,aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchStatus){bd=aw.pinchStatus.call(aS,bf,bc,aK||null,ar||0,ac||0,X,H,aR);if(bd===false){return false}}if(bc==h&&a9()){switch(aK){case c:aS.trigger("pinchIn",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchIn){bd=aw.pinchIn.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break;case A:aS.trigger("pinchOut",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchOut){bd=aw.pinchOut.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break}}}if(be==B){if(bc===q||bc===h){clearTimeout(aX);clearTimeout(ag);if(Z()&&!I()){O=au();aX=setTimeout(f.proxy(function(){O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}},this),aw.doubleTapThreshold)}else{O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}}}}else{if(be==j){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("doubletap",[bf.target]);if(aw.doubleTap){bd=aw.doubleTap.call(aS,bf,bf.target)}}}else{if(be==b){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("longtap",[bf.target]);if(aw.longTap){bd=aw.longTap.call(aS,bf,bf.target)}}}}}return bd}function ao(){var bc=true;if(aw.threshold!==null){bc=ah>=aw.threshold}return bc}function bb(){var bc=false;if(aw.cancelThreshold!==null&&aQ!==null){bc=(aU(aQ)-ah)>=aw.cancelThreshold}return bc}function af(){if(aw.pinchThreshold!==null){return ar>=aw.pinchThreshold}return true}function aB(){var bc;if(aw.maxTimeThreshold){if(ac>=aw.maxTimeThreshold){bc=false}else{bc=true}}else{bc=true}return bc}function am(bc,bd){if(aw.preventDefaultEvents===false){return}if(aw.allowPageScroll===m){bc.preventDefault()}else{var be=aw.allowPageScroll===s;switch(bd){case p:if((aw.swipeLeft&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case o:if((aw.swipeRight&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case e:if((aw.swipeUp&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break;case x:if((aw.swipeDown&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break}}}function a9(){var bd=aP();var bc=Y();var be=af();return bd&&bc&&be}function aY(){return !!(aw.pinchStatus||aw.pinchIn||aw.pinchOut)}function Q(){return !!(a9()&&aY())}function aW(){var bf=aB();var bh=ao();var be=aP();var bc=Y();var bd=bb();var bg=!bd&&bc&&be&&bh&&bf;return bg}function W(){return !!(aw.swipe||aw.swipeStatus||aw.swipeLeft||aw.swipeRight||aw.swipeUp||aw.swipeDown)}function J(){return !!(aW()&&W())}function aP(){return((X===aw.fingers||aw.fingers===i)||!a)}function Y(){return aR[0].end.x!==0}function a7(){return !!(aw.tap)}function Z(){return !!(aw.doubleTap)}function aV(){return !!(aw.longTap)}function R(){if(O==null){return false}var bc=au();return(Z()&&((bc-O)<=aw.doubleTapThreshold))}function I(){return R()}function ay(){return((X===1||!a)&&(isNaN(ah)||ahaw.longTapThreshold)&&(ah=0)){return p}else{if((be<=360)&&(be>=315)){return p}else{if((be>=135)&&(be<=225)){return o}else{if((be>45)&&(be<135)){return x}else{return e}}}}}function au(){var bc=new Date();return bc.getTime()}function aZ(bc){bc=f(bc);var be=bc.offset();var bd={left:be.left,right:be.left+bc.outerWidth(),top:be.top,bottom:be.top+bc.outerHeight()};return bd}function F(bc,bd){return(bc.x>bd.left&&bc.xbd.top&&bc.ye;e++)r[s[e]]=r=r[s[e]]||{};return r},h=l("com.greensock"),_=1e-10,u=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},f=function(){},c=function(){var t=Object.prototype.toString,e=t.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&t.call(i)===e)}}(),m={},p=function(s,r,n,a){this.sc=m[s]?m[s].sc:[],m[s]=this,this.gsClass=null,this.func=n;var o=[];this.check=function(h){for(var _,u,f,c,d,v=r.length,g=v;--v>-1;)(_=m[r[v]]||new p(r[v],[])).gsClass?(o[v]=_.gsClass,g--):h&&_.sc.push(this);if(0===g&&n)for(u=("com.greensock."+s).split("."),f=u.pop(),c=l(u.join("."))[f]=this.gsClass=n.apply(n,o),a&&(i[f]=c,d="undefined"!=typeof module&&module.exports,!d&&"function"==typeof define&&define.amd?define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+s.split(".").pop(),[],function(){return c}):s===e&&d&&(module.exports=c)),v=0;this.sc.length>v;v++)this.sc[v].check()},this.check(!0)},d=t._gsDefine=function(t,e,i,s){return new p(t,e,i,s)},v=h._class=function(t,e,i){return e=e||function(){},d(t,[],function(){return e},i),e};d.globals=i;var g=[0,0,1,1],T=[],y=v("easing.Ease",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?g.concat(e):g},!0),w=y.map={},P=y.register=function(t,e,i,s){for(var r,n,a,o,l=e.split(","),_=l.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--_>-1;)for(n=l[_],r=s?v("easing."+n,null,!0):h.easing[n]||{},a=u.length;--a>-1;)o=u[a],w[n+"."+o]=w[o+n]=r[o]=t.getRatio?t:t[o]||new t};for(n=y.prototype,n._calcEnd=!1,n.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:.5>t?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:.5>t?s/2:1-s/2},s=["Linear","Quad","Cubic","Quart","Quint,Strong"],r=s.length;--r>-1;)n=s[r]+",Power"+r,P(new y(null,null,1,r),n,"easeOut",!0),P(new y(null,null,2,r),n,"easeIn"+(0===r?",easeNone":"")),P(new y(null,null,3,r),n,"easeInOut");w.linear=h.easing.Linear.easeIn,w.swing=h.easing.Quad.easeInOut;var b=v("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});n=b.prototype,n.addEventListener=function(t,e,i,s,r){r=r||0;var n,l,h=this._listeners[t],_=0;for(null==h&&(this._listeners[t]=h=[]),l=h.length;--l>-1;)n=h[l],n.c===e&&n.s===i?h.splice(l,1):0===_&&r>n.pr&&(_=l+1);h.splice(_,0,{c:e,s:i,up:s,pr:r}),this!==a||o||a.wake()},n.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;--i>-1;)if(s[i].c===e)return s.splice(i,1),void 0},n.dispatchEvent=function(t){var e,i,s,r=this._listeners[t];if(r)for(e=r.length,i=this._eventTarget;--e>-1;)s=r[e],s&&(s.up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i))};var k=t.requestAnimationFrame,A=t.cancelAnimationFrame,S=Date.now||function(){return(new Date).getTime()},x=S();for(s=["ms","moz","webkit","o"],r=s.length;--r>-1&&!k;)k=t[s[r]+"RequestAnimationFrame"],A=t[s[r]+"CancelAnimationFrame"]||t[s[r]+"CancelRequestAnimationFrame"];v("Ticker",function(t,e){var i,s,r,n,l,h=this,u=S(),c=e!==!1&&k,m=500,p=33,d="tick",v=function(t){var e,a,o=S()-x;o>m&&(u+=o-p),x+=o,h.time=(x-u)/1e3,e=h.time-l,(!i||e>0||t===!0)&&(h.frame++,l+=e+(e>=n?.004:n-e),a=!0),t!==!0&&(r=s(v)),a&&h.dispatchEvent(d)};b.call(h),h.time=h.frame=0,h.tick=function(){v(!0)},h.lagSmoothing=function(t,e){m=t||1/_,p=Math.min(e,m,0)},h.sleep=function(){null!=r&&(c&&A?A(r):clearTimeout(r),s=f,r=null,h===a&&(o=!1))},h.wake=function(){null!==r?h.sleep():h.frame>10&&(x=S()-m+5),s=0===i?f:c&&k?k:function(t){return setTimeout(t,0|1e3*(l-h.time)+1)},h===a&&(o=!0),v(2)},h.fps=function(t){return arguments.length?(i=t,n=1/(i||60),l=this.time+n,h.wake(),void 0):i},h.useRAF=function(t){return arguments.length?(h.sleep(),c=t,h.fps(i),void 0):c},h.fps(t),setTimeout(function(){c&&5>h.frame&&h.useRAF(!1)},1500)}),n=h.Ticker.prototype=new h.events.EventDispatcher,n.constructor=h.Ticker;var R=v("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=e.immediateRender===!0,this.data=e.data,this._reversed=e.reversed===!0,H){o||a.wake();var i=this.vars.useFrames?K:H;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});a=R.ticker=new h.Ticker,n=R.prototype,n._dirty=n._gc=n._initted=n._paused=!1,n._totalTime=n._time=0,n._rawPrevTime=-1,n._next=n._last=n._onUpdate=n._timeline=n.timeline=null,n._paused=!1;var C=function(){o&&S()-x>2e3&&a.wake(),setTimeout(C,2e3)};C(),n.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},n.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},n.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},n.seek=function(t,e){return this.totalTime(Number(t),e!==!1)},n.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,e!==!1,!0)},n.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},n.render=function(){},n.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},n.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime())>=i&&i+this.totalDuration()/this._timeScale>t},n._enabled=function(t,e){return o||a.wake(),this._gc=!t,this._active=this.isActive(),e!==!0&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},n._kill=function(){return this._enabled(!1,!1)},n.kill=function(t,e){return this._kill(t,e),this},n._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},n._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},n._callback=function(t){var e=this.vars;e[t].apply(e[t+"Scope"]||e.callbackScope||this,e[t+"Params"]||T)},n.eventCallback=function(t,e,i,s){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=c(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=s),"onUpdate"===t&&(this._onUpdate=e)}return this},n.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},n.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:t,e)):this._time},n.totalTime=function(t,e,i){if(o||a.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>t&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,r=this._timeline;if(t>s&&!i&&(t=s),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?s-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==t||0===this._duration)&&(z.length&&V(),this.render(t,e,!1),z.length&&V())}return this},n.progress=n.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},n.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},n.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},n.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||_,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},n.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},n.paused=function(t){if(!arguments.length)return this._paused;var e,i,s=this._timeline;return t!=this._paused&&s&&(o||t||a.wake(),e=s.rawTime(),i=e-this._pauseTime,!t&&s.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=s.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var D=v("core.SimpleTimeline",function(t){R.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});n=D.prototype=new R,n.constructor=D,n.kill()._gc=!1,n._first=n._last=n._recent=null,n._sortChildren=!1,n.add=n.insert=function(t,e){var i,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),i=this._last,this._sortChildren)for(s=t._startTime;i&&i._startTime>s;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._recent=t,this._timeline&&this._uncache(!0),this},n._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},n.render=function(t,e,i){var s,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)s=r._next,(r._active||t>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=s},n.rawTime=function(){return o||a.wake(),this._totalTime};var I=v("TweenLite",function(e,i,s){if(R.call(this,i,s),this.render=I.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:I.selector(e)||e;var r,n,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?$[I.defaultOverwrite]:"number"==typeof l?l>>0:$[l],(o||e instanceof Array||e.push&&c(e))&&"number"!=typeof e[0])for(this._targets=a=u(e),this._propLookup=[],this._siblings=[],r=0;a.length>r;r++)n=a[r],n?"string"!=typeof n?n.length&&n!==t&&n[0]&&(n[0]===t||n[0].nodeType&&n[0].style&&!n.nodeType)?(a.splice(r--,1),this._targets=a=a.concat(u(n))):(this._siblings[r]=W(n,this,!1),1===l&&this._siblings[r].length>1&&Y(n,this,null,1,this._siblings[r])):(n=a[r--]=I.selector(n),"string"==typeof n&&a.splice(r+1,1)):a.splice(r--,1);else this._propLookup={},this._siblings=W(e,this,!1),1===l&&this._siblings.length>1&&Y(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-_,this.render(-this._delay))},!0),E=function(e){return e&&e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)},O=function(t,e){var i,s={};for(i in t)M[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!Q[i]||Q[i]&&Q[i]._autoCSS)||(s[i]=t[i],delete t[i]);t.css=s};n=I.prototype=new R,n.constructor=I,n.kill()._gc=!1,n.ratio=0,n._firstPT=n._targets=n._overwrittenProps=n._startAt=null,n._notifyPluginsOfEnabled=n._lazy=!1,I.version="1.18.0",I.defaultEase=n._ease=new y(null,null,1,1),I.defaultOverwrite="auto",I.ticker=a,I.autoSleep=120,I.lagSmoothing=function(t,e){a.lagSmoothing(t,e)},I.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(I.selector=i,i(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var z=[],F={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,N=function(t){for(var e,i=this._firstPT,s=1e-6;i;)e=i.blob?t?this.join(""):this.start:i.c*t+i.s,i.r?e=Math.round(e):s>e&&e>-s&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},U=function(t,e,i,s){var r,n,a,o,l,h,_,u=[t,e],f=0,c="",m=0;for(u.start=t,i&&(i(u),t=u[0],e=u[1]),u.length=0,r=t.match(L)||[],n=e.match(L)||[],s&&(s._next=null,s.blob=1,u._firstPT=s),l=n.length,o=0;l>o;o++)_=n[o],h=e.substr(f,e.indexOf(_,f)-f),c+=h||!o?h:",",f+=h.length,m?m=(m+1)%5:"rgba("===h.substr(-5)&&(m=1),_===r[o]||o>=r.length?c+=_:(c&&(u.push(c),c=""),a=parseFloat(r[o]),u.push(a),u._firstPT={_next:u._firstPT,t:u,p:u.length-1,s:a,c:("="===_.charAt(1)?parseInt(_.charAt(0)+"1",10)*parseFloat(_.substr(2)):parseFloat(_)-a)||0,f:0,r:m&&4>m}),f+=_.length;return c+=e.substr(f),c&&u.push(c),u.setRatio=N,u},j=function(t,e,i,s,r,n,a,o){var l,h,_="get"===i?t[e]:i,u=typeof t[e],f="string"==typeof s&&"="===s.charAt(1),c={t:t,p:e,s:_,f:"function"===u,pg:0,n:r||e,r:n,pr:0,c:f?parseInt(s.charAt(0)+"1",10)*parseFloat(s.substr(2)):parseFloat(s)-_||0};return"number"!==u&&("function"===u&&"get"===i&&(h=e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),c.s=_=a?t[h](a):t[h]()),"string"==typeof _&&(a||isNaN(_))?(c.fp=a,l=U(_,s,o||I.defaultStringFilter,c),c={t:l,p:"setRatio",s:0,c:1,f:2,pg:0,n:r||e,pr:0}):f||(c.c=parseFloat(s)-parseFloat(_)||0)),c.c?((c._next=this._firstPT)&&(c._next._prev=c),this._firstPT=c,c):void 0},G=I._internals={isArray:c,isSelector:E,lazyTweens:z,blobDif:U},Q=I._plugins={},q=G.tweenLookup={},B=0,M=G.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate: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},$={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},K=R._rootFramesTimeline=new D,H=R._rootTimeline=new D,J=30,V=G.lazyRender=function(){var t,e=z.length;for(F={};--e>-1;)t=z[e],t&&t._lazy!==!1&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);z.length=0};H._startTime=a.time,K._startTime=a.frame,H._active=K._active=!0,setTimeout(V,1),R._updateRoot=I.render=function(){var t,e,i;if(z.length&&V(),H.render((a.time-H._startTime)*H._timeScale,!1,!1),K.render((a.frame-K._startTime)*K._timeScale,!1,!1),z.length&&V(),a.frame>=J){J=a.frame+(parseInt(I.autoSleep,10)||120);for(i in q){for(e=q[i].tweens,t=e.length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete q[i]}if(i=H._first,(!i||i._paused)&&I.autoSleep&&!K._first&&1===a._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||a.sleep()}}},a.addEventListener("tick",R._updateRoot);var W=function(t,e,i){var s,r,n=t._gsTweenID;if(q[n||(t._gsTweenID=n="t"+B++)]||(q[n]={target:t,tweens:[]}),e&&(s=q[n].tweens,s[r=s.length]=e,i))for(;--r>-1;)s[r]===e&&s.splice(r,1);return q[n].tweens},X=function(t,e,i,s){var r,n,a=t.vars.onOverwrite;return a&&(r=a(t,e,i,s)),a=I.onOverwrite,a&&(n=a(t,e,i,s)),r!==!1&&n!==!1},Y=function(t,e,i,s,r){var n,a,o,l;if(1===s||s>=4){for(l=r.length,n=0;l>n;n++)if((o=r[n])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===s)break;return a}var h,u=e._startTime+_,f=[],c=0,m=0===e._duration;for(n=r.length;--n>-1;)(o=r[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||Z(e,0,m),0===Z(o,h,m)&&(f[c++]=o)):u>=o._startTime&&o._startTime+o.totalDuration()/o._timeScale>u&&((m||!o._initted)&&2e-10>=u-o._startTime||(f[c++]=o)));for(n=c;--n>-1;)if(o=f[n],2===s&&o._kill(i,t,e)&&(a=!0),2!==s||!o._firstPT&&o._initted){if(2!==s&&!X(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},Z=function(t,e,i){for(var s=t._timeline,r=s._timeScale,n=t._startTime;s._timeline;){if(n+=s._startTime,r*=s._timeScale,s._paused)return-100;s=s._timeline}return n/=r,n>e?n-e:i&&n===e||!t._initted&&2*_>n-e?_:(n+=t.totalDuration()/t._timeScale/r)>e+_?0:n-e-_};n._init=function(){var t,e,i,s,r,n=this.vars,a=this._overwrittenProps,o=this._duration,l=!!n.immediateRender,h=n.ease;if(n.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={};for(s in n.startAt)r[s]=n.startAt[s];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=l&&n.lazy!==!1,r.startAt=r.delay=null,this._startAt=I.to(this.target,0,r),l)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(n.runBackwards&&0!==o)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(l=!1),i={};for(s in n)M[s]&&"autoCSS"!==s||(i[s]=n[s]);if(i.overwrite=0,i.data="isFromStart",i.lazy=l&&n.lazy!==!1,i.immediateRender=l,this._startAt=I.to(this.target,0,i),l){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=h=h?h instanceof y?h:"function"==typeof h?new y(h,n.easeParams):w[h]||I.defaultEase:I.defaultEase,n.easeParams instanceof Array&&h.config&&(this._ease=h.config.apply(h,n.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(t=this._targets.length;--t>-1;)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],a?a[t]:null)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,a);if(e&&I._onPluginEvent("_onInitAllProps",this),a&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),n.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=n.onUpdate,this._initted=!0},n._initProps=function(e,i,s,r){var n,a,o,l,h,_;if(null==e)return!1;F[e._gsTweenID]&&V(),this.vars.css||e.style&&e!==t&&e.nodeType&&Q.css&&this.vars.autoCSS!==!1&&O(this.vars,e);for(n in this.vars)if(_=this.vars[n],M[n])_&&(_ instanceof Array||_.push&&c(_))&&-1!==_.join("").indexOf("{self}")&&(this.vars[n]=_=this._swapSelfInParams(_,this));else if(Q[n]&&(l=new Q[n])._onInitTween(e,this.vars[n],this)){for(this._firstPT=h={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:n,pg:1,pr:l._priority},a=l._overwriteProps.length;--a>-1;)i[l._overwriteProps[a]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),h._next&&(h._next._prev=h)}else i[n]=j.call(this,e,n,"get",_,n,0,null,this.vars.stringFilter);return r&&this._kill(r,e)?this._initProps(e,i,s,r):this._overwrite>1&&this._firstPT&&s.length>1&&Y(e,this,i,this._overwrite,s)?(this._kill(i,e),this._initProps(e,i,s,r)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(F[e._gsTweenID]=!0),o)},n.render=function(t,e,i){var s,r,n,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(t>=l)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(s=!0,r="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0===t||0>h||h===_&&"isPause"!==this.data)&&h!==t&&(i=!0,h>_&&(r="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:_);else if(1e-7>t)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&h>0)&&(r="onReverseComplete",s=this._reversed),0>t&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(h!==_||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:_)),this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/l,f=this._easeType,c=this._easePower;(1===f||3===f&&u>=.5)&&(u=1-u),3===f&&(u*=2),1===c?u*=u:2===c?u*=u*u:3===c?u*=u*u*u:4===c&&(u*=u*u*u*u),this.ratio=1===f?1-u:2===f?u:.5>t/l?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,z.push(this),this._lazy=[t,e],void 0;this._time&&!s?this.ratio=this._ease.getRatio(this._time/l):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._time||0===l)&&(e||this._callback("onStart"))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(0>t&&this._startAt&&t!==-1e-4&&this._startAt.render(t,e,i),e||(this._time!==o||s)&&this._callback("onUpdate")),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&t!==-1e-4&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this._callback(r),0===l&&this._rawPrevTime===_&&a!==_&&(this._rawPrevTime=0))}},n._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:I.selector(e)||e;var s,r,n,a,o,l,h,_,u,f=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((c(e)||E(e))&&"number"!=typeof e[0])for(s=e.length;--s>-1;)this._kill(t,e[s],i)&&(l=!0);else{if(this._targets){for(s=this._targets.length;--s>-1;)if(e===this._targets[s]){o=this._propLookup[s]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[s]=t?this._overwrittenProps[s]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,r=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,_=t!==r&&"all"!==r&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(I.onOverwrite||this.vars.onOverwrite)){for(n in h)o[n]&&(u||(u=[]),u.push(n));if((u||!t)&&!X(this,i,e,u))return!1}for(n in h)(a=o[n])&&(f&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[n]),_&&(r[n]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},n.invalidate=function(){return this._notifyPluginsOfEnabled&&I._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],R.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-_,this.render(-this._delay)),this},n._enabled=function(t,e){if(o||a.wake(),t&&this._gc){var i,s=this._targets;if(s)for(i=s.length;--i>-1;)this._siblings[i]=W(s[i],this,!0);else this._siblings=W(this.target,this,!0)}return R.prototype._enabled.call(this,t,e),this._notifyPluginsOfEnabled&&this._firstPT?I._onPluginEvent(t?"_onEnable":"_onDisable",this):!1},I.to=function(t,e,i){return new I(t,e,i)},I.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new I(t,e,i)},I.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new I(t,e,s)},I.delayedCall=function(t,e,i,s,r){return new I(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:s,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},I.set=function(t,e){return new I(t,0,e)},I.getTweensOf=function(t,e){if(null==t)return[];t="string"!=typeof t?t:I.selector(t)||t;var i,s,r,n;if((c(t)||E(t))&&"number"!=typeof t[0]){for(i=t.length,s=[];--i>-1;)s=s.concat(I.getTweensOf(t[i],e));for(i=s.length;--i>-1;)for(n=s[i],r=i;--r>-1;)n===s[r]&&s.splice(i,1)}else for(s=W(t).concat(),i=s.length;--i>-1;)(s[i]._gc||e&&!s[i].isActive())&&s.splice(i,1);return s},I.killTweensOf=I.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var s=I.getTweensOf(t,e),r=s.length;--r>-1;)s[r]._kill(i,t)};var te=v("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=te.prototype},!0);if(n=te.prototype,te.version="1.18.0",te.API=2,n._firstPT=null,n._addTween=j,n.setRatio=N,n._kill=function(t){var e,i=this._overwriteProps,s=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;s;)null!=t[s.n]&&(s._next&&(s._next._prev=s._prev),s._prev?(s._prev._next=s._next,s._prev=null):this._firstPT===s&&(this._firstPT=s._next)),s=s._next;return!1},n._roundProps=function(t,e){for(var i=this._firstPT;i;)(t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&(i.r=e),i=i._next},I._onPluginEvent=function(t,e){var i,s,r,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,s=r;s&&s.pr>o.pr;)s=s._next;(o._prev=s?s._prev:n)?o._prev._next=o:r=o,(o._next=s)?s._prev=o:n=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},te.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===te.API&&(Q[(new t[e])._propName]=t[e]);return!0},d.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,r=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},a=v("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){te.call(this,i,s),this._overwriteProps=r||[]},t.global===!0),o=a.prototype=new te(i);o.constructor=a,a.API=t.API;for(e in n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,te.activate([a]),a},s=t._gsQueue){for(r=0;s.length>r;r++)s[r]();for(n in m)m[n].func||t.console.log("GSAP encountered missing dependency: com.greensock."+n)}o=!1}})("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite"); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,s,r=this.vars;for(s in r)i=r[s],l(i)&&-1!==i.join("").indexOf("{self}")&&(r[s]=this._swapSelfInParams(i));l(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=1e-10,n=i._internals,a=s._internals={},o=n.isSelector,l=n.isArray,h=n.lazyTweens,_=n.lazyRender,u=_gsScope._gsDefine.globals,f=function(t){var e,i={};for(e in t)i[e]=t[e];return i},c=function(t,e,i){var s,r,n=t.cycle;for(s in n)r=n[s],t[s]="function"==typeof r?r.call(e[i],i):r[i%r.length];delete t.cycle},p=a.pauseCallback=function(){},m=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},d=s.prototype=new e;return s.version="1.18.0",d.constructor=s,d.kill()._gc=d._forcingPlayhead=d._hasPause=!1,d.to=function(t,e,s,r){var n=s.repeat&&u.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},d.from=function(t,e,s,r){return this.add((s.repeat&&u.TweenMax||i).from(t,e,s),r)},d.fromTo=function(t,e,s,r,n){var a=r.repeat&&u.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},d.staggerTo=function(t,e,r,n,a,l,h,_){var u,p,d=new s({onComplete:l,onCompleteParams:h,callbackScope:_,smoothChildTiming:this.smoothChildTiming}),g=r.cycle;for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],o(t)&&(t=m(t)),n=n||0,0>n&&(t=m(t),t.reverse(),n*=-1),p=0;t.length>p;p++)u=f(r),u.startAt&&(u.startAt=f(u.startAt),u.startAt.cycle&&c(u.startAt,t,p)),g&&c(u,t,p),d.to(t[p],e,u,p*n);return this.add(d,a)},d.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},d.staggerFromTo=function(t,e,i,s,r,n,a,o,l){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,l)},d.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},d.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},d.add=function(r,n,a,o){var h,_,u,f,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&l(r)){for(a=a||"normal",o=o||0,h=n,_=r.length,u=0;_>u;u++)l(f=r[u])&&(f=new s({tweens:f})),this.add(f,h),"string"!=typeof f&&"function"!=typeof f&&("sequence"===a?h=f._startTime+f.totalDuration()/f._timeScale:"start"===a&&(f._startTime-=f.delay())),h+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},d.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&l(e)){for(var s=e.length;--s>-1;)this.remove(e[s]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},d._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},d.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},d.insert=d.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},d.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},d.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},d.addPause=function(t,e,s,r){var n=i.delayedCall(0,p,s,r||this);return n.vars.onComplete=n.vars.onReverseComplete=e,n.data="isPause",this._hasPause=!0,this.add(n,t)},d.removeLabel=function(t){return delete this._labels[t],this},d.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},d._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&l(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},d.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},d.stop=function(){return this.paused(!0)},d.gotoAndPlay=function(t,e){return this.play(t,e)},d.gotoAndStop=function(t,e){return this.pause(t,e)},d.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,l,u,f=this._dirty?this.totalDuration():this._totalDuration,c=this._time,p=this._startTime,m=this._timeScale,d=this._paused;if(t>=f)this._totalTime=this._time=f,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",l=!!this._timeline.autoRemoveChildren,0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(l=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=f+1e-4;else if(1e-7>t)if(this._totalTime=this._time=0,(0!==c||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(l=n=!0,o="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(l=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,0===t&&n)for(s=this._first;s&&0===s._startTime;)s._duration||(n=!1),s=s._next;t=0,this._initted||(l=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=c)for(s=this._first;s&&t>=s._startTime&&!u;)s._duration||"isPause"!==s.data||s.ratio||0===s._startTime&&0===this._rawPrevTime||(u=s),s=s._next;else for(s=this._last;s&&s._startTime>=t&&!u;)s._duration||"isPause"===s.data&&s._rawPrevTime>0&&(u=s),s=s._prev;u&&(this._time=t=u._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==c&&this._first||i||l||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==c&&t>0&&(this._active=!0),0===c&&this.vars.onStart&&0!==this._time&&(e||this._callback("onStart")),this._time>=c)for(s=this._first;s&&(a=s._next,!this._paused||d);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(u===s&&this.pause(),s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||d);){if(s._active||c>=s._startTime&&!s._paused&&!s._gc){if(u===s){for(u=s._prev;u&&u.endTime()>this._time;)u.render(u._reversed?u.totalDuration()-(t-u._startTime)*u._timeScale:(t-u._startTime)*u._timeScale,e,i),u=u._prev;u=null,this.pause()}s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)}s=a}this._onUpdate&&(e||(h.length&&_(),this._callback("onUpdate"))),o&&(this._gc||(p===this._startTime||m!==this._timeScale)&&(0===this._time||f>=this.totalDuration())&&(n&&(h.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o)))}},d._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},d.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},d.getTweensOf=function(t,e){var s,r,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=i.getTweensOf(t),r=s.length;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},d.recent=function(){return this._recent},d._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},d.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},d._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},d.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},d.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},d._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},d.totalTime=function(){this._forcingPlayhead=!0;var e=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},d.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},d.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},d.paused=function(e){if(!e)for(var i=this._first,s=this._time;i;)i._startTime===s&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},d.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},d.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("./TweenLite.js"),module.exports=e())}("TimelineLite"); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,l=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},_=t.register||function(){},u=function(t,e,i,s){var r=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return _(r,t),r},c=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},f=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},p=u("Back",f("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),f("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),f("BackInOut",function(t){return 1>(t*=2)?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),m=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),d=m.prototype=new t;return d.constructor=m,d.getRatio=function(t){var e=t+(.5-t)*this._p;return this._p1>t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},m.ease=new m(.7,.7),d.config=m.config=function(t,e,i){return new m(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){e=e||{};for(var i,s,r,n,a,o,h=e.taper||"none",l=[],_=0,u=0|(e.points||20),f=u,p=e.randomize!==!1,m=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--f>-1;)i=p?Math.random():1/u*f,s=d?d.getRatio(i):i,"none"===h?r=g:"out"===h?(n=1-i,r=n*n*g):"in"===h?r=i*i*g:.5>i?(n=2*i,r=.5*n*n*g):(n=2*(1-i),r=.5*n*n*g),p?s+=Math.random()*r-.5*r:f%2?s+=.5*r:s-=.5*r,m&&(s>1?s=1:0>s&&(s=0)),l[_++]={x:i,y:s};for(l.sort(function(t,e){return t.x-e.x}),o=new c(1,1,null),f=u;--f>-1;)a=l[f],o=new c(a.x,a.y,o);this._prev=new c(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",l("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),l("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),l("BounceInOut",function(t){var e=.5>t;return t=e?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return 1>(t*=2)?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||s)/(1>t?t:1),this._p3=this._p2/a*(Math.asin(1/this._p1)||0),this._p2=a/this._p2},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2))},.3),s("ElasticInOut",function(t){return 1>(t*=2)?-.5*this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)+1},.45)),u("Expo",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return 1>(t*=2)?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",l("SineOut",function(t){return Math.sin(t*o)}),l("SineIn",function(t){return-Math.cos(t*o)+1}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(r.SlowMo,"SlowMo","ease,"),_(i,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,r,s,n,a=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=a.prototype.setRatio},o=_gsScope._gsDefine.globals,l={},h=a.prototype=new t("css");h.constructor=a,a.version="1.18.0",a.API=2,a.defaultTransformPerspective=0,a.defaultSkewType="compensated",a.defaultSmoothOrigin=!0,h="px",a.suffixMap={top:h,right:h,bottom:h,left:h,width:h,height:h,fontSize:h,padding:h,margin:h,perspective:h,lineHeight:""};var u,f,c,_,p,d,m=/(?:\d|\-\d|\.\d|\-\.\d)+/g,g=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,v=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,y=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,x=/(?:\d|\-|\+|=|#|\.)*/g,T=/opacity *=*([^)]*)/i,w=/opacity:([^;]*)/i,b=/alpha\(opacity *=.+?\)/i,P=/^(rgb|hsl)/,S=/([A-Z])/g,O=/-([a-z])/gi,C=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,k=function(t,e){return e.toUpperCase()},R=/(?:Left|Right|Width)/i,A=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,M=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,D=/,(?=[^\)]*(?:\(|$))/gi,L=Math.PI/180,N=180/Math.PI,F={},X=document,z=function(t){return X.createElementNS?X.createElementNS("http://www.w3.org/1999/xhtml",t):X.createElement(t)},B=z("div"),I=z("img"),E=a._internals={_specialProps:l},Y=navigator.userAgent,W=function(){var t=Y.indexOf("Android"),e=z("a");return c=-1!==Y.indexOf("Safari")&&-1===Y.indexOf("Chrome")&&(-1===t||Number(Y.substr(t+8,1))>3),p=c&&6>Number(Y.substr(Y.indexOf("Version/")+8,1)),_=-1!==Y.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Y)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Y))&&(d=parseFloat(RegExp.$1)),e?(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity)):!1}(),V=function(t){return T.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},j=function(t){window.console&&console.log(t)},G="",U="",q=function(t,e){e=e||B;var i,r,s=e.style;if(void 0!==s[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===s[i[r]+t];);return r>=0?(U=3===r?"ms":i[r],G="-"+U.toLowerCase()+"-",U+t):null},H=X.defaultView?X.defaultView.getComputedStyle:function(){},Q=a.getStyle=function(t,e,i,r,s){var n;return W||"opacity"!==e?(!r&&t.style[e]?n=t.style[e]:(i=i||H(t))?n=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(S,"-$1").toLowerCase()):t.currentStyle&&(n=t.currentStyle[e]),null==s||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:s):V(t)},Z=E.convertToPixels=function(t,i,r,s,n){if("px"===s||!s)return r;if("auto"===s||!r)return 0;var o,l,h,u=R.test(i),f=t,c=B.style,_=0>r;if(_&&(r=-r),"%"===s&&-1!==i.indexOf("border"))o=r/100*(u?t.clientWidth:t.clientHeight);else{if(c.cssText="border:0 solid red;position:"+Q(t,"position")+";line-height:0;","%"!==s&&f.appendChild&&"v"!==s.charAt(0)&&"rem"!==s)c[u?"borderLeftWidth":"borderTopWidth"]=r+s;else{if(f=t.parentNode||X.body,l=f._gsCache,h=e.ticker.frame,l&&u&&l.time===h)return l.width*r/100;c[u?"width":"height"]=r+s}f.appendChild(B),o=parseFloat(B[u?"offsetWidth":"offsetHeight"]),f.removeChild(B),u&&"%"===s&&a.cacheWidths!==!1&&(l=f._gsCache=f._gsCache||{},l.time=h,l.width=100*(o/r)),0!==o||n||(o=Z(t,i,r,s,!0))}return _?-o:o},$=E.calculateOffset=function(t,e,i){if("absolute"!==Q(t,"position",i))return 0;var r="left"===e?"Left":"Top",s=Q(t,"margin"+r,i);return t["offset"+r]-(Z(t,e,parseFloat(s),s.replace(x,""))||0)},K=function(t,e){var i,r,s,n={};if(e=e||H(t,null))if(i=e.length)for(;--i>-1;)s=e[i],(-1===s.indexOf("-transform")||Se===s)&&(n[s.replace(O,k)]=e.getPropertyValue(s));else for(i in e)(-1===i.indexOf("Transform")||Pe===i)&&(n[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===n[i]&&(n[i.replace(O,k)]=e[i]);return W||(n.opacity=V(t)),r=ze(t,e,!1),n.rotation=r.rotation,n.skewX=r.skewX,n.scaleX=r.scaleX,n.scaleY=r.scaleY,n.x=r.x,n.y=r.y,Ce&&(n.z=r.z,n.rotationX=r.rotationX,n.rotationY=r.rotationY,n.scaleZ=r.scaleZ),n.filters&&delete n.filters,n},J=function(t,e,i,r,s){var n,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(n=i[a])||s&&s[a])&&-1===a.indexOf("Origin")&&("number"==typeof n||"string"==typeof n)&&(l[a]="auto"!==n||"left"!==a&&"top"!==a?""!==n&&"auto"!==n&&"none"!==n||"string"!=typeof e[a]||""===e[a].replace(y,"")?n:0:$(t,a),void 0!==h[a]&&(o=new pe(h,a,h[a],o)));if(r)for(a in r)"className"!==a&&(l[a]=r[a]);return{difs:l,firstMPT:o}},te={width:["Left","Right"],height:["Top","Bottom"]},ee=["marginLeft","marginRight","marginTop","marginBottom"],ie=function(t,e,i){var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),s=te[e],n=s.length;for(i=i||H(t,null);--n>-1;)r-=parseFloat(Q(t,"padding"+s[n],i,!0))||0,r-=parseFloat(Q(t,"border"+s[n]+"Width",i,!0))||0;return r},re=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";(null==t||""===t)&&(t="0 0");var i=t.split(" "),r=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":i[0],s=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":i[1];return null==s?s="center"===r?"50%":"0":"center"===s&&(s="50%"),("center"===r||isNaN(parseFloat(r))&&-1===(r+"").indexOf("="))&&(r="50%"),t=r+" "+s+(i.length>2?" "+i[2]:""),e&&(e.oxp=-1!==r.indexOf("%"),e.oyp=-1!==s.indexOf("%"),e.oxr="="===r.charAt(1),e.oyr="="===s.charAt(1),e.ox=parseFloat(r.replace(y,"")),e.oy=parseFloat(s.replace(y,"")),e.v=t),e||t},se=function(t,e){return"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)},ne=function(t,e){return null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)},ae=function(t,e,i,r){var s,n,a,o,l,h=1e-6;return null==t?o=e:"number"==typeof t?o=t:(s=360,n=t.split("_"),l="="===t.charAt(1),a=(l?parseInt(t.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===t.indexOf("rad")?1:N)-(l?0:e),n.length&&(r&&(r[i]=e+a),-1!==t.indexOf("short")&&(a%=s,a!==a%(s/2)&&(a=0>a?a+s:a-s)),-1!==t.indexOf("_cw")&&0>a?a=(a+9999999999*s)%s-(0|a/s)*s:-1!==t.indexOf("ccw")&&a>0&&(a=(a-9999999999*s)%s-(0|a/s)*s)),o=e+a),h>o&&o>-h&&(o=0),o},oe={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},le=function(t,e,i){return t=0>t?t+1:t>1?t-1:t,0|255*(1>6*t?e+6*(i-e)*t:.5>t?i:2>3*t?e+6*(i-e)*(2/3-t):e)+.5},he=a.parseColor=function(t,e){var i,r,s,n,a,o,l,h,u,f,c;if(t)if("number"==typeof t)i=[t>>16,255&t>>8,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),oe[t])i=oe[t];else if("#"===t.charAt(0))4===t.length&&(r=t.charAt(1),s=t.charAt(2),n=t.charAt(3),t="#"+r+r+s+s+n+n),t=parseInt(t.substr(1),16),i=[t>>16,255&t>>8,255&t];else if("hsl"===t.substr(0,3))if(i=c=t.match(m),e){if(-1!==t.indexOf("="))return t.match(g)}else a=Number(i[0])%360/360,o=Number(i[1])/100,l=Number(i[2])/100,s=.5>=l?l*(o+1):l+o-l*o,r=2*l-s,i.length>3&&(i[3]=Number(t[3])),i[0]=le(a+1/3,r,s),i[1]=le(a,r,s),i[2]=le(a-1/3,r,s);else i=t.match(m)||oe.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=oe.black;return e&&!c&&(r=i[0]/255,s=i[1]/255,n=i[2]/255,h=Math.max(r,s,n),u=Math.min(r,s,n),l=(h+u)/2,h===u?a=o=0:(f=h-u,o=l>.5?f/(2-h-u):f/(h+u),a=h===r?(s-n)/f+(n>s?6:0):h===s?(n-r)/f+2:(r-s)/f+4,a*=60),i[0]=0|a+.5,i[1]=0|100*o+.5,i[2]=0|100*l+.5),i},ue=function(t,e){var i,r,s,n=t.match(fe)||[],a=0,o=n.length?"":t;for(i=0;n.length>i;i++)r=n[i],s=t.substr(a,t.indexOf(r,a)-a),a+=s.length+r.length,r=he(r,e),3===r.length&&r.push(1),o+=s+(e?"hsla("+r[0]+","+r[1]+"%,"+r[2]+"%,"+r[3]:"rgba("+r.join(","))+")";return o},fe="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(h in oe)fe+="|"+h+"\\b";fe=RegExp(fe+")","gi"),a.colorStringFilter=function(t){var e,i=t[0]+t[1];fe.lastIndex=0,fe.test(i)&&(e=-1!==i.indexOf("hsl(")||-1!==i.indexOf("hsla("),t[0]=ue(t[0],e),t[1]=ue(t[1],e))},e.defaultStringFilter||(e.defaultStringFilter=a.colorStringFilter);var ce=function(t,e,i,r){if(null==t)return function(t){return t};var s,n=e?(t.match(fe)||[""])[0]:"",a=t.split(n).join("").match(v)||[],o=t.substr(0,t.indexOf(a[0])),l=")"===t.charAt(t.length-1)?")":"",h=-1!==t.indexOf(" ")?" ":",",u=a.length,f=u>0?a[0].replace(m,""):"";return u?s=e?function(t){var e,c,_,p;if("number"==typeof t)t+=f;else if(r&&D.test(t)){for(p=t.replace(D,"|").split("|"),_=0;p.length>_;_++)p[_]=s(p[_]);return p.join(",")}if(e=(t.match(fe)||[n])[0],c=t.split(e).join("").match(v)||[],_=c.length,u>_--)for(;u>++_;)c[_]=i?c[0|(_-1)/2]:a[_];return o+c.join(h)+h+e+l+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,n,c;if("number"==typeof t)t+=f;else if(r&&D.test(t)){for(n=t.replace(D,"|").split("|"),c=0;n.length>c;c++)n[c]=s(n[c]);return n.join(",")}if(e=t.match(v)||[],c=e.length,u>c--)for(;u>++c;)e[c]=i?e[0|(c-1)/2]:a[c];return o+e.join(h)+l}:function(t){return t}},_e=function(t){return t=t.split(","),function(e,i,r,s,n,a,o){var l,h=(i+"").split(" ");for(o={},l=0;4>l;l++)o[t[l]]=h[l]=h[l]||h[(l-1)/2>>0];return s.parse(e,o,n,a)}},pe=(E._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,s,n=this.data,a=n.proxy,o=n.firstMPT,l=1e-6;o;)e=a[o.v],o.r?e=Math.round(e):l>e&&e>-l&&(e=0),o.t[o.p]=e,o=o._next;if(n.autoRotate&&(n.autoRotate.rotation=a.rotation),1===t)for(o=n.firstMPT;o;){if(i=o.t,i.type){if(1===i.type){for(s=i.xs0+i.s+i.xs1,r=1;i.l>r;r++)s+=i["xn"+r]+i["xs"+(r+1)];i.e=s}}else i.e=i.s+i.xs0;o=o._next}},function(t,e,i,r,s){this.t=t,this.p=e,this.v=i,this.r=s,r&&(r._prev=this,this._next=r)}),de=(E._parseToProxy=function(t,e,i,r,s,n){var a,o,l,h,u,f=r,c={},_={},p=i._transform,d=F;for(i._transform=null,F=e,r=u=i.parse(t,e,r,s),F=d,n&&(i._transform=p,f&&(f._prev=null,f._prev&&(f._prev._next=null)));r&&r!==f;){if(1>=r.type&&(o=r.p,_[o]=r.s+r.c,c[o]=r.s,n||(h=new pe(r,"s",o,h,r.r),r.c=0),1===r.type))for(a=r.l;--a>0;)l="xn"+a,o=r.p+"_"+l,_[o]=r.data[l],c[o]=r[l],n||(h=new pe(r,l,o,h,r.rxp[l]));r=r._next}return{proxy:c,end:_,firstMPT:h,pt:u}},E.CSSPropTween=function(t,e,r,s,a,o,l,h,u,f,c){this.t=t,this.p=e,this.s=r,this.c=s,this.n=l||e,t instanceof de||n.push(this.n),this.r=h,this.type=o||0,u&&(this.pr=u,i=!0),this.b=void 0===f?r:f,this.e=void 0===c?r+s:c,a&&(this._next=a,a._prev=this)}),me=function(t,e,i,r,s,n){var a=new de(t,e,i,r-i,s,-1,n);return a.b=i,a.e=a.xs0=r,a},ge=a.parseComplex=function(t,e,i,r,s,n,a,o,l,h){i=i||n||"",a=new de(t,e,0,0,a,h?2:1,null,!1,o,i,r),r+="";var f,c,_,p,d,v,y,x,T,w,b,P,S,O=i.split(", ").join(",").split(" "),C=r.split(", ").join(",").split(" "),k=O.length,R=u!==!1;for((-1!==r.indexOf(",")||-1!==i.indexOf(","))&&(O=O.join(" ").replace(D,", ").split(" "),C=C.join(" ").replace(D,", ").split(" "),k=O.length),k!==C.length&&(O=(n||"").split(" "),k=O.length),a.plugin=l,a.setRatio=h,fe.lastIndex=0,f=0;k>f;f++)if(p=O[f],d=C[f],x=parseFloat(p),x||0===x)a.appendXtra("",x,se(d,x),d.replace(g,""),R&&-1!==d.indexOf("px"),!0);else if(s&&fe.test(p))P=","===d.charAt(d.length-1)?"),":")",S=-1!==d.indexOf("hsl")&&W,p=he(p,S),d=he(d,S),T=p.length+d.length>6,T&&!W&&0===d[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(C[f]).join("transparent")):(W||(T=!1),S?a.appendXtra(T?"hsla(":"hsl(",p[0],se(d[0],p[0]),",",!1,!0).appendXtra("",p[1],se(d[1],p[1]),"%,",!1).appendXtra("",p[2],se(d[2],p[2]),T?"%,":"%"+P,!1):a.appendXtra(T?"rgba(":"rgb(",p[0],d[0]-p[0],",",!0,!0).appendXtra("",p[1],d[1]-p[1],",",!0).appendXtra("",p[2],d[2]-p[2],T?",":P,!0),T&&(p=4>p.length?1:p[3],a.appendXtra("",p,(4>d.length?1:d[3])-p,P,!1))),fe.lastIndex=0;else if(v=p.match(m)){if(y=d.match(g),!y||y.length!==v.length)return a;for(_=0,c=0;v.length>c;c++)b=v[c],w=p.indexOf(b,_),a.appendXtra(p.substr(_,w-_),Number(b),se(y[c],b),"",R&&"px"===p.substr(w+b.length,2),0===c),_=w+b.length;a["xs"+a.l]+=p.substr(_)}else a["xs"+a.l]+=a.l?" "+p:p;if(-1!==r.indexOf("=")&&a.data){for(P=a.xs0+a.data.s,f=1;a.l>f;f++)P+=a["xs"+f]+a.data["xn"+f];a.e=P+a["xs"+f]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ve=9;for(h=de.prototype,h.l=h.pr=0;--ve>0;)h["xn"+ve]=0,h["xs"+ve]="";h.xs0="",h._next=h._prev=h.xfirst=h.data=h.plugin=h.setRatio=h.rxp=null,h.appendXtra=function(t,e,i,r,s,n){var a=this,o=a.l;return a["xs"+o]+=n&&o?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=r||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=s,a["xn"+o]=e,a.plugin||(a.xfirst=new de(a,"xn"+o,e,i,a.xfirst||a,0,a.n,s,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=s,a)):(a["xs"+o]+=e+(r||""),a)};var ye=function(t,e){e=e||{},this.p=e.prefix?q(t)||t:t,l[t]=l[this.p]=this,this.format=e.formatter||ce(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},xe=E._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,s,n=t.split(","),a=e.defaultValue;for(i=i||[a],r=0;n.length>r;r++)e.prefix=0===r&&e.prefix,e.defaultValue=i[r]||a,s=new ye(n[r],e)},Te=function(t){if(!l[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";xe(t,{parser:function(t,i,r,s,n,a,h){var u=o.com.greensock.plugins[e];return u?(u._cssRegister(),l[r].parse(t,i,r,s,n,a,h)):(j("Error: "+e+" js file not loaded."),n)}})}};h=ye.prototype,h.parseComplex=function(t,e,i,r,s,n){var a,o,l,h,u,f,c=this.keyword;if(this.multi&&(D.test(i)||D.test(e)?(o=e.replace(D,"|").split("|"),l=i.replace(D,"|").split("|")):c&&(o=[e],l=[i])),l){for(h=l.length>o.length?l.length:o.length,a=0;h>a;a++)e=o[a]=o[a]||this.dflt,i=l[a]=l[a]||this.dflt,c&&(u=e.indexOf(c),f=i.indexOf(c),u!==f&&(-1===f?o[a]=o[a].split(c).join(""):-1===u&&(o[a]+=" "+c)));e=o.join(", "),i=l.join(", ")}return ge(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,s,n)},h.parse=function(t,e,i,r,n,a){return this.parseComplex(t.style,this.format(Q(t,this.p,s,!1,this.dflt)),this.format(e),n,a)},a.registerSpecialProp=function(t,e,i){xe(t,{parser:function(t,r,s,n,a,o){var l=new de(t,s,0,0,a,2,s,!1,i);return l.plugin=o,l.setRatio=e(t,r,n._tween,s),l},priority:i})},a.useSVGTransformAttr=c||_;var we,be="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Pe=q("transform"),Se=G+"transform",Oe=q("transformOrigin"),Ce=null!==q("perspective"),ke=E.Transform=function(){this.perspective=parseFloat(a.defaultTransformPerspective)||0,this.force3D=a.defaultForce3D!==!1&&Ce?a.defaultForce3D||"auto":!1},Re=window.SVGElement,Ae=function(t,e,i){var r,s=X.createElementNS("http://www.w3.org/2000/svg",t),n=/([a-z])([A-Z])/g;for(r in i)s.setAttributeNS(null,r.replace(n,"$1-$2").toLowerCase(),i[r]);return e.appendChild(s),s},Me=X.documentElement,De=function(){var t,e,i,r=d||/Android/i.test(Y)&&!window.chrome;return X.createElementNS&&!r&&(t=Ae("svg",Me),e=Ae("rect",t,{width:100,height:50,x:100}),i=e.getBoundingClientRect().width,e.style[Oe]="50% 50%",e.style[Pe]="scaleX(0.5)",r=i===e.getBoundingClientRect().width&&!(_&&Ce),Me.removeChild(t)),r}(),Le=function(t,e,i,r,s){var n,o,l,h,u,f,c,_,p,d,m,g,v,y,x=t._gsTransform,T=Xe(t,!0);x&&(v=x.xOrigin,y=x.yOrigin),(!r||2>(n=r.split(" ")).length)&&(c=t.getBBox(),e=re(e).split(" "),n=[(-1!==e[0].indexOf("%")?parseFloat(e[0])/100*c.width:parseFloat(e[0]))+c.x,(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*c.height:parseFloat(e[1]))+c.y]),i.xOrigin=h=parseFloat(n[0]),i.yOrigin=u=parseFloat(n[1]),r&&T!==Fe&&(f=T[0],c=T[1],_=T[2],p=T[3],d=T[4],m=T[5],g=f*p-c*_,o=h*(p/g)+u*(-_/g)+(_*m-p*d)/g,l=h*(-c/g)+u*(f/g)-(f*m-c*d)/g,h=i.xOrigin=n[0]=o,u=i.yOrigin=n[1]=l),x&&(s||s!==!1&&a.defaultSmoothOrigin!==!1?(o=h-v,l=u-y,x.xOffset+=o*T[0]+l*T[2]-o,x.yOffset+=o*T[1]+l*T[3]-l):x.xOffset=x.yOffset=0),t.setAttribute("data-svg-origin",n.join(" "))},Ne=function(t){return!!(Re&&"function"==typeof t.getBBox&&t.getCTM&&(!t.parentNode||t.parentNode.getBBox&&t.parentNode.getCTM))},Fe=[1,0,0,1,0,0],Xe=function(t,e){var i,r,s,n,a,o=t._gsTransform||new ke,l=1e5;if(Pe?r=Q(t,Se,null,!0):t.currentStyle&&(r=t.currentStyle.filter.match(A),r=r&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),o.x||0,o.y||0].join(","):""),i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,(o.svg||t.getBBox&&Ne(t))&&(i&&-1!==(t.style[Pe]+"").indexOf("matrix")&&(r=t.style[Pe],i=0),s=t.getAttribute("transform"),i&&s&&(-1!==s.indexOf("matrix")?(r=s,i=0):-1!==s.indexOf("translate")&&(r="matrix(1,0,0,1,"+s.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",i=0))),i)return Fe;for(s=(r||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[],ve=s.length;--ve>-1;)n=Number(s[ve]),s[ve]=(a=n-(n|=0))?(0|a*l+(0>a?-.5:.5))/l+n:n;return e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s},ze=E.getTransform=function(t,i,r,n){if(t._gsTransform&&r&&!n)return t._gsTransform;var o,l,h,u,f,c,_=r?t._gsTransform||new ke:new ke,p=0>_.scaleX,d=2e-5,m=1e5,g=Ce?parseFloat(Q(t,Oe,i,!1,"0 0 0").split(" ")[2])||_.zOrigin||0:0,v=parseFloat(a.defaultTransformPerspective)||0;if(_.svg=!(!t.getBBox||!Ne(t)),_.svg&&(Le(t,Q(t,Oe,s,!1,"50% 50%")+"",_,t.getAttribute("data-svg-origin")),we=a.useSVGTransformAttr||De),o=Xe(t),o!==Fe){if(16===o.length){var y,x,T,w,b,P=o[0],S=o[1],O=o[2],C=o[3],k=o[4],R=o[5],A=o[6],M=o[7],D=o[8],L=o[9],F=o[10],X=o[12],z=o[13],B=o[14],I=o[11],E=Math.atan2(A,F);_.zOrigin&&(B=-_.zOrigin,X=D*B-o[12],z=L*B-o[13],B=F*B+_.zOrigin-o[14]),_.rotationX=E*N,E&&(w=Math.cos(-E),b=Math.sin(-E),y=k*w+D*b,x=R*w+L*b,T=A*w+F*b,D=k*-b+D*w,L=R*-b+L*w,F=A*-b+F*w,I=M*-b+I*w,k=y,R=x,A=T),E=Math.atan2(D,F),_.rotationY=E*N,E&&(w=Math.cos(-E),b=Math.sin(-E),y=P*w-D*b,x=S*w-L*b,T=O*w-F*b,L=S*b+L*w,F=O*b+F*w,I=C*b+I*w,P=y,S=x,O=T),E=Math.atan2(S,P),_.rotation=E*N,E&&(w=Math.cos(-E),b=Math.sin(-E),P=P*w+k*b,x=S*w+R*b,R=S*-b+R*w,A=O*-b+A*w,S=x),_.rotationX&&Math.abs(_.rotationX)+Math.abs(_.rotation)>359.9&&(_.rotationX=_.rotation=0,_.rotationY+=180),_.scaleX=(0|Math.sqrt(P*P+S*S)*m+.5)/m,_.scaleY=(0|Math.sqrt(R*R+L*L)*m+.5)/m,_.scaleZ=(0|Math.sqrt(A*A+F*F)*m+.5)/m,_.skewX=0,_.perspective=I?1/(0>I?-I:I):0,_.x=X,_.y=z,_.z=B,_.svg&&(_.x-=_.xOrigin-(_.xOrigin*P-_.yOrigin*k),_.y-=_.yOrigin-(_.yOrigin*S-_.xOrigin*R))}else if(!(Ce&&!n&&o.length&&_.x===o[4]&&_.y===o[5]&&(_.rotationX||_.rotationY)||void 0!==_.x&&"none"===Q(t,"display",i))){var Y=o.length>=6,W=Y?o[0]:1,V=o[1]||0,j=o[2]||0,G=Y?o[3]:1;_.x=o[4]||0,_.y=o[5]||0,h=Math.sqrt(W*W+V*V),u=Math.sqrt(G*G+j*j),f=W||V?Math.atan2(V,W)*N:_.rotation||0,c=j||G?Math.atan2(j,G)*N+f:_.skewX||0,Math.abs(c)>90&&270>Math.abs(c)&&(p?(h*=-1,c+=0>=f?180:-180,f+=0>=f?180:-180):(u*=-1,c+=0>=c?180:-180)),_.scaleX=h,_.scaleY=u,_.rotation=f,_.skewX=c,Ce&&(_.rotationX=_.rotationY=_.z=0,_.perspective=v,_.scaleZ=1),_.svg&&(_.x-=_.xOrigin-(_.xOrigin*W+_.yOrigin*j),_.y-=_.yOrigin-(_.xOrigin*V+_.yOrigin*G))}_.zOrigin=g;for(l in _)d>_[l]&&_[l]>-d&&(_[l]=0)}return r&&(t._gsTransform=_,_.svg&&(we&&t.style[Pe]?e.delayedCall(.001,function(){Ye(t.style,Pe)}):!we&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),_},Be=function(t){var e,i,r=this.data,s=-r.rotation*L,n=s+r.skewX*L,a=1e5,o=(0|Math.cos(s)*r.scaleX*a)/a,l=(0|Math.sin(s)*r.scaleX*a)/a,h=(0|Math.sin(n)*-r.scaleY*a)/a,u=(0|Math.cos(n)*r.scaleY*a)/a,f=this.t.style,c=this.t.currentStyle;if(c){i=l,l=-h,h=-i,e=c.filter,f.filter="";var _,p,m=this.t.offsetWidth,g=this.t.offsetHeight,v="absolute"!==c.position,y="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+l+", M21="+h+", M22="+u,w=r.x+m*r.xPercent/100,b=r.y+g*r.yPercent/100;if(null!=r.ox&&(_=(r.oxp?.01*m*r.ox:r.ox)-m/2,p=(r.oyp?.01*g*r.oy:r.oy)-g/2,w+=_-(_*o+p*l),b+=p-(_*h+p*u)),v?(_=m/2,p=g/2,y+=", Dx="+(_-(_*o+p*l)+w)+", Dy="+(p-(_*h+p*u)+b)+")"):y+=", sizingMethod='auto expand')",f.filter=-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?e.replace(M,y):y+" "+e,(0===t||1===t)&&1===o&&0===l&&0===h&&1===u&&(v&&-1===y.indexOf("Dx=0, Dy=0")||T.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf("gradient("&&e.indexOf("Alpha"))&&f.removeAttribute("filter")),!v){var P,S,O,C=8>d?1:-1;for(_=r.ieOffsetX||0,p=r.ieOffsetY||0,r.ieOffsetX=Math.round((m-((0>o?-o:o)*m+(0>l?-l:l)*g))/2+w),r.ieOffsetY=Math.round((g-((0>u?-u:u)*g+(0>h?-h:h)*m))/2+b),ve=0;4>ve;ve++)S=ee[ve],P=c[S],i=-1!==P.indexOf("px")?parseFloat(P):Z(this.t,S,parseFloat(P),P.replace(x,""))||0,O=i!==r[S]?2>ve?-r.ieOffsetX:-r.ieOffsetY:2>ve?_-r.ieOffsetX:p-r.ieOffsetY,f[S]=(r[S]=Math.round(i-O*(0===ve||2===ve?1:C)))+"px"}}},Ie=E.set3DTransformRatio=E.setTransformRatio=function(t){var e,i,r,s,n,a,o,l,h,u,f,c,p,d,m,g,v,y,x,T,w,b,P,S=this.data,O=this.t.style,C=S.rotation,k=S.rotationX,R=S.rotationY,A=S.scaleX,M=S.scaleY,D=S.scaleZ,N=S.x,F=S.y,X=S.z,z=S.svg,B=S.perspective,I=S.force3D;if(!(((1!==t&&0!==t||"auto"!==I||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&I||X||B||R||k)&&(!we||!z)&&Ce))return C||S.skewX||z?(C*=L,b=S.skewX*L,P=1e5,e=Math.cos(C)*A,s=Math.sin(C)*A,i=Math.sin(C-b)*-M,n=Math.cos(C-b)*M,b&&"simple"===S.skewType&&(v=Math.tan(b),v=Math.sqrt(1+v*v),i*=v,n*=v,S.skewY&&(e*=v,s*=v)),z&&(N+=S.xOrigin-(S.xOrigin*e+S.yOrigin*i)+S.xOffset,F+=S.yOrigin-(S.xOrigin*s+S.yOrigin*n)+S.yOffset,we&&(S.xPercent||S.yPercent)&&(d=this.t.getBBox(),N+=.01*S.xPercent*d.width,F+=.01*S.yPercent*d.height),d=1e-6,d>N&&N>-d&&(N=0),d>F&&F>-d&&(F=0)),x=(0|e*P)/P+","+(0|s*P)/P+","+(0|i*P)/P+","+(0|n*P)/P+","+N+","+F+")",z&&we?this.t.setAttribute("transform","matrix("+x):O[Pe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix(":"matrix(")+x):O[Pe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix(":"matrix(")+A+",0,0,"+M+","+N+","+F+")",void 0;if(_&&(d=1e-4,d>A&&A>-d&&(A=D=2e-5),d>M&&M>-d&&(M=D=2e-5),!B||S.z||S.rotationX||S.rotationY||(B=0)),C||S.skewX)C*=L,m=e=Math.cos(C),g=s=Math.sin(C),S.skewX&&(C-=S.skewX*L,m=Math.cos(C),g=Math.sin(C),"simple"===S.skewType&&(v=Math.tan(S.skewX*L),v=Math.sqrt(1+v*v),m*=v,g*=v,S.skewY&&(e*=v,s*=v))),i=-g,n=m;else{if(!(R||k||1!==D||B||z))return O[Pe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) translate3d(":"translate3d(")+N+"px,"+F+"px,"+X+"px)"+(1!==A||1!==M?" scale("+A+","+M+")":""),void 0;e=n=1,i=s=0}h=1,r=a=o=l=u=f=0,c=B?-1/B:0,p=S.zOrigin,d=1e-6,T=",",w="0",C=R*L,C&&(m=Math.cos(C),g=Math.sin(C),o=-g,u=c*-g,r=e*g,a=s*g,h=m,c*=m,e*=m,s*=m),C=k*L,C&&(m=Math.cos(C),g=Math.sin(C),v=i*m+r*g,y=n*m+a*g,l=h*g,f=c*g,r=i*-g+r*m,a=n*-g+a*m,h*=m,c*=m,i=v,n=y),1!==D&&(r*=D,a*=D,h*=D,c*=D),1!==M&&(i*=M,n*=M,l*=M,f*=M),1!==A&&(e*=A,s*=A,o*=A,u*=A),(p||z)&&(p&&(N+=r*-p,F+=a*-p,X+=h*-p+p),z&&(N+=S.xOrigin-(S.xOrigin*e+S.yOrigin*i)+S.xOffset,F+=S.yOrigin-(S.xOrigin*s+S.yOrigin*n)+S.yOffset),d>N&&N>-d&&(N=w),d>F&&F>-d&&(F=w),d>X&&X>-d&&(X=0)),x=S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix3d(":"matrix3d(",x+=(d>e&&e>-d?w:e)+T+(d>s&&s>-d?w:s)+T+(d>o&&o>-d?w:o),x+=T+(d>u&&u>-d?w:u)+T+(d>i&&i>-d?w:i)+T+(d>n&&n>-d?w:n),k||R?(x+=T+(d>l&&l>-d?w:l)+T+(d>f&&f>-d?w:f)+T+(d>r&&r>-d?w:r),x+=T+(d>a&&a>-d?w:a)+T+(d>h&&h>-d?w:h)+T+(d>c&&c>-d?w:c)+T):x+=",0,0,0,0,1,0,",x+=N+T+F+T+X+T+(B?1+-X/B:1)+")",O[Pe]=x};h=ke.prototype,h.x=h.y=h.z=h.skewX=h.skewY=h.rotation=h.rotationX=h.rotationY=h.zOrigin=h.xPercent=h.yPercent=h.xOffset=h.yOffset=0,h.scaleX=h.scaleY=h.scaleZ=1,xe("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,i,r,n,o,l){if(r._lastParsedTransform===l)return n;r._lastParsedTransform=l;var h,u,f,c,_,p,d,m,g,v,y=t._gsTransform,x=t.style,T=1e-6,w=be.length,b=l,P={},S="transformOrigin";if(l.display?(c=Q(t,"display"),x.display="block",h=ze(t,s,!0,l.parseTransform),x.display=c):h=ze(t,s,!0,l.parseTransform),r._transform=h,"string"==typeof b.transform&&Pe)c=B.style,c[Pe]=b.transform,c.display="block",c.position="absolute",X.body.appendChild(B),u=ze(B,null,!1),X.body.removeChild(B),u.perspective||(u.perspective=h.perspective),null!=b.xPercent&&(u.xPercent=ne(b.xPercent,h.xPercent)),null!=b.yPercent&&(u.yPercent=ne(b.yPercent,h.yPercent));else if("object"==typeof b){if(u={scaleX:ne(null!=b.scaleX?b.scaleX:b.scale,h.scaleX),scaleY:ne(null!=b.scaleY?b.scaleY:b.scale,h.scaleY),scaleZ:ne(b.scaleZ,h.scaleZ),x:ne(b.x,h.x),y:ne(b.y,h.y),z:ne(b.z,h.z),xPercent:ne(b.xPercent,h.xPercent),yPercent:ne(b.yPercent,h.yPercent),perspective:ne(b.transformPerspective,h.perspective)},m=b.directionalRotation,null!=m)if("object"==typeof m)for(c in m)b[c]=m[c];else b.rotation=m;"string"==typeof b.x&&-1!==b.x.indexOf("%")&&(u.x=0,u.xPercent=ne(b.x,h.xPercent)),"string"==typeof b.y&&-1!==b.y.indexOf("%")&&(u.y=0,u.yPercent=ne(b.y,h.yPercent)),u.rotation=ae("rotation"in b?b.rotation:"shortRotation"in b?b.shortRotation+"_short":"rotationZ"in b?b.rotationZ:h.rotation,h.rotation,"rotation",P),Ce&&(u.rotationX=ae("rotationX"in b?b.rotationX:"shortRotationX"in b?b.shortRotationX+"_short":h.rotationX||0,h.rotationX,"rotationX",P),u.rotationY=ae("rotationY"in b?b.rotationY:"shortRotationY"in b?b.shortRotationY+"_short":h.rotationY||0,h.rotationY,"rotationY",P)),u.skewX=null==b.skewX?h.skewX:ae(b.skewX,h.skewX),u.skewY=null==b.skewY?h.skewY:ae(b.skewY,h.skewY),(f=u.skewY-h.skewY)&&(u.skewX+=f,u.rotation+=f)}for(Ce&&null!=b.force3D&&(h.force3D=b.force3D,d=!0),h.skewType=b.skewType||h.skewType||a.defaultSkewType,p=h.force3D||h.z||h.rotationX||h.rotationY||u.z||u.rotationX||u.rotationY||u.perspective,p||null==b.scale||(u.scaleZ=1);--w>-1;)i=be[w],_=u[i]-h[i],(_>T||-T>_||null!=b[i]||null!=F[i])&&(d=!0,n=new de(h,i,h[i],_,n),i in P&&(n.e=P[i]),n.xs0=0,n.plugin=o,r._overwriteProps.push(n.n));return _=b.transformOrigin,h.svg&&(_||b.svgOrigin)&&(g=h.xOffset,v=h.yOffset,Le(t,re(_),u,b.svgOrigin,b.smoothOrigin),n=me(h,"xOrigin",(y?h:u).xOrigin,u.xOrigin,n,S),n=me(h,"yOrigin",(y?h:u).yOrigin,u.yOrigin,n,S),(g!==h.xOffset||v!==h.yOffset)&&(n=me(h,"xOffset",y?g:h.xOffset,h.xOffset,n,S),n=me(h,"yOffset",y?v:h.yOffset,h.yOffset,n,S)),_=we?null:"0px 0px"),(_||Ce&&p&&h.zOrigin)&&(Pe?(d=!0,i=Oe,_=(_||Q(t,i,s,!1,"50% 50%"))+"",n=new de(x,i,0,0,n,-1,S),n.b=x[i],n.plugin=o,Ce?(c=h.zOrigin,_=_.split(" "),h.zOrigin=(_.length>2&&(0===c||"0px"!==_[2])?parseFloat(_[2]):c)||0,n.xs0=n.e=_[0]+" "+(_[1]||"50%")+" 0px",n=new de(h,"zOrigin",0,0,n,-1,n.n),n.b=c,n.xs0=n.e=h.zOrigin):n.xs0=n.e=_):re(_+"",h)),d&&(r._transformType=h.svg&&we||!p&&3!==this._transformType?2:3),n},prefix:!0}),xe("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),xe("borderRadius",{defaultValue:"0px",parser:function(t,e,i,n,a){e=this.format(e);var o,l,h,u,f,c,_,p,d,m,g,v,y,x,T,w,b=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],P=t.style;for(d=parseFloat(t.offsetWidth),m=parseFloat(t.offsetHeight),o=e.split(" "),l=0;b.length>l;l++)this.p.indexOf("border")&&(b[l]=q(b[l])),f=u=Q(t,b[l],s,!1,"0px"),-1!==f.indexOf(" ")&&(u=f.split(" "),f=u[0],u=u[1]),c=h=o[l],_=parseFloat(f),v=f.substr((_+"").length),y="="===c.charAt(1),y?(p=parseInt(c.charAt(0)+"1",10),c=c.substr(2),p*=parseFloat(c),g=c.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(c),g=c.substr((p+"").length)),""===g&&(g=r[i]||v),g!==v&&(x=Z(t,"borderLeft",_,v),T=Z(t,"borderTop",_,v),"%"===g?(f=100*(x/d)+"%",u=100*(T/m)+"%"):"em"===g?(w=Z(t,"borderLeft",1,"em"),f=x/w+"em",u=T/w+"em"):(f=x+"px",u=T+"px"),y&&(c=parseFloat(f)+p+g,h=parseFloat(u)+p+g)),a=ge(P,b[l],f+" "+u,c+" "+h,!1,"0px",a);return a},prefix:!0,formatter:ce("0px 0px 0px 0px",!1,!0)}),xe("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,n,a){var o,l,h,u,f,c,_="background-position",p=s||H(t,null),m=this.format((p?d?p.getPropertyValue(_+"-x")+" "+p.getPropertyValue(_+"-y"):p.getPropertyValue(_):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==m.indexOf("%")!=(-1!==g.indexOf("%"))&&(c=Q(t,"backgroundImage").replace(C,""),c&&"none"!==c)){for(o=m.split(" "),l=g.split(" "),I.setAttribute("src",c),h=2;--h>-1;)m=o[h],u=-1!==m.indexOf("%"),u!==(-1!==l[h].indexOf("%"))&&(f=0===h?t.offsetWidth-I.width:t.offsetHeight-I.height,o[h]=u?parseFloat(m)/100*f+"px":100*(parseFloat(m)/f)+"%");m=o.join(" ")}return this.parseComplex(t.style,m,g,n,a)},formatter:re}),xe("backgroundSize",{defaultValue:"0 0",formatter:re}),xe("perspective",{defaultValue:"0px",prefix:!0}),xe("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),xe("transformStyle",{prefix:!0}),xe("backfaceVisibility",{prefix:!0}),xe("userSelect",{prefix:!0}),xe("margin",{parser:_e("marginTop,marginRight,marginBottom,marginLeft")}),xe("padding",{parser:_e("paddingTop,paddingRight,paddingBottom,paddingLeft")}),xe("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,n,a){var o,l,h;return 9>d?(l=t.currentStyle,h=8>d?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format(Q(t,this.p,s,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,n,a)}}),xe("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),xe("autoRound,strictUnits",{parser:function(t,e,i,r,s){return s}}),xe("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,n,a){return this.parseComplex(t.style,this.format(Q(t,"borderTopWidth",s,!1,"0px")+" "+Q(t,"borderTopStyle",s,!1,"solid")+" "+Q(t,"borderTopColor",s,!1,"#000")),this.format(e),n,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(fe)||["#000"])[0]}}),xe("borderWidth",{parser:_e("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),xe("float,cssFloat,styleFloat",{parser:function(t,e,i,r,s){var n=t.style,a="cssFloat"in n?"cssFloat":"styleFloat";return new de(n,a,0,0,s,-1,i,!1,0,n[a],e)}});var Ee=function(t){var e,i=this.t,r=i.filter||Q(this.data,"filter")||"",s=0|this.s+this.c*t;100===s&&(-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(i.removeAttribute("filter"),e=!Q(this.data,"filter")):(i.filter=r.replace(b,""),e=!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+s+")"),-1===r.indexOf("pacity")?0===s&&this.xn1||(i.filter=r+" alpha(opacity="+s+")"):i.filter=r.replace(T,"opacity="+s))};xe("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,n,a){var o=parseFloat(Q(t,"opacity",s,!1,"1")),l=t.style,h="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),h&&1===o&&"hidden"===Q(t,"visibility",s)&&0!==e&&(o=0),W?n=new de(l,"opacity",o,e-o,n):(n=new de(l,"opacity",100*o,100*(e-o),n),n.xn1=h?1:0,l.zoom=1,n.type=2,n.b="alpha(opacity="+n.s+")",n.e="alpha(opacity="+(n.s+n.c)+")",n.data=t,n.plugin=a,n.setRatio=Ee),h&&(n=new de(l,"visibility",0,0,n,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit"),n.xs0="inherit",r._overwriteProps.push(n.n),r._overwriteProps.push(i)),n}});var Ye=function(t,e){e&&(t.removeProperty?(("ms"===e.substr(0,2)||"webkit"===e.substr(0,6))&&(e="-"+e),t.removeProperty(e.replace(S,"-$1").toLowerCase())):t.removeAttribute(e))},We=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:Ye(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};xe("className",{parser:function(t,e,r,n,a,o,l){var h,u,f,c,_,p=t.getAttribute("class")||"",d=t.style.cssText;if(a=n._classNamePT=new de(t,r,0,0,a,2),a.setRatio=We,a.pr=-11,i=!0,a.b=p,u=K(t,s),f=t._gsClassPT){for(c={},_=f.data;_;)c[_.p]=1,_=_._next; f.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:p.replace(RegExp("\\s*\\b"+e.substr(2)+"\\b"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),h=J(t,u,K(t),l,c),t.setAttribute("class",p),a.data=h.firstMPT,t.style.cssText=d,a=a.xfirst=n.parse(t,h.difs,a,o)}});var Ve=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,s,n,a=this.t.style,o=l.transform.parse;if("all"===this.e)a.cssText="",s=!0;else for(e=this.e.split(" ").join("").split(","),r=e.length;--r>-1;)i=e[r],l[i]&&(l[i].parse===o?s=!0:i="transformOrigin"===i?Oe:l[i].p),Ye(a,i);s&&(Ye(a,Pe),n=this.t._gsTransform,n&&(n.svg&&this.t.removeAttribute("data-svg-origin"),delete this.t._gsTransform))}};for(xe("clearProps",{parser:function(t,e,r,s,n){return n=new de(t,r,0,0,n,2),n.setRatio=Ve,n.e=e,n.pr=-10,n.data=s._tween,i=!0,n}}),h="bezier,throwProps,physicsProps,physics2D".split(","),ve=h.length;ve--;)Te(h[ve]);h=a.prototype,h._firstPT=h._lastParsedTransform=h._transform=null,h._onInitTween=function(t,e,o){if(!t.nodeType)return!1;this._target=t,this._tween=o,this._vars=e,u=e.autoRound,i=!1,r=e.suffixMap||a.suffixMap,s=H(t,""),n=this._overwriteProps;var h,_,d,m,g,v,y,x,T,b=t.style;if(f&&""===b.zIndex&&(h=Q(t,"zIndex",s),("auto"===h||""===h)&&this._addLazySet(b,"zIndex",0)),"string"==typeof e&&(m=b.cssText,h=K(t,s),b.cssText=m+";"+e,h=J(t,h,K(t)).difs,!W&&w.test(e)&&(h.opacity=parseFloat(RegExp.$1)),e=h,b.cssText=m),this._firstPT=_=e.className?l.className.parse(t,e.className,"className",this,null,null,e):this.parse(t,e,null),this._transformType){for(T=3===this._transformType,Pe?c&&(f=!0,""===b.zIndex&&(y=Q(t,"zIndex",s),("auto"===y||""===y)&&this._addLazySet(b,"zIndex",0)),p&&this._addLazySet(b,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(T?"visible":"hidden"))):b.zoom=1,d=_;d&&d._next;)d=d._next;x=new de(t,"transform",0,0,null,2),this._linkCSSP(x,null,d),x.setRatio=Pe?Ie:Be,x.data=this._transform||ze(t,s,!0),x.tween=o,x.pr=-1,n.pop()}if(i){for(;_;){for(v=_._next,d=m;d&&d.pr>_.pr;)d=d._next;(_._prev=d?d._prev:g)?_._prev._next=_:m=_,(_._next=d)?d._prev=_:g=_,_=v}this._firstPT=m}return!0},h.parse=function(t,e,i,n){var a,o,h,f,c,_,p,d,m,g,v=t.style;for(a in e)_=e[a],o=l[a],o?i=o.parse(t,_,a,this,i,n,e):(c=Q(t,a,s)+"",m="string"==typeof _,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||m&&P.test(_)?(m||(_=he(_),_=(_.length>3?"rgba(":"rgb(")+_.join(",")+")"),i=ge(v,a,c,_,!0,"transparent",i,0,n)):!m||-1===_.indexOf(" ")&&-1===_.indexOf(",")?(h=parseFloat(c),p=h||0===h?c.substr((h+"").length):"",(""===c||"auto"===c)&&("width"===a||"height"===a?(h=ie(t,a,s),p="px"):"left"===a||"top"===a?(h=$(t,a,s),p="px"):(h="opacity"!==a?0:1,p="")),g=m&&"="===_.charAt(1),g?(f=parseInt(_.charAt(0)+"1",10),_=_.substr(2),f*=parseFloat(_),d=_.replace(x,"")):(f=parseFloat(_),d=m?_.replace(x,""):""),""===d&&(d=a in r?r[a]:p),_=f||0===f?(g?f+h:f)+d:e[a],p!==d&&""!==d&&(f||0===f)&&h&&(h=Z(t,a,h,p),"%"===d?(h/=Z(t,a,100,"%")/100,e.strictUnits!==!0&&(c=h+"%")):"em"===d||"rem"===d?h/=Z(t,a,1,d):"px"!==d&&(f=Z(t,a,f,d),d="px"),g&&(f||0===f)&&(_=f+h+d)),g&&(f+=h),!h&&0!==h||!f&&0!==f?void 0!==v[a]&&(_||"NaN"!=_+""&&null!=_)?(i=new de(v,a,f||h||0,0,i,-1,a,!1,0,c,_),i.xs0="none"!==_||"display"!==a&&-1===a.indexOf("Style")?_:c):j("invalid "+a+" tween value: "+e[a]):(i=new de(v,a,h,f-h,i,0,a,u!==!1&&("px"===d||"zIndex"===a),0,c,_),i.xs0=d)):i=ge(v,a,c,_,!0,null,i,0,n)),n&&i&&!i.plugin&&(i.plugin=n);return i},h.setRatio=function(t){var e,i,r,s=this._firstPT,n=1e-6;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;s;){if(e=s.c*t+s.s,s.r?e=Math.round(e):n>e&&e>-n&&(e=0),s.type)if(1===s.type)if(r=s.l,2===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2;else if(3===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3;else if(4===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4;else if(5===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4+s.xn4+s.xs5;else{for(i=s.xs0+e+s.xs1,r=1;s.l>r;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}else-1===s.type?s.t[s.p]=s.xs0:s.setRatio&&s.setRatio(t);else s.t[s.p]=e+s.xs0;s=s._next}else for(;s;)2!==s.type?s.t[s.p]=s.b:s.setRatio(t),s=s._next;else for(;s;){if(2!==s.type)if(s.r&&-1!==s.type)if(e=Math.round(s.s+s.c),s.type){if(1===s.type){for(r=s.l,i=s.xs0+e+s.xs1,r=1;s.l>r;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}}else s.t[s.p]=e+s.xs0;else s.t[s.p]=s.e;else s.setRatio(t);s=s._next}},h._enableTransforms=function(t){this._transform=this._transform||ze(this._target,s,!0),this._transformType=this._transform.svg&&we||!t&&3!==this._transformType?2:3};var je=function(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};h._addLazySet=function(t,e,i){var r=this._firstPT=new de(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=je,r.data=this},h._linkCSSP=function(t,e,i,r){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,r=!0),i?i._next=t:r||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},h._kill=function(e){var i,r,s,n=e;if(e.autoAlpha||e.alpha){n={};for(r in e)n[r]=e[r];n.opacity=1,n.autoAlpha&&(n.visibility=1)}return e.className&&(i=this._classNamePT)&&(s=i.xfirst,s&&s._prev?this._linkCSSP(s._prev,i._next,s._prev._prev):s===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,s._prev),this._classNamePT=null),t.prototype._kill.call(this,n)};var Ge=function(t,e,i){var r,s,n,a;if(t.slice)for(s=t.length;--s>-1;)Ge(t[s],e,i);else for(r=t.childNodes,s=r.length;--s>-1;)n=r[s],a=n.type,n.style&&(e.push(K(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||Ge(n,e,i)};return a.cascadeTo=function(t,i,r){var s,n,a,o,l=e.to(t,i,r),h=[l],u=[],f=[],c=[],_=e._internals.reservedProps;for(t=l._targets||l.target,Ge(t,u,c),l.render(i,!0,!0),Ge(t,f),l.render(0,!0,!0),l._enabled(!0),s=c.length;--s>-1;)if(n=J(c[s],u[s],f[s]),n.firstMPT){n=n.difs;for(a in r)_[a]&&(n[a]=r[a]);o={};for(a in n)o[a]=u[s][a];h.push(e.fromTo(c[s],i,o,n))}return h},t.activate([a]),a},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=e())}("CSSPlugin"); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(function(t){"use strict";var e=t.GreenSockGlobals||t,i=function(t){var i,s=t.split("."),r=e;for(i=0;s.length>i;i++)r[s[i]]=r=r[s[i]]||{};return r},s=i("com.greensock.utils"),r=function(t){var e=t.nodeType,i="";if(1===e||9===e||11===e){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=r(t)}else if(3===e||4===e)return t.nodeValue;return i},n=document,a=n.defaultView?n.defaultView.getComputedStyle:function(){},o=/([A-Z])/g,l=function(t,e,i,s){var r;return(i=i||a(t,null))?(t=i.getPropertyValue(e.replace(o,"-$1").toLowerCase()),r=t||i.length?t:i[e]):t.currentStyle&&(i=t.currentStyle,r=i[e]),s?r:parseInt(r,10)||0},h=function(t){return t.length&&t[0]&&(t[0].nodeType&&t[0].style&&!t.nodeType||t[0].length&&t[0][0])?!0:!1},_=function(t){var e,i,s,r=[],n=t.length;for(e=0;n>e;e++)if(i=t[e],h(i))for(s=i.length,s=0;i.length>s;s++)r.push(i[s]);else r.push(i);return r},u=")eefec303079ad17405c",c=/(?:
    ||
    )/gi,f=n.all&&!n.addEventListener,p="
    ":">")}},d=s.SplitText=e.SplitText=function(t,e){if("string"==typeof t&&(t=d.selector(t)),!t)throw"cannot split a null element.";this.elements=h(t)?_(t):[t],this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=e||{},this.split(e)},g=function(t,e,i){var s=t.nodeType;if(1===s||9===s||11===s)for(t=t.firstChild;t;t=t.nextSibling)g(t,e,i);else(3===s||4===s)&&(t.nodeValue=t.nodeValue.split(e).join(i))},v=function(t,e){for(var i=e.length;--i>-1;)t.push(e[i])},y=function(t,e,i,s,o){c.test(t.innerHTML)&&(t.innerHTML=t.innerHTML.replace(c,u));var h,_,f,p,d,y,T,w,b,x,P,S,k,C,R=r(t),O=e.type||e.split||"chars,words,lines",A=-1!==O.indexOf("lines")?[]:null,D=-1!==O.indexOf("words"),M=-1!==O.indexOf("chars"),L="absolute"===e.position||e.absolute===!0,F=L?"­ ":" ",z=-999,I=a(t),E=l(t,"paddingLeft",I),N=l(t,"borderBottomWidth",I)+l(t,"borderTopWidth",I),X=l(t,"borderLeftWidth",I)+l(t,"borderRightWidth",I),B=l(t,"paddingTop",I)+l(t,"paddingBottom",I),j=l(t,"paddingLeft",I)+l(t,"paddingRight",I),U=l(t,"textAlign",I,!0),Y=t.clientHeight,q=t.clientWidth,V="
    ",G=m(e.wordsClass),Q=m(e.charsClass),W=-1!==(e.linesClass||"").indexOf("++"),Z=e.linesClass,H=-1!==R.indexOf("<"),$=!0,K=[],J=[],te=[];for(W&&(Z=Z.split("++").join("")),H&&(R=R.split("<").join("{{LT}}")),h=R.length,p=G(),d=0;h>d;d++)if(T=R.charAt(d),")"===T&&R.substr(d,20)===u)p+=($?V:"")+"
    ",$=!1,d!==h-20&&R.substr(d+20,20)!==u&&(p+=" "+G(),$=!0),d+=19;else if(" "===T&&" "!==R.charAt(d-1)&&d!==h-1&&R.substr(d-20,20)!==u){for(p+=$?V:"",$=!1;" "===R.charAt(d+1);)p+=F,d++;(")"!==R.charAt(d+1)||R.substr(d+1,20)!==u)&&(p+=F+G(),$=!0)}else"{"===T&&"{{LT}}"===R.substr(d,6)?(p+=M?Q()+"{{LT}}"+"
    ":"{{LT}}",d+=5):p+=M&&" "!==T?Q()+T+"
    ":T;for(t.innerHTML=p+($?V:""),H&&g(t,"{{LT}}","<"),y=t.getElementsByTagName("*"),h=y.length,w=[],d=0;h>d;d++)w[d]=y[d];if(A||L)for(d=0;h>d;d++)b=w[d],f=b.parentNode===t,(f||L||M&&!D)&&(x=b.offsetTop,A&&f&&x!==z&&"BR"!==b.nodeName&&(_=[],A.push(_),z=x),L&&(b._x=b.offsetLeft,b._y=x,b._w=b.offsetWidth,b._h=b.offsetHeight),A&&(D!==f&&M||(_.push(b),b._x-=E),f&&d&&(w[d-1]._wordEnd=!0),"BR"===b.nodeName&&b.nextSibling&&"BR"===b.nextSibling.nodeName&&A.push([])));for(d=0;h>d;d++)b=w[d],f=b.parentNode===t,"BR"!==b.nodeName?(L&&(S=b.style,D||f||(b._x+=b.parentNode._x,b._y+=b.parentNode._y),S.left=b._x+"px",S.top=b._y+"px",S.position="absolute",S.display="block",S.width=b._w+1+"px",S.height=b._h+"px"),D?f&&""!==b.innerHTML?J.push(b):M&&K.push(b):f?(t.removeChild(b),w.splice(d--,1),h--):!f&&M&&(x=!A&&!L&&b.nextSibling,t.appendChild(b),x||t.appendChild(n.createTextNode(" ")),K.push(b))):A||L?(t.removeChild(b),w.splice(d--,1),h--):D||t.appendChild(b);if(A){for(L&&(P=n.createElement("div"),t.appendChild(P),k=P.offsetWidth+"px",x=P.offsetParent===t?0:t.offsetLeft,t.removeChild(P)),S=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(C=!L||!D&&!M,d=0;A.length>d;d++){for(_=A[d],P=n.createElement("div"),P.style.cssText="display:block;text-align:"+U+";position:"+(L?"absolute;":"relative;"),Z&&(P.className=Z+(W?d+1:"")),te.push(P),h=_.length,y=0;h>y;y++)"BR"!==_[y].nodeName&&(b=_[y],P.appendChild(b),C&&(b._wordEnd||D)&&P.appendChild(n.createTextNode(" ")),L&&(0===y&&(P.style.top=b._y+"px",P.style.left=E+x+"px"),b.style.top="0px",x&&(b.style.left=b._x-x+"px")));0===h&&(P.innerHTML=" "),D||M||(P.innerHTML=r(P).split(String.fromCharCode(160)).join(" ")),L&&(P.style.width=k,P.style.height=b._h+"px"),t.appendChild(P)}t.style.cssText=S}L&&(Y>t.clientHeight&&(t.style.height=Y-B+"px",Y>t.clientHeight&&(t.style.height=Y+N+"px")),q>t.clientWidth&&(t.style.width=q-j+"px",q>t.clientWidth&&(t.style.width=q+X+"px"))),v(i,K),v(s,J),v(o,te)},T=d.prototype;T.split=function(t){this.isSplit&&this.revert(),this.vars=t||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var e=this.elements.length;--e>-1;)this._originals[e]=this.elements[e].innerHTML,y(this.elements[e],this.vars,this.chars,this.words,this.lines);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},T.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var t=this._originals.length;--t>-1;)this.elements[t].innerHTML=this._originals[t];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},d.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(d.selector=i,i(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)},d.version="0.3.4"})(_gsScope),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(module.exports=e())}("SplitText"); try{ window.GreenSockGlobals=null; window._gsQueue=null; window._gsDefine=null; delete(window.GreenSockGlobals); delete(window._gsQueue); delete(window._gsDefine); } catch(e){} try{ window.GreenSockGlobals=oldgs; window._gsQueue=oldgs_queue; } catch(e){} if(window.tplogs==true) try { console.groupEnd(); } catch(e){} (function(e,t){ e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};e.expr[":"].uncached=function(t){var n=document.createElement("img");n.src=t.src;return e(t).is('img[src!=""]')&&!n.complete};e.fn.waitForImages=function(t,n,r){if(e.isPlainObject(arguments[0])){n=t.each;r=t.waitForAll;t=t.finished}t=t||e.noop;n=n||e.noop;r=!!r;if(!e.isFunction(t)||!e.isFunction(n)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var i=e(this),s=[];if(r){var o=e.waitForImages.hasImageProperties||[],u=/url\((['"]?)(.*?)\1\)/g;i.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){s.push({src:t.attr("src"),element:t[0]})}e.each(o,function(e,n){var r=t.css(n);if(!r){return true}var i;while(i=u.exec(r)){s.push({src:i[2],element:t[0]})}})})}else{i.find("img:uncached").each(function(){s.push({src:this.src,element:this})})}var f=s.length,l=0;if(f==0){t.call(i[0])}e.each(s,function(r,s){var o=new Image;e(o).bind("load error",function(e){l++;n.call(s.element,l,f,e.type=="load");if(l==f){t.call(i[0]);return false}});o.src=s.src})})};})(jQuery); !function(e,t){"use strict";e.fn.extend({revolution:function(a){var n={delay:9e3,responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,autoHeight:"off",sliderType:"standard",sliderLayout:"auto",fullScreenAutoWidth:"off",fullScreenAlignForce:"off",fullScreenOffsetContainer:"",fullScreenOffset:"0",hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,disableProgressBar:"off",stopAtSlide:-1,stopAfterLoops:-1,shadow:0,dottedOverlay:"none",startDelay:0,lazyType:"smart",spinner:"spinner0",shuffle:"off",viewPort:{enable:!1,outof:"wait",visible_area:"60%"},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:"off",simplifyAll:"on",nextSlideOnWindowFocus:"off",disableFocusListener:!0},parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",speed:400,bgparallax:"on",opacity:"on",disable_onmobile:"off",ddd_shadow:"on",ddd_bgfreeze:"off",ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,ddd_path:"mouse"},carousel:{horizontal_align:"center",vertical_align:"center",infinity:"on",space:0,maxVisibleItems:3,stretch:"off",fadeout:"on",maxRotation:0,minScale:0,vary_fade:"off",vary_rotation:"on",vary_scale:"off",border_radius:"0px",padding_top:0,padding_bottom:0},navigation:{keyboardNavigation:"on",keyboard_direction:"horizontal",mouseScrollNavigation:"off",onHoverStop:"on",touch:{touchenabled:"off",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,swipe_direction:"horizontal"},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,tmp:"",left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0}},bullets:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"left",v_align:"center",space:0,h_offset:20,v_offset:0,tmp:''},thumbnails:{style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"left",v_align:"center",h_offset:20,v_offset:0},tabs:{style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"left",v_align:"center",h_offset:20,v_offset:0}},extensions:"extensions/",extensions_suffix:".min.js",debugMode:!1};return a=e.extend(!0,{},n,a),this.each(function(){var n=e(this);"hero"==a.sliderType&&n.find(">ul>li").each(function(t){t>0&&e(this).remove()}),a.jsFileLocation=a.jsFileLocation||s("themepunch.revolution.min.js"),a.jsFileLocation=a.jsFileLocation+a.extensions,a.scriptsneeded=o(a,n),a.curWinRange=0,e(this).on("scriptsloaded",function(){return a.modulesfailing?(n.html('
    !! Error at loading Slider Revolution 5.0 Extrensions.'+a.errorm+"
    ").show(),!1):(i.migration!=t&&(a=i.migration(n,a)),punchgs.force3D=!0,"on"!==a.simplifyAll&&punchgs.TweenLite.lagSmoothing(1e3,16),d(n,a),void u(n,a))}),r(n,a.scriptsneeded)})},revaddcallback:function(i){return this.each(function(){var a=e(this);if(a!=t&&a.length>0&&e("body").find("#"+a.attr("id")).length>0){var n=a.parent().find(".tp-bannertimer"),o=n.data("opt");o.callBackArray===t&&(o.callBackArray=new Array),o.callBackArray.push(i)}})},revgetparallaxproc:function(){var i=e(this);if(i!=t&&i.length>0&&e("body").find("#"+i.attr("id")).length>0){var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");return n.scrollproc}},revdebugmode:function(){return this.each(function(){var i=e(this);if(i!=t&&i.length>0&&e("body").find("#"+i.attr("id")).length>0){var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");n.debugMode=!0,v(i,n)}})},revscroll:function(i){return this.each(function(){var a=e(this);a!=t&&a.length>0&&e("body").find("#"+a.attr("id")).length>0&&e("body,html").animate({scrollTop:a.offset().top+a.height()-i+"px"},{duration:400})})},revredraw:function(i){return this.each(function(){var i=e(this);if(i!=t&&i.length>0&&e("body").find("#"+i.attr("id")).length>0){var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");v(i,n)}})},revkill:function(a){var n=this,o=e(this);if(punchgs.TweenLite.killDelayedCallsTo(i.showHideNavElements),i.endMoveCaption&&punchgs.TweenLite.killDelayedCallsTo(i.endMoveCaption),o!=t&&o.length>0&&e("body").find("#"+o.attr("id")).length>0){o.data("conthover",1),o.data("conthover-changed",1),o.trigger("revolution.slide.onpause");var r=o.parent().find(".tp-bannertimer"),s=r.data("opt");s.tonpause=!0,o.trigger("stoptimer"),punchgs.TweenLite.killTweensOf(o.find("*"),!1),punchgs.TweenLite.killTweensOf(o,!1),o.unbind("hover, mouseover, mouseenter,mouseleave, resize");var l="resize.revslider-"+o.attr("id");e(window).off(l),o.find("*").each(function(){var i=e(this);i.unbind("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),i.off("on, hover, mouseenter,mouseleave,mouseover, resize"),i.data("mySplitText",null),i.data("ctl",null),i.data("tween")!=t&&i.data("tween").kill(),i.data("kenburn")!=t&&i.data("kenburn").kill(),i.data("timeline_out")!=t&&i.data("timeline_out").kill(),i.data("timeline")!=t&&i.data("timeline").kill(),i.remove(),i.empty(),i=null}),punchgs.TweenLite.killTweensOf(o.find("*"),!1),punchgs.TweenLite.killTweensOf(o,!1),r.remove();try{o.closest(".forcefullwidth_wrapper_tp_banner").remove()}catch(d){}try{o.closest(".rev_slider_wrapper").remove()}catch(d){}try{o.remove()}catch(d){}return o.empty(),o.html(),o=null,s=null,delete n.c,delete n.opt,!0}return!1},revpause:function(){return this.each(function(){var i=e(this);if(i!=t&&i.length>0&&e("body").find("#"+i.attr("id")).length>0){i.data("conthover",1),i.data("conthover-changed",1),i.trigger("revolution.slide.onpause");var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");n.tonpause=!0,i.trigger("stoptimer")}})},revresume:function(){return this.each(function(){var i=e(this);if(i!=t&&i.length>0&&e("body").find("#"+i.attr("id")).length>0){i.data("conthover",0),i.data("conthover-changed",1),i.trigger("revolution.slide.onresume");var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");n.tonpause=!1,i.trigger("starttimer")}})},revnext:function(){return this.each(function(){var a=e(this);if(a!=t&&a.length>0&&e("body").find("#"+a.attr("id")).length>0){var n=a.parent().find(".tp-bannertimer"),o=n.data("opt");i.callingNewSlide(o,a,1)}})},revprev:function(){return this.each(function(){var a=e(this);if(a!=t&&a.length>0&&e("body").find("#"+a.attr("id")).length>0){var n=a.parent().find(".tp-bannertimer"),o=n.data("opt");i.callingNewSlide(o,a,-1)}})},revmaxslide:function(){return e(this).find(".tp-revslider-mainul >li").length},revcurrentslide:function(){var i=e(this);if(i!=t&&i.length>0&&e("body").find("#"+i.attr("id")).length>0){var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");return parseInt(n.act,0)+1}},revlastslide:function(){return e(this).find(".tp-revslider-mainul >li").length},revshowslide:function(a){return this.each(function(){var n=e(this);if(n!=t&&n.length>0&&e("body").find("#"+n.attr("id")).length>0){var o=n.parent().find(".tp-bannertimer"),r=o.data("opt");i.callingNewSlide(r,n,"to"+(a-1))}})},revcallslidewithid:function(a){return this.each(function(){var n=e(this);if(n!=t&&n.length>0&&e("body").find("#"+n.attr("id")).length>0){var o=n.parent().find(".tp-bannertimer"),r=o.data("opt");i.callingNewSlide(r,n,a)}})}});var i=e.fn.revolution;e.extend(!0,i,{simp:function(e,t,i){var a=Math.abs(e)-Math.floor(Math.abs(e/t))*t;return i?a:0>e?-1*a:a},iOSVersion:function(){var e=!1;return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)?navigator.userAgent.match(/OS 4_\d like Mac OS X/i)&&(e=!0):e=!1,e},isIE:function(t,i){var a=e('
    ').appendTo(e("body"));a.html("");var n=a.find("a").length;return a.remove(),n},is_mobile:function(){var e=["android","webos","iphone","ipad","blackberry","Android","webos",,"iPod","iPhone","iPad","Blackberry","BlackBerry"],t=!1;for(var i in e)navigator.userAgent.split(e[i]).length>1&&(t=!0);return t},callBackHandling:function(t,i,a){try{t.callBackArray&&e.each(t.callBackArray,function(e,t){t&&t.inmodule&&t.inmodule===i&&t.atposition&&t.atposition===a&&t.callback&&t.callback.call()})}catch(n){console.log("Call Back Failed")}},get_browser:function(){var e,t=navigator.appName,i=navigator.userAgent,a=i.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return a&&null!=(e=i.match(/version\/([\.\d]+)/i))&&(a[2]=e[1]),a=a?[a[1],a[2]]:[t,navigator.appVersion,"-?"],a[0]},get_browser_version:function(){var e,t=navigator.appName,i=navigator.userAgent,a=i.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return a&&null!=(e=i.match(/version\/([\.\d]+)/i))&&(a[2]=e[1]),a=a?[a[1],a[2]]:[t,navigator.appVersion,"-?"],a[1]},getHorizontalOffset:function(e,t){var i=c(e,".outer-left"),a=c(e,".outer-right");switch(t){case"left":return i;case"right":return a;case"both":return i+a}},callingNewSlide:function(t,i,a){var n=i.find(".next-revslide").length>0?i.find(".next-revslide").index():i.find(".processing-revslide").length>0?i.find(".processing-revslide").index():i.find(".active-revslide").index(),o=0;i.find(".next-revslide").removeClass("next-revslide"),a&&e.isNumeric(a)||a.match(/to/g)?(1===a||-1===a?(o=n+a,o=0>o?t.slideamount-1:o>=t.slideamount?0:o):(a=e.isNumeric(a)?a:parseInt(a.split("to")[1],0),o=0>a?0:a>t.slideamount-1?t.slideamount-1:a),i.find(".tp-revslider-slidesli:eq("+o+")").addClass("next-revslide")):a&&i.find(".tp-revslider-slidesli").each(function(){var t=e(this);t.data("index")===a&&t.addClass("next-revslide")}),o=i.find(".next-revslide").index(),i.trigger("revolution.nextslide.waiting"),o!==n&&-1!=o?A(i,t):i.find(".next-revslide").removeClass("next-revslide")},slotSize:function(i,a){a.slotw=Math.ceil(a.width/a.slots),"fullscreen"==a.sliderLayout?a.sloth=Math.ceil(e(window).height()/a.slots):a.sloth=Math.ceil(a.height/a.slots),"on"==a.autoHeight&&i!==t&&""!==i&&(a.sloth=Math.ceil(i.height()/a.slots))},setSize:function(i){var a=(i.top_outer||0)+(i.bottom_outer||0),n=parseInt(i.carousel.padding_top||0,0),o=parseInt(i.carousel.padding_bottom||0,0),r=i.gridheight[i.curWinRange];if(r=ri.gridheight[i.curWinRange]&&"on"!=i.autoHeight&&(i.height=i.gridheight[i.curWinRange]),"fullscreen"==i.sliderLayout||i.infullscreenmode){i.height=i.bw*i.gridheight[i.curWinRange];var s=(i.c.parent().width(),e(window).height());if(i.fullScreenOffsetContainer!=t){try{var l=i.fullScreenOffsetContainer.split(",");l&&e.each(l,function(t,i){s=e(i).length>0?s-e(i).outerHeight(!0):s})}catch(d){}try{i.fullScreenOffset.split("%").length>1&&i.fullScreenOffset!=t&&i.fullScreenOffset.length>0?s-=e(window).height()*parseInt(i.fullScreenOffset,0)/100:i.fullScreenOffset!=t&&i.fullScreenOffset.length>0&&(s-=parseInt(i.fullScreenOffset,0))}catch(d){}}s=s0&&e.each(a.lastplayedvideos,function(e,t){i.playVideo(t,a)})},leaveViewPort:function(a){a.sliderlaststatus=a.sliderstatus,a.c.trigger("stoptimer"),a.playingvideos!=t&&a.playingvideos.length>0&&(a.lastplayedvideos=e.extend(!0,[],a.playingvideos),a.playingvideos&&e.each(a.playingvideos,function(e,t){i.stopVideo&&i.stopVideo(t,a)}))},unToggleState:function(i){i!=t&&i.length>0&&e.each(i,function(e,t){t.removeClass("rs-toggle-content-active")})},toggleState:function(i){i!=t&&i.length>0&&e.each(i,function(e,t){t.addClass("rs-toggle-content-active")})},lastToggleState:function(i){var a=0;return i!=t&&i.length>0&&e.each(i,function(e,t){a=t.hasClass("rs-toggle-content-active")}),a}});var a=i.is_mobile(),n=function(i,a){return e("body").data(i)?!1:a.filesystem?(a.errorm===t&&(a.errorm="
    Local Filesystem Detected !
    Put this to your header:"),console.warn("Local Filesystem detected !"),a.errorm=a.errorm+'
    <script type="text/javascript" src="'+a.jsFileLocation+i+a.extensions_suffix+'"></script>',console.warn(a.jsFileLocation+i+a.extensions_suffix+" could not be loaded !"),console.warn("Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document."),console.log(" "),a.modulesfailing=!0,!1):(e.ajax({url:a.jsFileLocation+i+a.extensions_suffix,dataType:"script",cache:!0,error:function(e){console.warn("Slider Revolution 5.0 Error !"),console.error("Failure at Loading:"+i+a.extensions_suffix+" on Path:"+a.jsFileLocation),console.info(e)}}),void e("body").data(i,!0))},o=function(a,o){var r=new Object,s=a.navigation;return r.kenburns=!1,r.parallax=!1,r.carousel=!1,r.navigation=!1,r.videos=!1,r.actions=!1,r.layeranim=!1,r.migration=!1,o.data("version")&&o.data("version").toString().match(/5./gi)?(o.find("img").each(function(){"on"==e(this).data("kenburns")&&(r.kenburns=!0)}),("carousel"==a.sliderType||"on"==s.keyboardNavigation||"on"==s.mouseScrollNavigation||"on"==s.touch.touchenabled||s.arrows.enable||s.bullets.enable||s.thumbnails.enable||s.tabs.enable)&&(r.navigation=!0),o.find(".tp-caption, .tp-static-layer, .rs-background-video-layer").each(function(){var i=e(this);(i.data("ytid")!=t||i.find("iframe").length>0&&i.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(r.videos=!0),(i.data("vimeoid")!=t||i.find("iframe").length>0&&i.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(r.videos=!0),i.data("actions")!==t&&(r.actions=!0),r.layeranim=!0}),o.find("li").each(function(){e(this).data("link")&&e(this).data("link")!=t&&(r.layeranim=!0,r.actions=!0)}),!r.videos&&(o.find(".rs-background-video-layer").length>0||o.find(".tp-videolayer").length>0||o.find("iframe").length>0||o.find("video").length>0)&&(r.videos=!0),"carousel"==a.sliderType&&(r.carousel=!0),("off"!==a.parallax.type||a.viewPort.enable||"true"==a.viewPort.enable)&&(r.parallax=!0)):(r.kenburns=!0,r.parallax=!0,r.carousel=!1,r.navigation=!0,r.videos=!0,r.actions=!0,r.layeranim=!0,r.migration=!0),"hero"==a.sliderType&&(r.carousel=!1,r.navigation=!1),window.location.href.match(/file:/gi)&&(r.filesystem=!0,a.filesystem=!0),r.videos&&"undefined"==typeof i.isVideoPlaying&&n("revolution.extension.video",a),r.carousel&&"undefined"==typeof i.prepareCarousel&&n("revolution.extension.carousel",a),r.carousel||"undefined"!=typeof i.animateSlide||n("revolution.extension.slideanims",a),r.actions&&"undefined"==typeof i.checkActions&&n("revolution.extension.actions",a),r.layeranim&&"undefined"==typeof i.handleStaticLayers&&n("revolution.extension.layeranimation",a),r.kenburns&&"undefined"==typeof i.stopKenBurn&&n("revolution.extension.kenburn",a),r.navigation&&"undefined"==typeof i.createNavigation&&n("revolution.extension.navigation",a),r.migration&&"undefined"==typeof i.migration&&n("revolution.extension.migration",a),r.parallax&&"undefined"==typeof i.checkForParallax&&n("revolution.extension.parallax",a),r},r=function(e,t){t.filesystem||"undefined"!=typeof punchgs&&(!t.kenburns||t.kenburns&&"undefined"!=typeof i.stopKenBurn)&&(!t.navigation||t.navigation&&"undefined"!=typeof i.createNavigation)&&(!t.carousel||t.carousel&&"undefined"!=typeof i.prepareCarousel)&&(!t.videos||t.videos&&"undefined"!=typeof i.resetVideo)&&(!t.actions||t.actions&&"undefined"!=typeof i.checkActions)&&(!t.layeranim||t.layeranim&&"undefined"!=typeof i.handleStaticLayers)&&(!t.migration||t.migration&&"undefined"!=typeof i.migration)&&(!t.parallax||t.parallax&&"undefined"!=typeof i.checkForParallax)&&(t.carousel||!t.carousel&&"undefined"!=typeof i.animateSlide)?e.trigger("scriptsloaded"):setTimeout(function(){r(e,t)},50)},s=function(t){var i=new RegExp("themepunch.revolution.min.js","gi"),a="";return e("script").each(function(){var t=e(this).attr("src");t&&t.match(i)&&(a=t)}),a=a.replace("jquery.themepunch.revolution.min.js",""),a=a.replace("jquery.themepunch.revolution.js",""),a=a.split("?")[0]},l=function(t,i){var a=9999,n=0,o=0,r=0,s=e(window).width(),l=i&&9999==t.responsiveLevels?t.visibilityLevels:t.responsiveLevels;l&&l.length&&e.each(l,function(e,t){t>s&&(0==n||n>t)&&(a=t,r=e,n=t),s>t&&t>n&&(n=t,o=e)}),a>n&&(r=o),i?t.forcedWinRange=r:t.curWinRange=r},d=function(e,t){t.carousel.maxVisibleItems=t.carousel.maxVisibleItems<1?999:t.carousel.maxVisibleItems,t.carousel.vertical_align="top"===t.carousel.vertical_align?"0%":"bottom"===t.carousel.vertical_align?"100%":"50%"},c=function(t,i){var a=0;return t.find(i).each(function(){var t=e(this);!t.hasClass("tp-forcenotvisible")&&a'),n.find(">ul").addClass("tp-revslider-mainul"),o.c=n,o.ul=n.find(".tp-revslider-mainul"),o.cid=n.attr("id"),o.ul.css({visibility:"visible"}),o.slideamount=o.ul.find(">li").length,o.slayers=n.find(".tp-static-layers"),o.ul.find(">li").each(function(t){e(this).data("originalindex",t)}),"on"==o.shuffle){var r=new Object,s=o.ul.find(">li:first-child");r.fstransition=s.data("fstransition"),r.fsmasterspeed=s.data("fsmasterspeed"),r.fsslotamount=s.data("fsslotamount");for(var d=0;dli:eq("+c+")").prependTo(o.ul)}var u=o.ul.find(">li:first-child");u.data("fstransition",r.fstransition),u.data("fsmasterspeed",r.fsmasterspeed),u.data("fsslotamount",r.fsslotamount),o.li=o.ul.find(">li")}if(o.li=o.ul.find(">li"),o.thumbs=new Array,o.slots=4,o.act=-1,o.firststart=1,o.loadqueue=new Array,o.syncload=0,o.conw=n.width(),o.conh=n.height(),o.responsiveLevels.length>1?o.responsiveLevels[0]=9999:o.responsiveLevels=9999,e.each(o.li,function(i,a){var a=e(a),n=a.find(".rev-slidebg")||a.find("img").first(),r=0;a.addClass("tp-revslider-slidesli"),a.data("index")===t&&a.data("index","rs-"+Math.round(999999*Math.random()));var s=new Object;s.params=new Array,s.id=a.data("index"),s.src=a.data("thumb")!==t?a.data("thumb"):n.data("lazyload")!==t?n.data("lazyload"):n.attr("src"),a.data("title")!==t&&s.params.push({from:RegExp("\\{\\{title\\}\\}","g"),to:a.data("title")}),a.data("description")!==t&&s.params.push({from:RegExp("\\{\\{description\\}\\}","g"),to:a.data("description")});for(var r=1;10>=r;r++)a.data("param"+r)!==t&&s.params.push({from:RegExp("\\{\\{param"+r+"\\}\\}","g"),to:a.data("param"+r)});if(o.thumbs.push(s),a.data("origindex",a.index()),a.data("link")!=t){var l=a.data("link"),d=a.data("target")||"_self",c="back"===a.data("slideindex")?0:60,u=a.data("linktoslide"),p=u;u!=t&&"next"!=u&&"prev"!=u&&o.li.each(function(){var t=e(this);t.data("origindex")+1==p&&(u=t.data("index"))}),"slide"!=l&&(u="no");var h=''),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
    '),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
    '),void 0!=s&&void 0!=l&&punchgs.TweenLite.set(n.find(".slot").last(),{rotationZ:l})}}},o=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],["fadefromtop",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},a=function(t,e){return void 0==e||jQuery.isNumeric(t)?t:void 0==t?t:t.split(",")[e]},i=function(t,i,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('
    ');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=o(n,r,i,d,g),v=w.STA,m=w.specials,t=w.nexttrans;"on"==d.data("kenburns")&&(t=11);var x=s.data("nexttransid")||0,y=a(s.data("masterspeed"),x);y="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=a(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"==i?Math.round(6*Math.random()+3):"flyin"==i?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=a(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]&&e(h,r,v[7],v[5]),null!=v[6]&&e(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=a(s.data("easein"),x),z=a(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+1r.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(''),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,te=1,ee=1,oe=y/1e3,ae=oe;("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&&(oe=y/1300),(4==m||5==m)&&(te=.6),6==m&&(te=1.4),(5==m||6==m)&&(ee=1.4,$=0,F=0,G=0,U=0,W=0),6==m&&(ee=.6);7==m&&(F=0,G=0);var ie=d.find(".slotslide"),ne=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}),0),f.add(punchgs.TweenLite.set(ie,{left:0,top:0,scale:1,opacity:1,rotation:0,ease:T,force3D:"auto"}),0)):f.add(punchgs.TweenLite.from(ie,oe,{left:U,top:W,scale:ee,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(ne,ae,{left:0-F+"px",force3D:"auto",scale:te,opacity:$,rotation:r.rotate,ease:z}),0);break;case 15:f.add(punchgs.TweenLite.to(ne,ae,{left:F+"px",force3D:"auto",scale:te,opacity:$,rotation:r.rotate,ease:z}),0);break;case 13:f.add(punchgs.TweenLite.to(ne,ae,{top:0-G+"px",force3D:"auto",scale:te,opacity:$,rotation:r.rotate,ease:z}),0);break;case 14:f.add(punchgs.TweenLite.to(ne,ae,{top:G+"px",force3D:"auto",scale:te,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('
    '),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('
    '),l.find(".tp-half-two .defaultimg").wrap('
    '),l.find(".tp-half-two .defaultimg").css({position:"absolute",top:"-50%"}),l.find(".tp-half-two .tp-caption").wrapAll('
    '),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 re=(l.find(".defaultimg"),Math.round(20*Math.random()-10)),se=Math.round(20*Math.random()-10),le=Math.round(20*Math.random()-10),de=.4*Math.random()-.2,he=.4*Math.random()-.2,fe=1*Math.random()+1,ce=1*Math.random()+1,pe=.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:fe,rotation:re,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:ce,rotation:se,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:pe,x:r.width/4*de,y:G/4*he,rotation:le,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})},100);var ue=90,$=1,ge="center center ";1==g&&(ue=-90),19==t?(ge=ge+"-"+r.height/2,$=0):ge+=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:ge,rotationX:ue},{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:ge,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 we=-r.width,ue=80,ge="20% 70% -"+r.height/2;else var we=r.width,ue=-80,ge="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:we,rotationX:40,z:-600,opacity:$,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:ge,transformStyle:"flat",rotationY:ue},{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 ue=90,we=-r.width,ve=-ue;if(1==g)if(25==t){var ge="center top 0";ue=r.rotate}else{var ge="left center 0";ve=r.rotate}else if(we=r.width,ue=-90,25==t){var ge="center bottom 0";ve=-ue,ue=r.rotate}else{var ge="right center 0";ve=r.rotate}d.find(".slotslide").each(function(){var t=jQuery(this),e=y/1.5/3;f.add(punchgs.TweenLite.fromTo(t,2*e/1e3,{left:0,transformStyle:"flat",rotationX:ve,z:0,autoAlpha:0,top:0,scale:1,force3D:"auto",transformPerspective:1200,transformOrigin:ge,rotationY:ue},{left:0,rotationX:0,top:0,z:0,autoAlpha:1,scale:1,rotationY:0,force3D:"auto",delay:e/1e3,ease:T}),0)}),1!=g?(we=-r.width,ue=90,25==t?(ge="center top 0",ve=-ue,ue=r.rotate):(ge="left center 0",ve=r.rotate)):(we=r.width,ue=-90,25==t?(ge="center bottom 0",ve=-ue,ue=r.rotate):(ge="right center 0",ve=r.rotate)),h.find(".slotslide").each(function(){var t=jQuery(this);f.add(punchgs.TweenLite.fromTo(t,y/1e3,{left:0,transformStyle:"flat",rotationX:0,z:0,autoAlpha:1,top:0,scale:1,force3D:"auto",transformPerspective:1200,transformOrigin:ge,rotationY:0},{left:0,rotationX:ve,top:0,z:0,autoAlpha:1,force3D:"auto",scale:1,rotationY:ue,ease:z}),0)})}if(23==t||24==t){setTimeout(function(){h.find(".defaultimg").css({opacity:0})},100);var ue=-90,$=1,me=0;if(1==g&&(ue=90),23==t){var ge="center center -"+r.width/2;$=0}else var ge="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:me,rotationX:r.rotate,force3D:"auto",opacity:$,top:0,scale:1,transformPerspective:1200,transformOrigin:ge,rotationY:ue},{left:0,rotationX:0,autoAlpha:1,top:0,z:0,scale:1,rotationY:0,delay:50*t/500,ease:T}),0)}),ue=90,1==g&&(ue=-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:ge,rotationY:0},{left:me,rotationX:r.rotate,top:0,scale:1,rotationY:ue,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); !function(e){function t(e){return void 0==e?-1:jQuery.isNumeric(e)?e:e.split(":").length>1?60*parseInt(e.split(":")[0],0)+parseInt(e.split(":")[1],0):e}var a=jQuery.fn.revolution,i=a.is_mobile();jQuery.extend(!0,a,{resetVideo:function(e,d){switch(e.data("videotype")){case"youtube":e.data("player");try{if("on"==e.data("forcerewind")&&!i){var o=t(e.data("videostartat"));o=-1==o?0:o,void 0!=e.data("player")&&(e.data("player").seekTo(o),e.data("player").pauseVideo())}}catch(r){}0==e.find(".tp-videoposter").length&&punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});break;case"vimeo":var n=$f(e.find("iframe").attr("id"));try{if("on"==e.data("forcerewind")&&!i){var o=t(e.data("videostartat"));o=-1==o?0:o,n.api("seekTo",o),n.api("pause")}}catch(r){}0==e.find(".tp-videoposter").length&&punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});break;case"html5":if(i&&1==e.data("disablevideoonmobile"))return!1;var s=e.find("video"),l=s[0];if(punchgs.TweenLite.to(s,.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),"on"==e.data("forcerewind")&&!e.hasClass("videoisplaying"))try{var o=t(e.data("videostartat"));l.currentTime=-1==o?0:o}catch(r){}("mute"==e.data("volume")||a.lastToggleState(e.data("videomutetoggledby")))&&(l.muted=!0)}},isVideoMuted:function(e,t){var a=!1;switch(e.data("videotype")){case"youtube":try{var i=e.data("player");a=i.isMuted()}catch(d){}break;case"vimeo":try{$f(e.find("iframe").attr("id"));"mute"==e.data("volume")&&(a=!0)}catch(d){}break;case"html5":var o=e.find("video"),r=o[0];"mute"==e.data("volume")&&(r.muted=!0)}return a},muteVideo:function(e,t){switch(e.data("videotype")){case"youtube":try{var a=e.data("player");a.mute()}catch(i){}break;case"vimeo":try{var d=$f(e.find("iframe").attr("id"));e.data("volume","mute"),d.api("setVolume",0)}catch(i){}break;case"html5":var o=e.find("video"),r=o[0];r.muted=!0}},unMuteVideo:function(e,t){switch(e.data("videotype")){case"youtube":try{var a=e.data("player");a.unMute()}catch(i){}break;case"vimeo":try{var d=$f(e.find("iframe").attr("id"));e.data("volume","1"),d.api("setVolume",1)}catch(i){}break;case"html5":var o=e.find("video"),r=o[0];r.muted=!1}},stopVideo:function(e,t){switch(e.data("videotype")){case"youtube":try{var a=e.data("player");a.pauseVideo()}catch(i){}break;case"vimeo":try{var d=$f(e.find("iframe").attr("id"));d.api("pause")}catch(i){}break;case"html5":var o=e.find("video"),r=o[0];r.pause()}},playVideo:function(e,o){switch(clearTimeout(e.data("videoplaywait")),e.data("videotype")){case"youtube":if(0==e.find("iframe").length)e.append(e.data("videomarkup")),r(e,o,!0);else if(void 0!=e.data("player").playVideo){var n=t(e.data("videostartat")),s=e.data("player").getCurrentTime();1==e.data("nextslideatend-triggered")&&(s=-1,e.data("nextslideatend-triggered",0)),-1!=n&&n>s&&e.data("player").seekTo(n),e.data("player").playVideo()}else e.data("videoplaywait",setTimeout(function(){a.playVideo(e,o)},50));break;case"vimeo":if(0==e.find("iframe").length)e.append(e.data("videomarkup")),r(e,o,!0);else if(e.hasClass("rs-apiready")){var l=e.find("iframe").attr("id"),p=$f(l);void 0==p.api("play")?e.data("videoplaywait",setTimeout(function(){a.playVideo(e,o)},50)):setTimeout(function(){p.api("play");var a=t(e.data("videostartat")),i=e.data("currenttime");1==e.data("nextslideatend-triggered")&&(i=-1,e.data("nextslideatend-triggered",0)),-1!=a&&a>i&&p.api("seekTo",a)},510)}else e.data("videoplaywait",setTimeout(function(){a.playVideo(e,o)},50));break;case"html5":if(i&&1==e.data("disablevideoonmobile"))return!1;var v=e.find("video"),u=v[0],c=v.parent();if(1!=c.data("metaloaded"))d(u,"loadedmetadata",function(e){a.resetVideo(e,o),u.play();var i=t(e.data("videostartat")),d=u.currentTime;1==e.data("nextslideatend-triggered")&&(d=-1,e.data("nextslideatend-triggered",0)),-1!=i&&i>d&&(u.currentTime=i)}(e));else{u.play();var n=t(e.data("videostartat")),s=u.currentTime;1==e.data("nextslideatend-triggered")&&(s=-1,e.data("nextslideatend-triggered",0)),-1!=n&&n>s&&(u.currentTime=n)}}},isVideoPlaying:function(e,t){var a=!1;return void 0!=t.playingvideos&&jQuery.each(t.playingvideos,function(t,i){e.attr("id")==i.attr("id")&&(a=!0)}),a},prepareCoveredVideo:function(e,t,a){var i=a.find("iframe, video"),d=e.split(":")[0],o=e.split(":")[1],r=a.closest(".tp-revslider-slidesli"),n=r.width()/r.height(),s=d/o,l=n/s*100,p=s/n*100;n>s?punchgs.TweenLite.to(i,.001,{height:l+"%",width:"100%",top:-(l-100)/2+"%",left:"0px",position:"absolute"}):punchgs.TweenLite.to(i,.001,{width:p+"%",height:"100%",left:-(p-100)/2+"%",top:"0px",position:"absolute"})},checkVideoApis:function(e,t,a){var i="https:"===location.protocol?"https":"http";if((void 0!=e.data("ytid")||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(t.youtubeapineeded=!0),(void 0!=e.data("ytid")||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&0==a.addedyt){t.youtubestarttime=jQuery.now(),a.addedyt=1;var d=document.createElement("script");d.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0],r=!0;jQuery("head").find("*").each(function(){"https://www.youtube.com/iframe_api"==jQuery(this).attr("src")&&(r=!1)}),r&&o.parentNode.insertBefore(d,o)}if((void 0!=e.data("vimeoid")||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(t.vimeoapineeded=!0),(void 0!=e.data("vimeoid")||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&0==a.addedvim){t.vimeostarttime=jQuery.now(),a.addedvim=1;var n=document.createElement("script"),o=document.getElementsByTagName("script")[0],r=!0;n.src=i+"://f.vimeocdn.com/js/froogaloop2.min.js",jQuery("head").find("*").each(function(){jQuery(this).attr("src")==i+"://a.vimeocdn.com/js/froogaloop2.min.js"&&(r=!1)}),r&&o.parentNode.insertBefore(n,o)}return a},manageVideoLayer:function(e,o,s,l){var p=e.data("videoattributes"),v=e.data("ytid"),u=e.data("vimeoid"),c=e.data("videpreload"),g=e.data("videomp4"),f=e.data("videowebm"),y=e.data("videoogv"),m=e.data("allowfullscreenvideo"),h=e.data("videocontrols"),b="http",w="loop"==e.data("videoloop")?"loop":"loopandnoslidestop"==e.data("videoloop")?"loop":"",T=void 0!=g||void 0!=f?"html5":void 0!=v&&String(v).length>1?"youtube":void 0!=u&&String(u).length>1?"vimeo":"none",k="html5"==T&&0==e.find("video").length?"html5":"youtube"==T&&0==e.find("iframe").length?"youtube":"vimeo"==T&&0==e.find("iframe").length?"vimeo":"none";switch(e.data("videotype",T),k){case"html5":"controls"!=h&&(h="");var x='";var L="";("true"===m||m===!0)&&(L='
    '),"controls"==h&&(x+='
    '+L+"
    "),e.data("videomarkup",x),e.append(x),(i&&1==e.data("disablevideoonmobile")||a.isIE(8))&&e.find("video").remove(),e.find("video").each(function(t){var i=this,r=jQuery(this);r.parent().hasClass("html5vid")||r.wrap('
    ');var s=r.parent();1!=s.data("metaloaded")&&d(i,"loadedmetadata",function(e){n(e,o),a.resetVideo(e,o)}(e))});break;case"youtube":b="http","https:"===location.protocol&&(b="https"),"none"==h&&(p=p.replace("controls=1","controls=0"),-1==p.toLowerCase().indexOf("controls")&&(p+="&controls=0"));var V=t(e.data("videostartat")),P=t(e.data("videoendat"));-1!=V&&(p=p+"&start="+V),-1!=P&&(p=p+"&end="+P);var I=p.split("origin="+b+"://"),C="";I.length>1?(C=I[0]+"origin="+b+"://",self.location.href.match(/www/gi)&&!I[1].match(/www/gi)&&(C+="www."),C+=I[1]):C=p;var j="true"===m||m===!0?"allowfullscreen":"";e.data("videomarkup",'');break;case"vimeo":"https:"===location.protocol&&(b="https"),e.data("videomarkup",'')}var _=i&&"on"==e.data("noposteronmobile");if(void 0!=e.data("videoposter")&&e.data("videoposter").length>2&&!_)0==e.find(".tp-videoposter").length&&e.append('
    '),0==e.find("iframe").length&&e.find(".tp-videoposter").click(function(){if(a.playVideo(e,o),i){if(1==e.data("disablevideoonmobile"))return!1;punchgs.TweenLite.to(e.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut})}});else{if(i&&1==e.data("disablevideoonmobile"))return!1;0!=e.find("iframe").length||"youtube"!=T&&"vimeo"!=T||(e.append(e.data("videomarkup")),r(e,o,!1))}"none"!=e.data("dottedoverlay")&&void 0!=e.data("dottedoverlay")&&1!=e.find(".tp-dottedoverlay").length&&e.append('
    '),e.addClass("HasListener"),1==e.data("bgvideo")&&punchgs.TweenLite.set(e.find("video, iframe"),{autoAlpha:0})}});var d=function(e,t,a){e.addEventListener?e.addEventListener(t,a,!1):e.attachEvent(t,a,!1)},o=function(e,t,a){var i={};return i.video=e,i.videotype=t,i.settings=a,i},r=function(e,d,r){var n=e.find("iframe"),p="iframe"+Math.round(1e5*Math.random()+1),v=e.data("videoloop"),u="loopandnoslidestop"!=v;if(v="loop"==v||"loopandnoslidestop"==v,1==e.data("forcecover")){e.removeClass("fullscreenvideo").addClass("coverscreenvideo");var c=e.data("aspectratio");void 0!=c&&c.split(":").length>1&&a.prepareCoveredVideo(c,d,e)}if(1==e.data("bgvideo")){var c=e.data("aspectratio");void 0!=c&&c.split(":").length>1&&a.prepareCoveredVideo(c,d,e)}if(n.attr("id",p),r&&e.data("startvideonow",!0),1!==e.data("videolistenerexist"))switch(e.data("videotype")){case"youtube":var g=new YT.Player(p,{events:{onStateChange:function(e){var i=e.target.getVideoEmbedCode(),r=jQuery("#"+i.split('id="')[1].split('"')[0]),n=r.closest(".tp-simpleresponsive"),p=r.parent(),c=r.parent().data("player");if(e.data==YT.PlayerState.PLAYING)punchgs.TweenLite.to(p.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(p.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),"mute"==p.data("volume")||a.lastToggleState(p.data("videomutetoggledby"))?c.mute():(c.unMute(),c.setVolume(parseInt(p.data("volume"),0)||75)),d.videoplaying=!0,s(p,d),u?d.c.trigger("stoptimer"):d.videoplaying=!1,d.c.trigger("revolution.slide.onvideoplay",o(c,"youtube",p.data())),a.toggleState(p.data("videotoggledby"));else{if(0==e.data&&v){var g=t(p.data("videostartat"));-1!=g&&c.seekTo(g),c.playVideo(),a.toggleState(p.data("videotoggledby"))}(0==e.data||2==e.data)&&"on"==p.data("showcoveronpause")&&p.find(".tp-videoposter").length>0&&(punchgs.TweenLite.to(p.find(".tp-videoposter"),.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(p.find("iframe"),.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut})),-1!=e.data&&3!=e.data&&(d.videoplaying=!1,l(p,d),n.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",o(c,"youtube",p.data())),(void 0==d.currentLayerVideoIsPlaying||d.currentLayerVideoIsPlaying.attr("id")==p.attr("id"))&&a.unToggleState(p.data("videotoggledby"))),0==e.data&&1==p.data("nextslideatend")?(p.data("nextslideatend-triggered",1),d.c.revnext(),l(p,d)):(l(p,d),d.videoplaying=!1,n.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",o(c,"youtube",p.data())),(void 0==d.currentLayerVideoIsPlaying||d.currentLayerVideoIsPlaying.attr("id")==p.attr("id"))&&a.unToggleState(p.data("videotoggledby")))}},onReady:function(e){var a=e.target.getVideoEmbedCode(),d=jQuery("#"+a.split('id="')[1].split('"')[0]),o=d.parent(),r=o.data("videorate");o.data("videostart");if(o.addClass("rs-apiready"),void 0!=r&&e.target.setPlaybackRate(parseFloat(r)),o.find(".tp-videoposter").unbind("click"),o.find(".tp-videoposter").click(function(){i||g.playVideo()}),o.data("startvideonow")){o.data("player").playVideo();var n=t(o.data("videostartat"));-1!=n&&o.data("player").seekTo(n)}o.data("videolistenerexist",1)}}});e.data("player",g);break;case"vimeo":for(var f,y=n.attr("src"),m={},h=y,b=/([^&=]+)=([^&]*)/g;f=b.exec(h);)m[decodeURIComponent(f[1])]=decodeURIComponent(f[2]);y=void 0!=m.player_id?y.replace(m.player_id,p):y+"&player_id="+p;try{y=y.replace("api=0","api=1")}catch(w){}y+="&api=1",n.attr("src",y);var g=e.find("iframe")[0],T=(jQuery("#"+p),$f(p));T.addEvent("ready",function(){if(e.addClass("rs-apiready"),T.addEvent("play",function(t){e.data("nextslidecalled",0),punchgs.TweenLite.to(e.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),d.c.trigger("revolution.slide.onvideoplay",o(T,"vimeo",e.data())),d.videoplaying=!0,s(e,d),u?d.c.trigger("stoptimer"):d.videoplaying=!1,"mute"==e.data("volume")||a.lastToggleState(e.data("videomutetoggledby"))?T.api("setVolume","0"):T.api("setVolume",parseInt(e.data("volume"),0)/100||.75),a.toggleState(e.data("videotoggledby"))}),T.addEvent("playProgress",function(a){var i=t(e.data("videoendat"));if(e.data("currenttime",a.seconds),0!=i&&Math.abs(i-a.seconds)<.3&&i>a.seconds&&1!=e.data("nextslidecalled"))if(v){T.api("play");var o=t(e.data("videostartat"));-1!=o&&T.api("seekTo",o)}else 1==e.data("nextslideatend")&&(e.data("nextslideatend-triggered",1),e.data("nextslidecalled",1),d.c.revnext()),T.api("pause")}),T.addEvent("finish",function(t){l(e,d),d.videoplaying=!1,d.c.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",o(T,"vimeo",e.data())),1==e.data("nextslideatend")&&(e.data("nextslideatend-triggered",1),d.c.revnext()),(void 0==d.currentLayerVideoIsPlaying||d.currentLayerVideoIsPlaying.attr("id")==e.attr("id"))&&a.unToggleState(e.data("videotoggledby"))}),T.addEvent("pause",function(t){e.find(".tp-videoposter").length>0&&"on"==e.data("showcoveronpause")&&(punchgs.TweenLite.to(e.find(".tp-videoposter"),.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut})),d.videoplaying=!1,l(e,d),d.c.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",o(T,"vimeo",e.data())),(void 0==d.currentLayerVideoIsPlaying||d.currentLayerVideoIsPlaying.attr("id")==e.attr("id"))&&a.unToggleState(e.data("videotoggledby"))}),e.find(".tp-videoposter").unbind("click"),e.find(".tp-videoposter").click(function(){return i?void 0:(T.api("play"),!1)}),e.data("startvideonow")){T.api("play");var r=t(e.data("videostartat"));-1!=r&&T.api("seekTo",r)}e.data("videolistenerexist",1)})}else{var k=t(e.data("videostartat"));switch(e.data("videotype")){case"youtube":r&&(e.data("player").playVideo(),-1!=k&&e.data("player").seekTo());break;case"vimeo":if(r){var T=$f(e.find("iframe").attr("id"));T.api("play"),-1!=k&&T.api("seekTo",k)}}}},n=function(e,r,n){if(i&&1==e.data("disablevideoonmobile"))return!1;var p=e.find("video"),v=p[0],u=p.parent(),c=e.data("videoloop"),g="loopandnoslidestop"!=c;if(c="loop"==c||"loopandnoslidestop"==c,u.data("metaloaded",1),void 0==p.attr("control")&&(0!=e.find(".tp-video-play-button").length||i||e.append('
     
    '),e.find("video, .tp-poster, .tp-video-play-button").click(function(){e.hasClass("videoisplaying")?v.pause():v.play()})),1==e.data("forcecover")||e.hasClass("fullscreenvideo")||1==e.data("bgvideo"))if(1==e.data("forcecover")||1==e.data("bgvideo")){u.addClass("fullcoveredvideo");var f=e.data("aspectratio")||"4:3";a.prepareCoveredVideo(f,r,e)}else u.addClass("fullscreenvideo");var y=e.find(".tp-vid-play-pause")[0],m=e.find(".tp-vid-mute")[0],h=e.find(".tp-vid-full-screen")[0],b=e.find(".tp-seek-bar")[0],w=e.find(".tp-volume-bar")[0];void 0!=y&&d(y,"click",function(){1==v.paused?v.play():v.pause()}),void 0!=m&&d(m,"click",function(){0==v.muted?(v.muted=!0,m.innerHTML="Unmute"):(v.muted=!1,m.innerHTML="Mute")}),void 0!=h&&h&&d(h,"click",function(){v.requestFullscreen?v.requestFullscreen():v.mozRequestFullScreen?v.mozRequestFullScreen():v.webkitRequestFullscreen&&v.webkitRequestFullscreen()}),void 0!=b&&(d(b,"change",function(){var e=v.duration*(b.value/100);v.currentTime=e}),d(b,"mousedown",function(){e.addClass("seekbardragged"),v.pause()}),d(b,"mouseup",function(){e.removeClass("seekbardragged"),v.play()})),d(v,"timeupdate",function(){var a=100/v.duration*v.currentTime,i=t(e.data("videoendat")),d=v.currentTime;if(void 0!=b&&(b.value=a),0!=i&&-1!=i&&Math.abs(i-d)<=.3&&i>d&&1!=e.data("nextslidecalled"))if(c){v.play();var o=t(e.data("videostartat"));-1!=o&&(v.currentTime=o)}else 1==e.data("nextslideatend")&&(e.data("nextslideatend-triggered",1),e.data("nextslidecalled",1),r.just_called_nextslide_at_htmltimer=!0,r.c.revnext(),setTimeout(function(){r.just_called_nextslide_at_htmltimer=!1},1e3)),v.pause()}),void 0!=w&&d(w,"change",function(){v.volume=w.value}),d(v,"play",function(){e.data("nextslidecalled",0),"mute"==e.data("volume")&&(v.muted=!0),e.addClass("videoisplaying"),s(e,r),g?(r.videoplaying=!0,r.c.trigger("stoptimer"),r.c.trigger("revolution.slide.onvideoplay",o(v,"html5",e.data()))):(r.videoplaying=!1,r.c.trigger("starttimer"),r.c.trigger("revolution.slide.onvideostop",o(v,"html5",e.data()))),punchgs.TweenLite.to(e.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(e.find("video"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});var t=e.find(".tp-vid-play-pause")[0],i=e.find(".tp-vid-mute")[0];void 0!=t&&(t.innerHTML="Pause"),void 0!=i&&v.muted&&(i.innerHTML="Unmute"),a.toggleState(e.data("videotoggledby"))}),d(v,"pause",function(){e.find(".tp-videoposter").length>0&&"on"==e.data("showcoveronpause")&&!e.hasClass("seekbardragged")&&(punchgs.TweenLite.to(e.find(".tp-videoposter"),.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(e.find("video"),.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut})),e.removeClass("videoisplaying"),r.videoplaying=!1,l(e,r),r.c.trigger("starttimer"),r.c.trigger("revolution.slide.onvideostop",o(v,"html5",e.data()));var t=e.find(".tp-vid-play-pause")[0];void 0!=t&&(t.innerHTML="Play"),(void 0==r.currentLayerVideoIsPlaying||r.currentLayerVideoIsPlaying.attr("id")==e.attr("id"))&&a.unToggleState(e.data("videotoggledby"))}),d(v,"ended",function(){l(e,r),r.videoplaying=!1,l(e,r),r.c.trigger("starttimer"),r.c.trigger("revolution.slide.onvideostop",o(v,"html5",e.data())),1==e.data("nextslideatend")&&(1==!r.just_called_nextslide_at_htmltimer&&(e.data("nextslideatend-triggered",1),r.c.revnext(),r.just_called_nextslide_at_htmltimer=!0),setTimeout(function(){r.just_called_nextslide_at_htmltimer=!1},1500)),e.removeClass("videoisplaying")})},s=function(e,t){void 0==t.playingvideos&&(t.playingvideos=new Array),e.data("stopallvideos")&&void 0!=t.playingvideos&&t.playingvideos.length>0&&(t.lastplayedvideos=jQuery.extend(!0,[],t.playingvideos),jQuery.each(t.playingvideos,function(e,i){a.stopVideo(i,t)})),t.playingvideos.push(e),t.currentLayerVideoIsPlaying=e},l=function(e,t){void 0!=t.playingvideos&&t.playingvideos.splice(jQuery.inArray(e,t.playingvideos),1)}}(jQuery);