PageSourceSearch

https://www.hotelcasasnovas.com/minhas-reservas.html

html hotelcasasnovas.com collected 2026-10-06 07:18:46 UTC 729,837 bytes, 12,052 lines download raw bytes

1<!DOCTYPE html>
2<html lang="pt"  xml:lang="pt">
3<head>
4
5
6
7    
8    <!-- Global site tag (gtag.js) - Google Ads: 705285267 -->
vendor: 83 bytes, lines 8-10
8
9    
10        <script async defer src="https://www.googletagmanager.com/gtag/js?id=
10AW-705285267
vendor: 20 bytes, lines 10-11
10"></script>
11        
11<script>
12          window.dataLayer = window.dataLayer || [];
13          function gtag(){dataLayer.push(arguments);}
14          gtag('js', new Date());
15        </script>
15
16    
17
18    
18<script>
19        try {
20            gtag('config', 'AW-705285267');
21        } catch (e) {
22            console.warn('Error adding gtag config');
23            console.warn(e);
24        }
25
26    </script>
26
27
28
29
30
31
32    
33
34
35    <title> Minhas Reservas | Casas Novas Countryside Hotel </title>
36    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
37    
38        <link rel="icon" href="https://cdn2.paraty.es/casas-novas/images/376e818c547f7b2" type="image/x-icon">
39    
40    <meta name="keywords" content=""/>
41    <meta name="description" content="Modifique ou cancele as suas reservas no Casas Novas Countryside Hotel SPA & Events."/>
42    
43    <meta name="revisit-after" content="2 days"/>
44    <meta http-equiv="Content-Language" content="pt"/>
45    <meta name="dc.title" content=" Minhas Reservas | Casas Novas Countryside Hotel "/>
46    <meta name="dc.description" content="Modifique ou cancele as suas reservas no Casas Novas Countryside Hotel SPA & Events."/>
47    <meta name="dc.keywords" content=""/>
48    <meta name="dc.language" content="pt"/>
49    <meta name="dc.creator" content="Casas Novas Countryside Hotel"/>
50    <meta name="dc.format" content="text/html"/>
51    <meta name="dc.identifier" content="https://www.hotelcasasnovas.com"/>
52    <meta name="format-detection" content="telephone=no">
53    <!-- REVOLUTION BANNER CSS SETTINGS -->
54    <link rel="stylesheet" type="text/css" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/rs-plugin/css/settings_unified.min.css" media="screen"/>
55    <link rel="stylesheet" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/lightbox/css/lightbox.css" type="text/css"/>
56    <link rel="stylesheet" type="text/css" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/css/templateBaseline.css"/>
57    <link rel="stylesheet" type="text/css" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/css/1140/1140.css"/>
58    <link rel="stylesheet" type="text/css" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/plugins/pricescalendar/styles.css">
59    <link rel="stylesheet" type="text/css" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/plugins/dates-selector/css/datepicker_ext_inf.css">
60    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.9.0/css/v4-shims.css">
61    <link rel="stylesheet" type="text/css" href="/css/casas/styles.css?v=1.64"/>
62    <!--[if IE 8]><link rel="stylesheet" type="text/css" href="/css/casas/ie8.css" /><![endif]-->
63    <!--[if lte IE 7]>
63<script type="text/javascript">alert('A versão do seu navegador não é suportada. Por favor, verifique ou utilize outro navegador.');</script>
63<![endif]-->
64    <!--[if lte IE 8]>
64<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
64<![endif]-->
65    
65<script type="text/javascript">
66        if (navigator.userAgent.match(/Android/i)
67                || navigator.userAgent.match(/webOS/i)
68                || navigator.userAgent.match(/iPhone/i)
69                || navigator.userAgent.match(/iPad/i)
70                || navigator.userAgent.match(/iPod/i)
71                || navigator.userAgent.match(/BlackBerry/i)
72                || navigator.userAgent.match(/Windows Phone/i)) {
73            document.write('<meta name="viewport" content="width=1160, initial-scale=1, user-scalable=yes">');
74        }
75    </script>
75
76    
76<script>
vendor: 93,524 bytes, line 76
76(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.
76jQuery&&define("jquery",[],function(){return v})})(window);</script>
76
77    
78<script data-cookieconsent="ignore">if(window.jQuery){jQuery.getScript=function(url,callback,cache){return jQuery.ajax({url:url,dataType:"script",success:callback,cache:cache!==false});};}</script>
78<meta name="google-site-verification" content="tnpqE4orLCd_A8WKaIUEFTvChY_MhPPFbT610gEUc64" /><link rel="alternate" hreflang="es" href="https://www.hotelcasasnovas.com/es/mis-reservas.html" /><link rel="alternate" hreflang="en" href="https://www.hotelcasasnovas.com/en/my-bookings.html" /><link rel="alternate" hreflang="x-default" href="https://www.hotelcasasnovas.com/minhas-reservas.html" /><link rel="alternate" hreflang="pt" href="https://www.hotelcasasnovas.com/minhas-reservas.html" /><link rel="canonical" href="https://www.hotelcasasnovas.com/minhas-reservas.html" /><meta name="robots" content="index, follow" />
79    
79<script>
80    window.dataLayer = window.dataLayer || [];
81</script>
81
82
83
84
85
86
87
88
89<script type="text/javascript" crossorigin="anonymous" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/scripts/custom_cookies.min.js?v=202609301652" integrity="sha512-y7ZDB0sYaF2tlaxEYsLf//xUD0IQRezziwG3jmvVseXiE9RtPl548g7ynmDyE9FvIt2j/tufbf5Npqb4RrwAxQ=="></script>
89
90
91
92
93
94<script type="text/javascript" crossorigin="anonymous" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/scripts/session_storage_controller.min.js?v=202609301652" integrity="sha512-PmjWbM8GWIcOMtMBon5n1jDkZIaXhqnO2LVPMBCjufUxB7QCQuSlov2FJRmkwPwHR/WsZJdV0j/QTQ+4Y9juFw=="></script>
94
95
96<link rel="stylesheet" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/web_apps/assets/css/main_cookies_popup.css?v=202609301652">
97<script type="text/javascript" crossorigin="anonymous" src="https://cdn.paraty.es/static_files/secure-booking24/specific/202609301655/web_apps/cookies_popup.js?v=202609301652" integrity="sha512-ZPy9wCjrDenGVgJ3z3Jb9F1b3VgpVRKjhizb9lCXxtckhZV/gNqIwKgg9I7yUnGqTQK5q8ILVMHOutA6+/HSsA=="></script>
97
98
99<script>
100    function user_allowed_to_track() {
101        //Avoid track on localhost pages
102        if (window.navigator.userAgent.indexOf('Headless') > -1) {
103            console.log("Avoid tracking of robots");
104            return false;
105        }
106
107        if (window.location.hostname.indexOf('localhost') > -1 || window.location.hostname.indexOf('0.0.0.0') > -1) {
108            if (['/booking1', '/booking2', '/booking3', '/booking4'].indexOf(window.location.pathname) === -1) {
109                return false;
110            }
111        }
112
113        return true;
114    }
115</script>
115
116
117
118
119
120
121
122
123
124
125
126    <!-- GTM Datalayer -->
127<script type="text/javascript">
128
129    let allowed_datalayer_register = true; 
130
131    
132
133
134
135    function addDataLayerDict() {
136        const allowedMergedDatalayer = typeof allowed_datalayer_register !== "undefined" ? allowed_datalayer_register : false;
137        let dataLayerData = '{"amount": "0", "country": "be", "currencyCode": "EUR", "namespace": "casas-novas", "reservation_date": "01/10/2026", "search_availability": "True", "transactionTotalUSD": "0", "transactionTotalWithoutTax": "0"}';
138        let generalDataLayer = '';
139        dataLayerData = dataLayerData ? JSON.parse(dataLayerData) : {};
140        generalDataLayer = generalDataLayer ? JSON.parse(generalDataLayer) : {'language': document.documentElement.lang};
141
142        const dataToAdd = allowedMergedDatalayer ? { ...generalDataLayer, ...dataLayerData } : generalDataLayer;
143
144        if (dataToAdd) {
145            dataToAdd.event = 'init';
146            if (typeof dataLayer !== 'undefined') {
147                dataLayer.push(dataToAdd);
148            } else {
149                dataLayer = [dataToAdd];
150            }
151        }
152    }
153
154    addDataLayerDict();
155
156
157
158    if (allowed_datalayer_register) {
159        
160
161        
162    }
163
164</script>
164
165
166
167
168    
169        
169<script>
170            window.dataLayer = window.dataLayer || [];
171            function gtag() {
172                dataLayer.push(arguments);
173            }
174
175            
176            
177            
178        </script>
178
179    
180    
181        <!-- Google Tag Manager Multi GTM -->
182        
183            
184                
184<script >
185                    if (navigator.userAgent.indexOf("Chrome-Lighthouse") === -1){
vendor: 448 bytes, lines 185-190
185
186                        (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
187                        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
188                        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
189                        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
190                        })(window,document,'script','dataLayer','
190GTM-TKL3BLGG
vendor: 24 bytes, lines 190-191
190');
191                    
191}
192                </script>
192
193            
194        
195        <!-- End Google Tag Manager -->
196    
197
198
199
200
201
202
203
204
205
206
207
208
209<script>
210    window.dataLayer = window.dataLayer || [];
211    function gtag(){dataLayer.push(arguments);}
212
213    function sendRefundEvent(){
214        if(!window.analyticsData) return;
215
216        try {
217          const eventData = JSON.parse(window.analyticsData);
218          gtag('event', 'refund', {
219              'send_to': [
220                  eventData.conversion_label,
221                  eventData.namespace
222              ],
223              'transaction_id': eventData.identifier,
224              'value': eventData.total_price,
225              'currency': eventData.currency,
226              'items': [{
227                  'item_id': eventData.identifier,
228                  'item_name': eventData.namespace,
229                  'start_date': eventData.start_date.replaceAll("_", "/"),
230                  'end_date': eventData.end_date.replaceAll("_", "/"),
231              }]
232          });
233        } catch (error) {
234            console.error("Error dataLayer:", error);
235        }
236    }
237</script>
237
238
239
240    
240<script src="https://onboard.triptease.io/bootstrap.js?partner=paraty" defer async type="text/javascript" data-storage-consent="auto"></script>
240
241
242</head>
243<body itemscope itemtype="//schema.org/Hotel" class="inner_section " >
244
245    
246         <!-- Google Tag Manager (noscript) Multi GTM-->
vendor: 106 bytes, lines 246-249
246
247        
248            <noscript>
249                <iframe src="https://www.googletagmanager.com/ns.html?id=
249GTM-TKL3BLGG
vendor: 113 bytes, lines 249-252
249" height="0" width="0" style="display:none;visibility:hidden"></iframe>
250            </noscript>
251        
252        
252<!-- End Google Tag Manager (noscript) -->
253    
254
255
256
257
258<script>
259     window.addEventListener('load', function () {
260         const bookingErrorEventBody = {
261            sid: '',
262            expired_session:  true ,
263            unexistent_session:  true ,
264            error_page_displayed:  false ,
265            search_params:{},
266         };
267
268         pushBookingErrorEvent(bookingErrorEventBody);
269     });
270     const pushBookingErrorEvent = (eventBody) => {
271            
272                if (typeof dataLayer !== 'undefined') {
273                    dataLayer.push({
274                        event: 'booking_error',
275                        ecommerce: eventBody
276                    });
277                } else {
278                    console.warn('[Ecommerce] Event not send because dataLayer is undefined');
279                }
280            
281     };
282</script>
282
283
284<script type="application/ld+json">
285{
286  "@context": "https://schema.org",
287  "@type": "Hotel",
288  "image": [
289    "https://cdn2.paraty.es/casas-novas/images/399b89421afb17a=s1000"
290   ],
291  "@id": "{{ host|safe }}",
292  "name": "Casas Novas Countyside Hotel SPA & Events",
293  "address": {
294    "@type": "PostalAddress",
295    "streetAddress": "Rua Visconde do Ros&aacute;rio, N&ordm;1",
296    "addressLocality": "Casas Novas",
297    "addressRegion": "Redondelo",
298    "postalCode": "5400-727",
299    "addressCountry": "Portugal"
300  },
301  "geo": {
302    "@type": "GeoCoordinates",
303    "latitude": 41.709173,
304    "longitude": -7.566895
305  },
306  "url": "http://www.hotelcasasnovas.com/",
307  "telephone": "00 351 276 300 050",
308  "priceRange": "&euro;0 - &euro;500"
309}
310</script>
310
311<meta itemprop="description" content="Modifique ou cancele as suas reservas no Casas Novas Countryside Hotel SPA &amp; Events.">
312<input type="hidden" id="lang_management" value="pt">
313<input type="hidden" id="lang_default" value="pt">
314
315    <!--Header-->
316    
317<header>
318    <div id="wrapper-header" class="container12">
319        <div class="top_section_left">
320            
321            <div id="social">
322                
323                    <a href="http://www.facebook.com/CasasNovasHotel" target="_blank">
324                        <i class="fa fa-facebook" aria-hidden="true"></i>
325                    </a>
326                
327                
328                
329                
330                
331                
332                    <a href="http://www.instagram.com/casasnovashotel" target="_blank">
333                        <i class="fa fa-instagram" aria-hidden="true"></i>
334                    </a>
335                
336            </div>
337        </div>
338        <div class="top_section_right">
339            <div id="top-sections">
340                
341                <a href="https://www.hotelcasasnovas.com/minhas-reservas.html">
342                    
343                    <span>Minhas Reservas</span></a>
344            
345            </div>
346            <div id="lang">
347                
348                    <a href="https://www.hotelcasasnovas.com/pt/"
349                             class="selected" >
350                       PT
351                    </a>
352                
353                    <a href="https://www.hotelcasasnovas.com/en/"
354                            >
355                       EN
356                    </a>
357                
358                    <a href="https://www.hotelcasasnovas.com/es/"
359                            >
360                       ES
361                    </a>
362                
363            </div>
364        </div>
365    </div>
366    <nav id="main_menu">
367        <div id="mainMenuDiv" class="container12">
368            <ul itemscope itemtype="//schema.org/SiteNavigationElement" id="main-sections-inner" class="container left_menu">
369    
370        <div class="main-section-div-wrapper"
371             >
372                
373                    <a itemprop="url" href="https://www.hotelcasasnovas.com/hotel.html">
374                        <span itemprop="name">Hotel</span>
375                    </a>
376                
377            
378        </div>
379    
380        <div class="main-section-div-wrapper"
381             >
382                
383                    <a itemprop="url" href="https://www.hotelcasasnovas.com/quartos.html">
384                        <span itemprop="name">Quartos</span>
385                    </a>
386                
387            
388        </div>
389    
390        <div class="main-section-div-wrapper"
391             >
392                
393                    <a itemprop="url" href="https://www.hotelcasasnovas.com/spa.html">
394                        <span itemprop="name">Spa</span>
395                    </a>
396                
397            
398        </div>
399    
400        <div class="main-section-div-wrapper"
401             >
402                
403                    <a itemprop="url" href="https://www.hotelcasasnovas.com/restaurante.html">
404                        <span itemprop="name">Restaurante</span>
405                    </a>
406                
407            
408        </div>
409    
410</ul>
411<a href="https://www.hotelcasasnovas.com/" id="logoDiv">
412        <img itemprop="logo" src="https://cdn2.paraty.es/casas-novas/images/7be5f8de5d23a3f" alt="Casas Novas Countryside Hotel" title="Casas Novas Countryside Hotel"/>
413    </a>
414<ul itemscope itemtype="//schema.org/SiteNavigationElement" id="main-sections-inner" class="container right_menu not_home">
415    
416        <div class="main-section-div-wrapper "
417             >
418                
419                    <a itemprop="url" href="https://www.hotelcasasnovas.com/eventos.html">
420                        <span itemprop="name">Eventos</span>
421                    </a>
422                
423            
424        </div>
425    
426        <div class="main-section-div-wrapper "
427             >
428                
429                    <a itemprop="url" href="https://www.hotelcasasnovas.com/galeria.html">
430                        <span itemprop="name">Galeria</span>
431                    </a>
432                
433            
434        </div>
435    
436        <div class="main-section-div-wrapper "
437             >
438                
439                    <a itemprop="url" href="https://www.hotelcasasnovas.com/localizacao.html">
440                        <span itemprop="name">Localização</span>
441                    </a>
442                
443            
444        </div>
445    
446        <div class="main-section-div-wrapper offers"
447             >
448                
449                    <a itemprop="url" href="https://www.hotelcasasnovas.com/ofertas.html">
450                        <span itemprop="name">Ofertas</span>
451                    </a>
452                
453            
454        </div>
455    
456</ul>
457<div class="floating_header_links_wrapper">
458    <ul>
459    
460    </ul>
461
462</div>
463        </div>
464    </nav>
465</header>
466
467    
468        <section id="slider_container">
469            
470                <div class="inner_slider">
471                    
472                        <img src="https://cdn2.paraty.es/casas-novas/images/aaeb324649b5fc3=s1900" alt=""/>
473                    
474                </div>
475            
476            <div id="full_wrapper_booking">
477                <div id="wrapper_booking" class="container12">
478                    <div id="booking" class="boking_widget_inline">
479                        
480    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,200italic,300italic&display=swap' rel='stylesheet'
481          type='text/css'>
482
483
484
485
486
487
488
489
490<span id="full-booking-engine-html-7" style="margin:0px;padding:0px;" class="">
491<!-- MY BOOKINGS INTEGRATED -->
492
493
494
495
496<!-- TITULO -->
497<div class="booking_form_title">
498    <p class="booking_title_1">Reservas</p>
499    <p class="booking_title_2">Reserve agora</p>
500    <p class="best_price">RESERVE AO MELHOR PREÇO</p>
501
502    
503    
504    
505
506
507    
508</div>
509<!-- END TITULO -->
510
511
512    <div class='calendar_root_wrapper'>
513        <div id="calendar-app-root" class="calendar_app" style="display: none"></div>
514    </div>
515    
515<script>
516        window.calendar_data = {
517            language: 'pt',
518            is_website: true,
519            namespace: 'casas-novas',
520            
521            
522            
523            
524            
525        };
526    </script>
526
527    <input type="hidden" id="price_calendar_v2" value="true">
528    
528<script type="text/javascript" src="/static_1/web_apps/price_calendar.js?v=202609301652" crossorigin="anonymous"></script>
528
529    <link rel="stylesheet" type="text/css" href="/static_1/web_apps/assets/css/main_price_calendar.css?v=202609301652">
530
531
532<!-- booking engine 7 -->
533<form class="booking_form booking-form-center-text paraty-booking-form      "
534      action="https://www.hotelcasasnovas.com/booking1" method="post"  data-initial-booking-url="https://www.hotelcasasnovas.com/booking1" data-initial-namespace="casas-novas">
535
536<input type="hidden" id="language" name="language" value="PORTUGUESE"/>
537<input type="hidden" id="agesKid1" name="agesKid1"/>
538<input type="hidden" id="agesKid2" name="agesKid2"/>
539<input type="hidden" id="agesKid3" name="agesKid3"/>
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590<input id="roomType" type="hidden" name="roomType" value="">
591<input class="roomTypeValue" type="hidden" name="roomTypeValue" value="">
592
593<input id="roomFilter" type="hidden" name="roomFilter" value=".*">
594<input id="roomFilterName" type="hidden" name="roomFilterName" value="">
595<input id="roomOrder" type="hidden" name="roomOrder" value="">
596<input id="roomSearch" type="hidden" name="roomSearch" value="">
597
598<input type="hidden" id="roomtype_list_json" name="roomtype_list_json" value="">
599
600
601
602
603
604<input type="hidden" id="namespace" name="namespace" value="casas-novas"/>
605
606<input type="hidden" id="gclid" name="gclid" value=""/>
607
608<input type="hidden" value="" name="priceSeekerHotel" id="priceSeekerHotel"/>
609
610
611
612
613
614
615
616
617
618
619<!-- BOOKING 0 -->
620
621
622
623
624
625
626
627<!-- END BOOKING 0-->
628
629<!-- EXTRA PARAMS -->
630
631<!-- END EXTRA PARAMS -->
632
633
634
635
636
637<!-- SELECTOR DE HOTEL-->
638
639
640
641
642
643
644
645<!-- END SELECTOR DE HOTEL-->
646
647
648<!-- HIDE FILTERS -->
649
650
651
652
653
654
655
656
657
658<!-- HIDE FILTERS -->
659
660<!-- SELECCION FECHAS DE ENTRADA Y NUMERO HABITACIONES -->
661<div class="stay_selection ">
662    
663        <div class="entry_date_wrapper half_size">
664            <label class="entry_date_label">Chegada</label>
665
666            <div class="date_box entry_date">
667                <span class="date_day"></span>
668                <span class="date_year"></span>
669                <input name="startDate" type="hidden" class="has_datepicker entry_input" value=""/>
670
671                <div></div>
672            </div>
673
674            
675        </div>
676
677        
678
679            <div class="departure_date_wrapper">
680                <label class="departure_date_label">Saída</label>
681
682                <div class="date_box departure_date">
683                    <span class="date_day"></span>
684                    <span class="date_year"></span>
685                    <input name="endDate" type="hidden" class="has_datepicker departure_input" value=""/>
686
687                    <div></div>
688                </div>
689            </div>
690
691            
691<script>
692                departure_date_selectable = true;
693            </script>
693
694
695        
696    
697
698
699</div>
700
701
702
703
704<div class="dates_selector_personalized">
705    <label for="" class="dates_selector_label">datas</label>
706
707    <div class="start_end_date_wrapper">
708        <span type="text" class="start_date_personalized"></span>
709        -
710        <span type="text" class="end_date_personalized"></span>
711
712        <div class="nights_number_wrapper_personalized">
713            <span class="days_number_datepicker"></span>
714            <span class="night_label"> Noite </span>
715        </div>
716    </div>
717
718    <div class="start_date_datepicker" type="text" data-role="date" data-inline="true" style="display: none">
719        <div class="close_calendar"></div>
720        <span class="entry_label_calendar">Data de Chegada</span>
721    </div>
722    <div class="departure_datepicker" type="text" data-role="date" data-inline="true" style="display: none">
723        <div class="close_calendar"></div>
724        <span class="departure_label_calendar">Data de Saída</span>
725    </div>
726</div>
727
728
729
730
731<div class="rooms_number_wrapper " >
732    <label class="rooms_label" for="numRooms">
733        Quartos</label>
734    <select name="numRooms" id="numRooms" class="rooms_number">
735        
736            <option value="1" selected="selected">1</option>
737        
738            <option value="2" >2</option>
739        
740            <option value="3" >3</option>
741        
742    </select>
743</div>
744
745<!-- END SELECCION FECHAS DE ENTRADA Y HABITACIONES -->
746
747
748
749<div class="guest_selector ">
750    <label>Ocupação</label>
751    
752    <span class="placeholder_text">Selecionar</span><b class="button"></b>
753
754</div>
755
756<!-- LISTA DE HABITACIONES -->
757<div class="room_list_wrapper">
758<i class="fa fa-times close_room_selector" aria-hidden="true" style="display: none;"></i>
759    
760
761<ul class="room_list  ">
762
763
764
765        <!---------------------- ROOM 1---------------------->
766    <li class="room room1 room_with_babies" >
767
768        <div class="room_title  room_title_with_babies"
769             >
770            
771                Quarto 1</div>
772
773        <div class="adults_selector">
774            <label class="adults_label" for="adultsRoom1">Adultos
775                
776            </label>
777            <select name="adultsRoom1" class="adults_room_1 room_selector" id="adultsRoom1">
778                
779                    <option value="1" >
780                        1
781                    </option>
782                
783                    <option value="2"  selected="selected">
784                        2
785                    </option>
786                
787                    <option value="3" >
788                        3
789                    </option>
790                
791                    <option value="4" >
792                        4
793                    </option>
794                
795                    <option value="5" >
796                        5
797                    </option>
798                
799                    <option value="6" >
800                        6
801                    </option>
802                
803                    <option value="7" >
804                        7
805                    </option>
806                
807                    <option value="8" >
808                        8
809                    </option>
810                
811            </select>
812            
813        </div>
814        
815            <div class="children_selector range_label_enabled">
816            <label class="children_label" for="childrenRoom1">Crianças
817                
818                    <span class="range-age">
819                          
820                              
821                                  
822                                    (<span class="kids_label">4-12 </span> anos)
823                                  
824                              
825
826                          
827                    </span>
828                
829            </label>
830            <select name="childrenRoom1" class="children_room_1 room_selector" id="childrenRoom1">
831                
832                    <option value="0"  selected="selected" >
833                        
834                            0
835                        
836                    </option>
837                
838                    <option value="1" >
839                        
840                            1
841                        
842                    </option>
843                
844                    <option value="2" >
845                        
846                            2
847                        
848                    </option>
849                
850                    <option value="3" >
851                        
852                            3
853                        
854                    </option>
855                
856                    <option value="4" >
857                        
858                            4
859                        
860                    </option>
861                
862            </select>
863            
864        </div>
865        
866
867
868        
869            <div class="babies_selector">
870                <label for="babiesRoom1">Bebés
871                    </label>
872                <select id="hab1_bebes" class="babies_room_1 room_selector"
873                        name="babiesRoom1">
874
875                    
876                        <option value="0" >0</option>
877                    
878                        <option value="1" >1</option>
879                    
880                        <option value="2" >2</option>
881                    
882                </select>
883                
884            </div>
885        
886
887        
888
889
890    </li>
891
892    
893
894    
895
896        <!---------------------- ROOM 2---------------------->
897    <li class="room room2 room_with_babies" style="display: none">
898
899        <div class="room_title  room_title_with_babies"
900             >
901            
902                Quarto 2</div>
903
904        <div class="adults_selector">
905            <label class="adults_label" for="adultsRoom2">Adultos
906                
907            </label>
908            <select name="adultsRoom2" class="adults_room_2 room_selector" id="adultsRoom2">
909                
910                    <option value="1" >
911                        1
912                    </option>
913                
914                    <option value="2"  selected="selected">
915                        2
916                    </option>
917                
918                    <option value="3" >
919                        3
920                    </option>
921                
922                    <option value="4" >
923                        4
924                    </option>
925                
926                    <option value="5" >
927                        5
928                    </option>
929                
930                    <option value="6" >
931                        6
932                    </option>
933                
934                    <option value="7" >
935                        7
936                    </option>
937                
938                    <option value="8" >
939                        8
940                    </option>
941                
942            </select>
943            
944        </div>
945        
946            <div class="children_selector range_label_enabled">
947            <label class="children_label" for="childrenRoom2">Crianças
948                
949                    <span class="range-age">
950                          
951                              
952                                  
953                                    (<span class="kids_label">4-12 </span> anos)
954                                  
955                              
956
957                          
958                    </span>
959                
960            </label>
961            <select name="childrenRoom2" class="children_room_2 room_selector" id="childrenRoom2">
962                
963                    <option value="0"  selected="selected" >
964                        
965                            0
966                        
967                    </option>
968                
969                    <option value="1" >
970                        
971                            1
972                        
973                    </option>
974                
975                    <option value="2" >
976                        
977                            2
978                        
979                    </option>
980                
981                    <option value="3" >
982                        
983                            3
984                        
985                    </option>
986                
987                    <option value="4" >
988                        
989                            4
990                        
991                    </option>
992                
993            </select>
994            
995        </div>
996        
997
998
999        
1000            <div class="babies_selector">
1001                <label for="babiesRoom2">Bebés
1002                    </label>
1003                <select id="hab2_bebes" class="babies_room_2 room_selector"
1004                        name="babiesRoom2">
1005
1006                    
1007                        <option value="0" >0</option>
1008                    
1009                        <option value="1" >1</option>
1010                    
1011                        <option value="2" >2</option>
1012                    
1013                </select>
1014                
1015            </div>
1016        
1017
1018        
1019
1020
1021    </li>
1022
1023    
1024
1025    
1026
1027        <!---------------------- ROOM 3---------------------->
1028    <li class="room room3 room_with_babies" style="display: none">
1029
1030        <div class="room_title  room_title_with_babies"
1031             >
1032            
1033                Quarto 3</div>
1034
1035        <div class="adults_selector">
1036            <label class="adults_label" for="adultsRoom3">Adultos
1037                
1038            </label>
1039            <select name="adultsRoom3" class="adults_room_3 room_selector" id="adultsRoom3">
1040                
1041                    <option value="1" >
1042                        1
1043                    </option>
1044                
1045                    <option value="2"  selected="selected">
1046                        2
1047                    </option>
1048                
1049                    <option value="3" >
1050                        3
1051                    </option>
1052                
1053                    <option value="4" >
1054                        4
1055                    </option>
1056                
1057                    <option value="5" >
1058                        5
1059                    </option>
1060                
1061                    <option value="6" >
1062                        6
1063                    </option>
1064                
1065                    <option value="7" >
1066                        7
1067                    </option>
1068                
1069                    <option value="8" >
1070                        8
1071                    </option>
1072                
1073            </select>
1074            
1075        </div>
1076        
1077            <div class="children_selector range_label_enabled">
1078            <label class="children_label" for="childrenRoom3">Crianças
1079                
1080                    <span class="range-age">
1081                          
1082                              
1083                                  
1084                                    (<span class="kids_label">4-12 </span> anos)
1085                                  
1086                              
1087
1088                          
1089                    </span>
1090                
1091            </label>
1092            <select name="childrenRoom3" class="children_room_3 room_selector" id="childrenRoom3">
1093                
1094                    <option value="0"  selected="selected" >
1095                        
1096                            0
1097                        
1098                    </option>
1099                
1100                    <option value="1" >
1101                        
1102                            1
1103                        
1104                    </option>
1105                
1106                    <option value="2" >
1107                        
1108                            2
1109                        
1110                    </option>
1111                
1112                    <option value="3" >
1113                        
1114                            3
1115                        
1116                    </option>
1117                
1118                    <option value="4" >
1119                        
1120                            4
1121                        
1122                    </option>
1123                
1124            </select>
1125            
1126        </div>
1127        
1128
1129
1130        
1131            <div class="babies_selector">
1132                <label for="babiesRoom3">Bebés
1133                    </label>
1134                <select id="hab3_bebes" class="babies_room_3 room_selector"
1135                        name="babiesRoom3">
1136
1137                    
1138                        <option value="0" >0</option>
1139                    
1140                        <option value="1" >1</option>
1141                    
1142                        <option value="2" >2</option>
1143                    
1144                </select>
1145                
1146            </div>
1147        
1148
1149        
1150
1151
1152    </li>
1153
1154    
1155
1156    
1157
1158
1159</ul>
1160
1161
1162
1163
1164
1165    
1166</div>
1167<!-- END LISTA DE HABITACIONES -->
1168
1169
1170<div class="wrapper_booking_button   ">
1171    <div class="promocode_wrapper " >
1172        <label for="widget_promocode" class="promocode_label ">
1173            
1174                
1175                    Código Promocional
1176                
1177            
1178        </label>
1179        <input autocomplete="off" type="text" id="widget_promocode" class="promocode_input " name="promocode"
1180               placeholder="PROMOCODE"
1181               value=""
1182               tabindex="16"
1183               pattern="[a-zA-Z0-9.#&_\-]*"
1184               
1185               oninput="this.value=this.value.replace(/[^a-zA-Z0-9.#&_-]/g,'')"
1186        >
1187        <input type="hidden" id="hidden_default_promocode" name="hidden_default_promocode">
1188        
1188<script data-cookieconsent="ignore">
1189            //Reject injections by js in promocode input when invalid characters are detected
1190            (function ($) {
1191                let originalVal = $.fn.val;
1192                $.fn.val = function (value) {
1193                    let label = $("label[for='widget_promocode']");
1194                    if (arguments.length > 0 && value !=='') {
1195                        if (this.attr("name") === "promocode" && typeof value === "string" && !/^[a-zA-Z0-9.#&_-]+$/.test(value)) {
1196                            document.dispatchEvent(new CustomEvent("invalid_promocode_injection", {}));
1197                            return this;
1198                        }
1199                    }
1200                    return originalVal.apply(this, arguments); ;
1201                };
1202            })(jQuery);
1203            document.addEventListener("invalid_promocode_injection", function (event) {
1204                console.warn("Attempt of invalid promocode injection. Value rejected.");
1205                let promocode_input = $("#widget_promocode");
1206                let promocode_label = $("label[for='widget_promocode']");
1207                if (promocode_input.val() == "") {
1208                    promocode_label.removeClass("hide");
1209                }
1210            });
1211        </script>
1211
1212        
1213
1214        
1215    
1216    </div>
1217
1218    
1219
1220    
1221
1222    
1223
1224    
1225        <button type="submit" onclick="$(this).css('display','none');bookingSearchWithAgeSelection();return false;" class="submit_button buttonsearch-ratecheck"  >
1226
1227            
1228
1229                
1230                    Reservar
1231                
1232            
1233        </button>
1234        <div class="spinner_wrapper"></div>
1235    
1236
1237    
1238
1239</div>
1240
1241<div style="clear:both"></div>
1242
1243
1244
1245    
1246
1247    
1248        <img src="https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb" style="display: none" alt="Loading" role="presentation">
1249    
1250
1251    <input type="hidden" id="booking-search-popup" name="booking-search-popup" value="true">
1252
1253    
1253<script>
1254        ($ => {
1255            window.show_booking_search_popup = function (myForm) {
1256                if (($.browser && $.browser.msie && parseFloat($.browser.version) <= 9)){
1257                    //if we are here, is because our browser don't accept setTimeOut
1258                    //so we submit it directly
1259                    myForm.submit();
1260                }
1261                else {
1262                    if (typeof(sending_form_custom_from_paraty) == 'undefined' || !sending_form_custom_from_paraty) {
1263                        sending_form_custom_from_paraty = true;
1264
1265                        setTimeout(function (myForm) {
1266                            openBookingSearchPopup(myForm);
1267                        }, 1000, myForm);
1268                    }
1269                }
1270            }
1271
1272            window.openBookingSearchPopup = function (myForm) {
1273                
1274                    return openBookingSearchPopup_v2(myForm);
1275                
1276
1277                var elements = [
1278                    
1279                ]
1280
1281                var popup_description = "";
1282                if (typeof(custom_popup_loading_description) != 'undefined') {
1283                    popup_description = custom_popup_loading_description;
1284                }
1285
1286                
1287                    showGallery(elements);
1288                
1289
1290                myForm.submit();
1291            }
1292
1293            window.openBookingSearchPopup_v2 = function (myForm, show_popup=true) {
1294                var container_booking_popup = $('<div></div>').addClass('container_popup_booking').css('text-align', 'center'),
1295                    loading_popup_top_text = `Atualizando para continuar com sua reserva`;
1296
1297                    try {
1298                        var loading_popup_top_text = $(".site-header__logo img")[0].outerHTML;
1299                    }catch(e){
1300                        console.log("Error trying to retreive logo")
1301                    }
1302
1303                
1304                    var loading_popup_top_text = $("<img src='https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb'>");
1305                
1306                
1307
1308                
1309
1310                var loading_popup_bottom_text = `<div><font color='#030303'>	Verificando a disponibilidade da sua pesquisa:<br />	<br />	De <strong>@@start_date@@</strong> at&eacute; <strong>@@end_date@@</strong></font></div>`;
1311
1312                
1313
1314                var descipription_top_booking_popup = $("<div></div>").addClass('description_top_popup_booking').html(loading_popup_top_text),
1315                    descipription_bottom_booking_popup = $("<div></div>").addClass('description_bottom_popup_booking').html(loading_popup_bottom_text),
1316                    gif_wrapper = $("<div></div>").addClass('gif_wrapper'),
1317                    number_of_lines = 20;
1318
1319                for (var x = 0; x < number_of_lines; x++) {
1320                    var target_delay_css = {
1321                        '-webkit-animation-delay': -(1.5 - (0.1 * x)) + 's',
1322                        '-moz-animation-delay': -(1.5 - (0.1 * x)) + 's',
1323                        '-o-animation-delay': -(1.5 - (0.1 * x)) + 's',
1324                        'animation-delay': -(1.5 - (0.1 * x)) + 's'
1325                    };
1326                    var element_line_to_append = $("<div></div>").addClass("default_line_loading").css(target_delay_css);
1327                    
1328                        element_line_to_append.css('background', '#3E5902');
1329                    
1330
1331                    element_line_to_append.appendTo(gif_wrapper);
1332                }
1333
1334                
1335                    container_booking_popup.css('border', '1px solid #3E5902');
1336                
1337
1338                
1339
1340                
1341
1342                
1343                    container_booking_popup.append(descipription_top_booking_popup).append(gif_wrapper).append(descipription_bottom_booking_popup);
1344                
1345
1346                var selected_start_date = $("input[name='startDate']").val(),
1347                    selected_end_date = $("input[name='endDate']").val();
1348
1349                var custom_format_date = "";
1350                if (custom_format_date) {
1351
1352                    var splitted_start_date = selected_start_date.split("/"),
1353                        start_day = splitted_start_date[0],
1354                        start_month = splitted_start_date[1],
1355                        start_year = splitted_start_date[2],
1356                        start_datetime = new Date(start_year, start_month - 1, start_day),
1357                        week_start_day = start_datetime.getDay();
1358
1359                    var splitted_end_date = selected_end_date.split("/"),
1360                        end_day = splitted_end_date[0],
1361                        end_month = splitted_end_date[1],
1362                        end_year = splitted_end_date[2],
1363                        end_datetime = new Date(end_year, end_month - 1, end_day),
1364                        week_end_day = end_datetime.getDay();
1365
1366                    var days_list = $.datepicker._defaults.dayNames;
1367
1368                    //Start date
1369                    selected_start_date = custom_format_date.replace("%m", start_month).replace("%d", start_day).replace("%Y", start_year);
1370                    selected_start_date = selected_start_date.replace("%a", days_list[week_start_day]).replace("%bb", _monthNames[start_month - 1]).replace("%b", _monthNames[start_month - 1]);
1371
1372                    //End date
1373                    selected_end_date = custom_format_date.replace("%m", end_month).replace("%d", end_day).replace("%Y", end_year);
1374                    selected_end_date = selected_end_date.replace("%a", days_list[week_end_day]).replace("%bb", _monthNames[end_month - 1]).replace("%b", _monthNames[end_month - 1]);
1375                }
1376
1377                //Protection for failures
1378                if(selected_start_date.indexOf('NaN') > -1 || selected_end_date.indexOf('NaN')){
1379                    container_booking_popup.html(container_booking_popup.html().replace("@@start_date@@", selected_start_date).replace("@@end_date@@", selected_end_date));
1380                } else {
1381                    container_booking_popup.find(".description_bottom_popup_booking").remove();
1382                }
1383                if (show_popup) {
1384                    var booking_loading_popup_params = {
1385
1386                        width: 'auto',
1387                        height: 'auto',
1388                        fitToView: false,
1389                        autoSize: false,
1390                        padding: 0,
1391                        closeClick: false,
1392                        closeBtn: false,
1393                        helpers: {
1394                            overlay: {
1395                                css:
1396                                    {'background': '#FFFFFF'},
1397                                closeClick: false
1398                            }, // prevents closing when clicking OUTSIDE fancybox
1399                            
1400                        },
1401                        wrapCSS: 'fancy-booking-search_v2 full_screen_engine custom_color_overlay',
1402                        beforeShow: function () {
1403                            if (navigator.userAgent.match(/iPhone/i) ||
1404                                navigator.userAgent.match(/iPad/i) ||
1405                                navigator.userAgent.match(/iPod/i) ||
1406                                (navigator.userAgent.match(/AppleWeb
1406Kit/i) && !navigator.userAgent.match(/Chrome/i))) {
1407                                setTimeout(function () {
1408                                    $.fancybox.close(true);
1409                                    $("#full_wrapper_booking .wrapper_booking_button .submit_button").show();
1410                                    sending_form_custom_from_paraty = undefined;
1411                                }, 8000);
1412                            }
1413                            $('.fancybox-bg').css('background', '#FFFFFF');
1414                        }
1415                    };
1416
1417                    if ($.fancybox.version.slice(0, 2) === '3.') {
1418                        booking_loading_popup_params['baseClass'] = 'fancybox-wrap fancy-booking-search_v2 full_screen_engine custom_color_overlay';
1419                        booking_loading_popup_params['modal'] = true;
1420                        $.fancybox.open(container_booking_popup, booking_loading_popup_params);
1421                    } else {
1422                        $.fancybox(container_booking_popup, booking_loading_popup_params);
1423                    }
1424
1425                    if (myForm) {
1426                        if (!navigator.userAgent.match(/chrome/i) && (navigator.userAgent.match(/safari/i) || navigator.userAgent.match(/firefox/i))) {
1427                            setTimeout(function () {
1428                                myForm.submit();
1429                            }, 700);
1430                        } else {
1431                            myForm.submit();
1432                        }
1433                    }
1434                }
1435            }
1436
1437            window.openCalendarPriceLoaderPopup = function () {
1438                if (window.location.href.includes('localhost')) {
1439                    return;
1440                }
1441
1442                const container_booking_popup = $('<div class="container_popup_booking container_popup_calendar"></div>');
1443                const description_top_booking_popup = $('<div class="description_top_popup_calendar"></div>').html(`As datas da sua pesquisa têm restrições associadas. Estamos a direcionar para o calendário de preços.`);
1444                const description_bottom_booking_popup = $('<div class="description_bottom_popup_calendar"></div>').html(`Para que possa continuar com a sua reserva, estamos a redirecioná-lo para o nosso calendário de disponibilidade, para que possa reserva a sua próxima estadia connosco ao melhor preço disponível.`);
1445                const animation_container = $("<div id='lottie_animation'></div>");
1446                const center_container = $("<div class='center_container'></div>").append(description_top_booking_popup).append(animation_container);
1447
1448                container_booking_popup.append(center_container).append(description_bottom_booking_popup);
1449
1450                var booking_loading_popup_params = {
1451                    width: 'auto',
1452                    height: 'auto',
1453                    fitToView: false,
1454                    autoSize: false,
1455                    padding: 0,
1456                    closeClick: false,
1457                    closeBtn: false,
1458                    helpers: {
1459                        overlay: {
1460                                css: {'background': 'transparent', 'backdrop-filter': 'blur(50px)'},
1461                                closeClick: false}, // prevents closing when clicking OUTSIDE fancybox
1462                    },
1463                    wrapCSS: 'fancy-booking-search_v2 full_screen_engine',
1464                    beforeShow: function () {
1465                        if(navigator.userAgent.match(/iPhone/i) ||
1466                            navigator.userAgent.match(/iPad/i) ||
1467                            navigator.userAgent.match(/iPod/i) ||
1468                            (navigator.userAgent.match(/AppleWebKit/i) && !navigator.userAgent.match(/Chrome/i))){
1469                            setTimeout(function () {
1470                                if ($.fancybox.current?.wrapCSS.includes('fancy-booking-search_v2')) {
1471                                    $.fancybox.close();
1472                                }
1473                            }, 5000);
1474                        }
1475                        $('.fancybox-bg').css('background','transparent').css('backdrop-filter','blur(50px)');
1476                        $('.fancybox-margin').css('margin', '0');
1477                    },
1478                    afterShow: function () {
1479                        if (typeof loader_animation !== 'undefined') {
1480                            let params = {
1481                                container: $('#lottie_animation')[0],
1482                                renderer: 'svg',
1483                                loop: true,
1484                                autoplay: true,
1485                                animationData: loader_animation
1486                            };
1487
1488                            let anim = lottie.loadAnimation(params);
1489
1490                            setTimeout(function () {
1491                                params['container'] = $('#lottie_animation_calendar')[0];
1492                                params['loop'] = false;
1493
1494                                let anim_calendar = lottie.loadAnimation(params);
1495
1496                                anim_calendar.addEventListener('complete', function() {
1497                                    anim_calendar.stop();
1498                                    setTimeout(() => {
1499                                        anim_calendar.play();
1500                                    }, 5000);
1501                                });
1502                            }, 5000);
1503                        }
1504                    }
1505                };
1506
1507                $.fancybox(container_booking_popup, booking_loading_popup_params);
1508
1509                setTimeout(function () {
1510                    if ($.fancybox.current?.wrapCSS.includes('fancy-booking-search_v2')) {
1511                        $.fancybox.close();
1512                    }
1513                    setTimeout(function() {
1514                        typeof resizeCallCenter !== 'undefined' && resizeCallCenter();
1515                    }, 5500);
1516                }, 5000);
1517            }
1518
1519            window.showGallery = function (elements) {
1520                var fancybox_params = {
1521                    'modal': true,
1522                    'closeBtn': false,
1523                    'autoPlay': true,
1524                    'playSpeed': 3000,
1525                    'prevEffect': 'none',
1526                    'nextEffect': 'none',
1527                    'type': 'image',
1528                    'arrows': false,
1529                    'nextClick': false,
1530                    'mouseWheel': false,
1531                    'helpers': {
1532                        title: {
1533                            type: 'outside'
1534                        },
1535                        overlay: {
1536                            opacity: 0.8,
1537                            css: {
1538                                'background-color': '#000'
1539                            }
1540                        }
1541                    },
1542                    'padding': 0
1543                };
1544                if ($.fancybox.version.slice(0,2) === '3.') {
1545                    $.fancybox.open(elements, fancybox_params);
1546                } else {
1547                    $.fancybox(elements, fancybox_params);
1548                }
1549            }
1550
1551            //Preloading video is required to load correctly in some browsers
1552            $(function() {
1553                
1554            });
1555
1556            
1557        })(jQuery);
1558
1559    </script>
1559
1560
1561
1562
1563
1564
1565
1566</form>
1567
1568
1569
1570    <style>
1571.ui-dialog {
1572	position: absolute;
1573	top: 0;
1574	left: 0;
1575	padding: .2em;
1576	outline: 0;
1577}
1578.ui-dialog .ui-dialog-titlebar {
1579	padding: .4em 1em;
1580	position: relative;
1581}
1582.ui-dialog .ui-dialog-title {
1583	float: left;
1584	margin: .1em 0;
1585	white-space: nowrap;
1586	width: 90%;
1587	overflow: hidden;
1588	text-overflow: ellipsis;
1589}
1590.ui-dialog .ui-dialog-titlebar-close {
1591	position: absolute;
1592	right: .3em;
1593	top: 50%;
1594	width: 21px;
1595	margin: -10px 0 0 0;
1596	padding: 1px;
1597	height: 20px;
1598}
1599.ui-dialog .ui-dialog-content {
1600	position: relative;
1601	border: 0;
1602	padding: .5em 1em;
1603	background: none;
1604	overflow: auto;
1605	text-align: center;
1606}
1607.ui-dialog .ui-dialog-buttonpane {
1608	text-align: left;
1609	border-width: 1px 0 0 0;
1610	background-image: none;
1611	margin-top: .5em;
1612	padding: .3em 1em .5em .4em;
1613}
1614.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
1615	/*float: right;*/
1616	float: none;
1617	text-align: center;
1618}
1619.ui-dialog .ui-dialog-buttonpane button {
1620	margin: .5em .4em .5em 0;
1621	cursor: pointer;
1622}
1623.ui-dialog .ui-resizable-se {
1624	width: 12px;
1625	height: 12px;
1626	right: -5px;
1627	bottom: -5px;
1628	background-position: 16px 16px;
1629}
1630.ui-dialog .ui-button-text {
1631	/*padding: 10px;*/
1632	/*margin: 10px;*/
1633}
1634
1635.ui-dialog .ui-button{
1636	/*height: 30px;*/
1637}
1638
1639.ui-draggable .ui-dialog-titlebar {
1640	cursor: move;
1641}
1642
1643.ui-dialog {
1644	min-width: 300px;
1645    z-index: 9999;
1646}
1647
1648</style>
1649
1650 <style>
1651	.ui-dialog-titlebar-close {
1652 		display: none !important;
1653	}
1654
1655	#dialog-form{
1656		padding: 10px;
1657
1658	}
1659
1660	.ui-dialog-titlebar{
1661		padding: 5px;
1662	}
1663
1664	.kidAgesSelect, .babyAgesSelect{
1665		margin-left: 10px;
1666
1667	}
1668
1669     .ui-dialog{
1670         z-index: 99999;
1671     }
1672
1673
1674</style>
1675
1676<!-- New style Age popup -->
1677<style>
1678body .ui-widget-overlay.ui-front {
1679  background: rgba(0, 0, 0, 0.6);
1680  opacity: 1;
1681  z-index: 9998;
1682  position: fixed;
1683}
1684body .ui-dialog.ui-widget {
1685  padding: 20px 10px;
1686  border: 0;
1687  border-radius: 0;
1688  line-height: 1;
1689    width: 100% !important;
1690    max-width: 350px;
1691}
1692body .ui-dialog.ui-widget .ui-dialog-titlebar {
1693  background: none!important;
1694  padding: 0 0 20px 0;
1695  border-radius: 0;
1696  border: 0;
1697  color: black!important;
1698  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
1699  text-align: center;
1700  margin-bottom: 20px;
1701}
1702body .ui-dialog.ui-widget .ui-dialog-titlebar .ui-dialog-title {
1703  width: 100%;
1704  margin: 0;
1705}
1706body .ui-dialog.ui-widget #dialog-form {
1707  padding: 0;
1708  text-align: left;
1709  width: 100% !important;
1710    max-width: 350px;
1711    overflow: visible;
1712}
1713body .ui-dialog.ui-widget #dialog-form form label {
1714  clear: both;
1715  width: 100%;
1716  float: left;
1717}
1718body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids {
1719  display: inline-block;
1720  width: 100%;
1721  float: left;
1722}
1723body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select {
1724  width: calc((100% - 10px)/2);
1725  margin: 0px 10px 10px 0;
1726  float: left;
1727  -webkit-appearance: none;
1728  -moz-appearance: none;
1729  appearance: none;
1730  border-radius: 0;
1731  padding: 5px 10px;
1732}
1733body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:focus {
1734  opacity: 1 !important;
1735}
1736body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(even) {
1737  margin-right: 0;
1738}
1739body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(-n+2) {
1740  margin-top: 10px;
1741}
1742body .ui-dialog.ui-widget .ui-dialog-buttonpane {
1743  margin: 0;
1744  padding: 0;
1745  vertical-align: bottom;
1746  display: inline-block;
1747  float: left;
1748  width: 100% !important;
1749    max-width: 350px;
1750  border-radius: 0;
1751  margin-top: 10px;
1752}
1753body .ui-dialog.ui-widget .ui-dialog-buttonpane .ui-button {
1754  margin: 0;
1755  display: inline-block;
1756  width: 100% !important;
1757    max-width: 350px;
1758  border-radius: 0;
1759  background: #446ca9;
1760  color:white;
1761}
1762body .ui-dialog.ui-widget .ui-resizable-handle {
1763  display: none;
1764}
1765</style>
1766<!--  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" type="text/css"/> -->
1767 <div id="dialog-form"  title="As idades das crianças" style="display:none">
1768    <form>
1769        
1770            <label id="label1" for="name">Quarto 1</label>
1771
1772            <div class="wrapper_age_kids clearfix">
1773                
1774                    
1775                        <select class="kidAgesSelect" id="agesRoom1_1" name="name" tabindex="1">
1776                            
1777                                <option value="4" selected="selected">4</option>
1778                            
1779                                <option value="5" >5</option>
1780                            
1781                                <option value="6" >6</option>
1782                            
1783                                <option value="7" >7</option>
1784                            
1785                                <option value="8" >8</option>
1786                            
1787                                <option value="9" >9</option>
1788                            
1789                                <option value="10" >10</option>
1790                            
1791                                <option value="11" >11</option>
1792                            
1793                                <option value="12" >12</option>
1794                            
1795                        </select>
1796                    
1797                        <select class="kidAgesSelect" id="agesRoom1_2" name="name" tabindex="1">
1798                            
1799                                <option value="4" selected="selected">4</option>
1800                            
1801                                <option value="5" >5</option>
1802                            
1803                                <option value="6" >6</option>
1804                            
1805                                <option value="7" >7</option>
1806                            
1807                                <option value="8" >8</option>
1808                            
1809                                <option value="9" >9</option>
1810                            
1811                                <option value="10" >10</option>
1812                            
1813                                <option value="11" >11</option>
1814                            
1815                                <option value="12" >12</option>
1816                            
1817                        </select>
1818                    
1819                        <select class="kidAgesSelect" id="agesRoom1_3" name="name" tabindex="1">
1820                            
1821                                <option value="4" selected="selected">4</option>
1822                            
1823                                <option value="5" >5</option>
1824                            
1825                                <option value="6" >6</option>
1826                            
1827                                <option value="7" >7</option>
1828                            
1829                                <option value="8" >8</option>
1830                            
1831                                <option value="9" >9</option>
1832                            
1833                                <option value="10" >10</option>
1834                            
1835                                <option value="11" >11</option>
1836                            
1837                                <option value="12" >12</option>
1838                            
1839                        </select>
1840                    
1841                        <select class="kidAgesSelect" id="agesRoom1_4" name="name" tabindex="1">
1842                            
1843                                <option value="4" selected="selected">4</option>
1844                            
1845                                <option value="5" >5</option>
1846                            
1847                                <option value="6" >6</option>
1848                            
1849                                <option value="7" >7</option>
1850                            
1851                                <option value="8" >8</option>
1852                            
1853                                <option value="9" >9</option>
1854                            
1855                                <option value="10" >10</option>
1856                            
1857                                <option value="11" >11</option>
1858                            
1859                                <option value="12" >12</option>
1860                            
1861                        </select>
1862                    
1863                        <select class="kidAgesSelect" id="agesRoom1_5" name="name" tabindex="1">
1864                            
1865                                <option value="4" selected="selected">4</option>
1866                            
1867                                <option value="5" >5</option>
1868                            
1869                                <option value="6" >6</option>
1870                            
1871                                <option value="7" >7</option>
1872                            
1873                                <option value="8" >8</option>
1874                            
1875                                <option value="9" >9</option>
1876                            
1877                                <option value="10" >10</option>
1878                            
1879                                <option value="11" >11</option>
1880                            
1881                                <option value="12" >12</option>
1882                            
1883                        </select>
1884                    
1885                
1886            </div>
1887
1888            
1889            <br/>
1890            <br/>
1891		
1892            <label id="label2" for="name">Quarto 2</label>
1893
1894            <div class="wrapper_age_kids clearfix">
1895                
1896                    
1897                        <select class="kidAgesSelect" id="agesRoom2_1" name="name" tabindex="1">
1898                            
1899                                <option value="4" selected="selected">4</option>
1900                            
1901                                <option value="5" >5</option>
1902                            
1903                                <option value="6" >6</option>
1904                            
1905                                <option value="7" >7</option>
1906                            
1907                                <option value="8" >8</option>
1908                            
1909                                <option value="9" >9</option>
1910                            
1911                                <option value="10" >10</option>
1912                            
1913                                <option value="11" >11</option>
1914                            
1915                                <option value="12" >12</option>
1916                            
1917                        </select>
1918                    
1919                        <select class="kidAgesSelect" id="agesRoom2_2" name="name" tabindex="1">
1920                            
1921                                <option value="4" selected="selected">4</option>
1922                            
1923                                <option value="5" >5</option>
1924                            
1925                                <option value="6" >6</option>
1926                            
1927                                <option value="7" >7</option>
1928                            
1929                                <option value="8" >8</option>
1930                            
1931                                <option value="9" >9</option>
1932                            
1933                                <option value="10" >10</option>
1934                            
1935                                <option value="11" >11</option>
1936                            
1937                                <option value="12" >12</option>
1938                            
1939                        </select>
1940                    
1941                        <select class="kidAgesSelect" id="agesRoom2_3" name="name" tabindex="1">
1942                            
1943                                <option value="4" selected="selected">4</option>
1944                            
1945                                <option value="5" >5</option>
1946                            
1947                                <option value="6" >6</option>
1948                            
1949                                <option value="7" >7</option>
1950                            
1951                                <option value="8" >8</option>
1952                            
1953                                <option value="9" >9</option>
1954                            
1955                                <option value="10" >10</option>
1956                            
1957                                <option value="11" >11</option>
1958                            
1959                                <option value="12" >12</option>
1960                            
1961                        </select>
1962                    
1963                        <select class="kidAgesSelect" id="agesRoom2_4" name="name" tabindex="1">
1964                            
1965                                <option value="4" selected="selected">4</option>
1966                            
1967                                <option value="5" >5</option>
1968                            
1969                                <option value="6" >6</option>
1970                            
1971                                <option value="7" >7</option>
1972                            
1973                                <option value="8" >8</option>
1974                            
1975                                <option value="9" >9</option>
1976                            
1977                                <option value="10" >10</option>
1978                            
1979                                <option value="11" >11</option>
1980                            
1981                                <option value="12" >12</option>
1982                            
1983                        </select>
1984                    
1985                        <select class="kidAgesSelect" id="agesRoom2_5" name="name" tabindex="1">
1986                            
1987                                <option value="4" selected="selected">4</option>
1988                            
1989                                <option value="5" >5</option>
1990                            
1991                                <option value="6" >6</option>
1992                            
1993                                <option value="7" >7</option>
1994                            
1995                                <option value="8" >8</option>
1996                            
1997                                <option value="9" >9</option>
1998                            
1999                                <option value="10" >10</option>
2000                            
2001                                <option value="11" >11</option>
2002                            
2003                                <option value="12" >12</option>
2004                            
2005                        </select>
2006                    
2007                
2008            </div>
2009
2010            
2011            <br/>
2012            <br/>
2013		
2014            <label id="label3" for="name">Quarto 3</label>
2015
2016            <div class="wrapper_age_kids clearfix">
2017                
2018                    
2019                        <select class="kidAgesSelect" id="agesRoom3_1" name="name" tabindex="1">
2020                            
2021                                <option value="4" selected="selected">4</option>
2022                            
2023                                <option value="5" >5</option>
2024                            
2025                                <option value="6" >6</option>
2026                            
2027                                <option value="7" >7</option>
2028                            
2029                                <option value="8" >8</option>
2030                            
2031                                <option value="9" >9</option>
2032                            
2033                                <option value="10" >10</option>
2034                            
2035                                <option value="11" >11</option>
2036                            
2037                                <option value="12" >12</option>
2038                            
2039                        </select>
2040                    
2041                        <select class="kidAgesSelect" id="agesRoom3_2" name="name" tabindex="1">
2042                            
2043                                <option value="4" selected="selected">4</option>
2044                            
2045                                <option value="5" >5</option>
2046                            
2047                                <option value="6" >6</option>
2048                            
2049                                <option value="7" >7</option>
2050                            
2051               
2051                 <option value="8" >8</option>
2052                            
2053                                <option value="9" >9</option>
2054                            
2055                                <option value="10" >10</option>
2056                            
2057                                <option value="11" >11</option>
2058                            
2059                                <option value="12" >12</option>
2060                            
2061                        </select>
2062                    
2063                        <select class="kidAgesSelect" id="agesRoom3_3" name="name" tabindex="1">
2064                            
2065                                <option value="4" selected="selected">4</option>
2066                            
2067                                <option value="5" >5</option>
2068                            
2069                                <option value="6" >6</option>
2070                            
2071                                <option value="7" >7</option>
2072                            
2073                                <option value="8" >8</option>
2074                            
2075                                <option value="9" >9</option>
2076                            
2077                                <option value="10" >10</option>
2078                            
2079                                <option value="11" >11</option>
2080                            
2081                                <option value="12" >12</option>
2082                            
2083                        </select>
2084                    
2085                        <select class="kidAgesSelect" id="agesRoom3_4" name="name" tabindex="1">
2086                            
2087                                <option value="4" selected="selected">4</option>
2088                            
2089                                <option value="5" >5</option>
2090                            
2091                                <option value="6" >6</option>
2092                            
2093                                <option value="7" >7</option>
2094                            
2095                                <option value="8" >8</option>
2096                            
2097                                <option value="9" >9</option>
2098                            
2099                                <option value="10" >10</option>
2100                            
2101                                <option value="11" >11</option>
2102                            
2103                                <option value="12" >12</option>
2104                            
2105                        </select>
2106                    
2107                        <select class="kidAgesSelect" id="agesRoom3_5" name="name" tabindex="1">
2108                            
2109                                <option value="4" selected="selected">4</option>
2110                            
2111                                <option value="5" >5</option>
2112                            
2113                                <option value="6" >6</option>
2114                            
2115                                <option value="7" >7</option>
2116                            
2117                                <option value="8" >8</option>
2118                            
2119                                <option value="9" >9</option>
2120                            
2121                                <option value="10" >10</option>
2122                            
2123                                <option value="11" >11</option>
2124                            
2125                                <option value="12" >12</option>
2126                            
2127                        </select>
2128                    
2129                
2130            </div>
2131
2132            
2133            <br/>
2134            <br/>
2135		
2136
2137        <input type="hidden" id="id_div_parent">
2138    </form>
2139</div>
2140
2141<script type="text/javascript">
2142    ($ => {
2143        const babiesNeedAgeSelection = false;
2144
2145        window.sendActiveForm = function () {
2146            return $(".booking_form").each(function () {
2147
2148                if ($(this).find(".submit_button:not(.popup_button)").css("display") == "none" || $(this).find(".submit_button:not(.popup_button)").attr("disabled") == "disabled") {
2149                    if ($('#booking-search-popup').length) {
2150                        show_booking_search_popup($(this));
2151                        return false;
2152                    }
2153
2154                    $(this).submit();
2155                    return true;
2156                }
2157            });
2158        }
2159
2160        window.bookingSearchWithAgeSelection = function () {
2161            $(".booking_form").each(function () {
2162                const $booking_form = $(this);
2163
2164                let children_selected = false;
2165                const minor_room_selectors = '.children_selector select.room_selector' + (babiesNeedAgeSelection ? ', .babies_selector select.room_selector' : '');
2166                $(minor_room_selectors).each(function(){
2167                   if ($(this).val() > 0) {
2168                       children_selected = true;
2169                   }
2170                });
2171
2172                if ($('.ages_mandatory_wrapper').length && window.is_children_selector_changed && children_selected) {
2173                    window.is_children_selector_changed = false;
2174                    $('.ages_mandatory_wrapper').show();
2175                    toggle_guest_selector(true);
2176
2177                    setTimeout(() => {
2178                        $booking_form.find(".submit_button").css("display", "block");
2179                    }, 1000);
2180
2181                    return false;
2182                }
2183
2184                const $submit_button = $booking_form.find(".submit_button:not(.popup_button)");
2185                if ($submit_button.css("display") === "none" || $submit_button.attr("disabled") == "disabled") {
2186                    //Check that user has selected startDate & endDate
2187                    const start_date = $booking_form.find("input[name='startDate']").val();
2188                    const end_date = $booking_form.find("input[name='endDate']").val();
2189
2190                    if (!(start_date && end_date)) {
2191                        $booking_form.find(".submit_button").css("display", "block");
2192                        if (!end_date) {
2193                            if (typeof (open_departure_datepicker) != 'undefined') clearTimeout(open_departure_datepicker);
2194                            open_departure_datepicker = setTimeout(function () {
2195                                $(".departure_date_wrapper").trigger('click');
2196                            }, 200)
2197                        }
2198                        return false;
2199                    }
2200
2201                    if (kids_selected_in_widget($booking_form)) {
2202                        const destination_field = $booking_form.find(".destination");
2203                        let booking_url = $booking_form.attr("action");
2204
2205                        if (destination_field.length && booking_url.indexOf("booking0") == -1 && destination_field.val() == "") {
2206                            const $destination_wrapper = $booking_form.find(".destination_wrapper");
2207                            if ($destination_wrapper.length) {
2208                                // If there is a destination selector wrapper, open it instead of submitting the form.
2209                                $destination_wrapper.trigger('click');
2210                                return false;
2211                            }
2212
2213                            booking_url = $booking_form.attr("action", $booking_form.attr("action").replace("booking1", "booking0")).attr("action");
2214                        }
2215
2216                        
2217                            updateAgesOptions();
2218                            $.fancybox.close();
2219                            var dialog_opt = {
2220                                width: "auto",
2221                                autoOpen: false,
2222                                modal: true,
2223                                buttons: {
2224                                    "Continuar": function () {
2225                                        for (let room_number = 1; room_number <= 3; room_number++) {
2226                                            const target_hidden_input = $("input[name=agesKid" + room_number + "]");
2227                                            let ages_value_string = [];
2228
2229                                            
2230
2231                                            for (let kid_number = 1; kid_number <= 5; kid_number++) {
2232                                                let age_selected = '';
2233                                                const needed_age_id = `agesRoom${room_number}_${kid_number}`;
2234
2235                                                $(".kidAgesSelect:visible").each(function () {
2236                                                    if ($(this).attr('id') == needed_age_id) {
2237                                                        age_selected = $(this).val();
2238                                                    }
2239                                                });
2240
2241                                                // avoid undefined or empty values
2242                                                if (age_selected) ages_value_string.push(age_selected);
2243
2244                                                
2245                                            }
2246
2247                                            ages_value_string = ages_value_string.join(';');
2248                                            target_hidden_input.each(function () {
2249                                                $(this).val(ages_value_string);
2250                                            });
2251
2252                                            
2253                                        }
2254
2255                                        $(this).dialog("close");
2256                                        sendActiveForm();
2257                                    }
2258                                }
2259                            };
2260                            $("#dialog-form").dialog(dialog_opt).dialog("open");
2261                        
2262                    }
2263                }
2264            });
2265        }
2266
2267        window.kids_selected_in_widget = function (form) {
2268            let minors_are_selected = false;
2269            const minor_selectors = $(form).find('select[name^="childrenRoom"]' + (babiesNeedAgeSelection ? ', select[name^="babiesRoom"]' : ''));
2270            minor_selectors.each(function() {
2271                const selected_option = parseInt($(this).find("option:selected").val() ?? 0);
2272                if (selected_option > 0) {
2273                    minors_are_selected = true;
2274                }
2275            });
2276
2277            return minors_are_selected;
2278        }
2279
2280        window.prepare_kids_ages = function (force = false) {
2281            $(".booking_form").each(function () {
2282                const bookingForm = $(this);
2283                const submitButton = bookingForm.find(".submit_button:not(.popup_button)");
2284                const isButtonHiddenOrDisabled = submitButton.css('display') === 'none' || 
2285                                                 submitButton.attr("disabled") === "disabled";
2286                
2287                if (force || isButtonHiddenOrDisabled) {
2288                    let numRooms = bookingForm.find(".rooms_number option:selected").val();
2289                    
2290                    for (let i = 1; i <= numRooms; i++) {
2291                        let roomKids = bookingForm.find(".children_room_" + i + " option:selected").val(),
2292                            roomBabies = bookingForm.find(".babies_room_" + i + " option:selected").val(),
2293                            roomAges = bookingForm.find(".room_ages_" + i),
2294                            kidsAges = '',
2295                            babiesAges = '';
2296
2297                        for (let j = 1; j <= roomKids; j++) {
2298                            const selectElement = roomAges.find(`.kids_age_selection #agesRoom${i}_${j}`);
2299                            const ageKid = selectElement.val() ?? selectElement.find('option:selected').val() ?? selectElement.find('option[selected]').val();
2300                            kidsAges += ageKid + ';';
2301                        }
2302
2303                        for (let j = 1; j <= roomBabies; j++) {
2304                            const selectElement = roomAges.find(`.babies_age_selection #babyAgesRoom${i}_${j}`);
2305                            const ageBaby = selectElement.val() ?? selectElement.find('option:selected').val() ?? selectElement.find('option[selected]').val() ?? 0;
2306                            babiesAges += ageBaby + ';';
2307                        }
2308
2309                        // Check if input exists and create it if not
2310                        if (bookingForm.find("#agesKid" + i).length == 0) {
2311                            bookingForm.append('<input type="hidden" id="agesKid' + i + '" name="agesKid' + i + '" value="">');
2312                        }
2313
2314                        if (bookingForm.find("#agesBaby" + i).length == 0) {
2315                            bookingForm.append('<input type="hidden" id="agesBaby' + i + '" name="agesBaby' + i + '" value="">');
2316                        }
2317
2318                        bookingForm.find("#agesKid" + i).val(kidsAges);
2319                        bookingForm.find("#agesBaby" + i).val(babiesAges);
2320                    }
2321                }
2322            })
2323        };
2324
2325        window.updateAgesOptions = function () {
2326
2327
2328            $(".booking_form").each(function () {
2329
2330                if ($(this).find(".submit_button:not(.popup_button)").css("display") == "none" || $(this).find(".submit_button:not(.popup_button)").attr("disabled") == "disabled") {
2331
2332                    var numHab = $(this).find(".rooms_number option:selected").val();
2333                    for (var i = 3; i > 0; i--) {
2334                        for (var j = 1; j <= 5; j++) {
2335                            $("#agesRoom" + i + "_" + j).hide();
2336                            $("#agesRoom_baby" + i + "_" + j).hide();
2337
2338                            var roomElem = $("#agesRoom" + i + "_" + j);
2339                            var babyElem = $("#agesRoom_baby" + i + "_" + j);
2340
2341                            if (roomElem.parent().parent().hasClass('selectricWrapper')) {
2342                                roomElem.parent().parent().hide();
2343                            }
2344
2345                            if (babyElem.parent().parent().hasClass('selectricWrapper')) {
2346                                babyElem.parent().parent().hide();
2347                            }
2348                        }
2349
2350                        $("#label" + i).hide();
2351                        $("#baby_label" + i).hide();
2352                    }
2353
2354
2355
2356                    for (var i = numHab; i > 0; i--) {
2357                        var childrenRoom = $(this).find(".children_room_" + i + " option:selected").val();
2358                        var babiesRoom = $(this).find(".babies_room_" + i + " option:selected").val();
2359
2360                        showAges("#label", i, childrenRoom);
2361                        showAges("#baby_label", i, babiesRoom);
2362                    }
2363
2364                    function showAges(labelPrefix, i, num) {
2365                        if (num > 0) {
2366                            $(labelPrefix + i).show();
2367                            ageSelectPrefix = (labelPrefix === "#baby_label") ? "#agesRoom_baby" : "#agesRoom";
2368
2369                            for (var j = 1; j <= num; j++) {
2370                                $(ageSelectPrefix + i + "_" + j).show();
2371                                if ($(ageSelectPrefix + i + "_" + j).parent().parent().hasClass('selectricWrapper')) {
2372                                    $(ageSelectPrefix + i + "_" + j).parent().parent().show();
2373                                }
2374                            }
2375                        }
2376                    }
2377                }
2378            });
2379        }
2380
2381        $(function () {
2382            updateAgesOptions(1);
2383
2384            setTimeout(() => {
2385                $(".children_selector select.room_selector, .babies_selector select.room_selector").change(function() {
2386                    window.is_children_selector_changed = true;
2387                });
2388            }, 1500);
2389
2390            $('.ages_mandatory_wrapper .button_mandatory_ages').click(function () {
2391                $(".booking_form .submit_button").click();
2392            });
2393        });
2394
2395
2396    })(jQuery);
2397</script>
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413</span>
2414
2415
2416
2417
2418
2419
2420
2421
2422<script>
2423    adult_tag = "Adulto";
2424    adults_tag = "Adultos";
2425    kid_tag = "Criança";
2426    kids_tag = "Crianças";
2427    baby_tag = "Bebé";
2428    babies_tag = "Bebés";
2429    no_dispo_text = "não disponível";
2430</script>
2430
2431
2432<script>
2433    night_tag = "Noite";
2434    nights_tag = "Noites";
2435</script>
2435
2436
2437<script>
2438    
2439</script>
2439
2440
2441<script>
2442    $('.entry_date_wrapper, .departure_date_wrapper').on('click', function () {
2443        if ($('.room_list_wrapper').hasClass('active')) {
2444            $('.room_list_wrapper').removeClass('active');
2445        }
2446    });
2447
2448    $(document).on('click', '.close_button_datepicker', function () {
2449        const overlay = $('.black_overlay_guests');
2450
2451        overlay.stop(true, true).fadeOut(300, function() {
2452            $(this).remove();
2453        });
2454    });
2455</script>
2455
2456
2457    <!-- RESCUESEEKER -->
2458    
2458<script async>
2459    ($ => {
2460        if (typeof window.only_once_rescueseeker == "undefined") {
2461            // Reserve synchronously so a concurrent re-injection does not fire a second load.
2462            window.only_once_rescueseeker = 1;
2463            $.getScript("https://rescueseeker-default-697653561069.europe-west1.run.app/static/rescue-seeker/common/js/rescue-seeker-widget.js?v=2")
2464                .done(function (script, textStatus) {
2465                    if (typeof RescueSeeker === 'undefined') {
2466                        console.error("RESCUE SEEKER: script loaded but global missing");
2467                        window.only_once_rescueseeker = undefined; // release so a later load can retry
2468                        return;
2469                    }
2470                    console.log("RESCUE SEEKER: Main rescue seeker script loaded!");
2471
2472                    
2473                        RescueSeeker.config.email_controller = 'hotel-webs';
2474                    
2475                    RescueSeeker.load('casas-novas', 'pt', 'paraty');
2476                })
2477                .fail(function (jqxhr, settings, exception) {
2478                    window.only_once_rescueseeker = undefined; // release on failure so a later load can retry
2479                    console.error("RESCUE SEEKER: Main rescue seeker script NOT loaded!");
2480                    console.error(exception);
2481                });
2482        }
2483    })(jQuery);
2484</script>
2484
2485
2486
2487
2488
2489
2490    <!-- RATECHECK -->
2491    
2492
2493
2494
2495                    </div>
2496                </div>
2497            </div>
2498        </section>
2499    
2500
2501    
2502        <section id="content">
2503            <a class="circulo"><div class="half_square"></div></a>
2504
2505
2506    <div class="wrapper_content banner_section_title ">
2507        <div class="container12">
2508            <div class="content_title text_center">
2509                <h1 class="title">
2510                    Minhas Reservas
2511                </h1>
2512            </div>
2513            
2514                <div class="desc lead one_column">
2515                    A partir desta p&aacute;gina poder&aacute; modificar ou cancelar a sua reserva se assim desejar. Verifique as condi&ccedil;&otilde;es da tarifa, j&aacute; que algumas tarifas n&atilde;o permitem modifica&ccedil;&otilde;es ou t&ecirc;m custos de cancelamento.<br><br>
2516
2517Qualquer d&uacute;vida, por favor entre em contacto o nosso departamento de reservas:<br><br>
2518
2519<strong>Telefone:</strong> +351 276 300 050 (Chamada para rede fixa nacional)<br>
2520<strong>Fax:</strong> +351 276 300 559<br>
2521<strong>Email:</strong> [email protected]
2522                </div>
2523            
2524        </div>
2525    </div>
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549    <div class="content_access" > 
2550<link rel="stylesheet" type="text/css" href="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/css/templates/secciones/styles_booking_widget_modify.css">
2551 
2552
2553
2554
2555
2556
2557
2558
2559<form name="contact" method="post" id="my-bookings-form" class="question_cancell">
2560    <input type="hidden" name="action" id="action" value="reservation"/>
2561
2562    <div id="my-bookings-form-fields">
2563        <label for="email" id="my-bookings-email-label">E-mail</label>
2564        <input type="text" id="emailInput" name="email" class="bordeInput" value=""/>
2565        <label for="localizador" id="my-bookings-localizador-label">Localizador</label>
2566        <input type="text" id="localizadorInput" name="localizador" class="bordeInput" value=""/>
2567        
2568
2569        
2570
2571        
2572
2573        
2574            <ul>
2575                
2576                     
2577                        <li>
2578                            <button class="modify-reservation" onClick="javascript:searchForReservation('onlineModification');return false;">Modificar reserva</button>
2579                        </li>
2580                     
2581                
2582
2583                <li>
2584                    <button class="searchForReservation" onClick="javascript:searchForReservation();return false;">Cancelar reserva</button>
2585                </li>
2586            </ul>
2587        
2588
2589        
2590    </div>
2591
2592    <div id="reservation" style="margin-top: 40px; clear: both"></div>
2593    <iframe id="iframe_modificator" style="display: none; margin-top: 40px; clear: both; width: 100%;border: 0px;"></iframe>
2594
2595    <div id="cancel-button-container">
2596	    <button type="submit" id="cancelButton">Cancelar reserva</button>
2597    </div>
2598    
2599</form>
2600
2601<div class="cancel_booking_questions" style="display: none;">
2602
2603    <span class="cancellation_reason_title">Indique-nos o motivo do cancelamento. Ajudar-nos-á a melhorar.</span>
2604
2605    
2606
2607    <div class="questions_labels">
2608        <div class="radio_wrapper_cancellation"><input type="radio" name="cancellation_reason" value="Não vou viajar"><label class="label_cancellation">Não vou viajar</label></div>
2609        <div class="radio_wrapper_cancellation"><input type="radio" name="cancellation_reason" value="Vou reservar outro hotel" placeholder_value="O hotel e por quê?"><label class="label_cancellation">Vou reservar outro hotel</label></div>
2610        <div class="radio_wrapper_cancellation"><input type="radio" name="cancellation_reason" value="Encontrei um preço mais baixo para este hotel" placeholder_value="onde?"><label class="label_cancellation">Encontrei um preço mais baixo para este hotel</label></div>
2611        <div class="radio_wrapper_cancellation"><input type="radio" name="cancellation_reason" value="Fiz outra reserva com alguma alteração"><label class="label_cancellation">Fiz outra reserva com alguma alteração</label></div>
2612        
2613        <div class="radio_wrapper_cancellation"><input type="radio" name="cancellation_reason" value="Outros" placeholder_value="Comentários">
2613<label class="label_cancellation">Outros</label></div>
2614    </div>
2615
2616    <textarea id="cancellation-reasons" rows="4" cols="75" style="display: none;"></textarea>
2617
2618    <div class="cancel_booking_reasons_wrapper">
2619        <button type="submit" id="cancelButton_reasons" disabled="disabled">Cancelar reserva</button>
2620    </div>
2621
2622</div>
2623
2624
2625
2626
2627
2628<script>
2629if (!window.jQuery) {
2630   var script = document.createElement('script');
2631   script.type = "text/javascript";
2632   script.src = "https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/jquery-1.7.min.js";
2633   document.getElementsByTagName('head')[0].appendChild(script);
2634
2635   var script = document.createElement('script');
2636   script.type = "text/javascript";
2637   script.src = "https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/spin.min.js";
2638   document.getElementsByTagName('head')[0].appendChild(script);
2639}
2640
2641
2642function openSearchInIframe(){
2643    var email = $('#emailInput').val();
2644    var localizador = $('#localizadorInput').val();
2645
2646    var src_iframe = "/utils?action=modifyReservationFromIframe&localizador=" + localizador + "&email=" + email;
2647    $('#iframe_modificator').css("display", "");
2648    $('#iframe_modificator').css("height", "1000px");
2649    $('#iframe_modificator').attr("src", src_iframe);
2650
2651    $("#reservation").css('display', 'none');
2652    $('#cancelButton').css('display', 'none');
2653    $('#modifyButton').css('display', 'block');
2654}
2655
2656function upgradingReservation() {
2657    const email = $('#emailInput').removeClass('error').val();
2658    const localizador = $('#localizadorInput').removeClass('error').val();
2659    if (!email || !localizador) {
2660        alert("Por favor, preencha todos os campos");
2661        return;
2662    }
2663
2664    const data = {
2665        email: email,
2666        localizador: localizador
2667    };
2668
2669    if ($("input[name=namespace_list_booking]").length) {
2670        data['namespaces_list'] = $("input[name=namespace_list_booking]").val();
2671    }
2672
2673    $.ajax({
2674        url: '/utils?action=getUpgradingLink',
2675        data: data,
2676        success: function(data, textStatus, jqXHR) {
2677            if (!data) {
2678                this.error(jqXHR, "error", "No data");
2679                return;
2680            };
2681
2682            console.log("redirecting to:" + data);
2683            window.location.href = data;
2684        },
2685        error: function() {
2686            alert("Não foi encontrada nenhuma reserva activa correspondente ao e-mail e localizador introduzidos");
2687        }
2688    });
2689}
2690
2691
2692function searchForReservation(buton_type){
2693
2694    var exists_policy_checkbox = $(".conditions_my_booking");
2695
2696    if (exists_policy_checkbox.length){
2697        var is_checked_policies = exists_policy_checkbox.is(':checked');
2698        if (!is_checked_policies) {
2699            exists_policy_checkbox.addClass('error');
2700            return
2701        } else {
2702            exists_policy_checkbox.removeClass('error');
2703        }
2704    }
2705
2706
2707    var email = $('#emailInput').removeClass('error').val(),
2708        localizador = $('#localizadorInput').removeClass('error').val();
2709
2710    //Try to retreive the info from other inputs
2711    if (!email && !localizador){
2712         var emailArray = $("input[name='email']"),
2713            localizadorArray = $("input[name='localizador']");
2714
2715        email = '';
2716        localizador = '';
2717        var aux;
2718
2719        for (i = 0; i < emailArray.length; i++) {
2720            aux = $(emailArray[i]).val();
2721            if (aux != '') {
2722                email = aux;
2723                break;
2724            }
2725        }
2726
2727        for (i = 0; i < localizadorArray.length; i++) {
2728            aux = $(localizadorArray[i]).val();
2729            if (aux != '') {
2730                localizador = aux;
2731                break;
2732            }
2733        }
2734    }
2735
2736    if(!(email && localizador) && (window.location.host.indexOf('localhost') == -1)){
2737        if (!email) $('#emailInput').addClass('error');
2738        if (!localizador) $('#localizadorInput').addClass('error');
2739        return
2740    }
2741
2742    var ajax_url_utils;
2743    if (buton_type && buton_type == "onlineModification") {
2744        ajax_url_utils = '/utils?action=modifyReservation';
2745    }
2746    else {
2747        ajax_url_utils = '/utils?action=searchReservation';
2748    }
2749
2750    
2751
2752    var data = {
2753        email: email,
2754        localizador: localizador
2755    };
2756
2757    if ($("input[name=namespace_list_booking]").length) {
2758        data['namespaces_list'] = $("input[name=namespace_list_booking]").val();
2759    }
2760
2761    $.ajax({
2762          url: ajax_url_utils,
2763          data: data,
2764          success: function(data) {
2765
2766             if (data != ''){
2767
2768                 $("#iframe_modificator").css('display', 'none');
2769                 $('#reservation').html(data);
2770
2771
2772                if(buton_type && buton_type == "modify"){
2773
2774                    $('html, body').animate({
2775                        scrollTop: $("#reservation").offset().top - 100
2776                    }, 1000);
2777                    $('#modifyButton').css('display', 'block');
2778                    $('#cancelButton').css('display', 'none');
2779                } else if(buton_type && buton_type == "search") {
2780                    $('html, body').animate({
2781                        scrollTop: $("#my-bookings-form-fields").offset().top - 100
2782                    }, 1000);
2783                    $('#modifyButton').css('display', 'block');
2784                    $('#cancelButton').css('display', 'none');
2785                }
2786                else{
2787                    $('html, body').animate({
2788                        scrollTop: $("#reservation").offset().top - 100
2789                    }, 1000);
2790                    $('#cancelButton').css('display', 'block');
2791                    $('#modifyButton').css('display', 'none');
2792                }
2793            } else {
2794                alert("Não foi encontrada nenhuma reserva activa correspondente ao e-mail e localizador introduzidos");
2795            }
2796
2797          }
2798        });
2799}
2800
2801$(function() {
2802    if(typeof getUrlParameter === "undefined") {
2803        console.log("no existe!!!");
2804        function getUrlParameter(sParam) {
2805            var sPageURL = window.location.search.substring(1);
2806            var sURLVariables = sPageURL.split('&');
2807            for(var i = 0; i < sURLVariables.length; i++){
2808                var sParameterName = sURLVariables[i].split('=');
2809                if (sParameterName[0] == sParam)
2810                    return sParameterName[1];
2811            }
2812
2813            return "";
2814        }
2815    }
2816
2817    var identifier_url = getUrlParameter("identifier"),
2818    email_url = getUrlParameter("email");
2819
2820    try {
2821        var data_encrypted = getUrlParameter("data_encrypted");
2822         var data_decrypted = atob(data_encrypted);
2823         var info_decrypted = data_decrypted.split('@@');
2824         if (info_decrypted && info_decrypted.length == 2 ){
2825             identifier_url = info_decrypted[0];
2826             email_url = info_decrypted[1];
2827         }
2828    } catch(err) { console.log("error decrypting"); }
2829
2830
2831
2832    if (identifier_url && email_url) {
2833        $("#my-bookings-form-fields").find("#emailInput").val(email_url);
2834        $("#my-bookings-form-fields").find("#localizadorInput").val(identifier_url);
2835    }
2836
2837    function cancelReservation(){
2838
2839        var comments_cancel = '';
2840
2841        comments_cancel = $("input[name='cancellation_reason']:checked").val();
2842
2843        $("textarea#cancellation-reasons").each(function(){
2844            if($(this).val() != ''){
2845                comments_cancel = comments_cancel + ": " + $(this).val();
2846            }
2847        });
2848
2849        var target_url_action = "/utils?action=cancelReservation";
2850
2851        
2852
2853        var params_to_send = {
2854            reservationKey: $('#reservationId').val(),
2855            comments: comments_cancel
2856        };
2857
2858        
2859
2860        var multiple_hotels_my_booking_namespace_selector = $(".multiple_hotels_my_booking_namespace");
2861        if (multiple_hotels_my_booking_namespace_selector.length){
2862            params_to_send['namespace'] = multiple_hotels_my_booking_namespace_selector.val();
2863        }
2864
2865        $.post(
2866            target_url_action, params_to_send,
2867            function(data) {
2868                $.fancybox.close();
2869                $("#cancellation-confirmation-button").css("display", "block");
2870                $("#cancelButton_reasons").show();
2871                $("#cancelButton_reasons").next(".spinner_loading_my_booking").remove();
2872
2873                let message = ''
2874                if (isJsonString(data)) {
2875                    data = JSON.parse(data);
2876                    dataLayer.push(data.datalayer);
2877                    message = data.message;
2878                } else {
2879                    message = data;
2880                }
2881
2882                var custom_popup_image = $("#custom_cancellation_popup");
2883                if (custom_popup_image.length) {
2884                    $.fancybox(custom_popup_image, {
2885                        afterClose: function() {
2886                            window.location.href = window.location.href;
2887                        }
2888                    });
2889                } else {
2890                    alert(message);
2891                    setTimeout(function(){
2892                        window.location.href = window.location.href;
2893                    });
2894                }
2895            }
2896        );
2897    }
2898
2899    function isJsonString(str) {
2900        try {
2901            JSON.parse(str);
2902        } catch (e) {
2903            return false;
2904        }
2905        return true;
2906    }
2907
2908    $("#cancelButton").click(function() {
2909        prepare_questions_cancellation();
2910        return false;
2911    });
2912
2913    $("#cancellation-cancellation-button").click(function() {
2914        $.fancybox.close();
2915    });
2916
2917
2918    var cancel_reason_mandatory = true;
2919    
2920
2921    $("#cancellation-confirmation-button").click(function() {
2922        var reasons_cancell = false;
2923        $("textarea#cancellation-reasons").each(function(){
2924            if($(this).val() != ''){
2925                reasons_cancell = true;
2926            }
2927        });
2928
2929        if (cancel_reason_mandatory && !reasons_cancell){
2930            alert($.i18n._("campo_obligatorio"));
2931            return false;
2932        }else{
2933            cancelReservation();
2934        }
2935    });
2936
2937    $("input[name='cancellation_reason']").change(function () {
2938        $("#cancelButton_reasons").removeAttr('disabled');
2939        var selected_placeholder = $(this).attr('placeholder_value');
2940
2941
2942        $(".cancel_booking_questions #cancellation-reasons").hide('500', function(){
2943            if (selected_placeholder) {
2944                $(".cancel_booking_questions #cancellation-reasons").attr('placeholder', selected_placeholder);
2945                $(".cancel_booking_questions #cancellation-reasons").show('500');
2946            }
2947        });
2948
2949    });
2950
2951    var opts = {
2952        lines: 13, // The number of lines to draw
2953        length: 4, // The length of each line
2954        width: 3, // The line thickness
2955        radius: 10, // The radius of the inner circle
2956        rotate: 0, // The rotation offset
2957        color: '#000000', // #rgb or #rrggbb
2958        speed: 1.5, // Rounds per second
2959        trail: 60, // Afterglow percentage
2960        shadow: false, // Whether to render a shadow
2961        hwaccel: false, // Whether to use hardware acceleration
2962        className: 'spinner', // The CSS class to assign to the spinner
2963        zIndex: 2e9, // The z-index (defaults to 2000000000)
2964        top: 'auto', // Top position relative to parent in px
2965        left: 'auto' // Left position relative to parent in px
2966    };
2967
2968
2969    $("#cancelButton_reasons").click(function () {
2970        if (!$(this).attr('disabled')) {
2971            $(this).hide();
2972            var spinner_html = $("<div class='spinner_loading_my_booking'></div>");
2973            spinner_html.insertAfter($(this));
2974            try{
2975                var spinner = new Spinner(opts).spin($(".spinner_loading_my_booking").get(0));
2976            }catch(err){
2977                console.log("Spinner couldn´t be initialized")
2978            }
2979            cancelReservation();
2980        }
2981    })
2982});
2983
2984
2985function prepare_questions_cancellation(){
2986
2987    $("#my-bookings-form-fields").slideUp();
2988    $("#reservation").slideUp();
2989    $("#cancel-button-container").slideUp();
2990    $(".cancel_booking_questions").slideDown(function(){
2991        $('html, body').animate({
2992            scrollTop: $(".cancel_booking_questions").offset().top - 100
2993        }, 1000);
2994    });
2995
2996
2997}
2998
2999</script>
2999
3000
3001
3002<style>
3003    .cancel_booking_questions {
3004        background: white;
3005        padding: 40px 55px;
3006        border: 1px solid lightgray;
3007        box-sizing: border-box;
3008        display: table;
3009        width: 100%;
3010    }
3011
3012    .spinner_loading_my_booking {
3013        margin-top: 30px;
3014    }
3015
3016    .cancellation_reason_title {
3017        font-size: 27px;
3018        margin-bottom: 15px;
3019    }
3020
3021    label.label_cancellation {
3022        font-size: 16px;
3023    }
3024
3025    .radio_wrapper_cancellation {
3026        margin-bottom: 7px;
3027    }
3028
3029    .radio_wrapper_cancellation input {
3030        margin: 0 17px 0 0;
3031        vertical-align: top;
3032        -webkit-appearance: none;
3033        -moz-appearance: none;
3034        appearance: none;
3035        width: 25px;
3036        height: 25px;
3037        border-radius: 99px;
3038        border: 1px solid lightgrey;
3039    }
3040
3041    .radio_wrapper_cancellation input:checked {
3042        background: #00ce00;
3043        background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAALlAAAC5QEb/l57AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAMlQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALJMpoAAAAEJ0Uk5TAAoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjnb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLji/uFbQAAAwdJREFUeNrFm9d26jAQRQ+9V0MIBKf3CulOj/7/o+5LyGVkQ1wkHb1hSd57gW0szQwAAPC2cnDaclve8kcvUFOnBrmpCjzBV04NclOllgy8QCmllO/MIOcrtWTww3dn8MNfGPzylfLzLvh5/xcYeIKv1LYDg/z2EjDw4Cvl1EDwlfIx+RYHdiwb5HcE7nsCtwYRfKcGkXxg8iUO7xZs8Qu7AvQ1WXSM3Rjo/PH/Ls1gz4pBYW8lHxh/WjfQ+J9j2b1p20Dnb+oDNIN9wwaF/T/4YYOiSX7xbz4w+hCDDgwaFA/EqT9G0cOsGcTkWzOIzQdG72LooRGD4qE46fto3eANzaCUnV/S+Bvrhxs3SMgPGRxlNCgdJeQDwzeDBhr/bRhnkmZwnMGgdJyCHzYop+WX0/GB4asRA43/Oow/dSANTlIZlE8kf5BksgGDTHwDBhn5wOBFnOC0kmx65VRMfxkk/wq9LAY630tzEWkGZwkMKmcG+Nq6NYmBxg9S8lMbGOMDfWlwXo0zqXou+X1kaP3nxAYa/zkTP4WBYT7QkwYXfxhULyS/Bzg1sMAHek/SoLZ6aE3yn4zwQwaXKw1ql1b4QDeegc7vwljrPsYw0PiPBvkhg6sIg9qVRX7YoK4PqNvlA50HAbjWDOrXovuhAzg1cMBfa+CED3TuBeamseho3IiOe0t8oB1toPPbgFMDh3ygfSdgswbQmIlDd1b5EQaO+UBLM9D4LVhvrVu1st064K8zcMNfbeCKD7TmUfy5Mz7QjDCYNwGmgVs+0JS3n5o55tMF2D8B+yJk34bsBxH7Ucz+M2L/HbNfSNivZOyXUvZrOXthwl6asRen7OU5e4OCvUXD3qRib9OxNyrZW7XszWr2dj07YMEO2bCDVuywHTtwyQ7dsoPX7PA9O4GBncLBTmJhp/GwE5nYqVzsZDZ2Oh87oZGd0slOamWn9bITm9mp3ezkdnZ6P7vAgV3iwS5yYZf5sAud2KVe7GI3erkfveCRXvJJL3rll/3yC5/5pd/84ndm+f8/Ei19Fnqb9F0AAAAASUVORK5CYII=) no-repeat center;
3044        background-size: cover;
3045        border: 2px solid lightgray;
3046    }
3047
3048    .radio_wrapper_cancellation .label_cancellation {
3049        margin-top: 4px;
3050        display: inline-block;
3051    }
3052
3053    .cancel_booking_reasons_wrapper #cancelButton_reasons {
3054        width: 260px;
3055        color: white;
3056        padding: 10px 0;
3057        border: none;
3058        font-size: 18px;
3059        cursor: pointer;
3060        background: #5f5f5f;
3061        float: right;
3062    }
3063
3064    .cancel_booking_reasons_wrapper #cancelButton_reasons[disabled]{
3065        opacity: 0.2;
3066    }
3067
3068    .cancel_booking_reasons_wrapper{
3069        display: table;
3070        width: 50%;
3071        margin-top: 20px;
3072            float: right;
3073    }
3074
3075    .cancel_booking_questions #cancellation-reasons{
3076        resize: none;
3077        margin-top: 20px;
3078        display: block;
3079        border: 1px solid lightgrey;
3080        float: left;
3081    width: 500px;
3082    }
3083
3084    #my-bookings-form input.error {
3085        border: 1px solid red;
3086    }
3087</style></div>
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103        </section>
3104    
3105
3106    
3107
3108
3109    <div class="newsletter_wrapper" style="background-image: url(https://cdn2.paraty.es/casas-novas/images/a99fe0a32812757=s1900)">
3110    <div class="newsletter_container container12">
3111        <div class="newsletter_title">Newsletter</div>
3112        <div class="newsletter_description">Subscreva e siga-nos!</div>
3113        
3114            <form class="newsletter_form has_social" action="/utils?action=newsletter" method="post">
3115                
3116                
3117                
3118                <input id="suscEmail" class="input_email" type="text" name="suscEmail" placeholder="Introduza o seu e-mail" aria-required="true" aria-describedby="email-help" />
3119                
3120
3121                <button type="submit" class="button_newsletter" style="border:none"><span>ENVIAR</span></button>
3122
3123            
3124                
3125                    <div class="check_newsletter">
3126                        <div class="newsletter_checkbox">
3127                            <input class="check_privacy" id="privacy" name="privacy" type="checkbox" value="privacy"/>
3128                            <label for="privacy"> <a data-fancybox
3129                                                     data-options='{"caption" : "Eu li e aceito a política de privacidade", "src" : "/pt/?sectionContent=politica-de-privacidad.html", "type" : "iframe", "width" : "100%", "max-width" : "100%"}'
3130                                                     data-width="1200"
3131                                                     class="myFancyPopup fancybox.iframe newsletter_popup"
3132                                                     href="pt/?sectionContent=politica-de-privacidad.html"
3133                                                     rel="nofollow">Eu li e aceito a política de privacidade</a>
3134                            </label>
3135
3136                        </div>
3137                    </div>
3138                
3139                
3140
3141                <div class="check_newsletter">
3142                    <div class="newsletter_checkbox">
3143                        <input class="check_privacy" id="promotions" name="promotions" type="checkbox" value="privacy"/>
3144                        <label for="promotions">Autorizo o tratamento dos meus dados para que me enviem promoções, ofertas e outras comunicações próprias.</label>
3145                        
3146                    </div>
3147                </div>
3148            
3149            
3150            </form>
3151        
3152        
3153            <nav class="social_newsletter" aria-label="Social media">
3154                
3155                    <a href="https://www.facebook.com/CasasNovasHotel" target="_blank" rel="nofollow" aria-label="Facebook">
3156                        <i class="fa fa-facebook" aria-hidden="true"></i>
3157                    </a>
3158                
3159                
3160                
3161                
3162                
3163                
3164                
3165                    <a href="http://www.instagram.com/casasnovashotel" target="_blank" rel="nofollow" aria-label="Instagram">
3166                        <i class="fa fa-instagram" aria-hidden="true"></i>
3167                    </a>
3168                
3169                
3170                
3171                
3172                
3173                
3174            </nav>
3175        
3176    </div>
3177</div>
3178
3179
3180
3181<script async type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/jquery.validate.js" crossorigin="anonymous" integrity="sha512-J1+XdM+HESLdslJXNUFo7LYvRJzmyO8VlBZteQJhPYMXpB+M9J8zhkL0GbyiTO4t6YFDcG5TSGq4KSa0NGB6Jw=="></script>
vendor: 1 bytes, line 3181
3181
3182<script type="text/javascript">
3183    $(window).on('load', function () {
3184        if (typeof newsletter_launched !== 'undefined' && newsletter_launched === true) {
3185            return;
3186        }
3187
3188        $(".newsletter_form").each(function() {
3189           $(this).validate({
3190               rules: {
3191                   privacy: "required",
3192                   promotions: "required",
3193                   suscEmail: {
3194                       required: true,
3195                       email: true
3196                   },
3197                   suscName: {
3198                       required: true
3199                   },
3200                   suscSurname: {
3201                       required: true
3202                   },
3203                   suscDate: {
3204                       required: true,
3205                       date: true
3206                   },
3207                   suscTelephone: {
3208                       required: true,
3209                       date: true
3210                   }
3211               },
3212               messages: {
3213                   suscEmail: {
3214                       required: "Este campo é obrigatório",
3215                       email: "O valor deste campo é inválido"
3216                   },
3217                   suscName: {
3218                       required: "Este campo é obrigatório"
3219                   },
3220                   suscSurname: {
3221                       required: "Este campo é obrigatório"
3222                   },
3223                   suscDate: {
3224                       required: "Este campo é obrigatório",
3225                       date: "O valor deste campo é inválido"
3226                   },
3227                   suscTelephone: {
3228                       required: "Este campo é obrigatório",
3229                       date: "O valor deste campo é inválido"
3230                   },
3231                   privacy: "Este campo é obrigatório",
3232                   promotions: "Este campo é obrigatório",
3233               },
3234               highlight: function (input) {
3235                   $(input).parent().find("a").addClass('error_class');
3236                   $(input).parent().find("label").addClass('error_class');
3237                   $(input).parent().find("#suscEmail").addClass('error_class');
3238                   $(input).parent().find("#suscName").addClass('error_class');
3239                   $(input).parent().find("#suscSurname").addClass('error_class');
3240                   $(input).parent().find("#suscDate").addClass('error_class');
3241                   $(input).parent().find("#suscTelephone").addClass('error_class');
3242               },
3243               errorPlacement: function (error, element) {
3244                   //this keeps enable the validation but hides the error message
3245               }
3246           });
3247        });
3248
3249        $(".button_newsletter").each(function() {
3250            $(this).unbind('click').click(function () {
3251                var clicked_button = $(this),
3252                    form_newsletter = clicked_button.parent(".newsletter_form");
3253
3254                form_newsletter.on('submit', function(event) {
3255                    event.preventDefault();
3256                });
3257
3258                if (form_newsletter.valid()) {
3259                    if (!form_newsletter.find("#g-recaptcha-response").length || form_newsletter.find("#g-recaptcha-response").val()) {
3260                        $.post("/utils?action=newsletter&language=PORTUGUESE",
3261                            {
3262                                'email': form_newsletter.find("#suscEmail").val(),
3263                                'name': form_newsletter.find("#suscName").val(),
3264                                'surname': form_newsletter.find("#suscSurname").val(),
3265                                'date': form_newsletter.find("#suscDate").val(),
3266                                'telephone': form_newsletter.find("#suscTelephone").val(),
3267                                'custom_tags': '',
3268                                'g-recaptcha-response': form_newsletter.find("#g-recaptcha-response").val()
3269                            },
3270
3271                            function (data) {
3272                                
3273                                    alert("Obrigado por subscrever a nossa newsletter");
3274                                
3275
3276                                $("#suscEmail").val("");
3277                                $("#suscName").val("");
3278                                $("#suscDate").val("");
3279                                $("#suscTelephone").val("");
3280                            }
3281                        );
3282                    } else {
3283                        form_newsletter.find(".g-recaptcha > div").css('border', '1px solid red');
3284                    }
3285                } else {
3286                    
3287                        alert("* Campos de preenchimento obrigatório ");
3288                        console.log("invalid");
3289                    
3290                }
3291
3292            });
3293        });
3294
3295        newsletter_launched = true;
3296
3297        var script_fa_tag = document.createElement('script');
3298        script_fa_tag.src = 'https://kit.fontawesome.com/d8b9925505.js';
3299        script_fa_tag.setAttribute("defer", "");
3300
3301        document.head.appendChild(script_fa_tag);
3302    });
3303</script>
3303
3304
3305<footer>
3306    <div class="wrapper_content footer_content">
3307        <div class="container12">
3308            
3309            <div class="footer_columns_wrapper">
3310                
3311                    <div class="hotels_column">
3312                        
3313                        
3314                        
3315                            <div class="desc">
3316                                Rua Visconde do Rosário, Nº1<br>
33175400-727, Redondelo<br>
3318Casas Novas, Portugal<br>
3319<span class="phone"><a href="tel:+351276300050">Tel: +351 276 300 050</span><br>
3320<small>Chamada para rede fixa nacional</small><br>
3321<a href="mailto:[email protected]">[email protected]</a>
3322                            </div>
3323                        
3324                        
3325                    </div>
3326                
3327                    <div class="hotels_column">
3328                        
3329                        
3330                        
3331                        
3332                    </div>
3333                
3334                    <div class="hotels_column">
3335                        
3336                        
3337                        
3338                            <div class="desc">
3339                                <ul class="menu_links_column">
3340<li><a href="/">Início</a></li>
3341<li><a href="/hotel.html">Hotel</a></li>
3342<li><a href="/quartos.html">Quartos</a></li>
3343<li><a href="/restaurante.html">Restaurante</a></li>
3344<li><a href="/health-club.html">Health Club</a></li>
3345<li><a href="/eventos.html">Eventos</a></li>
3346<li><a href="/ofertas.html">Ofertas</a></li>
3347<li><a href="/galeria.html">Galeria</a></li>
3348<li><a href="/localizacao.html">Localização</a></li>
3349<li><a href="/minhas-reservas.html">Reservas</a></li>
3350</ul>
3351
3352                            </div>
3353                        
3354                        
3355                    </div>
3356                
3357            </div>
3358        </div>
3359        
3360        <div class="footer_legal_text_wrapper">
3361            <div class="container12">
3362                <div class="footer_links_wrapper">
3363                    
3364                        <a href="/pt/?sectionContent=politica-de-privacidad.html"
3365                           class="myFancyPopup fancybox.iframe">Política de Privacidade</a> |
3366                    
3367                        <a href="/pt/?sectionContent=politica-de-cookies.html"
3368                           class="myFancyPopup fancybox.iframe">Política de Cookies</a> |
3369                    
3370                        <a href="/pt/?sectionContent=condiciones-de-reserva.html"
3371                           class="myFancyPopup fancybox.iframe">Condições de Reserva</a> |
3372                    
3373                        <a href="/pt/?sectionContent="
3374                           class="myFancyPopup fancybox.iframe">Gerir cookies</a> |
3375                    
3376                    <a target="_blank" href="https://www.paratytech.com/motor-de-reservas.html"
3377                       title="Motor de Reservas">Motor de Reservas</a> |
3378                    <a target="_blank" href="/sitemap.xml" title="">Site Map</a> |
3379                    <a target="_blank" href="/rss.xml">RSS</a>
3380                </div>
3381
3382                
3383                    <div class="legal_text"><br><br>
3384
3385<a href="https://www.zankyou.pt/f/hotel-rural-casas-novas-2912"><img width="100" alt="Casas Novas Countryside Hotel - Zankyou" src="https://asset1.zankyou.com/img/sections/badgets/ziwa-winners/badge-ziwa2022.png"></a> <br>
3386
3387<a class="footer_book_image" href="https://www.hotelcasasnovas.com/cdn/files/Ficha%20%20tecnica%20Projecto%20hr.pdf" target="_blank"><img src="https://cdn2.paraty.es/casas-novas/images/c56c03e2d5eae49=s2000"></a><br><br>
3388
3389<p>
3390&copy; Copyright 2026 | Casas Novas Countryside Hotel SPA &amp; Events</p>
3391<br>RNET: 1358<br><br>
3392<a class="footer_book_image" href="https://www.livroreclamacoes.pt/inicio" target="_blank"><img src="https://lh3.googleusercontent.com/xj6a_K6A5rOPSF5LdurAjiXix2iSZjqr2GrwowdFTL-Dw6j99OdFdQ_LZHrl7ltgm8OHX4Vy3wm-rkrwrgmDPhmWQog8hL1EAYc"></a><br>
3393</div>
3394                
3395            </div>
3396        </div>
3397    </div>
3398</footer>
3399
3400
3401    
vendor: 6,195 bytes, lines 3401-3541
3401<script>(function (r, G, f, v) {
3402    var J = f("html"), n = f(r), p = f(G), b = f.fancybox = function () {
3403        b.open.apply(this, arguments)
3404    }, I = navigator.userAgent.match(/msie/i), B = null, s = G.createTouch !== v, t = function (a) {
3405        return a && a.hasOwnProperty && a instanceof f
3406    }, q = function (a) {
3407        return a && "string" === f.type(a)
3408    }, E = function (a) {
3409        return q(a) && 0 < a.indexOf("%")
3410    }, l = function (a, d) {
3411        var e = parseInt(a, 10) || 0;
3412        d && E(a) && (e *= b.getViewport()[d] / 100);
3413        return Math.ceil(e)
3414    }, w = function (a, b) {
3415        return l(a, b) + "px"
3416    };
3417    f.extend(b, {
3418        version: "2.1.5",
3419        defaults: {
3420            padding: 15,
3421            margin: 20,
3422            width: 800,
3423            height: 600,
3424            minWidth: 100,
3425            minHeight: 100,
3426            maxWidth: 9999,
3427            maxHeight: 9999,
3428            pixelRatio: 1,
3429            autoSize: !0,
3430            autoHeight: !1,
3431            autoWidth: !1,
3432            autoResize: !0,
3433            autoCenter: !s,
3434            fitToView: !0,
3435            aspectRatio: !1,
3436            topRatio: 0.5,
3437            leftRatio: 0.5,
3438            scrolling: "auto",
3439            wrapCSS: "",
3440            arrows: !0,
3441            closeBtn: !0,
3442            closeClick: !1,
3443            nextClick: !1,
3444            mouseWheel: !0,
3445            autoPlay: !1,
3446            playSpeed: 3E3,
3447            preload: 3,
3448            modal: !1,
3449            loop: !0,
3450            ajax: {dataType: "html", headers: {"X-fancyBox": !0}},
3451            iframe: {scrolling: "auto", preload: !0},
3452            swf: {wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always"},
3453            keys: {
3454                next: {13: "left", 34: "up", 39: "left", 40: "up"},
3455                prev: {8: "right", 33: "down", 37: "right", 38: "down"},
3456                close: [27],
3457                play: [32],
3458                toggle: [70]
3459            },
3460            direction: {next: "left", prev: "right"},
3461            scrollOutside: !0,
3462            index: 0,
3463            type: null,
3464            href: null,
3465            content: null,
3466            title: null,
3467            tpl: {
3468                wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
3469                image: '<img class="fancybox-image" src="{href}" alt="" />',
3470                iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (I ? ' allowtransparency="true"' : "") + "></iframe>",
3471                error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
3472                closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
3473                next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
3474                prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
3475            },
3476            openEffect: "fade",
3477            openSpeed: 250,
3478            openEasing: "swing",
3479            openOpacity: !0,
3480            openMethod: "zoomIn",
3481            closeEffect: "fade",
3482            closeSpeed: 250,
3483            closeEasing: "swing",
3484            closeOpacity: !0,
3485            closeMethod: "zoomOut",
3486            nextEffect: "elastic",
3487            nextSpeed: 250,
3488            nextEasing: "swing",
3489            nextMethod: "changeIn",
3490            prevEffect: "elastic",
3491            prevSpeed: 250,
3492            prevEasing: "swing",
3493            prevMethod: "changeOut",
3494            helpers: {overlay: !0, title: !0},
3495            onCancel: f.noop,
3496            beforeLoad: f.noop,
3497            afterLoad: f.noop,
3498            beforeShow: f.noop,
3499            afterShow: f.noop,
3500            beforeChange: f.noop,
3501            beforeClose: f.noop,
3502            afterClose: f.noop
3503        },
3504        group: {},
3505        opts: {},
3506        previous: null,
3507        coming: null,
3508        current: null,
3509        isActive: !1,
3510        isOpen: !1,
3511        isOpened: !1,
3512        wrap: null,
3513        skin: null,
3514        outer: null,
3515        inner: null,
3516        player: {timer: null, isActive: !1},
3517        ajaxLoad: null,
3518        imgPreload: null,
3519        transitions: {},
3520        helpers: {},
3521        open: function (a, d) {
3522            if (a && (f.isPlainObject(d) || (d = {}), !1 !== b.close(!0))) return f.isArray(a) || (a = t(a) ? f(a).get() : [a]), f.each(a, function (e, c) {
3523                var k = {}, g, h, j, m, l;
3524                "object" === f.type(c) && (c.nodeType && (c = f(c)), t(c) ? (k = {
3525                    href: c.data("fancybox-href") || c.attr("href"),
3526                    title: c.data("fancybox-title") || c.attr("title"),
3527                    isDom: !0,
3528                    element: c
3529                }, f.metadata && f.extend(!0, k, c.metadata())) : k = c);
3530                g = d.href || k.href || (q(c) ? c : null);
3531                h = d.title !== v ? d.title : k.title || "";
3532                m = (j = d.content || k.content) ? "html" : d.type || k.type;
3533                !m && k.isDom && (m = c.data("fancybox-type"), m || (m = (m = c.prop("class").match(/fancybox\.(\w+)/)) ? m[1] : null));
3534                q(g) && (m || (b.isImage(g) ? m = "image" : b.isSWF(g) ? m = "swf" : "#" === g.charAt(0) ? m = "inline" : q(c) && (m = "html", j = c)), "ajax" === m && (l = g.split(/\s+/, 2), g = l.shift(), l = l.shift()));
3535                j || ("inline" === m ? g ? j = f(q(g) ? g.replace(/.*(?=#[^\s]+$)/, "") : g) : k.isDom && (j = c) : "html" === m ? j = g : !m && (!g && k.isDom) && (m = "inline", j = c));
3536                f.extend(k, {href: g, type: m, content: j, title: h, selector: l});
3537                a[e] = k
3538            }), b.opts = f.extend(!0, {}, b.defaults, d), d.keys !== v && (b.opts.keys = d.keys ? f.extend({}, b.defaults.keys, d.keys) : !1), b.group = a, b._start(b.opts.index)
3539        },
3540        cancel: function () {
3541            var a = b.coming;
3542            a && !1 !== b.trigger("onCancel") && (b.hideLoading(), b.ajaxLoad && b.ajaxLoad.abort(), b.ajaxLoad = null, b.imgPreload && (b.imgPreload.onload = b.imgPreload.onerror = null), a.wrap && a.wrap.stop(!0, !0).trigger("onReset").remove(), b.coming = null, b.current || b._afterZoomOut(a))
3543        },
3544        close: function (a) {
3545            b.cancel();
3546            !1 !== b.trigger("beforeClose") && (b.unbindEvents(), b.isActive && (!b.isOpen || !0 === a ? (f(".fancybox-wrap").stop(!0).trigger("onReset").remove(), b._afterZoomOut()) : (b.isOpen = b.isOpened = !1, b.isClosing = !0, f(".fancybox-item, .fancybox-nav").remove(), b.wrap.stop(!0, !0).removeClass("fancybox-opened"), b.transitions[b.current.closeMethod]())))
3547        },
3548        play: function (a) {
3549            var d = function () {
3550                clearTimeout(b.player.timer)
3551            }, e = function () {
3552                d();
3553                b.current && b.player.isActive && (b.player.timer = setTimeout(b.next, b.current.playSpeed))
3554            }, c = function () {
3555                d();
3556                p.unbind(".player");
3557                b.player.isActive = !1;
3558                b.trigger("onPlayEnd")
3559            };
3560            if (!0 === a || !b.player.isActive && !1 !== a) {
3561                if (b.current && (b.current.loop || b.current.index < b.group.length - 1)) b.player.isActive = !0, p.bind({
3562                    "onCancel.player beforeClose.player": c,
3563                    "onUpdate.player": e,
3564                    "beforeLoad.player": d
3565                }), e(), b.trigger("onPlayStart")
3566            } else c()
3567        },
3568        next: function (a) {
3569            var d = b.current;
3570            d && (q(a) || (a = d.direction.next), b.jumpto(d.index + 1, a, "next"))
3571        },
3572        prev: function (a) {
3573            var d = b.current;
3574            d && (q(a) || (a = d.direction.prev), b.jumpto(d.index - 1, a, "prev"))
3575        },
3576        jumpto: function (a, d, e) {
3577            var c = b.current;
3578            c && (a = l(a), b.direction = d || c.direction[a >= c.index ? "next" : "prev"], b.router = e || "jumpto", c.loop && (0 > a && (a = c.group.length + a % c.group.length), a %= c.group.length), c.group[a] !== v && (b.cancel(), b._start(a)))
3579        },
3580        reposition: function (a, d) {
3581            var e = b.current, c = e ? e.wrap : null, k;
3582            c && (k = b._getPosition(d), a && "scroll" === a.type ? (delete k.position, c.stop(!0, !0).animate(k, 200)) : (c.css(k), e.pos = f.extend({}, e.dim, k)))
3583        },
3584        update: function (a) {
3585            var d = a && a.type, e = !d || "orientationchange" === d;
3586            e && (clearTimeout(B), B = null);
3587            b.isOpen && !B && (B = setTimeout(function () {
3588                var c = b.current;
3589                c && !b.isClosing && (b.wrap.removeClass("fancybox-tmp"), (e || "load" === d || "resize" === d && c.autoResize) && b._setDimension(), "scroll" === d && c.canShrink || b.reposition(a), b.trigger("onUpdate"), B = null)
3590            }, e && !s ? 0 : 300))
3591        },
3592        toggle: function (a) {
3593            b.isOpen && (b.current.fitToView = "boolean" === f.type(a) ? a : !b.current.fitToView, s && (b.wrap.removeAttr("style").addClass("fancybox-tmp"), b.trigger("onUpdate")), b.update())
3594        },
3595        hideLoading: function () {
3596            p.unbind(".loading");
3597            f("#fancybox-loading").remove()
3598        },
3599        showLoading: function () {
3600            var a, d;
3601            b.hideLoading();
3602            a = f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");
3603            p.bind("keydown.loading", function (a) {
3604                if (27 === (a.which || a.keyCode)) a.preventDefault(), b.cancel()
3605            });
3606            b.defaults.fixed || (d = b.getViewport(), a.css({
3607                position: "absolute",
3608                top: 0.5 * d.h + d.y,
3609                left: 0.5 * d.w + d.x
3610            }))
3611        },
3612        getViewport: function () {
3613            var a = b.current && b.current.locked || !1, d = {x: n.scrollLeft(), y: n.scrollTop()};
3614            a ? (d.w = a[0].clientWidth, d.h = a[0].clientHeight) : (d.w = s && r.innerWidth ? r.innerWidth : n.width(), d.h = s && r.innerHe
vendor: 17,143 bytes, lines 3614-3920
3614ight ? r.innerHeight : n.height());
3615            return d
3616        },
3617        unbindEvents: function () {
3618            b.wrap && t(b.wrap) && b.wrap.unbind(".fb");
3619            p.unbind(".fb");
3620            n.unbind(".fb")
3621        },
3622        bindEvents: function () {
3623            var a = b.current, d;
3624            a && (n.bind("orientationchange.fb" + (s ? "" : " resize.fb") + (a.autoCenter && !a.locked ? " scroll.fb" : ""), b.update), (d = a.keys) && p.bind("keydown.fb", function (e) {
3625                var c = e.which || e.keyCode, k = e.target || e.srcElement;
3626                if (27 === c && b.coming) return !1;
3627                !e.ctrlKey && (!e.altKey && !e.shiftKey && !e.metaKey && (!k || !k.type && !f(k).is("[contenteditable]"))) && f.each(d, function (d, k) {
3628                    if (1 < a.group.length && k[c] !== v) return b[d](k[c]), e.preventDefault(), !1;
3629                    if (-1 < f.inArray(c, k)) return b[d](), e.preventDefault(), !1
3630                })
3631            }), f.fn.mousewheel && a.mouseWheel && b.wrap.bind("mousewheel.fb", function (d, c, k, g) {
3632                for (var h = f(d.target || null), j = !1; h.length && !j && !h.is(".fancybox-skin") && !h.is(".fancybox-wrap");) j = h[0] && !(h[0].style.overflow && "hidden" === h[0].style.overflow) && (h[0].clientWidth && h[0].scrollWidth > h[0].clientWidth || h[0].clientHeight && h[0].scrollHeight > h[0].clientHeight), h = f(h).parent();
3633                if (0 !== c && !j && 1 < b.group.length && !a.canShrink) {
3634                    if (0 < g || 0 < k) b.prev(0 < g ? "down" : "left"); else if (0 > g || 0 > k) b.next(0 > g ? "up" : "right");
3635                    d.preventDefault()
3636                }
3637            }))
3638        },
3639        trigger: function (a, d) {
3640            var e, c = d || b.coming || b.current;
3641            if (c) {
3642                f.isFunction(c[a]) && (e = c[a].apply(c, Array.prototype.slice.call(arguments, 1)));
3643                if (!1 === e) return !1;
3644                c.helpers && f.each(c.helpers, function (d, e) {
3645                    if (e && b.helpers[d] && f.isFunction(b.helpers[d][a])) b.helpers[d][a](f.extend(!0, {}, b.helpers[d].defaults, e), c)
3646                });
3647                p.trigger(a)
3648            }
3649        },
3650        isImage: function (a) {
3651            return q(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)
3652        },
3653        isSWF: function (a) {
3654            return q(a) && a.match(/\.(swf)((\?|#).*)?$/i)
3655        },
3656        _start: function (a) {
3657            var d = {}, e, c;
3658            a = l(a);
3659            e = b.group[a] || null;
3660            if (!e) return !1;
3661            d = f.extend(!0, {}, b.opts, e);
3662            e = d.margin;
3663            c = d.padding;
3664            "number" === f.type(e) && (d.margin = [e, e, e, e]);
3665            "number" === f.type(c) && (d.padding = [c, c, c, c]);
3666            d.modal && f.extend(!0, d, {
3667                closeBtn: !1,
3668                closeClick: !1,
3669                nextClick: !1,
3670                arrows: !1,
3671                mouseWheel: !1,
3672                keys: null,
3673                helpers: {overlay: {closeClick: !1}}
3674            });
3675            d.autoSize && (d.autoWidth = d.autoHeight = !0);
3676            "auto" === d.width && (d.autoWidth = !0);
3677            "auto" === d.height && (d.autoHeight = !0);
3678            d.group = b.group;
3679            d.index = a;
3680            b.coming = d;
3681            if (!1 === b.trigger("beforeLoad")) b.coming = null; else {
3682                c = d.type;
3683                e = d.href;
3684                if (!c) return b.coming = null, b.current && b.router && "jumpto" !== b.router ? (b.current.index = a, b[b.router](b.direction)) : !1;
3685                b.isActive = !0;
3686                if ("image" === c || "swf" === c) d.autoHeight = d.autoWidth = !1, d.scrolling = "visible";
3687                "image" === c && (d.aspectRatio = !0);
3688                "iframe" === c && s && (d.scrolling = "scroll");
3689                d.wrap = f(d.tpl.wrap).addClass("fancybox-" + (s ? "mobile" : "desktop") + " fancybox-type-" + c + " fancybox-tmp " + d.wrapCSS).appendTo(d.parent || "body");
3690                f.extend(d, {
3691                    skin: f(".fancybox-skin", d.wrap),
3692                    outer: f(".fancybox-outer", d.wrap),
3693                    inner: f(".fancybox-inner", d.wrap)
3694                });
3695                f.each(["Top", "Right", "Bottom", "Left"], function (a, b) {
3696                    d.skin.css("padding" + b, w(d.padding[a]))
3697                });
3698                b.trigger("onReady");
3699                if ("inline" === c || "html" === c) {
3700                    if (!d.content || !d.content.length) return b._error("content")
3701                } else if (!e) return b._error("href");
3702                "image" === c ? b._loadImage() : "ajax" === c ? b._loadAjax() : "iframe" === c ? b._loadIframe() : b._afterLoad()
3703            }
3704        },
3705        _error: function (a) {
3706            f.extend(b.coming, {
3707                type: "html",
3708                autoWidth: !0,
3709                autoHeight: !0,
3710                minWidth: 0,
3711                minHeight: 0,
3712                scrolling: "no",
3713                hasError: a,
3714                content: b.coming.tpl.error
3715            });
3716            b._afterLoad()
3717        },
3718        _loadImage: function () {
3719            var a = b.imgPreload = new Image;
3720            a.onload = function () {
3721                this.onload = this.onerror = null;
3722                b.coming.width = this.width / b.opts.pixelRatio;
3723                b.coming.height = this.height / b.opts.pixelRatio;
3724                b._afterLoad()
3725            };
3726            a.onerror = function () {
3727                this.onload = this.onerror = null;
3728                b._error("image")
3729            };
3730            a.src = b.coming.href;
3731            !0 !== a.complete && b.showLoading()
3732        },
3733        _loadAjax: function () {
3734            var a = b.coming;
3735            b.showLoading();
3736            b.ajaxLoad = f.ajax(f.extend({}, a.ajax, {
3737                url: a.href, error: function (a, e) {
3738                    b.coming && "abort" !== e ? b._error("ajax", a) : b.hideLoading()
3739                }, success: function (d, e) {
3740                    "success" === e && (a.content = d, b._afterLoad())
3741                }
3742            }))
3743        },
3744        _loadIframe: function () {
3745            var a = b.coming,
3746                d = f(a.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", s ? "auto" : a.iframe.scrolling).attr("src", a.href);
3747            f(a.wrap).bind("onReset", function () {
3748                try {
3749                    f(this).find("iframe").hide().attr("src", "//about:blank").end().empty()
3750                } catch (a) {
3751                }
3752            });
3753            a.iframe.preload && (b.showLoading(), d.one("load", function () {
3754                f(this).data("ready", 1);
3755                s || f(this).bind("load.fb", b.update);
3756                f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();
3757                b._afterLoad()
3758            }));
3759            a.content = d.appendTo(a.inner);
3760            a.iframe.preload || b._afterLoad()
3761        },
3762        _preloadImages: function () {
3763            var a = b.group, d = b.current, e = a.length, c = d.preload ? Math.min(d.preload, e - 1) : 0, f, g;
3764            for (g = 1; g <= c; g += 1) f = a[(d.index + g) % e], "image" === f.type && f.href && ((new Image).src = f.href)
3765        },
3766        _afterLoad: function () {
3767            var a = b.coming, d = b.current, e, c, k, g, h;
3768            b.hideLoading();
3769            if (a && !1 !== b.isActive) if (!1 === b.trigger("afterLoad", a, d)) a.wrap.stop(!0).trigger("onReset").remove(), b.coming = null; else {
3770                d && (b.trigger("beforeChange", d), d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());
3771                b.unbindEvents();
3772                e = a.content;
3773                c = a.type;
3774                k = a.scrolling;
3775                f.extend(b, {wrap: a.wrap, skin: a.skin, outer: a.outer, inner: a.inner, current: a, previous: d});
3776                g = a.href;
3777                switch (c) {
3778                    case "inline":
3779                    case "ajax":
3780                    case "html":
3781                        a.selector ? e = f("<div>").html(e).find(a.selector) : t(e) && (e.data("fancybox-placeholder") || e.data("fancybox-placeholder", f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()), e = e.show().detach(), a.wrap.bind("onReset", function () {
3782                            f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1)
3783                        }));
3784                        break;
3785                    case "image":
3786                        e = a.tpl.image.replace("{href}", g);
3787                        break;
3788                    case "swf":
3789                        e = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + g + '"></param>', h = "", f.each(a.swf, function (a, b) {
3790                            e += '<param name="' + a + '" value="' + b + '"></param>';
3791                            h += " " + a + '="' + b + '"'
3792                        }), e += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>"
3793                }
3794                (!t(e) || !e.parent().is(a.inner)) && a.inner.append(e);
3795                b.trigger("beforeShow");
3796                a.inner.css("overflow", "yes" === k ? "scroll" : "no" === k ? "hidden" : k);
3797                b._setDimension();
3798                b.reposition();
3799                b.isOpen = !1;
3800                b.coming = null;
3801                b.bindEvents();
3802                if (b.isOpened) {
3803                    if (d.prevMethod) b.transitions[d.prevMethod]()
3804                } else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();
3805                b.transitions[b.isOpened ? a.nextMethod : a.openMethod]();
3806                b._preloadImages()
3807            }
3808        },
3809        _setDimension: function () {
3810            var a = b.getViewport(), d = 0, e = !1, c = !1, e = b.wrap, k = b.skin, g = b.inner, h = b.current,
3811                c = h.width, j = h.height, m = h.minWidth, u = h.minHeight, n = h.maxWidth, p = h.maxHeight,
3812                s = h.scrolling, q = h.scrollOutside ? h.scrollbarWidth : 0, x = h.margin, y = l(x[1] + x[3]),
3813                r = l(x[0] + x[2]), v, z, t, C, A, F, B, D, H;
3814            e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");
3815            x = l(k.outerWidth(!0) - k.width());
3816            v = l(k.outerHeight(!0) - k.height());
3817            z = y + x;
3818            t = r + v;
3819            C = E(c) ? (a.w - z) * l(c) / 100 : c;
3820            A = E(j) ? (a.h - t) * l(j) / 100 : j;
3821            if ("iframe" === h.type) {
3822                if (H = h.content, h.autoHeight && 1 === H.data("ready")) try {
3823                    H[0].contentWindow.document.location && (g.width(C).height(9999), F = H.contents().find("body"), q && F.css("overflow-x", "hidden"), A = F.outerHeight(!0))
3824                } catch (G) {
3825                }
3826            } else if (h.autoWidth || h.autoHeight) g.addClass("fancybox-tmp"), h.autoWidth || g.width(C), h.autoHeight || g.height(A), h.autoWidth && (C = g.width()), h.autoHeight && (A = g.height()), g.removeClass("fancybox-tmp");
3827            c = l(C);
3828            j = l(A);
3829            D = C / A;
3830            m = l(E(m) ? l(m, "w") - z : m);
3831            n = l(E(n) ? l(n, "w") - z : n);
3832            u = l(E(u) ? l(u, "h") - t : u);
3833            p = l(E(p) ? l(p, "h") - t : p);
3834            F = n;
3835            B = p;
3836            h.fitToView && (n = Math.min(a.w - z, n), p = Math.min(a.h - t, p));
3837            z = a.w - y;
3838            r = a.h - r;
3839            h.aspectRatio ? (c > n && (c = n, j = l(c / D)), j > p && (j = p, c = l(j * D)), c < m && (c = m, j = l(c / D)), j < u && (j = u, c = l(j * D))) : (c = Math.max(m, Math.min(c, n)), h.autoHeight && "iframe" !== h.type && (g.width(c), j = g.height()), j = Math.max(u, Math.min(j, p)));
3840            if (h.fitToView) if (g.width(c).height(j), e.width(c + x), a = e.width(), y = e.height(), h.aspectRatio) for (; (a > z || y > r) && (c > m && j > u) && !(19 < d++);) j = Math.max(u, Math.min(p, j - 10)), c = l(j * D), c < m && (c = m, j = l(c / D)), c > n && (c = n, j = l(c / D)), g.width(c).height(j), e.width(c + x), a = e.width(), y = e.height(); else c = Math.max(m, Math.min(c, c - (a - z))), j = Math.max(u, Math.min(j, j - (y - r)));
3841            q && ("auto" === s && j < A && c + x + q < z) && (c += q);
3842            g.width(c).height(j);
3843            e.width(c + x);
3844            a = e.width();
3845            y = e.height();
3846            e = (a > z || y > r) && c > m && j > u;
3847            c = h.aspectRatio ? c < F && j < B && c < C && j < A : (c < F || j < B) && (c < C || j < A);
3848            f.extend(h, {
3849                dim: {width: w(a), height: w(y)},
3850                origWidth: C,
3851                origHeight: A,
3852                canShrink: e,
3853                canExpand: c,
3854                wPadding: x,
3855                hPadding: v,
3856                wrapSpace: y - k.outerHeight(!0),
3857                skinSpace: k.height() - j
3858            });
3859            !H && (h.autoHeight && j > u && j < p && !c) && g.height("auto")
3860        },
3861        _getPosition: function (a) {
3862            var d = b.current, e = b.getViewport(), c = d.margin, f = b.wrap.width() + c[1] + c[3],
3863                g = b.wrap.height() + c[0] + c[2], c = {position: "absolute", top: c[0], left: c[3]};
3864            d.autoCenter && d.fixed && !a && g <= e.h && f <= e.w ? c.position = "fixed" : d.locked || (c.top += e.y, c.left += e.x);
3865            c.top = w(Math.max(c.top, c.top + (e.h - g) * d.topRatio));
3866            c.left = w(Math.max(c.left, c.left + (e.w - f) * d.leftRatio));
3867            return c
3868        },
3869        _afterZoomIn: function () {
3870            var a = b.current;
3871            a && (b.isOpen = b.isOpened = !0, b.wrap.css("overflow", "visible").addClass("fancybox-opened"), b.update(), (a.closeClick || a.nextClick && 1 < b.group.length) && b.inner.css("cursor", "pointer").bind("click.fb", function (d) {
3872                !f(d.target).is("a") && !f(d.target).parent().is("a") && (d.preventDefault(), b[a.closeClick ? "close" : "next"]())
3873            }), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function (a) {
3874                a.preventDefault();
3875                b.close()
3876            }), a.arrows && 1 < b.group.length && ((a.loop || 0 < a.index) && f(a.tpl.prev).appendTo(b.outer).bind("click.fb", b.prev), (a.loop || a.index < b.group.length - 1) && f(a.tpl.next).appendTo(b.outer).bind("click.fb", b.next)), b.trigger("afterShow"), !a.loop && a.index === a.group.length - 1 ? b.play(!1) : b.opts.autoPlay && !b.player.isActive && (b.opts.autoPlay = !1, b.play()))
3877        },
3878        _afterZoomOut: function (a) {
3879            a = a || b.current;
3880            f(".fancybox-wrap").trigger("onReset").remove();
3881            f.extend(b, {
3882                group: {},
3883                opts: {},
3884                router: !1,
3885                current: null,
3886                isActive: !1,
3887                isOpened: !1,
3888                isOpen: !1,
3889                isClosing: !1,
3890                wrap: null,
3891                skin: null,
3892                outer: null,
3893                inner: null
3894            });
3895            b.trigger("afterClose", a)
3896        }
3897    });
3898    b.transitions = {
3899        getOrigPosition: function () {
3900            var a = b.current, d = a.element, e = a.orig, c = {}, f = 50, g = 50, h = a.hPadding, j = a.wPadding,
3901                m = b.getViewport();
3902            !e && (a.isDom && d.is(":visible")) && (e = d.find("img:first"), e.length || (e = d));
3903            t(e) ? (c = e.offset(), e.is("img") && (f = e.outerWidth(), g = e.outerHeight())) : (c.top = m.y + (m.h - g) * a.topRatio, c.left = m.x + (m.w - f) * a.leftRatio);
3904            if ("fixed" === b.wrap.css("position") || a.locked) c.top -= m.y, c.left -= m.x;
3905            return c = {
3906                top: w(c.top - h * a.topRatio),
3907                left: w(c.left - j * a.leftRatio),
3908                width: w(f + j),
3909                height: w(g + h)
3910            }
3911        }, step: function (a, d) {
3912            var e, c, f = d.prop;
3913            c = b.current;
3914            var g = c.wrapSpace, h = c.skinSpace;
3915            if ("width" === f || "height" === f) e = d.end === d.start ? 1 : (a - d.start) / (d.end - d.start), b.isClosing && (e = 1 - e), c = "width" === f ? c.wPadding : c.hPadding, c = a - c, b.skin[f](l("width" === f ? c : c - g * e)), b.inner[f](l("width" === f ? c : c - g * e - h * e))
3916        }, zoomIn: function () {
3917            var a = b.current, d = a.pos, e = a.openEffect, c = "elastic" === e, k = f.extend({opacity: 1}, d);
3918            delete k.position;
3919            c ? (d = this.getOrigPosition(), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1);
3920            b.wrap.css(d).animate(k, {
3921                duration: "none" === e ? 0 : a.openSpeed,
3922                easing: a.openEasing,
3923                step: c ? this.step : null,
3924                complete: b._afterZoomIn
3925            })
3926        }, zoomOut: function () {
3927            var a = b.current, d = a.closeEffect, e = "elastic" === d, c = {opacity: 0.1};
3928            e && (c = this.getOrigPosition(), a.closeOpacity && (c.opacity = 0.1));
3929            b.wrap.animate(c, {
3930                duration: "none" === d ? 0 : a.closeSpeed,
3931                easing: a.closeEasing,
3932                step: e ? this.step : null,
3933                complete: b._afterZoomOut
3934            })
3935        }, changeIn: function () {
3936            var a = b.current, d = a.nextEffect, e = a.pos, c = {opacity: 1}, f = b.direction, g;
3937            e.opacity = 0.1;
3938            "elastic" === d && (g = "down" === f || "up" === f ? "top" : "left", "down" === f || "right" === f ? (e[g] = w(l(e[g]) - 200), c[g] = "+=200px") : (e[g] = w(l(e[g]) + 200), c[g] = "-=200px"));
3939            "none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, {
3940                duration: a.nextSpeed,
3941                easing: a.nextEasing,
3942                complete: b._afterZoomIn
3943            })
3944        }, changeOut: function () {
3945            var a = b.previous, d = a.prevEffect, e = {opacity: 0.1}, c = b.direction;
3946            "elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px");
3947            a.wrap.animate(e, {
3948                duration: "none" === d ? 0 : a.prevSpeed, easing: a.prevEasing, complete: function () {
3949                    f(this).trigger("onReset").remove()
3950                }
3951            })
3952        }
3953    };
3954    b.helpers.overlay = {
3955        defaults: {closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !s, fixed: !0},
3956        overlay: null,
3957        fixed: !1,
3958        el: f("html"),
3959        create: function (a) {
3960            a = f.extend({}, this.defaults, a);
3961            this.overlay && this.close();
3962            this.overlay = f('<div class="fancybox-overlay"></div>').appendTo(b.coming ? b.coming.parent : a.parent);
3963            this.fixed = !1;
3964            a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0)
3965        },
3966        open: function (a) {
3967            var d = this;
3968            a = f.extend({}, this.defaults, a);
3969            this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a);
3970            this.fixed || (n.bind("resize.overlay", f.proxy(this.update, this)), this.update());
3971            a.closeClick && this.overlay.bind("click.overlay", function (a) {
3972                if (f(a.target).hasClass("fancybox-overlay")) return b.isActive ? b.close() : d.close(), !1
3973            });
3974            this.overlay.css(a.css).show()
3975        },
3976        close: function () {
3977            var a, b;
3978            n.unbind("resize.overlay");
3979            this.el.hasClass("fancybox-lock") && (f(".fancybox-margin").removeClass("fancybox-margin"), a = n.scrollTop(), b = n.scrollLeft(), this.el.removeClass("fancybox-lock"), n.scrollTop(a).scrollLeft(b));
3980            f(".fancybox-overlay").remove().hide();
3981            f.extend(this, {overlay: null, fixed: !1})
3982        },
3983        update: function () {
3984            var a = "100%", b;
3985            this.overlay.width(a).height("100%");
3986            I ? (b = Math.max(G.documentElement.offsetWidth, G.body.offsetWidth), p.width() > b && (a = p.width())) : p.width() > n.width() && (a = p.width());
3987            this.overlay.width(a).height(p.height())
3988        },
3989        onReady: function (a, b) {
3990            var e = this.overlay;
3991            f(".fancybox-overlay").stop(!0, !0);
3992            e || this.create(a);
3993            a.locked && (this.fixed && b.fixed) && (e || (this.margin = p.height() > n.height() ? f("html").css("margin-right").replace("px", "") : !1), b.locked = this.overlay.append(b.wrap), b.fixed = !1);
3994            !0 === a.showEarly && this.beforeShow.apply(this, arguments)
3995        },
3996        beforeShow: function (a, b) {
3997            var e, c;
3998            b.locked && (!1 !== this.margin && (f("*:not(object)").filter(function () {
3999                return "fixed" === f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap")
4000            }).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), e = n.scrollTop(), c = n.scrollLeft(), this.el.addClass("fancybox-lock"), n.scrollTop(e).scrollLeft(c));
4001            this.open(a)
4002        },
4003        onUpdate: function () {
4004            this.fixed || this.update()
4005        },
4006        afterClose: function (a) {
4007            this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this))
4008        }
4009    };
4010    b.helpers.title = {
4011        defaults: {type: "float", position: "bottom"}, beforeShow: function (a) {
4012            var d = b.current, e = d.title, c = a.type;
4013            f.isFunction(e) && (e = e.call(d.element, d));
4014            if (q(e) && "" !== f.trim(e)) {
4015                d = f('<div class="fancybox-title fancybox-title-' + c + '-wrap">' + e + "</div>");
4016                switch (c) {
4017                    case "inside":
4018                        c = b.skin;
4019                        break;
4020                    case "outside":
4021                        c = b.wrap;
4022                        break;
4023                    case "over":
4024                        c = b.inner;
4025                        break;
4026                    default:
4027                        c = b.skin, d.appendTo("body"), I && d.width(d.width()), d.wrapInner('<span class="child"></span>'), b.current.margin[2] += Math.abs(l(d.css("margin-bottom")))
4028                }
4029                d["top" === a.position ? "prependTo" : "appendTo"](c)
4030            }
4031        }
4032    };
4033    f.fn.fancybox = function (a) {
4034        var d, e = f(this), c = this.selector || "", k = function (g) {
4035            var h = f(this).blur(), j = d, k, l;
4036            !g.ctrlKey && (!g.altKey && !g.shiftKey && !g.metaKey) && !h.is(".fancybox-wrap") && (k = a.groupAttr || "data-fancybox-group", l = h.attr(k), l || (k = "rel", l = h.get(0)[k]), l && ("" !== l && "nofollow" !== l) && (h = c.length ? f(c) : e, h = h.filter("[" + k + '="' + l + '"]'), j = h.index(this)), a.index = j, !1 !== b.open(h, a) && g.preventDefault())
4037        };
4038        a = a || {};
4039        d = a.index || 0;
4040        !c || !1 === a.live ? e.unbind("click.fb-start").bind("click.fb-start", k) : p.undelegate(c, "click.fb-start").delegate(c + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", k);
4041        this.filter("[data-fancybox-start=1]").trigger("click");
4042        return this
4043    };
4044    p.ready(function () {
4045        var a, d;
4046        f.scrollbarWidth === v && (f.scrollbarWidth = function () {
4047            var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
4048                b = a.children(), b = b.innerWidth() - b.height(99).innerWidth();
4049            a.remove();
4050            return b
4051        });
4052        if (f.support.fixedPosition === v) {
4053            a = f.support;
4054            d = f('<div style="position:fixed;top:20px;"></div>').appendTo("body");
4055            var e = 20 === d[0].offsetTop || 15 === d[0].offsetTop;
4056            d.remove();
4057            a.fixedPosition = e
4058        }
4059        f.extend(b.defaults, {scrollbarWidth: f.scrollbarWidth(), fixed: f.support.fixedPosition, parent: f("body")});
4060        a = f(r).width();
4061        J.addClass("fancybox-lock-test");
4062        d = f(r).width();
4063        J.removeClass("fancybox-lock-test");
4064        f("<style type='text/css'>.fancybox-margin{margin-right:" + (d - a) + "px;}</style>").appendTo("head")
4065    })
4066})(window, document, jQuery);</script>
4066<script>(function($) {var __slice=Array.prototype.slice;var i18n={dict:null,load:function(i18n_dict){if(this.dict!==null){$.extend(this.dict,i18n_dict);}else{this.dict=i18n_dict;}},_:function(str) {dict=this.dict;if(dict&&dict.hasOwnProperty(str)){str=dict[str];}args=__slice.call(arguments);args[0]=str;return this.printf.apply(this, args);},printf:function(str,args){if(arguments.length<2)return str;args=$.isArray(args)?args:__slice.call(arguments,1);return str.replace(/([^%]|^)%(?:(\d+)\$)?s/g,function(p0,p,position){if(position){return p+args[parseInt(position)-1];}return p+args.shift();}).replace(/%%s/g,'%s');}};$.fn._t=function(str,params){return $(this).html(i18n._.apply(i18n,arguments));};$.i18n=i18n;})(jQuery);</script>
vendor: 4,487 bytes, lines 4066-4227
4066<script>
4067(function( $, undefined ) {
4068var uuid = 0,
4069	runiqueId = /^ui-id-\d+$/;
4070$.ui = $.ui || {};
4071$.extend( $.ui, {
4072	version: "1.10.4",
4073	keyCode: {
4074		BACKSPACE: 8,
4075		COMMA: 188,
4076		DELETE: 46,
4077		DOWN: 40,
4078		END: 35,
4079		ENTER: 13,
4080		ESCAPE: 27,
4081		HOME: 36,
4082		LEFT: 37,
4083		NUMPAD_ADD: 107,
4084		NUMPAD_DECIMAL: 110,
4085		NUMPAD_DIVIDE: 111,
4086		NUMPAD_ENTER: 108,
4087		NUMPAD_MULTIPLY: 106,
4088		NUMPAD_SUBTRACT: 109,
4089		PAGE_DOWN: 34,
4090		PAGE_UP: 33,
4091		PERIOD: 190,
4092		RIGHT: 39,
4093		SPACE: 32,
4094		TAB: 9,
4095		UP: 38
4096	}
4097});
4098$.fn.extend({
4099	focus: (function( orig ) {
4100		return function( delay, fn ) {
4101			return typeof delay === "number" ?
4102				this.each(function() {
4103					var elem = this;
4104					setTimeout(function() {
4105						$( elem ).focus();
4106						if ( fn ) {
4107							fn.call( elem );
4108						}
4109					}, delay );
4110				}) :
4111				orig.apply( this, arguments );
4112		};
4113	})( $.fn.focus ),
4114	scrollParent: function() {
4115		var scrollParent;
4116		if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
4117			scrollParent = this.parents().filter(function() {
4118				return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
4119			}).eq(0);
4120		} else {
4121			scrollParent = this.parents().filter(function() {
4122				return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
4123			}).eq(0);
4124		}
4125		return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
4126	},
4127	zIndex: function( zIndex ) {
4128		if ( zIndex !== undefined ) {
4129			return this.css( "zIndex", zIndex );
4130		}
4131		if ( this.length ) {
4132			var elem = $( this[ 0 ] ), position, value;
4133			while ( elem.length && elem[ 0 ] !== document ) {
4134				position = elem.css( "position" );
4135				if ( position === "absolute" || position === "relative" || position === "fixed" ) {
4136					value = parseInt( elem.css( "zIndex" ), 10 );
4137					if ( !isNaN( value ) && value !== 0 ) {
4138						return value;
4139					}
4140				}
4141				elem = elem.parent();
4142			}
4143		}
4144		return 0;
4145	},
4146	uniqueId: function() {
4147		return this.each(function() {
4148			if ( !this.id ) {
4149				this.id = "ui-id-" + (++uuid);
4150			}
4151		});
4152	},
4153	removeUniqueId: function() {
4154		return this.each(function() {
4155			if ( runiqueId.test( this.id ) ) {
4156				$( this ).removeAttr( "id" );
4157			}
4158		});
4159	}
4160});
4161function focusable( element, isTabIndexNotNaN ) {
4162	var map, mapName, img,
4163		nodeName = element.nodeName.toLowerCase();
4164	if ( "area" === nodeName ) {
4165		map = element.parentNode;
4166		mapName = map.name;
4167		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
4168			return false;
4169		}
4170		img = $( "img[usemap=#" + mapName + "]" )[0];
4171		return !!img && visible( img );
4172	}
4173	return ( /input|select|textarea|button|object/.test( nodeName ) ?
4174		!element.disabled :
4175		"a" === nodeName ?
4176			element.href || isTabIndexNotNaN :
4177			isTabIndexNotNaN) &&
4178		// the element and all of its ancestors must be visible
4179		visible( element );
4180}
4181function visible( element ) {
4182	return $.expr.filters.visible( element ) &&
4183		!$( element ).parents().addBack().filter(function() {
4184			return $.css( this, "visibility" ) === "hidden";
4185		}).length;
4186}
4187$.extend( $.expr[ ":" ], {
4188	data: $.expr.createPseudo ?
4189		$.expr.createPseudo(function( dataName ) {
4190			return function( elem ) {
4191				return !!$.data( elem, dataName );
4192			};
4193		}) :
4194		function( elem, i, match ) {
4195			return !!$.data( elem, match[ 3 ] );
4196		},
4197	focusable: function( element ) {
4198		return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
4199	},
4200	tabbable: function( element ) {
4201		var tabIndex = $.attr( element, "tabindex" ),
4202			isTabIndexNaN = isNaN( tabIndex );
4203		return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
4204	}
4205});
4206if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
4207	$.each( [ "Width", "Height" ], function( i, name ) {
4208		var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
4209			type = name.toLowerCase(),
4210			orig = {
4211				innerWidth: $.fn.innerWidth,
4212				innerHeight: $.fn.innerHeight,
4213				outerWidth: $.fn.outerWidth,
4214				outerHeight: $.fn.outerHeight
4215			};
4216		function reduce( elem, size, border, margin ) {
4217			$.each( side, function() {
4218				size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
4219				if ( border ) {
4220					size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
4221				}
4222				if ( margin ) {
4223					size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
4224				}
4225			});
4226			return size;
4227		}
4228		$.fn[ "inner" + name ] = function( size ) {
4229			if ( size === undefined ) {
4230				return orig[ "inner" + name ].call( this );
4231			}
4232			return this.each(function() {
4233				$( this ).css( type, reduce( this, size ) + "px" );
4234			});
4235		};
4236		$.fn[ "outer" + name] = function( size, margin ) {
4237			if ( typeof size !== "number" ) {
4238				return orig[ "outer" + name ].call( this, size );
4239			}
4240			return this.each(function() {
4241				$( this).css( type, reduce( this, size, true, margin ) + "px" );
4242			});
4243		};
4244	});
4245}
4246if ( !$.fn.addBack ) {
4247	$.fn.addBack = function( selector ) {
4248		return this.add( selector == null ?
4249			this.prevObject : this.prevObject.filter( selector )
4250		);
4251	};
4252}
4253if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
4254	$.fn.removeData = (function( removeData ) {
4255		return function( key ) {
4256			if ( arguments.length ) {
4257				return removeData.call( this, $.camelCase( key ) );
4258			} else {
4259				return removeData.call( this );
4260			}
4261		};
4262	})( $.fn.removeData );
4263}
4264$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
4265$.support.selectstart = "onselectstart" in document.createElement( "div" );
4266$.fn.extend({
4267	disableSelection: function() {
4268		return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
4269			".ui-disableSelection", function( event ) {
4270				event.preventDefault();
4271			});
4272	},
4273	enableSelection: function() {
4274		return this.unbind( ".ui-disableSelection" );
4275	}
4276});
4277$.extend( $.ui, {
4278	plugin: {
4279		add: function( module, option, set ) {
4280			var i,
4281				proto = $.ui[ module ].prototype;
4282			for ( i in set ) {
4283				proto.plugins[ i ] = proto.plugins[ i ] || [];
4284				proto.plugins[ i ].push( [ option, set[ i ] ] );
4285			}
4286		},
4287		call: function( instance, name, args ) {
4288			var i,
4289				set = instance.plugins[ name ];
4290			if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
4291				return;
4292			}
4293			for ( i = 0; i < set.length; i++ ) {
4294				if ( instance.options[ set[ i ][ 0 ] ] ) {
4295					set[ i ][ 1 ].apply( instance.element, args );
4296				}
4297			}
4298		}
4299	},
4300	hasScroll: function( el, a ) {
4301		//If overflow is hidden, the element might have extra content, but the user wants to hide it
4302		if ( $( el ).css( "overflow" ) === "hidden") {
4303			return false;
4304		}
4305		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
4306			has = false;
4307		if ( el[ scroll ] > 0 ) {
4308			return true;
4309		}
4310		el[ scroll ] = 1;
4311		has = ( el[ scroll ] > 0 );
4312		el[ scroll ] = 0;
4313		return has;
4314	}
4315});
4316})( jQuery );
4317(function( $, undefined ) {
4318var uuid = 0,
4319	slice = Array.prototype.slice,
4320	_cleanData = $.cleanData;
4321$.cleanData = function( elems ) {
4322	for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
4323		try {
4324			$( elem ).triggerHandler( "remove" );
4325		} catch( e ) {}
4326	}
4327	_cleanData( elems );
4328};
4329$.widget = function( name, base, prototype ) {
4330	var fullName, existingConstructor, constructor, basePrototype,
4331		proxiedPrototype = {},
4332		namespace = name.split( "." )[ 0 ];
4333	name = name.split( "." )[ 1 ];
4334	fullName = namespace + "-" + name;
4335	if ( !prototype ) {
4336		prototype = base;
4337		base = $.Widget;
4338	}
4339	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
4340		return !!$.data( elem, fullName );
4341	};
4342	$[ namespace ] = $[ namespace ] || {};
4343	existingConstructor = $[ namespace ][ name ];
4344	constructor = $[ namespace ][ name ] = function( options, element ) {
4345		if ( !this._createWidget ) {
4346			return new constructor( options, element );
4347		}
4348		if ( arguments.length ) {
4349			this._createWidget( options, element );
4350		}
4351	};
4352	$.extend( constructor, existingConstructor, {
4353		version: prototype.version,
4354		_proto: $.extend( {}, prototype ),
4355		_childConstructors: []
4356	});
4357	basePrototype = new base();
4358	basePrototype.options = $.widget.extend( {}, basePrototype.options );
4359	$.each( prototype, function( prop, value ) {
4360		if ( !$.isFunction( value ) ) {
4361			proxiedPrototype[ prop ] = value;
4362			return;
4363		}
4364		proxiedPrototype[ prop ] = (function() {
4365			var _super = function() {
4366					return base.prototype[ prop ].apply( this, arguments );
4367				},
4368				_superApply = function( args ) {
4369					return base.prototype[ prop ].apply( this, args );
4370				};
4371			return function() {
4372				var __super = this._super,
4373					__superApply = this._superApply,
4374					returnValue;
4375				this._super = _super;
4376				this._superApply = _superApply;
vendor: 9,998 bytes, lines 4377-4708
4377				returnValue = value.apply( this, arguments );
4378				this._super = __super;
4379				this._superApply = __superApply;
4380				return returnValue;
4381			};
4382		})();
4383	});
4384	constructor.prototype = $.widget.extend( basePrototype, {
4385		widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
4386	}, proxiedPrototype, {
4387		constructor: constructor,
4388		namespace: namespace,
4389		widgetName: name,
4390		widgetFullName: fullName
4391	});
4392	if ( existingConstructor ) {
4393		$.each( existingConstructor._childConstructors, function( i, child ) {
4394			var childPrototype = child.prototype;
4395			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
4396		});
4397		delete existingConstructor._childConstructors;
4398	} else {
4399		base._childConstructors.push( constructor );
4400	}
4401	$.widget.bridge( name, constructor );
4402};
4403$.widget.extend = function( target ) {
4404	var input = slice.call( arguments, 1 ),
4405		inputIndex = 0,
4406		inputLength = input.length,
4407		key,
4408		value;
4409	for ( ; inputIndex < inputLength; inputIndex++ ) {
4410		for ( key in input[ inputIndex ] ) {
4411			value = input[ inputIndex ][ key ];
4412			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
4413				if ( $.isPlainObject( value ) ) {
4414					target[ key ] = $.isPlainObject( target[ key ] ) ?
4415						$.widget.extend( {}, target[ key ], value ) :
4416						$.widget.extend( {}, value );
4417				} else {
4418					target[ key ] = value;
4419				}
4420			}
4421		}
4422	}
4423	return target;
4424};
4425$.widget.bridge = function( name, object ) {
4426	var fullName = object.prototype.widgetFullName || name;
4427	$.fn[ name ] = function( options ) {
4428		var isMethodCall = typeof options === "string",
4429			args = slice.call( arguments, 1 ),
4430			returnValue = this;
4431		options = !isMethodCall && args.length ?
4432			$.widget.extend.apply( null, [ options ].concat(args) ) :
4433			options;
4434		if ( isMethodCall ) {
4435			this.each(function() {
4436				var methodValue,
4437					instance = $.data( this, fullName );
4438				if ( !instance ) {
4439					return $.error( "cannot call methods on " + name + " prior to initialization; " +
4440						"attempted to call method '" + options + "'" );
4441				}
4442				if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
4443					return $.error( "no such method '" + options + "' for " + name + " widget instance" );
4444				}
4445				methodValue = instance[ options ].apply( instance, args );
4446				if ( methodValue !== instance && methodValue !== undefined ) {
4447					returnValue = methodValue && methodValue.jquery ?
4448						returnValue.pushStack( methodValue.get() ) :
4449						methodValue;
4450					return false;
4451				}
4452			});
4453		} else {
4454			this.each(function() {
4455				var instance = $.data( this, fullName );
4456				if ( instance ) {
4457					instance.option( options || {} )._init();
4458				} else {
4459					$.data( this, fullName, new object( options, this ) );
4460				}
4461			});
4462		}
4463		return returnValue;
4464	};
4465};
4466$.Widget = function() {};
4467$.Widget._childConstructors = [];
4468$.Widget.prototype = {
4469	widgetName: "widget",
4470	widgetEventPrefix: "",
4471	defaultElement: "<div>",
4472	options: {
4473		disabled: false,
4474		create: null
4475	},
4476	_createWidget: function( options, element ) {
4477		element = $( element || this.defaultElement || this )[ 0 ];
4478		this.element = $( element );
4479		this.uuid = uuid++;
4480		this.eventNamespace = "." + this.widgetName + this.uuid;
4481		this.options = $.widget.extend( {},
4482			this.options,
4483			this._getCreateOptions(),
4484			options );
4485		this.bindings = $();
4486		this.hoverable = $();
4487		this.focusable = $();
4488		if ( element !== this ) {
4489			$.data( element, this.widgetFullName, this );
4490			this._on( true, this.element, {
4491				remove: function( event ) {
4492					if ( event.target === element ) {
4493						this.destroy();
4494					}
4495				}
4496			});
4497			this.document = $( element.style ?
4498				element.ownerDocument :
4499				element.document || element );
4500			this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
4501		}
4502		this._create();
4503		this._trigger( "create", null, this._getCreateEventData() );
4504		this._init();
4505	},
4506	_getCreateOptions: $.noop,
4507	_getCreateEventData: $.noop,
4508	_create: $.noop,
4509	_init: $.noop,
4510	destroy: function() {
4511		this._destroy();
4512		this.element
4513			.unbind( this.eventNamespace )
4514			.removeData( this.widgetName )
4515			.removeData( this.widgetFullName )
4516			.removeData( $.camelCase( this.widgetFullName ) );
4517		this.widget()
4518			.unbind( this.eventNamespace )
4519			.removeAttr( "aria-disabled" )
4520			.removeClass(
4521				this.widgetFullName + "-disabled " +
4522				"ui-state-disabled" );
4523		this.bindings.unbind( this.eventNamespace );
4524		this.hoverable.removeClass( "ui-state-hover" );
4525		this.focusable.removeClass( "ui-state-focus" );
4526	},
4527	_destroy: $.noop,
4528	widget: function() {
4529		return this.element;
4530	},
4531	option: function( key, value ) {
4532		var options = key,
4533			parts,
4534			curOption,
4535			i;
4536		if ( arguments.length === 0 ) {
4537			return $.widget.extend( {}, this.options );
4538		}
4539		if ( typeof key === "string" ) {
4540			options = {};
4541			parts = key.split( "." );
4542			key = parts.shift();
4543			if ( parts.length ) {
4544				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
4545				for ( i = 0; i < parts.length - 1; i++ ) {
4546					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
4547					curOption = curOption[ parts[ i ] ];
4548				}
4549				key = parts.pop();
4550				if ( arguments.length === 1 ) {
4551					return curOption[ key ] === undefined ? null : curOption[ key ];
4552				}
4553				curOption[ key ] = value;
4554			} else {
4555				if ( arguments.length === 1 ) {
4556					return this.options[ key ] === undefined ? null : this.options[ key ];
4557				}
4558				options[ key ] = value;
4559			}
4560		}
4561		this._setOptions( options );
4562		return this;
4563	},
4564	_setOptions: function( options ) {
4565		var key;
4566		for ( key in options ) {
4567			this._setOption( key, options[ key ] );
4568		}
4569		return this;
4570	},
4571	_setOption: function( key, value ) {
4572		this.options[ key ] = value;
4573		if ( key === "disabled" ) {
4574			this.widget()
4575				.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
4576				.attr( "aria-disabled", value );
4577			this.hoverable.removeClass( "ui-state-hover" );
4578			this.focusable.removeClass( "ui-state-focus" );
4579		}
4580		return this;
4581	},
4582	enable: function() {
4583		return this._setOption( "disabled", false );
4584	},
4585	disable: function() {
4586		return this._setOption( "disabled", true );
4587	},
4588	_on: function( suppressDisabledCheck, element, handlers ) {
4589		var delegateElement,
4590			instance = this;
4591		if ( typeof suppressDisabledCheck !== "boolean" ) {
4592			handlers = element;
4593			element = suppressDisabledCheck;
4594			suppressDisabledCheck = false;
4595		}
4596		if ( !handlers ) {
4597			handlers = element;
4598			element = this.element;
4599			delegateElement = this.widget();
4600		} else {
4601			element = delegateElement = $( element );
4602			this.bindings = this.bindings.add( element );
4603		}
4604		$.each( handlers, function( event, handler ) {
4605			function handlerProxy() {
4606				if ( !suppressDisabledCheck &&
4607						( instance.options.disabled === true ||
4608							$( this ).hasClass( "ui-state-disabled" ) ) ) {
4609					return;
4610				}
4611				return ( typeof handler === "string" ? instance[ handler ] : handler )
4612					.apply( instance, arguments );
4613			}
4614			if ( typeof handler !== "string" ) {
4615				handlerProxy.guid = handler.guid =
4616					handler.guid || handlerProxy.guid || $.guid++;
4617			}
4618			var match = event.match( /^(\w+)\s*(.*)$/ ),
4619				eventName = match[1] + instance.eventNamespace,
4620				selector = match[2];
4621			if ( selector ) {
4622				delegateElement.delegate( selector, eventName, handlerProxy );
4623			} else {
4624				element.bind( eventName, handlerProxy );
4625			}
4626		});
4627	},
4628	_off: function( element, eventName ) {
4629		eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
4630		element.unbind( eventName ).undelegate( eventName );
4631	},
4632	_delay: function( handler, delay ) {
4633		function handlerProxy() {
4634			return ( typeof handler === "string" ? instance[ handler ] : handler )
4635				.apply( instance, arguments );
4636		}
4637		var instance = this;
4638		return setTimeout( handlerProxy, delay || 0 );
4639	},
4640	_hoverable: function( element ) {
4641		this.hoverable = this.hoverable.add( element );
4642		this._on( element, {
4643			mouseenter: function( event ) {
4644				$( event.currentTarget ).addClass( "ui-state-hover" );
4645			},
4646			mouseleave: function( event ) {
4647				$( event.currentTarget ).removeClass( "ui-state-hover" );
4648			}
4649		});
4650	},
4651	_focusable: function( element ) {
4652		this.focusable = this.focusable.add( element );
4653		this._on( element, {
4654			focusin: function( event ) {
4655				$( event.currentTarget ).addClass( "ui-state-focus" );
4656			},
4657			focusout: function( event ) {
4658				$( event.currentTarget ).removeClass( "ui-state-focus" );
4659			}
4660		});
4661	},
4662	_trigger: function( type, event, data ) {
4663		var prop, orig,
4664			callback = this.options[ type ];
4665
4666		data = data || {};
4667		event = $.Event( event );
4668		event.type = ( type === this.widgetEventPrefix ?
4669			type :
4670			this.widgetEventPrefix + type ).toLowerCase();
4671		event.target = this.element[ 0 ];
4672		orig = event.originalEvent;
4673		if ( orig ) {
4674			for ( prop in orig ) {
4675				if ( !( prop in event ) ) {
4676					event[ prop ] = orig[ prop ];
4677				}
4678			}
4679		}
4680		this.element.trigger( event, data );
4681		return !( $.isFunction( callback ) &&
4682			callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
4683			event.isDefaultPrevented() );
4684	}
4685};
4686$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
4687	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
4688		if ( typeof options === "string" ) {
4689			options = { effect: options };
4690		}
4691		var hasOptions,
4692			effectName = !options ?
4693				method :
4694				options === true || typeof options === "number" ?
4695					defaultEffect :
4696					options.effect || defaultEffect;
4697		options = options || {};
4698		if ( typeof options === "number" ) {
4699			options = { duration: options };
4700		}
4701		hasOptions = !$.isEmptyObject( options );
4702		options.complete = callback;
4703		if ( options.delay ) {
4704			element.delay( options.delay );
4705		}
4706		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
4707			element[ method ]( options );
4708		} else if ( effectName !== method && element[ effectName ] ) {
vendor: 60,818 bytes, lines 4709-6484
4709			element[ effectName ]( options.duration, options.easing, callback );
4710		} else {
4711			element.queue(function( next ) {
4712				$( this )[ method ]();
4713				if ( callback ) {
4714					callback.call( element[ 0 ] );
4715				}
4716				next();
4717			});
4718		}
4719	};
4720});
4721})( jQuery );
4722(function( $, undefined ) {
4723var mouseHandled = false;
4724$( document ).mouseup( function() {
4725	mouseHandled = false;
4726});
4727$.widget("ui.mouse", {
4728	version: "1.10.4",
4729	options: {
4730		cancel: "input,textarea,button,select,option",
4731		distance: 1,
4732		delay: 0
4733	},
4734	_mouseInit: function() {
4735		var that = this;
4736		this.element
4737			.bind("mousedown."+this.widgetName, function(event) {
4738				return that._mouseDown(event);
4739			})
4740			.bind("click."+this.widgetName, function(event) {
4741				if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
4742					$.removeData(event.target, that.widgetName + ".preventClickEvent");
4743					event.stopImmediatePropagation();
4744					return false;
4745				}
4746			});
4747		this.started = false;
4748	},
4749	_mouseDestroy: function() {
4750		this.element.unbind("."+this.widgetName);
4751		if ( this._mouseMoveDelegate ) {
4752			$(document)
4753				.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
4754				.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
4755		}
4756	},
4757	_mouseDown: function(event) {
4758		if( mouseHandled ) { return; }
4759		(this._mouseStarted && this._mouseUp(event));
4760		this._mouseDownEvent = event;
4761		var that = this,
4762			btnIsLeft = (event.which === 1),
4763			elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
4764		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
4765			return true;
4766		}
4767		this.mouseDelayMet = !this.options.delay;
4768		if (!this.mouseDelayMet) {
4769			this._mouseDelayTimer = setTimeout(function() {
4770				that.mouseDelayMet = true;
4771			}, this.options.delay);
4772		}
4773		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
4774			this._mouseStarted = (this._mouseStart(event) !== false);
4775			if (!this._mouseStarted) {
4776				event.preventDefault();
4777				return true;
4778			}
4779		}
4780		if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
4781			$.removeData(event.target, this.widgetName + ".preventClickEvent");
4782		}
4783		this._mouseMoveDelegate = function(event) {
4784			return that._mouseMove(event);
4785		};
4786		this._mouseUpDelegate = function(event) {
4787			return that._mouseUp(event);
4788		};
4789		$(document)
4790			.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
4791			.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
4792		event.preventDefault();
4793		mouseHandled = true;
4794		return true;
4795	},
4796	_mouseMove: function(event) {
4797		if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
4798			return this._mouseUp(event);
4799		}
4800		if (this._mouseStarted) {
4801			this._mouseDrag(event);
4802			return event.preventDefault();
4803		}
4804		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
4805			this._mouseStarted =
4806				(this._mouseStart(this._mouseDownEvent, event) !== false);
4807			(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
4808		}
4809		return !this._mouseStarted;
4810	},
4811	_mouseUp: function(event) {
4812		$(document)
4813			.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
4814			.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
4815		if (this._mouseStarted) {
4816			this._mouseStarted = false;
4817			if (event.target === this._mouseDownEvent.target) {
4818				$.data(event.target, this.widgetName + ".preventClickEvent", true);
4819			}
4820			this._mouseStop(event);
4821		}
4822		return false;
4823	},
4824	_mouseDistanceMet: function(event) {
4825		return (Math.max(
4826				Math.abs(this._mouseDownEvent.pageX - event.pageX),
4827				Math.abs(this._mouseDownEvent.pageY - event.pageY)
4828			) >= this.options.distance
4829		);
4830	},
4831	_mouseDelayMet: function(/* event */) {
4832		return this.mouseDelayMet;
4833	},
4834	_mouseStart: function(/* event */) {},
4835	_mouseDrag: function(/* event */) {},
4836	_mouseStop: function(/* event */) {},
4837	_mouseCapture: function(/* event */) { return true; }
4838});
4839})(jQuery);
4840(function( $, undefined ) {
4841$.ui = $.ui || {};
4842var cachedScrollbarWidth,
4843	max = Math.max,
4844	abs = Math.abs,
4845	round = Math.round,
4846	rhorizontal = /left|center|right/,
4847	rvertical = /top|center|bottom/,
4848	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
4849	rposition = /^\w+/,
4850	rpercent = /%$/,
4851	_position = $.fn.position;
4852function getOffsets( offsets, width, height ) {
4853	return [
4854		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
4855		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
4856	];
4857}
4858function parseCss( element, property ) {
4859	return parseInt( $.css( element, property ), 10 ) || 0;
4860}
4861function getDimensions( elem ) {
4862	var raw = elem[0];
4863	if ( raw.nodeType === 9 ) {
4864		return {
4865			width: elem.width(),
4866			height: elem.height(),
4867			offset: { top: 0, left: 0 }
4868		};
4869	}
4870	if ( $.isWindow( raw ) ) {
4871		return {
4872			width: elem.width(),
4873			height: elem.height(),
4874			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
4875		};
4876	}
4877	if ( raw.preventDefault ) {
4878		return {
4879			width: 0,
4880			height: 0,
4881			offset: { top: raw.pageY, left: raw.pageX }
4882		};
4883	}
4884	return {
4885		width: elem.outerWidth(),
4886		height: elem.outerHeight(),
4887		offset: elem.offset()
4888	};
4889}
4890$.position = {
4891	scrollbarWidth: function() {
4892		if ( cachedScrollbarWidth !== undefined ) {
4893			return cachedScrollbarWidth;
4894		}
4895		var w1, w2,
4896			div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
4897			innerDiv = div.children()[0];
4898		$( "body" ).append( div );
4899		w1 = innerDiv.offsetWidth;
4900		div.css( "overflow", "scroll" );
4901		w2 = innerDiv.offsetWidth;
4902		if ( w1 === w2 ) {
4903			w2 = div[0].clientWidth;
4904		}
4905		div.remove();
4906		return (cachedScrollbarWidth = w1 - w2);
4907	},
4908	getScrollInfo: function( within ) {
4909		var overflowX = within.isWindow || within.isDocument ? "" :
4910				within.element.css( "overflow-x" ),
4911			overflowY = within.isWindow || within.isDocument ? "" :
4912				within.element.css( "overflow-y" ),
4913			hasOverflowX = overflowX === "scroll" ||
4914				( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
4915			hasOverflowY = overflowY === "scroll" ||
4916				( overflowY === "auto" && within.height < within.element[0].scrollHeight );
4917		return {
4918			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
4919			height: hasOverflowX ? $.position.scrollbarWidth() : 0
4920		};
4921	},
4922	getWithinInfo: function( element ) {
4923		var withinElement = $( element || window ),
4924			isWindow = $.isWindow( withinElement[0] ),
4925			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
4926		return {
4927			element: withinElement,
4928			isWindow: isWindow,
4929			isDocument: isDocument,
4930			offset: withinElement.offset() || { left: 0, top: 0 },
4931			scrollLeft: withinElement.scrollLeft(),
4932			scrollTop: withinElement.scrollTop(),
4933			width: isWindow ? withinElement.width() : withinElement.outerWidth(),
4934			height: isWindow ? withinElement.height() : withinElement.outerHeight()
4935		};
4936	}
4937};
4938$.fn.position = function( options ) {
4939	if ( !options || !options.of ) {
4940		return _position.apply( this, arguments );
4941	}
4942	options = $.extend( {}, options );
4943	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
4944		target = $( options.of ),
4945		within = $.position.getWithinInfo( options.within ),
4946		scrollInfo = $.position.getScrollInfo( within ),
4947		collision = ( options.collision || "flip" ).split( " " ),
4948		offsets = {};
4949	dimensions = getDimensions( target );
4950	if ( target[0].preventDefault ) {
4951		options.at = "left top";
4952	}
4953	targetWidth = dimensions.width;
4954	targetHeight = dimensions.height;
4955	targetOffset = dimensions.offset;
4956	// clone to reuse original targetOffset later
4957	basePosition = $.extend( {}, targetOffset );
4958	$.each( [ "my", "at" ], function() {
4959		var pos = ( options[ this ] || "" ).split( " " ),
4960			horizontalOffset,
4961			verticalOffset;
4962		if ( pos.length === 1) {
4963			pos = rhorizontal.test( pos[ 0 ] ) ?
4964				pos.concat( [ "center" ] ) :
4965				rvertical.test( pos[ 0 ] ) ?
4966					[ "center" ].concat( pos ) :
4967					[ "center", "center" ];
4968		}
4969		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
4970		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
4971		horizontalOffset = roffset.exec( pos[ 0 ] );
4972		verticalOffset = roffset.exec( pos[ 1 ] );
4973		offsets[ this ] = [
4974			horizontalOffset ? horizontalOffset[ 0 ] : 0,
4975			verticalOffset ? verticalOffset[ 0 ] : 0
4976		];
4977		options[ this ] = [
4978			rposition.exec( pos[ 0 ] )[ 0 ],
4979			rposition.exec( pos[ 1 ] )[ 0 ]
4980		];
4981	});
4982	if ( collision.length === 1 ) {
4983		collision[ 1 ] = collision[ 0 ];
4984	}
4985	if ( options.at[ 0 ] === "right" ) {
4986		basePosition.left += targetWidth;
4987	} else if ( options.at[ 0 ] === "center" ) {
4988		basePosition.left += targetWidth / 2;
4989	}
4990	if ( options.at[ 1 ] === "bottom" ) {
4991		basePosition.top += targetHeight;
4992	} else if ( options.at[ 1 ] === "center" ) {
4993		basePosition.top += targetHeight / 2;
4994	}
4995	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
4996	basePosition.left += atOffset[ 0 ];
4997	basePosition.top += atOffset[ 1 ];
4998	return this.each(function() {
4999		var collisionPosition, using,
5000			elem = $( this ),
5001			elemWidth = elem.outerWidth(),
5002			elemHeight = elem.outerHeight(),
5003			marginLeft = parseCss( this, "marginLeft" ),
5004			marginTop = parseCss( this, "marginTop" ),
5005			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
5006			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
5007			position = $.extend( {}, basePosition ),
5008			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
5009		if ( options.my[ 0 ] === "right" ) {
5010			position.left -= elemWidth;
5011		} else if ( options.my[ 0 ] === "center" ) {
5012			position.left -= elemWidth / 2;
5013		}
5014		if ( options.my[ 1 ] === "bottom" ) {
5015			position.top -= elemHeight;
5016		} else if ( options.my[ 1 ] === "center" ) {
5017			position.top -= elemHeight / 2;
5018		}
5019		position.left += myOffset[ 0 ];
5020		position.top += myOffset[ 1 ];
5021		if ( !$.support.offsetFractions ) {
5022			position.left = round( position.left );
5023			position.top = round( position.top );
5024		}
5025		collisionPosition = {
5026			marginLeft: marginLeft,
5027			marginTop: marginTop
5028		};
5029		$.each( [ "left", "top" ], function( i, dir ) {
5030			if ( $.ui.position[ collision[ i ] ] ) {
5031				$.ui.position[ collision[ i ] ][ dir ]( position, {
5032					targetWidth: targetWidth,
5033					targetHeight: targetHeight,
5034					elemWidth: elemWidth,
5035					elemHeight: elemHeight,
5036					collisionPosition: collisionPosition,
5037					collisionWidth: collisionWidth,
5038					collisionHeight: collisionHeight,
5039					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
5040					my: options.my,
5041					at: options.at,
5042					within: within,
5043					elem : elem
5044				});
5045			}
5046		});
5047		if ( options.using ) {
5048			using = function( props ) {
5049				var left = targetOffset.left - position.left,
5050					right = left + targetWidth - elemWidth,
5051					top = targetOffset.top - position.top,
5052					bottom = top + targetHeight - elemHeight,
5053					feedback = {
5054						target: {
5055							element: target,
5056							left: targetOffset.left,
5057							top: targetOffset.top,
5058							width: targetWidth,
5059							height: targetHeight
5060						},
5061						element: {
5062							element: elem,
5063							left: position.left,
5064							top: position.top,
5065							width: elemWidth,
5066							height: elemHeight
5067						},
5068						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
5069						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
5070					};
5071				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
5072					feedback.horizontal = "center";
5073				}
5074				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
5075					feedback.vertical = "middle";
5076				}
5077				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
5078					feedback.important = "horizontal";
5079				} else {
5080					feedback.important = "vertical";
5081				}
5082				options.using.call( this, props, feedback );
5083			};
5084		}
5085		elem.offset( $.extend( position, { using: using } ) );
5086	});
5087};
5088$.ui.position = {
5089	fit: {
5090		left: function( position, data ) {
5091			var within = data.within,
5092				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
5093				outerWidth = within.width,
5094				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
5095				overLeft = withinOffset - collisionPosLeft,
5096				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
5097				newOverRight;
5098			if ( data.collisionWidth > outerWidth ) {
5099				if ( overLeft > 0 && overRight <= 0 ) {
5100					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
5101					position.left += overLeft - newOverRight;
5102				} else if ( overRight > 0 && overLeft <= 0 ) {
5103					position.left = withinOffset;
5104				} else {
5105					if ( overLeft > overRight ) {
5106						position.left = withinOffset + outerWidth - data.collisionWidth;
5107					} else {
5108						position.left = withinOffset;
5109					}
5110				}
5111			} else if ( overLeft > 0 ) {
5112				position.left += overLeft;
5113			} else if ( overRight > 0 ) {
5114				position.left -= overRight;
5115			} else {
5116				position.left = max( position.left - collisionPosLeft, position.left );
5117			}
5118		},
5119		top: function( position, data ) {
5120			var within = data.within,
5121				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
5122				outerHeight = data.within.height,
5123				collisionPosTop = position.top - data.collisionPosition.marginTop,
5124				overTop = withinOffset - collisionPosTop,
5125				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
5126				newOverBottom;
5127			if ( data.collisionHeight > outerHeight ) {
5128				if ( overTop > 0 && overBottom <= 0 ) {
5129					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
5130					position.top += overTop - newOverBottom;
5131				} else if ( overBottom > 0 && overTop <= 0 ) {
5132					position.top = withinOffset;
5133				} else {
5134					if ( overTop > overBottom ) {
5135						position.top = withinOffset + outerHeight - data.collisionHeight;
5136					} else {
5137						position.top = withinOffset;
5138					}
5139				}
5140			} else if ( overTop > 0 ) {
5141				position.top += overTop;
5142			} else if ( overBottom > 0 ) {
5143				position.top -= overBottom;
5144			} else {
5145				position.top = max( position.top - collisionPosTop, position.top );
5146			}
5147		}
5148	},
5149	flip: {
5150		left: function( position, data ) {
5151			var within = data.within,
5152				withinOffset = within.offset.left + within.scrollLeft,
5153				outerWidth = within.width,
5154				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
5155				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
5156				overLeft = collisionPosLeft - offsetLeft,
5157				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
5158				myOffset = data.my[ 0 ] === "left" ?
5159					-data.elemWidth :
5160					data.my[ 0 ] === "right" ?
5161						data.elemWidth :
5162						0,
5163				atOffset = data.at[ 0 ] === "left" ?
5164					data.targetWidth :
5165					data.at[ 0 ] === "right" ?
5166						-data.targetWidth :
5167						0,
5168				offset = -2 * data.offset[ 0 ],
5169				newOverRight,
5170				newOverLeft;
5171
5172			if ( overLeft < 0 ) {
5173				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
5174				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
5175					position.left += myOffset + atOffset + offset;
5176				}
5177			}
5178			else if ( overRight > 0 ) {
5179				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
5180				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
5181					position.left += myOffset + atOffset + offset;
5182				}
5183			}
5184		},
5185		top: function( position, data ) {
5186			var within = data.within,
5187				withinOffset = within.offset.top + within.scrollTop,
5188				outerHeight = within.height,
5189				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
5190				collisionPosTop = position.top - data.collisionPosition.marginTop,
5191				overTop = collisionPosTop - offsetTop,
5192				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
5193				top = data.my[ 1 ] === "top",
5194				myOffset = top ?
5195					-data.elemHeight :
5196					data.my[ 1 ] === "bottom" ?
5197						data.elemHeight :
5198						0,
5199				atOffset = data.at[ 1 ] === "top" ?
5200					data.targetHeight :
5201					data.at[ 1 ] === "bottom" ?
5202						-data.targetHeight :
5203						0,
5204				offset = -2 * data.offset[ 1 ],
5205				newOverTop,
5206				newOverBottom;
5207			if ( overTop < 0 ) {
5208				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
5209				if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
5210					position.top += myOffset + atOffset + offset;
5211				}
5212			}
5213			else if ( overBottom > 0 ) {
5214				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
5215				if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
5216					position.top += myOffset + atOffset + offset;
5217				}
5218			}
5219		}
5220	},
5221	flipfit: {
5222		left: function() {
5223			$.ui.position.flip.left.apply( this, arguments );
5224			$.ui.position.fit.left.apply( this, arguments );
5225		},
5226		top: function() {
5227			$.ui.position.flip.top.apply( this, arguments );
5228			$.ui.position.fit.top.apply( this, arguments );
5229		}
5230	}
5231};
5232(function () {
5233	var testElement, testElementParent, testElementStyle, offsetLeft, i,
5234		body = document.getElementsByTagName( "body" )[ 0 ],
5235		div = document.createElement( "div" );
5236	testElement = document.createElement( body ? "div" : "body" );
5237	testElementStyle = {
5238		visibility: "hidden",
5239		width: 0,
5240		height: 0,
5241		border: 0,
5242		margin: 0,
5243		background: "none"
5244	};
5245	if ( body ) {
5246		$.extend( testElementStyle, {
5247			position: "absolute",
5248			left: "-1000px",
5249			top: "-1000px"
5250		});
5251	}
5252	for ( i in testElementStyle ) {
5253		testElement.style[ i ] = testElementStyle[ i ];
5254	}
5255	testElement.appendChild( div );
5256	testElementParent = body || document.documentElement;
5257	testElementParent.insertBefore( testElement, testElementParent.firstChild );
5258	div.style.cssText = "position: absolute; left: 10.7432222px;";
5259	offsetLeft = $( div ).offset().left;
5260	$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
5261	testElement.innerHTML = "";
5262	testElementParent.removeChild( testElement );
5263})();
5264}( jQuery ) );
5265(function( $, undefined ) {
5266$.widget("ui.draggable", $.ui.mouse, {
5267	version: "1.10.4",
5268	widgetEventPrefix: "drag",
5269	options: {
5270		addClasses: true,
5271		appendTo: "parent",
5272		axis: false,
5273		connectToSortable: false,
5274		containment: false,
5275		cursor: "auto",
5276		cursorAt: false,
5277		grid: false,
5278		handle: false,
5279		helper: "original",
5280		iframeFix: false,
5281		opacity: false,
5282		refreshPositions: false,
5283		revert: false,
5284		revertDuration: 500,
5285		scope: "default",
5286		scroll: true,
5287		scrollSensitivity: 20,
5288		scrollSpeed: 20,
5289		snap: false,
5290		snapMode: "both",
5291		snapTolerance: 20,
5292		stack: false,
5293		zIndex: false,
5294		drag: null,
5295		start: null,
5296		stop: null
5297	},
5298	_create: function() {
5299		if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
5300			this.element[0].style.position = "relative";
5301		}
5302		if (this.options.addClasses){
5303			this.element.addClass("ui-draggable");
5304		}
5305		if (this.options.disabled){
5306			this.element.addClass("ui-draggable-disabled");
5307		}
5308		this._mouseInit();
5309	},
5310	_destroy: function() {
5311		this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
5312		this._mouseDestroy();
5313	},
5314	_mouseCapture: function(event) {
5315		var o = this.options;
5316		if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
5317			return false;
5318		}
5319		this.handle = this._getHandle(event);
5320		if (!this.handle) {
5321			return false;
5322		}
5323		$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
5324			$("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
5325			.css({
5326				width: this.offsetWidth+"px", height: this.offsetHeight+"px",
5327				position: "absolute", opacity: "0.001", zIndex: 1000
5328			})
5329			.css($(this).offset())
5330			.appendTo("body");
5331		});
5332		return true;
5333	},
5334	_mouseStart: function(event) {
5335		var o = this.options;
5336		this.helper = this._createHelper(event);
5337		this.helper.addClass("ui-draggable-dragging");
5338		this._cacheHelperProportions();
5339		if($.ui.ddmanager) {
5340			$.ui.ddmanager.current = this;
5341		}
5342		this._cacheMargins();
5343		this.cssPosition = this.helper.css( "position" );
5344		this.scrollParent = this.helper.scrollParent();
5345		this.offsetParent = this.helper.offsetParent();
5346		this.offsetParentCssPosition = this.offsetParent.css( "position" );
5347		this.offset = this.positionAbs = this.element.offset();
5348		this.offset = {
5349			top: this.offset.top - this.margins.top,
5350			left: this.offset.left - this.margins.left
5351		};
5352		this.offset.scroll = false;
5353		$.extend(this.offset, {
5354			click: {
5355				left: event.pageX - this.offset.left,
5356				top: event.pageY - this.offset.top
5357			},
5358			parent: this._getParentOffset(),
5359			relative: this._getRelativeOffset()
5360		});
5361		this.originalPosition = this.position = this._generatePosition(event);
5362		this.originalPageX = event.pageX;
5363		this.originalPageY = event.pageY;
5364		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
5365		this._setContainment();
5366		if(this._trigger("start", event) === false) {
5367			this._clear();
5368			return false;
5369		}
5370		this._cacheHelperProportions();
5371		if ($.ui.ddmanager && !o.dropBehaviour) {
5372			$.ui.ddmanager.prepareOffsets(this, event);
5373		}
5374		this._mouseDrag(event, true);
5375		if ( $.ui.ddmanager ) {
5376			$.ui.ddmanager.dragStart(this, event);
5377		}
5378		return true;
5379	},
5380	_mouseDrag: function(event, noPropagation) {
5381		if ( this.offsetParentCssPosition === "fixed" ) {
5382			this.offset.parent = this._getParentOffset();
5383		}
5384		this.position = this._generatePosition(event);
5385		this.positionAbs = this._convertPositionTo("absolute");
5386		if (!noPropagation) {
5387			var ui = this._uiHash();
5388			if(this._trigger("drag", event, ui) === false) {
5389				this._mouseUp({});
5390				return false;
5391			}
5392			this.position = ui.position;
5393		}
5394		if(!this.options.axis || this.options.axis !== "y") {
5395			this.helper[0].style.left = this.position.left+"px";
5396		}
5397		if(!this.options.axis || this.options.axis !== "x") {
5398			this.helper[0].style.top = this.position.top+"px";
5399		}
5400		if($.ui.ddmanager) {
5401			$.ui.ddmanager.drag(this, event);
5402		}
5403		return false;
5404	},
5405	_mouseStop: function(event) {
5406		var that = this,
5407			dropped = false;
5408		if ($.ui.ddmanager && !this.options.dropBehaviour) {
5409			dropped = $.ui.ddmanager.drop(this, event);
5410		}
5411		if(this.dropped) {
5412			dropped = this.dropped;
5413			this.dropped = false;
5414		}
5415		if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {
5416			return false;
5417		}
5418		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))) {
5419			$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
5420				if(that._trigger("stop", event) !== false) {
5421					that._clear();
5422				}
5423			});
5424		} else {
5425			if(this._trigger("stop", event) !== false) {
5426				this._clear();
5427			}
5428		}
5429		return false;
5430	},
5431	_mouseUp: function(event) {
5432		$("div.ui-draggable-iframeFix").each(function() {
5433			this.parentNode.removeChild(this);
5434		});
5435		if( $.ui.ddmanager ) {
5436			$.ui.ddmanager.dragStop(this, event);
5437		}
5438		return $.ui.mouse.prototype._mouseUp.call(this, event);
5439	},
5440	cancel: function() {
5441		if(this.helper.is(".ui-draggable-dragging")) {
5442			this._mouseUp({});
5443		} else {
5444			this._clear();
5445		}
5446		return this;
5447	},
5448	_getHandle: function(event) {
5449		return this.options.handle ?
5450			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
5451			true;
5452	},
5453	_createHelper: function(event) {
5454		var o = this.options,
5455			helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
5456		if(!helper.parents("body").length) {
5457			helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
5458		}
5459		if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
5460			helper.css("position", "absolute");
5461		}
5462		return helper;
5463	},
5464	_adjustOffsetFromHelper: function(obj) {
5465		if (typeof obj === "string") {
5466			obj = obj.split(" ");
5467		}
5468		if ($.isArray(obj)) {
5469			obj = {left: +obj[0], top: +obj[1] || 0};
5470		}
5471		if ("left" in obj) {
5472			this.offset.click.left = obj.left + this.margins.left;
5473		}
5474		if ("right" in obj) {
5475			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
5476		}
5477		if ("top" in obj) {
5478			this.offset.click.top = obj.top + this.margins.top;
5479		}
5480		if ("bottom" in obj) {
5481			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
5482		}
5483	},
5484	_getParentOffset: function() {
5485		var po = this.offsetParent.offset();
5486		if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
5487			po.left += this.scrollParent.scrollLeft();
5488			po.top += this.scrollParent.scrollTop();
5489		}
5490		if((this.offsetParent[0] === document.body) ||
5491			(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
5492			po = { top: 0, left: 0 };
5493		}
5494		return {
5495			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
5496			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
5497		};
5498	},
5499	_getRelativeOffset: function() {
5500		if(this.cssPosition === "relative") {
5501			var p = this.element.position();
5502			return {
5503				top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
5504				left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
5505			};
5506		} else {
5507			return { top: 0, left: 0 };
5508		}
5509	},
5510	_cacheMargins: function() {
5511		this.margins = {
5512			left: (parseInt(this.element.css("marginLeft"),10) || 0),
5513			top: (parseInt(this.element.css("marginTop"),10) || 0),
5514			right: (parseInt(this.element.css("marginRight"),10) || 0),
5515			bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
5516		};
5517	},
5518	_cacheHelperProportions: function() {
5519		this.helperProportions = {
5520			width: this.helper.outerWidth(),
5521			height: this.helper.outerHeight()
5522		};
5523	},
5524	_setContainment: function() {
5525		var over, c, ce,
5526			o = this.options;
5527		if ( !o.containment ) {
5528			this.containment = null;
5529			return;
5530		}
5531		if ( o.containment === "window" ) {
5532			this.containment = [
5533				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
5534				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
5535				$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
5536				$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
5537			];
5538			return;
5539		}
5540		if ( o.containment === "document") {
5541			this.containment = [
5542				0,
5543				0,
5544				$( document ).width() - this.helperProportions.width - this.margins.left,
5545				( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
5546			];
5547			return;
5548		}
5549		if ( o.containment.constructor === Array ) {
5550			this.containment = o.containment;
5551			return;
5552		}
5553		if ( o.containment === "parent" ) {
5554			o.containment = this.helper[ 0 ].parentNode;
5555		}
5556		c = $( o.containment );
5557		ce = c[ 0 ];
5558		if( !ce ) {
5559			return;
5560		}
5561		over = c.css( "overflow" ) !== "hidden";
5562		this.containment = [
5563			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
5564			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) ,
5565			( over ? 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,
5566			( over ? 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
5567		];
5568		this.relative_container = c;
5569	},
5570	_convertPositionTo: function(d, pos) {
5571		if(!pos) {
5572			pos = this.position;
5573		}
5574		var mod = d === "absolute" ? 1 : -1,
5575			scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
5576		if (!this.offset.scroll) {
5577			this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
5578		}
5579		return {
5580			top: (
5581				pos.top	+
5582				this.offset.relative.top * mod +
5583				this.offset.parent.top * mod -
5584				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )
5585			),
5586			left: (
5587				pos.left +
5588				this.offset.relative.left * mod +
5589				this.offset.parent.left * mod	-
5590				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
5591			)
5592		};
5593
5594	},
5595	_generatePosition: function(event) {
5596		var containment, co, top, left,
5597			o = this.options,
5598			scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
5599			pageX = event.pageX,
5600			pageY = event.pageY;
5601		if (!this.offset.scroll) {
5602			this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
5603		}
5604		if ( this.originalPosition ) {
5605			if ( this.containment ) {
5606				if ( this.relative_container ){
5607					co = this.relative_container.offset();
5608					containment = [
5609						this.containment[ 0 ] + co.left,
5610						this.containment[ 1 ] + co.top,
5611						this.containment[ 2 ] + co.left,
5612						this.containment[ 3 ] + co.top
5613					];
5614				}
5615				else {
5616					containment = this.containment;
5617				}
5618				if(event.pageX - this.offset.click.left < containment[0]) {
5619					pageX = containment[0] + this.offset.click.left;
5620				}
5621				if(event.pageY - this.offset.click.top < containment[1]) {
5622					pageY = containment[1] + this.offset.click.top;
5623				}
5624				if(event.pageX - this.offset.click.left > containment[2]) {
5625					pageX = containment[2] + this.offset.click.left;
5626				}
5627				if(event.pageY - this.offset.click.top > containment[3]) {
5628					pageY = containment[3] + this.offset.click.top;
5629				}
5630			}
5631			if(o.grid) {
5632				top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
5633				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;
5634				left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
5635				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;
5636			}
5637		}
5638		return {
5639			top: (
5640				pageY -
5641				this.offset.click.top	-
5642				this.offset.relative.top -
5643				this.offset.parent.top +
5644				( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
5645			),
5646			left: (
5647				pageX -
5648				this.offset.click.left -
5649				this.offset.relative.left -
5650				this.offset.parent.left +
5651				( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )
5652			)
5653		};
5654	},
5655	_clear: function() {
5656		this.helper.removeClass("ui-draggable-dragging");
5657		if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
5658			this.helper.remove();
5659		}
5660		this.helper = null;
5661		this.cancelHelperRemoval = false;
5662	},
5663	_trigger: function(type, event, ui) {
5664		ui = ui || this._uiHash();
5665		$.ui.plugin.call(this, type, [event, ui]);
5666		if(type === "drag") {
5667			this.positionAbs = this._convertPositionTo("absolute");
5668		}
5669		return $.Widget.prototype._trigger.call(this, type, event, ui);
5670	},
5671	plugins: {},
5672	_uiHash: function() {
5673		return {
5674			helper: this.helper,
5675			position: this.position,
5676			originalPosition: this.originalPosition,
5677			offset: this.positionAbs
5678		};
5679	}
5680});
5681$.ui.plugin.add("draggable", "connectToSortable", {
5682	start: function(event, ui) {
5683		var inst = $(this).data("ui-draggable"), o = inst.options,
5684			uiSortable = $.extend({}, ui, { item: inst.element });
5685		inst.sortables = [];
5686		$(o.connectToSortable).each(function() {
5687			var sortable = $.data(this, "ui-sortable");
5688			if (sortable && !sortable.options.disabled) {
5689				inst.sortables.push({
5690					instance: sortable,
5691					shouldRevert: sortable.options.revert
5692				});
5693				sortable.refreshPositions();
5694				sortable._trigger("activate", event, uiSortable);
5695			}
5696		});
5697	},
5698	stop: function(event, ui) {
5699		var inst = $(this).data("ui-draggable"),
5700			uiSortable = $.extend({}, ui, { item: inst.element });
5701		$.each(inst.sortables, function() {
5702			if(this.instance.isOver) {
5703				this.instance.isOver = 0;
5704				inst.cancelHelperRemoval = true;
5705				this.instance.cancelHelperRemoval = false;
5706				if(this.shouldRevert) {
5707					this.instance.options.revert = this.shouldRevert;
5708				}
5709				this.instance._mouseStop(event);
5710				this.instance.options.helper = this.instance.options._helper;
5711				if(inst.options.helper === "original") {
5712					this.instance.currentItem.css({ top: "auto", left: "auto" });
5713				}
5714			} else {
5715				this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
5716				this.instance._trigger("deactivate", event, uiSortable);
5717			}
5718		});
5719	},
5720	drag: function(event, ui) {
5721		var inst = $(this).data("ui-draggable"), that = this;
5722		$.each(inst.sortables, function() {
5723			var innermostIntersecting = false,
5724				thisSortable = this;
5725			this.instance.positionAbs = inst.positionAbs;
5726			this.instance.helperProportions = inst.helperProportions;
5727			this.instance.offset.click = inst.offset.click;
5728			if(this.instance._intersectsWith(this.instance.containerCache)) {
5729				innermostIntersecting = true;
5730				$.each(inst.sortables, function () {
5731					this.instance.positionAbs = inst.positionAbs;
5732					this.instance.helperProportions = inst.helperProportions;
5733					this.instance.offset.click = inst.offset.click;
5734					if (this !== thisSortable &&
5735						this.instance._intersectsWith(this.instance.containerCache) &&
5736						$.contains(thisSortable.instance.element[0], this.instance.element[0])
5737					) {
5738						innermostIntersecting = false;
5739					}
5740					return innermostIntersecting;
5741				});
5742			}
5743			if(innermostIntersecting) {
5744				if(!this.instance.isOver) {
5745					this.instance.isOver = 1;
5746					this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
5747					this.instance.options._helper = this.instance.options.helper;
5748					this.instance.options.helper = function() { return ui.helper[0]; };
5749					event.target = this.instance.currentItem[0];
5750					this.instance._mouseCapture(event, true);
5751					this.instance._mouseStart(event, true, true);
5752					this.instance.offset.click.top = inst.offset.click.top;
5753					this.instance.offset.click.left = inst.offset.click.left;
5754					this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
5755					this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
5756					inst._trigger("toSortable", event);
5757					inst.dropped = this.instance.element
5758					inst.currentItem = inst.element;
5759					this.instance.fromOutside = inst;
5760				}
5761				if(this.instance.currentItem) {
5762					this.instance._mouseDrag(event);
5763				}
5764			} else {
5765				if(this.instance.isOver) {
5766					this.instance.isOver = 0;
5767					this.instance.cancelHelperRemoval = true;
5768					this.instance.options.revert = false;
5769					this.instance._trigger("out", event, this.instance._uiHash(this.instance));
5770					this.instance._mouseStop(event, true);
5771					this.instance.options.helper = this.instance.options._helper;
5772					this.instance.currentItem.remove();
5773					if(this.instance.placeholder) {
5774						this.instance.placeholder.remove();
5775					}
5776					inst._trigger("fromSortable", event);
5777					inst.dropped = false;
5778				}
5779			}
5780		});
5781	}
5782});
5783$.ui.plugin.add("draggable", "cursor", {
5784	start: function() {
5785		var t = $("body"), o = $(this).data("ui-draggable").options;
5786		if (t.css("cursor")) {
5787			o._cursor = t.css("cursor");
5788		}
5789		t.css("cursor", o.cursor);
5790	},
5791	stop: function() {
5792		var o = $(this).data("ui-draggable").options;
5793		if (o._cursor) {
5794			$("body").css("cursor", o._cursor);
5795		}
5796	}
5797});
5798$.ui.plugin.add("draggable", "opacity", {
5799	start: function(event, ui) {
5800		var t = $(ui.helper), o = $(this).data("ui-draggable").options;
5801		if(t.css("opacity")) {
5802			o._opacity = t.css("opacity");
5803		}
5804		t.css("opacity", o.opacity);
5805	},
5806	stop: function(event, ui) {
5807		var o = $(this).data("ui-draggable").options;
5808		if(o._opacity) {
5809			$(ui.helper).css("opacity", o._opacity);
5810		}
5811	}
5812});
5813$.ui.plugin.add("draggable", "scroll", {
5814	start: function() {
5815		var i = $(this).data("ui-draggable");
5816		if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
5817			i.overflowOffset = i.scrollParent.offset();
5818		}
5819	},
5820	drag: function( event ) {
5821		var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
5822		if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
5823			if(!o.axis || o.axis !== "x") {
5824				if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
5825					i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
5826				} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
5827					i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
5828				}
5829			}
5830			if(!o.axis || o.axis !== "y") {
5831				if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
5832					i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
5833				} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
5834					i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
5835				}
5836			}
5837		} else {
5838			if(!o.axis || o.axis !== "x") {
5839				if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
5840					scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
5841				} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
5842					scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
5843				}
5844			}
5845			if(!o.axis || o.axis !== "y") {
5846				if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
5847					scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
5848				} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
5849					scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
5850				}
5851			}
5852		}
5853		if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
5854			$.ui.ddmanager.prepareOffsets(i, event);
5855		}
5856	}
5857});
5858$.ui.plugin.add("draggable", "snap", {
5859	start: function() {
5860		var i = $(this).data("ui-draggable"),
5861			o = i.options;
5862		i.snapElements = [];
5863		$(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
5864			var $t = $(this),
5865				$o = $t.offset();
5866			if(this !== i.element[0]) {
5867				i.snapElements.push({
5868					item: this,
5869					width: $t.outerWidth(), height: $t.outerHeight(),
5870					top: $o.top, left: $o.left
5871				});
5872			}
5873		});
5874	},
5875	drag: function(event, ui) {
5876		var ts, bs, ls, rs, l, r, t, b, i, first,
5877			inst = $(this).data("ui-draggable"),
5878			o = inst.options,
5879			d = o.snapTolerance,
5880			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
5881			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
5882		for (i = inst.snapElements.length - 1; i >= 0; i--){
5883			l = inst.snapElements[i].left;
5884			r = l + inst.snapElements[i].width;
5885			t = inst.snapElements[i].top;
5886			b = t + inst.snapElements[i].height;
5887			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
5888				if(inst.snapElements[i].snapping) {
5889					(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
5890				}
5891				inst.snapElements[i].snapping = false;
5892				continue;
5893			}
5894			if(o.snapMode !== "inner") {
5895				ts = Math.abs(t - y2) <= d;
5896				bs = Math.abs(b - y1) <= d;
5897				ls = Math.abs(l - x2) <= d;
5898				rs = Math.abs(r - x1) <= d;
5899				if(ts) {
5900					ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
5901				}
5902				if(bs) {
5903					ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
5904				}
5905				if(ls) {
5906					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
5907				}
5908				if(rs) {
5909					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
5910				}
5911			}
5912			first = (ts || bs || ls || rs);
5913			if(o.snapMode !== "outer") {
5914				ts = Math.abs(t - y1) <= d;
5915				bs = Math.abs(b - y2) <= d;
5916				ls = Math.abs(l - x1) <= d;
5917				rs = Math.abs(r - x2) <= d;
5918				if(ts) {
5919					ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
5920				}
5921				if(bs) {
5922					ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
5923				}
5924				if(ls) {
5925					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
5926				}
5927				if(rs) {
5928					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
5929				}
5930			}
5931			if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
5932				(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
5933			}
5934			inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
5935		}
5936	}
5937});
5938$.ui.plugin.add("draggable", "stack", {
5939	start: function() {
5940		var min,
5941			o = this.data("ui-draggable").options,
5942			group = $.makeArray($(o.stack)).sort(function(a,b) {
5943				return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
5944			});
5945		if (!group.length) { return; }
5946		min = parseInt($(group[0]).css("zIndex"), 10) || 0;
5947		$(group).each(function(i) {
5948			$(this).css("zIndex", min + i);
5949		});
5950		this.css("zIndex", (min + group.length));
5951	}
5952});
5953$.ui.plugin.add("draggable", "zIndex", {
5954	start: function(event, ui) {
5955		var t = $(ui.helper), o = $(this).data("ui-draggable").options;
5956		if(t.css("zIndex")) {
5957			o._zIndex = t.css("zIndex");
5958		}
5959		t.css("zIndex", o.zIndex);
5960	},
5961	stop: function(event, ui) {
5962		var o = $(this).data("ui-draggable").options;
5963		if(o._zIndex) {
5964			$(ui.helper).css("zIndex", o._zIndex);
5965		}
5966	}
5967});
5968})(jQuery);
5969(function( $, undefined ) {
5970function num(v) {
5971	return parseInt(v, 10) || 0;
5972}
5973function isNumber(value) {
5974	return !isNaN(parseInt(value, 10));
5975}
5976$.widget("ui.resizable", $.ui.mouse, {
5977	version: "1.10.4",
5978	widgetEventPrefix: "resize",
5979	options: {
5980		alsoResize: false,
5981		animate: false,
5982		animateDuration: "slow",
5983		animateEasing: "swing",
5984		aspectRatio: false,
5985		autoHide: false,
5986		containment: false,
5987		ghost: false,
5988		grid: false,
5989		handles: "e,s,se",
5990		helper: false,
5991		maxHeight: null,
5992		maxWidth: null,
5993		minHeight: 10,
5994		minWidth: 10,
5995		zIndex: 90,
5996		resize: null,
5997		start: null,
5998		stop: null
5999	},
6000	_create: function() {
6001		var n, i, handle, axis, hname,
6002			that = this,
6003			o = this.options;
6004		this.element.addClass("ui-resizable");
6005		$.extend(this, {
6006			_aspectRatio: !!(o.aspectRatio),
6007			aspectRatio: o.aspectRatio,
6008			originalElement: this.element,
6009			_proportionallyResizeElements: [],
6010			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
6011		});
6012		if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
6013			this.element.wrap(
6014				$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
6015					position: this.element.css("position"),
6016					width: this.element.outerWidth(),
6017					height: this.element.outerHeight(),
6018					top: this.element.css("top"),
6019					left: this.element.css("left")
6020				})
6021			);
6022			this.element = this.element.parent().data(
6023				"ui-resizable", this.element.data("ui-resizable")
6024			);
6025			this.elementIsWrapper = true;
6026			this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
6027			this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
6028			this.originalResizeStyle = this.originalElement.css("resize");
6029			this.originalElement.css("resize", "none");
6030			this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" }));
6031			this.originalElement.css({ margin: this.originalElement.css("margin") });
6032			this._proportionallyResize();
6033		}
6034		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" });
6035		if(this.handles.constructor === String) {
6036			if ( this.handles === "all") {
6037				this.handles = "n,e,s,w,se,sw,ne,nw";
6038			}
6039			n = this.handles.split(",");
6040			this.handles = {};
6041			for(i = 0; i < n.length; i++) {
6042				handle = $.trim(n[i]);
6043				hname = "ui-resizable-"+handle;
6044				axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
6045				axis.css({ zIndex: o.zIndex });
6046				if ("se" === handle) {
6047					axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
6048				}
6049				this.handles[handle] = ".ui-resizable-"+handle;
6050				this.element.append(axis);
6051			}
6052		}
6053		this._renderAxis = function(target) {
6054			var i, axis, padPos, padWrapper;
6055			target = target || this.element;
6056			for(i in this.handles) {
6057				if(this.handles[i].constructor === String) {
6058					this.handles[i] = $(this.handles[i], this.element).show();
6059				}
6060				if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
6061					axis = $(this.handles[i], this.element);
6062					padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
6063					padPos = [ "padding",
6064						/ne|nw|n/.test(i) ? "Top" :
6065						/se|sw|s/.test(i) ? "Bottom" :
6066						/^e$/.test(i) ? "Right" : "Left" ].join("");
6067					target.css(padPos, padWrapper);
6068					this._proportionallyResize();
6069				}
6070				if(!$(this.handles[i]).length) {
6071					continue;
6072				}
6073			}
6074		};
6075		this._renderAxis(this.element);
6076		this._handles = $(".ui-resizable-handle", this.element)
6077			.disableSelection();
6078		this._handles.mouseover(function() {
6079			if (!that.resizing) {
6080				if (this.className) {
6081					axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
6082				}
6083				that.axis = axis && axis[1] ? axis[1] : "se";
6084			}
6085		});
6086		if (o.autoHide) {
6087			this._handles.hide();
6088			$(this.element)
6089				.addClass("ui-resizable-autohide")
6090				.mouseenter(function() {
6091					if (o.disabled) {
6092						return;
6093					}
6094					$(this).removeClass("ui-resizable-autohide");
6095					that._handles.show();
6096				})
6097				.mouseleave(function(){
6098					if (o.disabled) {
6099						return;
6100					}
6101					if (!that.resizing) {
6102						$(this).addClass("ui-resizable-autohide");
6103						that._handles.hide();
6104					}
6105				});
6106		}
6107		this._mouseInit();
6108	},
6109	_destroy: function() {
6110		this._mouseDestroy();
6111		var wrapper,
6112			_destroy = function(exp) {
6113				$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
6114					.removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
6115			};
6116		if (this.elementIsWrapper) {
6117			_destroy(this.element);
6118			wrapper = this.element;
6119			this.originalElement.css({
6120				position: wrapper.css("position"),
6121				width: wrapper.outerWidth(),
6122				height: wrapper.outerHeight(),
6123				top: wrapper.css("top"),
6124				left: wrapper.css("left")
6125			}).insertAfter( wrapper );
6126			wrapper.remove();
6127		}
6128		this.originalElement.css("resize", this.originalResizeStyle);
6129		_destroy(this.originalElement);
6130		return this;
6131	},
6132	_mouseCapture: function(event) {
6133		var i, handle,
6134			capture = false;
6135		for (i in this.handles) {
6136			handle = $(this.handles[i])[0];
6137			if (handle === event.target || $.contains(handle, event.target)) {
6138				capture = true;
6139			}
6140		}
6141		return !this.options.disabled && capture;
6142	},
6143	_mouseStart: function(event) {
6144		var curleft, curtop, cursor,
6145			o = this.options,
6146			iniPos = this.element.position(),
6147			el = this.element;
6148		this.resizing = true;
6149		if ( (/absolute/).test( el.css("position") ) ) {
6150			el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
6151		} else if (el.is(".ui-draggable")) {
6152			el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
6153		}
6154		this._renderProxy();
6155		curleft = num(this.helper.css("left"));
6156		curtop = num(this.helper.css("top"));
6157		if (o.containment) {
6158			curleft += $(o.containment).scrollLeft() || 0;
6159			curtop += $(o.containment).scrollTop() || 0;
6160		}
6161		this.offset = this.helper.offset();
6162		this.position = { left: curleft, top: curtop };
6163		this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() };
6164		this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
6165		this.originalPosition = { left: curleft, top: curtop };
6166		this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
6167		this.originalMousePosition = { left: event.pageX, top: event.pageY };
6168		this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
6169		cursor = $(".ui-resizable-" + this.axis).css("cursor");
6170		$("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
6171		el.addClass("ui-resizable-resizing");
6172		this._propagate("start", event);
6173		return true;
6174	},
6175	_mouseDrag: function(event) {
6176		var data,
6177			el = this.helper, props = {},
6178			smp = this.originalMousePosition,
6179			a = this.axis,
6180			prevTop = this.position.top,
6181			prevLeft = this.position.left,
6182			prevWidth = this.size.width,
6183			prevHeight = this.size.height,
6184			dx = (event.pageX-smp.left)||0,
6185			dy = (event.pageY-smp.top)||0,
6186			trigger = this._change[a];
6187		if (!trigger) {
6188			return false;
6189		}
6190		data = trigger.apply(this, [event, dx, dy]);
6191		this._updateVirtualBoundaries(event.shiftKey);
6192		if (this._aspectRatio || event.shiftKey) {
6193			data = this._updateRatio(data, event);
6194		}
6195		data = this._respectSize(data, event);
6196		this._updateCache(data);
6197		this._propagate("resize", event);
6198		if (this.position.top !== prevTop) {
6199			props.top = this.position.top + "px";
6200		}
6201		if (this.position.left !== prevLeft) {
6202			props.left = this.position.left + "px";
6203		}
6204		if (this.size.width !== prevWidth) {
6205			props.width = this.size.width + "px";
6206		}
6207		if (this.size.height !== prevHeight) {
6208			props.height = this.size.height + "px";
6209		}
6210		el.css(props);
6211		if (!this._helper && this._proportionallyResizeElements.length) {
6212			this._proportionallyResize();
6213		}
6214		if ( ! $.isEmptyObject(props) ) {
6215			this._trigger("resize", event, this.ui());
6216		}
6217		return false;
6218	},
6219	_mouseStop: function(event) {
6220		this.resizing = false;
6221		var pr, ista, soffseth, soffsetw, s, left, top,
6222			o = this.options, that = this;
6223		if(this._helper) {
6224			pr = this._proportionallyResizeElements;
6225			ista = pr.length && (/textarea/i).test(pr[0].nodeName);
6226			soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
6227			soffsetw = ista ? 0 : that.sizeDiff.width;
6228			s = { width: (that.helper.width()  - soffsetw), height: (that.helper.height() - soffseth) };
6229			left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
6230			top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
6231			if (!o.animate) {
6232				this.element.css($.extend(s, { top: top, left: left }));
6233			}
6234			that.helper.height(that.size.height);
6235			that.helper.width(that.size.width);
6236			if (this._helper && !o.animate) {
6237				this._proportionallyResize();
6238			}
6239		}
6240		$("body").css("cursor", "auto");
6241		this.element.removeClass("ui-resizable-resizing");
6242		this._propagate("stop", event);
6243		if (this._helper) {
6244			this.helper.remove();
6245		}
6246		return false;
6247	},
6248	_updateVirtualBoundaries: function(forceAspectRatio) {
6249		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
6250			o = this.options;
6251		b = {
6252			minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
6253			maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
6254			minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
6255			maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
6256		};
6257		if(this._aspectRatio || forceAspectRatio) {
6258			pMinWidth = b.minHeight * this.aspectRatio;
6259			pMinHeight = b.minWidth / this.aspectRatio;
6260			pMaxWidth = b.maxHeight * this.aspectRatio;
6261			pMaxHeight = b.maxWidth / this.aspectRatio;
6262			if(pMinWidth > b.minWidth) {
6263				b.minWidth = pMinWidth;
6264			}
6265			if(pMinHeight > b.minHeight) {
6266				b.minHeight = pMinHeight;
6267			}
6268			if(pMaxWidth < b.maxWidth) {
6269				b.maxWidth = pMaxWidth;
6270			}
6271			if(pMaxHeight < b.maxHeight) {
6272				b.maxHeight = pMaxHeight;
6273			}
6274		}
6275		this._vBoundaries = b;
6276	},
6277	_updateCache: function(data) {
6278		this.offset = this.helper.offset();
6279		if (isNumber(data.left)) {
6280			this.position.left = data.left;
6281		}
6282		if (isNumber(data.top)) {
6283			this.position.top = data.top;
6284		}
6285		if (isNumber(data.height)) {
6286			this.size.height = data.height;
6287		}
6288		if (isNumber(data.width)) {
6289			this.size.width = data.width;
6290		}
6291	},
6292	_updateRatio: function( data ) {
6293		var cpos = this.position,
6294			csize = this.size,
6295			a = this.axis;
6296		if (isNumber(data.height)) {
6297			data.width = (data.height * this.aspectRatio);
6298		} else if (isNumber(data.width)) {
6299			data.height = (data.width / this.aspectRatio);
6300		}
6301		if (a === "sw") {
6302			data.left = cpos.left + (csize.width - data.width);
6303			data.top = null;
6304		}
6305		if (a === "nw") {
6306			data.top = cpos.top + (csize.height - data.height);
6307			data.left = cpos.left + (csize.width - data.width);
6308		}
6309		return data;
6310	},
6311	_respectSize: function( data ) {
6312		var o = this._vBoundaries,
6313			a = this.axis,
6314			ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
6315			isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
6316			dw = this.originalPosition.left + this.originalSize.width,
6317			dh = this.position.top + this.size.height,
6318			cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
6319		if (isminw) {
6320			data.width = o.minWidth;
6321		}
6322		if (isminh) {
6323			data.height = o.minHeight;
6324		}
6325		if (ismaxw) {
6326			data.width = o.maxWidth;
6327		}
6328		if (ismaxh) {
6329			data.height = o.maxHeight;
6330		}
6331		if (isminw && cw) {
6332			data.left = dw - o.minWidth;
6333		}
6334		if (ismaxw && cw) {
6335			data.left = dw - o.maxWidth;
6336		}
6337		if (isminh && ch) {
6338			data.top = dh - o.minHeight;
6339		}
6340		if (ismaxh && ch) {
6341			data.top = dh - o.maxHeight;
6342		}
6343		if (!data.width && !data.height && !data.left && data.top) {
6344			data.top = null;
6345		} else if (!data.width && !data.height && !data.top && data.left) {
6346			data.left = null;
6347		}
6348		return data;
6349	},
6350	_proportionallyResize: function() {
6351		if (!this._proportionallyResizeElements.length) {
6352			return;
6353		}
6354		var i, j, borders, paddings, prel,
6355			element = this.helper || this.element;
6356		for ( i=0; i < this._proportionallyResizeElements.length; i++) {
6357			prel = this._proportionallyResizeElements[i];
6358			if (!this.borderDif) {
6359				this.borderDif = [];
6360				borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
6361				paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
6362				for ( j = 0; j < borders.length; j++ ) {
6363					this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
6364				}
6365			}
6366			prel.css({
6367				height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
6368				width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
6369			});
6370		}
6371	},
6372	_renderProxy: function() {
6373		var el = this.element, o = this.options;
6374		this.elementOffset = el.offset();
6375		if(this._helper) {
6376			this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
6377			this.helper.addClass(this._helper).css({
6378				width: this.element.outerWidth() - 1,
6379				height: this.element.outerHeight() - 1,
6380				position: "absolute",
6381				left: this.elementOffset.left +"px",
6382				top: this.elementOffset.top +"px",
6383				zIndex: ++o.zIndex
6384			});
6385			this.helper
6386				.appendTo("body")
6387				.disableSelection();
6388		} else {
6389			this.helper = this.element;
6390		}
6391	},
6392	_change: {
6393		e: function(event, dx) {
6394			return { width: this.originalSize.width + dx };
6395		},
6396		w: function(event, dx) {
6397			var cs = this.originalSize, sp = this.originalPosition;
6398			return { left: sp.left + dx, width: cs.width - dx };
6399		},
6400		n: function(event, dx, dy) {
6401			var cs = this.originalSize, sp = this.originalPosition;
6402			return { top: sp.top + dy, height: cs.height - dy };
6403		},
6404		s: function(event, dx, dy) {
6405			return { height: this.originalSize.height + dy };
6406		},
6407		se: function(event, dx, dy) {
6408			return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
6409		},
6410		sw: function(event, dx, dy) {
6411			return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
6412		},
6413		ne: function(event, dx, dy) {
6414			return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
6415		},
6416		nw: function(event, dx, dy) {
6417			return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
6418		}
6419	},
6420	_propagate: function(n, event) {
6421		$.ui.plugin.call(this, n, [event, this.ui()]);
6422		(n !== "resize" && this._trigger(n, event, this.ui()));
6423	},
6424	plugins: {},
6425	ui: function() {
6426		return {
6427			originalElement: this.originalElement,
6428			element: this.element,
6429			helper: this.helper,
6430			position: this.position,
6431			size: this.size,
6432			originalSize: this.originalSize,
6433			originalPosition: this.originalPosition
6434		};
6435	}
6436});
6437$.ui.plugin.add("resizable", "animate", {
6438	stop: function( event ) {
6439		var that = $(this).data("ui-resizable"),
6440			o = that.options,
6441			pr = that._proportionallyResizeElements,
6442			ista = pr.length && (/textarea/i).test(pr[0].nodeName),
6443			soffseth = ista && $.ui.hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height,
6444			soffsetw = ista ? 0 : that.sizeDiff.width,
6445			style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
6446			left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
6447			top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
6448		that.element.animate(
6449			$.extend(style, top && left ? { top: top, left: left } : {}), {
6450				duration: o.animateDuration,
6451				easing: o.animateEasing,
6452				step: function() {
6453					var data = {
6454						width: parseInt(that.element.css("width"), 10),
6455						height: parseInt(that.element.css("height"), 10),
6456						top: parseInt(that.element.css("top"), 10),
6457						left: parseInt(that.element.css("left"), 10)
6458					};
6459					if (pr && pr.length) {
6460						$(pr[0]).css({ width: data.width, height: data.height });
6461					}
6462					that._updateCache(data);
6463					that._propagate("resize", event);
6464				}
6465			}
6466		);
6467	}
6468});
6469$.ui.plugin.add("resizable", "containment", {
6470	start: function() {
6471		var element, p, co, ch, cw, width, height,
6472			that = $(this).data("ui-resizable"),
6473			o = that.options,
6474			el = that.element,
6475			oc = o.containment,
6476			ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
6477		if (!ce) {
6478			return;
6479		}
6480		that.containerElement = $(ce);
6481		if (/document/.test(oc) || oc === document) {
6482			that.containerOffset = { left: 0, top: 0 };
6483			that.containerPosition = { left: 0, top: 0 };
6484			that.parentData = {
6485				element: $(document), left: 0, top: 0,
6486				width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
6487			};
6488		}
6489		else {
6490			element = $(ce);
6491			p = [];
6492			$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
6493			that.containerOffset = element.offset();
6494			that.containerPosition = element.position();
6495			that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
6496			co = that.containerOffset;
6497			ch = that.containerSize.height;
6498			cw = that.containerSize.width;
6499			width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
6500			height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
6501			that.parentData = {
6502				element: ce, left: co.left, top: co.top, width: width, height: height
6503			};
6504		}
6505	},
6506	resize: function( event ) {
6507		var woset, hoset, isParent, isOffsetRelative,
6508			that = $(this).data("ui-resizable"),
6509			o = that.options,
6510			co = that.containerOffset, cp = that.position,
6511			pRatio = that._aspectRatio || event.shiftKey,
6512			cop = { top:0, left:0 }, ce = that.containerElement;
6513
6514		if (ce[0] !== document && (/static/).test(ce.css("position"))) {
6515			cop = co;
6516		}
6517		if (cp.left < (that._helper ? co.left : 0)) {
6518			that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
6519			if (pRatio) {
6520				that.size.height = that.size.width / that.aspectRatio;
6521			}
6522			that.position.left = o.helper ? co.left : 0;
6523		}
6524		if (cp.top < (that._helper ? co.top : 0)) {
6525			that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
6526			if (pRatio) {
6527				that.size.width = that.size.height * that.aspectRatio;
6528			}
6529			that.position.top = that._helper ? co.top : 0;
6530		}
6531		that.offset.left = that.parentData.left+that.position.left;
6532		that.offset.top = that.parentData.top+that.position.top;
6533		woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
6534		hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
6535		isParent = that.containerElement.get(0) === that.element.parent().get(0);
6536		isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
6537		if ( isParent && isOffsetRelative ) {
6538			woset -= Math.abs( that.parentData.left );
6539		}
6540		if (woset + that.size.width >= that.parentData.width) {
6541			that.size.width = that.parentData.width - woset;
6542			if (pRatio) {
6543				that.size.height = that.size.width / that.aspectRatio;
6544			}
6545		}
6546		if (hoset + that.size.height >= that.parentData.height) {
6547			that.size.height = that.parentData.height - hoset;
6548			if (pRatio) {
6549				that.size.width = that.size.height * that.aspectRatio;
6550			}
6551		}
6552	},
6553	stop: function(){
6554		var that = $(this).data("ui-resizable"),
6555			o = that.options,
6556			co = that.containerOffset,
6557			cop = that.containerPosition,
6558			ce = that.containerElement,
6559			helper = $(that.helper),
6560			ho = helper.offset(),
6561			w = helper.outerWidth() - that.sizeDiff.width,
6562			h = helper.outerHeight() - that.sizeDiff.height;
6563		if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
6564			$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
6565		}
6566		if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
6567			$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
6568		}
6569	}
6570});
6571$.ui.plugin.add("resizable", "alsoResize", {
6572	start: function () {
6573		var that = $(this).data("ui-resizable"),
6574			o = that.options,
6575			_store = function (exp) {
6576				$(exp).each(function() {
6577					var el = $(this);
6578					el.data("ui-resizable-alsoresize", {
6579						width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
6580						left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
6581					});
6582				});
6583			};
6584		if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
6585			if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
6586			else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
6587		}else{
6588			_store(o.alsoResize);
6589		}
6590	},
6591	resize: function (event, ui) {
6592		var that = $(this).data("ui-resizable"),
6593			o = that.options,
6594			os = that.originalSize,
6595			op = that.originalPosition,
6596			delta = {
6597				height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
6598				top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
6599			},
6600			_alsoResize = function (exp, c) {
6601				$(exp).each(function() {
6602					var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
6603						css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
vendor: 10,866 bytes, lines 6604-6967
6604					$.each(css, function (i, prop) {
6605						var sum = (start[prop]||0) + (delta[prop]||0);
6606						if (sum && sum >= 0) {
6607							style[prop] = sum || null;
6608						}
6609					});
6610					el.css(style);
6611				});
6612			};
6613		if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
6614			$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
6615		}else{
6616			_alsoResize(o.alsoResize);
6617		}
6618	},
6619	stop: function () {
6620		$(this).removeData("resizable-alsoresize");
6621	}
6622});
6623$.ui.plugin.add("resizable", "ghost", {
6624	start: function() {
6625		var that = $(this).data("ui-resizable"), o = that.options, cs = that.size;
6626		that.ghost = that.originalElement.clone();
6627		that.ghost
6628			.css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
6629			.addClass("ui-resizable-ghost")
6630			.addClass(typeof o.ghost === "string" ? o.ghost : "");
6631		that.ghost.appendTo(that.helper);
6632	},
6633	resize: function(){
6634		var that = $(this).data("ui-resizable");
6635		if (that.ghost) {
6636			that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
6637		}
6638	},
6639	stop: function() {
6640		var that = $(this).data("ui-resizable");
6641		if (that.ghost && that.helper) {
6642			that.helper.get(0).removeChild(that.ghost.get(0));
6643		}
6644	}
6645});
6646$.ui.plugin.add("resizable", "grid", {
6647	resize: function() {
6648		var that = $(this).data("ui-resizable"),
6649			o = that.options,
6650			cs = that.size,
6651			os = that.originalSize,
6652			op = that.originalPosition,
6653			a = that.axis,
6654			grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid,
6655			gridX = (grid[0]||1),
6656			gridY = (grid[1]||1),
6657			ox = Math.round((cs.width - os.width) / gridX) * gridX,
6658			oy = Math.round((cs.height - os.height) / gridY) * gridY,
6659			newWidth = os.width + ox,
6660			newHeight = os.height + oy,
6661			isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
6662			isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
6663			isMinWidth = o.minWidth && (o.minWidth > newWidth),
6664			isMinHeight = o.minHeight && (o.minHeight > newHeight);
6665		o.grid = grid;
6666		if (isMinWidth) {
6667			newWidth = newWidth + gridX;
6668		}
6669		if (isMinHeight) {
6670			newHeight = newHeight + gridY;
6671		}
6672		if (isMaxWidth) {
6673			newWidth = newWidth - gridX;
6674		}
6675		if (isMaxHeight) {
6676			newHeight = newHeight - gridY;
6677		}
6678		if (/^(se|s|e)$/.test(a)) {
6679			that.size.width = newWidth;
6680			that.size.height = newHeight;
6681		} else if (/^(ne)$/.test(a)) {
6682			that.size.width = newWidth;
6683			that.size.height = newHeight;
6684			that.position.top = op.top - oy;
6685		} else if (/^(sw)$/.test(a)) {
6686			that.size.width = newWidth;
6687			that.size.height = newHeight;
6688			that.position.left = op.left - ox;
6689		} else {
6690			if ( newHeight - gridY > 0 ) {
6691				that.size.height = newHeight;
6692				that.position.top = op.top - oy;
6693			} else {
6694				that.size.height = gridY;
6695				that.position.top = op.top + os.height - gridY;
6696			}
6697			if ( newWidth - gridX > 0 ) {
6698				that.size.width = newWidth;
6699				that.position.left = op.left - ox;
6700			} else {
6701				that.size.width = gridX;
6702				that.position.left = op.left + os.width - gridX;
6703			}
6704		}
6705	}
6706});
6707})(jQuery);
6708(function( $, undefined ) {
6709var lastActive,
6710	baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
6711	typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
6712	formResetHandler = function() {
6713		var form = $( this );
6714		setTimeout(function() {
6715			form.find( ":ui-button" ).button( "refresh" );
6716		}, 1 );
6717	},
6718	radioGroup = function( radio ) {
6719		var name = radio.name,
6720			form = radio.form,
6721			radios = $( [] );
6722		if ( name ) {
6723			name = name.replace( /'/g, "\\'" );
6724			if ( form ) {
6725				radios = $( form ).find( "[name='" + name + "']" );
6726			} else {
6727				radios = $( "[name='" + name + "']", radio.ownerDocument )
6728					.filter(function() {
6729						return !this.form;
6730					});
6731			}
6732		}
6733		return radios;
6734	};
6735$.widget( "ui.button", {
6736	version: "1.10.4",
6737	defaultElement: "<button>",
6738	options: {
6739		disabled: null,
6740		text: true,
6741		label: null,
6742		icons: {
6743			primary: null,
6744			secondary: null
6745		}
6746	},
6747	_create: function() {
6748		this.element.closest( "form" )
6749			.unbind( "reset" + this.eventNamespace )
6750			.bind( "reset" + this.eventNamespace, formResetHandler );
6751		if ( typeof this.options.disabled !== "boolean" ) {
6752			this.options.disabled = !!this.element.prop( "disabled" );
6753		} else {
6754			this.element.prop( "disabled", this.options.disabled );
6755		}
6756		this._determineButtonType();
6757		this.hasTitle = !!this.buttonElement.attr( "title" );
6758		var that = this,
6759			options = this.options,
6760			toggleButton = this.type === "checkbox" || this.type === "radio",
6761			activeClass = !toggleButton ? "ui-state-active" : "";
6762		if ( options.label === null ) {
6763			options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
6764		}
6765		this._hoverable( this.buttonElement );
6766		this.buttonElement
6767			.addClass( baseClasses )
6768			.attr( "role", "button" )
6769			.bind( "mouseenter" + this.eventNamespace, function() {
6770				if ( options.disabled ) {
6771					return;
6772				}
6773				if ( this === lastActive ) {
6774					$( this ).addClass( "ui-state-active" );
6775				}
6776			})
6777			.bind( "mouseleave" + this.eventNamespace, function() {
6778				if ( options.disabled ) {
6779					return;
6780				}
6781				$( this ).removeClass( activeClass );
6782			})
6783			.bind( "click" + this.eventNamespace, function( event ) {
6784				if ( options.disabled ) {
6785					event.preventDefault();
6786					event.stopImmediatePropagation();
6787				}
6788			});
6789		this._on({
6790			focus: function() {
6791				this.buttonElement.addClass( "ui-state-focus" );
6792			},
6793			blur: function() {
6794				this.buttonElement.removeClass( "ui-state-focus" );
6795			}
6796		});
6797		if ( toggleButton ) {
6798			this.element.bind( "change" + this.eventNamespace, function() {
6799				that.refresh();
6800			});
6801		}
6802		if ( this.type === "checkbox" ) {
6803			this.buttonElement.bind( "click" + this.eventNamespace, function() {
6804				if ( options.disabled ) {
6805					return false;
6806				}
6807			});
6808		} else if ( this.type === "radio" ) {
6809			this.buttonElement.bind( "click" + this.eventNamespace, function() {
6810				if ( options.disabled ) {
6811					return false;
6812				}
6813				$( this ).addClass( "ui-state-active" );
6814				that.buttonElement.attr( "aria-pressed", "true" );
6815
6816				var radio = that.element[ 0 ];
6817				radioGroup( radio )
6818					.not( radio )
6819					.map(function() {
6820						return $( this ).button( "widget" )[ 0 ];
6821					})
6822					.removeClass( "ui-state-active" )
6823					.attr( "aria-pressed", "false" );
6824			});
6825		} else {
6826			this.buttonElement
6827				.bind( "mousedown" + this.eventNamespace, function() {
6828					if ( options.disabled ) {
6829						return false;
6830					}
6831					$( this ).addClass( "ui-state-active" );
6832					lastActive = this;
6833					that.document.one( "mouseup", function() {
6834						lastActive = null;
6835					});
6836				})
6837				.bind( "mouseup" + this.eventNamespace, function() {
6838					if ( options.disabled ) {
6839						return false;
6840					}
6841					$( this ).removeClass( "ui-state-active" );
6842				})
6843				.bind( "keydown" + this.eventNamespace, function(event) {
6844					if ( options.disabled ) {
6845						return false;
6846					}
6847					if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
6848						$( this ).addClass( "ui-state-active" );
6849					}
6850				})
6851				.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
6852					$( this ).removeClass( "ui-state-active" );
6853				});
6854			if ( this.buttonElement.is("a") ) {
6855				this.buttonElement.keyup(function(event) {
6856					if ( event.keyCode === $.ui.keyCode.SPACE ) {
6857						$( this ).click();
6858					}
6859				});
6860			}
6861		}
6862		this._setOption( "disabled", options.disabled );
6863		this._resetButton();
6864	},
6865	_determineButtonType: function() {
6866		var ancestor, labelSelector, checked;
6867		if ( this.element.is("[type=checkbox]") ) {
6868			this.type = "checkbox";
6869		} else if ( this.element.is("[type=radio]") ) {
6870			this.type = "radio";
6871		} else if ( this.element.is("input") ) {
6872			this.type = "input";
6873		} else {
6874			this.type = "button";
6875		}
6876		if ( this.type === "checkbox" || this.type === "radio" ) {
6877			ancestor = this.element.parents().last();
6878			labelSelector = "label[for='" + this.element.attr("id") + "']";
6879			this.buttonElement = ancestor.find( labelSelector );
6880			if ( !this.buttonElement.length ) {
6881				ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
6882				this.buttonElement = ancestor.filter( labelSelector );
6883				if ( !this.buttonElement.length ) {
6884					this.buttonElement = ancestor.find( labelSelector );
6885				}
6886			}
6887			this.element.addClass( "ui-helper-hidden-accessible" );
6888			checked = this.element.is( ":checked" );
6889			if ( checked ) {
6890				this.buttonElement.addClass( "ui-state-active" );
6891			}
6892			this.buttonElement.prop( "aria-pressed", checked );
6893		} else {
6894			this.buttonElement = this.element;
6895		}
6896	},
6897	widget: function() {
6898		return this.buttonElement;
6899	},
6900	_destroy: function() {
6901		this.element
6902			.removeClass( "ui-helper-hidden-accessible" );
6903		this.buttonElement
6904			.removeClass( baseClasses + " ui-state-active " + typeClasses )
6905			.removeAttr( "role" )
6906			.removeAttr( "aria-pressed" )
6907			.html( this.buttonElement.find(".ui-button-text").html() );
6908
6909		if ( !this.hasTitle ) {
6910			this.buttonElement.removeAttr( "title" );
6911		}
6912	},
6913	_setOption: function( key, value ) {
6914		this._super( key, value );
6915		if ( key === "disabled" ) {
6916			this.element.prop( "disabled", !!value );
6917			if ( value ) {
6918				this.buttonElement.removeClass( "ui-state-focus" );
6919			}
6920			return;
6921		}
6922		this._resetButton();
6923	},
6924	refresh: function() {
6925		var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
6926		if ( isDisabled !== this.options.disabled ) {
6927			this._setOption( "disabled", isDisabled );
6928		}
6929		if ( this.type === "radio" ) {
6930			radioGroup( this.element[0] ).each(function() {
6931				if ( $( this ).is( ":checked" ) ) {
6932					$( this ).button( "widget" )
6933						.addClass( "ui-state-active" )
6934						.attr( "aria-pressed", "true" );
6935				} else {
6936					$( this ).button( "widget" )
6937						.removeClass( "ui-state-active" )
6938						.attr( "aria-pressed", "false" );
6939				}
6940			});
6941		} else if ( this.type === "checkbox" ) {
6942			if ( this.element.is( ":checked" ) ) {
6943				this.buttonElement
6944					.addClass( "ui-state-active" )
6945					.attr( "aria-pressed", "true" );
6946			} else {
6947				this.buttonElement
6948					.removeClass( "ui-state-active" )
6949					.attr( "aria-pressed", "false" );
6950			}
6951		}
6952	},
6953	_resetButton: function() {
6954		if ( this.type === "input" ) {
6955			if ( this.options.label ) {
6956				this.element.val( this.options.label );
6957			}
6958			return;
6959		}
6960		var buttonElement = this.buttonElement.removeClass( typeClasses ),
6961			buttonText = $( "<span></span>", this.document[0] )
6962				.addClass( "ui-button-text" )
6963				.html( this.options.label )
6964				.appendTo( buttonElement.empty() )
6965				.text(),
6966			icons = this.options.icons,
6967			multipleIcons = icons.primary && icons.secondary,
vendor: 4,703 bytes, lines 6968-7122
6968			buttonClasses = [];
6969		if ( icons.primary || icons.secondary ) {
6970			if ( this.options.text ) {
6971				buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
6972			}
6973			if ( icons.primary ) {
6974				buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
6975			}
6976			if ( icons.secondary ) {
6977				buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
6978			}
6979			if ( !this.options.text ) {
6980				buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
6981				if ( !this.hasTitle ) {
6982					buttonElement.attr( "title", $.trim( buttonText ) );
6983				}
6984			}
6985		} else {
6986			buttonClasses.push( "ui-button-text-only" );
6987		}
6988		buttonElement.addClass( buttonClasses.join( " " ) );
6989	}
6990});
6991$.widget( "ui.buttonset", {
6992	version: "1.10.4",
6993	options: {
6994		items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
6995	},
6996	_create: function() {
6997		this.element.addClass( "ui-buttonset" );
6998	},
6999	_init: function() {
7000		this.refresh();
7001	},
7002	_setOption: function( key, value ) {
7003		if ( key === "disabled" ) {
7004			this.buttons.button( "option", key, value );
7005		}
7006		this._super( key, value );
7007	},
7008	refresh: function() {
7009		var rtl = this.element.css( "direction" ) === "rtl";
7010		this.buttons = this.element.find( this.options.items )
7011			.filter( ":ui-button" )
7012				.button( "refresh" )
7013			.end()
7014			.not( ":ui-button" )
7015				.button()
7016			.end()
7017			.map(function() {
7018				return $( this ).button( "widget" )[ 0 ];
7019			})
7020				.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
7021				.filter( ":first" )
7022					.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
7023				.end()
7024				.filter( ":last" )
7025					.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
7026				.end()
7027			.end();
7028	},
7029	_destroy: function() {
7030		this.element.removeClass( "ui-buttonset" );
7031		this.buttons
7032			.map(function() {
7033				return $( this ).button( "widget" )[ 0 ];
7034			})
7035				.removeClass( "ui-corner-left ui-corner-right" )
7036			.end()
7037			.button( "destroy" );
7038	}
7039});
7040}( jQuery ) );
7041(function( $, undefined ) {
7042$.extend($.ui, { datepicker: { version: "1.10.4" } });
7043var PROP_NAME = "datepicker",
7044	instActive;
7045function Datepicker() {
7046	this._curInst = null;
7047	this._keyEvent = false;
7048	this._disabledInputs = [];
7049	this._datepickerShowing = false;
7050	this._inDialog = false;
7051	this._mainDivId = "ui-datepicker-div";
7052	this._inlineClass = "ui-datepicker-inline";
7053	this._appendClass = "ui-datepicker-append";
7054	this._triggerClass = "ui-datepicker-trigger";
7055	this._dialogClass = "ui-datepicker-dialog";
7056	this._disableClass = "ui-datepicker-disabled";
7057	this._unselectableClass = "ui-datepicker-unselectable";
7058	this._currentClass = "ui-datepicker-current-day";
7059	this._dayOverClass = "ui-datepicker-days-cell-over";
7060	this.regional = [];
7061	this.regional[""] = {
7062		closeText: "Done",
7063		prevText: "Prev",
7064		nextText: "Next",
7065		currentText: "Today",
7066		monthNames: ["January","February","March","April","May","June",
7067			"July","August","September","October","November","December"],
7068		monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
7069		dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
7070		dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
7071		dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"],
7072		weekHeader: "Wk",
7073		dateFormat: "mm/dd/yy",
7074		firstDay: 0,
7075		isRTL: false,
7076		showMonthAfterYear: false,
7077		yearSuffix: ""
7078	};
7079	this._defaults = {
7080		showOn: "focus",
7081		showAnim: "show",
7082		showOptions: {},
7083		defaultDate: null,
7084		appendText: "",
7085		buttonText: "...",
7086		buttonImage: "",
7087		buttonImageOnly: false,
7088		hideIfNoPrevNext: false,
7089		navigationAsDateFormat: false,
7090		gotoCurrent: false,
7091		changeMonth: false,
7092		changeYear: false,
7093		yearRange: "c-10:c+10",
7094		showOtherMonths: false,
7095		selectOtherMonths: false,
7096		showWeek: false,
7097		calculateWeek: this.iso8601Week,
7098		shortYearCutoff: "+10",
7099		minDate: null,
7100		maxDate: null,
7101		duration: "fast",
7102		beforeShowDay: null,
7103		beforeShow: null,
7104		onSelect: null,
7105		onChangeMonthYear: null,
7106		onClose: null,
7107		numberOfMonths: 1,
7108		showCurrentAtPos: 0,
7109		stepMonths: 1,
7110		stepBigMonths: 12,
7111		altField: "",
7112		altFormat: "",
7113		constrainInput: true,
7114		showButtonPanel: false,
7115		autoSize: false,
7116		disabled: false
7117	};
7118	$.extend(this._defaults, this.regional[""]);
7119	this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
7120}
7121$.extend(Datepicker.prototype, {
7122	markerClassName: "hasDatepicker",
vendor: 6,228 bytes, lines 7123-7300
7123	maxRows: 4,
7124	_widgetDatepicker: function() {
7125		return this.dpDiv;
7126	},
7127	setDefaults: function(settings) {
7128		extendRemove(this._defaults, settings || {});
7129		return this;
7130	},
7131	_attachDatepicker: function(target, settings) {
7132		var nodeName, inline, inst;
7133		nodeName = target.nodeName.toLowerCase();
7134		inline = (nodeName === "div" || nodeName === "span");
7135		if (!target.id) {
7136			this.uuid += 1;
7137			target.id = "dp" + this.uuid;
7138		}
7139		inst = this._newInst($(target), inline);
7140		inst.settings = $.extend({}, settings || {});
7141		if (nodeName === "input") {
7142			this._connectDatepicker(target, inst);
7143		} else if (inline) {
7144			this._inlineDatepicker(target, inst);
7145		}
7146	},
7147	_newInst: function(target, inline) {
7148		var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
7149		return {id: id, input: target,
7150			selectedDay: 0, selectedMonth: 0, selectedYear: 0,
7151			drawMonth: 0, drawYear: 0,
7152			inline: inline,
7153			dpDiv: (!inline ? this.dpDiv :
7154			bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
7155	},
7156	_connectDatepicker: function(target, inst) {
7157		var input = $(target);
7158		inst.append = $([]);
7159		inst.trigger = $([]);
7160		if (input.hasClass(this.markerClassName)) {
7161			return;
7162		}
7163		this._attachments(input, inst);
7164		input.addClass(this.markerClassName).keydown(this._doKeyDown).
7165			keypress(this._doKeyPress).keyup(this._doKeyUp);
7166		this._autoSize(inst);
7167		$.data(target, PROP_NAME, inst);
7168		if( inst.settings.disabled ) {
7169			this._disableDatepicker( target );
7170		}
7171	},
7172	_attachments: function(input, inst) {
7173		var showOn, buttonText, buttonImage,
7174			appendText = this._get(inst, "appendText"),
7175			isRTL = this._get(inst, "isRTL");
7176		if (inst.append) {
7177			inst.append.remove();
7178		}
7179		if (appendText) {
7180			inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
7181			input[isRTL ? "before" : "after"](inst.append);
7182		}
7183		input.unbind("focus", this._showDatepicker);
7184		if (inst.trigger) {
7185			inst.trigger.remove();
7186		}
7187		showOn = this._get(inst, "showOn");
7188		if (showOn === "focus" || showOn === "both") {
7189			input.focus(this._showDatepicker);
7190		}
7191		if (showOn === "button" || showOn === "both") {
7192			buttonText = this._get(inst, "buttonText");
7193			buttonImage = this._get(inst, "buttonImage");
7194			inst.trigger = $(this._get(inst, "buttonImageOnly") ?
7195				$("<img/>").addClass(this._triggerClass).
7196					attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
7197				$("<button type='button'></button>").addClass(this._triggerClass).
7198					html(!buttonImage ? buttonText : $("<img/>").attr(
7199					{ src:buttonImage, alt:buttonText, title:buttonText })));
7200			input[isRTL ? "before" : "after"](inst.trigger);
7201			inst.trigger.click(function() {
7202				if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
7203					$.datepicker._hideDatepicker();
7204				} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
7205					$.datepicker._hideDatepicker();
7206					$.datepicker._showDatepicker(input[0]);
7207				} else {
7208					$.datepicker._showDatepicker(input[0]);
7209				}
7210				return false;
7211			});
7212		}
7213	},
7214	_autoSize: function(inst) {
7215		if (this._get(inst, "autoSize") && !inst.inline) {
7216			var findMax, max, maxI, i,
7217				date = new Date(2009, 12 - 1, 20),
7218				dateFormat = this._get(inst, "dateFormat");
7219			if (dateFormat.match(/[DM]/)) {
7220				findMax = function(names) {
7221					max = 0;
7222					maxI = 0;
7223					for (i = 0; i < names.length; i++) {
7224						if (names[i].length > max) {
7225							max = names[i].length;
7226							maxI = i;
7227						}
7228					}
7229					return maxI;
7230				};
7231				date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
7232					"monthNames" : "monthNamesShort"))));
7233				date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
7234					"dayNames" : "dayNamesShort"))) + 20 - date.getDay());
7235			}
7236			inst.input.attr("size", this._formatDate(inst, date).length);
7237		}
7238	},
7239	_inlineDatepicker: function(target, inst) {
7240		var divSpan = $(target);
7241		if (divSpan.hasClass(this.markerClassName)) {
7242			return;
7243		}
7244		divSpan.addClass(this.markerClassName).append(inst.dpDiv);
7245		$.data(target, PROP_NAME, inst);
7246		this._setDate(inst, this._getDefaultDate(inst), true);
7247		this._updateDatepicker(inst);
7248		this._updateAlternate(inst);
7249		if( inst.settings.disabled ) {
7250			this._disableDatepicker( target );
7251		}
7252		inst.dpDiv.css( "display", "block" );
7253	},
7254	_dialogDatepicker: function(input, date, onSelect, settings, pos) {
7255		var id, browserWidth, browserHeight, scrollX, scrollY,
7256			inst = this._dialogInst;
7257		if (!inst) {
7258			this.uuid += 1;
7259			id = "dp" + this.uuid;
7260			this._dialogInput = $("<input type='text' id='" + id +
7261				"' style='position: absolute; top: -100px; width: 0px;'/>");
7262			this._dialogInput.keydown(this._doKeyDown);
7263			$("body").append(this._dialogInput);
7264			inst = this._dialogInst = this._newInst(this._dialogInput, false);
7265			inst.settings = {};
7266			$.data(this._dialogInput[0], PROP_NAME, inst);
7267		}
7268		extendRemove(inst.settings, settings || {});
7269		date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
7270		this._dialogInput.val(date);
7271		this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
7272		if (!this._pos) {
7273			browserWidth = document.documentElement.clientWidth;
7274			browserHeight = document.documentElement.clientHeight;
7275			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
7276			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
7277			this._pos =
7278				[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
7279		}
7280		this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
7281		inst.settings.onSelect = onSelect;
7282		this._inDialog = true;
7283		this.dpDiv.addClass(this._dialogClass);
7284		this._showDatepicker(this._dialogInput[0]);
7285		if ($.blockUI) {
7286			$.blockUI(this.dpDiv);
7287		}
7288		$.data(this._dialogInput[0], PROP_NAME, inst);
7289		return this;
7290	},
7291	_destroyDatepicker: function(target) {
7292		var nodeName,
7293			$target = $(target),
7294			inst = $.data(target, PROP_NAME);
7295		if (!$target.hasClass(this.markerClassName)) {
7296			return;
7297		}
7298		nodeName = target.nodeName.toLowerCase();
7299		$.removeData(target, PROP_NAME);
7300		if (nodeName === "input") {
vendor: 9,764 bytes, lines 7301-7588
7301			inst.append.remove();
7302			inst.trigger.remove();
7303			$target.removeClass(this.markerClassName).
7304				unbind("focus", this._showDatepicker).
7305				unbind("keydown", this._doKeyDown).
7306				unbind("keypress", this._doKeyPress).
7307				unbind("keyup", this._doKeyUp);
7308		} else if (nodeName === "div" || nodeName === "span") {
7309			$target.removeClass(this.markerClassName).empty();
7310		}
7311	},
7312	_enableDatepicker: function(target) {
7313		var nodeName, inline,
7314			$target = $(target),
7315			inst = $.data(target, PROP_NAME);
7316		if (!$target.hasClass(this.markerClassName)) {
7317			return;
7318		}
7319		nodeName = target.nodeName.toLowerCase();
7320		if (nodeName === "input") {
7321			target.disabled = false;
7322			inst.trigger.filter("button").
7323				each(function() { this.disabled = false; }).end().
7324				filter("img").css({opacity: "1.0", cursor: ""});
7325		} else if (nodeName === "div" || nodeName === "span") {
7326			inline = $target.children("." + this._inlineClass);
7327			inline.children().removeClass("ui-state-disabled");
7328			inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
7329				prop("disabled", false);
7330		}
7331		this._disabledInputs = $.map(this._disabledInputs,
7332			function(value) { return (value === target ? null : value); }); // delete entry
7333	},
7334	_disableDatepicker: function(target) {
7335		var nodeName, inline,
7336			$target = $(target),
7337			inst = $.data(target, PROP_NAME);
7338		if (!$target.hasClass(this.markerClassName)) {
7339			return;
7340		}
7341		nodeName = target.nodeName.toLowerCase();
7342		if (nodeName === "input") {
7343			target.disabled = true;
7344			inst.trigger.filter("button").
7345				each(function() { this.disabled = true; }).end().
7346				filter("img").css({opacity: "0.5", cursor: "default"});
7347		} else if (nodeName === "div" || nodeName === "span") {
7348			inline = $target.children("." + this._inlineClass);
7349			inline.children().addClass("ui-state-disabled");
7350			inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
7351				prop("disabled", true);
7352		}
7353		this._disabledInputs = $.map(this._disabledInputs,
7354			function(value) { return (value === target ? null : value); });
7355		this._disabledInputs[this._disabledInputs.length] = target;
7356	},
7357	_isDisabledDatepicker: function(target) {
7358		if (!target) {
7359			return false;
7360		}
7361		for (var i = 0; i < this._disabledInputs.length; i++) {
7362			if (this._disabledInputs[i] === target) {
7363				return true;
7364			}
7365		}
7366		return false;
7367	},
7368	_getInst: function(target) {
7369		try {
7370			return $.data(target, PROP_NAME);
7371		}
7372		catch (err) {
7373			throw "Missing instance data for this datepicker";
7374		}
7375	},
7376	_optionDatepicker: function(target, name, value) {
7377		var settings, date, minDate, maxDate,
7378			inst = this._getInst(target);
7379		if (arguments.length === 2 && typeof name === "string") {
7380			return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
7381				(inst ? (name === "all" ? $.extend({}, inst.settings) :
7382				this._get(inst, name)) : null));
7383		}
7384		settings = name || {};
7385		if (typeof name === "string") {
7386			settings = {};
7387			settings[name] = value;
7388		}
7389		if (inst) {
7390			if (this._curInst === inst) {
7391				this._hideDatepicker();
7392			}
7393			date = this._getDateDatepicker(target, true);
7394			minDate = this._getMinMaxDate(inst, "min");
7395			maxDate = this._getMinMaxDate(inst, "max");
7396			extendRemove(inst.settings, settings);
7397			if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
7398				inst.settings.minDate = this._formatDate(inst, minDate);
7399			}
7400			if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
7401				inst.settings.maxDate = this._formatDate(inst, maxDate);
7402			}
7403			if ( "disabled" in settings ) {
7404				if ( settings.disabled ) {
7405					this._disableDatepicker(target);
7406				} else {
7407					this._enableDatepicker(target);
7408				}
7409			}
7410			this._attachments($(target), inst);
7411			this._autoSize(inst);
7412			this._setDate(inst, date);
7413			this._updateAlternate(inst);
7414			this._updateDatepicker(inst);
7415		}
7416	},
7417	_changeDatepicker: function(target, name, value) {
7418		this._optionDatepicker(target, name, value);
7419	},
7420	_refreshDatepicker: function(target) {
7421		var inst = this._getInst(target);
7422		if (inst) {
7423			this._updateDatepicker(inst);
7424		}
7425	},
7426	_setDateDatepicker: function(target, date) {
7427		var inst = this._getInst(target);
7428		if (inst) {
7429			this._setDate(inst, date);
7430			this._updateDatepicker(inst);
7431			this._updateAlternate(inst);
7432		}
7433	},
7434	_getDateDatepicker: function(target, noDefault) {
7435		var inst = this._getInst(target);
7436		if (inst && !inst.inline) {
7437			this._setDateFromField(inst, noDefault);
7438		}
7439		return (inst ? this._getDate(inst) : null);
7440	},
7441	_doKeyDown: function(event) {
7442		var onSelect, dateStr, sel,
7443			inst = $.datepicker._getInst(event.target),
7444			handled = true,
7445			isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
7446		inst._keyEvent = true;
7447		if ($.datepicker._datepickerShowing) {
7448			switch (event.keyCode) {
7449				case 9: $.datepicker._hideDatepicker();
7450						handled = false;
7451						break; // hide on tab out
7452				case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
7453									$.datepicker._currentClass + ")", inst.dpDiv);
7454						if (sel[0]) {
7455							$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
7456						}
7457						onSelect = $.datepicker._get(inst, "onSelect");
7458						if (onSelect) {
7459							dateStr = $.datepicker._formatDate(inst);
7460							onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
7461						} else {
7462							$.datepicker._hideDatepicker();
7463						}
7464						return false;
7465				case 27: $.datepicker._hideDatepicker();
7466						break;
7467				case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
7468							-$.datepicker._get(inst, "stepBigMonths") :
7469							-$.datepicker._get(inst, "stepMonths")), "M");
7470						break;
7471				case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
7472							+$.datepicker._get(inst, "stepBigMonths") :
7473							+$.datepicker._get(inst, "stepMonths")), "M");
7474						break;
7475				case 35: if (event.ctrlKey || event.metaKey) {
7476							$.datepicker._clearDate(event.target);
7477						}
7478						handled = event.ctrlKey || event.metaKey;
7479						break;
7480				case 36: if (event.ctrlKey || event.metaKey) {
7481							$.datepicker._gotoToday(event.target);
7482						}
7483						handled = event.ctrlKey || event.metaKey;
7484						break;
7485				case 37: if (event.ctrlKey || event.metaKey) {
7486							$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
7487						}
7488						handled = event.ctrlKey || event.metaKey;
7489						if (event.originalEvent.altKey) {
7490							$.datepicker._adjustDate(event.target, (event.ctrlKey ?
7491								-$.datepicker._get(inst, "stepBigMonths") :
7492								-$.datepicker._get(inst, "stepMonths")), "M");
7493						}
7494						break;
7495				case 38: if (event.ctrlKey || event.metaKey) {
7496							$.datepicker._adjustDate(event.target, -7, "D");
7497						}
7498						handled = event.ctrlKey || event.metaKey;
7499						break; // -1 week on ctrl or command +up
7500				case 39: if (event.ctrlKey || event.metaKey) {
7501							$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
7502						}
7503						handled = event.ctrlKey || event.metaKey;
7504						if (event.originalEvent.altKey) {
7505							$.datepicker._adjustDate(event.target, (event.ctrlKey ?
7506								+$.datepicker._get(inst, "stepBigMonths") :
7507								+$.datepicker._get(inst, "stepMonths")), "M");
7508						}
7509						break;
7510				case 40: if (event.ctrlKey || event.metaKey) {
7511							$.datepicker._adjustDate(event.target, +7, "D");
7512						}
7513						handled = event.ctrlKey || event.metaKey;
7514						break;
7515				default: handled = false;
7516			}
7517		} else if (event.keyCode === 36 && event.ctrlKey) {
7518			$.datepicker._showDatepicker(this);
7519		} else {
7520			handled = false;
7521		}
7522		if (handled) {
7523			event.preventDefault();
7524			event.stopPropagation();
7525		}
7526	},
7527	_doKeyPress: function(event) {
7528		var chars, chr,
7529			inst = $.datepicker._getInst(event.target);
7530		if ($.datepicker._get(inst, "constrainInput")) {
7531			chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
7532			chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
7533			return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
7534		}
7535	},
7536	_doKeyUp: function(event) {
7537		var date,
7538			inst = $.datepicker._getInst(event.target);
7539		if (inst.input.val() !== inst.lastVal) {
7540			try {
7541				date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
7542					(inst.input ? inst.input.val() : null),
7543					$.datepicker._getFormatConfig(inst));
7544				if (date) {
7545					$.datepicker._setDateFromField(inst);
7546					$.datepicker._updateAlternate(inst);
7547					$.datepicker._updateDatepicker(inst);
7548				}
7549			}
7550			catch (err) {
7551			}
7552		}
7553		return true;
7554	},
7555	_showDatepicker: function(input) {
7556		input = input.target || input;
7557		if (input.nodeName.toLowerCase() !== "input") {
7558			input = $("input", input.parentNode)[0];
7559		}
7560		if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) {
7561			return;
7562		}
7563		var inst, beforeShow, beforeShowSettings, isFixed,
7564			offset, showAnim, duration;
7565		inst = $.datepicker._getInst(input);
7566		if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
7567			$.datepicker._curInst.dpDiv.stop(true, true);
7568			if ( inst && $.datepicker._datepickerShowing ) {
7569				$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
7570			}
7571		}
7572		beforeShow = $.datepicker._get(inst, "beforeShow");
7573		beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
7574		if(beforeShowSettings === false){
7575			return;
7576		}
7577		extendRemove(inst.settings, beforeShowSettings);
7578		inst.lastVal = null;
7579		$.datepicker._lastInput = input;
7580		$.datepicker._setDateFromField(inst);
7581		if ($.datepicker._inDialog) { // hide cursor
7582			input.value = "";
7583		}
7584		if (!$.datepicker._pos) {
7585			$.datepicker._pos = $.datepicker._findPos(input);
7586			$.datepicker._pos[1] += input.offsetHeight;
7587		}
7588		isFixed = false;
vendor: 4,824 bytes, lines 7589-7703
7589		$(input).parents().each(function() {
7590			isFixed |= $(this).css("position") === "fixed";
7591			return !isFixed;
7592		});
7593		offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
7594		$.datepicker._pos = null;
7595		inst.dpDiv.empty();
7596		inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
7597		$.datepicker._updateDatepicker(inst);
7598		offset = $.datepicker._checkOffset(inst, offset, isFixed);
7599		inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
7600			"static" : (isFixed ? "fixed" : "absolute")), display: "none",
7601			left: offset.left + "px", top: offset.top + "px"});
7602		if (!inst.inline) {
7603			showAnim = $.datepicker._get(inst, "showAnim");
7604			duration = $.datepicker._get(inst, "duration");
7605			inst.dpDiv.zIndex($(input).zIndex()+1);
7606			$.datepicker._datepickerShowing = true;
7607			if ( $.effects && $.effects.effect[ showAnim ] ) {
7608				inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
7609			} else {
7610				inst.dpDiv[showAnim || "show"](null);
7611				frozen_timeout = setTimeout(function(){
7612					datepicker_frozen = inst.dpDiv.css('display') == 'none' ? true : false;
7613				}, 2000);
7614			}
7615			if ( $.datepicker._shouldFocusInput( inst ) ) {
7616				inst.input.focus();
7617			}
7618			$.datepicker._curInst = inst;
7619		}
7620	},
7621	_updateDatepicker: function(inst) {
7622		this.maxRows = 4;
7623		instActive = inst;
7624		inst.dpDiv.empty().append(this._generateHTML(inst));
7625		this._attachHandlers(inst);
7626		inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();
7627		var origyearshtml,
7628			numMonths = this._getNumberOfMonths(inst),
7629			cols = numMonths[1],
7630			width = 17;
7631		inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
7632		if (cols > 1) {
7633			inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
7634		}
7635		inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
7636			"Class"]("ui-datepicker-multi");
7637		inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
7638			"Class"]("ui-datepicker-rtl");
7639		if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
7640			inst.input.focus();
7641		}
7642		if( inst.yearshtml ){
7643			origyearshtml = inst.yearshtml;
7644			setTimeout(function(){
7645				if( origyearshtml === inst.yearshtml && inst.yearshtml ){
7646					inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
7647				}
7648				origyearshtml = inst.yearshtml = null;
7649			}, 0);
7650		}
7651	},
7652	_shouldFocusInput: function( inst ) {
7653		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
7654	},
7655	_checkOffset: function(inst, offset, isFixed) {
7656		var dpWidth = inst.dpDiv.outerWidth(),
7657			dpHeight = inst.dpDiv.outerHeight(),
7658			inputWidth = inst.input ? inst.input.outerWidth() : 0,
7659			inputHeight = inst.input ? inst.input.outerHeight() : 0,
7660			viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
7661			viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
7662		offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
7663		offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
7664		offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
7665		offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
7666			Math.abs(offset.left + dpWidth - viewWidth) : 0);
7667		offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
7668			Math.abs(dpHeight + inputHeight) : 0);
7669		return offset;
7670	},
7671	_findPos: function(obj) {
7672		var position,
7673			inst = this._getInst(obj),
7674			isRTL = this._get(inst, "isRTL");
7675		while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
7676			obj = obj[isRTL ? "previousSibling" : "nextSibling"];
7677		}
7678		position = $(obj).offset();
7679		return [position.left, position.top];
7680	},
7681	_hideDatepicker: function(input) {
7682		var showAnim, duration, postProcess, onClose,
7683			inst = this._curInst;
7684		if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
7685			return;
7686		}
7687		if (this._datepickerShowing) {
7688			showAnim = this._get(inst, "showAnim");
7689			duration = this._get(inst, "duration");
7690			postProcess = function() {
7691				$.datepicker._tidyDialog(inst);
7692			};
7693			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
7694				inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
7695			} else {
7696				inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
7697					(showAnim === "fadeIn" ? "fadeOut" : "hide"))]((null), postProcess);
7698			}
7699			clearTimeout(frozen_timeout);
7700			if (!showAnim) {
7701				postProcess();
7702			}
7703			this._datepickerShowing = false;
vendor: 4,939 bytes, lines 7704-7851
7704			onClose = this._get(inst, "onClose");
7705			if (onClose) {
7706				onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
7707			}
7708			this._lastInput = null;
7709			if (this._inDialog) {
7710				this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
7711				if ($.blockUI) {
7712					$.unblockUI();
7713					$("body").append(this.dpDiv);
7714				}
7715			}
7716			this._inDialog = false;
7717		}
7718	},
7719	_tidyDialog: function(inst) {
7720		inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
7721	},
7722	_checkExternalClick: function(event) {
7723		if (!$.datepicker._curInst) {
7724			return;
7725		}
7726		var $target = $(event.target),
7727			inst = $.datepicker._getInst($target[0]);
7728		if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
7729				$target.parents("#" + $.datepicker._mainDivId).length === 0 &&
7730				!$target.hasClass($.datepicker.markerClassName) &&
7731				!$target.closest("." + $.datepicker._triggerClass).length &&
7732				$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
7733			( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
7734				$.datepicker._hideDatepicker();
7735		}
7736	},
7737	_adjustDate: function(id, offset, period) {
7738		var target = $(id),
7739			inst = this._getInst(target[0]);
7740		if (this._isDisabledDatepicker(target[0])) {
7741			return;
7742		}
7743		this._adjustInstDate(inst, offset +
7744			(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
7745			period);
7746		this._updateDatepicker(inst);
7747	},
7748	_gotoToday: function(id) {
7749		var date,
7750			target = $(id),
7751			inst = this._getInst(target[0]);
7752		if (this._get(inst, "gotoCurrent") && inst.currentDay) {
7753			inst.selectedDay = inst.currentDay;
7754			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
7755			inst.drawYear = inst.selectedYear = inst.currentYear;
7756		} else {
7757			date = new Date();
7758			inst.selectedDay = date.getDate();
7759			inst.drawMonth = inst.selectedMonth = date.getMonth();
7760			inst.drawYear = inst.selectedYear = date.getFullYear();
7761		}
7762		this._notifyChange(inst);
7763		this._adjustDate(target);
7764	},
7765	_selectMonthYear: function(id, select, period) {
7766		var target = $(id),
7767			inst = this._getInst(target[0]);
7768		inst["selected" + (period === "M" ? "Month" : "Year")] =
7769		inst["draw" + (period === "M" ? "Month" : "Year")] =
7770			parseInt(select.options[select.selectedIndex].value,10);
7771		this._notifyChange(inst);
7772		this._adjustDate(target);
7773	},
7774	_selectDay: function(id, month, year, td) {
7775		var inst,
7776			target = $(id);
7777		if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
7778			return;
7779		}
7780		inst = this._getInst(target[0]);
7781		inst.selectedDay = inst.currentDay = $("a", td).html();
7782		inst.selectedMonth = inst.currentMonth = month;
7783		inst.selectedYear = inst.currentYear = year;
7784		this._selectDate(id, this._formatDate(inst,
7785			inst.currentDay, inst.currentMonth, inst.currentYear));
7786	},
7787	_clearDate: function(id) {
7788		var target = $(id);
7789		this._selectDate(target, "");
7790	},
7791	_selectDate: function(id, dateStr) {
7792		var onSelect,
7793			target = $(id),
7794			inst = this._getInst(target[0]);
7795		dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
7796		if (inst.input) {
7797			inst.input.val(dateStr);
7798		}
7799		this._updateAlternate(inst);
7800		onSelect = this._get(inst, "onSelect");
7801		if (onSelect) {
7802			onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
7803		} else if (inst.input) {
7804			inst.input.trigger("change");
7805		}
7806		if (inst.inline){
7807			this._updateDatepicker(inst);
7808		} else {
7809			this._hideDatepicker();
7810			this._lastInput = inst.input[0];
7811			if (typeof(inst.input[0]) !== "object") {
7812				inst.input.focus();
7813			}
7814			this._lastInput = null;
7815		}
7816	},
7817	_updateAlternate: function(inst) {
7818		var altFormat, date, dateStr,
7819			altField = this._get(inst, "altField");
7820		if (altField) {
7821			altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
7822			date = this._getDate(inst);
7823			dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
7824			$(altField).each(function() { $(this).val(dateStr); });
7825		}
7826	},
7827	noWeekends: function(date) {
7828		var day = date.getDay();
7829		return [(day > 0 && day < 6), ""];
7830	},
7831	iso8601Week: function(date) {
7832		var time,
7833			checkDate = new Date(date.getTime());
7834		checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
7835		time = checkDate.getTime();
7836		checkDate.setMonth(0); // Compare with Jan 1
7837		checkDate.setDate(1);
7838		return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
7839	},
7840	parseDate: function (format, value, settings) {
7841		if (format == null || value == null) {
7842			throw "Invalid arguments";
7843		}
7844		value = (typeof value === "object" ? value.toString() : value + "");
7845		if (value === "") {
7846			return null;
7847		}
7848		var iFormat, dim, extra,
7849			iValue = 0,
7850			shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
7851			shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp 
vendor: 5,115 bytes, lines 7851-8028
7851:
7852				new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
7853			dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
7854			dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
7855			monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
7856			monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
7857			year = -1,
7858			month = -1,
7859			day = -1,
7860			doy = -1,
7861			literal = false,
7862			date,
7863			lookAhead = function(match) {
7864				var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
7865				if (matches) {
7866					iFormat++;
7867				}
7868				return matches;
7869			},
7870			getNumber = function(match) {
7871				var isDoubled = lookAhead(match),
7872					size = (match === "@" ? 14 : (match === "!" ? 20 :
7873					(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
7874					digits = new RegExp("^\\d{1," + size + "}"),
7875					num = value.substring(iValue).match(digits);
7876				if (!num) {
7877					throw "Missing number at position " + iValue;
7878				}
7879				iValue += num[0].length;
7880				return parseInt(num[0], 10);
7881			},
7882			getName = function(match, shortNames, longNames) {
7883				var index = -1,
7884					names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
7885						return [ [k, v] ];
7886					}).sort(function (a, b) {
7887						return -(a[1].length - b[1].length);
7888					});
7889				$.each(names, function (i, pair) {
7890					var name = pair[1];
7891					if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
7892						index = pair[0];
7893						iValue += name.length;
7894						return false;
7895					}
7896				});
7897				if (index !== -1) {
7898					return index + 1;
7899				} else {
7900					throw "Unknown name at position " + iValue;
7901				}
7902			},
7903			checkLiteral = function() {
7904				if (value.charAt(iValue) !== format.charAt(iFormat)) {
7905					throw "Unexpected literal at position " + iValue;
7906				}
7907				iValue++;
7908			};
7909		for (iFormat = 0; iFormat < format.length; iFormat++) {
7910			if (literal) {
7911				if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
7912					literal = false;
7913				} else {
7914					checkLiteral();
7915				}
7916			} else {
7917				switch (format.charAt(iFormat)) {
7918					case "d":
7919						day = getNumber("d");
7920						break;
7921					case "D":
7922						getName("D", dayNamesShort, dayNames);
7923						break;
7924					case "o":
7925						doy = getNumber("o");
7926						break;
7927					case "m":
7928						month = getNumber("m");
7929						break;
7930					case "M":
7931						month = getName("M", monthNamesShort, monthNames);
7932						break;
7933					case "y":
7934						year = getNumber("y");
7935						break;
7936					case "@":
7937						date = new Date(getNumber("@"));
7938						year = date.getFullYear();
7939						month = date.getMonth() + 1;
7940						day = date.getDate();
7941						break;
7942					case "!":
7943						date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
7944						year = date.getFullYear();
7945						month = date.getMonth() + 1;
7946						day = date.getDate();
7947						break;
7948					case "'":
7949						if (lookAhead("'")){
7950							checkLiteral();
7951						} else {
7952							literal = true;
7953						}
7954						break;
7955					default:
7956						checkLiteral();
7957				}
7958			}
7959		}
7960		if (iValue < value.length){
7961			extra = value.substr(iValue);
7962			if (!/^\s+/.test(extra)) {
7963				throw "Extra/unparsed characters found in date: " + extra;
7964			}
7965		}
7966		if (year === -1) {
7967			year = new Date().getFullYear();
7968		} else if (year < 100) {
7969			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
7970				(year <= shortYearCutoff ? 0 : -100);
7971		}
7972		if (doy > -1) {
7973			month = 1;
7974			day = doy;
7975			do {
7976				dim = this._getDaysInMonth(year, month - 1);
7977				if (day <= dim) {
7978					break;
7979				}
7980				month++;
7981				day -= dim;
7982			} while (true);
7983		}
7984		date = this._daylightSavingAdjust(new Date(year, month - 1, day));
7985		if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
7986			throw "Invalid date"; // E.g. 31/02/00
7987		}
7988		return date;
7989	},
7990	ATOM: "yy-mm-dd",
7991	COOKIE: "D, dd M yy",
7992	ISO_8601: "yy-mm-dd",
7993	RFC_822: "D, d M y",
7994	RFC_850: "DD, dd-M-y",
7995	RFC_1036: "D, d M y",
7996	RFC_1123: "D, d M yy",
7997	RFC_2822: "D, d M yy",
7998	RSS: "D, d M y",
7999	TICKS: "!",
8000	TIMESTAMP: "@",
8001	W3C: "yy-mm-dd",
8002	_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
8003		Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
8004	formatDate: function (format, date, settings) {
8005		if (!date) {
8006			return "";
8007		}
8008		var iFormat,
8009			dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
8010			dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
8011			monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
8012			monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
8013			lookAhead = function(match) {
8014				var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
8015				if (matches) {
8016					iFormat++;
8017				}
8018				return matches;
8019			},
8020			formatNumber = function(match, value, len) {
8021				var num = "" + value;
8022				if (lookAhead(match)) {
8023					while (num.length < len) {
8024						num = "0" + num;
8025					}
8026				}
8027				return num;
8028			},
vendor: 8,713 bytes, lines 8029-8286
8029			formatName = function(match, value, shortNames, longNames) {
8030				return (lookAhead(match) ? longNames[value] : shortNames[value]);
8031			},
8032			output = "",
8033			literal = false;
8034		if (date) {
8035			for (iFormat = 0; iFormat < format.length; iFormat++) {
8036				if (literal) {
8037					if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
8038						literal = false;
8039					} else {
8040						output += format.charAt(iFormat);
8041					}
8042				} else {
8043					switch (format.charAt(iFormat)) {
8044						case "d":
8045							output += formatNumber("d", date.getDate(), 2);
8046							break;
8047						case "D":
8048							output += formatName("D", date.getDay(), dayNamesShort, dayNames);
8049							break;
8050						case "o":
8051							output += formatNumber("o",
8052								Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
8053							break;
8054						case "m":
8055							output += formatNumber("m", date.getMonth() + 1, 2);
8056							break;
8057						case "M":
8058							output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
8059							break;
8060						case "y":
8061							output += (lookAhead("y") ? date.getFullYear() :
8062								(date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
8063							break;
8064						case "@":
8065							output += date.getTime();
8066							break;
8067						case "!":
8068							output += date.getTime() * 10000 + this._ticksTo1970;
8069							break;
8070						case "'":
8071							if (lookAhead("'")) {
8072								output += "'";
8073							} else {
8074								literal = true;
8075							}
8076							break;
8077						default:
8078							output += format.charAt(iFormat);
8079					}
8080				}
8081			}
8082		}
8083		return output;
8084	},
8085	_possibleChars: function (format) {
8086		var iFormat,
8087			chars = "",
8088			literal = false,
8089			lookAhead = function(match) {
8090				var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
8091				if (matches) {
8092					iFormat++;
8093				}
8094				return matches;
8095			};
8096		for (iFormat = 0; iFormat < format.length; iFormat++) {
8097			if (literal) {
8098				if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
8099					literal = false;
8100				} else {
8101					chars += format.charAt(iFormat);
8102				}
8103			} else {
8104				switch (format.charAt(iFormat)) {
8105					case "d": case "m": case "y": case "@":
8106						chars += "0123456789";
8107						break;
8108					case "D": case "M":
8109						return null; // Accept anything
8110					case "'":
8111						if (lookAhead("'")) {
8112							chars += "'";
8113						} else {
8114							literal = true;
8115						}
8116						break;
8117					default:
8118						chars += format.charAt(iFormat);
8119				}
8120			}
8121		}
8122		return chars;
8123	},
8124	_get: function(inst, name) {
8125		return inst.settings[name] !== undefined ?
8126			inst.settings[name] : this._defaults[name];
8127	},
8128	_setDateFromField: function(inst, noDefault) {
8129		if (inst.input.val() === inst.lastVal) {
8130			return;
8131		}
8132		var dateFormat = this._get(inst, "dateFormat"),
8133			dates = inst.lastVal = inst.input ? inst.input.val() : null,
8134			defaultDate = this._getDefaultDate(inst),
8135			date = defaultDate,
8136			settings = this._getFormatConfig(inst);
8137		try {
8138			date = this.parseDate(dateFormat, dates, settings) || defaultDate;
8139		} catch (event) {
8140			dates = (noDefault ? "" : dates);
8141		}
8142		inst.selectedDay = date.getDate();
8143		inst.drawMonth = inst.selectedMonth = date.getMonth();
8144		inst.drawYear = inst.selectedYear = date.getFullYear();
8145		inst.currentDay = (dates ? date.getDate() : 0);
8146		inst.currentMonth = (dates ? date.getMonth() : 0);
8147		inst.currentYear = (dates ? date.getFullYear() : 0);
8148		this._adjustInstDate(inst);
8149	},
8150	_getDefaultDate: function(inst) {
8151		return this._restrictMinMax(inst,
8152			this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
8153	},
8154	_determineDate: function(inst, date, defaultDate) {
8155		var offsetNumeric = function(offset) {
8156				var date = new Date();
8157				date.setDate(date.getDate() + offset);
8158				return date;
8159			},
8160			offsetString = function(offset) {
8161				try {
8162					return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
8163						offset, $.datepicker._getFormatConfig(inst));
8164				}
8165				catch (e) {
8166				}
8167				var date = (offset.toLowerCase().match(/^c/) ?
8168					$.datepicker._getDate(inst) : null) || new Date(),
8169					year = date.getFullYear(),
8170					month = date.getMonth(),
8171					day = date.getDate(),
8172					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
8173					matches = pattern.exec(offset);
8174				while (matches) {
8175					switch (matches[2] || "d") {
8176						case "d" : case "D" :
8177							day += parseInt(matches[1],10); break;
8178						case "w" : case "W" :
8179							day += parseInt(matches[1],10) * 7; break;
8180						case "m" : case "M" :
8181							month += parseInt(matches[1],10);
8182							day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
8183							break;
8184						case "y": case "Y" :
8185							year += parseInt(matches[1],10);
8186							day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
8187							break;
8188					}
8189					matches = pattern.exec(offset);
8190				}
8191				return new Date(year, month, day);
8192			},
8193			newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
8194				(typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
8195		newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
8196		if (newDate) {
8197			newDate.setHours(0);
8198			newDate.setMinutes(0);
8199			newDate.setSeconds(0);
8200			newDate.setMilliseconds(0);
8201		}
8202		return this._daylightSavingAdjust(newDate);
8203	},
8204	_daylightSavingAdjust: function(date) {
8205		if (!date) {
8206			return null;
8207		}
8208		date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
8209		return date;
8210	},
8211	_setDate: function(inst, date, noChange) {
8212		var clear = !date,
8213			origMonth = inst.selectedMonth,
8214			origYear = inst.selectedYear,
8215			newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
8216		inst.selectedDay = inst.currentDay = newDate.getDate();
8217		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
8218		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
8219		if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
8220			this._notifyChange(inst);
8221		}
8222		this._adjustInstDate(inst);
8223		if (inst.input) {
8224			inst.input.val(clear ? "" : this._formatDate(inst));
8225		}
8226	},
8227	_getDate: function(inst) {
8228		var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
8229			this._daylightSavingAdjust(new Date(
8230			inst.currentYear, inst.currentMonth, inst.currentDay)));
8231			return startDate;
8232	},
8233	_attachHandlers: function(inst) {
8234		var stepMonths = this._get(inst, "stepMonths"),
8235			id = "#" + inst.id.replace( /\\\\/g, "\\" );
8236		inst.dpDiv.find("[data-handler]").map(function () {
8237			var handler = {
8238				prev: function () {
8239					$.datepicker._adjustDate(id, -stepMonths, "M");
8240				},
8241				next: function () {
8242					$.datepicker._adjustDate(id, +stepMonths, "M");
8243				},
8244				hide: function () {
8245					$.datepicker._hideDatepicker();
8246				},
8247				today: function () {
8248					$.datepicker._gotoToday(id);
8249				},
8250				selectDay: function () {
8251					$.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
8252					return false;
8253				},
8254				selectMonth: function () {
8255					$.datepicker._selectMonthYear(id, this, "M");
8256					return false;
8257				},
8258				selectYear: function () {
8259					$.datepicker._selectMonthYear(id, this, "Y");
8260					return false;
8261				}
8262			};
8263			$(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
8264		});
8265	},
8266	_generateHTML: function(inst) {
8267		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
8268			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
8269			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
8270			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
8271			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
8272			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
8273			tempDate = new Date(),
8274			today = this._daylightSavingAdjust(
8275				new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
8276			isRTL = this._get(inst, "isRTL"),
8277			showButtonPanel = this._get(inst, "showButtonPanel"),
8278			hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
8279			navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
8280			numMonths = this._getNumberOfMonths(inst),
8281			showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
8282			stepMonths = this._get(inst, "stepMonths"),
8283			isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
8284			currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
8285				new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
8286			minDate = this._getMinMaxDate(inst, "min"),
vendor: 33,347 bytes, lines 8287-9234
8287			maxDate = this._getMinMaxDate(inst, "max"),
8288			drawMonth = inst.drawMonth - showCurrentAtPos,
8289			drawYear = inst.drawYear;
8290
8291		if (drawMonth < 0) {
8292			drawMonth += 12;
8293			drawYear--;
8294		}
8295		if (maxDate) {
8296			maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
8297				maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
8298			maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
8299			while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
8300				drawMonth--;
8301				if (drawMonth < 0) {
8302					drawMonth = 11;
8303					drawYear--;
8304				}
8305			}
8306		}
8307		inst.drawMonth = drawMonth;
8308		inst.drawYear = drawYear;
8309		prevText = this._get(inst, "prevText");
8310		prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
8311			this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
8312			this._getFormatConfig(inst)));
8313		prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
8314			"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
8315			" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
8316			(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
8317		nextText = this._get(inst, "nextText");
8318		nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
8319			this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
8320			this._getFormatConfig(inst)));
8321		next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
8322			"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
8323			" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
8324			(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
8325		currentText = this._get(inst, "currentText");
8326		gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
8327		currentText = (!navigationAsDateFormat ? currentText :
8328			this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
8329		controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
8330			this._get(inst, "closeText") + "</button>" : "");
8331		buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
8332			(this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
8333			">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
8334		firstDay = parseInt(this._get(inst, "firstDay"),10);
8335		firstDay = (isNaN(firstDay) ? 0 : firstDay);
8336		showWeek = this._get(inst, "showWeek");
8337		dayNames = this._get(inst, "dayNames");
8338		dayNamesMin = this._get(inst, "dayNamesMin");
8339		monthNames = this._get(inst, "monthNames");
8340		monthNamesShort = this._get(inst, "monthNamesShort");
8341		beforeShowDay = this._get(inst, "beforeShowDay");
8342		showOtherMonths = this._get(inst, "showOtherMonths");
8343		selectOtherMonths = this._get(inst, "selectOtherMonths");
8344		defaultDate = this._getDefaultDate(inst);
8345		html = "";
8346		dow;
8347		for (row = 0; row < numMonths[0]; row++) {
8348			group = "";
8349			this.maxRows = 4;
8350			for (col = 0; col < numMonths[1]; col++) {
8351				selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
8352				cornerClass = " ui-corner-all";
8353				calender = "";
8354				if (isMultiMonth) {
8355					calender += "<div class='ui-datepicker-group";
8356					if (numMonths[1] > 1) {
8357						switch (col) {
8358							case 0: calender += " ui-datepicker-group-first";
8359								cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
8360							case numMonths[1]-1: calender += " ui-datepicker-group-last";
8361								cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
8362							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
8363						}
8364					}
8365					calender += "'>";
8366				}
8367				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
8368					(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
8369					(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
8370					this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
8371					row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
8372					"</div><table class='ui-datepicker-calendar'><caption style='display:none;'>Calendar</caption><thead>" +
8373					"<tr>";
8374				thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
8375				for (dow = 0; dow < 7; dow++) { // days of the week
8376					day = (dow + firstDay) % 7;
8377					thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
8378						"<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
8379				}
8380				calender += thead + "</tr></thead><tbody>";
8381				daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
8382				if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
8383					inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
8384				}
8385				leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
8386				curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
8387				numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
8388				this.maxRows = numRows;
8389				printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
8390				for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
8391					calender += "<tr>";
8392					tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
8393						this._get(inst, "calculateWeek")(printDate) + "</td>");
8394					for (dow = 0; dow < 7; dow++) { // create date picker days
8395						daySettings = (beforeShowDay ?
8396							beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
8397						otherMonth = (printDate.getMonth() !== drawMonth);
8398						unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
8399							(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
8400						tbody += "<td class='" +
8401							((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
8402							(otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
8403							((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
8404							(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
8405							// or defaultDate is current printedDate and defaultDate is selectedDate
8406							" " + this._dayOverClass : "") + // highlight selected day
8407							(unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") +  // highlight unselectable days
8408							(otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
8409							(printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
8410							(printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
8411							((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
8412							(unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
8413							(otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
8414							(unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
8415							(printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
8416							(printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
8417							(otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
8418							"' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
8419						printDate.setDate(printDate.getDate() + 1);
8420						printDate = this._daylightSavingAdjust(printDate);
8421					}
8422					calender += tbody + "</tr>";
8423				}
8424				drawMonth++;
8425				if (drawMonth > 11) {
8426					drawMonth = 0;
8427					drawYear++;
8428				}
8429				calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
8430							((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
8431				group += calender;
8432			}
8433			html += group;
8434		}
8435		html += buttonPanel;
8436		inst._keyEvent = false;
8437		return html;
8438	},
8439	_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
8440			secondary, monthNames, monthNamesShort) {
8441		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
8442			changeMonth = this._get(inst, "changeMonth"),
8443			changeYear = this._get(inst, "changeYear"),
8444			showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
8445			html = "<div class='ui-datepicker-title'>",
8446			monthHtml = "";
8447		if (secondary || !changeMonth) {
8448			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
8449		} else {
8450			inMinYear = (minDate && minDate.getFullYear() === drawYear);
8451			inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
8452			monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
8453			for ( month = 0; month < 12; month++) {
8454				if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
8455					monthHtml += "<option value='" + month + "'" +
8456						(month === drawMonth ? " selected='selected'" : "") +
8457						">" + monthNamesShort[month] + "</option>";
8458				}
8459			}
8460			monthHtml += "</select>";
8461		}
8462		if (!showMonthAfterYear) {
8463			html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
8464		}
8465		if ( !inst.yearshtml ) {
8466			inst.yearshtml = "";
8467			if (secondary || !changeYear) {
8468				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
8469			} else {
8470				years = this._get(inst, "yearRange").split(":");
8471				thisYear = new Date().getFullYear();
8472				determineYear = function(value) {
8473					var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
8474						(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
8475						parseInt(value, 10)));
8476					return (isNaN(year) ? thisYear : year);
8477				};
8478				year = determineYear(years[0]);
8479				endYear = Math.max(year, determineYear(years[1] || ""));
8480				year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
8481				endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
8482				inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
8483				for (; year <= endYear; year++) {
8484					inst.yearshtml += "<option value='" + year + "'" +
8485						(year === drawYear ? " selected='selected'" : "") +
8486						">" + year + "</option>";
8487				}
8488				inst.yearshtml += "</select>";
8489
8490				html += inst.yearshtml;
8491				inst.yearshtml = null;
8492			}
8493		}
8494		html += this._get(inst, "yearSuffix");
8495		if (showMonthAfterYear) {
8496			html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
8497		}
8498		html += "</div>"; // Close datepicker_header
8499		return html;
8500	},
8501	_adjustInstDate: function(inst, offset, period) {
8502		var year = inst.drawYear + (period === "Y" ? offset : 0),
8503			month = inst.drawMonth + (period === "M" ? offset : 0),
8504			day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
8505			date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
8506		inst.selectedDay = date.getDate();
8507		inst.drawMonth = inst.selectedMonth = date.getMonth();
8508		inst.drawYear = inst.selectedYear = date.getFullYear();
8509		if (period === "M" || period === "Y") {
8510			this._notifyChange(inst);
8511		}
8512	},
8513	_restrictMinMax: function(inst, date) {
8514		var minDate = this._getMinMaxDate(inst, "min"),
8515			maxDate = this._getMinMaxDate(inst, "max"),
8516			newDate = (minDate && date < minDate ? minDate : date);
8517		return (maxDate && newDate > maxDate ? maxDate : newDate);
8518	},
8519	_notifyChange: function(inst) {
8520		var onChange = this._get(inst, "onChangeMonthYear");
8521		if (onChange) {
8522			onChange.apply((inst.input ? inst.input[0] : null),
8523				[inst.selectedYear, inst.selectedMonth + 1, inst]);
8524		}
8525	},
8526	_getNumberOfMonths: function(inst) {
8527		var numMonths = this._get(inst, "numberOfMonths");
8528		return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
8529	},
8530	_getMinMaxDate: function(inst, minMax) {
8531		return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
8532	},
8533	_getDaysInMonth: function(year, month) {
8534		return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
8535	},
8536	_getFirstDayOfMonth: function(year, month) {
8537		return new Date(year, month, 1).getDay();
8538	},
8539	_canAdjustMonth: function(inst, offset, curYear, curMonth) {
8540		var numMonths = this._getNumberOfMonths(inst),
8541			date = this._daylightSavingAdjust(new Date(curYear,
8542			curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
8543
8544		if (offset < 0) {
8545			date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
8546		}
8547		return this._isInRange(inst, date);
8548	},
8549	_isInRange: function(inst, date) {
8550		var yearSplit, currentYear,
8551			minDate = this._getMinMaxDate(inst, "min"),
8552			maxDate = this._getMinMaxDate(inst, "max"),
8553			minYear = null,
8554			maxYear = null,
8555			years = this._get(inst, "yearRange");
8556			if (years){
8557				yearSplit = years.split(":");
8558				currentYear = new Date().getFullYear();
8559				minYear = parseInt(yearSplit[0], 10);
8560				maxYear = parseInt(yearSplit[1], 10);
8561				if ( yearSplit[0].match(/[+\-].*/) ) {
8562					minYear += currentYear;
8563				}
8564				if ( yearSplit[1].match(/[+\-].*/) ) {
8565					maxYear += currentYear;
8566				}
8567			}
8568		return ((!minDate || date.getTime() >= minDate.getTime()) &&
8569			(!maxDate || date.getTime() <= maxDate.getTime()) &&
8570			(!minYear || date.getFullYear() >= minYear) &&
8571			(!maxYear || date.getFullYear() <= maxYear));
8572	},
8573	_getFormatConfig: function(inst) {
8574		var shortYearCutoff = this._get(inst, "shortYearCutoff");
8575		shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
8576			new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
8577		return {shortYearCutoff: shortYearCutoff,
8578			dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
8579			monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
8580	},
8581	_formatDate: function(inst, day, month, year) {
8582		if (!day) {
8583			inst.currentDay = inst.selectedDay;
8584			inst.currentMonth = inst.selectedMonth;
8585			inst.currentYear = inst.selectedYear;
8586		}
8587		var date = (day ? (typeof day === "object" ? day :
8588			this._daylightSavingAdjust(new Date(year, month, day))) :
8589			this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
8590		return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
8591	}
8592});
8593function bindHover(dpDiv) {
8594	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
8595	return dpDiv.delegate(selector, "mouseout", function() {
8596			$(this).removeClass("ui-state-hover");
8597			if (this.className.indexOf("ui-datepicker-prev") !== -1) {
8598				$(this).removeClass("ui-datepicker-prev-hover");
8599			}
8600			if (this.className.indexOf("ui-datepicker-next") !== -1) {
8601				$(this).removeClass("ui-datepicker-next-hover");
8602			}
8603		})
8604		.delegate(selector, "mouseover", function(){
8605			if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
8606				$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
8607				$(this).addClass("ui-state-hover");
8608				if (this.className.indexOf("ui-datepicker-prev") !== -1) {
8609					$(this).addClass("ui-datepicker-prev-hover");
8610				}
8611				if (this.className.indexOf("ui-datepicker-next") !== -1) {
8612					$(this).addClass("ui-datepicker-next-hover");
8613				}
8614			}
8615		});
8616}
8617function extendRemove(target, props) {
8618	$.extend(target, props);
8619	for (var name in props) {
8620		if (props[name] == null) {
8621			target[name] = props[name];
8622		}
8623	}
8624	return target;
8625}
8626$.fn.datepicker = function(options){
8627	if ( !this.length ) {
8628		return this;
8629	}
8630	if (!$.datepicker.initialized) {
8631		$(document).mousedown($.datepicker._checkExternalClick);
8632		$.datepicker.initialized = true;
8633	}
8634	if ($("#"+$.datepicker._mainDivId).length === 0) {
8635		$("body").append($.datepicker.dpDiv);
8636	}
8637	var otherArgs = Array.prototype.slice.call(arguments, 1);
8638	if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
8639		return $.datepicker["_" + options + "Datepicker"].
8640			apply($.datepicker, [this[0]].concat(otherArgs));
8641	}
8642	if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
8643		return $.datepicker["_" + options + "Datepicker"].
8644			apply($.datepicker, [this[0]].concat(otherArgs));
8645	}
8646	return this.each(function() {
8647		typeof options === "string" ?
8648			$.datepicker["_" + options + "Datepicker"].
8649				apply($.datepicker, [this].concat(otherArgs)) :
8650			$.datepicker._attachDatepicker(this, options);
8651	});
8652};
8653$.datepicker = new Datepicker();
8654$.datepicker.initialized = false;
8655$.datepicker.uuid = new Date().getTime();
8656$.datepicker.version = "1.10.4";
8657})(jQuery);
8658(function( $, undefined ) {
8659var sizeRelatedOptions = {
8660		buttons: true,
8661		height: true,
8662		maxHeight: true,
8663		maxWidth: true,
8664		minHeight: true,
8665		minWidth: true,
8666		width: true
8667	},
8668	resizableRelatedOptions = {
8669		maxHeight: true,
8670		maxWidth: true,
8671		minHeight: true,
8672		minWidth: true
8673	};
8674$.widget( "ui.dialog", {
8675	version: "1.10.4",
8676	options: {
8677		appendTo: "body",
8678		autoOpen: true,
8679		buttons: [],
8680		closeOnEscape: true,
8681		closeText: "close",
8682		dialogClass: "",
8683		draggable: true,
8684		hide: null,
8685		height: "auto",
8686		maxHeight: null,
8687		maxWidth: null,
8688		minHeight: 150,
8689		minWidth: 150,
8690		modal: false,
8691		position: {
8692			my: "center",
8693			at: "center",
8694			of: window,
8695			collision: "fit",
8696			using: function( pos ) {
8697				var topOffset = $( this ).css( pos ).offset().top;
8698				if ( topOffset < 0 ) {
8699					$( this ).css( "top", pos.top - topOffset );
8700				}
8701			}
8702		},
8703		resizable: true,
8704		show: null,
8705		title: null,
8706		width: 300,
8707		beforeClose: null,
8708		close: null,
8709		drag: null,
8710		dragStart: null,
8711		dragStop: null,
8712		focus: null,
8713		open: null,
8714		resize: null,
8715		resizeStart: null,
8716		resizeStop: null
8717	},
8718	_create: function() {
8719		this.originalCss = {
8720			display: this.element[0].style.display,
8721			width: this.element[0].style.width,
8722			minHeight: this.element[0].style.minHeight,
8723			maxHeight: this.element[0].style.maxHeight,
8724			height: this.element[0].style.height
8725		};
8726		this.originalPosition = {
8727			parent: this.element.parent(),
8728			index: this.element.parent().children().index( this.element )
8729		};
8730		this.originalTitle = this.element.attr("title");
8731		this.options.title = this.options.title || this.originalTitle;
8732		this._createWrapper();
8733		this.element
8734			.show()
8735			.removeAttr("title")
8736			.addClass("ui-dialog-content ui-widget-content")
8737			.appendTo( this.uiDialog );
8738		this._createTitlebar();
8739		this._createButtonPane();
8740		if ( this.options.draggable && $.fn.draggable ) {
8741			this._makeDraggable();
8742		}
8743		if ( this.options.resizable && $.fn.resizable ) {
8744			this._makeResizable();
8745		}
8746		this._isOpen = false;
8747	},
8748	_init: function() {
8749		if ( this.options.autoOpen ) {
8750			this.open();
8751		}
8752	},
8753	_appendTo: function() {
8754		var element = this.options.appendTo;
8755		if ( element && (element.jquery || element.nodeType) ) {
8756			return $( element );
8757		}
8758		return this.document.find( element || "body" ).eq( 0 );
8759	},
8760	_destroy: function() {
8761		var next,
8762			originalPosition = this.originalPosition;
8763		this._destroyOverlay();
8764		this.element
8765			.removeUniqueId()
8766			.removeClass("ui-dialog-content ui-widget-content")
8767			.css( this.originalCss )
8768			.detach();
8769		this.uiDialog.stop( true, true ).remove();
8770		if ( this.originalTitle ) {
8771			this.element.attr( "title", this.originalTitle );
8772		}
8773		next = originalPosition.parent.children().eq( originalPosition.index );
8774		if ( next.length && next[0] !== this.element[0] ) {
8775			next.before( this.element );
8776		} else {
8777			originalPosition.parent.append( this.element );
8778		}
8779	},
8780	widget: function() {
8781		return this.uiDialog;
8782	},
8783	disable: $.noop,
8784	enable: $.noop,
8785	close: function( event ) {
8786		var activeElement,
8787			that = this;
8788		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
8789			return;
8790		}
8791		this._isOpen = false;
8792		this._destroyOverlay();
8793		if ( !this.opener.filter(":focusable").focus().length ) {
8794			try {
8795				activeElement = this.document[ 0 ].activeElement;
8796				if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) {
8797					$( activeElement ).blur();
8798				}
8799			} catch ( error ) {}
8800		}
8801		this._hide( this.uiDialog, this.options.hide, function() {
8802			that._trigger( "close", event );
8803		});
8804	},
8805	isOpen: function() {
8806		return this._isOpen;
8807	},
8808	moveToTop: function() {
8809		this._moveToTop();
8810	},
8811	_moveToTop: function( event, silent ) {
8812		var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length;
8813		if ( moved && !silent ) {
8814			this._trigger( "focus", event );
8815		}
8816		return moved;
8817	},
8818	open: function() {
8819		var that = this;
8820		if ( this._isOpen ) {
8821			if ( this._moveToTop() ) {
8822				this._focusTabbable();
8823			}
8824			return;
8825		}
8826		this._isOpen = true;
8827		this.opener = $( this.document[0].activeElement );
8828		this._size();
8829		this._position();
8830		this._createOverlay();
8831		this._moveToTop( null, true );
8832		this._show( this.uiDialog, this.options.show, function() {
8833			that._focusTabbable();
8834			that._trigger("focus");
8835		});
8836		this._trigger("open");
8837	},
8838	_focusTabbable: function() {
8839		var hasFocus = this.element.find("[autofocus]");
8840		if ( !hasFocus.length ) {
8841			hasFocus = this.element.find(":tabbable");
8842		}
8843		if ( !hasFocus.length ) {
8844			hasFocus = this.uiDialogButtonPane.find(":tabbable");
8845		}
8846		if ( !hasFocus.length ) {
8847			hasFocus = this.uiDialogTitlebarClose.filter(":tabbable");
8848		}
8849		if ( !hasFocus.length ) {
8850			hasFocus = this.uiDialog;
8851		}
8852		hasFocus.eq( 0 ).focus();
8853	},
8854	_keepFocus: function( event ) {
8855		function checkFocus() {
8856			var activeElement = this.document[0].activeElement,
8857				isActive = this.uiDialog[0] === activeElement ||
8858					$.contains( this.uiDialog[0], activeElement );
8859			if ( !isActive ) {
8860				this._focusTabbable();
8861			}
8862		}
8863		event.preventDefault();
8864		checkFocus.call( this );
8865		this._delay( checkFocus );
8866	},
8867	_createWrapper: function() {
8868		this.uiDialog = $("<div>")
8869			.addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
8870				this.options.dialogClass )
8871			.hide()
8872			.attr({
8873				tabIndex: -1,
8874				role: "dialog"
8875			})
8876			.appendTo( this._appendTo() );
8877		this._on( this.uiDialog, {
8878			keydown: function( event ) {
8879				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
8880						event.keyCode === $.ui.keyCode.ESCAPE ) {
8881					event.preventDefault();
8882					this.close( event );
8883					return;
8884				}
8885				if ( event.keyCode !== $.ui.keyCode.TAB ) {
8886					return;
8887				}
8888				var tabbables = this.uiDialog.find(":tabbable"),
8889					first = tabbables.filter(":first"),
8890					last  = tabbables.filter(":last");
8891				if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
8892					first.focus( 1 );
8893					event.preventDefault();
8894				} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
8895					last.focus( 1 );
8896					event.preventDefault();
8897				}
8898			},
8899			mousedown: function( event ) {
8900				if ( this._moveToTop( event ) ) {
8901					this._focusTabbable();
8902				}
8903			}
8904		});
8905		if ( !this.element.find("[aria-describedby]").length ) {
8906			this.uiDialog.attr({
8907				"aria-describedby": this.element.uniqueId().attr("id")
8908			});
8909		}
8910	},
8911	_createTitlebar: function() {
8912		var uiDialogTitle;
8913		this.uiDialogTitlebar = $("<div>")
8914			.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
8915			.prependTo( this.uiDialog );
8916		this._on( this.uiDialogTitlebar, {
8917			mousedown: function( event ) {
8918				if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) {
8919					this.uiDialog.focus();
8920				}
8921			}
8922		});
8923		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
8924			.button({
8925				label: this.options.closeText,
8926				icons: {
8927					primary: "ui-icon-closethick"
8928				},
8929				text: false
8930			})
8931			.addClass("ui-dialog-titlebar-close")
8932			.appendTo( this.uiDialogTitlebar );
8933		this._on( this.uiDialogTitlebarClose, {
8934			click: function( event ) {
8935				event.preventDefault();
8936				this.close( event );
8937			}
8938		});
8939		uiDialogTitle = $("<span>")
8940			.uniqueId()
8941			.addClass("ui-dialog-title")
8942			.prependTo( this.uiDialogTitlebar );
8943		this._title( uiDialogTitle );
8944		this.uiDialog.attr({
8945			"aria-labelledby": uiDialogTitle.attr("id")
8946		});
8947	},
8948	_title: function( title ) {
8949		if ( !this.options.title ) {
8950			title.html("&#160;");
8951		}
8952		title.text( this.options.title );
8953	},
8954	_createButtonPane: function() {
8955		this.uiDialogButtonPane = $("<div>")
8956			.addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
8957		this.uiButtonSet = $("<div>")
8958			.addClass("ui-dialog-buttonset")
8959			.appendTo( this.uiDialogButtonPane );
8960		this._createButtons();
8961	},
8962	_createButtons: function() {
8963		var that = this,
8964			buttons = this.options.buttons;
8965		this.uiDialogButtonPane.remove();
8966		this.uiButtonSet.empty();
8967		if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
8968			this.uiDialog.removeClass("ui-dialog-buttons");
8969			return;
8970		}
8971		$.each( buttons, function( name, props ) {
8972			var click, buttonOptions;
8973			props = $.isFunction( props ) ?
8974				{ click: props, text: name } :
8975				props;
8976			props = $.extend( { type: "button" }, props );
8977			click = props.click;
8978			props.click = function() {
8979				click.apply( that.element[0], arguments );
8980			};
8981			buttonOptions = {
8982				icons: props.icons,
8983				text: props.showText
8984			};
8985			delete props.icons;
8986			delete props.showText;
8987			$( "<button></button>", props )
8988				.button( buttonOptions )
8989				.appendTo( that.uiButtonSet );
8990		});
8991		this.uiDialog.addClass("ui-dialog-buttons");
8992		this.uiDialogButtonPane.appendTo( this.uiDialog );
8993	},
8994	_makeDraggable: function() {
8995		var that = this,
8996			options = this.options;
8997		function filteredUi( ui ) {
8998			return {
8999				position: ui.position,
9000				offset: ui.offset
9001			};
9002		}
9003		this.uiDialog.draggable({
9004			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
9005			handle: ".ui-dialog-titlebar",
9006			containment: "document",
9007			start: function( event, ui ) {
9008				$( this ).addClass("ui-dialog-dragging");
9009				that._blockFrames();
9010				that._trigger( "dragStart", event, filteredUi( ui ) );
9011			},
9012			drag: function( event, ui ) {
9013				that._trigger( "drag", event, filteredUi( ui ) );
9014			},
9015			stop: function( event, ui ) {
9016				options.position = [
9017					ui.position.left - that.document.scrollLeft(),
9018					ui.position.top - that.document.scrollTop()
9019				];
9020				$( this ).removeClass("ui-dialog-dragging");
9021				that._unblockFrames();
9022				that._trigger( "dragStop", event, filteredUi( ui ) );
9023			}
9024		});
9025	},
9026	_makeResizable: function() {
9027		var that = this,
9028			options = this.options,
9029			handles = options.resizable,
9030			position = this.uiDialog.css("position"),
9031			resizeHandles = typeof handles === "string" ?
9032				handles	:
9033				"n,e,s,w,se,sw,ne,nw";
9034		function filteredUi( ui ) {
9035			return {
9036				originalPosition: ui.originalPosition,
9037				originalSize: ui.originalSize,
9038				position: ui.position,
9039				size: ui.size
9040			};
9041		}
9042		this.uiDialog.resizable({
9043			cancel: ".ui-dialog-content",
9044			containment: "document",
9045			alsoResize: this.element,
9046			maxWidth: options.maxWidth,
9047			maxHeight: options.maxHeight,
9048			minWidth: options.minWidth,
9049			minHeight: this._minHeight(),
9050			handles: resizeHandles,
9051			start: function( event, ui ) {
9052				$( this ).addClass("ui-dialog-resizing");
9053				that._blockFrames();
9054				that._trigger( "resizeStart", event, filteredUi( ui ) );
9055			},
9056			resize: function( event, ui ) {
9057				that._trigger( "resize", event, filteredUi( ui ) );
9058			},
9059			stop: function( event, ui ) {
9060				options.height = $( this ).height();
9061				options.width = $( this ).width();
9062				$( this ).removeClass("ui-dialog-resizing");
9063				that._unblockFrames();
9064				that._trigger( "resizeStop", event, filteredUi( ui ) );
9065			}
9066		})
9067		.css( "position", position );
9068	},
9069	_minHeight: function() {
9070		var options = this.options;
9071		return options.height === "auto" ?
9072			options.minHeight :
9073			Math.min( options.minHeight, options.height );
9074	},
9075	_position: function() {
9076		var isVisible = this.uiDialog.is(":visible");
9077		if ( !isVisible ) {
9078			this.uiDialog.show();
9079		}
9080		this.uiDialog.position( this.options.position );
9081		if ( !isVisible ) {
9082			this.uiDialog.hide();
9083		}
9084	},
9085	_setOptions: function( options ) {
9086		var that = this,
9087			resize = false,
9088			resizableOptions = {};
9089		$.each( options, function( key, value ) {
9090			that._setOption( key, value );
9091			if ( key in sizeRelatedOptions ) {
9092				resize = true;
9093			}
9094			if ( key in resizableRelatedOptions ) {
9095				resizableOptions[ key ] = value;
9096			}
9097		});
9098		if ( resize ) {
9099			this._size();
9100			this._position();
9101		}
9102		if ( this.uiDialog.is(":data(ui-resizable)") ) {
9103			this.uiDialog.resizable( "option", resizableOptions );
9104		}
9105	},
9106	_setOption: function( key, value ) {
9107		var isDraggable, isResizable,
9108			uiDialog = this.uiDialog;
9109		if ( key === "dialogClass" ) {
9110			uiDialog
9111				.removeClass( this.options.dialogClass )
9112				.addClass( value );
9113		}
9114		if ( key === "disabled" ) {
9115			return;
9116		}
9117		this._super( key, value );
9118		if ( key === "appendTo" ) {
9119			this.uiDialog.appendTo( this._appendTo() );
9120		}
9121		if ( key === "buttons" ) {
9122			this._createButtons();
9123		}
9124		if ( key === "closeText" ) {
9125			this.uiDialogTitlebarClose.button({
9126				label: "" + value
9127			});
9128		}
9129		if ( key === "draggable" ) {
9130			isDraggable = uiDialog.is(":data(ui-draggable)");
9131			if ( isDraggable && !value ) {
9132				uiDialog.draggable("destroy");
9133			}
9134			if ( !isDraggable && value ) {
9135				this._makeDraggable();
9136			}
9137		}
9138		if ( key === "position" ) {
9139			this._position();
9140		}
9141		if ( key === "resizable" ) {
9142			isResizable = uiDialog.is(":data(ui-resizable)");
9143			if ( isResizable && !value ) {
9144				uiDialog.resizable("destroy");
9145			}
9146			if ( isResizable && typeof value === "string" ) {
9147				uiDialog.resizable( "option", "handles", value );
9148			}
9149			if ( !isResizable && value !== false ) {
9150				this._makeResizable();
9151			}
9152		}
9153		if ( key === "title" ) {
9154			this._title( this.uiDialogTitlebar.find(".ui-dialog-title") );
9155		}
9156	},
9157	_size: function() {
9158		var nonContentHeight, minContentHeight, maxContentHeight,
9159			options = this.options;
9160		this.element.show().css({
9161			width: "auto",
9162			minHeight: 0,
9163			maxHeight: "none",
9164			height: 0
9165		});
9166		if ( options.minWidth > options.width ) {
9167			options.width = options.minWidth;
9168		}
9169		nonContentHeight = this.uiDialog.css({
9170				height: "auto",
9171				width: options.width
9172			})
9173			.outerHeight();
9174		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
9175		maxContentHeight = typeof options.maxHeight === "number" ?
9176			Math.max( 0, options.maxHeight - nonContentHeight ) :
9177			"none";
9178		if ( options.height === "auto" ) {
9179			this.element.css({
9180				minHeight: minContentHeight,
9181				maxHeight: maxContentHeight,
9182				height: "auto"
9183			});
9184		} else {
9185			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
9186		}
9187		if (this.uiDialog.is(":data(ui-resizable)") ) {
9188			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
9189		}
9190	},
9191	_blockFrames: function() {
9192		this.iframeBlocks = this.document.find( "iframe" ).map(function() {
9193			var iframe = $( this );
9194			return $( "<div>" )
9195				.css({
9196					position: "absolute",
9197					width: iframe.outerWidth(),
9198					height: iframe.outerHeight()
9199				})
9200				.appendTo( iframe.parent() )
9201				.offset( iframe.offset() )[0];
9202		});
9203	},
9204	_unblockFrames: function() {
9205		if ( this.iframeBlocks ) {
9206			this.iframeBlocks.remove();
9207			delete this.iframeBlocks;
9208		}
9209	},
9210	_allowInteraction: function( event ) {
9211		if ( $( event.target ).closest(".ui-dialog").length ) {
9212			return true;
9213		}
9214		return !!$( event.target ).closest(".ui-datepicker").length;
9215	},
9216	_createOverlay: function() {
9217		if ( !this.options.modal ) {
9218			return;
9219		}
9220		var that = this,
9221			widgetFullName = this.widgetFullName;
9222		if ( !$.ui.dialog.overlayInstances ) {
9223			this._delay(function() {
9224				if ( $.ui.dialog.overlayInstances ) {
9225					this.document.bind( "focusin.dialog", function( event ) {
9226						if ( !that._allowInteraction( event ) ) {
9227							event.preventDefault();
9228							$(".ui-dialog:visible:last .ui-dialog-content")
9229								.data( widgetFullName )._focusTabbable();
9230						}
9231					});
9232				}
9233			});
9234		}
9235		this.overlay = $("<div>")
9236			.addClass("ui-widget-overlay ui-front")
9237			.appendTo( this._appendTo() );
9238		this._on( this.overlay, {
9239			mousedown: "_keepFocus"
9240		});
9241		$.ui.dialog.overlayInstances++;
9242	},
9243	_destroyOverlay: function() {
9244		if ( !this.options.modal ) {
9245			return;
9246		}
9247		if ( this.overlay ) {
9248			$.ui.dialog.overlayInstances--;
9249
9250			if ( !$.ui.dialog.overlayInstances ) {
9251				this.document.unbind( "focusin.dialog" );
9252			}
9253			this.overlay.remove();
9254			this.overlay = null;
9255		}
9256	}
9257});
9258$.ui.dialog.overlayInstances = 0;
9259if ( $.uiBackCompat !== false ) {
9260	$.widget( "ui.dialog", $.ui.dialog, {
9261		_position: function() {
9262			var position = this.options.position,
9263				myAt = [],
9264				offset = [ 0, 0 ],
9265				isVisible;
9266			if ( position ) {
9267				if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
9268					myAt = position.split ? position.split(" ") : [ position[0], position[1] ];
9269					if ( myAt.length === 1 ) {
9270						myAt[1] = myAt[0];
9271					}
9272					$.each( [ "left", "top" ], function( i, offsetPosition ) {
9273						if ( +myAt[ i ] === myAt[ i ] ) {
9274							offset[ i ] = myAt[ i ];
9275							myAt[ i ] = offsetPosition;
9276						}
9277					});
9278					position = {
9279						my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
9280							myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
9281						at: myAt.join(" ")
9282					};
9283				}
9284				position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
9285			} else {
9286				position = $.ui.dialog.prototype.options.position;
9287			}
9288			isVisible = this.uiDialog.is(":visible");
9289			if ( !isVisible ) {
9290				this.uiDialog.show();
9291			}
9292			this.uiDialog.position( position );
9293			if ( !isVisible ) {
9294				this.uiDialog.hide();
9295			}
9296		}
9297	});
9298}
9299}( jQuery ) );
9300(function( $ ) {
9301function modifier( fn ) {
9302	return function() {
9303		var previous = this.element.val();
9304		fn.apply( this, arguments );
9305		this._refresh();
9306		if ( previous !== this.element.val() ) {
9307			this._trigger( "change" );
9308		}
9309	};
9310}
9311$.widget( "ui.spinner", {
9312	version: "1.10.4",
9313	defaultElement: "<input>",
9314	widgetEventPrefix: "spin",
9315	options: {
9316		culture: null,
9317		icons: {
9318			down: "ui-icon-triangle-1-s",
9319			up: "ui-icon-triangle-1-n"
9320		},
9321		incremental: true,
9322		max: null,
9323		min: null,
9324		numberFormat: null,
9325		page: 10,
9326		step: 1,
9327
9328		change: null,
9329		spin: null,
9330		start: null,
9331		stop: null
9332	},
9333	_create: function() {
9334		// handle string values that need to be parsed
9335		this._setOption( "max", this.options.max );
9336		this._setOption( "min", this.options.min );
9337		this._setOption( "step", this.options.step );
9338		if ( this.value() !== "" ) {
9339			// Format the value, but don't constrain.
9340			this._value( this.element.val(), true );
9341		}
9342		this._draw();
9343		this._on( this._events );
9344		this._refresh();
9345		this._on( this.window, {
9346			beforeunload: function() {
9347				this.element.removeAttr( "autocomplete" );
9348			}
9349		});
9350	},
9351	_getCreateOptions: function() {
9352		var options = {},
9353			element = this.element;
9354		$.each( [ "min", "max", "step" ], function( i, option ) {
9355			var value = element.attr( option );
9356			if ( value !== undefined && value.length ) {
9357				options[ option ] = value;
9358			}
9359		});
9360		return options;
9361	},
9362	_events: {
9363		keydown: function( event ) {
9364			if ( this._start( event ) && this._keydown( event ) ) {
9365				event.preventDefault();
9366			}
9367		},
9368		keyup: "_stop",
9369		focus: function() {
9370			this.previous = this.element.val();
9371		},
9372		blur: function( event ) {
9373			if ( this.cancelBlur ) {
9374				delete this.cancelBlur;
9375				return;
9376			}
9377			this._stop();
9378			this._refresh();
9379			if ( this.previous !== this.element.val() ) {
9380				this._trigger( "change", event );
9381			}
9382		},
9383		mousewheel: function( event, delta ) {
9384			if ( !delta ) {
9385				return;
9386			}
9387			if ( !this.spinning && !this._start( event ) ) {
9388				return false;
9389			}
9390
9391			this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
9392			clearTimeout( this.mousewheelTimer );
9393			this.mousewheelTimer = this._delay(function() {
9394				if ( this.spinning ) {
9395					this._stop( event );
9396				}
9397			}, 100 );
9398			event.preventDefault();
9399		},
9400		"mousedown .ui-spinner-button": function( event ) {
9401			var previous;
9402			previous = this.element[0] === this.document[0].activeElement ?
9403				this.previous : this.element.val();
9404			function checkFocus() {
9405				var isActive = this.element[0] === this.document[0].activeElement;
9406				if ( !isActive ) {
9407					this.element.focus();
9408					this.previous = previous;
9409					this._delay(function() {
9410						this.previous = previous;
9411					});
9412				}
9413			}
9414			event.preventDefault();
vendor: 11,899 bytes, lines 9415-9848
9415			checkFocus.call( this );
9416			this.cancelBlur = true;
9417			this._delay(function() {
9418				delete this.cancelBlur;
9419				checkFocus.call( this );
9420			});
9421			if ( this._start( event ) === false ) {
9422				return;
9423			}
9424			this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
9425		},
9426		"mouseup .ui-spinner-button": "_stop",
9427		"mouseenter .ui-spinner-button": function( event ) {
9428			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
9429				return;
9430			}
9431			if ( this._start( event ) === false ) {
9432				return false;
9433			}
9434			this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
9435		},
9436		"mouseleave .ui-spinner-button": "_stop"
9437	},
9438	_draw: function() {
9439		var uiSpinner = this.uiSpinner = this.element
9440			.addClass( "ui-spinner-input" )
9441			.attr( "autocomplete", "off" )
9442			.wrap( this._uiSpinnerHtml() )
9443			.parent()
9444				// add buttons
9445				.append( this._buttonHtml() );
9446		this.element.attr( "role", "spinbutton" );
9447		this.buttons = uiSpinner.find( ".ui-spinner-button" )
9448			.attr( "tabIndex", -1 )
9449			.button()
9450			.removeClass( "ui-corner-all" );
9451		if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
9452				uiSpinner.height() > 0 ) {
9453			uiSpinner.height( uiSpinner.height() );
9454		}
9455		if ( this.options.disabled ) {
9456			this.disable();
9457		}
9458	},
9459	_keydown: function( event ) {
9460		var options = this.options,
9461			keyCode = $.ui.keyCode;
9462		switch ( event.keyCode ) {
9463		case keyCode.UP:
9464			this._repeat( null, 1, event );
9465			return true;
9466		case keyCode.DOWN:
9467			this._repeat( null, -1, event );
9468			return true;
9469		case keyCode.PAGE_UP:
9470			this._repeat( null, options.page, event );
9471			return true;
9472		case keyCode.PAGE_DOWN:
9473			this._repeat( null, -options.page, event );
9474			return true;
9475		}
9476
9477		return false;
9478	},
9479	_uiSpinnerHtml: function() {
9480		return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
9481	},
9482	_buttonHtml: function() {
9483		return "" +
9484			"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
9485				"<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
9486			"</a>" +
9487			"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
9488				"<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
9489			"</a>";
9490	},
9491	_start: function( event ) {
9492		if ( !this.spinning && this._trigger( "start", event ) === false ) {
9493			return false;
9494		}
9495		if ( !this.counter ) {
9496			this.counter = 1;
9497		}
9498		this.spinning = true;
9499		return true;
9500	},
9501	_repeat: function( i, steps, event ) {
9502		i = i || 500;
9503		clearTimeout( this.timer );
9504		this.timer = this._delay(function() {
9505			this._repeat( 40, steps, event );
9506		}, i );
9507		this._spin( steps * this.options.step, event );
9508	},
9509	_spin: function( step, event ) {
9510		var value = this.value() || 0;
9511		if ( !this.counter ) {
9512			this.counter = 1;
9513		}
9514		value = this._adjustValue( value + step * this._increment( this.counter ) );
9515		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
9516			this._value( value );
9517			this.counter++;
9518		}
9519	},
9520	_increment: function( i ) {
9521		var incremental = this.options.incremental;
9522		if ( incremental ) {
9523			return $.isFunction( incremental ) ?
9524				incremental( i ) :
9525				Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
9526		}
9527		return 1;
9528	},
9529	_precision: function() {
9530		var precision = this._precisionOf( this.options.step );
9531		if ( this.options.min !== null ) {
9532			precision = Math.max( precision, this._precisionOf( this.options.min ) );
9533		}
9534		return precision;
9535	},
9536	_precisionOf: function( num ) {
9537		var str = num.toString(),
9538			decimal = str.indexOf( "." );
9539		return decimal === -1 ? 0 : str.length - decimal - 1;
9540	},
9541	_adjustValue: function( value ) {
9542		var base, aboveMin,
9543			options = this.options;
9544		base = options.min !== null ? options.min : 0;
9545		aboveMin = value - base;
9546		aboveMin = Math.round(aboveMin / options.step) * options.step;
9547		value = base + aboveMin;
9548		value = parseFloat( value.toFixed( this._precision() ) );
9549		if ( options.max !== null && value > options.max) {
9550			return options.max;
9551		}
9552		if ( options.min !== null && value < options.min ) {
9553			return options.min;
9554		}
9555		return value;
9556	},
9557	_stop: function( event ) {
9558		if ( !this.spinning ) {
9559			return;
9560		}
9561		clearTimeout( this.timer );
9562		clearTimeout( this.mousewheelTimer );
9563		this.counter = 0;
9564		this.spinning = false;
9565		this._trigger( "stop", event );
9566	},
9567	_setOption: function( key, value ) {
9568		if ( key === "culture" || key === "numberFormat" ) {
9569			var prevValue = this._parse( this.element.val() );
9570			this.options[ key ] = value;
9571			this.element.val( this._format( prevValue ) );
9572			return;
9573		}
9574		if ( key === "max" || key === "min" || key === "step" ) {
9575			if ( typeof value === "string" ) {
9576				value = this._parse( value );
9577			}
9578		}
9579		if ( key === "icons" ) {
9580			this.buttons.first().find( ".ui-icon" )
9581				.removeClass( this.options.icons.up )
9582				.addClass( value.up );
9583			this.buttons.last().find( ".ui-icon" )
9584				.removeClass( this.options.icons.down )
9585				.addClass( value.down );
9586		}
9587		this._super( key, value );
9588		if ( key === "disabled" ) {
9589			if ( value ) {
9590				this.element.prop( "disabled", true );
9591				this.buttons.button( "disable" );
9592			} else {
9593				this.element.prop( "disabled", false );
9594				this.buttons.button( "enable" );
9595			}
9596		}
9597	},
9598	_setOptions: modifier(function( options ) {
9599		this._super( options );
9600		this._value( this.element.val() );
9601	}),
9602	_parse: function( val ) {
9603		if ( typeof val === "string" && val !== "" ) {
9604			val = window.Globalize && this.options.numberFormat ?
9605				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
9606		}
9607		return val === "" || isNaN( val ) ? null : val;
9608	},
9609	_format: function( value ) {
9610		if ( value === "" ) {
9611			return "";
9612		}
9613		return window.Globalize && this.options.numberFormat ?
9614			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
9615			value;
9616	},
9617	_refresh: function() {
9618		this.element.attr({
9619			"aria-valuemin": this.options.min,
9620			"aria-valuemax": this.options.max,
9621			// TODO: what should we do with values that can't be parsed?
9622			"aria-valuenow": this._parse( this.element.val() )
9623		});
9624	},
9625	_value: function( value, allowAny ) {
9626		var parsed;
9627		if ( value !== "" ) {
9628			parsed = this._parse( value );
9629			if ( parsed !== null ) {
9630				if ( !allowAny ) {
9631					parsed = this._adjustValue( parsed );
9632				}
9633				value = this._format( parsed );
9634			}
9635		}
9636		this.element.val( value );
9637		this._refresh();
9638	},
9639	_destroy: function() {
9640		this.element
9641			.removeClass( "ui-spinner-input" )
9642			.prop( "disabled", false )
9643			.removeAttr( "autocomplete" )
9644			.removeAttr( "role" )
9645			.removeAttr( "aria-valuemin" )
9646			.removeAttr( "aria-valuemax" )
9647			.removeAttr( "aria-valuenow" );
9648		this.uiSpinner.replaceWith( this.element );
9649	},
9650	stepUp: modifier(function( steps ) {
9651		this._stepUp( steps );
9652	}),
9653	_stepUp: function( steps ) {
9654		if ( this._start() ) {
9655			this._spin( (steps || 1) * this.options.step );
9656			this._stop();
9657		}
9658	},
9659	stepDown: modifier(function( steps ) {
9660		this._stepDown( steps );
9661	}),
9662	_stepDown: function( steps ) {
9663		if ( this._start() ) {
9664			this._spin( (steps || 1) * -this.options.step );
9665			this._stop();
9666		}
9667	},
9668	pageUp: modifier(function( pages ) {
9669		this._stepUp( (pages || 1) * this.options.page );
9670	}),
9671	pageDown: modifier(function( pages ) {
9672		this._stepDown( (pages || 1) * this.options.page );
9673	}),
9674	value: function( newVal ) {
9675		if ( !arguments.length ) {
9676			return this._parse( this.element.val() );
9677		}
9678		modifier( this._value ).call( this, newVal );
9679	},
9680	widget: function() {
9681		return this.uiSpinner;
9682	}
9683});
9684}( jQuery ) );
9685(function( $ ) {
9686var increments = 0;
9687function addDescribedBy( elem, id ) {
9688	var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
9689	describedby.push( id );
9690	elem
9691		.data( "ui-tooltip-id", id )
9692		.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
9693}
9694function removeDescribedBy( elem ) {
9695	var id = elem.data( "ui-tooltip-id" ),
9696		describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
9697		index = $.inArray( id, describedby );
9698	if ( index !== -1 ) {
9699		describedby.splice( index, 1 );
9700	}
9701	elem.removeData( "ui-tooltip-id" );
9702	describedby = $.trim( describedby.join( " " ) );
9703	if ( describedby ) {
9704		elem.attr( "aria-describedby", describedby );
9705	} else {
9706		elem.removeAttr( "aria-describedby" );
9707	}
9708}
9709$.widget( "ui.tooltip", {
9710	version: "1.10.4",
9711	options: {
9712		content: function() {
9713			var title = $( this ).attr( "title" ) || "";
9714			return $( "<a>" ).text( title ).html();
9715		},
9716		hide: true,
9717		items: "[title]:not([disabled])",
9718		position: {
9719			my: "left top+15",
9720			at: "left bottom",
9721			collision: "flipfit flip"
9722		},
9723		show: true,
9724		tooltipClass: null,
9725		track: false,
9726		close: null,
9727		open: null
9728	},
9729	_create: function() {
9730		this._on({
9731			mouseover: "open",
9732			focusin: "open"
9733		});
9734		this.tooltips = {};
9735		this.parents = {};
9736		if ( this.options.disabled ) {
9737			this._disable();
9738		}
9739	},
9740	_setOption: function( key, value ) {
9741		var that = this;
9742		if ( key === "disabled" ) {
9743			this[ value ? "_disable" : "_enable" ]();
9744			this.options[ key ] = value;
9745			return;
9746		}
9747		this._super( key, value );
9748		if ( key === "content" ) {
9749			$.each( this.tooltips, function( id, element ) {
9750				that._updateContent( element );
9751			});
9752		}
9753	},
9754	_disable: function() {
9755		var that = this;
9756		$.each( this.tooltips, function( id, element ) {
9757			var event = $.Event( "blur" );
9758			event.target = event.currentTarget = element[0];
9759			that.close( event, true );
9760		});
9761		this.element.find( this.options.items ).addBack().each(function() {
9762			var element = $( this );
9763			if ( element.is( "[title]" ) ) {
9764				element
9765					.data( "ui-tooltip-title", element.attr( "title" ) )
9766					.attr( "title", "" );
9767			}
9768		});
9769	},
9770	_enable: function() {
9771		this.element.find( this.options.items ).addBack().each(function() {
9772			var element = $( this );
9773			if ( element.data( "ui-tooltip-title" ) ) {
9774				element.attr( "title", element.data( "ui-tooltip-title" ) );
9775			}
9776		});
9777	},
9778	open: function( event ) {
9779		var that = this,
9780			target = $( event ? event.target : this.element )
9781				.closest( this.options.items );
9782		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
9783			return;
9784		}
9785		if ( target.attr( "title" ) ) {
9786			target.data( "ui-tooltip-title", target.attr( "title" ) );
9787		}
9788		target.data( "ui-tooltip-open", true );
9789		if ( event && event.type === "mouseover" ) {
9790			target.parents().each(function() {
9791				var parent = $( this ),
9792					blurEvent;
9793				if ( parent.data( "ui-tooltip-open" ) ) {
9794					blurEvent = $.Event( "blur" );
9795					blurEvent.target = blurEvent.currentTarget = this;
9796					that.close( blurEvent, true );
9797				}
9798				if ( parent.attr( "title" ) ) {
9799					parent.uniqueId();
9800					that.parents[ this.id ] = {
9801						element: this,
9802						title: parent.attr( "title" )
9803					};
9804					parent.attr( "title", "" );
9805				}
9806			});
9807		}
9808		this._updateContent( target, event );
9809	},
9810	_updateContent: function( target, event ) {
9811		var content,
9812			contentOption = this.options.content,
9813			that = this,
9814			eventType = event ? event.type : null;
9815
9816		if ( typeof contentOption === "string" ) {
9817			return this._open( event, target, contentOption );
9818		}
9819		content = contentOption.call( target[0], function( response ) {
9820			if ( !target.data( "ui-tooltip-open" ) ) {
9821				return;
9822			}
9823			that._delay(function() {
9824				if ( event ) {
9825					event.type = eventType;
9826				}
9827				this._open( event, target, response );
9828			});
9829		});
9830		if ( content ) {
9831			this._open( event, target, content );
9832		}
9833	},
9834	_open: function( event, target, content ) {
9835		var tooltip, events, delayedShow,
9836			positionOption = $.extend( {}, this.options.position );
9837		if ( !content ) {
9838			return;
9839		}
9840		tooltip = this._find( target );
9841		if ( tooltip.length ) {
9842			tooltip.find( ".ui-tooltip-content" ).html( content );
9843			return;
9844		}
9845		if ( target.is( "[title]" ) ) {
9846			if ( event && event.type === "mouseover" ) {
9847				target.attr( "title", "" );
9848			} else {
9849				target.removeAttr( "title" );
9850			}
9851		}
9852		tooltip = this._tooltip( target );
9853		addDescribedBy( target, tooltip.attr( "id" ) );
9854		tooltip.find( ".ui-tooltip-content" ).html( content );
9855		function position( event ) {
9856			positionOption.of = event;
9857			if ( tooltip.is( ":hidden" ) ) {
9858				return;
9859			}
9860			tooltip.position( positionOption );
9861		}
9862		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
9863			this._on( this.document, {
9864				mousemove: position
9865			});
9866			position( event );
9867		} else {
9868			tooltip.position( $.extend({
9869				of: target
9870			}, this.options.position ) );
9871		}
9872		tooltip.hide();
9873		this._show( tooltip, this.options.show );
9874		if ( this.options.show && this.options.show.delay ) {
9875			delayedShow = this.delayedShow = setInterval(function() {
9876				if ( tooltip.is( ":visible" ) ) {
9877					position( positionOption.of );
9878					clearInterval( delayedShow );
9879				}
9880			}, $.fx.interval );
9881		}
9882		this._trigger( "open", event, { tooltip: tooltip } );
9883		events = {
9884			keyup: function( event ) {
9885				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
9886					var fakeEvent = $.Event(event);
9887					fakeEvent.currentTarget = target[0];
9888					this.close( fakeEvent, true );
9889				}
9890			},
9891			remove: function() {
9892				this._removeTooltip( tooltip );
9893			}
9894		};
9895		if ( !event || event.type === "mouseover" ) {
9896			events.mouseleave = "close";
9897		}
9898		if ( !event || event.type === "focusin" ) {
9899			events.focusout = "close";
9900		}
9901		this._on( true, target, events );
9902	},
9903	close: function( event ) {
9904		var that = this,
9905			target = $( event ? event.currentTarget : this.element ),
9906			tooltip = this._find( target );
9907		if ( this.closing ) {
9908			return;
9909		}
9910		clearInterval( this.delayedShow );
9911		if ( target.data( "ui-tooltip-title" ) ) {
9912			target.attr( "title", target.data( "ui-tooltip-title" ) );
9913		}
9914		removeDescribedBy( target );
9915		tooltip.stop( true );
9916		this._hide( tooltip, this.options.hide, function() {
9917			that._removeTooltip( $( this ) );
9918		});
9919		target.removeData( "ui-tooltip-open" );
9920		this._off( target, "mouseleave focusout keyup" );
9921		if ( target[0] !== this.element[0] ) {
9922			this._off( target, "remove" );
9923		}
9924		this._off( this.document, "mousemove" );
9925		if ( event && event.type === "mouseleave" ) {
9926			$.each( this.parents, function( id, parent ) {
9927				$( parent.element ).attr( "title", parent.title );
9928				delete that.parents[ id ];
9929			});
9930		}
9931		this.closing = true;
9932		this._trigger( "close", event, { tooltip: tooltip } );
9933		this.closing = false;
9934	},
9935	_tooltip: function( element ) {
9936		var id = "ui-tooltip-" + increments++,
9937			tooltip = $( "<div>" )
9938				.attr({
9939					id: id,
9940					role: "tooltip"
9941				})
9942				.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
9943					( this.options.tooltipClass || "" ) );
9944		$( "<div>" )
9945			.addClass( "ui-tooltip-content" )
9946			.appendTo( tooltip );
9947		tooltip.appendTo( this.document[0].body );
9948		this.tooltips[ id ] = element;
9949		return tooltip;
9950	},
9951	_find: function( target ) {
9952		var id = target.data( "ui-tooltip-id" );
9953		return id ? $( "#" + id ) : $();
9954	},
9955	_removeTooltip: function( tooltip ) {
9956		tooltip.remove();
9957		delete this.tooltips[ tooltip.attr( "id" ) ];
9958	},
9959	_destroy: function() {
9960		var that = this;
9961		$.each( this.tooltips, function( id, element ) {
9962			var event = $.Event( "blur" );
9963			event.target = event.currentTarget = element[0];
9964			that.close( event, true );
9965			$( "#" + id ).remove();
9966			if ( element.data( "ui-tooltip-title" ) ) {
9967				element.attr( "title", element.data( "ui-tooltip-title" ) );
9968				element.removeData( "ui-tooltip-title" );
9969			}
9970		});
9971	}
9972});
9973}(jQuery));
9974</script>
9974<script>jQuery(function(a){a.datepicker.regional.pt={closeText:"Fechar",preposition:"",prevText:"&#x3c;Anterior",nextText:"Seguinte",currentText:"Hoje",monthNames:"Janeiro Fevereiro Mar&ccedil;o Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro".split(" "),monthNamesShort:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),dayNames:"Domingo Segunda-feira Ter&ccedil;a-feira Quarta-feira Quinta-feira Sexta-feira S&aacute;bado".split(" "),dayNamesShort:"Dom Seg Ter Qua Qui Sex S&aacute;b".split(" "),dayNamesMin:"Dom Seg Ter Qua Qui Sex S&aacute;b".split(" "),weekHeader:"Sem",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};a.datepicker.setDefaults(a.datepicker.regional.pt)});</script>
9974<script>
9975(function() {
9976  var $ = jQuery;
9977  var LightboxOptions = (function() {
9978    function LightboxOptions() {
9979      this.fadeDuration                = 500;
9980      this.fitImagesInViewport         = true;
9981      this.resizeDuration              = 700;
9982      this.positionFromTop             = 50;
9983      this.showImageNumberLabel        = true;
9984      this.alwaysShowNavOnTouchDevices = false;
9985      this.wrapAround                  = false;
9986    }
9987    LightboxOptions.prototype.albumLabel = function(curImageNum, albumSize) {
9988      return "Image " + curImageNum + " of " + albumSize;
9989    };
9990    return LightboxOptions;
9991  })();
9992  var Lightbox = (function() {
9993    function Lightbox(options) {
9994      this.options           = options;
9995      this.album             = [];
9996      this.currentImageIndex = void 0;
9997      this.init();
9998    }
9999    Lightbox.prototype.init = function() {
10000      this.enable();
10001      this.build();
10002    };
10003    Lightbox.prototype.enable = function() {
10004      var self = this;
10005      $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) {
10006        self.start($(event.currentTarget));
10007        return false;
10008      });
10009    };
10010    Lightbox.prototype.build = function() {
10011      var self = this;
10012      $("<div id='lightboxOverlay' class='lightboxOverlay'></div><div id='lightbox' class='lightbox'><div class='lb-outerContainer'><div class='lb-container'><img class='lb-image' src='' /><div class='lb-nav'><a class='lb-prev' href='' ></a><a class='lb-next' href='' ></a></div><div class='lb-loader'><a class='lb-cancel'></a></div></div></div><div class='lb-dataContainer'><div class='lb-data'><div class='lb-details'><span class='lb-caption'></span><span class='lb-number'></span></div><div class='lb-closeContainer'><a class='lb-close'></a></div></div></div></div>").appendTo($('body'));
10013      this.$lightbox       = $('#lightbox');
10014      this.$overlay        = $('#lightboxOverlay');
10015      this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
10016      this.$container      = this.$lightbox.find('.lb-container');
10017      this.containerTopPadding = parseInt(this.$container.css('padding-top'), 10);
10018      this.containerRightPadding = parseInt(this.$container.css('padding-right'), 10);
10019      this.containerBottomPadding = parseInt(this.$container.css('padding-bottom'), 10);
10020      this.containerLeftPadding = parseInt(this.$container.css('padding-left'), 10);
10021      this.$overlay.hide().on('click', function() {
10022        self.end();
10023        return false;
10024      });
10025      this.$lightbox.hide().on('click', function(event) {
10026        if ($(event.target).attr('id') === 'lightbox') {
10027          self.end();
10028        }
10029        return false;
10030      });
10031      this.$outerContainer.on('click', function(event) {
10032        if ($(event.target).attr('id') === 'lightbox') {
10033          self.end();
10034        }
10035        return false;
10036      });
10037      this.$lightbox.find('.lb-prev').on('click', function() {
10038        if (self.currentImageIndex === 0) {
10039          self.changeImage(self.album.length - 1);
10040        } else {
10041          self.changeImage(self.currentImageIndex - 1);
10042        }
10043        return false;
10044      });
10045      this.$lightbox.find('.lb-next').on('click', function() {
10046        if (self.currentImageIndex === self.album.length - 1) {
10047          self.changeImage(0);
10048        } else {
10049          self.changeImage(self.currentImageIndex + 1);
10050        }
10051        return false;
10052      });
10053      this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
10054        self.end();
10055        return false;
10056      });
10057    };
10058    Lightbox.prototype.start = function($link) {
10059      var self    = this;
10060      var $window = $(window);
10061      $window.on('resize', $.proxy(this.sizeOverlay, this));
10062      $('select, object, embed').css({
10063        visibility: "hidden"
10064      });
10065      this.sizeOverlay();
10066      this.album = [];
10067      var imageNumber = 0;
10068      function addToAlbum($link) {
10069        self.album.push({
10070          link: $link.attr('href'),
10071          title: $link.attr('data-title') || $link.attr('title')
10072        });
10073      }
10074      var dataLightboxValue = $link.attr('data-lightbox');
10075      var $links;
10076      if (dataLightboxValue) {
10077        $links = $($link.prop("tagName") + '[data-lightbox="' + dataLightboxValue + '"]');
10078        for (var i = 0; i < $links.length; i = ++i) {
10079          addToAlbum($($links[i]));
10080          if ($links[i] === $link[0]) {
10081            imageNumber = i;
10082          }
10083        }
10084      } else {
10085        if ($link.attr('rel') === 'lightbox') {
10086          // If image is not part of a set
10087          addToAlbum($link);
10088        } else {
10089          // If image is part of a set
10090          $links = $($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]');
10091          for (var j = 0; j < $links.length; j = ++j) {
10092            addToAlbum($($links[j]));
10093            if ($links[j] === $link[0]) {
10094              imageNumber = j;
10095            }
10096          }
10097        }
10098      }
10099      var top  = $window.scrollTop() + this.options.positionFromTop;
10100      var left = $window.scrollLeft();
10101      this.$lightbox.css({
10102        top: top + 'px',
10103        left: left + 'px'
10104      }).fadeIn(this.options.fadeDuration);
10105      this.changeImage(imageNumber);
10106    };
10107    Lightbox.prototype.changeImage = function(imageNumber) {
10108      var self = this;
10109      this.disableKeyboardNav();
10110      var $image = this.$lightbox.find('.lb-image');
10111      this.$overlay.fadeIn(this.options.fadeDuration);
10112      $('.lb-loader').fadeIn('slow');
10113      this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
10114      this.$outerContainer.addClass('animating');
10115      var preloader = new Image();
10116      preloader.onload = function() {
10117        var $preloader, imageHeight, imageWidth, maxImageHeight, maxImageWidth, windowHeight, windowWidth;
10118        $image.attr('src', self.album[imageNumber].link);
10119        $preloader = $(preloader);
10120        $image.width(preloader.width);
10121        $image.height(preloader.height);
10122        if (self.options.fitImagesInViewport) {
10123          windowWidth    = $(window).width();
10124          windowHeight   = $(window).height();
10125          maxImageWidth  = windowWidth - self.containerLeftPadding - self.containerRightPadding - 20;
10126          maxImageHeight = windowHeight - self.containerTopPadding - self.containerBottomPadding - 120;
10127          if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
10128            if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
10129              imageWidth  = maxImageWidth;
10130              imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
10131              $image.width(imageWidth);
10132              $image.height(imageHeight);
10133            } else {
10134              imageHeight = maxImageHeight;
10135              imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
10136              $image.width(imageWidth);
10137              $image.height(imageHeight);
10138            }
10139          }
10140        }
10141        self.sizeContainer($image.width(), $image.height());
10142      };
10143      preloader.src          = this.album[imageNumber].link;
10144      this.currentImageIndex = imageNumber;
10145    };
10146    Lightbox.prototype.sizeOverlay = function() {
10147      this.$overlay
10148        .width($(window).width())
10149        .height($(document).height());
10150    };
10151    Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
10152      var self = this;
10153      var oldWidth  = this.$outerContainer.outerWidth();
10154      var oldHeight = this.$outerContainer.outerHeight();
10155      var newWidth  = imageWidth + this.containerLeftPadding + this.containerRightPadding;
10156      var newHeight = imageHeight + this.containerTopPadding + this.containerBottomPadding;
10157      function postResize() {
10158        self.$lightbox.find('.lb-dataContainer').width(newWidth);
10159        self.$lightbox.find('.lb-prevLink').height(newHeight);
10160        self.$lightbox.find('.lb-nextLink').height(newHeight);
10161        self.showImage();
10162      }
10163      if (oldWidth !== newWidth || oldHeight !== newHeight) {
10164        this.$outerContainer.animate({
10165          width: newWidth,
10166          height: newHeight
10167        }, this.options.resizeDuration, 'swing', function() {
10168          postResize();
10169        });
10170      } else {
10171        postResize();
10172      }
10173    };
10174    Lightbox.prototype.showImage = function() {
10175      this.$lightbox.find('.lb-loader').hide();
10176      this.$lightbox.find('.lb-image').fadeIn('slow');
10177      this.updateNav();
10178      this.updateDetails();
10179      this.preloadNeighboringImages();
10180      this.enableKeyboardNav();
10181    };
10182    Lightbox.prototype.updateNav = function() {
10183      var alwaysShowNav = false;
10184      try {
10185        document.createEvent("TouchEvent");
10186        alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices)? true: false;
10187      } catch (e) {}
10188      this.$lightbox.find('.lb-nav').show();
10189      if (this.album.length > 1) {
10190        if (this.options.wrapAround) {
10191          if (alwaysShowNav) {
10192            this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
10193          }
10194          this.$lightbox.find('.lb-prev, .lb-next').show();
10195        } else {
10196          if (this.currentImageIndex > 0) {
10197            this.$lightbox.find('.lb-prev').show();
10198            if (alwaysShowNav) {
10199              this.$lightbox.find('.lb-prev').css('opacity', '1');
10200            }
10201          }
10202          if (this.currentImageIndex < this.album.length - 1) {
10203            this.$lightbox.find('.lb-next').show();
10204            if (alwaysShowNav) {
10205              this.$lightbox.find('.lb-next').css('opacity', '1');
10206            }
10207          }
10208        }
10209      }
10210    };
10211    Lightbox.prototype.updateDetails = function() {
10212      var self = this;
10213      if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") {
10214        this.$lightbox.find('.lb-caption')
10215          .html(this.album[this.currentImageIndex].title)
10216          .fadeIn('fast')
10217          .find('a').on('click', function(event){
10218            location.href = $(this).attr('href');
10219          });
10220      }
10221      if (this.album.length > 1 && this.options.showImageNumberLabel) {
10222        this.$lightbox.find('.lb-number').text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn('fast');
10223      } else {
10224        this.$lightbox.find('.lb-number').hide();
10225      }
10226      this.$outerContainer.removeClass('animating');
10227      this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
10228        return self.sizeOverlay();
10229      });
10230    };
10231    Lightbox.prototype.preloadNeighboringImages = function() {
10232      if (this.album.length > this.currentImageIndex + 1) {
10233        var preloadNext = new Image();
10234        preloadNext.src = this.album[this.currentImageIndex + 1].link;
10235      }
10236      if (this.currentImageIndex > 0) {
10237        var preloadPrev = new Image();
10238        preloadPrev.src = this.album[this.currentImageIndex - 1].link;
10239      }
10240    };
10241    Lightbox.prototype.enableKeyboardNav = function() {
10242      $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
10243    };
10244    Lightbox.prototype.disableKeyboardNav = function() {
10245      $(document).off('.keyboard');
10246    };
10247    Lightbox.prototype.keyboardAction = function(event) {
10248      var KEYCODE_ESC        = 27;
10249      var KEYCODE_LEFTARROW  = 37;
10250      var KEYCODE_RIGHTARROW = 39;
10251      var keycode = event.keyCode;
10252      var key     = String.fromCharCode(keycode).toLowerCase();
10253      if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
10254        this.end();
10255      } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
10256        if (this.currentImageIndex !== 0) {
10257          this.changeImage(this.currentImageIndex - 1);
10258        } else if (this.options.wrapAround && this.album.length > 1) {
10259          this.changeImage(this.album.length - 1);
10260        }
10261      } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
10262        if (this.currentImageIndex !== this.album.length - 1) {
10263          this.changeImage(this.currentImageIndex + 1);
10264        } else if (this.options.wrapAround && this.album.length > 1) {
10265          this.changeImage(0);
10266        }
10267      }
10268    };
10269    Lightbox.prototype.end = function() {
10270      this.disableKeyboardNav();
10271      $(window).off("resize", this.sizeOverlay);
10272      this.$lightbox.fadeOut(this.options.fadeDuration);
10273      this.$overlay.fadeOut(this.options.fadeDuration);
10274      $('select, object, embed').css({
10275        visibility: "visible"
10276      });
10277    };
10278    return Lightbox;
10279  })();
10280  $(function() {
10281    var options  = new LightboxOptions();
10282    var lightbox = new Lightbox(options);
10283  });
10284}).call(this);
10285</script>
10285<script>!function(a){var b="selectric",c=function(a){var b,c="40-46 50-53 54-57 62-70 71-74 61 47 77".replace(/\d+/g,"\\3$&").split(" ");for(b in c){if(!c.hasOwnProperty(b))return;a=a.toLowerCase().replace(RegExp("["+c[b]+"]","g"),"aeiouncy".charAt(b))}return a},d=function(a){var b=arguments;return(""+a).replace(/{(\d+|(\w+))}/g,function(a,c,d){return d&&b[1]?b[1][d]:b[c]})},e=function(e,f){function g(){function e(a){/^(9|13|27)$/.test(a.keyCode||a.which)&&(a.stopPropagation(),l(x,!0))}var g=D.children(),h="<ul>",j=g.filter(":"+R).index();y=x=~j?j:0,(C=g.length)&&(g.each(function(b){var e=a(this),g=e.html(),i=e.prop("disabled"),j=f.optionsItemBuilder;I[b]={value:e.val(),text:g,slug:c(g),disabled:i},h+=d('<li class="{1}">{2}</li>',a.trim([b==y?R:"",b==C-1?"last":"",i?"disabled":""].join(" ")),a.isFunction(j)?j(I[b],e,b):d(j,I[b]))}),G.html(h+"</ul>"),J.html(I[y].text)),F.add(D).off(K),H.data(b,!0).prop("class",[s[6],D.prop("class"),P,f.responsive?s[8]:""].join(" ")),D.prop("disabled")?E.prop("disabled",!0):(H.removeClass(P).hover(function(){a(this).toggleClass(s[7])}),f.openOnHover&&F.on("mouseenter"+K,i),F.on(N,function(a){u?k():i(a)}),E.prop("disabled",!1).off().on({keypress:e,keydown:function(a){e(a),clearTimeout(w),w=setTimeout(function(){E.val("")},f.keySearchTimeout);var b=a.keyCode||a.which;b>36&&41>b&&l(39>b?o():n())},focusin:function(a){E.one("blur",function(){E.blur()}),u||i(a)}}).on(S,function(){E.val().length&&a.each(I,function(a,b){return RegExp("^"+E.val(),"i").test(b.slug)&&!b.disabled?(l(a),!1):void 0})}),v=a("li",G.removeAttr("style")).click(function(){return l(a(this).index(),!0),!1}))}function h(){var a=G.closest(":visible").children(":hidden"),b=f.maxHeight;a.addClass(Q);var c=G.outerWidth(),d=F.outerWidth()-(c-G.width());!f.expandToItemText||d>c?B=d:(G.css("overflow","scroll"),H.width(9e4),B=G.width(),G.css("overflow",""),H.width("")),G.width(B).height()>b&&G.height(b),a.removeClass(Q)}function i(b){b.preventDefault(),b.stopPropagation(),h(),a("."+O).removeClass(O),u=!0,z=G.outerHeight(),E.val("").is(":focus")||E.focus(),L.on(N,k).on("scroll"+K,j),j(),f.openOnHover&&(clearTimeout(A),H.one("mouseleave"+K,function(){A=setTimeout(k,500)})),H.addClass(O),m(x),f.onOpen(e)}function j(){h(),G.css("top",H.offset().top+H.outerHeight()+z>M.scrollTop()+M.height()?-z:"")}function k(a){if(!a&&y!=x){var b=I[x].text;D.prop("selectedIndex",y=x).data("value",b).trigger("change",[b,y]),f.onChange(e),J.html(b)}L.off(K),H.removeClass(O),u=!1,f.onClose(e)}function l(a,b){I[x=a].disabled||(v.removeClass(R).eq(a).addClass(R),m(a),b&&k())}function m(a){var b=v.eq(a).outerHeight(),c=v[a].offsetTop,d=G.scrollTop(),e=c+2*b;G.scrollTop(e>d+z?e-z:d>c-b?c-b:d)}function n(a){if(I[a=(x+1)%C].disabled)for(;I[a=(a+1)%C].disabled;);return a}function o(a){if(I[a=(x>0?x:C)-1].disabled)for(;I[a=(a>0?a:C)-1].disabled;);return a}f=a.extend(!0,{onOpen:a.noop,onClose:a.noop,onChange:a.noop,maxHeight:300,keySearchTimeout:500,arrowButtonMarkup:'<b class="button">&#x25be;</b>',disableOnMobile:!0,openOnHover:!1,expandToItemText:!1,responsive:!1,customClass:{prefix:"selectric",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive",camelCase:!0},optionsItemBuilder:"{text}"},f);var p,q=f.customClass,r=q.postfixes.split(" "),s=[];if(!f.disableOnMobile||!/andrroid|ipp(hone|od|ad)/i.test(navigator.userAgent)){for(;p=r.shift();){var t=q.prefix+p;s.push(q.camelCase?t:t.replace(/([A-Z])/g,"-$&").toLowerCase())}var u,v,w,x,y,z,A,B,C,D=a(e),E=a('<input type="text" class="'+s[0]+'"/>'),F=a('<div class="'+q.prefix+'"><p class="label"/>'+f.arrowButtonMarkup+"</div>"),G=a('<div class="'+s[1]+'" tabindex="-1"></div>'),H=D.data(b,!0).wrap("<div>").parent().append(F.add(G).add(E)),I=[],J=a(".label",F),K=".sl",L=a(document),M=a(window),N="click"+K,O=s[2],P=s[3],Q=s[4],R="selected",S="oninput"in E[0]?"input":"keyup";D.wrap('<div class="'+s[5]+'">'),g(),D.on({refresh:g,destroy:function(){G.add(F).add(E).remove(),D.removeData(b).removeData("value").off(K+" refresh destroy open close").unwrap().unwrap()},open:i,close:k})}};a.fn[b]=function(c,d){return this.each(function(){a(this).data(b)?""+c===c&&a(this).trigger(c):e(this,c||d)})}}(jQuery);</script>
10285<script>!function(t){t.fn.unveil=function(i,e){function n(){var i=l.filter(function(){var i=t(this);if(!i.is(":hidden")){var e=o.scrollTop(),n=e+o.height(),r=i.offset().top;return r+i.height()>=e-u&&r<=n+u}});r=i.trigger("unveil"),l=l.not(r)}var r,o=t(window),u=i||0,s=window.devicePixelRatio>1?"data-src-retina":"data-src",l=this;return this.one("unveil",function(){var t=this.getAttribute(s);(t=t||this.getAttribute("data-src"))&&(this.setAttribute("src",t),"function"==typeof e&&e.call(this))}),o.on("scroll.unveil resize.unveil lookup.unveil",n),n(),this}}(window.jQuery||window.Zepto);</script>
vendor: 4,009 bytes, line 10285
10285<script>(function(a,b,c){function g(a,c){var d=b.createElement(a||"div"),e;for(e in c)d[e]=c[e];return d}function h(a){for(var b=1,c=arguments.length;b<c;b++)a.appendChild(arguments[b]);return a}function j(a,b,c,d){var g=["opacity",b,~~(a*100),c,d].join("-"),h=.01+c/d*100,j=Math.max(1-(1-a)/b*(100-h),a),k=f.substring(0,f.indexOf("Animation")).toLowerCase(),l=k&&"-"+k+"-"||"";return e[g]||(i.insertRule("@"+l+"keyframes "+g+"{"+"0%{opacity:"+j+"}"+h+"%{opacity:"+a+"}"+(h+.01)+"%{opacity:1}"+(h+b)%100+"%{opacity:"+a+"}"+"100%{opacity:"+j+"}"+"}",0),e[g]=1),g}function k(a,b){var e=a.style,f,g;if(e[b]!==c)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(g=0;g<d.length;g++){f=d[g]+b;if(e[f]!==c)return f}}function l(a,b){for(var c in b)a.style[k(a,c)||c]=b[c];return a}function m(a){for(var b=1;b<arguments.length;b++){var d=arguments[b];for(var e in d)a[e]===c&&(a[e]=d[e])}return a}function n(a){var b={x:a.offsetLeft,y:a.offsetTop};while(a=a.offsetParent)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}var d=["webkit","Moz","ms","O"],e={},f,i=function(){var a=g("style");return h(b.getElementsByTagName("head")[0],a),a.sheet||a.styleSheet}(),o={lines:12,length:7,width:5,radius:10,rotate:0,color:"#000",speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto"},p=function q(a){if(!this.spin)return new q(a);this.opts=m(a||{},q.defaults,o)};p.defaults={},m(p.prototype,{spin:function(a){this.stop();var b=this,c=b.opts,d=b.el=l(g(0,{className:c.className}),{position:"relative",zIndex:c.zIndex}),e=c.radius+c.length+c.width,h,i;a&&(a.insertBefore(d,a.firstChild||null),i=n(a),h=n(d),l(d,{left:(c.left=="auto"?i.x-h.x+(a.offsetWidth>>1):c.left+e)+"px",top:(c.top=="auto"?i.y-h.y+(a.offsetHeight>>1):c.top+e)+"px"})),d.setAttribute("aria-role","progressbar"),b.lines(d,b.opts);if(!f){var j=0,k=c.fps,m=k/c.speed,o=(1-c.opacity)/(m*c.trail/100),p=m/c.lines;!function q(){j++;for(var a=c.lines;a;a--){var e=Math.max(1-(j+a*p)%m*o,c.opacity);b.opacity(d,c.lines-a,e,c)}b.timeout=b.el&&setTimeout(q,~~(1e3/k))}()}return b},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=c),this},lines:function(a,b){function e(a,d){return l(g(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:d,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*c+b.rotate)+"deg) translate("+b.radius+"px"+",0)",borderRadius:(b.width>>1)+"px"})}var c=0,d;for(;c<b.lines;c++)d=l(g(),{position:"absolute",top:1+~(b.width/2)+"px",transform:b.hwaccel?"translate3d(0,0,0)":"",opacity:b.opacity,animation:f&&j(b.opacity,b.trail,c,b.lines)+" "+1/b.speed+"s linear infinite"}),b.shadow&&h(d,l(e("#000","0 0 4px #000"),{top:"2px"})),h(a,h(d,e(b.color,"0 0 1px rgba(0,0,0,.1)")));return a},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),!function(){function a(a,b){return g("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',b)}var b=l(g("group"),{behavior:"url(#default#VML)"});!k(b,"transform")&&b.adj?(i.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(b,c){function f(){return l(a("group",{coordsize:e+" "+e,coordorigin:-d+" "+ -d}),{width:e,height:e})}function k(b,e,g){h(i,h(l(f(),{rotation:360/c.lines*b+"deg",left:~~e}),h(l(a("roundrect",{arcsize:1}),{width:d,height:c.width,left:c.radius,top:-c.width>>1,filter:g}),a("fill",{color:c.color,opacity:c.opacity}),a("stroke",{opacity:0}))))}var d=c.length+c.width,e=2*d,g=-(c.width+c.length)*2+"px",i=l(f(),{position:"absolute",top:g,left:g}),j;if(c.shadow)for(j=1;j<=c.lines;j++)k(j,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(j=1;j<=c.lines;j++)k(j);return h(b,i)},p.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}):f=k(b,"animation")}(),a.Spinner=p})(window,document);</script>
vendor: 34,297 bytes, lines 10285-10303
10285<script>
10286(function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var p="left",o="right",e="up",x="down",c="in",z="out",m="none",s="auto",l="swipe",t="pinch",A="tap",j="doubletap",b="longtap",y="hold",D="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,B="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"};f.fn.swipe=function(G){var F=f(this),E=F.data(B);if(E&&typeof G==="string"){if(E[G]){return E[G].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+G+" does not exist on jQuery.swipe")}}else{if(!E&&(typeof G==="object"||!G)){return w.apply(this,arguments)}}return F};f.fn.swipe.defaults=n;f.fn.swipe.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipe.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:z};f.fn.swipe.pageScroll={NONE:m,HORIZONTAL:D,VERTICAL:u,AUTO:s};f.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(E){if(E&&(E.allowPageScroll===undefined&&(E.swipe!==undefined||E.swipeStatus!==undefined))){E.allowPageScroll=m}if(E.click!==undefined&&E.tap===undefined){E.tap=E.click}if(!E){E={}}E=f.extend({},f.fn.swipe.defaults,E);return this.each(function(){var G=f(this);var F=G.data(B);if(!F){F=new C(this,E);G.data(B,F)}})}function C(a4,av){var az=(a||d||!av.fallbackToMouseEvents),J=az?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",ay=az?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",U=az?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",S=az?null:"mouseleave",aD=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ag=0,aP=null,ab=0,a1=0,aZ=0,G=1,aq=0,aJ=0,M=null;var aR=f(a4);var Z="start";var W=0;var aQ=null;var T=0,a2=0,a5=0,ad=0,N=0;var aW=null,af=null;try{aR.bind(J,aN);aR.bind(aD,a9)}catch(ak){f.error("events not supported "+J+","+aD+" on jQuery.swipe")}this.enable=function(){aR.bind(J,aN);aR.bind(aD,a9);return aR};this.disable=function(){aK();return aR};this.destroy=function(){aK();aR.data(B,null);return aR};this.option=function(bc,bb){if(av[bc]!==undefined){if(bb===undefined){return av[bc]}else{av[bc]=bb}}else{f.error("Option "+bc+" does not exist on jQuery.swipe.options")}return null};function aN(bd){if(aB()){return}if(f(bd.target).closest(av.excludedElements,aR).length>0){return}var be=bd.originalEvent?bd.originalEvent:bd;var bc,bb=a?be.touches[0]:be;Z=g;if(a){W=be.touches.length}else{bd.preventDefault()}ag=0;aP=null;aJ=null;ab=0;a1=0;aZ=0;G=1;aq=0;aQ=aj();M=aa();R();if(!a||(W===av.fingers||av.fingers===i)||aX()){ai(0,bb);T=at();if(W==2){ai(1,be.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}if(av.swipeStatus||av.pinchStatus){bc=O(be,Z)}}else{bc=false}if(bc===false){Z=q;O(be,Z);return bc}else{if(av.hold){af=setTimeout(f.proxy(function(){aR.trigger("hold",[be.target]);if(av.hold){bc=av.hold.call(aR,be,be.target)}},this),av.longTapThreshold)}ao(true)}return null}function a3(be){var bh=be.originalEvent?be.originalEvent:be;if(Z===h||Z===q||am()){return}var bd,bc=a?bh.touches[0]:bh;var bf=aH(bc);a2=at();if(a){W=bh.touches.length}if(av.hold){clearTimeout(af)}Z=k;if(W==2){if(a1==0){ai(1,bh.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}else{aH(bh.touches[1]);aZ=au(aQ[0].end,aQ[1].end);aJ=ar(aQ[0].end,aQ[1].end)}G=a7(a1,aZ);aq=Math.abs(a1-aZ)}if((W===av.fingers||av.fingers===i)||!a||aX()){aP=aL(bf.start,bf.end);al(be,aP);ag=aS(bf.start,bf.end);ab=aM();aI(aP,ag);if(av.swipeStatus||av.pinchStatus){bd=O(bh,Z)}if(!av.triggerOnTouchEnd||av.triggerOnTouchLeave){var bb=true;if(av.triggerOnTouchLeave){var bg=aY(this);bb=E(bf.end,bg)}if(!av.triggerOnTouchEnd&&bb){Z=aC(k)}else{if(av.triggerOnTouchLeave&&!bb){Z=aC(h)}}if(Z==q||Z==h){O(bh,Z)}}}else{Z=q;O(bh,Z)}if(bd===false){Z=q;O(bh,Z)}}function L(bb){var bc=bb.originalEvent;if(a){if(bc.touches.length>0){F();return true}}if(am()){W=ad}a2=at();ab=aM();if(ba()||!an()){Z=q;O(bc,Z)}else{if(av.triggerOnTouchEnd||(av.triggerOnTouchEnd==false&&Z===k)){bb.preventDefault();Z=h;O(bc,Z)}else{if(!av.triggerOnTouchEnd&&a6()){Z=h;aF(bc,Z,A)}else{if(Z===k){Z=q;O(bc,Z)}}}}ao(false);return null}function a9(){W=0;a2=0;T=0;a1=0;aZ=0;G=1;R();ao(false)}function K(bb){var bc=bb.originalEvent;if(av.triggerOnTouchLeave){Z=aC(h);O(bc,Z)}}function aK(){aR.unbind(J,aN);aR.unbind(aD,a9);aR.unbind(ay,a3);aR.unbind(U,L);if(S){aR.unbind(S,K)}ao(false)}function aC(bf){var be=bf;var bd=aA();var bc=an();var bb=ba();if(!bd||bb){be=q}else{if(bc&&bf==k&&(!av.triggerOnTouchEnd||av.triggerOnTouchLeave)){be=h}else{if(!bc&&bf==h&&av.triggerOnTouchLeave){be=q}}}return be}function O(bd,bb){var bc=undefined;if(I()||V()){bc=aF(bd,bb,l)}else{if((P()||aX())&&bc!==false){bc=aF(bd,bb,t)}}if(aG()&&bc!==false){bc=aF(bd,bb,j)}else{if(ap()&&bc!==false){bc=aF(bd,bb,b)}else{if(ah()&&bc!==false){bc=aF(bd,bb,A)}}}if(bb===q){a9(bd)}if(bb===h){if(a){if(bd.touches.length==0){a9(bd)}}else{a9(bd)}}return bc}function aF(be,bb,bd){var bc=undefined;if(bd==l){aR.trigger("swipeStatus",[bb,aP||null,ag||0,ab||0,W,aQ]);if(av.swipeStatus){bc=av.swipeStatus.call(aR,be,bb,aP||null,ag||0,ab||0,W,aQ);if(bc===false){return false}}if(bb==h&&aV()){aR.trigger("swipe",[aP,ag,ab,W,aQ]);if(av.swipe){bc=av.swipe.call(aR,be,aP,ag,ab,W,aQ);if(bc===false){return false}}switch(aP){case p:aR.trigger("swipeLeft",[aP,ag,ab,W,aQ]);if(av.swipeLeft){bc=av.swipeLeft.call(aR,be,aP,ag,ab,W,aQ)}break;case o:aR.trigger("swipeRight",[aP,ag,ab,W,aQ]);if(av.swipeRight){bc=av.swipeRight.call(aR,be,aP,ag,ab,W,aQ)}break;case e:aR.trigger("swipeUp",[aP,ag,ab,W,aQ]);if(av.swipeUp){bc=av.swipeUp.call(aR,be,aP,ag,ab,W,aQ)}break;case x:aR.trigger("swipeDown",[aP,ag,ab,W,aQ]);if(av.swipeDown){bc=av.swipeDown.call(aR,be,aP,ag,ab,W,aQ)}break}}}if(bd==t){aR.trigger("pinchStatus",[bb,aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchStatus){bc=av.pinchStatus.call(aR,be,bb,aJ||null,aq||0,ab||0,W,G,aQ);if(bc===false){return false}}if(bb==h&&a8()){switch(aJ){case c:aR.trigger("pinchIn",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchIn){bc=av.pinchIn.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break;case z:aR.trigger("pinchOut",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchOut){bc=av.pinchOut.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break}}}if(bd==A){if(bb===q||bb===h){clearTimeout(aW);clearTimeout(af);if(Y()&&!H()){N=at();aW=setTimeout(f.proxy(function(){N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}},this),av.doubleTapThreshold)}else{N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}}}}else{if(bd==j){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("doubletap",[be.target]);if(av.doubleTap){bc=av.doubleTap.call(aR,be,be.target)}}}else{if(bd==b){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("longtap",[be.target]);if(av.longTap){bc=av.longTap.call(aR,be,be.target)}}}}}return bc}function an(){var bb=true;if(av.threshold!==null){bb=ag>=av.threshold}return bb}function ba(){var bb=false;if(av.cancelThreshold!==null&&aP!==null){bb=(aT(aP)-ag)>=av.cancelThreshold}return bb}function ae(){if(av.pinchThreshold!==null){return aq>=av.pinchThreshold}return true}function aA(){var bb;if(av.maxTimeThreshold){if(ab>=av.maxTimeThreshold){bb=false}else{bb=true}}else{bb=true}return bb}function al(bb,bc){if(av.allowPageScroll===m||aX()){bb.preventDefault()}else{var bd=av.allowPageScroll===s;switch(bc){case p:if((av.swipeLeft&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case o:if((av.swipeRight&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case e:if((av.swipeUp&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break;case x:if((av.swipeDown&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break}}}function a8(){var bc=aO();var bb=X();var bd=ae();return bc&&bb&&bd}function aX(){return !!(av.pinchStatus||av.pinchIn||av.pinchOut)}function P(){return !!(a8()&&aX())}function aV(){var be=aA();var bg=an();var bd=aO();var bb=X();var bc=ba();var bf=!bc&&bb&&bd&&bg&&be;return bf}function V(){return !!(av.swipe||av.swipeStatus||av.swipeLeft||av.swipeRight||av.swipeUp||av.swipeDown)}function I(){return !!(aV()&&V())}function aO(){return((W===av.fingers||av.fingers===i)||!a)}function X(){return aQ[0].end.x!==0}function a6(){return !!(av.tap)}function Y(){return !!(av.doubleTap)}function aU(){return !!(av.longTap)}function Q(){if(N==null){return false}var bb=at();return(Y()&&((bb-N)<=av.doubleTapThreshold))}function H(){return Q()}function ax(){return((W===1||!a)&&(isNaN(ag)||ag<av.threshold))}function a0(){return((ab>av.longTapThreshold)&&(ag<r))}function ah(){return !!(ax()&&a6())}function aG(){return !!(Q()&&Y())}function ap(){return !!(a0()&&aU())}function F(){a5=at();ad=event.touches.length+1}function R(){a5=0;ad=0}function am(){var bb=false;if(a5){var bc=at()-a5;if(bc<=av.fingerReleaseThreshold){bb=true}}return bb}function aB(){return !!(aR.data(B+"_intouch")===true)}function ao(bb){if(bb===true){aR.bind(ay,a3);aR.bind(U,L);if(S){aR.bind(S,K)}}else{aR.unbind(ay,a3,false);aR.unbind(U,L,false);if(S){aR.unbind(S,K,false)}}aR.data(B+"_intouch",bb===true)}function ai(bc,bb){var bd=bb.identifier!==undefined?bb.identifier:0;aQ[bc].identifier=bd;aQ[bc].start.x=aQ[bc].end.x=bb.pageX||bb.clientX;aQ[bc].start.y=aQ[bc].end.y=bb.pageY||bb.clientY;return aQ[bc]}function aH(bb){var bd=bb.identifier!==undefined?bb.identifier:0;var bc=ac(bd);bc.end.x=bb.pageX||bb.clientX;bc.end.y=bb.pageY||bb.clientY;return bc}function ac(bc){for(var bb=0;bb<aQ.length;bb++){if(aQ[bb].identifier==bc){return aQ[bb]}}}function aj(){var bb=[];for(var bc=0;bc<=5;bc++){bb.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0})}return bb}function aI(bb,bc){bc=Math.max(bc,aT(bb));M[bb].distance=bc}function aT(bb){if(M[bb]){return M[bb].distance}return undefined}function aa(){var bb={};bb[p]=aw(p);bb[o]=aw(o);bb[e]=aw(e);bb[x]=aw(x);return bb}function aw(bb){return{direction:bb,distance:0}}function aM(){return a2-T}function au(be,bd){var bc=Math.abs(be.x-bd.x);var bb=Math.abs(be.y-bd.y);return Math.round(Math.sqrt(bc*bc+bb*bb))}function a7(bb,bc){var bd=(bc/bb)*1;return bd.toFixed(2)}function ar(){if(G<1){return z}else{return c}}function aS(bc,bb){return Math.round(Math.sqrt(Math.pow(bb.x-bc.x,2)+Math.pow(bb.y-bc.y,2)))}function aE(be,bc){var bb=be.x-bc.x;var bg=bc.y-be.y;var bd=Math.atan2(bg,bb);var bf=Math.round(bd*180/Math.PI);if(bf<0){bf=360-Math.abs(bf)}return bf}function aL(bc,bb){var bd=aE(bc,bb);if((bd<=45)&&(bd>=0)){return p}else{if((bd<=360)&&(bd>=315)){return p}else{if((bd>=135)&&(bd<=225)){return o}else{if((bd>45)&&(bd<135)){return x}else{return e}}}}}function at(){var bb=new Date();return bb.getTime()}function aY(bb){bb=f(bb);var bd=bb.offset();var bc={left:bd.left,right:bd.left+bb.outerWidth(),top:bd.top,bottom:bd.top+bb.outerHeight()};return bc}function E(bb,bc){return(bb.x>bc.left&&bb.x<bc.right&&bb.y>bc.top&&bb.y<bc.bottom)}}}));
10287if(typeof(console) === 'undefined') {
10288    var console = {}
10289    console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = console.groupCollapsed = function() {};
10290}
10291if (window.tplogs==true)
10292	try {
10293		console.groupCollapsed("ThemePunch GreenSocks Logs");
10294	} catch(e) { }
10295var oldgs = window.GreenSockGlobals;
10296	oldgs_queue = window._gsQueue;
10297var punchgs = window.GreenSockGlobals = {};
10298if (window.tplogs==true)
10299	try {
10300		console.info("Build GreenSock SandBox for ThemePunch Plugins");
10301		console.info("GreenSock TweenLite Engine Initalised by ThemePunch Plugin");
10302	} catch(e) {}
10303(function(t,e){"use strict";var i=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!i.TweenLite){var s,r,n,a,o,l=function(t){var e,s=t.split("."),r=i;for(e=0;s.length>e;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},m=function(){},f=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)}}(),c={},p=function(s,r,n,a){this.sc=c[s]?c[s].sc:[],c[s]=this,this.gsClass=null,this.func=n;var o=[];this.check=function(h){for(var _,u,m,f,d=r.length,v=d;--d>-1;)(_=c[r[d]]||new p(r[d],[])).gsClass?(o[d]=_.gsClass,v--):h&&_.sc.push(this);if(0===v&&n)for(u=("com.greensock."+s).split("."),m=u.pop(),f=l(u.join("."))[m]=this.gsClass=n.apply(n,o),a&&(i[m]=f,"function"==typeof define&&define.amd?define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+s.split(".").pop(),[],function(){return f}):s===e&&"undefined"!=typeof module&&module.exports&&(module.exports=f)),d=0;this.sc.length>d;d++)this.sc[d].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(),f=e!==!1&&k,c=500,p=33,d=function(t){var e,a,o=S()-x;o>c&&(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(d)),a&&h.dispatchEvent("tick")};b.call(h),h.time=h.frame=0,h.tick=function(){d(!0)},h.lagSmoothing=function(t,e){c=t||1/_,p=Math.min(e,c,0)},h.sleep=function(){null!=r&&(f&&A?A(r):clearTimeout(r),s=m,r=null,h===a&&(o=!1))},h.wake=function(){null!==r?h.sleep():h.frame>10&&(x=S()-c+5),s=0===i?m:f&&k?k:function(t){return setTimeout(t,0|1e3*(l-h.time)+1)},h===a&&(o=!0),d(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(),f=t,h.fps(i),void 0):f},h.fps(t),setTimeout(function(){f&&(!r||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,B){o||a.wake();var i=this.vars.useFrames?q:B;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.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"]=f(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._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},n.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},n.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._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)&&(this.render(t,e,!1),z.length&&M())}return this},n.progress=n.totalProgress=function(t,e){return arguments.length?this.totalTime(this.duration()*t,e):this._time/this.duration()},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;if(t!=this._paused&&this._timeline){o||t||a.wake();var e=this._timeline,i=e.rawTime(),s=i-this._pauseTime;!t&&e.smoothChildTiming&&(this._startTime+=s,this._uncache(!1)),this._pauseTime=t?i:null,this._paused=t,this._active=this.isActive(),!t&&0!==s&&this._initted&&this.duration()&&this.render(e.smoothChildTiming?this._totalTime:(i-this._startTime)/this._timeScale,!0,!0)}return 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?Q[I.defaultOverwrite]:"number"==typeof l?l>>0:Q[l],(o||e instanceof Array||e.push&&f(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]=$(n,this,!1),1===l&&this._siblings[r].length>1&&H(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=$(e,this,!1),1===l&&this._siblings.length>1&&H(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)G[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!U[i]||U[i]&&U[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.14.2",I.defaultEase=n._ease=new y(null,null,1,1),I.defaultOverwrite="auto",I.ticker=a,I.autoSleep=!0,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=[],L={},N=I._internals={isArray:f,isSelector:E,lazyTweens:z},U=I._plugins={},F=N.tweenLookup={},j=0,G=N.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},Q={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},q=R._rootFramesTimeline=new D,B=R._rootTimeline=new D,M=N.lazyRender=function(){var t,e=z.length;for(L={};--e>-1;)t=z[e],t&&t._lazy!==!1&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);z.length=0};B._startTime=a.time,q._startTime=a.frame,B._active=q._active=!0,setTimeout(M,1),R._updateRoot=I.render=function(){var t,e,i;if(z.length&&M(),B.render((a.time-B._startTime)*B._timeScale,!1,!1),q.render((a.frame-q._startTime)*q._timeScale,!1,!1),z.length&&M(),!(a.frame%120)){for(i in F){for(e=F[i].tweens,t=e.length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete F[i]}if(i=B._first,(!i||i._paused)&&I.autoSleep&&!q._first&&1===a._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||a.sleep()}}},a.addEventListener("tick",R._updateRoot);var $=function(t,e,i){var s,r,n=t._gsTweenID;if(F[n||(t._gsTweenID=n="t"+j++)]||(F[n]={target:t,tweens:[]}),e&&(s=F[n].tweens,s[r=s.length]=e,i))for(;--r>-1;)s[r]===e&&s.splice(r,1);return F[n].tweens},K=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},H=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||K(o,e)&&o._enabled(!1,!1)&&(a=!0);else if(5===s)break;return a}var h,u=e._startTime+_,m=[],f=0,c=0===e._duration;for(n=r.length;--n>-1;)(o=r[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||J(e,0,c),0===J(o,h,c)&&(m[f++]=o)):u>=o._startTime&&o._startTime+o.totalDuration()/o._timeScale>u&&((c||!o._initted)&&2e-10>=u-o._startTime||(m[f++]=o)));for(n=f;--n>-1;)if(o=m[n],2===s&&o._kill(i,t,e)&&(a=!0),2!==s||!o._firstPT&&o._initted){if(2!==s&&!K(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},J=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)G[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;L[e._gsTweenID]&&M(),this.vars.css||e.style&&e!==t&&e.nodeType&&U.css&&this.vars.autoCSS!==!1&&O(this.vars,e);for(n in this.vars){if(_=this.vars[n],G[n])_&&(_ instanceof Array||_.push&&f(_))&&-1!==_.join("").indexOf("{self}")&&(this.vars[n]=_=this._swapSelfInParams(_,this));else if(U[n]&&(l=new U[n])._onInitTween(e,this.vars[n],this)){for(this._firstPT=h={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:!0,n:n,pg:!0,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)}else this._firstPT=i[n]=h={_next:this._firstPT,t:e,p:n,f:"function"==typeof e[n],n:n,pg:!1,pr:0},h.s=h.f?e[n.indexOf("set")||"function"!=typeof e["get"+n.substr(3)]?n:"get"+n.substr(3)]():parseFloat(e[n]),h.c="string"==typeof _&&"="===_.charAt(1)?parseInt(_.charAt(0)+"1",10)*Number(_.substr(2)):Number(_)-h.s||0;h&&h._next&&(h._next._prev=h)}return r&&this._kill(r,e)?this._initProps(e,i,s,r):this._overwrite>1&&this._firstPT&&s.length>1&&H(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)&&(L[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"),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0===t||0>h||h===_)&&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&&h!==_)&&(r="onReverseComplete",s=this._reversed),0>t&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(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,m=this._easeType,f=this._easePower;(1===m||3===m&&u>=.5)&&(u=1-u),3===m&&(u*=2),1===f?u*=u:2===f?u*=u*u:3===f?u*=u*u*u:4===f&&(u*=u*u*u*u),this.ratio=1===m?1-u:2===m?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.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||T))),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._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||T)),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.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||T),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;if((f(e)||E(e))&&"number"!=typeof e[0])for(s=e.length;--s>-1;)this._kill(t,e[s])&&(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(!K(this,i,e,u))return!1}for(n in h)(a=o[n])&&(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]=$(s[i],this,!0);else this._siblings=$(this.target,this,!0)}return R.prototype._enabled.call(this,t,e),this._notifyPluginsOfEnabled&&this._firstPT?I._onPluginEvent(t?"_onEnable":"_onDisable",this):!1}
vendor: 4,225 bytes, lines 10303-10304
10303,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,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!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((f(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=$(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 V=v("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=V.prototype},!0);if(n=V.prototype,V.version="1.10.1",V.API=2,n._firstPT=null,n._addTween=function(t,e,i,s,r,n){var a,o;return null!=s&&(a="number"==typeof s||"="!==s.charAt(1)?Number(s)-i:parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)))?(this._firstPT=o={_next:this._firstPT,t:t,p:e,s:i,c:a,f:"function"==typeof t[e],n:r||e,r:n},o._next&&(o._next._prev=o),o):void 0},n.setRatio=function(t){for(var e,i=this._firstPT,s=1e-6;i;)e=i.c*t+i.s,i.r?e=Math.round(e):s>e&&e>-s&&(e=0),i.f?i.t[i.p](e):i.t[i.p]=e,i=i._next},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},V.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===V.API&&(U[(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(){V.call(this,i,s),this._overwriteProps=r||[]},t.global===!0),o=a.prototype=new V(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,V.activate([a]),a},s=t._gsQueue){for(r=0;s.length>r;r++)s[r]();for(n in c)c[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");
10304var _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],o(i)&&-1!==i.join("").indexOf("{self}")&&(r[s]=this._swapSelfInParams(i));o(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=1e-10,n=i._internals,a=n.isSelector,o=n.isArray,h=n.lazyTweens,l=n.lazyRender,_=[],u=_gsScope._gsDefine.globals,c=function(t){var e,i={};for(e in t)i[e]=t[e];return i}
10304,p=function(t,e,i,s){var r=t._timeline._totalTime;(e||!this._forcingPlayhead)&&(t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||_),this._forcingPlayhead&&t._timeline.seek(r))},f=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},m=s.prototype=new e;return s.version="1.14.2",m.constructor=s,m.kill()._gc=m._forcingPlayhead=!1,m.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)},m.from=function(t,e,s,r){return this.add((s.repeat&&u.TweenMax||i).from(t,e,s),r)},m.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)},m.staggerTo=function(t,e,r,n,o,h,l,_){var u,p=new s({onComplete:h,onCompleteParams:l,onCompleteScope:_,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],a(t)&&(t=f(t)),n=n||0,0>n&&(t=f(t),t.reverse(),n*=-1),u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),p.to(t[u],e,c(r),u*n);return this.add(p,o)},m.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)},m.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},m.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},m.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},m.add=function(r,n,a,h){var l,_,u,c,p,f;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&o(r)){for(a=a||"normal",h=h||0,l=n,_=r.length,u=0;_>u;u++)o(c=r[u])&&(c=new s({tweens:c})),this.add(c,l),"string"!=typeof c&&"function"!=typeof c&&("sequence"===a?l=c._startTime+c.totalDuration()/c._timeScale:"start"===a&&(c._startTime-=c.delay())),l+=h;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._duration<this.duration())for(p=this,f=p.rawTime()>r._startTime;p._timeline;)f&&p._timeline.smoothChildTiming?p.totalTime(p._totalTime,!0):p._gc&&p._enabled(!0,!1),p=p._timeline;return this},m.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&o(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},m._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},m.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},m.insert=m.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},m.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},m.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},m.addPause=function(t,e,i,s){return this.call(p,["{self}",e,i,s],this,t)},m.removeLabel=function(t){return delete this._labels[t],this},m.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},m._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&&o(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},m.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},m.stop=function(){return this.paused(!0)},m.gotoAndPlay=function(t,e){return this.play(t,e)},m.gotoAndStop=function(t,e){return this.pause(t,e)}
10304,m.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,u,c=this._dirty?this.totalDuration():this._totalDuration,p=this._time,f=this._startTime,m=this._timeScale,d=this._paused;if(t>=c?(this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(u=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=c+1e-4):1e-7>t?(this._totalTime=this._time=0,(0!==p||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._rawPrevTime>=0&&this._first&&(u=!0),this._rawPrevTime=t):(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=0,this._initted||(u=!0))):this._totalTime=this._time=this._rawPrevTime=t,this._time!==p&&this._first||i||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==p&&t>0&&(this._active=!0),0===p&&this.vars.onStart&&0!==this._time&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||_)),this._time>=p)for(s=this._first;s&&(a=s._next,!this._paused||d);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(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);)(s._active||p>=s._startTime&&!s._paused&&!s._gc)&&(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&&l(),this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||_))),o&&(this._gc||(f===this._startTime||m!==this._timeScale)&&(0===this._time||c>=this.totalDuration())&&(n&&(h.length&&l(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this.vars[o].apply(this.vars[o+"Scope"]||this,this.vars[o+"Params"]||_)))}},m._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},m.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},m.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},m.recent=function(){return this._recent},m._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},m.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)},m._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},m.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)}
vendor: 7,311 bytes, lines 10304-10306
10304,m.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},m._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)},m.totalTime=function(){this._forcingPlayhead=!0;var e=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},m.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},m.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},m.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},m.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");
10305var _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)},p=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},f=u("Back",p("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),p("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),p("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),p=u,f=e.randomize!==!1,m=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--p>-1;)i=f?Math.random():1/u*p,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),f?s+=Math.random()*r-.5*r:p%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),p=u;--p>-1;)a=l[p],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,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!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)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/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)*a/this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/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,"),f},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
10306var _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={},l=a.prototype=new t("css");l.constructor=a,a.version="1.14.2",a.API=2,a.defaultTransformPerspective=0,a.defaultSkewType="compensated",l="px",a.suffixMap={top:l,right:l,bottom:l,left:l,width:l,height:l,fontSize:l,padding:l,margin:l,perspective:l,lineHeight:""};var h,u,f,p,_,c,d=/(?:\d|\-\d|\.\d|\-\.\d)+/g,m=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,g=/(?
10306:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|e[+-]\d+)[^0-9]/g,y=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,T=/opacity:([^;]*)/i,w=/alpha\(opacity *=.+?\)/i,b=/^(rgb|hsl)/,P=/([A-Z])/g,S=/-([a-z])/gi,R=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,C=function(t,e){return e.toUpperCase()},k=/(?:Left|Right|Width)/i,O=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,A=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,D=/,(?=[^\)]*(?:\(|$))/gi,M=Math.PI/180,L=180/Math.PI,N={},z=document,X=z.createElement("div"),I=z.createElement("img"),E=a._internals={_specialProps:o},F=navigator.userAgent,Y=function(){var t,e=F.indexOf("Android"),i=z.createElement("div");return f=-1!==F.indexOf("Safari")&&-1===F.indexOf("Chrome")&&(-1===e||Number(F.substr(e+8,1))>3),_=f&&6>Number(F.substr(F.indexOf("Version/")+8,1)),p=-1!==F.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(F)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(F))&&(c=parseFloat(RegExp.$1)),i.innerHTML="<a style='top:1px;opacity:.55;'>a</a>",t=i.getElementsByTagName("a")[0],t?/^0.55/.test(t.style.opacity):!1}(),B=function(t){return x.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},U=function(t){window.console&&console.log(t)},j="",W="",V=function(t,e){e=e||X;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?(W=3===r?"ms":i[r],j="-"+W.toLowerCase()+"-",W+t):null},q=z.defaultView?z.defaultView.getComputedStyle:function(){},H=a.getStyle=function(t,e,i,r,s){var n;return Y||"opacity"!==e?(!r&&t.style[e]?n=t.style[e]:(i=i||q(t))?n=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(P,"-$1").toLowerCase()):t.currentStyle&&(n=t.currentStyle[e]),null==s||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:s):B(t)},G=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=k.test(i),f=t,p=X.style,_=0>r;if(_&&(r=-r),"%"===s&&-1!==i.indexOf("border"))o=r/100*(u?t.clientWidth:t.clientHeight);else{if(p.cssText="border:0 solid red;position:"+H(t,"position")+";line-height:0;","%"!==s&&f.appendChild)p[u?"borderLeftWidth":"borderTopWidth"]=r+s;else{if(f=t.parentNode||z.body,l=f._gsCache,h=e.ticker.frame,l&&u&&l.time===h)return l.width*r/100;p[u?"width":"height"]=r+s}f.appendChild(X),o=parseFloat(X[u?"offsetWidth":"offsetHeight"]),f.removeChild(X),u&&"%"===s&&a.cacheWidths!==!1&&(l=f._gsCache=f._gsCache||{},l.time=h,l.width=100*(o/r)),0!==o||n||(o=G(t,i,r,s,!0))}return _?-o:o},Q=E.calculateOffset=function(t,e,i){if("absolute"!==H(t,"position",i))return 0;var r="left"===e?"Left":"Top",s=H(t,"margin"+r,i);return t["offset"+r]-(G(t,e,parseFloat(s),s.replace(y,""))||0)},Z=function(t,e){var i,r,s={};if(e=e||q(t,null))if(i=e.length)for(;--i>-1;)s[e[i].replace(S,C)]=e.getPropertyValue(e[i]);else for(i in e)s[i]=e[i];else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===s[i]&&(s[i.replace(S,C)]=e[i]);return Y||(s.opacity=B(t)),r=Ae(t,e,!1),s.rotation=r.rotation,s.skewX=r.skewX,s.scaleX=r.scaleX,s.scaleY=r.scaleY,s.x=r.x,s.y=r.y,be&&(s.z=r.z,s.rotationX=r.rotationX,s.rotationY=r.rotationY,s.scaleZ=r.scaleZ),s.filters&&delete s.filters,s},$=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(v,"")?n:0:Q(t,a),void 0!==h[a]&&(o=new fe(h,a,h[a],o)));if(r)for(a in r)"className"!==a&&(l[a]=r[a]);return{difs:l,firstMPT:o}},K={width:["Left","Right"],height:["Top","Bottom"]},J=["marginLeft","marginRight","marginTop","marginBottom"],te=function(t,e,i){var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),s=K[e],n=s.length;for(i=i||q(t,null);--n>-1;)r-=parseFloat(H(t,"padding"+s[n],i,!0))||0,r-=parseFloat(H(t,"border"+s[n]+"Width",i,!0))||0;return r},ee=function(t,e){(null==t||""===t||"auto"===t||"auto auto"===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="0":"center"===s&&(s="50%"),("center"===r||isNaN(parseFloat(r))&&-1===(r+"").indexOf("="))&&(r="50%"),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(v,"")),e.oy=parseFloat(s.replace(v,""))),r+" "+s+(i.length>2?" "+i[2]:"")},ie=function(t,e){return"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)},re=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)}
10306,se=function(t,e,i,r){var s,n,a,o,l=1e-6;return null==t?o=e:"number"==typeof t?o=t:(s=360,n=t.split("_"),a=Number(n[0].replace(v,""))*(-1===t.indexOf("rad")?1:L)-("="===t.charAt(1)?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),l>o&&o>-l&&(o=0),o},ne={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]},ae=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},oe=a.parseColor=function(t){var e,i,r,s,n,a;return t&&""!==t?"number"==typeof t?[t>>16,255&t>>8,255&t]:(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),ne[t]?ne[t]:"#"===t.charAt(0)?(4===t.length&&(e=t.charAt(1),i=t.charAt(2),r=t.charAt(3),t="#"+e+e+i+i+r+r),t=parseInt(t.substr(1),16),[t>>16,255&t>>8,255&t]):"hsl"===t.substr(0,3)?(t=t.match(d),s=Number(t[0])%360/360,n=Number(t[1])/100,a=Number(t[2])/100,i=.5>=a?a*(n+1):a+n-a*n,e=2*a-i,t.length>3&&(t[3]=Number(t[3])),t[0]=ae(s+1/3,e,i),t[1]=ae(s,e,i),t[2]=ae(s-1/3,e,i),t):(t=t.match(d)||ne.transparent,t[0]=Number(t[0]),t[1]=Number(t[1]),t[2]=Number(t[2]),t.length>3&&(t[3]=Number(t[3])),t)):ne.black},le="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(l in ne)le+="|"+l+"\\b";le=RegExp(le+")","gi");var he=function(t,e,i,r){if(null==t)return function(t){return t};var s,n=e?(t.match(le)||[""])[0]:"",a=t.split(n).join("").match(g)||[],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(d,""):"";return u?s=e?function(t){var e,p,_,c;if("number"==typeof t)t+=f;else if(r&&D.test(t)){for(c=t.replace(D,"|").split("|"),_=0;c.length>_;_++)c[_]=s(c[_]);return c.join(",")}if(e=(t.match(le)||[n])[0],p=t.split(e).join("").match(g)||[],_=p.length,u>_--)for(;u>++_;)p[_]=i?p[0|(_-1)/2]:a[_];return o+p.join(h)+h+e+l+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,n,p;if("number"==typeof t)t+=f;else if(r&&D.test(t)){for(n=t.replace(D,"|").split("|"),p=0;n.length>p;p++)n[p]=s(n[p]);return n.join(",")}if(e=t.match(g)||[],p=e.length,u>p--)for(;u>++p;)e[p]=i?e[0|(p-1)/2]:a[p];return o+e.join(h)+l}:function(t){return t}},ue=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)}},fe=(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)}),pe=(E._parseToProxy=function(t,e,i,r,s,n){var a,o,l,h,u,f=r,p={},_={},c=i._transform,d=N;for(i._transform=null,N=e,r=u=i.parse(t,e,r,s),N=d,n&&(i._transform=c,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,p[o]=r.s,n||(h=new fe(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],p[o]=r[l],n||(h=new fe(r,l,o,h,r.rxp[l]));r=r._next}return{proxy:p,end:_,firstMPT:h,pt:u}},E.CSSPropTween=function(t,e,r,s,a,o,l,h,u,f,p){this.t=t,this.p=e,this.s=r,this.c=s,this.n=l||e,t instanceof pe||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===p?r+s:p,a&&(this._next=a,a._prev=this)}),_e=a.parseComplex=function(t,e,i,r,s,n,a,o,l,u){i=i||n||"",a=new pe(t,e,0,0,a,u?2:1,null,!1,o,i,r),r+="";var f,p,_,c,g,v,y,x,T,w,P,S,R=i.split(", ").join(",").split(" "),C=r.split(", ").join(",").split(" "),k=R.length,O=h!==!1;for((-1!==r.indexOf(",")||-1!==i.indexOf(","))&&(R=R.join(" ").replace(D,", ").split(" "),C=C.join(" ").replace(D,", ").split(" "),k=R.length),k!==C.length&&(R=(n||"").split(" "),k=R.length),a.plugin=l,a.setRatio=u,f=0;k>f;f++)if(c=R[f],g=C[f],x=parseFloat(c),x||0===x)a.appendXtra("",x,ie(g,x),g.replace(m,""),O&&-1!==g.indexOf("px"),!0);else if(s&&("#"===c.charAt(0)||ne[c]||b.test(c)))S=","===g.charAt(g.length-1)?"),":")",c=oe(c),g=oe(g),T=c.length+g.length>6,T&&!Y&&0===g[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(C[f]).join("transparent")):(Y||(T=!1),a.appendXtra(T?"rgba(":"rgb(",c[0],g[0]-c[0],",",!0,!0).appendXtra("",c[1],g[1]-c[1],",",!0).appendXtra("",c[2],g[2]-c[2],T?",":S,!0),T&&(c=4>c.length?1:c[3],a.appendXtra("",c,(4>g.length?1:g[3])-c,S,!1)));else if(v=c.match(d)){if(y=g.match(m),!y||y.length!==v.length)return a;for(_=0,p=0;v.length>p;p++)P=v[p],w=c.indexOf(P,_),a.appendXtra(c.substr(_,w-_),Number(P),ie(y[p],P),"",O&&"px"===c.substr(w+P.length,2),0===p),_=w+P.length;a["xs"+a.l]+=c.substr(_)}else a["xs"+a.l]+=a.l?" "+c:c;
10306if(-1!==r.indexOf("=")&&a.data){for(S=a.xs0+a.data.s,f=1;a.l>f;f++)S+=a["xs"+f]+a.data["xn"+f];a.e=S+a["xs"+f]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ce=9;for(l=pe.prototype,l.l=l.pr=0;--ce>0;)l["xn"+ce]=0,l["xs"+ce]="";l.xs0="",l._next=l._prev=l.xfirst=l.data=l.plugin=l.setRatio=l.rxp=null,l.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 pe(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 de=function(t,e){e=e||{},this.p=e.prefix?V(t)||t:t,o[t]=o[this.p]=this,this.format=e.formatter||he(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},me=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 de(n[r],e)},ge=function(t){if(!o[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";me(t,{parser:function(t,i,r,s,n,a,l){var h=(_gsScope.GreenSockGlobals||_gsScope).com.greensock.plugins[e];return h?(h._cssRegister(),o[r].parse(t,i,r,s,n,a,l)):(U("Error: "+e+" js file not loaded."),n)}})}};l=de.prototype,l.parseComplex=function(t,e,i,r,s,n){var a,o,l,h,u,f,p=this.keyword;if(this.multi&&(D.test(i)||D.test(e)?(o=e.replace(D,"|").split("|"),l=i.replace(D,"|").split("|")):p&&(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,p&&(u=e.indexOf(p),f=i.indexOf(p),u!==f&&(i=-1===f?l:o,i[a]+=" "+p));e=o.join(", "),i=l.join(", ")}return _e(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,s,n)},l.parse=function(t,e,i,r,n,a){return this.parseComplex(t.style,this.format(H(t,this.p,s,!1,this.dflt)),this.format(e),n,a)},a.registerSpecialProp=function(t,e,i){me(t,{parser:function(t,r,s,n,a,o){var l=new pe(t,s,0,0,a,2,s,!1,i);return l.plugin=o,l.setRatio=e(t,r,n._tween,s),l},priority:i})};var ve,ye="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),xe=V("transform"),Te=j+"transform",we=V("transformOrigin"),be=null!==V("perspective"),Pe=E.Transform=function(){this.skewY=0},Se=window.SVGElement,Re=function(t,e,i){var r,s=z.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},Ce=document.documentElement,ke=function(){var t,e,i,r=c||/Android/i.test(F)&&!window.chrome;return z.createElementNS&&!r&&(t=Re("svg",Ce),e=Re("rect",t,{width:100,height:50,x:100}),i=e.getBoundingClientRect().left,e.style[we]="50% 50%",e.style[xe]="scale(0.5,0.5)",r=i===e.getBoundingClientRect().left,Ce.removeChild(t)),r}(),Oe=function(t,e,i){var r=t.getBBox();e=ee(e).split(" "),i.xOrigin=(-1!==e[0].indexOf("%")?parseFloat(e[0])/100*r.width:parseFloat(e[0]))+r.x,i.yOrigin=(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*r.height:parseFloat(e[1]))+r.y},Ae=E.getTransform=function(t,e,i,r){if(t._gsTransform&&i&&!r)return t._gsTransform;var n,o,l,h,u,f,p,_,c,d,m,g,v,y=i?t._gsTransform||new Pe:new Pe,x=0>y.scaleX,T=2e-5,w=1e5,b=179.99,P=b*M,S=be?parseFloat(H(t,we,e,!1,"0 0 0").split(" ")[2])||y.zOrigin||0:0,R=parseFloat(a.defaultTransformPerspective)||0;if(xe?n=H(t,Te,e,!0):t.currentStyle&&(n=t.currentStyle.filter.match(O),n=n&&4===n.length?[n[0].substr(4),Number(n[2].substr(4)),Number(n[1].substr(4)),n[3].substr(4),y.x||0,y.y||0].join(","):""),n&&"none"!==n&&"matrix(1, 0, 0, 1, 0, 0)"!==n){for(o=(n||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[],l=o.length;--l>-1;)h=Number(o[l]),o[l]=(u=h-(h|=0))?(0|u*w+(0>u?-.5:.5))/w+h:h;if(16===o.length){var C=o[8],k=o[9],A=o[10],D=o[12],N=o[13],z=o[14];if(y.zOrigin&&(z=-y.zOrigin,D=C*z-o[12],N=k*z-o[13],z=A*z+y.zOrigin-o[14]),!i||r||null==y.rotationX){var X,I,E,F,Y,B,U,j=o[0],W=o[1],V=o[2],q=o[3],G=o[4],Q=o[5],Z=o[6],$=o[7],K=o[11],J=Math.atan2(Z,A),te=-P>J||J>P;y.rotationX=J*L,J&&(F=Math.cos(-J),Y=Math.sin(-J),X=G*F+C*Y,I=Q*F+k*Y,E=Z*F+A*Y,C=G*-Y+C*F,k=Q*-Y+k*F,A=Z*-Y+A*F,K=$*-Y+K*F,G=X,Q=I,Z=E),J=Math.atan2(C,j),y.rotationY=J*L,J&&(B=-P>J||J>P,F=Math.cos(-J),Y=Math.sin(-J),X=j*F-C*Y,I=W*F-k*Y,E=V*F-A*Y,k=W*Y+k*F,A=V*Y+A*F,K=q*Y+K*F,j=X,W=I,V=E),J=Math.atan2(W,Q),y.rotation=J*L,J&&(U=-P>J||J>P,F=Math.cos(-J),Y=Math.sin(-J),j=j*F+G*Y,I=W*F+Q*Y,Q=W*-Y+Q*F,Z=V*-Y+Z*F,W=I),U&&te?y.rotation=y.rotationX=0:U&&B?y.rotation=y.rotationY=0:B&&te&&(y.rotationY=y.rotationX=0),y.scaleX=(0|Math.sqrt(j*j+W*W)*w+.5)/w,y.scaleY=(0|Math.sqrt(Q*Q+k*k)*w+.5)/w,y.scaleZ=(0|Math.sqrt(Z*Z+A*A)*w+.5)/w,y.skewX=0,y.perspective=K?1/(0>K?-K:K):0,y.x=D,y.y=N,y.z=z}}else if(!(be&&!r&&o.length&&y.x===o[4]&&y.y===o[5]&&(y.rotationX||y.rotationY)||void 0!==y.x&&"none"===H(t,"display",e))){var ee=o.length>=6,ie=ee?o[0]:1,re=o[1]||0,se=o[2]||0,ne=ee?o[3]:1;y.x=o[4]||0,y.y=o[5]||0,f=Math.sqrt(ie*ie+re*re),p=Math.sqrt(ne*ne+se*se),_=ie||re?Math.atan2(re,ie)*L:y.rotation||0,c=se||ne?Math.atan2(se,ne)*L+_:y.skewX||0,d=f-Math.abs(y.scaleX||0),m=p-Math.abs(y.scaleY||0),Math.abs(c)>90&&270>Math.abs(c)&&(x?(f*=-1,c+=0>=_?180:-180,_+=0>=_?180:-180):(p*=-1,c+=0>=c?180:-180)),g=(_-y.rotation)%180,v=(c-y.skewX)%180,(void 0===y.skewX||d>T||-T>d||m>T||-T>m||g>-b&&b>g&&false|g*w||v>-b&&b>v&&false|v*w)&&(y.scaleX=f,y.scaleY=p,y.rotation=_,y.skewX=c),be&&(y.rotationX=y.rotationY=y.z=0,y.perspective=R,y.scaleZ=1)}y.zOrigin=S;for(l in y)T>y[l]&&y[l]>-T&&(y[l]=0)}else y={x:0,y:0,z:0,scaleX:1,scaleY:1,scaleZ:1,skewX:0,skewY:0,perspective:R,rotation:0,rotationX:0,rotationY:0,zOrigin:0};return i&&(t._gsTransform=y),y.svg=Se&&t instanceof Se&&t.parentNode instanceof Se,y.svg&&(Oe(t,H(t,we,s,!1,"50% 50%")+"",y),ve=a.useSVGTransformAttr||ke),y.xPercent=y.yPercent=0,y},De=function(t){var e,i,r=this.data,s=-r.rotation*M,n=s+r.skewX*M,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,p=this.t.currentStyle;
10306if(p){i=l,l=-h,h=-i,e=p.filter,f.filter="";var _,d,m=this.t.offsetWidth,g=this.t.offsetHeight,v="absolute"!==p.position,T="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,d=(r.oyp?.01*g*r.oy:r.oy)-g/2,w+=_-(_*o+d*l),b+=d-(_*h+d*u)),v?(_=m/2,d=g/2,T+=", Dx="+(_-(_*o+d*l)+w)+", Dy="+(d-(_*h+d*u)+b)+")"):T+=", sizingMethod='auto expand')",f.filter=-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?e.replace(A,T):T+" "+e,(0===t||1===t)&&1===o&&0===l&&0===h&&1===u&&(v&&-1===T.indexOf("Dx=0, Dy=0")||x.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf("gradient("&&e.indexOf("Alpha"))&&f.removeAttribute("filter")),!v){var P,S,R,C=8>c?1:-1;for(_=r.ieOffsetX||0,d=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),ce=0;4>ce;ce++)S=J[ce],P=p[S],i=-1!==P.indexOf("px")?parseFloat(P):G(this.t,S,parseFloat(P),P.replace(y,""))||0,R=i!==r[S]?2>ce?-r.ieOffsetX:-r.ieOffsetY:2>ce?_-r.ieOffsetX:d-r.ieOffsetY,f[S]=(r[S]=Math.round(i-R*(0===ce||2===ce?1:C)))+"px"}}},Me=E.set3DTransformRatio=function(t){var e,i,r,s,n,a,o,l,h,u,f,_,c,d,m,g,v,y,x,T,w,b,P,S=this.data,R=this.t.style,C=S.rotation*M,k=S.scaleX,O=S.scaleY,A=S.scaleZ,D=S.x,L=S.y,N=S.z,z=S.perspective;if(!(1!==t&&0!==t||"auto"!==S.force3D||S.rotationY||S.rotationX||1!==A||z||N))return Le.call(this,t),void 0;if(p){var X=1e-4;X>k&&k>-X&&(k=A=2e-5),X>O&&O>-X&&(O=A=2e-5),!z||S.z||S.rotationX||S.rotationY||(z=0)}if(C||S.skewX)y=Math.cos(C),x=Math.sin(C),e=y,n=x,S.skewX&&(C-=S.skewX*M,y=Math.cos(C),x=Math.sin(C),"simple"===S.skewType&&(T=Math.tan(S.skewX*M),T=Math.sqrt(1+T*T),y*=T,x*=T)),i=-x,a=y;else{if(!(S.rotationY||S.rotationX||1!==A||z||S.svg))return R[xe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) translate3d(":"translate3d(")+D+"px,"+L+"px,"+N+"px)"+(1!==k||1!==O?" scale("+k+","+O+")":""),void 0;e=a=1,i=n=0}f=1,r=s=o=l=h=u=_=c=d=0,m=z?-1/z:0,g=S.zOrigin,v=1e5,C=S.rotationY*M,C&&(y=Math.cos(C),x=Math.sin(C),h=f*-x,c=m*-x,r=e*x,o=n*x,f*=y,m*=y,e*=y,n*=y),C=S.rotationX*M,C&&(y=Math.cos(C),x=Math.sin(C),T=i*y+r*x,w=a*y+o*x,b=u*y+f*x,P=d*y+m*x,r=i*-x+r*y,o=a*-x+o*y,f=u*-x+f*y,m=d*-x+m*y,i=T,a=w,u=b,d=P),1!==A&&(r*=A,o*=A,f*=A,m*=A),1!==O&&(i*=O,a*=O,u*=O,d*=O),1!==k&&(e*=k,n*=k,h*=k,c*=k),g&&(_-=g,s=r*_,l=o*_,_=f*_+g),S.svg&&(s+=S.xOrigin-(S.xOrigin*e+S.yOrigin*i),l+=S.yOrigin-(S.xOrigin*n+S.yOrigin*a)),s=(T=(s+=D)-(s|=0))?(0|T*v+(0>T?-.5:.5))/v+s:s,l=(T=(l+=L)-(l|=0))?(0|T*v+(0>T?-.5:.5))/v+l:l,_=(T=(_+=N)-(_|=0))?(0|T*v+(0>T?-.5:.5))/v+_:_,R[xe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix3d(":"matrix3d(")+[(0|e*v)/v,(0|n*v)/v,(0|h*v)/v,(0|c*v)/v,(0|i*v)/v,(0|a*v)/v,(0|u*v)/v,(0|d*v)/v,(0|r*v)/v,(0|o*v)/v,(0|f*v)/v,(0|m*v)/v,s,l,_,z?1+-_/z:1].join(",")+")"},Le=E.set2DTransformRatio=function(t){var e,i,r,s,n,a,o,l,h,u,f,p=this.data,_=this.t,c=_.style,d=p.x,m=p.y;return!(p.rotationX||p.rotationY||p.z||p.force3D===!0||"auto"===p.force3D&&1!==t&&0!==t)||p.svg&&ve||!be?(s=p.scaleX,n=p.scaleY,p.rotation||p.skewX||p.svg?(e=p.rotation*M,i=e-p.skewX*M,r=1e5,a=Math.cos(e)*s,o=Math.sin(e)*s,l=Math.sin(i)*-n,h=Math.cos(i)*n,p.svg&&(d+=p.xOrigin-(p.xOrigin*a+p.yOrigin*l),m+=p.yOrigin-(p.xOrigin*o+p.yOrigin*h),f=1e-6,f>d&&d>-f&&(d=0),f>m&&m>-f&&(m=0)),u=(0|a*r)/r+","+(0|o*r)/r+","+(0|l*r)/r+","+(0|h*r)/r+","+d+","+m+")",p.svg&&ve?_.setAttribute("transform","matrix("+u):c[xe]=(p.xPercent||p.yPercent?"translate("+p.xPercent+"%,"+p.yPercent+"%) matrix(":"matrix(")+u):c[xe]=(p.xPercent||p.yPercent?"translate("+p.xPercent+"%,"+p.yPercent+"%) matrix(":"matrix(")+s+",0,0,"+n+","+d+","+m+")",void 0):(this.setRatio=Me,Me.call(this,t),void 0)};me("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent",{parser:function(t,e,i,r,n,o,l){if(r._transform)return n;var h,u,f,p,_,c,d,m=r._transform=Ae(t,s,!0,l.parseTransform),g=t.style,v=1e-6,y=ye.length,x=l,T={};if("string"==typeof x.transform&&xe)f=X.style,f[xe]=x.transform,f.display="block",f.position="absolute",z.body.appendChild(X),h=Ae(X,null,!1),z.body.removeChild(X);else if("object"==typeof x){if(h={scaleX:re(null!=x.scaleX?x.scaleX:x.scale,m.scaleX),scaleY:re(null!=x.scaleY?x.scaleY:x.scale,m.scaleY),scaleZ:re(x.scaleZ,m.scaleZ),x:re(x.x,m.x),y:re(x.y,m.y),z:re(x.z,m.z),xPercent:re(x.xPercent,m.xPercent),yPercent:re(x.yPercent,m.yPercent),perspective:re(x.transformPerspective,m.perspective)},d=x.directionalRotation,null!=d)if("object"==typeof d)for(f in d)x[f]=d[f];else x.rotation=d;"string"==typeof x.x&&-1!==x.x.indexOf("%")&&(h.x=0,h.xPercent=re(x.x,m.xPercent)),"string"==typeof x.y&&-1!==x.y.indexOf("%")&&(h.y=0,h.yPercent=re(x.y,m.yPercent)),h.rotation=se("rotation"in x?x.rotation:"shortRotation"in x?x.shortRotation+"_short":"rotationZ"in x?x.rotationZ:m.rotation,m.rotation,"rotation",T),be&&(h.rotationX=se("rotationX"in x?x.rotationX:"shortRotationX"in x?x.shortRotationX+"_short":m.rotationX||0,m.rotationX,"rotationX",T),h.rotationY=se("rotationY"
10306in x?x.rotationY:"shortRotationY"in x?x.shortRotationY+"_short":m.rotationY||0,m.rotationY,"rotationY",T)),h.skewX=null==x.skewX?m.skewX:se(x.skewX,m.skewX),h.skewY=null==x.skewY?m.skewY:se(x.skewY,m.skewY),(u=h.skewY-m.skewY)&&(h.skewX+=u,h.rotation+=u)}for(be&&null!=x.force3D&&(m.force3D=x.force3D,c=!0),m.skewType=x.skewType||m.skewType||a.defaultSkewType,_=m.force3D||m.z||m.rotationX||m.rotationY||h.z||h.rotationX||h.rotationY||h.perspective,_||null==x.scale||(h.scaleZ=1);--y>-1;)i=ye[y],p=h[i]-m[i],(p>v||-v>p||null!=x[i]||null!=N[i])&&(c=!0,n=new pe(m,i,m[i],p,n),i in T&&(n.e=T[i]),n.xs0=0,n.plugin=o,r._overwriteProps.push(n.n));return p=x.transformOrigin,p&&m.svg&&(Oe(t,p,h),n=new pe(m,"xOrigin",m.xOrigin,h.xOrigin-m.xOrigin,n,-1,"transformOrigin"),n.b=m.xOrigin,n.e=n.xs0=h.xOrigin,n=new pe(m,"yOrigin",m.yOrigin,h.yOrigin-m.yOrigin,n,-1,"transformOrigin"),n.b=m.yOrigin,n.e=n.xs0=h.yOrigin,p="0px 0px"),(p||be&&_&&m.zOrigin)&&(xe?(c=!0,i=we,p=(p||H(t,i,s,!1,"50% 50%"))+"",n=new pe(g,i,0,0,n,-1,"transformOrigin"),n.b=g[i],n.plugin=o,be?(f=m.zOrigin,p=p.split(" "),m.zOrigin=(p.length>2&&(0===f||"0px"!==p[2])?parseFloat(p[2]):f)||0,n.xs0=n.e=p[0]+" "+(p[1]||"50%")+" 0px",n=new pe(m,"zOrigin",0,0,n,-1,n.n),n.b=f,n.xs0=n.e=m.zOrigin):n.xs0=n.e=p):ee(p+"",m)),c&&(r._transformType=m.svg&&ve||!_&&3!==this._transformType?2:3),n},prefix:!0}),me("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),me("borderRadius",{defaultValue:"0px",parser:function(t,e,i,n,a){e=this.format(e);var o,l,h,u,f,p,_,c,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]=V(b[l])),f=u=H(t,b[l],s,!1,"0px"),-1!==f.indexOf(" ")&&(u=f.split(" "),f=u[0],u=u[1]),p=h=o[l],_=parseFloat(f),v=f.substr((_+"").length),y="="===p.charAt(1),y?(c=parseInt(p.charAt(0)+"1",10),p=
vendor: 9,734 bytes, lines 10306-10307
10306p.substr(2),c*=parseFloat(p),g=p.substr((c+"").length-(0>c?1:0))||""):(c=parseFloat(p),g=p.substr((c+"").length)),""===g&&(g=r[i]||v),g!==v&&(x=G(t,"borderLeft",_,v),T=G(t,"borderTop",_,v),"%"===g?(f=100*(x/d)+"%",u=100*(T/m)+"%"):"em"===g?(w=G(t,"borderLeft",1,"em"),f=x/w+"em",u=T/w+"em"):(f=x+"px",u=T+"px"),y&&(p=parseFloat(f)+c+g,h=parseFloat(u)+c+g)),a=_e(P,b[l],f+" "+u,p+" "+h,!1,"0px",a);return a},prefix:!0,formatter:he("0px 0px 0px 0px",!1,!0)}),me("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,n,a){var o,l,h,u,f,p,_="background-position",d=s||q(t,null),m=this.format((d?c?d.getPropertyValue(_+"-x")+" "+d.getPropertyValue(_+"-y"):d.getPropertyValue(_):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==m.indexOf("%")!=(-1!==g.indexOf("%"))&&(p=H(t,"backgroundImage").replace(R,""),p&&"none"!==p)){for(o=m.split(" "),l=g.split(" "),I.setAttribute("src",p),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:ee}),me("backgroundSize",{defaultValue:"0 0",formatter:ee}),me("perspective",{defaultValue:"0px",prefix:!0}),me("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),me("transformStyle",{prefix:!0}),me("backfaceVisibility",{prefix:!0}),me("userSelect",{prefix:!0}),me("margin",{parser:ue("marginTop,marginRight,marginBottom,marginLeft")}),me("padding",{parser:ue("paddingTop,paddingRight,paddingBottom,paddingLeft")}),me("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,n,a){var o,l,h;return 9>c?(l=t.currentStyle,h=8>c?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format(H(t,this.p,s,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,n,a)}}),me("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),me("autoRound,strictUnits",{parser:function(t,e,i,r,s){return s}}),me("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,n,a){return this.parseComplex(t.style,this.format(H(t,"borderTopWidth",s,!1,"0px")+" "+H(t,"borderTopStyle",s,!1,"solid")+" "+H(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(le)||["#000"])[0]}}),me("borderWidth",{parser:ue("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),me("float,cssFloat,styleFloat",{parser:function(t,e,i,r,s){var n=t.style,a="cssFloat"in n?"cssFloat":"styleFloat";return new pe(n,a,0,0,s,-1,i,!1,0,n[a],e)}});var Ne=function(t){var e,i=this.t,r=i.filter||H(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=!H(this.data,"filter")):(i.filter=r.replace(w,""),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(x,"opacity="+s))};me("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,n,a){var o=parseFloat(H(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"===H(t,"visibility",s)&&0!==e&&(o=0),Y?n=new pe(l,"opacity",o,e-o,n):(n=new pe(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=Ne),h&&(n=new pe(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 ze=function(t,e){e&&(t.removeProperty?("ms"===e.substr(0,2)&&(e="M"+e.substr(1)),t.removeProperty(e.replace(P,"-$1").toLowerCase())):t.removeAttribute(e))},Xe=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:ze(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)};me("className",{parser:function(t,e,r,n,a,o,l){var h,u,f,p,_,c=t.getAttribute("class")||"",d=t.style.cssText;if(a=n._classNamePT=new pe(t,r,0,0,a,2),a.setRatio=Xe,a.pr=-11,i=!0,a.b=c,u=Z(t,s),f=t._gsClassPT){for(p={},_=f.data;_;)p[_.p]=1,_=_._next;f.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:c.replace(RegExp("\\s*\\b"+e.substr(2)+"\\b"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),n._tween._duration&&(t.setAttribute("class",a.e),h=$(t,u,Z(t),l,p),t.setAttribute("class",c),a.data=h.firstMPT,t.style.cssText=d,a=a.xfirst=n.parse(t,h.difs,a,o)),a}});var Ie=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,s,n=this.t.style,a=o.transform.parse;if("all"===this.e)n.cssText="",s=!0;else for(e=this.e.split(" ").join("").split(","),r=e.length;--r>-1;)i=e[r],o[i]&&(o[i].parse===a?s=!0:i="transformOrigin"===i?we:o[i].p),ze(n,i);s&&(ze(n,xe),this.t._gsTransform&&delete this.t._gsTransform)}};for(me("clearProps",{parser:function(t,e,r,s,n){return n=new pe(t,r,0,0,n,2),n.setRatio=Ie,n.e=e,n.pr=-10,n.data=s._tween,i=!0,n}}),l="bezier,throwProps,physicsProps,physics2D".split(","),ce=l.length;ce--;)ge(l[ce]);l=a.prototype,l._firstPT=null,l._onInitTween=function(t,e,o){if(!t.nodeType)return!1;this._target=t,this._tween=o,this._vars=e,h=e.autoRound,i=!1,r=e.suffixMap||a.suffixMap,s=q(t,""),n=this._overwriteProps;var l,p,c,d,m,g,v,y,x,w=t.style;if(u&&""===w.zIndex&&(l=H(t,"zIndex",s),("auto"===l||""===l)&&this._addLazySet(w,"zIndex",0)),"string"==typeof e&&(d=w.cssText,l=Z(t,s),w.cssText=d+";"+e,l=$(t,l,Z(t)).difs,!Y&&T.test(e)&&(l.opacity=parseFloat(RegExp.$1)),e=l,w.cssText=d),this._firstPT=p=this.parse(t,e,null),this._transformType){for(x=3===this._transformType,xe?f&&(u=!0,""===w.zIndex&&(v=H(t,"zIndex",s),("auto"===v||""===v)&&this._addLazySet(w,"zIndex",0)),_&&this._addLazySet(w,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(x?"visible":"hidden"))):w.zoom=1,c=p;c&&c._next;)c=c._next;y=new pe(t,"transform",0,0,null,2),this._linkCSSP(y,null,c),y.setRatio=x&&be?Me:xe?Le:De,y.data=this._transform||Ae(t,s,!0),n.pop()}if(i){for(;p;){for(g=p._next,c=d;c&&c.pr>p.pr;)c=c._next;(p._prev=c?c._prev:m)?p._prev._next=p:d=p,(p._next=c)?c._prev=p:m=p,p=g}this._firstPT=d}return!0},l.parse=function(t,e,i,n){var a,l,u,f,p,_,c,d,m,g,v=t.style;for(a in e)_=e[a],l=o[a],l?i=l.parse(t,_,a,this,i,n,e):(p=H(t,a,s)+"",m="string"==typeof _,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||m&&b.test(_)?(m||(_=oe(_),_=(_.length>3?"rgba(":"rgb(")+_.join(",")+")"),i=_e(v,a,p,_,!0,"transparent",i,0,n)):!m||-1===_.indexOf(" ")&&-1===_.indexOf(",")?(u=parseFloat(p),c=u||0===u?p.substr((u+"").length):"",(""===p||"auto"===p)&&("width"===a||"height"===a?(u=te(t,a,s),c="px"):"left"===a||"top"===a?(u=Q(t,a,s),c="px"):(u="opacity"!==a?0:1,c="")),g=m&&"="===_.charAt(1),g?(f=parseInt(_.charAt(0)+"1",10),_=_.substr(2),f*=parseFloat(_),d=_.replace(y,"")):(f=parseFloat(_),d=m?_.substr((f+"").length)||"":""),""===d&&(d=a in r?r[a]:c),_=f||0===f?(g?f+u:f)+d:e[a],c!==d&&""!==d&&(f||0===f)&&u&&(u=G(t,a,u,c),"%"===d?(u/=G(t,a,100,"%")/100,e.strictUnits!==!0&&(p=u+"%")):"em"===d?u/=G(t,a,1,"em"):"px"!==d&&(f=G(t,a,f,d),d="px"),g&&(f||0===f)&&(_=f+u+d)),g&&(f+=u),!u&&0!==u||!f&&0!==f?void 0!==v[a]&&(_||"NaN"!=_+""&&null!=_)?(i=new pe(v,a,f||u||0,0,i,-1,a,!1,0,p,_),i.xs0="none"!==_||"display"!==a&&-1===a.indexOf("Style")?_:p):U("invalid "+a+" tween value: "+e[a]):(i=new pe(v,a,u,f-u,i,0,a,h!==!1&&("px"===d||"zIndex"===a),0,p,_),i.xs0=d)):i=_e(v,a,p,_,!0,null,i,0,n)),n&&i&&!i.plugin&&(i.plugin=n);
10307return i},l.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;)2!==s.type?s.t[s.p]=s.e:s.setRatio(t),s=s._next},l._enableTransforms=function(t){this._transform=this._transform||Ae(this._target,s,!0),this._transformType=this._transform.svg&&ve||!t&&3!==this._transformType?2:3};var Ee=function(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};l._addLazySet=function(t,e,i){var r=this._firstPT=new pe(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=Ee,r.data=this},l._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},l._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,
10307s._prev),this._classNamePT=null),t.prototype._kill.call(this,n)};var Fe=function(t,e,i){var r,s,n,a;if(t.slice)for(s=t.length;--s>-1;)Fe(t[s],e,i);else for(r=t.childNodes,s=r.length;--s>-1;)n=r[s],a=n.type,n.style&&(e.push(Z(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||Fe(n,e,i)};return a.cascadeTo=function(t,i,r){var s,n,a,o=e.to(t,i,r),l=[o],h=[],u=[],f=[],p=e._internals.reservedProps;for(t=o._targets||o.target,Fe(t,h,f),o.render(i,!0),Fe(t,u),o.render(0,!0),o._enabled(!0),s=f.length;--s>-1;)if(n=$(f[s],h[s],u[s]),n.firstMPT){n=n.difs;for(a in r)p[a]&&(n[a]=r[a]);l.push(e.to(f[s],i,n))}return l},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");
10308var _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,h=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},l=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],l(i))for(s=i.length,s=0;i.length>s;s++)r.push(i[s]);else r.push(i);return r},u=")eefec303079ad17405c",c=/(?:<br>|<br\/>|<br \/>)/gi,p=n.all&&!n.addEventListener,f="<div style='position:relative;display:inline-block;"+(p?"*display:inline;*zoom:1;'":"'"),m=function(t){t=t||"";var e=-1!==t.indexOf("++"),i=1;return e&&(t=t.split("++").join("")),function(){return f+(t?" class='"+t+(e?i++:"")+"'>":">")}},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=l(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 l,_,p,f,d,y,T,w,b,x,P,S,C,k,R=r(t),A=e.type||e.split||"chars,words,lines",O=-1!==A.indexOf("lines")?[]:null,D=-1!==A.indexOf("words"),M=-1!==A.indexOf("chars"),L="absolute"===e.position||e.absolute===!0,z=L?"&#173; ":" ",I=-999,E=a(t),N=h(t,"paddingLeft",E),F=h(t,"borderBottomWidth",E)+h(t,"borderTopWidth",E),X=h(t,"borderLeftWidth",E)+h(t,"borderRightWidth",E),U=h(t,"paddingTop",E)+h(t,"paddingBottom",E),B=h(t,"paddingLeft",E)+h(t,"paddingRight",E),j=h(t,"textAlign",E,!0),Y=t.clientHeight,q=t.clientWidth,G="</div>",V=m(e.wordsClass),Q=m(e.charsClass),W=-1!==(e.linesClass||"").indexOf("++"),H=e.linesClass,Z=-1!==R.indexOf("<"),$=!0,K=[],J=[],te=[];for(W&&(H=H.split("++").join("")),Z&&(R=R.split("<").join("")),l=R.length,f=V(),d=0;l>d;d++)if(T=R.charAt(d),")"===T&&R.substr(d,20)===u)f+=($?G:"")+"<BR/>",$=!1,d!==l-20&&R.substr(d+20,20)!==u&&(f+=" "+V(),$=!0),d+=19;else if(" "===T&&" "!==R.charAt(d-1)&&d!==l-1&&R.substr(d-20,20)!==u){for(f+=$?G:"",$=!1;" "===R.charAt(d+1);)f+=z,d++;(")"!==R.charAt(d+1)||R.substr(d+1,20)!==u)&&(f+=z+V(),$=!0)}else f+=M&&" "!==T?Q()+T+"</div>":T;for(t.innerHTML=f+($?G:""),Z&&g(t,"","<"),y=t.getElementsByTagName("*"),l=y.length,w=[],d=0;l>d;d++)w[d]=y[d];if(O||L)for(d=0;l>d;d++)b=w[d],p=b.parentNode===t,(p||L||M&&!D)&&(x=b.offsetTop,O&&p&&x!==I&&"BR"!==b.nodeName&&(_=[],O.push(_),I=x),L&&(b._x=b.offsetLeft,b._y=x,b._w=b.offsetWidth,b._h=b.offsetHeight),O&&(D!==p&&M||(_.push(b),b._x-=N),p&&d&&(w[d-1]._wordEnd=!0),"BR"===b.nodeName&&b.nextSibling&&"BR"===b.nextSibling.nodeName&&O.push([])));for(d=0;l>d;d++)b=w[d],p=b.parentNode===t,"BR"!==b.nodeName?(L&&(S=b.style,D||p||(b._x+=b.parentNode._x,b._y+=b.parentNode._y),S.left=b._x+"px",S.top=b._y+"px",S.position="absolute",
vendor: 4,096 bytes, lines 10308-10328
10308S.display="block",S.width=b._w+1+"px",S.height=b._h+"px"),D?p&&""!==b.innerHTML?J.push(b):M&&K.push(b):p?(t.removeChild(b),w.splice(d--,1),l--):!p&&M&&(x=!O&&!L&&b.nextSibling,t.appendChild(b),x||t.appendChild(n.createTextNode(" ")),K.push(b))):O||L?(t.removeChild(b),w.splice(d--,1),l--):D||t.appendChild(b);if(O){for(L&&(P=n.createElement("div"),t.appendChild(P),C=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(k=!L||!D&&!M,d=0;O.length>d;d++){for(_=O[d],P=n.createElement("div"),P.style.cssText="display:block;text-align:"+j+";position:"+(L?"absolute;":"relative;"),H&&(P.className=H+(W?d+1:"")),te.push(P),l=_.length,y=0;l>y;y++)"BR"!==_[y].nodeName&&(b=_[y],P.appendChild(b),k&&(b._wordEnd||D)&&P.appendChild(n.createTextNode(" ")),L&&(0===y&&(P.style.top=b._y+"px",P.style.left=N+x+"px"),b.style.top="0px",x&&(b.style.left=b._x-x+"px")));0===l&&(P.innerHTML="&nbsp;"),D||M||(P.innerHTML=r(P).split(String.fromCharCode(160)).join(" ")),L&&(P.style.width=C,P.style.height=b._h+"px"),t.appendChild(P)}t.style.cssText=S}L&&(Y>t.clientHeight&&(t.style.height=Y-U+"px",Y>t.clientHeight&&(t.style.height=Y+F+"px")),q>t.clientWidth&&(t.style.width=q-B+"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.3"})(_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");
10309try{
10310	window.GreenSockGlobals = null;
10311	window._gsQueue = null;
10312	window._gsDefine = null;
10313	delete(window.GreenSockGlobals);
10314	delete(window._gsQueue);
10315	delete(window._gsDefine);
10316   } catch(e) {}
10317try{
10318	window.GreenSockGlobals = oldgs;
10319	window._gsQueue = oldgs_queue;
10320	} catch(e) {}
10321if (window.tplogs==true)
10322	try {
10323		console.groupEnd();
10324	} catch(e) {}
10325(function(e,t){
10326		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})})};
10327})(jQuery)
10328function revslider_showDoubleJqueryError(a){var b="Revolution Slider Error: You have some jquery.js library include that c
10328omes after the revolution files js include.";b+="<br> This includes make eliminates the revolution slider libraries, and make it not work.",b+="<br><br> To fix it you can:<br>&nbsp;&nbsp;&nbsp; 1. In the Slider Settings -> Troubleshooting set option:  <strong><b>Put JS Includes To Body</b></strong> option to true.",b+="<br>&nbsp;&nbsp;&nbsp; 2. Find the double jquery.js include and remove it.",b="<span style='font-size:16px;color:#BC0C06;'>"+b+"</span>",jQuery(a).show().html(b)}!function(a,b){function c(){var a=!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)&&(a=!0):a=!1,a}function d(d,e){if(d==b)return!1;if(d.data("aimg")!=b&&("enabled"==d.data("aie8")&&i(8)||"enabled"==d.data("amobile")&&W())&&d.html('<img class="tp-slider-alternative-image" src="'+d.data("aimg")+'">'),"preview1"!=e.navigationStyle&&"preview3"!=e.navigationStyle&&"preview4"!=e.navigationStyle||(e.soloArrowLeftHalign="left",e.soloArrowLeftValign="center",e.soloArrowLeftHOffset=0,e.soloArrowLeftVOffset=0,e.soloArrowRightHalign="right",e.soloArrowRightValign="center",e.soloArrowRightHOffset=0,e.soloArrowRightVOffset=0,e.navigationArrows="solo"),"on"==e.simplifyAll&&(i(8)||c())&&(d.find(".tp-caption").each(function(){var b=a(this);b.removeClass("customin").removeClass("customout").addClass("fadein").addClass("fadeout"),b.data("splitin",""),b.data("speed",400)}),d.find(">ul>li").each(function(){var b=a(this);b.data("transition","fade"),b.data("masterspeed",500),b.data("slotamount",1);var c=b.find(">img").first();c.data("kenburns","off")})),e.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),"on"!=e.fullWidth&&"on"!=e.fullScreen&&(e.autoHeight="off"),"on"==e.fullScreen&&(e.autoHeight="on"),"on"!=e.fullWidth&&"on"!=e.fullScreen&&(forceFulWidth="off"),"on"==e.fullWidth&&"off"==e.autoHeight&&d.css({maxHeight:e.startheight+"px"}),W()&&"on"==e.hideThumbsOnMobile&&"thumb"==e.navigationType&&(e.navigationType="none"),W()&&"on"==e.hideBulletsOnMobile&&"bullet"==e.navigationType&&(e.navigationType="none"),W()&&"on"==e.hideBulletsOnMobile&&"both"==e.navigationType&&(e.navigationType="none"),W()&&"on"==e.hideArrowsOnMobile&&(e.navigationArrows="none"),"on"==e.forceFullWidth&&0==d.closest(".forcefullwidth_wrapper_tp_banner").length){var j=d.parent().offset().left,p=d.parent().css("marginBottom"),q=d.parent().css("marginTop");p==b&&(p=0),q==b&&(q=0),d.parent().wrap('<div style="position:relative;width:100%;height:auto;margin-top:'+q+";margin-bottom:"+p+'" class="forcefullwidth_wrapper_tp_banner"></div>'),d.closest(".forcefullwidth_wrapper_tp_banner").append('<div class="tp-fullwidth-forcer" style="width:100%;height:'+d.height()+'px"></div>'),d.css({backgroundColor:d.parent().css("backgroundColor"),backgroundImage:d.parent().css("backgroundImage")}),d.parent().css({left:0-j+"px",position:"absolute",width:a(window).width()}),e.width=a(window).width()}try{e.hideThumbsUnderResolution>a(window).width()&&0!=e.hideThumbsUnderResolution?d.parent().find(".tp-bullets.tp-thumbs").css({display:"none"}):d.parent().find(".tp-bullets.tp-thumbs").css({display:"block"})}catch(a){}if(!d.hasClass("revslider-initialised")){d.addClass("revslider-initialised"),d.attr("id")==b&&d.attr("id","revslider-"+Math.round(1e3*Math.random()+5)),e.firefox13=!1,e.ie=!a.support.opacity,e.ie9=9==document.documentMode,e.origcd=e.delay;var r=a.fn.jquery.split("."),t=parseFloat(r[0]),u=parseFloat(r[1]);parseFloat(r[2]||"0");1==t&&u<7&&d.html('<div style="text-align:center; padding:40px 0px; font-size:20px; color:#992222;"> The Current Version of jQuery:'+r+" <br>Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin</div>"),t>1&&(e.ie=!1),a.support.transition||(a.fn.transition=a.fn.animate),d.find(".caption").each(function(){a(this).addClass("tp-caption")}
10328),W()&&(!navigator.userAgent.split("ipad").length>1||!navigator.userAgent.split("iPad").length>1)&&d.find(".tp-caption").each(function(){var b=a(this);1!=b.data("autoplayonlyfirsttime")&&"true"!=b.data("autoplayonlyfirsttime")||b.data("autoplayonlyfirsttime","false"),1!=b.data("autoplay")&&"true"!=b.data("autoplay")||b.data("autoplay",!1)});var w=0,x=0,A="http";if("https:"===location.protocol&&(A="https"),d.find(".tp-caption").each(function(c){try{if((a(this).data("ytid")!=b||a(this).find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&0==w){w=1;var d=document.createElement("script"),e="https";d.src=e+"://www.youtube.com/iframe_api";var f=document.getElementsByTagName("script")[0],g=!0;a("head").find("*").each(function(){a(this).attr("src")==e+"://www.youtube.com/iframe_api"&&(g=!1)}),g&&f.parentNode.insertBefore(d,f)}}catch(a){}try{if((a(this).data("vimeoid")!=b||a(this).find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&0==x){x=1;var h=document.createElement("script");h.src=A+"://a.vimeocdn.com/js/froogaloop2.min.js";var f=document.getElementsByTagName("script")[0],g=!0;a("head").find("*").each(function(){a(this).attr("src")==A+"://a.vimeocdn.com/js/froogaloop2.min.js"&&(g=!1)}),g&&f.parentNode.insertBefore(h,f)}}catch(a){}try{a(this).data("videomp4")!=b||a(this).data("videowebm")!=b}catch(a){}}),d.find(".tp-caption video").each(function(b){a(this).removeClass("video-js").removeClass("vjs-default-skin"),a(this).attr("preload",""),a(this).css({display:"none"})}),d.find(">ul:first-child >li").each(function(){var b=a(this);b.data("origindex",b.index())}),"on"==e.shuffle){var B=new Object,C=d.find(">ul:first-child >li:first-child");B.fstransition=C.data("fstransition"),B.fsmasterspeed=C.data("fsmasterspeed"),B.fsslotamount=C.data("fsslotamount");for(var D=0;D<d.find(">ul:first-child >li").length;D++){var E=Math.round(Math.random()*d.find(">ul:first-child >li").length);d.find(">ul:first-child >li:eq("+E+")").prependTo(d.find(">ul:first-child"))}var F=d.find(">ul:first-child >li:first-child");F.data("fstransition",B.fstransition),F.data("fsmasterspeed",B.fsmasterspeed),F.data("fsslotamount",B.fsslotamount)}e.slots=4,e.act=-1,e.next=0,e.startWithSlide!=b&&(e.next=e.startWithSlide);var G=g("#")[0];if(G.length<9&&G.split("slide").length>1){var H=parseInt(G.split("slide")[1],0);H<1&&(H=1),H>d.find(">ul:first >li").length&&(H=d.find(">ul:first >li").length),e.next=H-1}e.firststart=1,e.navigationHOffset==b&&(e.navOffsetHorizontal=0),e.navigationVOffset==b&&(e.navOffsetVertical=0),d.append('<div class="tp-loader '+e.spinner+'"><div class="dot1"></div><div class="dot2"></div><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>'),0==d.find(".tp-bannertimer").length&&d.append('<div class="tp-bannertimer" style="visibility:hidden"></div>');var I=d.find(".tp-bannertimer");if(I.length>0&&I.css({width:"0%"}),d.addClass("tp-simpleresponsive"),e.container=d,e.slideamount=d.find(">ul:first >li").length,0==d.height()&&d.height(e.startheight),e.startwidth!=b&&0!=e.startwidth||(e.startwidth=d.width()),e.startheight!=b&&0!=e.startheight||(e.startheight=d.height()),e.width=d.width(),e.height=d.height(),e.bw=e.startwidth/d.width(),e.bh=e.startheight/d.height(),e.width!=e.startwidth&&(e.height=Math.round(e.startheight*(e.width/e.startwidth)),d.height(e.height)),0!=e.shadow){d.parent().append('<div class="tp-bannershadow tp-shadow'+e.shadow+'"></div>');var j=0;"on"==e.forceFullWidth&&(j=0-e.container.parent().offset().left),d.parent().find(".tp-bannershadow").css({width:e.width,left:j})}d.find("ul").css({display:"none"});d.find("ul").css({display:"block"}),s(d,e),"off"!=e.parallax&&aa(d,e),e.slideamount>1&&k(d,e),e.slideamount>1&&"thumb"==e.navigationType&&ca(d,e),e.slideamount>1&&l(d,e),"on"==e.keyboardNavigation&&m(d,e),n(d,e),e.hideThumbs>0&&o(d,e),setTimeout(function(){z(d,e)},e.startDelay),e.startDelay=0,e.slideamount>1&&V(d,e),setTimeout(function(){d.trigger("revolution.slide.onloaded")},500),a("body").data("rs-fullScreenMode",!1),a(window).on("mozfullscreenchange webkitfullscreenchange fullscreenchange",function(){a("body").data("rs-fullScreenMode",!a("body").data("rs-fullScreenMode")),a("body").data("rs-fullScreenMode")&&setTimeout(function(){a(window).trigger("resize")},200)});var K="resize.revslider-"+d.attr("id");a(window).on(K,function(){if(d==b)return!1;if(0!=a("body").find(d)&&"on"==e.forceFullWidth){var c=e.container.closest(".forcefullwidth_wrapper_tp_banner").offset().left;e.container.parent().css({left:0-c+"px",width:a(window).width()})}(d.outerWidth(!0)!=e.width||d.is(":hidden"))&&h(d,e)});try{0!=e.hideThumbsUnderResoluition&&"thumb"==e.navigationType&&(e.hideThumbsUnderResoluition>
10328a(window).width()?a(".tp-bullets").css({display:"none"}):a(".tp-bullets").css({display:"block"}))}catch(a){}d.find(".tp-scrollbelowslider").on("click",function(){var b=0;try{b=a("body").find(e.fullScreenOffsetContainer).height()}catch(a){}try{b-=parseInt(a(this).data("scrolloffset"),0)}catch(a){}a("body,html").animate({scrollTop:d.offset().top+d.find(">ul >li").height()-b+"px"},{duration:400})});var L=d.parent();a(window).width()<e.hideSliderAtLimit&&(d.trigger("stoptimer"),"none"!=L.css("display")&&L.data("olddisplay",L.css("display")),L.css({display:"none"})),f(d,e)}}a.fn.extend({revolution:function(c){var e={delay:9e3,startheight:500,startwidth:960,fullScreenAlignForce:"off",autoHeight:"off",hideTimerBar:"off",hideThumbs:200,hideNavDelayOnMobile:1500,thumbWidth:100,thumbHeight:50,thumbAmount:3,navigationType:"bullet",navigationArrows:"solo",navigationInGrid:"off",hideThumbsOnMobile:"off",hideBulletsOnMobile:"off",hideArrowsOnMobile:"off",hideThumbsUnderResoluition:0,navigationStyle:"round",navigationHAlign:"center",navigationVAlign:"bottom",navigationHOffset:0,navigationVOffset:20,soloArrowLeftHalign:"left",soloArrowLeftValign:"center",soloArrowLeftHOffset:20,soloArrowLeftVOffset:0,soloArrowRightHalign:"right",soloArrowRightValign:"center",soloArrowRightHOffset:20,soloArrowRightVOffset:0,keyboardNavigation:"on",touchenabled:"on",onHoverStop:"on",stopAtSlide:-1,stopAfterLoops:-1,hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,shadow:0,fullWidth:"off",fullScreen:"off",minFullScreenHeight:0,fullScreenOffsetContainer:"",fullScreenOffset:"0",dottedOverlay:"none",forceFullWidth:"off",spinner:"spinner0",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,isJoomla:!1,parallax:"off",parallaxLevels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],parallaxBgFreeze:"off",parallaxOpacity:"on",parallaxDisableOnMobile:"off",panZoomDisableOnMobile:"off",simplifyAll:"on",minHeight:0,nextSlideOnWindowFocus:"off",startDelay:0};return c=a.extend({},e,c),this.each(function(){if(1==window.tplogs)try{console.groupCollapsed("Slider Revolution 4.6.3 Initialisation on "+a(this).attr("id")),console.groupCollapsed("Used Options:"),console.info(c),console.groupEnd(),console.groupCollapsed("Tween Engine:")}catch(a){}if(punchgs.TweenLite==b){if(1==window.tplogs)try{console.error("GreenSock Engine Does not Exist!")}catch(a){}return!1}if(punchgs.force3D=!0,1==window.tplogs)try{console.info("GreenSock Engine Version in Slider Revolution:"+punchgs.TweenLite.version)}catch(a){}if("on"==c.simplifyAll||(punchgs.TweenLite.lagSmoothing(1e3,16),punchgs.force3D="true"),1==window.tplogs)try{console.groupEnd(),console.groupEnd()}catch(a){}d(a(this),c)})},revscroll:function(c){return this.each(function(){var d=a(this);d!=b&&d.length>0&&a("body").find("#"+d.attr("id")).length>0&&a("body,html").animate({scrollTop:d.offset().top+d.find(">ul >li").height()-c+"px"},{duration:400})})},revredraw:function(c){return this.each(function(){var c=a(this);if(c!=b&&c.length>0&&a("body").find("#"+c.attr("id")).length>0){var d=c.parent().find(".tp-bannertimer"),e=d.data("opt");h(c,e)}})},revkill:function(c){var d=this,e=a(this);if(e!=b&&e.length>0&&a("body").find("#"+e.attr("id")).length>0){e.data("conthover",1),e.data("conthover-changed",1),e.trigger("revolution.slide.onpause");var f=e.parent().find(".tp-bannertimer"),g=f.data("opt");g.bannertimeronpause=!0,e.trigger("stoptimer"),punchgs.TweenLite.killTweensOf(e.find("*"),!1),punchgs.TweenLite.killTweensOf(e,!1),e.unbind("hover, mouseover, mouseenter,mouseleave, resize");var h="resize.revslider-"+e.attr("id");a(window).off(h),e.find("*").each(function(){var c=a(this);c.unbind("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),c.off("on, hover, mouseenter,mouseleave,mouseover, resize"),c.data("mySplitText",null),c.data("ctl",null),c.data("tween")!=b&&c.data("tween").kill(),c.data("kenburn")!=b&&c.data("kenburn").kill(),c.remove(),c.empty(),c=null}),punchgs.TweenLite.killTweensOf(e.find("*"),!1),punchgs.TweenLite.killTweensOf(e,!1),f.remove();try{e.closest(".forcefullwidth_wrapper_tp_banner").remove()}catch(a){}try{e.closest(".rev_slider_wrapper").remove()}catch(a){}try{e.remove()}catch(a){}return e.empty(),e.html(),e=null,g=null,delete d.container,delete d.opt,!0}return!1},revpause:function(c){return this.each(function(){var c=a(this);if(c!=b&&c.length>0&&a("body").find("#"+c.attr("id")).length>
103280){c.data("conthover",1),c.data("conthover-changed",1),c.trigger("revolution.slide.onpause");var d=c.parent().find(".tp-bannertimer"),e=d.data("opt");e.bannertimeronpause=!0,c.trigger("stoptimer")}})},revresume:function(c){return this.each(function(){var c=a(this);if(c!=b&&c.length>0&&a("body").find("#"+c.attr("id")).length>0){c.data("conthover",0),c.data("conthover-changed",1),c.trigger("revolution.slide.onresume");var d=c.parent().find(".tp-bannertimer"),e=d.data("opt");e.bannertimeronpause=!1,c.trigger("starttimer")}})},revnext:function(c){return this.each(function(){var c=a(this);c!=b&&c.length>0&&a("body").find("#"+c.attr("id")).length>0&&c.parent().find(".tp-rightarrow").click()})},revprev:function(c){return this.each(function(){var c=a(this);c!=b&&c.length>0&&a("body").find("#"+c.attr("id")).length>0&&c.parent().find(".tp-leftarrow").click()})},revmaxslide:function(b){return a(this).find(">ul:first-child >li").length},revcurrentslide:function(c){var d=a(this);if(d!=b&&d.length>0&&a("body").find("#"+d.attr("id")).length>0){var e=d.parent().find(".tp-bannertimer"),f=e.data("opt");return f.act}},revlastslide:function(c){var d=a(this);if(d!=b&&d.length>0&&a("body").find("#"+d.attr("id")).length>0){var e=d.parent().find(".tp-bannertimer"),f=e.data("opt");return f.lastslide}},revshowslide:function(c){return this.each(function(){var d=a(this);d!=b&&d.length>0&&a("body").find("#"+d.attr("id")).length>0&&(d.data("showus",c),d.parent().find(".tp-rightarrow").click())})}});var f=(function(){var a,b,c={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(a in c)if(a in document){b=c[a];break}return function(c){return c&&document.addEventListener(b,c),!document[a]}}(),function(c,d){var e=document.documentMode===b,f=window.chrome;e&&!f?a(window).on("focusin",function(){return c!=b&&void setTimeout(function(){"on"==d.nextSlideOnWindowFocus&&c.revnext(),c.revredraw()},300)}).on("focusout",function(){}):window.addEventListener?(window.addEventListener("focus",function(a){return c!=b&&void setTimeout(function(){"on"==d.nextSlideOnWindowFocus&&c.revnext(),c.revredraw()},300)},!1),window.addEventListener("blur",function(a){},!1)):(window.attachEvent("focus",function(a){setTimeout(function(){return c!=b&&("on"==d.nextSlideOnWindowFocus&&c.revnext(),void c.revredraw())},300)}),window.attachEvent("blur",function(a){}))}),g=function(a){for(var c,b=[],d=window.location.href.slice(window.location.href.indexOf(a)+1).split("_"),e=0;e<d.length;e++)d[e]=d[e].replace("%3D","="),c=d[e].split("="),b.push(c[0]),b[c[0]]=c[1];return b},h=function(c,d){if(c==b)return!1;try{0!=d.hideThumbsUnderResoluition&&"thumb"==d.navigationType&&(d.hideThumbsUnderResoluition>a(window).width()?a(".tp-bullets").css({display:"none"}):a(".tp-bullets").css({display:"block"}))}catch(a){}c.find(".defaultimg").each(function(b){r(a(this),d)});var e=c.parent();a(window).width()<d.hideSliderAtLimit?(c.trigger("stoptimer"),"none"!=e.css("display")&&e.data("olddisplay",e.css("display")),e.css({display:"none"})):c.is(":hidden")&&(e.data("olddisplay")!=b&&"undefined"!=e.data("olddisplay")&&"none"!=e.data("olddisplay")?e.css({display:e.data("olddisplay")}):e.css({display:"block"}),c.trigger("restarttimer"),setTimeout(function(){h(c,d)},150));var f=0;"on"==d.forceFullWidth&&(f=0-d.container.parent().offset().left);try{c.parent().find(".tp-bannershadow").css({width:d.width,left:f})}catch(a){}var g=c.find(">ul >li:eq("+d.act+") .slotholder"),i=c.find(">ul >li:eq("+d.next+") .slotholder");v(c,d,c),punchgs.TweenLite.set(i.find(".defaultimg"),{opacity:0}),g.find(".defaultimg").css({opacity:1}),i.find(".defaultimg").each(function(){var e=a(this);"on"==d.panZoomDisableOnMobile||e.data("kenburn")!=b&&(e.data("kenburn").restart(),Y(c,d,!0))});var j=c.find(">ul >li:eq("+d.next+")"),k=c.parent().find(".tparrows");k.hasClass("preview2")&&k.css({width:parseInt(k.css("minWidth"),0)}),L(j,d,!0),p(c,d)},i=function(b,c){var d=a('<div style="display:none;"/>').appendTo(a("body"));d.html("<!--[if "+(c||"")+" IE "+(b||"")+"]><a>&nbsp;</a><![endif]-->");var e=d.find("a").length;return d.remove(),e},j=function(a,b){a.next==b.find(">ul >li").length-1&&(a.looptogo=a.looptogo-1,a.looptogo<=0&&(a.stopLoop="on")),z(b,a)},k=function(b,c){var d="hidebullets";0==c.hideThumbs&&(d=""),"bullet"!=c.navigationType&&"both"!=c.navigationType||b.parent().append('<div class="tp-bullets '+d+" simplebullets "+c.navigationStyle+'"></div>');var e=b.parent().find(".tp-bullets");b.find(">ul:first >li").each(function(a){b.find(">ul:first >li:eq("+a+") img:first").attr("src");e.append('<div class="bullet"></div>');e.find(".bullet:first")}),e.find(".bullet").each(function(d){var e=a(this);d==c.slideamount-1&&e.addClass("last"),0==d&&e.addClass("first"),e.click(function(){var a=!1,d=e.index();"withbullet"!=c.navigationArrows&&"nexttobullets"!=c.navigationArrows||(d=e.index()-1),d==c.act&&(a=!0),0!=c.transition||a||(c.next=d,j(c,b))})}),e.append('<div class="tpclear"></div>'),p(b,c)},l=function(a,c){function h(b){a.parent().append('<div style="'+e+'" class="tp-'+b+"arrow "+f+" tparrows "+g+'"><div class="tp-arr-allwrapper"><div class="tp-arr-iwrapper"><div class="tp-arr-imgholder"></div><div class="tp-arr-imgholder2"></div><div class="tp-arr-titleholder"></div><div class="tp-arr-subtitleholder"></div></div></div></div>')}var e=(a.find(".tp-bullets"),""),f="hidearrows",g=c.navigationStyle;0==c.hideThumbs&&(f=""),"none"==c.navigationArrows&&(e="visibility:hidden;display:none"),c.soloArrowStyle="default "+c.navigationStyle,"none"!=c.navigationArrows&&"nexttobullets"!=c.navigationArrows&&(g=c.soloArrowStyle),h("left"),h("right"),a.parent().find(".tp-rightarrow").click(function(){0==c.transition&&(a.data("showus")!=b&&a.data("showus")!=-1?c.next=a.data("showus")-1:c.next=c.next+1,a.data("showus",-1),c.next>=c.slideamount&&(c.next=0),c.next<0&&(c.next=0),c.act!=c.next&&j(c,a))}),a.parent().find(".tp-leftarrow").click(function(){0==c.transition&&(c.next=c.next-1,c.leftarrowpressed=1,c.next<0&&(c.next=c.slideamount-1),j(c,a))}),p(a,c)},m=function(c,d){a(document).keydown(function(a){0==d.transition&&39==a.keyCode&&(c.data("showus")!=b&&c.data("showus")!=-1?d.next=c.data("showus")-1:d.next=d.next+1,c.data("showus",-1),d.next>=d.slideamount&&(d.next=0),d.next<0&&(d.next=0),d.act!=d.next&&j(d,c)),0==d.transition&&37==a.keyCode&&(d.next=d.next-1,d.leftarrowpressed=1,d.next<0&&(d.next=d.slideamount-1),j(d,c))}),p(c,d)},n=function(b,c){var d="vertical";"on"==c.touchenabled&&(1==c.drag_block_vertical&&(d="none"),b.swipe({allowPageScroll:d,fingers:c.swipe_min_touches,treshold:c.swipe_treshold,swipe:function(e,f,g,h,i,k){switch(f){case"left":0==c.transition&&(c.next=c.next+1,c.next==c.slideamount&&(c.next=0),j(c,b));break;case"right":0==c.transition&&(c.next=c.next-1,c.leftarrowpressed=1,c.next<0&&(c.next=c.slideamount-1),j(c,b));break;case"up":"none"==d&&a("html, body").animate({scrollTop:b.offset().top+b.height()+"px"});break;case"down":"none"==d&&a("html, body").animate({scrollTop:b.offset().top-a(window).height()+"px"})}}}))},o=function(a,b){var c=a.parent().find(".tp-bullets"),d=a.parent().find(".tparrows");if(null==c){a.append('<div class=".tp-bullets"></div>');var c=a.parent().find(".tp-bullets")}if(null==d){a.append('<div class=".tparrows"></div>');var d=a.parent().find(".tparrows")}if(a.data("hideThumbs",b.hideThumbs),c.addClass("hidebullets"),d.addClass("hidearrows"),W())try{a.hammer().on("touch",function(){a.addClass("hovered"),"on"==b.onHoverStop&&a.trigger("stoptimer"),clearTimeout(a.data("hideThumbs")),c.removeClass("hidebullets"),d.removeClass("hidearrows")}),a.hammer().on("release",function(){a.removeClass("hovered"),a.trigger("starttimer"),a.hasClass("hovered")||c.hasClass("hovered")||a.data("hideThumbs",setTimeout(function(){c.addClass("hidebullets"),d.addClass("hidearrows"),a.trigger("starttimer")},b.hideNavDelayOnMobile))})}catch(a){}else c.hover(function(){b.overnav=!0,"on"==b.onHoverStop&&a.trigger("stoptimer"),c.addClass("hovered"),clearTimeout(a.data("hideThumbs")),c.removeClass("hidebullets"),d.removeClass("hidearrows")},function(){b.overnav=!1,a.trigger("starttimer"),c.removeClass("hovered"),a.hasClass("hovered")||c.hasClass("hovered")||a.data("hideThumbs",setTimeout(function(){c.addClass("hidebullets"),d.addClass("hidearrows")},b.hideThumbs))}),d.hover(function(){b.overnav=!0,"on"==b.onHoverStop&&a.trigger("stoptimer"),c.addClass("hovered"),clearTimeout(a.data("hideThumbs")),c.removeClass("hidebullets"),d.removeClass("hidearrows")},function(){b.overnav=!1,a.trigger("starttimer"),c.removeClass("hovered")}),a.on("mouseenter",function(){a.addClass("hovered"),"on"==b.onHoverStop&&a.trigger("stoptimer"),clearTimeout(a.data("hideThumbs")),c.removeClass("hidebullets"),d.removeClass("hidearrows")}),a.on("mouseleave",function(){a.removeClass("hovered"),a.trigger("starttimer"),a.hasClass("hovered")||c.hasClass("hovered")||a.data("hideThumbs",setTimeout(function(){c.addClass("hidebullets"),d.addClass("hidearrows")},b.hideThumbs))})},p=function(b,c){var d=b.parent(),e=d.find(".tp-bullets");if("thumb"==c.navigationType){e.find(".thumb").each(function(b){var d=a(this);
10328d.css({width:c.thumbWidth*c.bw+"px",height:c.thumbHeight*c.bh+"px"})});var f=e.find(".tp-mask");f.width(c.thumbWidth*c.thumbAmount*c.bw),f.height(c.thumbHeight*c.bh),f.parent().width(c.thumbWidth*c.thumbAmount*c.bw),f.parent().height(c.thumbHeight*c.bh)}var g=d.find(".tp-leftarrow"),h=d.find(".tp-rightarrow");"thumb"==c.navigationType&&"nexttobullets"==c.navigationArrows&&(c.navigationArrows="solo"),"nexttobullets"==c.navigationArrows&&(g.prependTo(e).css({float:"left"}),h.insertBefore(e.find(".tpclear")).css({float:"left"}));var i=0;"on"==c.forceFullWidth&&(i=0-c.container.parent().offset().left);var j=0,k=0;if("on"==c.navigationInGrid&&(j=b.width()>c.startwidth?(b.width()-c.startwidth)/2:0,k=b.height()>c.startheight?(b.height()-c.startheight)/2:0),"none"!=c.navigationArrows&&"nexttobullets"!=c.navigationArrows){var l=c.soloArrowLeftValign,m=c.soloArrowLeftHalign,n=c.soloArrowRightValign,o=c.soloArrowRightHalign,p=c.soloArrowLeftVOffset,q=c.soloArrowLeftHOffset,r=c.soloArrowRightVOffset,s=c.soloArrowRightHOffset;g.css({position:"absolute"}),h.css({position:"absolute"}),"center"==l?g.css({top:"50%",marginTop:p-Math.round(g.innerHeight()/2)+"px"}):"bottom"==l?g.css({top:"auto",bottom:0+p+"px"}):"top"==l&&g.css({bottom:"auto",top:0+p+"px"}),"center"==m?g.css({left:"50%",marginLeft:i+q-Math.round(g.innerWidth()/2)+"px"}):"left"==m?g.css({left:j+q+i+"px"}):"right"==m&&g.css({right:j+q-i+"px"}),"center"==n?h.css({top:"50%",marginTop:r-Math.round(h.innerHeight()/2)+"px"}):"bottom"==n?h.css({top:"auto",bottom:0+r+"px"}):"top"==n&&h.css({bottom:"auto",top:0+r+"px"}),"center"==o?h.css({left:"50%",marginLeft:i+s-Math.round(h.innerWidth()/2)+"px"}):"left"==o?h.css({left:j+s+i+"px"}):"right"==o&&h.css({right:j+s-i+"px"}),null!=g.position()&&g.css({top:Math.round(parseInt(g.position().top,0))+"px"}),null!=h.position()&&h.css({top:Math.round(parseInt(h.position().top,0))+"px"})}"none"==c.navigationArrows&&(g.css({visibility:"hidden"}),h.css({visibility:"hidden"}));var t=c.navigationVAlign,u=c.navigationHAlign,v=c.navigationVOffset*c.bh,w=c.navigationHOffset*c.bw;"center"==t&&e.css({top:"50%",marginTop:v-Math.round(e.innerHeight()/2)+"px"}),"bottom"==t&&e.css({bottom:0+v+"px"}),"top"==t&&e.css({top:0+v+"px"}),"center"==u&&e.css({left:"50%",marginLeft:i+w-Math.round(e.innerWidth()/2)+"px"}),"left"==u&&e.css({left:0+w+i+"px"}),"right"==u&&e.css({right:0+w-i+"px"})},q=function(c){var d=c.container;c.beforli=c.next-1,c.comingli=c.next+1,c.beforli<0&&(c.beforli=c.slideamount-1),c.comingli>=c.slideamount&&(c.comingli=0);var e=d.find(">ul:first-child >li:eq("+c.comingli+")"),f=d.find(">ul:first-child >li:eq("+c.beforli+")"),g=f.find(".defaultimg").attr("src"),h=e.find(".defaultimg").attr("src");c.arr==b&&(c.arr=d.parent().find(".tparrows"),c.rar=d.parent().find(".tp-rightarrow"),c.lar=d.parent().find(".tp-leftarrow"),c.raimg=c.rar.find(".tp-arr-imgholder"),c.laimg=c.lar.find(".tp-arr-imgholder"),c.raimg_b=c.rar.find(".tp-arr-imgholder2"),c.laimg_b=c.lar.find(".tp-arr-imgholder2"),c.ratit=c.rar.find(".tp-arr-titleholder"),c.latit=c.lar.find(".tp-arr-titleholder"));var i=c.arr,j=c.rar,k=c.lar,l=c.raimg,m=c.laimg,n=c.raimg_b,o=c.laimg_b,p=c.ratit,q=c.latit;if(e.data("title")!=b&&p.html(e.data("title")),f.data("title")!=b&&q.html(f.data("title")),j.hasClass("itishovered")&&j.width(p.outerWidth(!0)+parseInt(j.css("minWidth"),0)),k.hasClass("itishovered")&&k.width(q.outerWidth(!0)+parseInt(k.css("minWidth"),0)),i.hasClass("preview2")&&!i.hasClass("hashoveralready"))if(i.addClass("hashoveralready"),W()){var i=a(this),r=i.find(".tp-arr-titleholder");r.addClass("alwayshidden"),punchgs.TweenLite.set(r,{autoAlpha:0})}else i.hover(function(){var b=a(this),c=b.find(".tp-arr-titleholder");a(window).width()>767&&b.width(c.outerWidth(!0)+parseInt(b.css("minWidth"),0)),b.addClass("itishovered")},function(){var b=a(this);b.find(".tp-arr-titleholder");b.css({width:parseInt(b.css("minWidth"),0)}),b.removeClass("itishovered")});f.data("thumb")!=b&&(g=f.data("thumb")),e.data("thumb")!=b&&(h=e.data("thumb")),i.hasClass("preview4")?(n.css({backgroundImage:"url("+h+")"}),o.css({backgroundImage:"url("+g+")"}),punchgs.TweenLite.fromTo(n,.8,{force3D:punchgs.force3d,x:0},{x:-l.width(),ease:punchgs.Power3.easeOut,delay:1,onComplete:function(){l.css({backgroundImage:"url("+h+")"}),punchgs.TweenLite.set(n,{x:0})}}),punchgs.TweenLite.fromTo(o,.8,{force3D:punchgs.force3d,x:0},{x:l.width(),ease:punchgs.Power3.easeOut,delay:1,onComplete:function(){m.css({backgroundImage:"url("+g+")"}),punchgs.TweenLite.set(o,{x:0})}}),punchgs.TweenLite.fromTo(l,.8,{x:0},{force3D:punchgs.force3d,x:-l.width(),ease:punchgs.Power3.easeOut,delay:1,onComplete:function(){punchgs.TweenLite.set(l,{x:0})}}),punchgs.TweenLite.fromTo(m,.8,{x:0},{force3D:punchgs.force3d,x:l.width(),ease:punchgs.Power3.easeOut,delay:1,onComplete:function(){punchgs.TweenLite.set(m,{x:0})}})):(punchgs.TweenLite.to(l,.5,{autoAlpha:0,onComplete:function(){l.css({backgroundImage:"url("+h+")"}),m.css({backgroundImage:"url("+g+")"})}}),punchgs.TweenLite.to(m,.5,{autoAlpha:0,onComplete:function(){punchgs.TweenLite.to(l,.5,{autoAlpha:1,delay:.2}),punchgs.TweenLite.to(m,.5,{autoAlpha:1,delay:.2})}})),j.hasClass("preview4")&&!j.hasClass("hashoveralready")&&(j.addClass("hashoveralready"),j.hover(function(){var b=a(this).find(".tp-arr-iwrapper"),c=a(this).find(".tp-arr-allwrapper");punchgs.TweenLite.fromTo(b,.4,{x:b.width()},{x:0,delay:.3,ease:punchgs.Power3.easeOut,overwrite:"all"}),punchgs.TweenLite.to(c,.2,{autoAlpha:1,overwrite:"all"})},function(){var b=a(this).find(".tp-arr-iwrapper"),c=a(this).find(".tp-arr-allwrapper");punchgs.TweenLite.to(b,.4,{x:b.width(),ease:punchgs.Power3.easeOut,delay:.2,overwrite:"all"}),punchgs.TweenLite.to(c,.2,{delay:.6,autoAlpha:0,overwrite:"all"})}),k.hover(function(){var b=a(this).find(".tp-arr-iwrapper"),c=a(this).find(".tp-arr-allwrapper");punchgs.TweenLite.fromTo(b,.4,{x:0-b.width()},{x:0,delay:.3,ease:punchgs.Power3.easeOut,overwrite:"all"}),punchgs.TweenLite.to(c,.2,{autoAlpha:1,overwrite:"all"})},function(){var b=a(this).find(".tp-arr-iwrapper"),c=a(this).find(".tp-arr-allwrapper");punchgs.TweenLite.to(b,.4,{x:0-b.width(),ease:punchgs.Power3.easeOut,delay:.2,overwrite:"all"}),punchgs.TweenLite.to(c,.2,{delay:.6,autoAlpha:0,overwrite:"all"})}))},r=function(c,d){if(d.container.closest(".forcefullwidth_wrapper_tp_banner").find(".tp-fullwidth-forcer").css({height:d.container.height()}),d.container.closest(".rev_slider_wrapper").css({height:d.container.height()}),d.width=parseInt(d.container.width(),0),d.height=parseInt(d.container.height(),0),d.bw=d.width/d.startwidth,d.bh=d.height/d.startheight,d.bh>d.bw&&(d.bh=d.bw),d.bh<d.bw&&(d.bw=d.bh),d.bw<d.bh&&(d.bh=d.bw),d.bh>1&&(d.bw=1,d.bh=1),d.bw>1&&(d.bw=1,d.bh=1),d.height=Math.round(d.startheight*(d.width/d.startwidth)),d.height>d.startheight&&"on"!=d.autoHeight&&(d.height=d.startheight),"on"==d.fullScreen){d.height=d.bw*d.startheight;var f=(d.container.parent().width(),a(window).height());if(d.fullScreenOffsetContainer!=b){try{var g=d.fullScreenOffsetContainer.split(",");a.each(g,function(b,c){f-=a(c).outerHeight(!0),f<d.minFullScreenHeight&&(f=d.minFullScreenHeight)})}catch(a){}try{d.fullScreenOffset.split("%").length>1&&d.fullScreenOffset!=b&&d.fullScreenOffset.length>0?f-=a(window).height()*parseInt(d.fullScreenOffset,0)/100:d.fullScreenOffset!=b&&d.fullScreenOffset.length>0&&(f-=parseInt(d.fullScreenOffset,0)),f<d.minFullScreenHeight&&(f=d.minFullScreenHeight)}catch(a){}}d.container.parent().height(f),d.container.closest(".rev_slider_wrapper").height(f),d.container.css({height:"100%"}),d.height=f,d.minHeight!=b&&d.height<d.minHeight&&(d.height=d.minHeight)}else d.minHeight!=b&&d.height<d.minHeight&&(d.height=d.minHeight),d.container.height(d.height);d.slotw=Math.ceil(d.width/d.slots),"on"==d.fullScreen?d.sloth=Math.ceil(a(window).height()/d.slots):d.sloth=Math.ceil(d.height/d.slots),"on"==d.autoHeight&&(d.sloth=Math.ceil(c.height()/d.slots))},s=function(c,d){c.find(".tp-caption").each(function(){a(this).addClass(a(this).data("transition")),a(this).addClass("start")}),c.find(">
10328ul:first").css({overflow:"hidden",width:"100%",height:"100%",maxHeight:c.parent().css("maxHeight")}).addClass("tp-revslider-mainul"),"on"==d.autoHeight&&(c.find(">ul:first").css({overflow:"hidden",width:"100%",height:"100%",maxHeight:"none"}),c.css({maxHeight:"none"}),c.parent().css({maxHeight:"none"})),c.find(">ul:first >li").each(function(d){var e=a(this);if(e.addClass("tp-revslider-slidesli"),e.css({width:"100%",height:"100%",overflow:"hidden"}),e.data("link")!=b){var f=e.data("link"),g="_self",h=60;"back"==e.data("slideindex")&&(h=0);var i=checksl=e.data("linktoslide");i!=b&&"next"!=i&&"prev"!=i&&c.find(">ul:first-child >li").each(function(){var b=a(this);b.data("origindex")+1==checksl&&(i=b.index()+1)}),e.data("target")!=b&&(g=e.data("target")),"slide"!=f&&(i="no");var j='<div class="tp-caption sft slidelink" style="width:100%;height:100%;z-index:'+h+';" data-x="center" data-y="center" data-linktoslide="'+i+'" data-start="0"><a style="width:100%;height:100%;display:block"';"slide"!=f&&(j=j+' target="'+g+'" href="'+f+'"'),j+='><span style="width:100%;height:100%;display:block"></span></a></div>',e.append(j)}}),c.parent().css({overflow:"visible"}),c.find(">ul:first >li >img").each(function(c){var e=a(this);e.addClass("defaultimg"),e.data("lazyload")!=b&&1!=e.data("lazydone")||r(e,d),i(8)&&e.data("kenburns","off"),"on"==d.panZoomDisableOnMobile&&W()&&(e.data("kenburns","off"),e.data("bgfit","cover")),e.wrap('<div class="slotholder" style="width:100%;height:100%;"data-duration="'+e.data("duration")+'"data-zoomstart="'+e.data("zoomstart")+'"data-zoomend="'+e.data("zoomend")+'"data-rotationstart="'+e.data("rotationstart")+'"data-rotationend="'+e.data("rotationend")+'"data-ease="'+e.data("ease")+'"data-duration="'+e.data("duration")+'"data-bgpositionend="'+e.data("bgpositionend")+'"data-bgposition="'+e.data("bgposition")+'"data-duration="'+e.data("duration")+'"data-kenburns="'+e.data("kenburns")+'"data-easeme="'+e.data("ease")+'"data-bgfit="'+e.data("bgfit")+'"data-bgfitend="'+e.data("bgfitend")+'"data-owidth="'+e.data("owidth")+'"data-oheight="'+e.data("oheight")+'"></div>'),
10329"none"!=d.dottedOverlay&&d.dottedOverlay!=b&&e.closest(".slotholder").append('<div class="tp-dottedoverlay '+d.dottedOverlay+'"></div>');var f=e.attr("src"),h=(e.data("lazyload"),e.data("bgfit")),j=e.data("bgrepeat"),k=e.data("bgposition");h==b&&(h="cover"),j==b&&(j="no-repeat"),k==b&&(k="center center");var l=e.closest(".slotholder");e.replaceWith('<div class="tp-bgimg defaultimg" data-lazyload="'+e.data("lazyload")+'" data-bgfit="'+h+'"data-bgposition="'+k+'" data-bgrepeat="'+j+'" data-lazydone="'+e.data("lazydone")+'" src="'+f+'" data-src="'+f+'" style="background-color:'+e.css("backgroundColor")+";background-repeat:"+j+";background-image:url("+f+");background-size:"+h+";background-position:"+k+';width:100%;height:100%;"></div>'),i(8)&&(l.find(".tp-bgimg").css({backgroundImage:"none","background-image":"none"}),l.find(".tp-bgimg").append('<img class="ieeightfallbackimage defaultimg" src="'+f+'" style="width:100%">')),e.css({opacity:0}),e.data("li-id",c)})},t=function(a,c,d,e){var f=a,g=f.find(".defaultimg"),h=f.data("zoomstart"),j=f.data("rotationstart");g.data("currotate")!=b&&(j=g.data("currotate")),g.data("curscale")!=b&&"box"==e?h=100*g.data("curscale"):g.data("curscale")!=b&&(h=g.data("curscale")),r(g,c);var k=g.data("src"),l=g.css("backgroundColor"),m=c.width,n=c.height,o=g.data("fxof"),p=0;"on"==c.autoHeight&&(n=c.container.height()),o==b&&(o=0);var q=0,s=g.data("bgfit"),t=g.data("bgrepeat"),v=g.data("bgposition");if(s==b&&(s="cover"),t==b&&(t="no-repeat"),v==b&&(v="center center"),i(8)){f.data("kenburns","off");var w=k;k=""}switch(e){case"box":var x=0,y=0,z=0;if(x=c.sloth>c.slotw?c.sloth:c.slotw,!d)var q=0-x;c.slotw=x,c.sloth=x;var y=0,z=0;"on"==f.data("kenburns")&&(s=h,s.toString().length<4&&(s=X(s,f,c)));for(var A=0;A<c.slots;A++){z=0;for(var B=0;B<c.slots;B++)f.append('<div class="slot" style="position:absolute;top:'+(p+z)+"px;left:"+(o+y)+"px;width:"+x+"px;height:"+x+'px;overflow:hidden;"><div class="slotslide" data-x="'+y+'" data-y="'+z+'" style="position:absolute;top:0px;left:0px;width:'+x+"px;height:"+x+'px;overflow:hidden;"><div style="position:absolute;top:'+(0-z)+"px;left:"+(0-y)+"px;width:"+m+"px;height:"+n+"px;background-color:"+l+";background-image:url("+k+");background-repeat:"+t+";background-size:"+s+";background-position:"+v+';"></div></div></div>'),z+=x,i(8)&&(f.find(".slot ").last().find(".slotslide").append('<img src="'+w+'">
10329'),u(f,c)),h!=b&&j!=b&&punchgs.TweenLite.set(f.find(".slot").last(),{rotationZ:j});y+=x}break;case"vertical":case"horizontal":if("on"==f.data("kenburns")&&(s=h,s.toString().length<4&&(s=X(s,f,c))),"horizontal"==e){if(!d)var q=0-c.slotw;for(var B=0;B<c.slots;B++)f.append('<div class="slot" style="position:absolute;top:'+(0+p)+"px;left:"+(o+B*c.slotw)+"px;overflow:hidden;width:"+(c.slotw+.6)+"px;height:"+n+'px"><div class="slotslide" style="position:absolute;top:0px;left:'+q+"px;width:"+(c.slotw+.6)+"px;height:"+n+'px;overflow:hidden;"><div style="background-color:'+l+";position:absolute;top:0px;left:"+(0-B*c.slotw)+"px;width:"+m+"px;height:"+n+"px;background-image:url("+k+");background-repeat:"+t+";background-size:"+s+";background-position:"+v+';"></div></div></div>'),h!=b&&j!=b&&punchgs.TweenLite.set(f.find(".slot").last(),{rotationZ:j}),i(8)&&(f.find(".slot ").last().find(".slotslide").append('<img class="ieeightfallbackimage" src="'+w+'" style="width:100%;height:auto">'),u(f,c))}else{if(!d)var q=0-c.sloth;for(var B=0;B<c.slots+2;B++)f.append('<div class="slot" style="position:absolute;top:'+(p+B*c.sloth)+"px;left:"+o+"px;overflow:hidden;width:"+m+"px;height:"+c.sloth+'px"><div class="slotslide" style="position:absolute;top:'+q+"px;left:0px;width:"+m+"px;height:"+c.sloth+'px;overflow:hidden;"><div style="background-color:'+l+";position:absolute;top:"+(0-B*c.sloth)+"px;left:0px;width:"+m+"px;height:"+n+"px;background-image:url("+k+");background-repeat:"+t+";background-size:"+s+";background-position:"+v+';"></div></div></div>'),h!=b&&j!=b&&punchgs.TweenLite.set(f.find(".slot").last(),{rotationZ:j}),i(8)&&(f.find(".slot ").last().find(".slotslide").append('<img class="ieeightfallbackimage" src="'+w+'" style="width:100%;height:auto;">'),u(f,c))}}},u=function(a,b){if(i(8)){var c=a.find(".ieeightfallbackimage");c.width(),c.height();b.startwidth/b.startheight<a.data("owidth")/a.data("oheight")?c.css({width:"auto",height:"100%"}):c.css({width:"100%",height:"auto"}),setTimeout(function(){var d=c.width(),e=c.height(),f=a.data("bgposition");"center center"==f&&c.css({position:"absolute",top:b.height/2-e/2+"px",left:b.width/2-d/2+"px"}),"center top"!=f&&"top center"!=f||c.css({position:"absolute",top:"0px",left:b.width/2-d/2+"px"}),"center bottom"!=f&&"bottom center"!=f||c.css({position:"absolute",bottom:"0px",left:b.width/2-d/2+"px"}),"right top"!=f&&"top right"!=f||c.css({position:"absolute",top:"0px",right:"0px"}),"right bottom"!=f&&"bottom right"!=f||c.css({position:"absolute",bottom:"0px",right:"0px"}),"right center"!=f&&"center right"!=f||c.css({position:"absolute",top:b.height/2-e/2+"px",right:"0px"}),"left bottom"!=f&&"bottom left"!=f||c.css({position:"absolute",bottom:"0px",left:"0px"}),"left center"!=f&&"center left"!=f||c.css({position:"absolute",top:b.height/2-e/2+"px",left:"0px"})},20)}},v=function(b,c,d){d.find(".slot").each(function(){a(this).remove()}),c.transition=0},w=function(c,d){c.find("img, .defaultimg").each(function(c){var e=a(this),f=e.data("lazyload");if(f!=e.attr("src")&&d<3&&f!=b&&"undefined"!=f){if(f!=b&&"undefined"!=f){e.attr("src",f);var g=new Image;g.onload=function(a){e.data("lazydone",1),e.hasClass("defaultimg")&&x(e,g)},g.error=function(){e.data("lazydone",1)},g.src=e.attr("src"),g.complete&&(e.hasClass("defaultimg")&&x(e,g),e.data("lazydone",1))}}else if((f===b||"undefined"===f)&&1!=e.data("lazydone")){var g=new Image;g.onload=function(){e.hasClass("defaultimg")&&x(e,g),e.data("lazydone",1)},g.error=function(){e.data("lazydone",1)},e.attr("src")!=b&&"undefined"!=e.attr("src")?g.src=e.attr("src"):g.src=e.data("src"),g.complete&&(e.hasClass("defaultimg")&&x(e,g),e.data("lazydone",1))}})},x=function(a,b){var c=a.closest("li"),d=b.width,e=b.height;c.data("owidth",d),c.data("oheight",e),c.find(".slotholder").data("owidth",d),c.find(".slotholder").data("oheight",e),c.data("loadeddone",1)},y=function(c,d,e){w(c,0);var f=setInterval(function(){e.bannertimeronpause=!0,e.container.trigger("stoptimer"),e.cd=0;var g=0;c.find("img, .defaultimg").each(function(b){1!=a(this).data("lazydone")&&g++}),g>0?w(c,g):(clearInterval(f),d!=b&&d())},100)},z=function(a,c){try{a.find(">ul:first-child >li:eq("+c.act+")")}catch(b){a.find(">ul:first-child >li:eq(1)")}c.lastslide=c.act;var e=a.find(">ul:first-child >li:eq("+c.next+")"),f=e.find(".defaultimg");c.bannertimeronpause=!0,a.trigger("stoptimer"),c.cd=0,f.data("lazyload")!=b&&"undefined"!=f.data("lazyload")&&1!=f.data("lazydone")?(i(8)?f.attr("src",e.find(".defaultimg").data("lazyload")):f.css({backgroundImage:'url("'+e.find(".defaultimg").data("lazyload")+'")'}),f.data("src",e.find(".defaultimg").data("lazyload")),f.data("lazydone",1),f.data("orgw",0),e.data("loadeddone",1),a.find(".tp-loader").css({display:"block"}),y(a.find(".tp-static-layers"),function(){y(e,function(){var b=e.find(".slotholder");if("on"==b.data("kenburns"))var d=setInterval(function(){var e=b.data("owidth");e>=0&&(clearInterval(d),A(c,f,a))},10);else A(c,f,a)},c)},c)):e.data("loadeddone")===b?(e.data("loadeddone",1),y(e,function(){A(c,f,a)},c)):A(c,f,a)},A=function(a,b,c){a.bannertimeronpause=!1,a.cd=0,c.trigger("nulltimer"),c.find(".tp-loader").css({display:"none"}),r(b,a),p(c,a),r(b,a),B(c,a)},B=function(a,c){a.trigger("revolution.slide.onbeforeswap"),c.transition=1,c.videoplaying=!1;try{var d=a.find(">ul:first-child >li:eq("+c.act+")")}catch(b){var d=a.find(">ul:first-child >li:eq(1)")}c.lastslide=c.act;var e=a.find(">ul:first-child >li:eq("+c.next+")");setTimeout(function(){q(c)},200);var f=d.find(".slotholder"),g=e.find(".slotholder");"on"!=g.data("kenburns")&&"on"!=f.data("kenburns")||(_(a,c),a.find(".kenburnimg").remove()),e.data("delay")!=b?(c.cd=0,c.delay=e.data("delay")):c.delay=c.origcd,1==c.firststart&&punchgs.TweenLite.set(d,{autoAlpha:0}),punchgs.TweenLite.set(d,{zIndex:18}),punchgs.TweenLite.set(e,{autoAlpha:0,zIndex:20});var h=0;d.index()!=e.index()&&1!=c.firststart&&(h=R(d,c)),"on"!=d.data("saveperformance")&&(h=0),setTimeout(function(){a.trigger("restarttimer"),C(a,c,e,d,f,g)},h)},C=function(c,d,e,f,g,h){function x(){a.each(o,function(a,b){b[0]!=m&&b[8]!=m||(j=b[1],n=b[2],r=s),s+=1})}"prepared"==e.data("differentissplayed")&&(e.data("differentissplayed","done"),e.data("transition",e.data("savedtransition")),e.data("slotamount",e.data("savedslotamount")),e.data("masterspeed",e.data("savedmasterspeed"))),e.data("fstransition")!=b&&"done"!=e.data("differentissplayed")&&(e.data("savedtransition",e.data("transition")),e.data("savedslotamount",e.data("slotamount")),e.data("savedmasterspeed",e.data("masterspeed")),e.data("transition",e.data("fstransition")),e.data("slotamount",e.data("fsslotamount")),e.data("masterspeed",e.data("fsmasterspeed")),e.data("differentissplayed","prepared")),c.find(".active-revslide").removeClass(".active-revslide"),e.addClass("active-revslide"),e.data("transition")==b&&e.data("transition","random");var j=0,k=e.data("transition").split(","),l=e.data("nexttransid")==b?-1:e.data("nexttransid");"on"==e.data("randomtransition")?l=Math.round(Math.random()*k.length):l+=1,l==k.length&&(l=0),e.data("nexttransid",l);var m=k[l];d.ie&&("boxfade"==m&&(m="boxslide"),"slotfade-vertical"==m&&(m="slotzoom-vertical"),"slotfade-horizontal"==m&&(m="slotzoom-horizontal")),i(8)&&(m=11);var n=0;"scroll"==d.parallax&&d.parallaxFirstGo==b&&(d.parallaxFirstGo=!0,ba(c,d),setTimeout(function(){ba(c,d)},210),setTimeout(function(){ba(c,d)},420)),"slidehorizontal"==m&&(m="slideleft",1==d.leftarrowpressed&&(m="slideright")),"slidevertical"==m&&(m="slideup",1==d.leftarrowpressed&&(m="slidedown")),"parallaxhorizontal"==m&&(m="parallaxtoleft",1==d.leftarrowpressed&&(m="parallaxtoright")),"parallaxvertical"==m&&(m="parallaxtotop",1==d.leftarrowpressed&&(m="parallaxtobottom"));
10329var o=[["boxslide",0,1,10,0,"box",!1,null,0],["boxfade",1,0,10,0,"box",!1,null,1],["slotslide-horizontal",2,0,0,200,"horizontal",!0,!1,2],["slotslide-vertical",3,0,0,200,"vertical",!0,!1,3],["curtain-1",4,3,0,0,"horizontal",!0,!0,4],["curtain-2",5,3,0,0,"horizontal",!0,!0,5],["curtain-3",6,3,25,0,"horizontal",!0,!0,6],["slotzoom-horizontal",7,0,0,400,"horizontal",!0,!0,7],["slotzoom-vertical",8,0,0,0,"vertical",!0,!0,8],["slotfade-horizontal",9,0,0,500,"horizontal",!0,null,9],["slotfade-vertical",10,0,0,500,"vertical",!0,null,10],["fade",11,0,1,300,"horizontal",!0,null,11],["slideleft",12,0,1,0,"horizontal",!0,!0,12],["slideup",13,0,1,0,"horizontal",!0,!0,13],["slidedown",14,0,1,0,"horizontal",!0,!0,14],["slideright",15,0,1,0,"horizontal",!0,!0,15],["papercut",16,0,0,600,"",null,null,16],["3dcurtain-horizontal",17,0,20,100,"vertical",!1,!0,17],["3dcurtain-vertical",18,0,10,100,"horizontal",!1,!0,18],["cubic",19,0,20,600,"horizontal",!1,!0,19],["cube",19,0,20,600,"horizontal",!1,!0,20],["flyin",20,0,4,600,"vertical",!1,!0,21],["turnoff",21,0,1,1600,"horizontal",!1,!0,22],["incube",22,0,20,200,"horizontal",!1,!0,23],["cubic-horizontal",23,0,20,500,"vertical",!1,!0,24],["cube-horizontal",23,0,20,500,"vertical",!1,!0,25],["incube-horizontal",24,0,20,500,"vertical",!1,!0,26],["turnoff-vertical",25,0,1,200,"horizontal",!1,!0,27],["fadefromright",12,1,1,0,"horizontal",!0,!0,28],["fadefromleft",15,1,1,0,"horizontal",!0,!0,29],["fadefromtop",14,1,1,0,"horizontal",!0,!0,30],["fadefrombottom",13,1,1,0,"horizontal",!0,!0,31],["fadetoleftfadefromright",12,2,1,0,"horizontal",!0,!0,32],["fadetorightfadetoleft",15,2,1,0,"horizontal",!0,!0,33],["fadetobottomfadefromtop",14,2,1,0,"horizontal",!0,!0,34],["fadetotopfadefrombottom",13,2,1,0,"horizontal",!0,!0,35],["parallaxtoright",12,3,1,0,"horizontal",!0,!0,36],["parallaxtoleft",15,3,1,0,"horizontal",!0,!0,37],["parallaxtotop",14,3,1,0,"horizontal",!0,!0,38],["parallaxtobottom",13,3,1,0,"horizontal",!0,!0,39],["scaledownfromright",12,4,1,0,"horizontal",!0,!0,40],["scaledownfromleft",15,4,1,0,"horizontal",!0,!0,41],["scaledownfromtop",14,4,1,0,"horizontal",!0,!0,42],["scaledownfrombottom",13,4,1,0,"horizontal",!0,!0,43],["zoomout",13,5,1,0,"horizontal",!0,!0,44],["zoomin",13,6,1,0,"horizontal",!0,!0,45],["notransition",26,0,1,0,"horizontal",!0,null,46]],p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],q=[16,17,18,19,20,21,22,23,24,25,26,27],j=0,n=1,r=0,s=0,u=new Array;"on"==h.data("kenburns")&&("boxslide"!=m&&0!=m&&"boxfade"!=m&&1!=m&&"papercut"!=m&&16!=m||(m=11),Y(c,d,!0,!0)),"random"==m&&(m=Math.round(Math.random()*o.length-1),m>o.length-1&&(m=o.length-1)),"random-static"==m&&(m=Math.round(Math.random()*p.length-1),m>p.length-1&&(m=p.length-1),m=p[m]),"random-premium"==m&&(m=Math.round(Math.random()*q.length-1),m>q.length-1&&(m=q.length-1),m=q[m]);var v=[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==d.isJoomla&&window.MooTools!=b&&v.indexOf(m)!=-1){var w=Math.round(Math.random()*(q.length-2))+1;w>q.length-1&&(w=q.length-1),0==w&&(w=1),m=q[w]}x(),i(8)&&j>15&&j<28&&(m=Math.round(Math.random()*p.length-1),m>p.length-1&&(m=p.length-1),m=p[m],s=0,x());var y=-1;(1==d.leftarrowpressed||d.act>d.next)&&(y=1),d.leftarrowpressed=0,j>26&&(j=26),j<0&&(j=0);var z=300;e.data("masterspeed")!=b&&e.data("masterspeed")>99&&e.data("masterspeed")<d.delay&&(z=e.data("masterspeed")),e.data("masterspeed")!=b&&e.data("masterspeed")>d.delay&&(z=d.delay),u=o[r],c.parent().find(".bullet").each(function(){var b=a(this),c=b.index();b.removeClass("selected"),"withbullet"!=d.navigationArrows&&"nexttobullets"!=d.navigationArrows||(c=b.index()-1),c==d.next&&b.addClass("selected")});var A=new punchgs.TimelineLite({onComplete:function(){D(c,d,h,g,e,f,A)}});if(A.add(punchgs.TweenLite.set(h.find(".defaultimg"),{opacity:0})),A.pause(),e.data("slotamount")==b||e.data("slotamount")<1?(d.slots=Math.round(12*Math.random()+4),"boxslide"==m?d.slots=Math.round(6*Math.random()+3):"flyin"==m&&(d.slots=Math.round(4*Math.random()+1))):d.slots=e.data("slotamount"),e.data("rotate")==b?d.rotate=0:999==e.data("rotate")?d.rotate=Math.round(360*Math.random()):d.rotate=e.data("rotate"),(!a.support.transition||d.ie||d.ie9)&&(d.rotate=0),1==d.firststart&&(d.firststart=0),z+=u[4],(4==j||5==j||6==j)&&d.slots<3&&(d.slots=3),0!=u[3]&&(d.slots=Math.min(d.slots,u[3])),9==j&&(d.slots=d.width/20),10==j&&(d.slots=d.height/20),null!=u[7]&&t(g,d,u[7],u[5]),null!=u[6]&&t(h,d,u[6],u[5]),0==j){var B=Math.ceil(d.height/d.sloth),C=0;h.find(".slotslide").each(function(b){var c=a(this);C+=1,C==B&&(C=0),A.add(punchgs.TweenLite.from(c,z/600,{opacity:0,top:0-d.sloth,left:0-d.slotw,rotation:d.rotate,force3D:"auto",ease:punchgs.Power2.easeOut}
10329),(15*b+30*C)/1500)})}if(1==j){var E,F=0;h.find(".slotslide").each(function(b){var c=a(this),e=Math.random()*z+300,f=500*Math.random()+200;e+f>E&&(E=f+f,F=b),A.add(punchgs.TweenLite.from(c,e/1e3,{autoAlpha:0,force3D:"auto",rotation:d.rotate,ease:punchgs.Power2.easeInOut}),f/1e3)})}if(2==j){var G=new punchgs.TimelineLite;g.find(".slotslide").each(function(){var b=a(this);G.add(punchgs.TweenLite.to(b,z/1e3,{left:d.slotw,force3D:"auto",rotation:0-d.rotate}),0),A.add(G,0)}),h.find(".slotslide").each(function(){var b=a(this);G.add(punchgs.TweenLite.from(b,z/1e3,{left:0-d.slotw,force3D:"auto",rotation:d.rotate}),0),A.add(G,0)})}if(3==j){var G=new punchgs.TimelineLite;g.find(".slotslide").each(function(){var b=a(this);G.add(punchgs.TweenLite.to(b,z/1e3,{top:d.sloth,rotation:d.rotate,force3D:"auto",transformPerspective:600}),0),A.add(G,0)}),h.find(".slotslide").each(function(){var b=a(this);G.add(punchgs.TweenLite.from(b,z/1e3,{top:0-d.sloth,rotation:d.rotate,ease:punchgs.Power2.easeOut,force3D:"auto",transformPerspective:600}),0),A.add(G,0)})}if(4==j||5==j){setTimeout(function(){g.find(".defaultimg").css({opacity:0})},100);var H=z/1e3,G=new punchgs.TimelineLite;g.find(".slotslide").each(function(b){var c=a(this),e=b*H/d.slots;5==j&&(e=(d.slots-b-1)*H/d.slots/1.5),G.add(punchgs.TweenLite.to(c,3*H,{transformPerspective:600,force3D:"auto",top:0+d.height,opacity:.5,rotation:d.rotate,ease:punchgs.Power2.easeInOut,delay:e}),0),A.add(G,0)}),h.find(".slotslide").each(function(b){var c=a(this),e=b*H/d.slots;5==j&&(e=(d.slots-b-1)*H/d.slots/1.5),G.add(punchgs.TweenLite.from(c,3*H,{top:0-d.height,opacity:.5,rotation:d.rotate,force3D:"auto",ease:punchgs.Power2.easeInOut,delay:e}),0),A.add(G,0)})}if(6==j){d.slots<2&&(d.slots=2),d.slots%2&&(d.slots=d.slots+1);var G=new punchgs.TimelineLite;setTimeout(function(){g.find(".defaultimg").css({opacity:0})},100),g.find(".slotslide").each(function(b){var c=a(this);if(b+1<d.slots/2)var e=90*(b+2);else var e=90*(2+d.slots-b);G.add(punchgs.TweenLite.to(c,(z+e)/1e3,{top:0+d.height,opacity:1,force3D:"auto",rotation:d.rotate,ease:punchgs.Power2.easeInOut}),0),A.add(G,0)}),h.find(".slotslide").each(function(b){var c=a(this);if(b+1<d.slots/2)var e=90*(b+2);else var e=90*(2+d.slots-b);G.add(punchgs.TweenLite.from(c,(z+e)/1e3,{top:0-d.height,opacity:1,force3D:"auto",rotation:d.rotate,ease:punchgs.Power2.easeInOut}),0),A.add(G,0)})}if(7==j){z*=2,z>d.delay&&(z=d.delay);var G=new punchgs.TimelineLite;setTimeout(function(){g.find(".defaultimg").css({opacity:0})},100),g.find(".slotslide").each(function(){var b=a(this).find("div");G.add(punchgs.TweenLite.to(b,z/1e3,{left:0-d.slotw/2+"px",top:0-d.height/2+"px",width:2*d.slotw+"px",height:2*d.height+"px",opacity:0,rotation:d.rotate,force3D:"auto",ease:punchgs.Power2.easeOut}),0),A.add(G,0)}),h.find(".slotslide").each(function(b){var c=a(this).find("div");G.add(punchgs.TweenLite.fromTo(c,z/1e3,{left:0,top:0,opacity:0,transformPerspective:600},{left:0-b*d.slotw+"px",ease:punchgs.Power2.easeOut,force3D:"auto",top:"0px",width:d.width,height:d.height,opacity:1,rotation:0,delay:.1}),0),A.add(G,0)})}if(8==j){z*=3,z>d.delay&&(z=d.delay);var G=new punchgs.TimelineLite;g.find(".slotslide").each(function(){var b=a(this).find("div");G.add(punchgs.TweenLite.to(b,z/1e3,{left:0-d.width/2+"px",top:0-d.sloth/2+"px",width:2*d.width+"px",height:2*d.sloth+"px",force3D:"auto",opacity:0,rotation:d.rotate}),0),A.add(G,0)}),h.find(".slotslide").each(function(b){var c=a(this).find("div");G.add(punchgs.TweenLite.fromTo(c,z/1e3,{left:0,top:0,opacity:0,force3D:"auto"},{left:"0px",top:0-b*d.sloth+"px",width:h.find(".defaultimg").data("neww")+"px",height:h.find(".defaultimg").data("newh")+"px",opacity:1,rotation:0}),0),A.add(G,0)})}if(9==j||10==j){var J=0;h.find(".slotslide").each(function(b){var c=a(this);J++,A.add(punchgs.TweenLite.fromTo(c,z/1e3,{autoAlpha:0,force3D:"auto",transformPerspective:600},{autoAlpha:1,ease:punchgs.Power2.easeInOut,delay:5*b/1e3}),0)})}if(11==j||26==j){var J=0;26==j&&(z=0),h.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.from(c,z/1e3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power2.easeInOut}),0)})}if(12==j||13==j||14==j||15==j){z=z,z>d.delay&&(z=d.delay),setTimeout(function(){punchgs.TweenLite.set(g.find(".defaultimg"),{autoAlpha:0})},100);var K=d.width,M=d.height,N=h.find(".slotslide"),O=0,P=0,Q=1,R=1,S=1,T=punchgs.Power2.easeInOut,U=punchgs.Power2.easeInOut,V=z/1e3,W=V;"on"!=d.fullWidth&&"on"!=d.fullScreen||(K=N.width(),M=N.height()),12==j?O=K:15==j?O=0-K:13==j?P=M:14==j&&(P=0-M),1==n&&(Q=0),2==n&&(Q=0),3==n&&(T=punchgs.Power2.easeInOut,U=punchgs.Power1.easeInOut,V=z/1200),4!=n&&5!=n||(R=.6),6==n&&(R=1.4),5!=n&&6!=n||(S=1.4,Q=0,K=0,M=0,O=0,P=0),6==n&&(S=.6);A.add(punchgs.TweenLite.from(N,V,{left:O,top:P,scale:S,opacity:Q,rotation:d.rotate,ease:U,force3D:"auto"}),0);var Z=g.find(".slotslide");if(4!=n&&5!=n||(K=0,M=0),1!=n)switch(j){case 12:A.add(punchgs.TweenLite.to(Z,W,{left
vendor: 5,193 bytes, line 10329
10329:0-K+"px",force3D:"auto",scale:R,opacity:Q,rotation:d.rotate,ease:T}),0);break;case 15:A.add(punchgs.TweenLite.to(Z,W,{left:K+"px",force3D:"auto",scale:R,opacity:Q,rotation:d.rotate,ease:T}),0);break;case 13:A.add(punchgs.TweenLite.to(Z,W,{top:0-M+"px",force3D:"auto",scale:R,opacity:Q,rotation:d.rotate,ease:T}),0);break;case 14:A.add(punchgs.TweenLite.to(Z,W,{top:M+"px",force3D:"auto",scale:R,opacity:Q,rotation:d.rotate,ease:T}),0)}}if(16==j){var G=new punchgs.TimelineLite;A.add(punchgs.TweenLite.set(f,{position:"absolute","z-index":20}),0),A.add(punchgs.TweenLite.set(e,{position:"absolute","z-index":15}),0),f.wrapInner('<div class="tp-half-one" style="position:relative; width:100%;height:100%"></div>'),f.find(".tp-half-one").clone(!0).appendTo(f).addClass("tp-half-two"),f.find(".tp-half-two").removeClass("tp-half-one");var K=d.width,M=d.height;"on"==d.autoHeight&&(M=c.height()),f.find(".tp-half-one .defaultimg").wrap('<div class="tp-papercut" style="width:'+K+"px;height:"+M+'px;"></div>'),f.find(".tp-half-two .defaultimg").wrap('<div class="tp-papercut" style="width:'+K+"px;height:"+M+'px;"></div>'),f.find(".tp-half-two .defaultimg").css({position:"absolute",top:"-50%"}),f.find(".tp-half-two .tp-caption").wrapAll('<div style="position:absolute;top:-50%;left:0px;"></div>'),A.add(punchgs.TweenLite.set(f.find(".tp-half-two"),{width:K,height:M,overflow:"hidden",zIndex:15,position:"absolute",top:M/2,left:"0px",transformPerspective:600,transformOrigin:"center bottom"}),0),A.add(punchgs.TweenLite.set(f.find(".tp-half-one"),{width:K,height:M/2,overflow:"visible",zIndex:10,position:"absolute",top:"0px",left:"0px",transformPerspective:600,transformOrigin:"center top"}),0);var _=(f.find(".defaultimg"),Math.round(20*Math.random()-10)),aa=Math.round(20*Math.random()-10),ca=Math.round(20*Math.random()-10),da=.4*Math.random()-.2,ea=.4*Math.random()-.2,fa=1*Math.random()+1,ga=1*Math.random()+1,ha=.3*Math.random()+.3;A.add(punchgs.TweenLite.set(f.find(".tp-half-one"),{overflow:"hidden"}),0),A.add(punchgs.TweenLite.fromTo(f.find(".tp-half-one"),z/800,{width:K,height:M/2,position:"absolute",top:"0px",left:"0px",force3D:"auto",transformOrigin:"center top"},{scale:fa,rotation:_,y:0-M-M/4,autoAlpha:0,ease:punchgs.Power2.easeInOut}),0),A.add(punchgs.TweenLite.fromTo(f.find(".tp-half-two"),z/800,{width:K,height:M,overflow:"hidden",position:"absolute",top:M/2,left:"0px",force3D:"auto",transformOrigin:"center bottom"},{scale:ga,rotation:aa,y:M+M/4,ease:punchgs.Power2.easeInOut,autoAlpha:0,onComplete:function(){punchgs.TweenLite.set(f,{position:"absolute","z-index":15}),punchgs.TweenLite.set(e,{position:"absolute","z-index":20}),f.find(".tp-half-one").length>0&&(f.find(".tp-half-one .defaultimg").unwrap(),f.find(".tp-half-one .slotholder").unwrap()),f.find(".tp-half-two").remove()}}),0),G.add(punchgs.TweenLite.set(h.find(".defaultimg"),{autoAlpha:1}),0),null!=f.html()&&A.add(punchgs.TweenLite.fromTo(e,(z-200)/1e3,{scale:ha,x:d.width/4*da,y:M/4*ea,rotation:ca,force3D:"auto",transformOrigin:"center center",ease:punchgs.Power2.easeOut},{autoAlpha:1,scale:1,x:0,y:0,rotation:0}),0),A.add(G,0)}if(17==j&&h.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/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:punchgs.Power3.easeOut,delay:.06*b}),0)}),18==j&&h.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/500,{autoAlpha:0,rotationY:310,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:punchgs.Power3.easeOut,delay:.06*b}),0)}),19==j||22==j){var G=new punchgs.TimelineLite;A.add(punchgs.TweenLite.set(f,{zIndex:20}),0),A.add(punchgs.TweenLite.set(e,{zIndex:20}),0),setTimeout(function(){g.find(".defaultimg").css({opacity:0})},100);var ka=(e.css("z-index"),f.css("z-index"),90),Q=1,la="center center ";1==y&&(ka=-90),19==j?(la=la+"-"+d.height/2,Q=0):la+=d.height/2,punchgs.TweenLite.set(c,{transformStyle:"flat",backfaceVisibility:"hidden",transformPerspective:600}),h.find(".slotslide").each(function(b){var c=a(this);G.add(punchgs.TweenLite.fromTo(c,z/1e3,{transformStyle:"flat",backfaceVisibility:"hidden",left:0,rotationY:d.rotate,z:10,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationX:ka},{left:0,rotationY:0,top:0,z:0,scale:1,force3D:"auto",rotationX:0,delay:50*b/1e3,ease:punchgs.Power2.easeInOut}),0),G.add(punchgs.TweenLite.to(c,.1,{autoAlpha:1,delay:50*b/1e3}),0),A.add(G)}),g.find(".slotslide").each(function(b){var c=a(this),e=-90;1==y&&(e=90),G.add(punchgs.TweenLite.fromTo(c,z/1e3,{transformStyle:"flat",backfaceVisibility:"hidden",autoAlpha:1,rotationY:0,top:0,z:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationX:0},{autoAlpha:1,rotationY:d.rotate,top:0,z:10,scale:1,rotationX:e,delay:50*b/1e3,force3D:"auto",ease:punchgs.Power2.easeInOut}),0),A.add(G)})}if(20==j){setTimeout(function(){g.find(".defaultimg").css({opacity:0}
10329)},100);e.css("z-index"),f.css("z-index");if(1==y)var ma=-d.width,ka=70,la="left center -"+d.height/2;else var ma=d.width,ka=-70,la="right center -"+d.height/2;h.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/1500,{left:ma,rotationX:40,z:-600,opacity:Q,top:0,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationY:ka},{left:0,delay:50*b/1e3,ease:punchgs.Power2.easeInOut}),0),A.add(punchgs.TweenLite.fromTo(c,z/1e3,{rotationX:40,z:-600,opacity:Q,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationY:ka},{rotationX:0,opacity:1,top:0,z:0,scale:1,rotationY:0,delay:50*b/1e3,ease:punchgs.Power2.easeInOut}),0),A.add(punchgs.TweenLite.to(c,.1,{opacity:1,force3D:"auto",delay:50*b/1e3+z/2e3}),0)}),g.find(".slotslide").each(function(b){var c=a(this);if(1!=y)var e=-d.width,f=70,g="left center -"+d.height/2;else var e=d.width,f=-70,g="right center -"+d.height/2;A.add(punchgs.TweenLite.fromTo(c,z/1e3,{opacity:1,rotationX:0,top:0,z:0,scale:1,left:0,force3D:"auto",transformPerspective:600,transformOrigin:g,rotationY:0},{opacity:1,rotationX:40,top:0,z:-600,left:e,force3D:"auto",scale:.8,rotationY:f,delay:50*b/1e3,ease:punchgs.Power2.easeInOut}),0),A.add(punchgs.TweenLite.to(c,.1,{force3D:"auto",opacity:0,delay:50*b/1e3+(z/1e3-z/1e4)}),0)})}if(21==j||25==j){setTimeout(function(){g.find(".defaultimg").css({opacity:0})},100);var ka=(e.css("z-index"),f.css("z-index"),90),ma=-d.width,na=-ka;if(1==y)if(25==j){var la="center top 0";ka=d.rotate}else{var la="left center 0";na=d.rotate}else if(ma=d.width,ka=-90,25==j){var la="center bottom 0";na=-ka,ka=d.rotate}else{var la="right center 0";na=d.rotate}h.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/1e3,{left:0,transformStyle:"flat",rotationX:na,z:0,autoAlpha:0,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationY:ka},{left:0,rotationX:0,top:0,z:0,autoAlpha:1,scale:1,rotationY:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),0)}),1!=y?(ma=-d.width,ka=90,25==j?(la="center top 0",na=-ka,ka=d.rotate):(la="left center 0",na=d.rotate)):(ma=d.width,ka=-90,25==j?(la="center bottom 0",na=-ka,ka=d.rotate):(la="right center 0",na=d.rotate)),g.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/1e3,{left:0,transformStyle:"flat",rotationX:0,z:0,autoAlpha:1,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationY:0},{left:0,rotationX:na,top:0,z:0,autoAlpha:1,force3D:"auto",scale:1,rotationY:ka,ease:punchgs.Power1.easeInOut}),0)})}if(23==j||24==j){setTimeout(function(){g.find(".defaultimg").css({opacity:0})},100);var ka=(e.css("z-index"),f.css("z-index"),-90),Q=1,oa=0;if(1==y&&(ka=90),23==j){var la="center center -"+d.width/2;Q=0}else var la="center center "+d.width/2;punchgs.TweenLite.set(c,{transformStyle:"preserve-3d",backfaceVisibility:"hidden",perspective:2500}),h.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/1e3,{left:oa,rotationX:d.rotate,force3D:"auto",opacity:Q,top:0,scale:1,transformPerspective:600,transformOrigin:la,rotationY:ka},{left:0,rotationX:0,autoAlpha:1,top:0,z:0,scale:1,rotationY:0,delay:50*b/500,ease:punchgs.Power2.easeInOut}),0)}),ka=90,1==y&&(ka=-90),g.find(".slotslide").each(function(b){var c=a(this);A.add(punchgs.TweenLite.fromTo(c,z/1e3,{left:0,autoAlpha:1,rotationX:0,top:0,z:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:la,rotationY:0},{left:oa,autoAlpha:1,rotationX:d.rotate,top:0,scale:1,rotationY:ka,delay:50*b/500,ease:punchgs.Power2.easeInOut}),0)})}A.pause(),L(e,d,null,A),punchgs.TweenLite.to(e,.001,{autoAlpha:1});var pa={};pa.slideIndex=d.next+1,pa.slide=e,c.trigger("revolution.slide.onchange",pa),setTimeout(function(){c.trigger("revolution.slide.onafterswap")},z),c.trigger("revolution.slide.onvideostop")},D=function(a,b,c,d,e,f,g){punchgs.TweenLite.to(c.find(".defaultimg"),.001,{autoAlpha:1,onComplete:function(){v(a,b,e)}}),e.index()!=f.index()&&punchgs.TweenLite.to(f,.2,{autoAlpha:0,onComplete:function(){v(a,b,f)}}),b.act=b.next,"thumb"==b.navigationType&&da(a),"on"==c.data("kenburns")&&Y(a,b),a.find(".current-sr-slide-visible").removeClass("current-sr-slide-visible"),e.addClass("current-sr-slide-visible"),"scroll"!=b.parallax&&"scroll+mouse"!=b.parallax&&"mouse+scroll"!=b.parallax||ba(a,b),g.clear()},E=function(b){var c=b.target.getVideoEmbedCode(),d=a("#"+c.split('id="')[1].split('"')[0]),e=d.closest(".tp-simpleresponsive"),f=d.parent().data("player");if(b.data==YT.PlayerState.PLAYING){var g=e.find(".tp-bannertimer"),h=g.data("opt");"mute"==d.closest(".tp-caption").data("volume")&&f.mute(),h.videoplaying=!0,e.trigger("stoptimer"),e.trigger("revolution.slide.onvideoplay")}else{var g=e.find(".tp-bannertimer"),h=g.data("opt");b.data!=-1&&3!=b.data&&(h.videoplaying=!1,e.trigger("starttimer"),e.trigger("revolution.slide.onvideostop")),0==b.data&&1==h.nextslideatend?h.container.revnext():(h.videoplaying=!1,e.trigger("starttimer"),e.trigger("revolution.slide.onvideostop"))}},F=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent(b,c,!1)},G=function(b,c){var d=$f(b),e=a("#"+b),f=e.closest(".tp-simpleresponsive"),g=e.closest(".tp-caption");setTimeout(function(){d.addEvent("ready",function(b){c&&d.api("play"),d.addEvent("play",function(a){var b=f.find(".tp-bannertimer"),c=b.data("opt");c.videoplaying=!0,f.trigger("stoptimer"),"mute"==g.data("volume")&&d.api("setVolume","0")}),d.addEvent("finish",function(a){var b=f.find(".tp-bannertimer"),c=b.data("opt");c.videoplaying=!1,f.trigger("starttimer"),f.trigger("revolution.slide.onvideoplay"),
103291==c.nextslideatend&&c.container.revnext()}),d.addEvent("pause",function(a){var b=f.find(".tp-bannertimer"),c=b.data("opt");c.videoplaying=!1,f.trigger("starttimer"),f.trigger("revolution.slide.onvideostop")}),g.find(".tp-thumb-image").click(function(){punchgs.TweenLite.to(a(this),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),d.api("play")})})},150)},H=function(a,c){var d=c.width(),e=c.height(),f=a.data("mediaAspect");f==b&&(f=1);var g=d/e;a.css({position:"absolute"});a.find("video");g<f?punchgs.TweenLite.to(a,1e-4,{width:e*f,force3D:"auto",top:0,left:0-(e*f-d)/2,height:e}):punchgs.TweenLite.to(a,1e-4,{width:d,force3D:"auto",top:0-(d/f-e)/2,left:0,height:d/f})},I=function(){var a=new Object;return a.x=0,a.y=0,a.rotationX=0,a.rotationY=0,a.rotationZ=0,a.scale=1,a.scaleX=1,a.scaleY=1,a.skewX=0,a.skewY=0,a.opacity=0,a.transformOrigin="center, center",a.transformPerspective=400,a.rotation=0,a},J=function(b,c){var d=c.split(";");return a.each(d,function(a,c){c=c.split(":");var d=c[0],e=c[1];"rotationX"==d&&(b.rotationX=parseInt(e,0)),"rotationY"==d&&(b.rotationY=parseInt(e,0)),"rotationZ"==d&&(b.rotationZ=p
10329arseInt(e,0)),"rotationZ"==d&&(b.rotation=parseInt(e,0)),"scaleX"==d&&(b.scaleX=parseFloat(e)),"scaleY"==d&&(b.scaleY=parseFloat(e)),"opacity"==d&&(b.opacity=parseFloat(e)),
10330"skewX"==d&&(b.skewX=parseInt(e,0)),"skewY"==d&&(b.skewY=parseInt(e,0)),"x"==d&&(b.x=parseInt(e,0)),"y"==d&&(b.y=parseInt(e,0)),"z"==d&&(b.z=parseInt(e,0)),"transformOrigin"==d&&(b.transformOrigin=e.toString()),"transformPerspective"==d&&(b.transformPerspective=parseInt(e,0))}),b},K=function(b){var c=b.split("animation:"),d=new Object;d.animation=J(I(),c[1]);var e=c[0].split(";");return a.each(e,function(a,b){b=b.split(":");var c=b[0],e=b[1];"typ"==c&&(d.typ=e),"speed"==c&&(d.speed=parseInt(e,0)/1e3),"start"==c&&(d.start=parseInt(e,0)/1e3),"elementdelay"==c&&(d.elementdelay=parseFloat(e)),"ease"==c&&(d.ease=e)}),d},L=function(c,d,e,f){function g(){}function h(){}c.data("ctl")==b&&c.data("ctl",new punchgs.TimelineLite);var j=c.data("ctl"),k=0,l=0,m=c.find(".tp-caption"),n=d.container.find(".tp-static-layers").find(".tp-caption");j.pause(),a.each(n,function(a,b){m.push(b)}),m.each(function(c){var f=e,j=-1,m=a(this);if(m.hasClass("tp-static-layer")){var n=m.data("startslide"),o=m.data("endslide");n!=-1&&"-1"!=n||m.data("startslide",0),o!=-1&&"-1"!=o||m.data("endslide",d.slideamount),0==n&&o==d.slideamount-1&&m.data("endslide",d.slideamount+1),n=m.data("startslide"),o=m.data("endslide"),m.hasClass("tp-is-shown")?j=o==d.next||n>d.next||o<d.next?2:0:n<=d.next&&o>=d.next||n==d.next||o==d.next?(m.addClass("tp-is-shown"),j=1):j=0}k=d.width/2-d.startwidth*d.bw/2;var p=d.bw;d.bh;"on"==d.fullScreen&&(l=d.height/2-d.startheight*d.bh/2),("on"==d.autoHeight||d.minHeight!=b&&d.minHeight>0)&&(l=d.container.height()/2-d.startheight*d.bh/2),l<0&&(l=0);var r=0;if(d.width<d.hideCaptionAtLimit&&"on"==m.data("captionhidden")?(m.addClass("tp-hidden-caption"),r=1):d.width<d.hideAllCaptionAtLimit||d.width<d.hideAllCaptionAtLilmit?(m.addClass("tp-hidden-caption"),r=1):m.removeClass("tp-hidden-caption"),0==r){if(m.data("linktoslide")==b||m.hasClass("hasclicklistener")||(m.addClass("hasclicklistener"),m.css({cursor:"pointer"}),"no"!=m.data("linktoslide")&&m.click(function(){var b=a(this),c=b.data("linktoslide");"next"!=c&&"prev"!=c?(d.container.data("showus",c),d.container.parent().find(".tp-rightarrow").click()):"next"==c?d.container.parent().find(".tp-rightarrow").click():"prev"==c&&d.container.parent().find(".tp-leftarrow").click()})),k<0&&(k=0),m.hasClass("tp-videolayer")||m.find("iframe").length>0||m.find("video").length>0){var s="iframe"+Math.round(1e5*Math.random()+1),t=m.data("videowidth"),u=m.data("videoheight"),v=m.data("videoattributes"),w=m.data("ytid"),x=m.data("vimeoid"),y=m.data("videpreload"),z=m.data("videomp4"),A=m.data("videowebm"),B=m.data("videoogv"),C=m.data("videocontrols"),D="http",L="loop"==m.data("videoloop")?"loop":"loopandnoslidestop"==m.data("videoloop")?"loop":"";if(m.data("thumbimage")!=b&&m.data("videoposter")==b&&m.data("videoposter",m.data("thumbimage")),w!=b&&String(w).length>1&&0==m.find("iframe").length&&(D="https","none"==C&&(v=v.replace("controls=1","controls=0"),v.toLowerCase().indexOf("controls")==-1&&(v+="&controls=0")),m.append('<iframe style="visible:hidden" src="'+D+"://www.youtube.com/embed/"+w+"?"+v+'" width="'+t+'" height="'+u+'" style="width:'+t+"px;height:"+u+'px"></iframe>')),x!=b&&String(x).length>1&&0==m.find("iframe").length&&("https:"===location.protocol&&(D="https"),m.append('<iframe style="visible:hidden" src="'+D+"://player.vimeo.com/video/"+x+"?"+v+'" width="'+t+'" height="'+u+'" style="width:'+t+"px;height:"+u+'px"></iframe>')),(z!=b||A!=b)&&0==m.find("video").length){"controls"!=C&&(C="");var N='<video style="visible:hidden" class="" '+L+' preload="'+y+'" width="'+t+'" height="'+u+'"';m.data("videoposter")!=b&&m.data("videoposter")!=b&&(N=N+'poster="'+m.data("videoposter")+'">'),A!=b&&"firefox"==M().toLowerCase()&&(N=N+'<source src="'+A+'" type="video/webm" />'),z!=b&&(N=N+'<source src="'+z+'" type="video/mp4" />'),B!=b&&(N=N+'<source src="'+B+'" type="video/ogg" />'),N+="</video>",m.append(N),"controls"==C&&m.append('<div class="tp-video-controls"><div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-play-pause">Play</button></div><div class="tp-video-seek-bar-wrap">
10330<input  type="range" class="tp-seek-bar" value="0"></div><div class="tp-video-button-wrap"><button  type="button" class="tp-video-button tp-vid-mute">Mute</button></div><div class="tp-video-vol-bar-wrap"><input  type="range" class="tp-volume-bar" min="0" max="1" step="0.1" value="1"></div><div class="tp-video-button-wrap"><button  type="button" class="tp-video-button tp-vid-full-screen">Full-Screen</button></div></div>')}var R=!1;1!=m.data("autoplayonlyfirsttime")&&"true"!=m.data("autoplayonlyfirsttime")&&1!=m.data("autoplay")||(m.data("autoplay",!0),R=!0),m.find("iframe").each(function(){var c=a(this);if(punchgs.TweenLite.to(c,.1,{autoAlpha:1,zIndex:0,transformStyle:"preserve-3d",z:0,rotationX:0,force3D:"auto"}),W()){var g=c.attr("src");c.attr("src",""),c.attr("src",g)}if(d.nextslideatend=m.data("nextslideatend"),m.data("videoposter")!=b&&m.data("videoposter").length>2&&1!=m.data("autoplay")&&!f&&(0==m.find(".tp-thumb-image").length?m.append('<div class="tp-thumb-image" style="cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url('+m.data("videoposter")+'); background-size:cover"></div>'):punchgs.TweenLite.set(m.find(".tp-thumb-image"),{autoAlpha:1})),c.attr("src").toLowerCase().indexOf("youtube")>=0)if(c.hasClass("HasListener")){if(!e){var h=m.data("player");"on"!=m.data("forcerewind")||W()||h.seekTo(0),(!W()&&1==m.data("autoplay")||R)&&m.data("timerplay",setTimeout(function(){h.playVideo()},m.data("start")))}}else try{c.attr("id",s);var h,i=setInterval(function(){YT!=b&&typeof YT.Player!=b&&"undefined"!=typeof YT.Player&&(h=new YT.Player(s,{events:{onStateChange:E,onReady:function(c){var d=c.target.getVideoEmbedCode(),e=a("#"+d.split('id="')[1].split('"')[0]),f=e.closest(".tp-caption"),g=f.data("videorate");f.data("videostart");g!=b&&c.target.setPlaybackRate(parseFloat(g)),(!W()&&1==f.data("autoplay")||R)&&f.data("timerplay",setTimeout(function(){c.target.playVideo()},f.data("start"))),f.find(".tp-thumb-image").click(function(){punchgs.TweenLite.to(a(this),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),W()||h.playVideo()})}}})),c.addClass("HasListener"),m.data("player",h),clearInterval(i)},100)}catch(a){}else if(c.attr("src").toLowerCase().indexOf("vimeo")>=0)if(c.hasClass("HasListener")){if(!(e||W()||1!=m.data("autoplay")&&"on"!=m.data("forcerewind"))){var c=m.find("iframe"),q=c.attr("id"),r=$f(q);"on"==m.data("forcerewind")&&r.api("seekTo",0),m.data("timerplay",setTimeout(function(){1==m.data("autoplay")&&r.api("play")},m.data("start")))}}else{c.addClass("HasListener"),c.attr("id",s);for(var o,j=c.attr("src"),k={},l=j,n=/([^&=]+)=([^&]*)/g;o=n.exec(l);)k[decodeURIComponent(o[1])]=decodeURIComponent(o[2]);j=k.player_id!=b?j.replace(k.player_id,s):j+"&player_id="+s;try{j=j.replace("api=0","api=1")}catch(a){}j+="&api=1",c.attr("src",j);var h=m.find("iframe")[0],p=setInterval(function(){$f!=b&&typeof $f(s).api!=b&&"undefined"!=typeof $f(s).api&&($f(h).addEvent("ready",function(){G(s,R)}),clearInterval(p))},100)}}),(W()&&1==m.data("disablevideoonmobile")||i(8))&&m.find("video").remove(),m.find("video").length>0&&m.find("video").each(function(c){var e=this,f=a(this);f.parent().hasClass("html5vid")||f.wrap('<div class="html5vid" style="position:relative;top:0px;left:0px;width:auto;height:auto"></div>');var g=f.parent();F(e,"loadedmetadata",function(a){a.data("metaloaded",1)}(g)),clearInterval(g.data("interval")),g.data("interval",setInterval(function(){if(1==g.data("metaloaded")||NaN!=e.duration){if(clearInterval(g.data("interval")),!g.hasClass("HasListener")){g.addClass("HasListener"),"none"!=m.data("dottedoverlay")&&m.data("dottedoverlay")!=b&&1!=m.find(".tp-dottedoverlay").length&&g.append('<div class="tp-dottedoverlay '+m.data("dottedoverlay")+'"></div>'),f.attr("control")==b&&(0==g.find(".tp-video-play-button").length&&g.append('<div class="tp-video-play-button"><i class="revicon-right-dir"></i><div class="tp-revstop"></div></div>'),g.find("video, .tp-poster, .tp-video-play-button").click(function(){g.hasClass("videoisplaying")?e.pause():e.play()})),(1==m.data("forcecover")||m.hasClass("fullscreenvideo"))&&(1==m.data("forcecover")&&(H(g,d.container),g.addClass("fullcoveredvideo"),m.addClass("fullcoveredvideo")),g.css({width:"100%",height:"100%"}));
10330var a=m.find(".tp-vid-play-pause")[0],c=m.find(".tp-vid-mute")[0],h=m.find(".tp-vid-full-screen")[0],i=m.find(".tp-seek-bar")[0],j=m.find(".tp-volume-bar")[0];a!=b&&(F(a,"click",function(){1==e.paused?e.play():e.pause()}),F(c,"click",function(){0==e.muted?(e.muted=!0,c.innerHTML="Unmute"):(e.muted=!1,c.innerHTML="Mute")}),F(h,"click",function(){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}),F(i,"change",function(){var a=e.duration*(i.value/100);e.currentTime=a}),F(e,"timeupdate",function(){var a=100/e.duration*e.currentTime;i.value=a}),F(i,"mousedown",function(){e.pause()}),F(i,"mouseup",function(){e.play()}),F(j,"change",function(){e.volume=j.value})),F(e,"play",function(){"mute"==m.data("volume")&&(e.muted=!0),g.addClass("videoisplaying"),"loopandnoslidestop"==m.data("videoloop")?(d.videoplaying=!1,d.container.trigger("starttimer"),d.container.trigger("revolution.slide.onvideostop")):(d.videoplaying=!0,d.container.trigger("stoptimer"),d.container.trigger("revolution.slide.onvideoplay"));var a=m.find(".tp-vid-play-pause")[0],c=m.find(".tp-vid-mute")[0];a!=b&&(a.innerHTML="Pause"),c!=b&&e.muted&&(c.innerHTML="Unmute")}),F(e,"pause",function(){g.removeClass("videoisplaying"),d.videoplaying=!1,d.container.trigger("starttimer"),d.container.trigger("revolution.slide.onvideostop");var a=m.find(".tp-vid-play-pause")[0];a!=b&&(a.innerHTML="Play")}),F(e,"ended",function(){g.removeClass("videoisplaying"),d.videoplaying=!1,d.container.trigger("starttimer"),d.container.trigger("revolution.slide.onvideostop"),1==d.nextslideatend&&d.container.revnext()})}var k=!1;1!=m.data("autoplayonlyfirsttime")&&"true"!=m.data("autoplayonlyfirsttime")||(k=!0);var l=16/9;if("4:3"==m.data("aspectratio")&&(l=4/3),g.data("mediaAspect",l),1==g.closest(".tp-caption").data("forcecover")&&(H(g,d.container),g.addClass("fullcoveredvideo")),f.css({display:"block"}),d.nextslideatend=m.data("nextslideatend"),1!=m.data("autoplay")&&1!=k||("loopandnoslidestop"==m.data("videoloop")?(d.videoplaying=!1,d.container.trigger("starttimer"),d.container.trigger("revolution.slide.onvideostop")):(d.videoplaying=!0,d.container.trigger("stoptimer"),d.container.trigger("revolution.slide.onvideoplay")),"on"!=m.data("forcerewind")||g.hasClass("videoisplaying")||e.currentTime>0&&(e.currentTime=0),"mute"==m.data("volume")&&(e.muted=!0),g.data("timerplay",setTimeout(function(){"on"!=m.data("forcerewind")||g.hasClass("videoisplaying")||e.currentTime>0&&(e.currentTime=0),"mute"==m.data("volume")&&(e.muted=!0),e.play()},10+m.data("start")))),g.data("ww")==b&&g.data("ww",f.attr("width")),g.data("hh")==b&&g.data("hh",f.attr("height")),!m.hasClass("fullscreenvideo")&&1==m.data("forcecover"))try{g.width(g.data("ww")*d.bw),g.height(g.data("hh")*d.bh)}catch(a){}clearInterval(g.data("interval"))}}),100)}),1==m.data("autoplay")&&(setTimeout(function(){"loopandnoslidestop"!=m.data("videoloop")&&(d.videoplaying=!0,d.container.trigger("stoptimer"))},200),"loopandnoslidestop"!=m.data("videoloop")&&(d.videoplaying=!0,d.container.trigger("stoptimer")),1!=m.data("autoplayonlyfirsttime")&&"true"!=m.data("autoplayonlyfirsttime")||(m.data("autoplay",!1),m.data("autoplayonlyfirsttime",!1)))}var U=0,V=0;if(m.find("img").length>0){var X=m.find("img");0==X.width()&&X.css({width:"auto"}),0==X.height()&&X.css({height:"auto"}),X.data("ww")==b&&X.width()>0&&X.data("ww",X.width()),X.data("hh")==b&&X.height()>0&&X.data("hh",X.height());var Y=X.data("ww"),Z=X.data("hh");Y==b&&(Y=0),Z==b&&(Z=0),X.width(Y*d.bw),X.height(Z*d.bh),U=X.width(),V=X.height()}else if(m.find("iframe").length>0||m.find("video").length>0){var $=!1,X=m.find("iframe");0==X.length&&(X=m.find("video"),$=!0),X.css({display:"block"}),m.data("ww")==b&&m.data("ww",X.width()),m.data("hh")==b&&m.data("hh",X.height());var Y=m.data("ww"),Z=m.data("hh"),_=m;_.data("fsize")==b&&_.data("fsize",parseInt(_.css("font-size"),0)||0),_.data("pt")==b&&_.data("pt",parseInt(_.css("paddingTop"),0)||0),_.data("pb")==b&&_.data("pb",parseInt(_.css("paddingBottom"),0)||0),_.data("pl")==b&&_.data("pl",parseInt(_.css("paddingLeft"),0)||0),_.data("pr")==b&&_.data("pr",parseInt(_.css("paddingRight"),0)||0),_.data("mt")==b&&_.data("mt",parseInt(_.css("marginTop"),
103300)||0),_.data("mb")==b&&_.data("mb",parseInt(_.css("marginBottom"),0)||0),_.data("ml")==b&&_.data("ml",parseInt(_.css("marginLeft"),0)||0),_.data("mr")==b&&_.data("mr",parseInt(_.css("marginRight"),0)||0),_.data("bt")==b&&_.data("bt",parseInt(_.css("borderTop"),0)||0),_.data("bb")==b&&_.data("bb",parseInt(_.css("borderBottom"),0)||0),_.data("bl")==b&&_.data("bl",parseInt(_.css("borderLeft"),0)||0),_.data("br")==b&&_.data("br",parseInt(_.css("borderRight"),0)||0),_.data("lh")==b&&_.data("lh",parseInt(_.css("lineHeight"),0)||0),"auto"==_.data("lh")&&_.data("lh",_.data("fsize")+4);var aa=d.width,ba=d.height;if(aa>d.startwidth&&(aa=d.startwidth),ba>d.startheight&&(ba=d.startheight),m.hasClass("fullscreenvideo")){k=0,l=0,m.data("x",0),m.data("y",0);var ca=d.height;"on"==d.autoHeight&&(ca=d.container.height()),m.css({width:d.width,height:ca})}else m.css({"font-size":_.data("fsize")*d.bw+"px","padding-top":_.data("pt")*d.bh+"px","padding-bottom":_.data("pb")*d.bh+"px","padding-left":_.data("pl")*d.bw+"px","padding-right":_.data("pr")*d.bw+"px","margin-top":_.data("mt")*d.bh+"px","margin-bottom":_.data("mb")*d.bh+"px","margin-left":_.data("ml")*d.bw+"px","margin-right":_.data("mr")*d.bw+"px","border-top":_.data("bt")*d.bh+"px","border-bottom":_.data("bb")*d.bh+"px","border-left":_.data("bl")*d.bw+"px","border-right":_.data("br")*d.bw+"px","line-height":_.data("lh")*d.bh+"px",height:Z*d.bh+"px"});0==$?(X.width(Y*d.bw),X.height(Z*d.bh)):1==m.data("forcecover")||m.hasClass("fullscreenvideo")||(X.width(Y*d.bw),X.height(Z*d.bh)),U=X.width(),V=X.height()}else{m.find(".tp-resizeme, .tp-resizeme *").each(function(){O(a(this),d)}),m.hasClass("tp-resizeme")&&m.find("*").each(function(){O(a(this),d)}),O(m,d),V=m.outerHeight(!0),U=m.outerWidth(!0);var da=m.outerHeight(),ea=m.css("backgroundColor");m.find(".frontcorner").css({borderWidth:da+"px",left:0-da+"px",borderRight:"0px solid transparent",borderTopColor:ea}),m.find(".frontcornertop").css({borderWidth:da+"px",left:0-da+"px",borderRight:"0px solid transparent",borderBottomColor:ea}),m.find(".backcorner").css({borderWidth:da+"px",right:0-da+"px",borderLeft:"0px solid transparent",borderBottomColor:ea}),m.find(".backcornertop").css({borderWidth:da+"px",right:0-da+"px",borderLeft:"0px solid transparent",borderTopColor:ea})}"on"==d.fullScreenAlignForce&&(k=0,l=0),m.data("voffset")==b&&m.data("voffset",0),m.data("hoffset")==b&&m.data("hoffset",0);var fa=m.data("voffset")*p,ga=m.data("hoffset")*p,ha=d.startwidth*p,ia=d.startheight*p;"on"==d.fullScreenAlignForce&&(ha=d.container.width(),ia=d.container.height()),"center"!=m.data("x")&&"center"!=m.data("xcenter")||(m.data("xcenter","center"),m.data("x",ha/2-m.outerWidth(!0)/2+ga)),"left"!=m.data("x")&&"left"!=m.data("xleft")||(m.data("xleft","left"),m.data("x",0/p+ga)),"right"!=m.data("x")&&"right"!=m.data("xright")||(m.data("xright","right"),m.data("x",(ha-m.outerWidth(!0)+ga)/p)),"center"!=m.data("y")&&"center"!=m.data("ycenter")||(m.data("ycenter","center"),m.data("y",ia/2-m.outerHeight(!0)/2+fa)),"top"!=m.data("y")&&"top"!=m.data("ytop")||(m.data("ytop","top"),m.data("y",0/d.bh+fa)),"bottom"!=m.data("y")&&"bottom"!=m.data("ybottom")||(m.data("ybottom","bottom"),m.data("y",(ia-m.outerHeight(!0)+fa)/p)),m.data("start")==b&&m.data("start",1e3);var ja=m.data("easing");ja==b&&(ja="punchgs.Power1.easeOut");var ka=m.data("start")/1e3,la=m.data("speed")/1e3;if("center"==m.data("x")||"center"==m.data("xcenter"))var ma=m.data("x")+k;else var ma=p*m.data("x")+k;if("center"==m.data("y")||"center"==m.data("ycenter"))var na=m.data("y")+l;else var na=d.bh*m.data("y")+l;if(punchgs.TweenLite.set(m,{top:na,left:ma,overwrite:"auto"}),0==j&&(f=!0),m.data("timeline")==b||f||(2!=j&&m.data("timeline").gotoAndPlay(0),f=!0),!f){m.data("timeline")!=b;var oa=new punchgs.TimelineLite({smoothChildTiming:!0,onStart:h});oa.pause(),"on"==d.fullScreenAlignForce;var pa=m;m.data("mySplitText")!=b&&m.data("mySplitText").revert(),"chars"!=m.data("splitin")&&"words"!=m.data("splitin")&&"lines"!=m.data("splitin")&&"chars"!=m.data("splitout")&&"words"!=m.data("splitout")&&"lines"!=m.data("splitout")||(m.find("a").length>0?m.data("mySplitText",new punchgs.SplitText(m.find("a"),{type:"lines,words,chars",charsClass:"tp-splitted",wordsClass:"tp-splitted",linesClass:"tp-splitted"})):m.find(".tp-layer-inner-rotation").length>0?m.data("mySplitText",new punchgs.SplitText(m.find(".tp-layer-inner-rotation"),{type:"lines,words,chars",charsClass:"tp-splitted",wordsClass:"tp-splitted",linesClass:"tp-splitted"})):m.data("mySplitText",new punchgs.SplitText(m,{type:"lines,words,chars",charsClass:"tp-splitted",wordsClass:"tp-splitted",linesClass:"tp-splitted"})),m.addClass("splitted")),"chars"==m.data("splitin")&&(pa=m.data("mySplitText").chars),"words"==m.data("splitin")&&(pa=m.data("mySplitText").words),"lines"==m.data("splitin")&&(pa=m.data("mySplitText").lines);var qa=I(),ra=I();m.data("repeat")!=b&&(repeatV=m.data("repeat")),m.data("yoyo")!=b&&(yoyoV=m.data("yoyo")),m.data("repeatdelay")!=b&&(repeatdelayV=m.data("repeatdelay"));var sa=m.attr("class");sa.match("customin")?qa=J(qa,m.data("customin")):sa.match("randomrotate")?(qa.scale=3*Math.random()+1,qa.rotation=Math.round(200*Math.random()-100),qa.x=Math.round(200*Math.random()-100),qa.y=Math.round(200*Math.random()-100)):sa.match("lfr")||sa.match("skewfromright")?qa.x=15+d.width:sa.match("lfl")||sa.match("skewfromleft")?qa.x=-1
103305-U:sa.match("sfl")||sa.match("skewfromleftshort")?qa.x=-50:sa.match("sfr")||sa.match("skewfromrightshort")?qa.x=50:sa.match("lft")?qa.y=-25-V:sa.match("lfb")?qa.y=25+d.height:sa.match("sft")?qa.y=-50:sa.match("sfb")&&(qa.y=50),sa.match("skewfromright")||m.hasClass("skewfromrightshort")?qa.skewX=-85:(sa.match("skewfromleft")||m.hasClass("skewfromleftshort"))&&(qa.skewX=85),(sa.match("fade")||sa.match("sft")||sa.match("sfl")||sa.match("sfb")||sa.match("skewfromleftshort")||sa.match("sfr")||sa.match("skewfromrightshort"))&&(qa.opacity=0),"safari"==M().toLowerCase();var ta=m.data("elementdelay")==b?0:m.data("elementdelay");ra.ease=qa.ease=m.data("easing")==b?punchgs.Power1.easeInOut:m.data("easing"),qa.data=new Object,qa.data.oldx=qa.x,qa.data.oldy=qa.y,ra.data=new Object,ra.data.oldx=ra.x,ra.data.oldy=ra.y,qa.x=qa.x*p,qa.y=qa.y*p;var ua=new punchgs.TimelineLite;if(2!=j)if(sa.match("customin"))pa!=m&&oa.add(punchgs.TweenLite.set(m,{force3D:"auto",opacity:1,scaleX:1,scaleY:1,rotationX:0,rotationY:0,rotationZ:0,skewX:0,skewY:0,z:0,x:0,y:0,visibility:"visible",delay:0,overwrite:"all"})),qa.visibility="hidden",ra.visibility="visible",ra.overwrite="all",ra.opacity=1,ra.onComplete=g(),ra.delay=ka,ra.force3D="auto",oa.add(ua.staggerFromTo(pa,la,qa,ra,ta),"frame0");else if(qa.visibility="visible",qa.transformPerspective=600,pa!=m&&oa.add(punchgs.TweenLite.set(m,{force3D:"auto",opacity:1,scaleX:1,scaleY:1,rotationX:0,rotationY:0,rotationZ:0,skewX:0,skewY:0,z:0,x:0,y:0,visibility:"visible",delay:0,overwrite:"all"})),ra.visibility="visible",ra.delay=ka,ra.onComplete=g(),ra.opacity=1,ra.force3D="auto",sa.match("randomrotate")&&pa!=m)for(var c=0;c<pa.length;c++){var va=new Object,wa=new Object;a.extend(va,qa),a.extend(wa,ra),qa.scale=3*Math.random()+1,qa.rotation=Math.round(200*Math.random()-100),qa.x=Math.round(200*Math.random()-100),qa.y=Math.round(200*Math.random()-100),0!=c&&(wa.delay=ka+c*ta),oa.append(punchgs.TweenLite.fromTo(pa[c],la,va,wa),"frame0")}else oa.add(ua.staggerFromTo(pa,la,qa,ra,ta),"frame0");m.data("timeline",oa);new Array;if(m.data("frames")!=b){var ya=m.data("frames");ya=ya.replace(/\s+/g,""),ya=ya.replace("{","");var za=ya.split("}");a.each(za,function(a,b){if(b.length>0){var c=K(b);S(m,d,c,"frame"+(a+10),p)}})}oa=m.data("timeline"),m.data("end")==b||j!=-1&&2!=j?j==-1||2==j?T(m,d,999999,qa,"frame99",p):T(m,d,200,qa,"frame99",p):T(m,d,m.data("end")/1e3,qa,"frame99",p),oa=m.data("timeline"),m.data("timeline",oa),P(m,p),oa.resume()}}if(f&&(Q(m),P(m,p),m.data("timeline")!=b)){var Aa=m.data("timeline").getTweensOf();a.each(Aa,function(a,c){if(c.vars.data!=b){var d=c.vars.data.oldx*p,e=c.vars.data.oldy*p;if(1!=c.progress()&&0!=c.progress())try{c.vars.x=d,c.vary.y=e}catch(a){}else 1==c.progress()&&punchgs.TweenLite.set(c.target,{x:d,y:e})}})}});var o=a("body").find("#"+d.container.attr("id")).find(".tp-bannertimer");o.data("opt",d),f!=b&&setTimeout(function(){f.resume()},30)},M=function(){var c,a=navigator.appName,b=navigator.userAgent,d=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return d&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(d[2]=c[1]),d=d?[d[1],d[2]]:[a,navigator.appVersion,"-?"],d[0]},O=function(a,c){a.data("fsize")==b&&a.data("fsize",parseInt(a.css("font-size"),0)||0),a.data("pt")==b&&a.data("pt",parseInt(a.css("paddingTop"),0)||0),a.data("pb")==b&&a.data("pb",parseInt(a.css("paddingBottom"),0)||0),a.data("pl")==b&&a.data("pl",parseInt(a.css("paddingLeft"),0)||0),a.data("pr")==b&&a.data("pr",parseInt(a.css("paddingRight"),0)||0),a.data("mt")==b&&a.data("mt",parseInt(a.css("marginTop"),0)||0),a.data("mb")==b&&a.data("mb",parseInt(a.css("marginBottom"),0)||0),a.data("ml")==b&&a.data("ml",parseInt(a.css("marginLeft"),0)||0),a.data("mr")==b&&a.data("mr",parseInt(a.css("marginRight"),0)||0),a.data("bt")==b&&a.data("bt",parseInt(a.css("borderTopWidth"),0)||0),a.data("bb")==b&&a.data("bb",parseInt(a.css("borderBottomWidth"),0)||0),a.data("bl")==b&&a.data("bl",parseInt(a.css("borderLeftWidth"),0)||0),a.data("br")==b&&a.data("br",parseInt(a.css("borderRightWidth"),0)||0),a.data("ls")==b&&a.data("ls",parseInt(a.css("letterSpacing"),0)||0),a.data("lh")==b&&a.data("lh",parseInt(a.css("lineHeight"),0)||"auto"),a.data("minwidth")==b&&a.data("minwidth",parseInt(a.css("minWidth"),0)||0),a.data("minheight")==b&&a.data("minheight",parseInt(a.css("minHeight"),0)||0),a.data("maxwidth")==b&&a.data("maxwidth",parseInt(a.css("maxWidth"),0)||"none"),a.data("maxheight")==b&&a.data("maxheight",parseInt(a.css("maxHeight"),0)||"none"),a.data("wii")==b&&a.data("wii",parseInt(a.css("width"),0)||0),a.data("hii")==b&&a.data("hii",parseInt(a.css("height"),0)||0),a.data("wan")==b&&a.data("wan",a.css("-webkit-transition")),a.data("moan")==b&&a.data("moan",a.css("-moz-animation-transition")),a.data("man")==b&&a.data("man",a.css("-ms-animation-transition")),a.data("ani")==b&&a.data("ani",a.css("transition")),"auto"==a.data("lh")&&a.data("lh",a.data("fsize")+4),a.hasClass("tp-splitted")||(a.css("-webkit-transition","none"),a.css("-moz-transition","none"),a.css("-ms-transition","none"),a.css("transition","none"),punchgs.TweenLite.set(a,{fontSize:Math.round(a.data("fsize")*c.bw)+"px",letterSpacing:Math.floor(a.data("ls")*c.bw)+"px",paddingTop:Math.round(a.data("pt")*c.bh)+"px",paddingBottom:Math.round(a.data("pb")*c.bh)+"px",paddingLeft:Math.round(a.data("pl")*c.bw)+"px",paddingRight:Math.round(a.data("pr")*c.bw)+"px",marginTop:a.data("mt")*c.bh+"px",marginBottom:a.data("mb")*c.bh+"px",marginLeft:a.data("ml")*c.bw+"px",marginRight:a.data("mr")*c.bw+"px",borderTopWidth:Math.round(a.data("bt")*c.bh)+"px",borderBottomWidth:Math.round(a.data("bb")*c.bh)+"px",borderLeftWidth:Math.round(a.data("bl")*c.bw)+"px",borderRightWidth:Math.round(a.data("br")*c.bw)+"px",lineHeight:Math.round(a.data("lh")*c.bh)+"px",minWidth:a.data("minwidth")*c.bw+"px",minHeight:a.data("minheight")*c.bh+"px",overwrite:"auto"}),setTimeout(function(){a.css("-webkit-transition",a.data("wan")),a.css("-moz-transition",a.data("moan")),a.css("-ms-transition",a.data("man")),a.css("transition",a.data("ani"))},30),"none"!=a.data("maxheight")&&a.css({maxHeight:a.data("maxheight")*c.bh+"px"}),"none"!=a.data("maxwidth")&&a.css({maxWidth:a.data("maxwidth")*c.bw+"px"}))},P=function(c,d){c.find(".rs-pendulum").each(function(){var c=a(this);if(c.data("timeline")==b){c.data("timeline",new punchgs.TimelineLite);var e=c.data("startdeg")==b?-20:c.data("startdeg"),f=c.data("enddeg")==b?20:c.data("enddeg"),g=c.data("speed")==b?2:c.data("speed"),h=c.data("origin")==b?"50% 50%":c.data("origin"),i=c.data("easing")==b?punchgs.Power2.easeInOut:c.data("ease");e*=d,f*=d,c.data("timeline").append(new punchgs.TweenLite.fromTo(c,g,{force3D:"auto",rotation:e,transformOrigin:h},{rotation:f,ease:i})),c.data("timeline").append(new punchgs.TweenLite.fromTo(c,g,{force3D:"auto",rotation:f,transformOrigin:h},{rotation:e,ease:i,onComplete:function(){c.data("timeline").restart()}}))}}),c.find(".rs-rotate").each(function(){var c=a(this);if(c.data("timeline")==b){c.data("timeline",new punchgs.TimelineLite);var e=c.data("startdeg")==b?0:c.data("startdeg"),f=c.data("enddeg")==b?360:c.data("enddeg");speed=c.data("speed")==b?2:c.data("speed"),origin=c.data("origin")==b?"50% 50%":c.data("origin"),easing=c.data("easing")==b?punchgs.Power2.easeInOut:c.data("easing"),e*=d,f*=d,c.data("timeline").append(new punchgs.TweenLite.fromTo(c,speed,{force3D:"auto",rotation:e,transformOrigin:origin},{rotation:f,ease:easing,onComplete:function(){c.data("timeline").restart()}}))}}),c.find(".rs-slideloop").each(function(){var c=a(this);if(c.data("timeline")==b){c.data("timeline",new punchgs.TimelineLite);var e=c.data("xs")==b?0:c.data("xs"),f=c.data("ys")==b?0:c.data("ys"),g=c.data("xe")==b?0:c.data("xe"),h=c.data("ye")==b?0:c.data("ye"),i=c.data("speed")==b?2:c.data("speed"),j=c.data("easing")==b?punchgs.Power2.easeInOut:c.data("easing");e*=d,f*=d,g*=d,h*=d,c.data("timeline").append(new punchgs.TweenLite.fromTo(c,i,{force3D:"auto",x:e,y:f},{x:g,y:h,ease:j})),c.data("timeline").append(new punchgs.TweenLite.fromTo(c,i,{force3D:"auto",x:g,y:h},{x:e,y:f,onComplete:function(){c.data("timeline").restart()}}))}}),c.find(".rs-pulse").each(function(){var c=a(this);if(c.data("timeline")==b){c.data("timeline",new punchgs.TimelineLite);var d=c.data("zoomstart")==b?0:c.data("zoomstart"),e=c.data("zoomend")==b?0:c.data("zoomend"),f=c.data("speed")==b?2:c.data("speed"),g=c.data("easing")==b?punchgs.Power2.easeInOut:c.data("easing");c.data("timeline").append(new punchgs.TweenLite.fromTo(c,f,{force3D:"auto",scale:d},{scale:e,ease:g})),c.data("timeline").append(new punchgs.TweenLite.fromTo(c,f,{force3D:"auto",scale:e},{scale:d,onComplete:function(){c.data("timeline").restart()}}))}}),c.find(".rs-wave").each(function(){var c=a(this);if(c.data("timeline")==b){c.data("timeline",new punchgs.TimelineLite);var e=c.data("angle")==b?10:c.data("angle"),f=c.data("radius")==b?10:c.data("radius"),g=c.data("speed")==b?-20:c.data("speed");c.data("origin")==b?-20:c.data("origin");e*=d,f*=d;var i={a:0,ang:e,element:c,unit:f};c.data("timeline").append(new punchgs.TweenLite.fromTo(i,g,{a:360},{a:0,force3D:"auto",ease:punchgs.Linear.easeNone,onUpdate:function(){var a=i.a*(Math.PI/180);punchgs.TweenLite.to(i.element,.1,{force3D:"auto",x:Math.cos(a)*i.unit,y:i.unit*(1-Math.sin(a))})},onComplete:function(){c.data("timeline").restart()}}))}})},Q=function(c){c.find(".rs-pendulum, .rs-slideloop, .rs-pulse, .rs-wave").each(function(){var c=a(this);c.data("timeline")!=b&&(c.data("timeline").pause(),c.data("timeline",null))})},R=function(c,d){var e=0,f=c.find(".tp-caption"),g=d.container.find(".tp-static-layers").find(".tp-caption");return a.each(g,function(a,b){f.push(b)}),f.each(function(c){var f=-1,g=a(this);if(g.hasClass("tp-static-layer")&&(g.data("startslide")!=-1&&"-1"!=g.data("startslide")||g.data("startslide",0),g.data("endslide")!=-1&&"-1"!=g.data("endslide")||g.data("endslide",d.slideamount),g.hasClass("tp-is-shown")?g.data("startslide")>d.next||g.data("endslide")<d.next?(f=2,g.removeClass("tp-is-shown")):f=0:f=2),0!=f){if(Q(g),g.find("iframe").length>0){punchgs.TweenLite.to(g.find("iframe"),.2,{autoAlpha:0}),W()&&g.find("iframe").remove();try{var h=g.find("iframe"),i=h.attr("id"),j=$f(i);j.api("pause"),clearTimeout(g.data("timerplay"))}catch(a){}try{var k=g.data("player");k.stopVideo(),clearTimeout(g.data("timerplay"))}catch(a){}}if(g.find("video").length>0)try{g.find("video").each(function(b){var c=a(this).parent();c.attr("id");clearTimeout(c.data("timerplay"));var e=this;e.pause()})}catch(a){}try{var l=g.data("timeline"),m=l.getLabelTime("frame99"),n=l.time();if(m>n){var o=l.getTweensOf(g);if(a.each(o,function(a,b){0!=a&&b.pause()}),0!=g.css("opacity")){var p=g.data("endspeed")==b?g.data("speed"):g.data("endspeed");p>e&&(e=p),l.play("frame99")}else l.progress(1,!1)}}catch(a){}}}),e},S=function(a,c,d,e,f){var g=a.data("timeline"),h=new punchgs.TimelineLite,i=a;"chars"==d.typ?i=a.data("mySplitText").chars:"words"==d.typ?i=a.data("mySplitText").words:"lines"==d.typ&&(i=a.data("mySplitText").lines),d.animation.ease=d.ease,d.animation.rotationZ!=b&&(d.animation.rotation=d.animation.rotationZ),d.animation.data=new Object,d.animation.data.oldx=d.animation.x,d.animation.data.oldy=d.animation.y,d.animation.x=d.animation.x*f,d.animation.y=d.animation.y*f,g.add(h.staggerTo(i,d.speed,d.animation,d.elementdelay),d.start),g.addLabel(e,d.start),a.data("timeline",g)},T=function(a,c,d,e,f,g){var h=a.data("timeline"),i=new punchgs.TimelineLite,j=I(),k=a.data("endspeed")==b?a.data("speed"):a.data("endspeed"),l=a.attr("class");if(j.ease=a.data("endeasing")==b?punchgs.Power1.easeInOut:a.data("endeasing"),k/=1e3,l.match("ltr")||l.match("ltl")||l.match("str")||l.match("stl")||l.match("ltt")||l.match("ltb")||l.match("stt")||l.match("stb")||l.match("skewtoright")||l.match("skewtorightshort")||l.match("skewtoleft")||l.match("skewtoleftshort")||l.match("fadeout")||l.match("randomrotateout")){l.match("skewtoright")||l.match("skewtorightshort")?j.skewX=35:(l.match("skewtoleft")||l.match("skewtoleftshort"))&&(j.skewX=-35),l.match("ltr")||l.match("skewtoright")?j.x=c.width+60:l.match("ltl")||l.match("skewtoleft")?j.x=0-(c.width+60):l.match("ltt")?j.y=0-(c.height+60):l.match("ltb")?j.y=c.height+60:l.match("str")||l.match("skewtorightshort")?(j.x=50,j.opacity=0):l.match("stl")||l.match("skewtoleftshort")?(j.x=-50,j.opacity=0):l.match("stt")?(j.y=-50,j.opacity=0):l.match("stb")?(j.y=50,j.opacity=0):l.match("randomrotateout")?(j.x=Math.random()*c.width,j.y=Math.random()*c.height,j.scale=2*Math.random()+.3,j.rotation=360*Math.random()-180,j.opacity=0):l.match("fadeout")&&(j.opacity=0),l.match("skewtorightshort")?j.x=270:l.match("skewtoleftshort")&&(j.x=-270),j.data=new Object,j.data.oldx=j.x,j.data.oldy=j.y,j.x=j.x*g,j.y=j.y*g,j.overwrite="auto";var m=a,m=a;"chars"==a.data("splitout")?m=a.data("mySplitText").chars:"words"==a.data("splitout")?m=a.data("mySplitText").words:"lines"==a.data("splitout")&&(m=a.data("mySplitText").lines);var n=a.data("endelementdelay")==b?0:a.data("endelementdelay");h.add(i.staggerTo(m,k,j,n),d)}else if(a.hasClass("customout")){j=J(j,a.data("customout"));var m=a;"chars"==a.data("splitout")?m=a.data("mySplitText").chars:"words"==a.data("splitout")?m=a.data("mySplitText").words:"lines"==a.data("splitout")&&(m=a.data("mySplitText").lines);var n=a.data("endelementdelay")==b?0:a.data("endelementdelay");j.onStart=function(){punchgs.TweenLite.set(a,{transformPerspective:j.transformPerspective,transformOrigin:j.transformOrigin,overwrite:"auto"})},j.data=new Object,j.data.oldx=j.x,j.data.oldy=j.y,j.x=j.x*g,j.y=j.y*g,h.add(i.staggerTo(m,k,j,n),d)}else e.delay=0,h.add(punchgs.TweenLite.to(a,k,e),d);h.addLabel(f,d),a.data("timeline",h)},U=function(b,c){b.children().each(function(){try{a(this).die("click")}catch(a){}try{a(this).die("mouseenter")}catch(a){}try{a(this).die("mouseleave")}catch(a){}try{
10331a(this).unbind("hover")}catch(a){}});try{b.die("click","mouseenter","mouseleave")}catch(a){}clearInterval(c.cdint),b=null},V=function(c,d){if(d.cd=0,d.loop=0,d.stopAfterLoops!=b&&d.stopAfterLoops>-1?d.looptogo=d.stopAfterLoops:d.looptogo=9999999,d.stopAtSlide!=b&&d.stopAtSlide>-1?d.lastslidetoshow=d.stopAtSlide:d.lastslidetoshow=999,d.stopLoop="off",0==d.looptogo&&(d.stopLoop="on"),d.slideamount>1&&(0!=d.stopAfterLoops||1!=d.stopAtSlide)){var e=c.find(".tp-bannertimer");c.on("stoptimer",function(){var b=a(this).find(".tp-bannertimer");b.data("tween").pause(),"on"==d.hideTimerBar&&b.css({visibility:"hidden"})}),c.on("starttimer",function(){1!=d.conthover&&1!=d.videoplaying&&d.width>d.hideSliderAtLimit&&1!=d.bannertimeronpause&&1!=d.overnav&&("on"==d.stopLoop&&d.next==d.lastslidetoshow-1||1==d.noloopanymore?d.noloopanymore=1:(e.css({visibility:"visible"}),e.data("tween").resume())),"on"==d.hideTimerBar&&e.css({visibility:"hidden"})}),c.on("restarttimer",function(){var b=a(this).find(".tp-bannertimer");"on"==d.stopLoop&&d.next==d.lastslidetoshow-1||1==d.noloopanymore?d.noloopanymore=1:(b.css({visibility:"visible"}),b.data("tween").kill(),b.data("tween",punchgs.TweenLite.fromTo(b,d.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:f,delay:1}))),"on"==d.hideTimerBar&&b.css({visibility:"hidden"})}),c.on("nulltimer",function(){e.data("tween").pause(0),"on"==d.hideTimerBar&&e.css({visibility:"hidden"})});var f=function(){0==a("body").find(c).length&&(U(c,d),clearInterval(d.cdint)),c.trigger("revolution.slide.slideatend"),1==c.data("c
10331onthover-changed")&&(d.conthover=c.data("conthover"),c.data("conthover-changed",0)),d.act=d.next,d.next=d.next+1,d.next>c.find(">ul >li").length-1&&(d.next=0,d.looptogo=d.looptogo-1,d.looptogo<=0&&(d.stopLoop="on")),"on"==d.stopLoop&&d.next==d.lastslidetoshow-1?(c.find(".tp-bannertimer").css({visibility:"hidden"}),c.trigger("revolution.slide.onstop"),d.noloopanymore=1):e.data("tween").restart(),z(c,d)};e.data("tween",punchgs.TweenLite.fromTo(e,d.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:f,delay:1})),e.data("opt",d),c.hover(function(){if("on"==d.onHoverStop&&!W()){c.trigger("stoptimer"),c.trigger("revolution.slide.onpause");var e=c.find(">ul >li:eq("+d.next+") .slotholder");e.find(".defaultimg").each(function(){var c=a(this);c.data("kenburn")!=b&&c.data("kenburn").pause()})}},function(){if(1!=c.data("conthover")){c.trigger("revolution.slide.onresume"),c.trigger("starttimer");var e=c.find(">ul >li:eq("+d.next+") .slotholder");e.find(".defaultimg").each(function(){var c=a(this);c.data("kenburn")!=b&&c.data("kenburn").play()})}})}},W=function(){var a=["android","webos","iphone","ipad","blackberry","Android","webos",,"iPod","iPhone","iPad","Blackberry","BlackBerry"],b=!1;
10331for(var c in a)navigator.userAgent.split(a[c]).length>1&&(b=!0);return b},X=function(a,b,c){var d=b.data("owidth"),e=b.data("oheight");if(d/e>c.width/c.height){var f=c.container.width()/d,g=e*f,h=g/c.container.height()*a;return a*=100/h,h=100,a=a,a+"% "+h+"% 1"}var f=c.container.width()/d,g=e*f,h=g/c.container.height()*a;return a+"% "+h+"%"},Y=function(c,d,e,f){try{c.find(">ul:first-child >li:eq("+d.act+")")}catch(a){c.find(">ul:first-child >li:eq(1)")}d.lastslide=d.act;var h=c.find(">ul:first-child >li:eq("+d.next+")"),j=h.find(".slotholder"),k=j.data("bgposition"),l=j.data("bgpositionend"),m=j.data("zoomstart")/100,n=j.data("zoomend")/100,o=j.data("rotationstart"),p=j.data("rotationend"),q=j.data("bgfit"),r=j.data("bgfitend"),s=j.data("easeme"),t=j.data("duration")/1e3,u=100;q==b&&(q=100),r==b&&(r=100);var v=q,w=r;q=X(q,j,d),r=X(r,j,d),u=X(100,j,d),m==b&&(m=1),n==b&&(n=1),o==b&&(o=0),p==b&&(p=0),m<1&&(m=1),n<1&&(n=1);var x=new Object;x.w=parseInt(u.split(" ")[0],0),x.h=parseInt(u.split(" ")[1],0);var y=!1;"1"==u.split(" ")[2]&&(y=!0),j.find(".defaultimg").each(function(){var b=a(this);0==j.find(".kenburnimg").length?j.append('<div class="kenburnimg" style="position:absolute;z-index:1;width:100%;height:100%;top:0px;left:0px;"><img src="'+b.attr("src")+'" style="-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position:absolute;width:'+x.w+"%;height:"+x.h+'%;"></div>'):j.find(".kenburnimg img").css({width:x.w+"%",height:x.h+"%"});var c=j.find(".kenburnimg img"),e=Z(d,k,q,c,y),g=Z(d,l,r,c,y);if(y&&(e.w=v/100,g.w=w/100),f){punchgs.TweenLite.set(c,{autoAlpha:0,transformPerspective:1200,transformOrigin:"0% 0%",top:0,left:0,scale:e.w,x:e.x,y:e.y});var h=e.w,m=h*c.width()-d.width,n=h*c.height()-d.height,o=Math.abs(e.x/m*100),u=Math.abs(e.y/n*100);0==n&&(u=0),0==m&&(o=0),b.data("bgposition",o+"% "+u+"%"),i(8)||b.data("currotate",$(c)),i(8)||b.data("curscale",x.w*h+"%  "+(x.h*h+"%")),j.find(".kenburnimg").remove()}else b.data("kenburn",punchgs.TweenLite.fromTo(c,t,{autoAlpha:1,force3D:punchgs.force3d,transformOrigin:"0% 0%",top:0,left:0,scale:e.w,x:e.x,y:e.y},{autoAlpha:1,rotationZ:p,ease:s,x:g.x,y:g.y,scale:g.w,onUpdate:function(){var a=c[0]._gsTransform.scaleX,e=a*c.width()-d.width,f=a*c.height()-d.height,g=Math.abs(c[0]._gsTransform.x/e*100),h=Math.abs(c[0]._gsTransform.y/f*100);0==f&&(h=0),0==e&&(g=0),b.data("bgposition",g+"% "+h+"%"),i(8)||b.data("currotate",$(c)),i(8)||b.data("curscale",x.w*a+"%  "+(x.h*a+"%"))}}))})},Z=function(a,b,c,d,e){var f=new Object;switch(e?f.w=parseInt(c.split(" ")[1],0)/100:f.w=parseInt(c.split(" ")[0],0)/100,b){case"left top":case"top left":f.x=0,f.y=0;break;case"center top":case"top center":f.x=((0-d.width())*f.w+parseInt(a.width,0))/2,f.y=0;break;case"top right":case"right top":f.x=(0-d.width())*f.w+parseInt(a.width,0),f.y=0;break;case"center left":case"left center":f.x=0,f.y=((0-d.height())*f.w+parseInt(a.height,0))/2;break;case"center center":f.x=((0-d.width())*f.w+parseInt(a.width,0))/2,f.y=((0-d.height())*f.w+parseInt(a.height,0))/2;break;case"center right":case"right center":f.x=(0-d.width())*f.w+parseInt(a.width,0),f.y=((0-d.height())*f.w+parseInt(a.height,0))/2;break;case"bottom left":case"left bottom":f.x=0,f.y=(0-d.height())*f.w+parseInt(a.height,0);break;
10331case"bottom center":case"center bottom":f.x=((0-d.width())*f.w+parseInt(a.width,0))/2,f.y=(0-d.height())*f.w+parseInt(a.height,0);break;case"bottom right":case"right bottom":f.x=(0-d.width())*f.w+parseInt(a.width,0),f.y=(0-d.height())*f.w+parseInt(a.height,0)}return f},$=function(a){var b=a.css("-webkit-transform")||a.css("-moz-transform")||a.css("-ms-transform")||a.css("-o-transform")||a.css("transform");if("none"!==b)var c=b.split("(")[1].split(")")[0].split(","),d=c[0],e=c[1],f=Math.round(Math.atan2(e,d)*(180/Math.PI));else var f=0;return f<0?f+=360:f},_=function(c,d){try{var e=c.find(">ul:first-child >li:eq("+d.act+")")}catch(a){var e=c.find(">ul:first-child >li:eq(1)")}d.lastslide=d.act;var f=c.find(">ul:first-child >li:eq("+d.next+")");e.find(".slotholder"),f.find(".slotholder");c.find(".defaultimg").each(function(){var c=a(this);punchgs.TweenLite.killTweensOf(c,!1),punchgs.TweenLite.set(c,{scale:1,rotationZ:0}),punchgs.TweenLite.killTweensOf(c.data("kenburn img"),!1),c.data("kenburn")!=b&&c.data("kenburn").pause(),c.data("currotate")!=b&&c.data("bgposition")!=b&&c.data("curscale")!=b&&punchgs.TweenLite.set(c,{rotation:c.data("currotate"),backgroundPosition:c.data("bgposition"),backgroundSize:c.data("curscale")}),c!=b&&c.data("kenburn img")!=b&&c.data("kenburn img").length>0&&punchgs.TweenLite.set(c.data("kenburn img"),{autoAlpha:0})})},aa=function(b,c){return(!W()||"on"!=c.parallaxDisableOnMobile)&&(b.find(">ul:first-child >li").each(function(){for(var b=a(this),d=1;d<=10;d++)b.find(".rs-parallaxlevel-"+d).each(function(){var b=a(this);b.wrap('<div style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:'+b.css("zIndex")+'" class="tp-parallax-container" data-parallaxlevel="'+c.parallaxLevels[d-1]+'"></div>')})}),"mouse"!=c.parallax&&"scroll+mouse"!=c.parallax&&"mouse+scroll"!=c.parallax||(b.mouseenter(function(a){var c=b.find(".current-sr-slide-visible"),d=b.offset().top,e=b.offset().left,f=a.pageX-e,g=a.pageY-d;c.data("enterx",f),c.data("entery",g)}),b.on("mousemove.hoverdir, mouseleave.hoverdir",function(d){var e=b.find(".current-sr-slide-visible");switch(d.type){case"mousemove":var f=b.offset().top,g=b.offset().left,h=e.data("enterx"),i=e.data("entery"),j=h-(d.pageX-g),k=i-(d.pageY-f);e.find(".tp-parallax-container").each(function(){var b=a(this),d=parseInt(b.data("parallaxlevel"),0)/100,e=j*d,f=k*d;"scroll+mouse"==c.parallax||"mouse+scroll"==c.parallax?punchgs.TweenLite.to(b,.4,{force3D:"auto",x:e,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(b,.4,{force3D:"auto",x:e,y:f,ease:punchgs.Power3.easeOut,overwrite:"all"})});break;case"mouseleave":e.find(".tp-parallax-container").each(function(){var b=a(this);"scroll+mouse"==c.parallax||"mouse+scroll"==c.parallax?punchgs.TweenLite.to(b,1.5,{force3D:"auto",x:0,ease:punchgs.Power3.easeOut}):punchgs.TweenLite.to(b,1.5,{force3D:"auto",x:0,y:0,ease:punchgs.Power3.easeOut})})}}),W()&&(window.ondeviceorientation=function(c){var d=Math.round(c.beta||0),e=Math.round(c.gamma||0),f=b.find(".current-sr-slide-visible");if(a(window).width()>a(window).height()){var g=e;e=d,d=g}var h=360/b.width()*e,i=180/b.height()*d;f.find(".tp-parallax-container").each(function(){var b=a(this),c=parseInt(b.data("parallaxlevel"),0)/100,d=h*c,e=i*c;punchgs.TweenLite.to(b,.2,{force3D:"auto",x:d,y:e,ease:punchgs.Power3.easeOut})})})),void("scroll"!=c.parallax&&"scroll+mouse"!=c.parallax&&"mouse+scroll"!=c.parallax||a(window).on("scroll",function(a){ba(b,c)})))},ba=function(b,c){if(W()&&"on"==c.parallaxDisableOnMobile)return!1;var d=b.offset().top,e=a(window).scrollTop(),f=d+b.height()/2,g=d+b.height()/2-e,h=a(window).height()/2,i=h-g;f<h&&(i-=h-f);b.find(".current-sr-slide-visible");if(b.find(".tp-parallax-container").each(function(b){var c=a(this),d=parseInt(c.data("parallaxlevel"),0)/100,e=i*d;c.data("parallaxoffset",e),punchgs.TweenLite.to(c,.2,{force3D:"auto",y:e,ease:punchgs.Power3.easeOut})}),"on"!=c.parallaxBgFreeze){var k=c.parallaxLevels[0]/100,l=i*k;punchgs.TweenLite.to(b,.2,{force3D:"auto",y:l,ease:punchgs.Power3.easeOut})}},ca=function(c,d){var e=c.parent();"thumb"!=d.navigationType&&"both"!=d.navsecond||e.append('<div class="tp-bullets tp-thumbs '+d.navigationStyle+'"><div class="tp-mask"><div class="tp-thumbcontainer"></div></div></div>');var f=e.find(".tp-bullets.tp-thumbs .tp-mask .tp-thumbcontainer"),g=f.parent();
10331g.width(d.thumbWidth*d.thumbAmount),g.height(d.thumbHeight),g.parent().width(d.thumbWidth*d.thumbAmount),g.parent().height(d.thumbHeight),c.find(">ul:first >li").each(function(a){var e=c.find(">ul:first >li:eq("+a+")"),g=e.find(".defaultimg").css("backgroundColor");if(e.data("thumb")!=b)var h=e.data("thumb");else var h=e.find("img:first").attr("src");f.append('<div class="bullet thumb" style="background-color:'+g+";position:relative;width:"+d.thumbWidth+"px;height:"+d.thumbHeight+"px;background-image:url("+h+') !important;background-size:cover;background-position:center center;"></div>');f.find(".bullet:first")});var h=10;f.find(".bullet").each(function(b){var e=a(this);b==d.slideamount-1&&e.addClass("last"),0==b&&e.addClass("first"),e.width(d.thumbWidth),e.height(d.thumbHeight),h<e.outerWidth(!0)&&(h=e.outerWidth(!0)),e.click(function(){0==d.transition&&e.index()!=d.act&&(d.next=e.index(),j(d,c))})});var i=h*c.find(">ul:first >li").length,k=f.parent().width();d.thumbWidth=h,k<i&&(a(document).mousemove(function(b){a("body").data("mousex",b.pageX)}),f.parent().mouseenter(function(){var b=a(this),d=b.offset(),e=a("body").data("mousex")-d.left,f=b.width(),g=b.find(".bullet:first").outerWidth(!0),h=g*c.find(">ul:first >li").length,i=h-f+15,j=i/f;b.addClass("over"),e-=30;var k=0-e*j;k>0&&(k=0),k<0-h+f&&(k=0-h+f),ea(b,k,200)}),f.parent().mousemove(function(){var b=a(this),d=b.offset(),e=a("body").data("mousex")-d.left,f=b.width(),g=b.find(".bullet:first").outerWidth(!0),h=g*c.find(">ul:first >li").length-1,i=h-f+15,j=i/f;e-=3,e<6&&(e=0),e+3>f-6&&(e=f);var k=0-e*j;k>0&&(k=0),k<0-h+f&&(k=0-h+f),ea(b,k,0)}),f.parent().mouseleave(function(){var b=a(this);b.removeClass("over"),da(c)}))},da=function(a){var b=a.parent().find(".tp-bullets.tp-thumbs .tp-mask .tp-thumbcontainer"),c=b.parent(),e=(c.offset(),c.find(".bullet:first").outerWidth(!0)),f=c.find(".bullet.selected").index()*e,g=c.width(),e=c.find(".bullet:first").outerWidth(!0),h=e*a.find(">ul:first >li").length,k=0-f;k>0&&(k=0),k<0-h+g&&(k=0-h+g),c.hasClass("over")||ea(c,k,200)},ea=function(a,b,c){punchgs.TweenLite.to(a.find(".tp-thumbcontainer"),.2,{force3D:"auto",left:b,ease:punchgs.Power3.easeOut,overwrite:"auto"})}}(jQuery);
10332</script>
10332
10333    
10333<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/i18n/messages_pt.js" crossorigin="anonymous"></script>
10333
10334    
10334<script async defer src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/owlcarousel/owl.carousel.min.js" crossorigin="anonymous" integrity="sha512-w3VtLstKUtGqSqUX5T04jDbyz27PkqkEKRuTlQU7cxu934A5KktmSFOB0zUIzPLS3F+XCWj8v+9/dvOBxvVWkA=="></script>
10334
10335    
10335<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/scripts/common.js?v=1.1" crossorigin="anonymous" integrity="sha512-ekCtn7Qw6gzKWjBUl2I/GWyJmOw2rYpM+CZoFfypZrE5iGiSsWnbY7dm3h271ZMyP+I5UL8qkC4j8W332ChuGQ=="></script>
10335
10336    
10336<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/plugins/pricescalendar/calendar.plugin.js" crossorigin="anonymous" integrity="sha512-01NtpMy//YdeUwi2jRqthTBMCH3Sfi1HwSwVO6VNh/+hRHMLriIf/zZ2YtG7qpBPiiT/CH8cSVbVgLGp+bVxmw=="></script>
10336
10337    
10337<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/plugins/dates-selector/datepicker_v1.js" crossorigin="anonymous" integrity="sha512-Um8KMxRkRvTxLamYCZTuUPAPeAu437GNKmD1zgrbhaL9C20dMxPze5oXp2u5qX7TnEALUNgQoKkFpqXt/sXdww=="></script>
10337
10338    
10338<script>$(function () {
10339        DP_extend_info.config.booking_version = '7';
10340        DP_extend_info.config.custom_format_day_month = function (dateComponents) {
10341            dateComponents = dateComponents.split("/");
10342            var month_names = $.datepicker._defaults.monthNames,
10343            html_date = "<div class='day'>%d</div> <div class='month'>%m</div> <div class='year'>%y</div>",
10344            month = (parseInt(dateComponents[1]) - 1);
10345
10346            return html_date.replace("%d", dateComponents[0]).replace("%m", month_names[month]).replace("%y", dateComponents[2]);
10347        };
10348    });$(window).load(function () {
10349        DP_extend_info.init();
10350        $("label.dates_selector_label").html("<span>Chegada</span><span>Saída</span>");
10351    });</script>
10351
10352    
10352<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/addAnimation.js" crossorigin="anonymous" integrity="sha512-X026I6gXpvAcNDyh5xwgvquH2vTCS3fmKp/3G7hsTDl8HhnAOF88XzmBthnjo3NERIUjwE4ns120cXXQZ7jZ3A=="></script>
10352
10353    
10353<script async type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/scripts/booking_7.js" crossorigin="anonymous" integrity="sha512-YsB6ZzwjCjUbxUbhatw0XJay9bs100BMzxh+fLx0tGlygGZ6gsb6heqFIfZ6lRQUORUEvkfW9KsUzgo6WywCTw=="></script>
10353
10354    
10354<script async type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/scripts/booking_full_popup.js" crossorigin="anonymous" integrity="sha512-FADz3wfZ+rjOlYy8l6VwdMIReyc8ho8cTOQNKsfoYtG/YLODRfXw+TdsxeR2CG9w3QOvxI3WIiybGIpYKODbBw=="></script>
10354
10355    
10355<script async type="text/javascript" type="text/javascript" src="/js/casas/booking_engine_personalize.js?v=1.11"></script>
10355
10356    
10356<script async type="text/javascript" type="text/javascript" src="/js/casas/functions.js?v=1.79"></script>
10356
10357    
10357<script async type="text/javascript" src="//www.tripadvisor.com/js3/conversion/pixel.js" crossorigin="anonymous" integrity="sha512-SqG9s7MDCO3rsgQClul/Zc+o4IfKK0trb4ozTj2bwIz1jKACSgBThnpH85WWGMviEKs33h60W4XE5WwHllfYMQ=="></script>
10357
10358
10359    <div style="display: none;">
10360        <div id="data">
10361            <div id="wrapper_booking_fancybox">
10362                <div id="booking_widget_popup" class="booking_widget_fancybox">
10363
10364
10365
10366
10367
10368<div id="motor_reserva">
10369<!-- booking engine 2 -->
10370	<form action="https://www.hotelcasasnovas.com/booking1" name="searchForm" id="searchForm" method="post" class="paraty-booking-form motor2">
10371
10372
10373        
10374
10375        
10376
10377        
10378
10379        
10380
10381		<input type="hidden" id="language" name="language" value="PORTUGUESE" />
10382		<input type="hidden" id="agesKid1" name="agesKid1" value="" />
10383		<input type="hidden" id="agesKid2" name="agesKid2" value="" />
10384		<input type="hidden" id="agesKid3" name="agesKid3" value="" />
10385
10386        <input id="roomType"  type="hidden" name="roomType" value="">
10387         <input class="roomTypeValue"  type="hidden" name="roomTypeValue" value="">
10388
10389        <input id="roomFilter"  type="hidden" name="roomFilter" value="">
10390        <input id="roomFilterName"  type="hidden" name="roomFilterName" value="">
10391
10392        <input type="hidden" id="roomtype_list_json" name="roomtype_list_json" value="">
10393
10394        <input id="boardFilter"  type="hidden" name="boardFilter" value="">
10395        <input id="keyBooking0Source"  type="hidden" name="keyBooking0Source" value="">
10396
10397        
10398
10399         <input type="hidden" value="" name="priceSeekerHotel" id="priceSeekerHotel"/>
10400
10401        
10402
10403
10404        
10405        
10406
10407        <!-- EXTRA PARAMS -->
10408        
10409        <!-- END EXTRA PARAMS -->
10410
10411        <input type="hidden" id="gclid" name="gclid" value="" />
10412
10413        <input type="hidden" id="using_booking_0" name="using_booking_0" value="" />
10414
10415        
10416
10417        
10418
10419        <input type="hidden" id="namespace" name="namespace" value="casas-novas" />
10420
10421        <div id="booking_engine_title">
10422            
10423            
10424            <h4 id="booking_title1">Reservas</h4>
10425            <h4 id="booking_title2">Reserve agora</h4>
10426            <h3 id="best_price">MELHOR PREÇO ON-LINE</h3>
10427            
10428            
10429            
10430        </div>
10431
10432
10433        
10434
10435
10436		<div id="contenedor_hotel">
10437         
10438        
10439        
10440        
10441        
10442        
10443
10444        
10445        </div>
10446
10447    <fieldset id="contenedor_fechas">
10448        <legend class="sr-only">datas</legend>
10449        <div id="fecha_entrada" class="colocar_fechas fecha_entrada">
10450            <label id="titulo_fecha_entrada" class="float_fecha" for="datepicker1">Data de Chegada</label>
10451            <input type="text" class="float_fecha classdatepicker1" name="startDate" id="datepicker1" tabindex="4" readonly="readonly" autocomplete="off"/>
10452        </div>
10453        <div id="fecha_salida" class="colocar_fechas fecha_salida">
10454            <label id="titulo_fecha_salida" class="float_fecha" for="datepicker2">Data de Saída</label>
10455            <input type="text" class="float_fecha classdatepicker2" name="endDate" id="datepicker2" tabindex="5" readonly="readonly" autocomplete="off"/>
10456        </div>
10457        <div id="contador_noches" class="colocar_fechas">
10458            <p class="float_fecha">Número de noites: X</p>
10459        </div>
10460    </fieldset>
10461
10462
10463    <fieldset id="contenedor_habitaciones" >
10464      <legend class="sr-only">Quartos</legend>
10465      <label for="selector_habitaciones">   Quartos  </label>
10466      <select id="selector_habitaciones" name="numRooms" onchange="mostrarHabitaciones(this.value);" tabindex="6">
10467          
10468              <option value="1" selected="selected">1</option>
10469          
10470              <option value="2" >2</option>
10471          
10472              <option value="3" >3</option>
10473          
10474      </select>
10475    </fieldset>
10476        <fieldset id="contenedor_opciones" class="contenedor_opciones_babies">
10477            <legend class="sr-only">Ocupação</legend>
10478			<div id="hab1">
10479                <label class="numero_habitacion"> Quarto   1</label>
10480                <div class="adultos numero_personas">
10481                    <label class="selector_adultos" id="titulo_adultos">Adultos</label>
10482                    <select class="selector_adultos" id="hab1_adultos" name="adultsRoom1" tabindex="7">
10483                        
10484                            <option value="1" >1</option>
10485                        
10486                            <option value="2"  selected="selected">2</option>
10487                        
10488                            <option value="3" >3</option>
10489                        
10490                            <option value="4" >4</option>
10491                        
10492                            <option value="5" >5</option>
10493                        
10494                            <option value="6" >6</option>
10495                        
10496                            <option value="7" >7</option>
10497                        
10498                            <option value="8" >8</option>
10499                        
10500                    </select>
10501                </div>
10502                <div class="ninos numero_personas ninos-con-babies" title="Bebés grátis">
10503                    <label for="childrenRoom1" id="titulo_ninos" class="selector_ninos">Crianças</label>
10504                    <select id="hab1_ninos" class="selector_ninos" name="childrenRoom1" onchange="" tabindex="8">
10505                        
10506                        <option value="0"  selected="selected" >
10507                        
10508                        0
10509                        
10510                        </option>
10511                        
10512                        <option value="1" >
10513                        
10514                        1
10515                        
10516                        </option>
10517                        
10518                        <option value="2" >
10519                        
10520                        2
10521                        
10522                        </option>
10523                        
10524                        <option value="3" >
10525                        
10526                        3
10527                        
10528                        </option>
10529                        
10530                        <option value="4" >
10531                        
10532                        4
10533                        
10534                        </option>
10535                        
10536                    </select>
10537                    <label id="info_ninos" class="selector_ninos">
10538                    
10539                        
10540                          (De&nbsp;4&nbsp;a&nbsp;12&nbsp;anos)
10541                        
10542                    
10543                    </label>
10544                </div>
10545
10546                
10547                <div class="numero_personas bebes">
10548                    <label class="selector_bebes">Bebés </label>
10549                    <select id="hab1_bebes" class="selector_bebes" name="babiesRoom1" onchange="" tabindex="9">
10550                        
10551                            <option value="0" >0</option>
10552                        
10553                            <option value="1" >1</option>
10554                        
10555                            <option value="2" >2</option>
10556                        
10557                    </select>
10558                </div>
10559                
10560            </div>
10561
10562
10563            <div id="hab2">
10564                <label class="numero_habitacion">Quarto 2</label>
10565                <div class="adultos numero_personas">
10566                    <select class="selector_adultos" id="hab2_adultos" name="adultsRoom2" tabindex="10">
10567                        
10568                        <option value="1" >1</option>
10569                        
10570                        <option value="2"  selected="selected">2</option>
10571                        
10572                        <option value="3" >3</option>
10573                        
10574                        <option value="4" >4</option>
10575                        
10576                        <option value="5" >5</option>
10577                        
10578                        <option value="6" >6</option>
10579                        
10580                        <option value="7" >7</option>
10581                        
10582                        <option value="8" >8</option>
10583                        
10584                    </select>
10585                </div>
10586                <div class="ninos numero_personas ninos-con-babies" title="Bebés grátis">
10587                    <select id="hab2_ninos" class="selector_ninos" name="childrenRoom2" onchange="" tabindex="11">
10588                        
10589                        <option value="0"  selected="selected" >
10590                        
10591                        0
10592                        
10593                        </option>
10594                        
10595                        <option value="1" >
10596                        
10597                        1
10598                        
10599                        </option>
10600                        
10601                        <option value="2" >
10602                        
10603                        2
10604                        
10605                        </option>
10606                        
10607                        <option value="3" >
10608                        
10609                        3
10610                        
10611                        </option>
10612                        
10613                        <option value="4" >
10614                        
10615                        4
10616                        
10617                        </option>
10618                        
10619                    </select>
10620                </div>
10621
10622                
10623                <div class="numero_personas bebes">
10624                    <select id="hab2_bebes" class="selector_bebes" name="babiesRoom2" onchange="" tabindex="12">
10625                        <option value="0" selected="selected">0</option>
10626                        <option value="1">1</option>
10627                        <option value="2">2</option>
10628                    </select>
10629                </div>
10630                
10631            </div>
10632
10633            <div id="hab3">
10634                <label class="numero_habitacion">Quarto 3</label>
10635                <div class="adultos numero_personas">
10636                    <select class="selector_adultos" id="hab3_adultos" name="adultsRoom3" tabindex="13">
10637                        
10638                        <option value="1" >1</option>
10639                        
10640                        <option value="2"  selected="selected">2</option>
10641                        
10642                        <option value="3" >3</option>
10643                        
10644                        <option value="4" >4</option>
10645                        
10646                        <option value="5" >5</option>
10647                        
10648                        <option value="6" >6</option>
10649                        
10650                        <option value="7" >7</option>
10651                        
10652                        <option value="8" >8</option>
10653                        
10654                    </select>
10655                </div>
10656                <div class="ninos numero_personas ninos-con-babies" title="Bebés grátis">
10657                    <select id="hab3_ninos" class="selector_ninos" name="childrenRoom3" onchange="" tabindex="14">
10658                        
10659                        <option value="0"  selected="selected" >
10660                        
10661                        0
10662                        
10663                        </option>
10664                        
10665                        <option value="1" >
10666                        
10667                        1
10668                        
10669                        </option>
10670                        
10671                        <option value="2" >
10672                        
10673                        2
10674                        
10675                        </option>
10676                        
10677                        <option value="3" >
10678                        
10679                        3
10680                        
10681                        </option>
10682                        
10683                        <option value="4" >
10684                        
10685                        4
10686                        
10687                        </option>
10688                        
10689                    </select>
10690                </div>
10691
10692                
10693                <div class="numero_personas bebes">
10694                    <select id="hab3_bebes" class="selector_bebes" name="babiesRoom3" onchange="" tabindex="15">
10695                        <option value="0" selected="selected">0</option>
10696                        <option value="1">1</option>
10697                        <option value="2">2</option>
10698                    </select>
10699                </div>
10700                
10701            </div>
10702		</fieldset>
10703
10704		<fieldset id="envio">
10705            <legend class="sr-only">Reservar</legend>
10706            
10707                <input type="text" id="promocode" class="colocar_envio promocode_input_class" name="promocode" aria-label="Código Promocional"
10708                        placeholder="Código Promocional" 
10709                       value=""
10710                       tabindex="16">
10711
10712                
10713			
10714
10715            <button type="submit" onclick="$(this).addClass('clicked_button');return bookingSearchWithAgeSelection2() " id="search-button" class="colocar_envio buttonsearch-ratecheck" tabindex="17">Reservar</button>
10716            <div id="envio_spinner"></div>
10717        </fieldset>
10718
10719        
10720
10721            <input type="hidden" id="booking-search-popup" name="booking-search-popup" value="true">
10722
10723            
10723<script>
10724
10725                function show_booking_search_popup(myForm) {
10726                    if (typeof(sending_form_custom_from_paraty) == 'undefined'){
10727                        sending_form_custom_from_paraty = true;
10728                        setTimeout( function(myForm) { openBookingSearchPopup(myForm); }, 1000, myForm );
10729                    }
10730                };
10731
10732                function openBookingSearchPopup(myForm) {
10733                    
10734                        return openBookingSearchPopup_v2(myForm);
10735                    
10736
10737                    var elements = [
10738                        
10739                    ]
10740
10741                    var popup_description = "";
10742                    if (typeof(custom_popup_loading_description) != 'undefined') {
10743                        popup_description = custom_popup_loading_description;
10744                    }
10745
10746
10747                    
10748                        showGallery(elements);
10749                    
10750
10751                    myForm.submit();
10752
10753                }
10754
10755                function openBookingSearchPopup_v2(myForm, show_popup=true) {
10756
10757                    if ((window.location !== window.parent.location) && show_popup) {
10758                        const parentMessage = {
10759                            message: 'resize_iframe',
10760                            height: 700,
10761                        };
10762
10763                        window.parent.postMessage(parentMessage, '*');
10764                    }
10765
10766                    var container_booking_popup = $('<div></div>').addClass('container_popup_booking').css('text-align', 'center'),
10767                        loading_popup_top_text = `Atualizando para continuar com sua reserva`;
10768
10769                        
10770                            var loading_popup_top_text = $("<img src='https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb'>");
10771                        
10772                        
10773                        if ($('.logo_namespace').length) {
10774                            var logo_namespace = $("input[name='namespace']").val();
10775                            var url_logo = $('#logo_' + logo_namespace).val();
10776                            loading_popup_top_text = $("<img src='"+ url_logo +"'>");
10777                        }
10778
10779                    let loading_popup_bottom_text = `<div><font color='#030303'>	Verificando a disponibilidade da sua pesquisa:<br />	<br />	De <strong>@@start_date@@</strong> at&eacute; <strong>@@end_date@@</strong></font></div>`,
10780                        descipription_top_booking_popup = $("<div></div>").addClass('description_top_popup_booking').html(loading_popup_top_text);
10781
10782                    const specialLoadingTextElem = $('input[name="special_loading_text"]');
10783                    if(specialLoadingTextElem.length && specialLoadingTextElem.val()){
10784                        loading_popup_bottom_text = specialLoadingTextElem.val();
10785                    }
10786
10787                    let descipription_bottom_booking_popup = $("<div></div>").addClass('description_bottom_popup_booking').html(loading_popup_bottom_text),
10788                        gif_wrapper = $("<div></div>").addClass('gif_wrapper'),
10789                        number_of_lines = 20;
10790
10791                    for (var x = 0; x < number_of_lines; x++) {
10792                        var target_delay_css = {
10793                            '-webkit-animation-delay': -(1.5 - (0.1 * x)) + 's',
10794                            '-moz-animation-delay': -(1.5 - (0.1 * x)) + 's',
10795                            '-o-animation-delay': -(1.5 - (0.1 * x)) + 's',
10796                            'animation-delay': -(1.5 - (0.1 * x)) + 's'
10797                        };
10798                        var element_line_to_append = $("<div></div>").addClass("default_line_loading").css(target_delay_css);
10799                        
10800                            element_line_to_append.css('background', '#3E5902');
10801                        
10802
10803                        element_line_to_append.appendTo(gif_wrapper);
10804                    }
10805
10806                    
10807                        container_booking_popup.css('border', '1px solid #3E5902');
10808                    
10809
10810                    
10811
10812                    
10813
10814                    
10815                        container_booking_popup.append(descipription_top_booking_popup).append(gif_wrapper).append(descipription_bottom_booking_popup);
10816                    
10817
10818                    var selected_start_date = $("input.has_datepicker[name='startDate']").val() || $("input[name='startDate']").val();
10819                        selected_end_date = $("input.has_datepicker[name='endDate']").val() || $("input[name='endDate']").val();
10820                    if(selected_start_date === ''){
10821                        var today = new Date();
10822                        var dd = today.getDate();
10823                        var mm = today.getMonth()+1; //January is 0!
10824                        var yyyy = today.getFullYear();
10825                        if(dd<10) {dd = '0'+dd}
10826                        if(mm<10) {mm = '0'+mm}
10827                        today = dd + '/' + mm + '/' + yyyy;
10828                        selected_start_date = today;
10829                    }
10830
10831                    var custom_format_date = "";
10832                    if (custom_format_date) {
10833
10834                        var splitted_start_date = selected_start_date.split("/"),
10835                            start_day = splitted_start_date[0],
10836                            start_month = splitted_start_date[1],
10837                            start_year = splitted_start_date[2],
10838                            start_datetime = new Date(start_year, start_month - 1, start_day),
10839                            week_start_day = start_datetime.getDay();
10840
10841                        var splitted_end_date = selected_end_date.split("/"),
10842                            end_day = splitted_end_date[0],
10843                            end_month = splitted_end_date[1],
10844                            end_year = splitted_end_date[2],
10845                            end_datetime = new Date(end_year, end_month - 1, end_day),
10846                            week_end_day = end_datetime.getDay();
10847
10848                        var days_list = $.datepicker._defaults.dayNames;
10849
10850                        //Start date
10851                        selected_start_date = custom_format_date.replace("%m", start_month).replace("%d", start_day).replace("%Y", start_year);
10852                        selected_start_date = selected_start_date.replace("%a", days_list[week_start_day]).replace("%bb", _monthNames[start_month - 1]).replace("%b", _monthNames[start_month - 1]);
10853
10854                        //End date
10855                        selected_end_date = custom_format_date.replace("%m", end_month).replace("%d", end_day).replace("%Y", end_year);
10856                        selected_end_date = selected_end_date.replace("%a", days_list[week_end_day]).replace("%bb", _monthNames[end_month - 1]).replace("%b", _monthNames[end_month - 1]);
10857                    }
10858
10859                    //Protection for failures
10860                    if(selected_start_date.indexOf('NaN') > -1 || selected_end_date.indexOf('NaN')){
10861                        container_booking_popup.html(container_booking_popup.html().replace("@@start_date@@", selected_start_date).replace("@@end_date@@", selected_end_date));
10862                    } else {
10863                        container_booking_popup.find(".description_bottom_popup_booking").remove();
10864                    }
10865                    if (show_popup) {
10866                        var fancybox_params = {
10867                            width: 'auto',
10868                            maxWidth: 800,
10869                            height: 'auto',
10870                            fitToView: false,
10871                            autoSize: false,
10872                            padding: 0,
10873                            closeClick: false,
10874                            closeBtn: false,
10875                            helpers: {
10876                                overlay: {
10877                                    css:
10878                                        {'background': '#FFFFFF'},
10879                                    closeClick: false
10880                                } // prevents closing when clicking OUTSIDE fancybox
10881                            },
10882                            wrapCSS: 'fancy-booking-search_v2 full_screen_engine custom_color_overlay',
10883                            beforeShow: function () {
10884                                $('.fancybox-bg').css('background', '#FFFFFF');
10885                                if (typeof (cookiesController) !== 'undefined' && cookiesController.search_cookie("step_history_back")) {
10886                                    cookiesController.delete_cookie("step_history_back");
10887                                }
10888                            }
10889                        };
10890                        if ($.fancybox.version.slice(0, 2) === '3.') {
10891                            fancybox_params['baseClass'] = 'fancybox-wrap fancy-booking-search_v2 full_screen_engine custom_color_overlay';
10892                            fancybox_params['modal'] = true;
10893                            $.fancybox.open(container_booking_popup, fancybox_params);
10894                        } else {
10895                            $.fancybox(container_booking_popup, fancybox_params);
10896                        }
10897                        if (myForm) {
10898                            if (!navigator.userAgent.match(/chrome/i) && (navigator.userAgent.match(/safari/i) || !navigator.userAgent.match(/firefox/i))) {
10899                                setTimeout(function () {
10900                                    myForm.submit();
10901                                }, 700);
10902                            } else {
10903                                myForm.submit();
10904                            }
10905                        }
10906                    }
10907                }
10908
10909
10910                
10911
10912                function showGallery(elements) {
10913                    $.fancybox(elements, {
10914                        'modal': true,
10915                        'closeBtn': false,
10916                        'autoPlay': true,
10917                        'playSpeed': 3000,
10918                        'prevEffect': 'none',
10919                        'nextEffect': 'none',
10920                        'type': 'image',
10921                        'arrows': false,
10922                        'nextClick': false,
10923                        'mouseWheel': false,
10924                        'helpers': {
10925                            title: {
10926                                type: 'outside'
10927                            },
10928                            overlay: {
10929                                opacity: 0.8,
10930                                css: {
10931                                    'background-color': '#000'
10932                                }
10933                            }
10934                        },
10935                        'padding': 0
10936                    });
10937                }
10938
10939            </script>
10939
10940
10941        
10942
10943	</form>
10944
10945    
10946
10947 </div>
10948
10949 
10950 <!-- Javascript at the bottom to increase speed -->
10951
10952 
10953<script src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/js/datepicker/jquery.ui.datepicker-pt.js?v=1.3" type="text/javascript" crossorigin="anonymous"></script>
10953
10954 
10955
10956<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/lib/spin.min.js" crossorigin="anonymous" integrity="sha512-V8YgI4rsECe0shqE5P2p/ecolN3asrnTMTChlJ1pwxjrtc2nxJyYDP3k55/9Yxp+qsTDUMrUoAd7q62sC998Gw=="></script>
10956
10957
10958
10959<!-- Javascript at the bottom to increase speed -->
10960
10961
10962<style>
10963.ui-dialog {
10964	position: absolute;
10965	top: 0;
10966	left: 0;
10967	padding: .2em;
10968	outline: 0;
10969}
10970.ui-dialog .ui-dialog-titlebar {
10971	padding: .4em 1em;
10972	position: relative;
10973}
10974.ui-dialog .ui-dialog-title {
10975	float: left;
10976	margin: .1em 0;
10977	white-space: nowrap;
10978	width: 90%;
10979	overflow: hidden;
10980	text-overflow: ellipsis;
10981}
10982.ui-dialog .ui-dialog-titlebar-close {
10983	position: absolute;
10984	right: .3em;
10985	top: 50%;
10986	width: 21px;
10987	margin: -10px 0 0 0;
10988	padding: 1px;
10989	height: 20px;
10990}
10991.ui-dialog .ui-dialog-content {
10992	position: relative;
10993	border: 0;
10994	padding: .5em 1em;
10995	background: none;
10996	overflow: auto;
10997	text-align: center;
10998}
10999.ui-dialog .ui-dialog-buttonpane {
11000	text-align: left;
11001	border-width: 1px 0 0 0;
11002	background-image: none;
11003	margin-top: .5em;
11004	padding: .3em 1em .5em .4em;
11005}
11006.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
11007	/*float: right;*/
11008	float: none;
11009	text-align: center;
11010}
11011.ui-dialog .ui-dialog-buttonpane button {
11012	margin: .5em .4em .5em 0;
11013	cursor: pointer;
11014}
11015.ui-dialog .ui-resizable-se {
11016	width: 12px;
11017	height: 12px;
11018	right: -5px;
11019	bottom: -5px;
11020	background-position: 16px 16px;
11021}
11022.ui-dialog .ui-button-text {
11023	/*padding: 10px;*/
11024	/*margin: 10px;*/
11025}
11026
11027.ui-dialog .ui-button{
11028	/*height: 30px;*/
11029}
11030
11031.ui-draggable .ui-dialog-titlebar {
11032	cursor: move;
11033}
11034
11035.ui-dialog {
11036	min-width: 300px;
11037    z-index: 9999;
11038}
11039
11040</style>
11041
11042 <style>
11043	.ui-dialog-titlebar-close {
11044 		display: none !important;
11045	}
11046
11047	#dialog-form{
11048		padding: 10px;
11049	}
11050
11051	.ui-dialog-titlebar{
11052		padding: 5px;
11053	}
11054
11055	.kidAgesSelect{
11056		margin-left: 10px;
11057
11058	}
11059
11060
11061</style>
11062
11063<!-- New style Age popup -->
11064<style>
11065body .ui-widget-overlay.ui-front {
11066  background: rgba(0, 0, 0, 0.6);
11067  opacity: 1;
11068  z-index: 9998;
11069  position: fixed;
11070}
11071body .ui-dialog.ui-widget {
11072  padding: 20px 10px;
11073  border: 0;
11074  border-radius: 0;
11075  line-height: 1;
11076    max-width: 370px;
11077    width: 100% !important;
11078    box-sizing: border-box;
11079}
11080body .ui-dialog.ui-widget .ui-dialog-titlebar {
11081  background: none!important;
11082  padding: 0 0 20px 0;
11083  border-radius: 0;
11084  border: 0;
11085  color: black!important;
11086  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
11087  text-align: center;
11088  margin-bottom: 20px;
11089}
11090body .ui-dialog.ui-widget .ui-dialog-titlebar .ui-dialog-title {
11091  width: 100%;
11092  margin: 0;
11093}
11094body .ui-dialog.ui-widget #dialog-form {
11095  padding: 0;
11096  text-align: left;
11097  width: 100% !important;
11098    max-width: 350px;
11099}
11100body .ui-dialog.ui-widget #dialog-form form label {
11101  clear: both;
11102  width: 100%;
11103  float: left;
11104}
11105body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids {
11106  display: inline-block;
11107  width: 100%;
11108  float: left;
11109}
11110body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select {
11111  width: calc((100% - 10px)/2);
11112  margin: 0px 10px 10px 0;
11113  float: left;
11114  -webkit-appearance: none;
11115  -moz-appearance: none;
11116  appearance: none;
11117  border-radius: 0;
11118  padding: 5px 10px;
11119}
11120body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(even) {
11121  margin-right: 0;
11122}
11123body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(-n+2) {
11124  margin-top: 10px;
11125}
11126body .ui-dialog.ui-widget .ui-dialog-buttonpane {
11127  margin: 0;
11128  padding: 0;
11129  vertical-align: bottom;
11130  display: inline-block;
11131  float: left;
11132  width: 100% !important;
11133    max-width: 350px;
11134  border-radius: 0;
11135  margin-top: 10px;
11136}
11137body .ui-dialog.ui-widget .ui-dialog-buttonpane .ui-button {
11138  margin: 0;
11139  display: inline-block;
11140  width: 100% !important;
11141    max-width: 350px;
11142  border-radius: 0;
11143  background: #446ca9;
11144  color:white;
11145}
11146body .ui-dialog.ui-widget .ui-resizable-handle {
11147  display: none;
11148}
11149</style>
11150<!--  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" type="text/css"/> -->
11151 <div id="dialog-form"  title="As idades das crianças" style="display:none">
11152    <form>
11153        
11154        <label id="label1" for="name">Quarto 1</label>
11155        <div class="wrapper_age_kids clearfix">
11156          
11157                
11158
11159                    <select class="kidAgesSelect" id="agesRoom1_1" name="name" tabindex="1">
11160                    
11161                      <option value="4" selected="selected">4</option>
11162                    
11163                      <option value="5" >5</option>
11164                    
11165                      <option value="6" >6</option>
11166                    
11167                      <option value="7" >7</option>
11168                    
11169                      <option value="8" >8</option>
11170                    
11171                      <option value="9" >9</option>
11172                    
11173                      <option value="10" >10</option>
11174                    
11175                      <option value="11" >11</option>
11176                    
11177                      <option value="12" >12</option>
11178                    
11179                    </select>
11180
11181                
11182
11183                    <select class="kidAgesSelect" id="agesRoom1_2" name="name" tabindex="1">
11184                    
11185                      <option value="4" selected="selected">4</option>
11186                    
11187                      <option value="5" >5</option>
11188                    
11189                      <option value="6" >6</option>
11190                    
11191                      <option value="7" >7</option>
11192                    
11193                      <option value="8" >8</option>
11194                    
11195                      <option value="9" >9</option>
11196                    
11197                      <option value="10" >10</option>
11198                    
11199                      <option value="11" >11</option>
11200                    
11201                      <option value="12" >12</option>
11202                    
11203                    </select>
11204
11205                
11206
11207                    <select class="kidAgesSelect" id="agesRoom1_3" name="name" tabindex="1">
11208                    
11209                      <option value="4" selected="selected">4</option>
11210                    
11211                      <option value="5" >5</option>
11212                    
11213                      <option value="6" >6</option>
11214                    
11215                      <option value="7" >7</option>
11216                    
11217                      <option value="8" >8</option>
11218                    
11219                      <option value="9" >9</option>
11220                    
11221                      <option value="10" >10</option>
11222                    
11223                      <option value="11" >11</option>
11224                    
11225                      <option value="12" >12</option>
11226                    
11227                    </select>
11228
11229                
11230
11231                    <select class="kidAgesSelect" id="agesRoom1_4" name="name" tabindex="1">
11232                    
11233                      <option value="4" selected="selected">4</option>
11234                    
11235                      <option value="5" >5</option>
11236                    
11237                      <option value="6" >6</option>
11238                    
11239                      <option value="7" >7</option>
11240                    
11241                      <option value="8" >8</option>
11242                    
11243                      <option value="9" >9</option>
11244                    
11245                      <option value="10" >10</option>
11246                    
11247                      <option value="11" >11</option>
11248                    
11249                      <option value="12" >12</option>
11250                    
11251                    </select>
11252
11253                
11254        
11255        </div>
11256
11257		
11258        <label id="label2" for="name">Quarto 2</label>
11259        <div class="wrapper_age_kids clearfix">
11260          
11261                
11262
11263                    <select class="kidAgesSelect" id="agesRoom2_1" name="name" tabindex="1">
11264                    
11265                      <option value="4" selected="selected">4</option>
11266                    
11267                      <option value="5" >5</option>
11268                    
11269                      <option value="6" >6</option>
11270                    
11271                      <option value="7" >7</option>
11272                    
11273                      <option value="8" >8</option>
11274                    
11275                      <option value="9" >9</option>
11276                    
11277                      <option value="10" >10</option>
11278                    
11279                      <option value="11" >11</option>
11280                    
11281                      <option value="12" >12</option>
11282                    
11283                    </select>
11284
11285                
11286
11287                    <select class="kidAgesSelect" id="agesRoom2_2" name="name" tabindex="1">
11288                    
11289                      <option value="4" selected="selected">4</option>
11290                    
11291                      <option value="5" >5</option>
11292                    
11293                      <option value="6" >6</option>
11294                    
11295                      <option value="7" >7</option>
11296                    
11297                      <option value="8" >8</option>
11298                    
11299                      <option value="9" >9</option>
11300                    
11301                      <option value="10" >10</option>
11302                    
11303                      <option value="11" >11</option>
11304                    
11305                      <option value="12" >12</option>
11306                    
11307                    </select>
11308
11309                
11310
11311                    <select class="kidAgesSelect" id="agesRoom2_3" name="name" tabindex="1">
11312                    
11313                      <option value="4" selected="selected">4</option>
11314                    
11315                      <option value="5" >5</option>
11316                    
11317                      <option value="6" >6</option>
11318                    
11319                      <option value="7" >7</option>
11320                    
11321                      <option value="8" >8</option>
11322                    
11323                      <option value="9" >9</option>
11324                    
11325                      <option value="10" >10</option>
11326                    
11327                      <option value="11" >11</option>
11328                    
11329                      <option value="12" >12</option>
11330                    
11331                    </select>
11332
11333                
11334
11335                    <select class="kidAgesSelect" id="agesRoom2_4" name="name" tabindex="1">
11336                    
11337                      <option value="4" selected="selected">4</option>
11338                    
11339                      <option value="5" >5</option>
11340                    
11341                      <option value="6" >6</option>
11342                    
11343                      <option value="7" >7</option>
11344                    
11345                      <option value="8" >8</option>
11346                    
11347                      <option value="9" >9</option>
11348                    
11349                      <option value="10" >10</option>
11350                    
11351                      <option value="11" >11</option>
11352                    
11353                      <option value="12" >12</option>
11354                    
11355                    </select>
11356
11357                
11358        
11359        </div>
11360
11361		
11362        <label id="label3" for="name">Quarto 3</label>
11363        <div class="wrapper_age_kids clearfix">
11364          
11365                
11366
11367                    <select class="kidAgesSelect" id="agesRoom3_1" name="name" tabindex="1">
11368                    
11369                      <option value="4" selected="selected">4</option>
11370                    
11371                      <option value="5" >5</option>
11372                    
11373                      <option value="6" >6</option>
11374                    
11375                      <option value="7" >7</option>
11376                    
11377                      <option value="8" >8</option>
11378                    
11379                      <option value="9" >9</option>
11380                    
11381                      <option value="10" >10</option>
11382                    
11383                      <option value="11" >11</option>
11384                    
11385                      <option value="12" >12</option>
11386                    
11387                    </select>
11388
11389                
11390
11391                    <select class="kidAgesSelect" id="agesRoom3_2" name="name" tabindex="1">
11392                    
11393                      <option value="4" selected="selected">4</option>
11394                    
11395                      <option value="5" >5</option>
11396                    
11397                      <option value="6" >6</option>
11398                    
11399                      <option value="7" >7</option>
11400                    
11401                      <option value="8" >8</option>
11402                    
11403                      <option value="9" >9</option>
11404                    
11405                      <option value="10" >10</option>
11406                    
11407                      <option value="11" >11</option>
11408                    
11409                      <option value="12" >12</option>
11410                    
11411                    </select>
11412
11413                
11414
11415                    <select class="kidAgesSelect" id="agesRoom3_3" name="name" tabindex="1">
11416                    
11417                      <option value="4" selected="selected">4</option>
11418                    
11419                      <option value="5" >5</option>
11420                    
11421                      <option value="6" >6</option>
11422                    
11423                      <option value="7" >7</option>
11424                    
11425                      <option value="8" >8</option>
11426                    
11427                      <option value="9" >9</option>
11428                    
11429                      <option value="10" >10</option>
11430                    
11431                      <option value="11" >11</option>
11432                    
11433                      <option value="12" >12</option>
11434                    
11435                    </select>
11436
11437                
11438
11439                    <select class="kidAgesSelect" id="agesRoom3_4" name="name" tabindex="1">
11440                    
11441                      <option value="4" selected="selected">4</option>
11442                    
11443                      <option value="5" >5</option>
11444                    
11445                      <option value="6" >6</option>
11446                    
11447                      <option value="7" >7</option>
11448                    
11449                      <option value="8" >8</option>
11450                    
11451                      <option value="9" >9</option>
11452                    
11453                      <option value="10" >10</option>
11454                    
11455                      <option value="11" >11</option>
11456                    
11457                      <option value="12" >12</option>
11458                    
11459                    </select>
11460
11461                
11462        
11463        </div>
11464
11465		
11466    </form>
11467</div>
11468
11469<script type="text/javascript">
11470
11471    function sendActiveForm_booking_engine2() {
11472
11473        $(".booking_form").each(function () {
11474            if ($(this).find(".submit_button").css("display") == "none" || $(this).find(".submit_button").hasClass('clicked_button')) {
11475                if ($('#booking-search-popup').length) {
11476                    show_booking_search_popup($(this));
11477                    return false;
11478                }
11479
11480                $(this).submit();
11481                return true;
11482            }
11483        });
11484
11485        $("#searchForm").each(function () {
11486            if ($(this).find("#search-button").css("display") == "none") {
11487                if ($('#booking-search-popup').length) {
11488                    show_booking_search_popup($(this));
11489                    return false;
11490                }
11491
11492                $(this).submit();
11493                return true;
11494            }
11495        });
11496
11497
11498    }
11499
11500function bookingSearchWithAgeSelection2(){
11501	if (!checkDates()){
11502		return false;
11503	};
11504
11505	kids1 = $('#hab1_ninos').val();
11506	kids2 = $('#hab2_ninos').val();
11507	kids3 = $('#hab3_ninos').val();
11508    numRooms = $("input[name='numRooms']").val();
11509
11510	if (kids1 == "0" && (kids2 == "0" || numRooms == '1') && (kids3 == "0" || numRooms == '1' || numRooms == '2')){
11511		if (bookingSearch()){
11512
11513    		$('#searchForm').submit();
11514    	}
11515	} else {
11516		updateAgesOptions2();
11517		$("#dialog-form").dialog("open");
11518		return false;
11519	}
11520}
11521
11522function updateAgesOptions2() {
11523
11524	var numHab = $("#selector_habitaciones").val();
11525
11526	for ( var i = 3; i > 0; i--) {
11527
11528		$("#label" + i).hide();
11529		$("#dialog-form #agesRoom" + i + "_1, #full_wrapper_booking #agesRoom" + i +"_1").hide();
11530		$("#dialog-form #agesRoom" + i + "_2, #full_wrapper_booking #agesRoom" + i +"_2").hide();
11531		$("#dialog-form #agesRoom" + i + "_3, #full_wrapper_booking #agesRoom" + i +"_3").hide();
11532		$("#dialog-form #agesRoom" + i + "_4, #full_wrapper_booking #agesRoom" + i +"_4").hide();
11533	}
11534	for ( var i = numHab; i > 0; i--) {
11535		numKids = $("#hab" + i + "_ninos").val();
11536		if (numKids > 0){
11537			$("#label" + i).show();
11538
11539			$("#dialog-form #agesRoom" + i + "_1, #full_wrapper_booking #agesRoom" + i +"_1").show();
11540			if (numKids > 1)
11541				$("#dialog-form #agesRoom" + i + "_2, #full_wrapper_booking #agesRoom" + i +"_2").show();
11542			if (numKids > 2)
11543			    $("#dialog-form #agesRoom" + i + "_3, #full_wrapper_booking #agesRoom" + i +"_3").show();
11544			if (numKids > 3)
11545			    $("#dialog-form #agesRoom" + i + "_4, #full_wrapper_booking #agesRoom" + i +"_4").show();
11546		}
11547	}
11548}
11549
11550$(function() {
11551    if (!$("#dialog-form").hasClass('ui-dialog-content')) {
11552        $("#dialog-form").dialog({
11553            width: "auto",
11554            autoOpen: false,
11555
11556            modal: true,
11557            buttons: {
11558                "Continuar": function() {
11559                    $( this ).dialog( "close" );
11560                    var dialog_wrapper = $(this);
11561
11562                    $("input[name='agesKid1']").each(function() {
11563                        var age_1_1 = dialog_wrapper.find("#agesRoom1_1").val();
11564                        var age_1_2 = dialog_wrapper.find("#agesRoom1_2").val();
11565                        var age_1_3 = dialog_wrapper.find("#agesRoom1_3").val();
11566                        var age_1_4 = dialog_wrapper.find("#agesRoom1_4").val();
11567                        $(this).val(age_1_1 + ";" + age_1_2 + ";" + age_1_3 + ";" + age_1_4);
11568                    });
11569                    $("input[name='agesKid2']").each(function () {
11570                        var age_2_1 = dialog_wrapper.find("#agesRoom2_1").val();
11571                        var age_2_2 = dialog_wrapper.find("#agesRoom2_2").val();
11572                        var age_2_3 = dialog_wrapper.find("#agesRoom2_3").val();
11573                        var age_2_4 = dialog_wrapper.find("#agesRoom2_4").val();
11574                        $(this).val(age_2_1 + ";" + age_2_2 + ";" + age_2_3 + ";" + age_2_4);
11575                    });
11576                    $("input[name='agesKid3']").each(function () {
11577                        var age_3_1 = dialog_wrapper.find("#agesRoom3_1").val();
11578                        var age_3_2 = dialog_wrapper.find("#agesRoom3_2").val();
11579                        var age_3_3 = dialog_wrapper.find("#agesRoom3_3").val();
11580                        var age_3_4 = dialog_wrapper.find("#agesRoom3_4").val();
11581                        $(this).val(age_3_1 + ";" + age_3_2 + ";" + age_3_3 + ";" + age_3_4);
11582                    });
11583
11584                    bookingSearch();
11585                    sendActiveForm_booking_engine2();
11586                }
11587            }
11588        });
11589    }
11590
11591    updateAgesOptions2(1);
11592});
11593</script>
11593
11594
11595
11596<script type="text/javascript">
11597
11598
11599
11600    var datePicker1Selector = ".classdatepicker1";
11601    var datePicker2Selector = ".classdatepicker2";
11602
11603
11604
11605
11606$("#hotel_destino").change(function() {
11607	  var action = $(this).val();
11608	  $("#searchForm").attr("action", action);
11609      var newNamespace = namespaces[action];
11610      $("#namespace").val(newNamespace);
11611
11612	});
11613
11614
11615
11616
11617	
11618
11619
11620
11621
11622$(function(){
11623    $.datepicker.setDefaults($.datepicker.regional["pt"]);
11624});
11625
11626var checkDates = function() {
11627
11628
11629	var date1_str = $(datePicker1Selector).val();
11630	var date2_str = $(datePicker2Selector).val();
11631
11632	if (date1_str == "" || date2_str == ""){
11633		return false;
11634	} else {
11635		return true;
11636	}
11637}
11638
11639$(document).ready(function () {
11640
11641  if ($('#internalStartDate').length != 0) {
11642        var startDate = $('#internalStartDate').val();
11643        var startYear = startDate.substring(0,4);
11644        var startMonth = startDate.substring(5,7);
11645        var startDay = startDate.substring(8,10);
11646        var startParse = startDay + "/" + startMonth + "/" + startYear;
11647        var endDate = $('#internalEndDate').val();
11648        var endYear = endDate.substring(0,4);
11649        var endMonth = endDate.substring(5,7);
11650        var endDay = endDate.substring(8,10);
11651        var endParse = endDay + "/" + endMonth + "/" + endYear;
11652    } else {
11653        var startParse = "";
11654        var endParse = "";
11655    }
11656
11657	$(datePicker1Selector).val(startParse);
11658	$(datePicker2Selector).val(endParse);
11659
11660	if ($(".internalUrlParamsTransfer").length){
11661
11662	    let target_value = $(".internalUrlParamsTransfer").val();
11663	    if (!$(".transfer_to_booking").length) {
11664	        $(".paraty-booking-form").each(function(){
11665                $(this).append($("<input type='hidden' class='transfer_to_booking' name='transfer_url_params' value='" + target_value + "'>"));
11666            })
11667        } else {
11668	        $(".transfer_to_booking").val(target_value)
11669        }
11670    }
11671
11672    if ($('#internalNumRooms').length != 0){
11673
11674        $("#selector_habitaciones").val($("#internalNumRooms").val());
11675        $("#selector_habitaciones").change();
11676
11677        var internalNum1AdultsRooms = 2;
11678        var internalNum2AdultsRooms = 2;
11679        var internalNum3AdultsRooms = 2;
11680
11681        var internalNum1BabiesRooms = 0;
11682        var internalNum2BabiesRooms = 0;
11683        var internalNum3BabiesRooms = 0;
11684
11685        if ($('#internalNum1AdultsRooms').length != 0) internalNum1AdultsRooms = $("#internalNum1AdultsRooms").val()
11686        if ($('#internalNum2AdultsRooms').length != 0) internalNum2AdultsRooms = $("#internalNum2AdultsRooms").val()
11687        if ($('#internalNum3AdultsRooms').length != 0) internalNum3AdultsRooms = $("#internalNum3AdultsRooms").val()
11688
11689
11690        if ($('#internalNum1BabiesRooms').length != 0) internalNum1BabiesRooms = $("#internalNum1BabiesRooms").val()
11691        if ($('#internalNum2BabiesRooms').length != 0) internalNum2BabiesRooms = $("#internalNum2BabiesRooms").val()
11692        if ($('#internalNum3BabiesRooms').length != 0) internalNum3BabiesRooms = $("#internalNum3BabiesRooms").val()
11693
11694
11695        $("#hab1_adultos").val(internalNum1AdultsRooms);
11696        $("#hab2_adultos").val(internalNum2AdultsRooms);
11697        $("#hab3_adultos").val(internalNum3AdultsRooms);
11698        $("#hab1_ninos").val($("#internalNum1KidsRooms").val());
11699        $("#hab2_ninos").val($("#internalNum2KidsRooms").val());
11700        $("#hab3_ninos").val($("#internalNum3KidsRooms").val());
11701        $("#hab1_bebes").val(internalNum1BabiesRooms);
11702        $("#hab2_bebes").val(internalNum2BabiesRooms);
11703        $("#hab3_bebes").val(internalNum3BabiesRooms);
11704
11705
11706
11707
11708    }
11709
11710
11711if ($("#internalPromocode") && $("#internalPromocode").val()){
11712
11713  $("#promocode").val($("#internalPromocode").val());
11714}
11715
11716	
11717
11718    
11719    if (typeof(DP_extend_info) === 'undefined' || !DP_extend_info.config.initialized || DP_extend_info.config.start_datepicker_input !== datePicker1Selector) {
11720        $(datePicker1Selector).datepicker({
11721
11722            
11723            minDate: new Date(),
11724            altFormat: "dd/mm/yy",
11725            dateFormat: "dd/mm/yy",
11726            
11727            onClose: function (selectedDate, inst) {
11728                if (selectedDate) {
11729                    var theDate = $.datepicker.parseDate("dd/mm/yy", selectedDate);
11730
11731                    var theSelectedDate = $.datepicker.parseDate("dd/mm/yy", selectedDate);
11732                    theSelectedDate.setDate(theSelectedDate.getDate());
11733                    $(datePicker1Selector).datepicker('setDate', theSelectedDate);
11734
11735                    if (typeof(min_stay_number) != 'undefined'){
11736                        theDate.setDate(theDate.getDate() + min_stay_number);
11737                    } else {
11738                        theDate.setDate(theDate.getDate() + 1);
11739                    }
11740                    $(datePicker2Selector).datepicker("option", "minDate", theDate);
11741                    $(datePicker2Selector).datepicker('setDate', theDate);
11742                    $(this).closest("#contenedor_fechas").find(datePicker2Selector).datepicker("show");
11743                }
11744            }
11745        });
11746
11747
11748        $(datePicker2Selector).datepicker({
11749            
11750            
11751            minDate: minDateDeparture(),
11752            altFormat: "dd/mm/yy",
11753            dateFormat: "dd/mm/yy"
11754        });
11755
11756
11757        $(datePicker1Selector).change(function () {
11758            var date2 = $(this).datepicker('getDate', '+3d');
11759            $(datePicker1Selector).datepicker('setDate', date2);
11760            date2.setDate(date2.getDate() + 1);
11761            $(datePicker2Selector).datepicker('setDate', date2);
11762            checkDates();
11763        });
11764
11765        $(datePicker2Selector).change(function () {
11766            var date2 = $(this).datepicker('getDate', '+3d');
11767            $(datePicker2Selector).datepicker('setDate', date2);
11768            checkDates();
11769        });
11770
11771        $(datePicker1Selector).removeAttr('disabled');
11772        $(datePicker2Selector).removeAttr('disabled');
11773    }
11774    
11775
11776
11777
11778});
11779
11780
11781
11782
11783function  minDateDeparture(){
11784
11785   if  ($(datePicker1Selector).val()){
11786        var theDate = $.datepicker.parseDate("dd/mm/yy", $(datePicker1Selector).val());
11787        theDate.setDate(theDate.getDate() + 1 );
11788   }
11789   else{
11790       var theDate = new Date();
11791   }
11792
11793    return theDate;
11794
11795}
11796
11797function mostrarHabitaciones(selector_habitaciones) {
11798
11799
11800
11801	for ( var i = 3; i > selector_habitaciones; i--) {
11802
11803        //$('#hab' + i).hide();
11804	    $('[id="hab'+ i + '"]').each(function() {
11805            $(this).hide();
11806        });
11807
11808		//$('#childrenRoom' + (i + 1)).val("0");
11809		$('[id="childrenRoom'+ (i + 1) + '"]').each(function() {
11810            $(this).val("0");
11811        });
11812	}
11813	for ( var i = selector_habitaciones; i > 0; i--) {
11814		//$('#hab' + i).show();
11815
11816		$('[id="hab'+ i + '"]').each(function() {
11817            $(this).show();
11818
11819        });
11820	}
11821}
11822
11823function bookingSearch(){
11824	
11825		if (!checkDates()){
11826			return false;
11827		}
11828
11829        var destination_input = $("form.paraty-booking-form.motor2").find(".destination");
11830        if(destination_input.length && destination_input.val() == ''){
11831            $("form.paraty-booking-form .destination_field, form.paraty-booking-form.motor2 .destination_wrapper").show();
11832            return false;
11833        }
11834
11835        try {
11836            ga(function (tracker) {
11837                client_id = tracker.get('clientId');
11838            });
11839            $('<input>').attr({
11840                type: 'hidden',
11841                id: '_ga',
11842                name: '_ga',
11843                value: client_id
11844            }).appendTo($("#search-button").closest('form'));
11845        }
11846        catch (err) {
11847            console.log("Google Analytics defined incorrectly (May use a old version)");
11848        }
11849	
11850		var opts = {
11851		  lines: 13, // The number of lines to draw
11852		  length: 4, // The length of each line
11853		  width: 3, // The line thickness
11854		  radius: 10, // The radius of the inner circle
11855		  rotate: 0, // The rotation offset
11856		  color: '#e1e1e1', // #rgb or #rrggbb
11857		  speed: 1.5, // Rounds per second
11858		  trail: 60, // Afterglow percentage
11859		  shadow: false, // Whether to render a shadow
11860		  hwaccel: false, // Whether to use hardware acceleration
11861		  className: 'spinner', // The CSS class to assign to the spinner
11862		  zIndex: 2e9, // The z-index (defaults to 2000000000)
11863		  top: 'auto', // Top position relative to parent in px
11864		  left: 'auto' // Left position relative to parent in px
11865		};
11866
11867		
11868		var target = document.getElementById('envio_spinner');
11869
11870        if( $('#booking-search-popup').length ) {
11871            show_booking_search_popup($('#searchForm'));
11872            return false;
11873
11874        } else {
11875		    $("#search-button").hide();
11876		    var spinner = new Spinner(opts).spin(target);
11877            $('#searchForm').submit();
11878        }
11879};
11880
11881</script>
11881
11882
11883
11884<script>
11885    adult_tag = "Adulto";
11886    adults_tag = "Adultos";
11887    kid_tag = "Criança";
11888    kids_tag = "Crianças";
11889    baby_tag = "Bebé";
11890    babies_tag = "Bebés";
11891    no_dispo_text = "não disponível";
11892</script>
11892
11893
11894
11895    
11896
11897
11898<script async>
11899    ($ => {
11900        if (typeof window.only_once_rescueseeker == "undefined") {
11901            // Reserve synchronously so a concurrent re-injection does not fire a second load.
11902            window.only_once_rescueseeker = 1;
11903            $.getScript("https://rescueseeker-default-697653561069.europe-west1.run.app/static/rescue-seeker/common/js/rescue-seeker-widget.js?v=2")
11904                .done(function (script, textStatus) {
11905                    if (typeof RescueSeeker === 'undefined') {
11906                        console.error("RESCUE SEEKER: script loaded but global missing");
11907                        window.only_once_rescueseeker = undefined; // release so a later load can retry
11908                        return;
11909                    }
11910                    console.log("RESCUE SEEKER: Main rescue seeker script loaded!");
11911
11912                    
11913                        RescueSeeker.config.email_controller = 'hotel-webs';
11914                    
11915                    RescueSeeker.load('casas-novas', 'pt', 'paraty');
11916                })
11917                .fail(function (jqxhr, settings, exception) {
11918                    window.only_once_rescueseeker = undefined; // release on failure so a later load can retry
11919                    console.error("RESCUE SEEKER: Main rescue seeker script NOT loaded!");
11920                    console.error(exception);
11921                });
11922        }
11923    })(jQuery);
11924</script>
11924
11925
11926
11927
11928
11929
11930
11931</div>
11932            </div>
11933        </div>
11934    </div>
11935
11936
11937
11938<script>
11939    $(document).on('popupSeekerReady', function () {
11940        const sid = new URL(window.location.href).searchParams.get('sid');
11941        const sidParam = sid ? `&sid=${encodeURIComponent(sid)}` : '';
11942        $.post(`/utils?action=get_last_search&namespace=casas-novas${sidParam}`)
11943            .done(function (data) {
11944                if (data.event_name && data.event_data) {
11945                    $(document).trigger(data.event_name, data.event_data);
11946                }
11947            })
11948            .fail(function (jqxhr, settings, exception) {
11949                console.error("LAST SEARCH: get_last_search request failed!");
11950                console.error(exception);
11951            });
11952    });
11953
11954    $(document).on('last_search.copy_url', function (event, eventData) {
11955        const shareElement = $("#share_last_search");
11956        const path = (shareElement.data('link') || '').trim() || window.last_search?.search_url;
11957
11958        if (!path) {
11959            showCopyErrorNotification('');
11960            return;
11961        }
11962
11963        const link = window.location.origin + path;
11964
11965        if (navigator.clipboard && navigator.clipboard.writeText) {
11966            navigator.clipboard.writeText(link).then(function() {
11967                showCopySuccessNotification();
11968            }).catch(function(err) {
11969                fallbackCopyToClipboard(link);
11970            });
11971        } else {
11972            fallbackCopyToClipboard(link);
11973        }
11974
11975        // Fallback for older browsers or errors
11976        function fallbackCopyToClipboard(text) {
11977            try {
11978                const tempInput = $('<input>');
11979                $('body').append(tempInput);
11980                tempInput.val(text).select();
11981
11982                const successful = document.execCommand('copy');
11983                tempInput.remove();
11984
11985                if (successful) {
11986                    showCopySuccessNotification();
11987                } else {
11988                    showCopyErrorNotification(text);
11989                }
11990            } catch (err) {
11991                showCopyErrorNotification(text);
11992            }
11993        }
11994
11995        function showCopySuccessNotification() {
11996            try {
11997                $(document).trigger("notification.popup.seeker", {
11998                    type: 'success',
11999                    title: 'Copiado!',
12000                    content: 'O link de pesquisa foi copiado para sua área de transferência'
12001                });
12002            } catch {
12003                alert('O link de pesquisa foi copiado para sua área de transferência');
12004            }
12005        }
12006
12007        function showCopyErrorNotification(link) {
12008            try {
12009                $(document).trigger("notification.popup.seeker", {
12010                    type: 'error',
12011                    title: "Erro de cópia",
12012                    content: `Você não pode copiar o link para a área de transferência. Experimente novamente ou copie o URL manualmente. ${link}`
12013                });
12014            } catch {
12015                alert(`Você não pode copiar o link para a área de transferência. Experimente novamente ou copie o URL manualmente. ${link}`);
12016            }
12017        }
12018    });
12019</script>
12019<script data-cookieconsent="ignore" src="https://popup-seeker-296770026789.europe-west1.run.app/script.js?v=1.00"></script>
vendor: 1 bytes, line 12019
12019
12020<script>
12021    $(function () {
12022        try {
12023            POPUP_SEEKER.init({
12024                
12025                
12026                
12027                    public_captcha_key: '6LcKsfMZAAAAAEL5D4XaIPZ7t_kNWm3pFaKv_dOn',
12028                
12029                language_code: 'pt',
12030                hotel_code: 'casas-novas',
12031                
12032                    is_mobile: false,
12033                
12034                section_type: 'Mis Reservas',
12035                section_key: 'ahJlfnNlY3VyZS1ib29raW5nMjRyFwsSCldlYlNlY3Rpb24YgICAjIiOhwoMogELY2FzYXMtbm92YXM',
12036                user_type: ['normal'],
12037            });
12038        } catch (e) {
12039            console.warn('Error initializing Popup Seeker');
12040            console.warn(e);
12041        }
12042    });
12043</script>
12043
12044
12045
12046
12047
12048
12049
12050
12051</body>
12052</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.