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> Casas Novas Countryside Hotel | Chaves | Website Oficial </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="O Casas Novas Countryside Hotel Spa & Events tem 34 quartos. Um espaço rural moderno que combina a arquitetura barroca e o estilo contemporâneo. "/> 42 43 <meta name="revisit-after" content="2 days"/> 44 <meta http-equiv="Content-Language" content="pt"/> 45 <meta name="dc.title" content=" Casas Novas Countryside Hotel | Chaves | Website Oficial "/> 46 <meta name="dc.description" content="O Casas Novas Countryside Hotel Spa & Events tem 34 quartos. Um espaço rural moderno que combina a arquitetura barroca e o estilo contemporâneo. "/> 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="en" href="https://www.hotelcasasnovas.com/en/" /><link rel="alternate" hreflang="x-default" href="https://www.hotelcasasnovas.com/" /><link rel="alternate" hreflang="pt" href="https://www.hotelcasasnovas.com/" /><link rel="alternate" hreflang="es" href="https://www.hotelcasasnovas.com/es/" /><link rel="canonical" href="https://www.hotelcasasnovas.com/" /><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="home_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ário, Nº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": "€0 - €500" 309} 310</script>
310 311<meta itemprop="description" content="O Casas Novas Countryside Hotel Spa & Events tem 34 quartos. Um espaço rural moderno que combina a arquitetura barroca e o estilo contemporâneo. "> 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 "> 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 <style type="text/css"> 471 .tp-banner-container { 472 width: 100%; 473 position: relative; 474 padding: 0; 475 min-width: 1140px; 476 height: 700px; 477 } 478 479 .tp-banner { 480 width: 100%; 481 position: relative; 482 display: none; 483 } 484 485 .tp-arr-titleholder { 486 display: none !important; 487 } 488 489 .visually-hidden { 490 position: absolute !important; 491 width: 1px; 492 height: 1px; 493 margin: -1px; 494 padding: 0; 495 overflow: hidden; 496 clip: rect(0 0 0 0); 497 white-space: nowrap; 498 border: 0; 499 } 500</style> 501 502<!-- Accessible button to pause/resume the slider --> 503<button id="toggleSlider" aria-pressed="false" class="visually-hidden">pausa</button> 504 505<div class="tp-banner-container"> 506 <div class="tp-banner"> 507 <ul> 508 509 <li data-title="" 510 data-delay='6000' 511 data-transition="fade" data-slotamount="7" data-masterspeed="800" data-link="ofertas.html" > 512 513 <img src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/images/dummy.png" data-bgposition="center center" data-lazyload="https://cdn2.paraty.es/casas-novas/images/950f9c753fffbe1=s1900" alt="Duas cadeiras de madeira com vista para as colinas em Casas Novas."> 514 515 516 </li> 517 518 <li data-title="" 519 data-delay='6000' 520 data-transition="fade" data-slotamount="7" data-masterspeed="800" > 521 522 <img src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/images/dummy.png" data-bgposition="center center" data-lazyload="https://cdn2.paraty.es/casas-novas/images/55cf0319f31c7f3=s1900" alt="Pátio da Casas Novas com arcos de pedra e escadas antigas."> 523 524 525 </li> 526 527 <li data-title="" 528 data-delay='6000' 529 data-transition="fade" data-slotamount="7" data-masterspeed="800" > 530 531 <img src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/images/dummy.png" data-bgposition="center center" data-lazyload="https://cdn2.paraty.es/casas-novas/images/2e8f461c8bccccf=s1900" alt="Restaurante Casas Novas com mesas elegantes e vistas para a natureza."> 532 533 534 </li> 535 536 <li data-title="" 537 data-delay='6000' 538 data-transition="fade" data-slotamount="7" data-masterspeed="800" > 539 540 <img src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/images/dummy.png" data-bgposition="center center" data-lazyload="https://cdn2.paraty.es/casas-novas/images/1f59d030258a88c=s1900" alt="Sala de estar aconchegante da Casas Novas com sofás creme e detalhes rústicos."> 541 542 543 </li> 544 545 <li data-title="" 546 data-delay='6000' 547 data-transition="fade" data-slotamount="7" data-masterspeed="800" > 548 549 <img src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/images/dummy.png" data-bgposition="center center" data-lazyload="https://cdn2.paraty.es/casas-novas/images/b92cf4eb4eb3d58=s1900" alt="Quarto acolhedor na Casas Novas com cama confortável, detalhes rústicos e luz natural."> 550 551 552 </li> 553 554 </ul> 555 </div> 556</div> 557
558<script type="text/javascript" async> 559 const capitalize = text => text.charAt(0).toUpperCase() + text.slice(1); 560 561 var revapi; 562 563 564 jQuery(window).on('load', function () { 565 566 revapi = jQuery('.tp-banner').revolution({ 567 // Add a comment to this line 568 startwidth: 1140, 569 startheight: 700, 570 hideThumbs: 10, 571 fullWidth: "on", 572 forceFullWidth: "on", 573 fullScreen: "on", 574 onHoverStop: "on", 575 lazyLoad: "on", 576 navigationArrows: "solo", 577 navigationType: "bullet", 578 hideTimerBar: "on", 579 580 }); 581 582 $(".tp-banner").show(); 583 584 // Add the aria-labels to the arrows 585 function setAriaLabels() { 586 const $leftArrow = $('.tp-leftarrow'); 587 const $rightArrow = $('.tp-rightarrow'); 588 const previousLabel = `Anterior`; 589 const nextLabel = `Seguinte`; 590 591 if ($leftArrow.length && $rightArrow.length) { 592 $leftArrow.attr({ 593 tabindex: 0, 594 role: 'button', 595 'aria-label': previousLabel 596 }); 597 $rightArrow.attr({ 598 tabindex: 0, 599 role: 'button', 600 'aria-label': nextLabel 601 }); 602 603 if (!$leftArrow.find('.visually-hidden').length) { 604 $leftArrow.append('<span class="visually-hidden">' + previousLabel + '</span>'); 605 } 606 607 if (!$rightArrow.find('.visually-hidden').length) { 608 $rightArrow.append('<span class="visually-hidden">' + nextLabel + '</span>'); 609 } 610 611 console.log('Aria-labels and hidden text assigned'); 612 } 613 } 614 615 function applyAriaLiveToActiveSlide() { 616 $('.tp-revslider-slidesli').removeAttr('aria-live'); 617 $('.tp-revslider-slidesli:not(.tp-hide-revslide)').attr('aria-live', 'polite'); 618 } 619 620 applyAriaLiveToActiveSlide(); 621 622 revapi.on('revolution.slide.onchange', applyAriaLiveToActiveSlide); 623 revapi.on('revolution.slide.onloaded', setAriaLabels); 624 625 // Accessibility for pause/resume button 626 let sliderPaused = false; 627 const $toggleSlider = $('#toggleSlider'); 628 $toggleSlider.text(capitalize($toggleSlider.text())); 629 630 $toggleSlider.click(function () { 631 if (!sliderPaused) { 632 revapi.revpause(); 633 this.innerText = `Retomar`; 634 this.setAttribute('aria-pressed', 'true'); 635 } else { 636 revapi.revresume(); 637 this.innerText = capitalize(`pausa`); 638 this.setAttribute('aria-pressed', 'false'); 639 } 640 sliderPaused = !sliderPaused; 641 }); 642 }); //ready 643</script>
643 644 645 <div id="full_wrapper_booking"> 646 <div id="wrapper_booking" class="container12"> 647 <div id="booking" class="boking_widget_inline"> 648 649 <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,200italic,300italic&display=swap' rel='stylesheet' 650 type='text/css'> 651 652 653 654 655 656 657 658 659<span id="full-booking-engine-html-7" style="margin:0px;padding:0px;" class=""> 660<!-- MY BOOKINGS INTEGRATED --> 661 662 663 664 665<!-- TITULO --> 666<div class="booking_form_title"> 667 <p class="booking_title_1">Reservas</p> 668 <p class="booking_title_2">Reserve agora</p> 669 <p class="best_price">RESERVE AO MELHOR PREÃO</p> 670 671 672 673 674 675 676 677</div> 678<!-- END TITULO --> 679 680 681 <div class='calendar_root_wrapper'> 682 <div id="calendar-app-root" class="calendar_app" style="display: none"></div> 683 </div> 684
684<script> 685 window.calendar_data = { 686 language: 'pt', 687 is_website: true, 688 namespace: 'casas-novas', 689 690 691 692 693 694 }; 695 </script>
695 696 <input type="hidden" id="price_calendar_v2" value="true"> 697
697<script type="text/javascript" src="/static_1/web_apps/price_calendar.js?v=202609301652" crossorigin="anonymous"></script>
697 698 <link rel="stylesheet" type="text/css" href="/static_1/web_apps/assets/css/main_price_calendar.css?v=202609301652"> 699 700 701<!-- booking engine 7 --> 702<form class="booking_form booking-form-center-text paraty-booking-form " 703 action="https://www.hotelcasasnovas.com/booking1" method="post" data-initial-booking-url="https://www.hotelcasasnovas.com/booking1" data-initial-namespace="casas-novas"> 704 705<input type="hidden" id="language" name="language" value="PORTUGUESE"/> 706<input type="hidden" id="agesKid1" name="agesKid1"/> 707<input type="hidden" id="agesKid2" name="agesKid2"/> 708<input type="hidden" id="agesKid3" name="agesKid3"/> 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759<input id="roomType" type="hidden" name="roomType" value=""> 760<input class="roomTypeValue" type="hidden" name="roomTypeValue" value=""> 761 762<input id="roomFilter" type="hidden" name="roomFilter" value=".*"> 763<input id="roomFilterName" type="hidden" name="roomFilterName" value=""> 764<input id="roomOrder" type="hidden" name="roomOrder" value=""> 765<input id="roomSearch" type="hidden" name="roomSearch" value=""> 766 767<input type="hidden" id="roomtype_list_json" name="roomtype_list_json" value=""> 768 769 770 771 772 773<input type="hidden" id="namespace" name="namespace" value="casas-novas"/> 774 775<input type="hidden" id="gclid" name="gclid" value=""/> 776 777<input type="hidden" value="" name="priceSeekerHotel" id="priceSeekerHotel"/> 778 779 780 781 782 783 784 785 786 787 788<!-- BOOKING 0 --> 789 790 791 792 793 794 795 796<!-- END BOOKING 0--> 797 798<!-- EXTRA PARAMS --> 799 800<!-- END EXTRA PARAMS --> 801 802 803 804 805 806<!-- SELECTOR DE HOTEL--> 807 808 809 810 811 812 813 814<!-- END SELECTOR DE HOTEL--> 815 816 817<!-- HIDE FILTERS --> 818 819 820 821 822 823 824 825 826 827<!-- HIDE FILTERS --> 828 829<!-- SELECCION FECHAS DE ENTRADA Y NUMERO HABITACIONES --> 830<div class="stay_selection "> 831 832 <div class="entry_date_wrapper half_size"> 833 <label class="entry_date_label">Chegada</label> 834 835 <div class="date_box entry_date"> 836 <span class="date_day"></span> 837 <span class="date_year"></span> 838 <input name="startDate" type="hidden" class="has_datepicker entry_input" value=""/> 839 840 <div></div> 841 </div> 842 843 844 </div> 845 846 847 848 <div class="departure_date_wrapper"> 849 <label class="departure_date_label">SaÃda</label> 850 851 <div class="date_box departure_date"> 852 <span class="date_day"></span> 853 <span class="date_year"></span> 854 <input name="endDate" type="hidden" class="has_datepicker departure_input" value=""/> 855 856 <div></div> 857 </div> 858 </div> 859 860
860<script> 861 departure_date_selectable = true; 862 </script>
862 863 864 865 866 867 868</div> 869 870 871 872 873<div class="dates_selector_personalized"> 874 <label for="" class="dates_selector_label">datas</label> 875 876 <div class="start_end_date_wrapper"> 877 <span type="text" class="start_date_personalized"></span> 878 - 879 <span type="text" class="end_date_personalized"></span> 880 881 <div class="nights_number_wrapper_personalized"> 882 <span class="days_number_datepicker"></span> 883 <span class="night_label"> Noite </span> 884 </div> 885 </div> 886 887 <div class="start_date_datepicker" type="text" data-role="date" data-inline="true" style="display: none"> 888 <div class="close_calendar"></div> 889 <span class="entry_label_calendar">Data de Chegada</span> 890 </div> 891 <div class="departure_datepicker" type="text" data-role="date" data-inline="true" style="display: none"> 892 <div class="close_calendar"></div> 893 <span class="departure_label_calendar">Data de SaÃda</span> 894 </div> 895</div> 896 897 898 899 900<div class="rooms_number_wrapper " > 901 <label class="rooms_label" for="numRooms"> 902 Quartos</label> 903 <select name="numRooms" id="numRooms" class="rooms_number"> 904 905 <option value="1" selected="selected">1</option> 906 907 <option value="2" >2</option> 908 909 <option value="3" >3</option> 910 911 </select> 912</div> 913 914<!-- END SELECCION FECHAS DE ENTRADA Y HABITACIONES --> 915 916 917 918<div class="guest_selector "> 919 <label>Ocupação</label> 920 921 <span class="placeholder_text">Selecionar</span><b class="button"></b> 922 923</div> 924 925<!-- LISTA DE HABITACIONES --> 926<div class="room_list_wrapper"> 927<i class="fa fa-times close_room_selector" aria-hidden="true" style="display: none;"></i> 928 929 930<ul class="room_list "> 931 932 933 934 <!---------------------- ROOM 1----------------------> 935 <li class="room room1 room_with_babies" > 936 937 <div class="room_title room_title_with_babies" 938 > 939 940 Quarto 1</div> 941 942 <div class="adults_selector"> 943 <label class="adults_label" for="adultsRoom1">Adultos 944 945 </label> 946 <select name="adultsRoom1" class="adults_room_1 room_selector" id="adultsRoom1"> 947 948 <option value="1" > 949 1 950 </option> 951 952 <option value="2" selected="selected"> 953 2 954 </option> 955 956 <option value="3" > 957 3 958 </option> 959 960 <option value="4" > 961 4 962 </option> 963 964 <option value="5" > 965 5 966 </option> 967 968 <option value="6" > 969 6 970 </option> 971 972 <option value="7" > 973 7 974 </option> 975 976 <option value="8" > 977 8 978 </option> 979 980 </select> 981 982 </div> 983 984 <div class="children_selector range_label_enabled"> 985 <label class="children_label" for="childrenRoom1">Crianças 986 987 <span class="range-age"> 988 989 990 991 (<span class="kids_label">4-12 </span> anos) 992 993 994 995 996 </span> 997 998 </label> 999 <select name="childrenRoom1" class="children_room_1 room_selector" id="childrenRoom1"> 1000 1001 <option value="0" selected="selected" > 1002 1003 0 1004 1005 </option> 1006 1007 <option value="1" > 1008 1009 1 1010 1011 </option> 1012 1013 <option value="2" > 1014 1015 2 1016 1017 </option> 1018 1019 <option value="3" > 1020 1021 3 1022 1023 </option> 1024 1025 <option value="4" > 1026 1027 4 1028 1029 </option> 1030 1031 </select> 1032 1033 </div> 1034 1035 1036 1037 1038 <div class="babies_selector"> 1039 <label for="babiesRoom1">Bebés 1040 </label> 1041 <select id="hab1_bebes" class="babies_room_1 room_selector" 1042 name="babiesRoom1"> 1043 1044 1045 <option value="0" >0</option> 1046 1047 <option value="1" >1</option> 1048 1049 <option value="2" >2</option> 1050 1051 </select> 1052 1053 </div> 1054 1055 1056 1057 1058 1059 </li> 1060 1061 1062 1063 1064 1065 <!---------------------- ROOM 2----------------------> 1066 <li class="room room2 room_with_babies" style="display: none"> 1067 1068 <div class="room_title room_title_with_babies" 1069 > 1070 1071 Quarto 2</div> 1072 1073 <div class="adults_selector"> 1074 <label class="adults_label" for="adultsRoom2">Adultos 1075 1076 </label> 1077 <select name="adultsRoom2" class="adults_room_2 room_selector" id="adultsRoom2"> 1078 1079 <option value="1" > 1080 1 1081 </option> 1082 1083 <option value="2" selected="selected"> 1084 2 1085 </option> 1086 1087 <option value="3" > 1088 3 1089 </option> 1090 1091 <option value="4" > 1092 4 1093 </option> 1094 1095 <option value="5" > 1096 5 1097 </option> 1098 1099 <option value="6" > 1100 6 1101 </option> 1102 1103 <option value="7" > 1104 7 1105 </option> 1106 1107 <option value="8" > 1108 8 1109 </option> 1110 1111 </select> 1112 1113 </div> 1114 1115 <div class="children_selector range_label_enabled"> 1116 <label class="children_label" for="childrenRoom2">Crianças 1117
1118 <span class="range-age"> 1119 1120 1121 1122 (<span class="kids_label">4-12 </span> anos) 1123 1124 1125 1126 1127 </span> 1128 1129 </label> 1130 <select name="childrenRoom2" class="children_room_2 room_selector" id="childrenRoom2"> 1131 1132 <option value="0" selected="selected" > 1133 1134 0 1135 1136 </option> 1137 1138 <option value="1" > 1139 1140 1 1141 1142 </option> 1143 1144 <option value="2" > 1145 1146 2 1147 1148 </option> 1149 1150 <option value="3" > 1151 1152 3 1153 1154 </option> 1155 1156 <option value="4" > 1157 1158 4 1159 1160 </option> 1161 1162 </select> 1163 1164 </div> 1165 1166 1167 1168 1169 <div class="babies_selector"> 1170 <label for="babiesRoom2">Bebés 1171 </label> 1172 <select id="hab2_bebes" class="babies_room_2 room_selector" 1173 name="babiesRoom2"> 1174 1175 1176 <option value="0" >0</option> 1177 1178 <option value="1" >1</option> 1179 1180 <option value="2" >2</option> 1181 1182 </select> 1183 1184 </div> 1185 1186 1187 1188 1189 1190 </li> 1191 1192 1193 1194 1195 1196 <!---------------------- ROOM 3----------------------> 1197 <li class="room room3 room_with_babies" style="display: none"> 1198 1199 <div class="room_title room_title_with_babies" 1200 > 1201 1202 Quarto 3</div> 1203 1204 <div class="adults_selector"> 1205 <label class="adults_label" for="adultsRoom3">Adultos 1206 1207 </label> 1208 <select name="adultsRoom3" class="adults_room_3 room_selector" id="adultsRoom3"> 1209 1210 <option value="1" > 1211 1 1212 </option> 1213 1214 <option value="2" selected="selected"> 1215 2 1216 </option> 1217 1218 <option value="3" > 1219 3 1220 </option> 1221 1222 <option value="4" > 1223 4 1224 </option> 1225 1226 <option value="5" > 1227 5 1228 </option> 1229 1230 <option value="6" > 1231 6 1232 </option> 1233 1234 <option value="7" > 1235 7 1236 </option> 1237 1238 <option value="8" > 1239 8 1240 </option> 1241 1242 </select> 1243 1244 </div> 1245 1246 <div class="children_selector range_label_enabled"> 1247 <label class="children_label" for="childrenRoom3">Crianças 1248 1249 <span class="range-age"> 1250 1251 1252 1253 (<span class="kids_label">4-12 </span> anos) 1254 1255 1256 1257 1258 </span> 1259 1260 </label> 1261 <select name="childrenRoom3" class="children_room_3 room_selector" id="childrenRoom3"> 1262 1263 <option value="0" selected="selected" > 1264 1265 0 1266 1267 </option> 1268 1269 <option value="1" > 1270 1271 1 1272 1273 </option> 1274 1275 <option value="2" > 1276 1277 2 1278 1279 </option> 1280 1281 <option value="3" > 1282 1283 3 1284 1285 </option> 1286 1287 <option value="4" > 1288 1289 4 1290 1291 </option> 1292 1293 </select> 1294 1295 </div> 1296 1297 1298 1299 1300 <div class="babies_selector"> 1301 <label for="babiesRoom3">Bebés 1302 </label> 1303 <select id="hab3_bebes" class="babies_room_3 room_selector" 1304 name="babiesRoom3"> 1305 1306 1307 <option value="0" >0</option> 1308 1309 <option value="1" >1</option> 1310 1311 <option value="2" >2</option> 1312 1313 </select> 1314 1315 </div> 1316 1317 1318 1319 1320 1321 </li> 1322 1323 1324 1325 1326 1327 1328</ul> 1329 1330 1331 1332 1333 1334 1335</div> 1336<!-- END LISTA DE HABITACIONES --> 1337 1338 1339<div class="wrapper_booking_button "> 1340 <div class="promocode_wrapper " > 1341 <label for="widget_promocode" class="promocode_label "> 1342 1343 1344 Código Promocional 1345 1346 1347 </label> 1348 <input autocomplete="off" type="text" id="widget_promocode" class="promocode_input " name="promocode" 1349 placeholder="PROMOCODE" 1350 value="" 1351 tabindex="16" 1352 pattern="[a-zA-Z0-9.#&_\-]*" 1353
1354 oninput="this.value=this.value.replace(/[^a-zA-Z0-9.#&_-]/g,'')" 1355 > 1356 <input type="hidden" id="hidden_default_promocode" name="hidden_default_promocode"> 1357
1357<script data-cookieconsent="ignore"> 1358 //Reject injections by js in promocode input when invalid characters are detected 1359 (function ($) { 1360 let originalVal = $.fn.val; 1361 $.fn.val = function (value) { 1362 let label = $("label[for='widget_promocode']"); 1363 if (arguments.length > 0 && value !=='') { 1364 if (this.attr("name") === "promocode" && typeof value === "string" && !/^[a-zA-Z0-9.#&_-]+$/.test(value)) { 1365 document.dispatchEvent(new CustomEvent("invalid_promocode_injection", {})); 1366 return this; 1367 } 1368 } 1369 return originalVal.apply(this, arguments); ; 1370 }; 1371 })(jQuery); 1372 document.addEventListener("invalid_promocode_injection", function (event) { 1373 console.warn("Attempt of invalid promocode injection. Value rejected."); 1374 let promocode_input = $("#widget_promocode"); 1375 let promocode_label = $("label[for='widget_promocode']"); 1376 if (promocode_input.val() == "") { 1377 promocode_label.removeClass("hide"); 1378 } 1379 }); 1380 </script>
1380 1381 1382 1383 1384 1385 </div> 1386 1387 1388 1389 1390 1391 1392 1393 1394 <button type="submit" onclick="$(this).css('display','none');bookingSearchWithAgeSelection();return false;" class="submit_button buttonsearch-ratecheck" > 1395 1396 1397 1398 1399 Reservar 1400 1401 1402 </button> 1403 <div class="spinner_wrapper"></div> 1404 1405 1406 1407 1408</div> 1409 1410<div style="clear:both"></div> 1411 1412 1413 1414 1415 1416 1417 <img src="https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb" style="display: none" alt="Loading" role="presentation"> 1418 1419 1420 <input type="hidden" id="booking-search-popup" name="booking-search-popup" value="true"> 1421 1422
1422<script> 1423 ($ => { 1424 window.show_booking_search_popup = function (myForm) { 1425 if (($.browser && $.browser.msie && parseFloat($.browser.version) <= 9)){ 1426 //if we are here, is because our browser don't accept setTimeOut 1427 //so we submit it directly 1428 myForm.submit(); 1429 } 1430 else { 1431 if (typeof(sending_form_custom_from_paraty) == 'undefined' || !sending_form_custom_from_paraty) { 1432 sending_form_custom_from_paraty = true; 1433 1434 setTimeout(function (myForm) { 1435 openBookingSearchPopup(myForm); 1436 }, 1000, myForm); 1437 } 1438 } 1439 } 1440 1441 window.openBookingSearchPopup = function (myForm) { 1442 1443 return openBookingSearchPopup_v2(myForm); 1444 1445 1446 var elements = [ 1447 1448 ] 1449 1450 var popup_description = ""; 1451 if (typeof(custom_popup_loading_description) != 'undefined') { 1452 popup_description = custom_popup_loading_description; 1453 } 1454 1455 1456 showGallery(elements); 1457 1458 1459 myForm.submit(); 1460 } 1461 1462 window.openBookingSearchPopup_v2 = function (myForm, show_popup=true) { 1463 var container_booking_popup = $('<div></div>').addClass('container_popup_booking').css('text-align', 'center'), 1464 loading_popup_top_text = `Atualizando para continuar com sua reserva`; 1465 1466 try { 1467 var loading_popup_top_text = $(".site-header__logo img")[0].outerHTML; 1468 }catch(e){ 1469 console.log("Error trying to retreive logo") 1470 } 1471 1472 1473 var loading_popup_top_text = $("<img src='https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb'>"); 1474 1475 1476 1477 1478 1479 var loading_popup_bottom_text = `<div><font color='#030303'> Verificando a disponibilidade da sua pesquisa:<br /> <br /> De <strong>@@start_date@@</strong> até <strong>@@end_date@@</strong></font></div>`; 1480 1481 1482 1483 var descipription_top_booking_popup = $("<div></div>").addClass('description_top_popup_booking').html(loading_popup_top_text), 1484 descipription_bottom_booking_popup = $("<div></div>").addClass('description_bottom_popup_booking').html(loading_popup_bottom_text), 1485 gif_wrapper = $("<div></div>").addClass('gif_wrapper'), 1486 number_of_lines = 20; 1487 1488 for (var x = 0; x < number_of_lines; x++) { 1489 var target_delay_css = { 1490 '-webkit-animation-delay': -(1.5 - (0.1 * x)) + 's', 1491 '-moz-animation-delay': -(1.5 - (0.1 * x)) + 's', 1492 '-o-animation-delay': -(1.5 - (0.1 * x)) + 's', 1493 'animation-delay': -(1.5 - (0.1 * x)) + 's' 1494 }; 1495 var element_line_to_append = $("<div></div>").addClass("default_line_loading").css(target_delay_css); 1496 1497 element_line_to_append.css('background', '#3E5902'); 1498 1499 1500 element_line_to_append.appendTo(gif_wrapper); 1501 } 1502 1503 1504 container_booking_popup.css('border', '1px solid #3E5902'); 1505 1506 1507 1508 1509 1510 1511 1512 container_booking_popup.append(descipription_top_booking_popup).append(gif_wrapper).append(descipription_bottom_booking_popup); 1513 1514 1515 var selected_start_date = $("input[name='startDate']").val(), 1516 selected_end_date = $("input[name='endDate']").val(); 1517 1518 var custom_format_date = ""; 1519 if (custom_format_date) { 1520 1521 var splitted_start_date = selected_start_date.split("/"), 1522 start_day = splitted_start_date[0], 1523 start_month = splitted_start_date[1], 1524 start_year = splitted_start_date[2], 1525 start_datetime = new Date(start_year, start_month - 1, start_day), 1526 week_start_day = start_datetime.getDay(); 1527 1528 var splitted_end_date = selected_end_date.split("/"), 1529 end_day = splitted_end_date[0], 1530 end_month = splitted_end_date[1], 1531 end_year = splitted_end_date[2], 1532 end_datetime = new Date(end_year, end_month - 1, end_day), 1533 week_end_day = end_datetime.getDay(); 1534 1535 var days_list = $.datepicker._defaults.dayNames; 1536 1537 //Start date 1538 selected_start_date = custom_format_date.replace("%m", start_month).replace("%d", start_day).replace("%Y", start_year); 1539 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]); 1540 1541 //End date 1542 selected_end_date = custom_format_date.replace("%m", end_month).replace("%d", end_day).replace("%Y", end_year); 1543 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]); 1544 } 1545 1546 //Protection for failures 1547 if(selected_start_date.indexOf('NaN') > -1 || selected_end_date.indexOf('NaN')){ 1548 container_booking_popup.html(container_booking_popup.html().replace("@@start_date@@", selected_start_date).replace("@@end_date@@", selected_end_date)); 1549 } else { 1550 container_booking_popup.find(".description_bottom_popup_booking").remove(); 1551 } 1552 if (show_popup) { 1553 var booking_loading_popup_params = { 1554 1555 width: 'auto', 1556 height: 'auto', 1557 fitToView: false, 1558 autoSize: false, 1559 padding: 0, 1560 closeClick: false, 1561 closeBtn: false, 1562 helpers: { 1563 overlay: { 1564 css: 1565 {'background': '#FFFFFF'}, 1566 closeClick: false 1567 }, // prevents closing when clicking OUTSIDE fancybox 1568 1569 }, 1570 wrapCSS: 'fancy-booking-search_v2 full_screen_engine custom_color_overlay', 1571 beforeShow: function () { 1572 if (navigator.userAgent.match(/iPhone/i) || 1573 navigator.userAgent.match(/iPad/i) || 1574 navigator.userAgent.match(/iPod/i) || 1575 (navigator.userAgent.match(/AppleWeb
1575Kit/i) && !navigator.userAgent.match(/Chrome/i))) { 1576 setTimeout(function () { 1577 $.fancybox.close(true); 1578 $("#full_wrapper_booking .wrapper_booking_button .submit_button").show(); 1579 sending_form_custom_from_paraty = undefined; 1580 }, 8000); 1581 } 1582 $('.fancybox-bg').css('background', '#FFFFFF'); 1583 } 1584 }; 1585 1586 if ($.fancybox.version.slice(0, 2) === '3.') { 1587 booking_loading_popup_params['baseClass'] = 'fancybox-wrap fancy-booking-search_v2 full_screen_engine custom_color_overlay'; 1588 booking_loading_popup_params['modal'] = true; 1589 $.fancybox.open(container_booking_popup, booking_loading_popup_params); 1590 } else { 1591 $.fancybox(container_booking_popup, booking_loading_popup_params); 1592 } 1593 1594 if (myForm) { 1595 if (!navigator.userAgent.match(/chrome/i) && (navigator.userAgent.match(/safari/i) || navigator.userAgent.match(/firefox/i))) { 1596 setTimeout(function () { 1597 myForm.submit(); 1598 }, 700); 1599 } else { 1600 myForm.submit(); 1601 } 1602 } 1603 } 1604 } 1605 1606 window.openCalendarPriceLoaderPopup = function () { 1607 if (window.location.href.includes('localhost')) { 1608 return; 1609 } 1610 1611 const container_booking_popup = $('<div class="container_popup_booking container_popup_calendar"></div>'); 1612 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.`); 1613 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.`); 1614 const animation_container = $("<div id='lottie_animation'></div>"); 1615 const center_container = $("<div class='center_container'></div>").append(description_top_booking_popup).append(animation_container); 1616 1617 container_booking_popup.append(center_container).append(description_bottom_booking_popup); 1618 1619 var booking_loading_popup_params = { 1620 width: 'auto', 1621 height: 'auto', 1622 fitToView: false, 1623 autoSize: false, 1624 padding: 0, 1625 closeClick: false, 1626 closeBtn: false, 1627 helpers: { 1628 overlay: { 1629 css: {'background': 'transparent', 'backdrop-filter': 'blur(50px)'}, 1630 closeClick: false}, // prevents closing when clicking OUTSIDE fancybox 1631 }, 1632 wrapCSS: 'fancy-booking-search_v2 full_screen_engine', 1633 beforeShow: function () { 1634 if(navigator.userAgent.match(/iPhone/i) || 1635 navigator.userAgent.match(/iPad/i) || 1636 navigator.userAgent.match(/iPod/i) || 1637 (navigator.userAgent.match(/AppleWebKit/i) && !navigator.userAgent.match(/Chrome/i))){ 1638 setTimeout(function () { 1639 if ($.fancybox.current?.wrapCSS.includes('fancy-booking-search_v2')) { 1640 $.fancybox.close(); 1641 } 1642 }, 5000); 1643 } 1644 $('.fancybox-bg').css('background','transparent').css('backdrop-filter','blur(50px)'); 1645 $('.fancybox-margin').css('margin', '0'); 1646 }, 1647 afterShow: function () { 1648 if (typeof loader_animation !== 'undefined') { 1649 let params = { 1650 container: $('#lottie_animation')[0], 1651 renderer: 'svg', 1652 loop: true, 1653 autoplay: true, 1654 animationData: loader_animation 1655 }; 1656 1657 let anim = lottie.loadAnimation(params); 1658 1659 setTimeout(function () { 1660 params['container'] = $('#lottie_animation_calendar')[0]; 1661 params['loop'] = false;
1662 1663 let anim_calendar = lottie.loadAnimation(params); 1664 1665 anim_calendar.addEventListener('complete', function() { 1666 anim_calendar.stop(); 1667 setTimeout(() => { 1668 anim_calendar.play(); 1669 }, 5000); 1670 }); 1671 }, 5000); 1672 } 1673 } 1674 }; 1675 1676 $.fancybox(container_booking_popup, booking_loading_popup_params); 1677 1678 setTimeout(function () { 1679 if ($.fancybox.current?.wrapCSS.includes('fancy-booking-search_v2')) { 1680 $.fancybox.close(); 1681 } 1682 setTimeout(function() { 1683 typeof resizeCallCenter !== 'undefined' && resizeCallCenter(); 1684 }, 5500); 1685 }, 5000); 1686 } 1687 1688 window.showGallery = function (elements) { 1689 var fancybox_params = { 1690 'modal': true, 1691 'closeBtn': false, 1692 'autoPlay': true, 1693 'playSpeed': 3000, 1694 'prevEffect': 'none', 1695 'nextEffect': 'none', 1696 'type': 'image', 1697 'arrows': false, 1698 'nextClick': false, 1699 'mouseWheel': false, 1700 'helpers': { 1701 title: { 1702 type: 'outside' 1703 }, 1704 overlay: { 1705 opacity: 0.8, 1706 css: { 1707 'background-color': '#000' 1708 } 1709 } 1710 }, 1711 'padding': 0 1712 }; 1713 if ($.fancybox.version.slice(0,2) === '3.') { 1714 $.fancybox.open(elements, fancybox_params); 1715 } else { 1716 $.fancybox(elements, fancybox_params); 1717 } 1718 } 1719 1720 //Preloading video is required to load correctly in some browsers 1721 $(function() { 1722 1723 }); 1724 1725 1726 })(jQuery); 1727 1728 </script>
1728 1729 1730 1731 1732 1733 1734 1735</form> 1736 1737 1738 1739 <style> 1740.ui-dialog { 1741 position: absolute; 1742 top: 0; 1743 left: 0; 1744 padding: .2em; 1745 outline: 0; 1746} 1747.ui-dialog .ui-dialog-titlebar { 1748 padding: .4em 1em; 1749 position: relative; 1750} 1751.ui-dialog .ui-dialog-title { 1752 float: left; 1753 margin: .1em 0; 1754 white-space: nowrap; 1755 width: 90%; 1756 overflow: hidden; 1757 text-overflow: ellipsis; 1758} 1759.ui-dialog .ui-dialog-titlebar-close { 1760 position: absolute; 1761 right: .3em; 1762 top: 50%; 1763 width: 21px; 1764 margin: -10px 0 0 0; 1765 padding: 1px; 1766 height: 20px; 1767} 1768.ui-dialog .ui-dialog-content { 1769 position: relative; 1770 border: 0; 1771 padding: .5em 1em; 1772 background: none; 1773 overflow: auto; 1774 text-align: center; 1775} 1776.ui-dialog .ui-dialog-buttonpane { 1777 text-align: left; 1778 border-width: 1px 0 0 0; 1779 background-image: none; 1780 margin-top: .5em; 1781 padding: .3em 1em .5em .4em; 1782} 1783.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 1784 /*float: right;*/ 1785 float: none; 1786 text-align: center; 1787} 1788.ui-dialog .ui-dialog-buttonpane button { 1789 margin: .5em .4em .5em 0; 1790 cursor: pointer; 1791} 1792.ui-dialog .ui-resizable-se { 1793 width: 12px; 1794 height: 12px; 1795 right: -5px; 1796 bottom: -5px; 1797 background-position: 16px 16px; 1798} 1799.ui-dialog .ui-button-text { 1800 /*padding: 10px;*/ 1801 /*margin: 10px;*/ 1802} 1803 1804.ui-dialog .ui-button{ 1805 /*height: 30px;*/ 1806} 1807 1808.ui-draggable .ui-dialog-titlebar { 1809 cursor: move; 1810} 1811 1812.ui-dialog { 1813 min-width: 300px; 1814 z-index: 9999; 1815} 1816 1817</style> 1818 1819 <style> 1820 .ui-dialog-titlebar-close { 1821 display: none !important; 1822 } 1823 1824 #dialog-form{ 1825 padding: 10px; 1826 1827 } 1828 1829 .ui-dialog-titlebar{ 1830 padding: 5px; 1831 } 1832 1833 .kidAgesSelect, .babyAgesSelect{ 1834 margin-left: 10px; 1835 1836 } 1837 1838 .ui-dialog{ 1839 z-index: 99999; 1840 } 1841 1842 1843</style> 1844 1845<!-- New style Age popup --> 1846<style> 1847body .ui-widget-overlay.ui-front { 1848 background: rgba(0, 0, 0, 0.6); 1849 opacity: 1; 1850 z-index: 9998; 1851 position: fixed; 1852} 1853body .ui-dialog.ui-widget { 1854 padding: 20px 10px; 1855 border: 0; 1856 border-radius: 0; 1857 line-height: 1; 1858 width: 100% !important; 1859 max-width: 350px; 1860} 1861body .ui-dialog.ui-widget .ui-dialog-titlebar { 1862 background: none!important; 1863 padding: 0 0 20px 0; 1864 border-radius: 0; 1865 border: 0; 1866 color: black!important; 1867 border-bottom: 1px solid rgba(0, 0, 0, 0.2); 1868 text-align: center; 1869 margin-bottom: 20px; 1870} 1871body .ui-dialog.ui-widget .ui-dialog-titlebar .ui-dialog-title { 1872 width: 100%; 1873 margin: 0; 1874} 1875body .ui-dialog.ui-widget #dialog-form { 1876 padding: 0; 1877 text-align: left; 1878 width: 100% !important; 1879 max-width: 350px; 1880 overflow: visible; 1881} 1882body .ui-dialog.ui-widget #dialog-form form label { 1883 clear: both; 1884 width: 100%; 1885 float: left; 1886} 1887body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids { 1888 display: inline-block; 1889 width: 100%; 1890 float: left; 1891} 1892body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select { 1893 width: calc((100% - 10px)/2); 1894 margin: 0px 10px 10px 0; 1895 float: left; 1896 -webkit-appearance: none; 1897 -moz-appearance: none; 1898 appearance: none; 1899 border-radius: 0; 1900 padding: 5px 10px; 1901} 1902body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:focus { 1903 opacity: 1 !important; 1904} 1905body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(even) { 1906 margin-right: 0; 1907} 1908body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(-n+2) { 1909 margin-top: 10px; 1910} 1911body .ui-dialog.ui-widget .ui-dialog-buttonpane { 1912 margin: 0; 1913 padding: 0; 1914 vertical-align: bottom; 1915 display: inline-block; 1916 float: left; 1917 width: 100% !important; 1918 max-width: 350px; 1919 border-radius: 0; 1920 margin-top: 10px; 1921} 1922body .ui-dialog.ui-widget .ui-dialog-buttonpane .ui-button { 1923 margin: 0; 1924 display: inline-block; 1925 width: 100% !important; 1926 max-width: 350px; 1927 border-radius: 0; 1928 background: #446ca9; 1929 color:white; 1930} 1931body .ui-dialog.ui-widget .ui-resizable-handle { 1932 display: none; 1933} 1934</style> 1935<!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" type="text/css"/> --> 1936 <div id="dialog-form" title="As idades das crianças" style="display:none"> 1937 <form> 1938 1939 <label id="label1" for="name">Quarto 1</label> 1940 1941 <div class="wrapper_age_kids clearfix"> 1942 1943 1944 <select class="kidAgesSelect" id="agesRoom1_1" name="name" tabindex="1"> 1945 1946 <option value="4" selected="selected">4</option> 1947 1948 <option value="5" >5</option> 1949 1950 <option value="6" >6</option> 1951 1952 <option value="7" >7</option> 1953 1954 <option value="8" >8</option> 1955 1956 <option value="9" >9</option> 1957 1958 <option value="10" >10</option> 1959 1960 <option value="11" >11</option> 1961 1962 <option value="12" >12</option> 1963 1964 </select> 1965 1966 <select class="kidAgesSelect" id="agesRoom1_2" name="name" tabindex="1"> 1967 1968 <option value="4" selected="selected">4</option> 1969 1970 <option value="5" >5</option> 1971 1972 <option value="6" >6</option> 1973 1974 <option value="7" >7</option> 1975 1976 <option value="8" >8</option> 1977 1978 <option value="9" >9</option> 1979 1980 <option value="10" >10</option> 1981 1982 <option value="11" >11</option> 1983 1984 <option value="12" >12</option> 1985 1986 </select> 1987 1988 <select class="kidAgesSelect" id="agesRoom1_3" name="name" tabindex="1"> 1989 1990 <option value="4" selected="selected">4</option> 1991 1992 <option value="5" >5</option> 1993 1994 <option value="6" >6</option> 1995 1996 <option value="7" >7</option> 1997 1998 <option value="8" >8</option> 1999 2000 <option value="9" >9</option> 2001 2002 <option value="10" >10</option> 2003 2004 <option value="11" >11</option> 2005 2006 <option value="12" >12</option> 2007 2008 </select> 2009 2010 <select class="kidAgesSelect" id="agesRoom1_4" name="name" tabindex="1"> 2011 2012 <option value="4" selected="selected">4</option> 2013 2014 <option value="5" >5</option> 2015 2016 <option value="6" >6</option> 2017 2018 <option value="7" >7</option> 2019 2020 <option value="8" >8</option> 2021 2022 <option value="9" >9</option> 2023 2024 <option value="10" >10</option> 2025 2026 <option value="11" >11</option> 2027 2028 <option value="12" >12</option> 2029 2030 </select> 2031 2032 <select class="kidAgesSelect" id="agesRoom1_5" name="name" tabindex="1"> 2033 2034 <option value="4" selected="selected">4</option> 2035 2036 <option value="5" >5</option> 2037 2038 <option value="6" >6</option> 2039 2040 <option value="7" >7</option> 2041 2042 <option value="8" >8</option> 2043 2044 <option value="9" >9</option> 2045 2046 <option value="10" >10</option> 2047 2048 <option value="11" >11</option> 2049 2050 <option value="12" >12</option> 2051 2052 </select> 2053 2054 2055 </div> 2056 2057 2058 <br/> 2059 <br/> 2060 2061 <label id="label2" for="name">Quarto 2</label> 2062 2063 <div class="wrapper_age_kids clearfix"> 2064 2065 2066 <select class="kidAgesSelect" id="agesRoom2_1" name="name" tabindex="1"> 2067 2068 <option value="4" selected="selected">4</option> 2069 2070 <option value="5" >5</option> 2071 2072 <option value="6" >6</option> 2073 2074 <option value="7" >7</option> 2075 2076 <option value="8" >8</option> 2077 2078 <option value="9" >9</option> 2079 2080 <option value="10" >10</option> 2081 2082 <option value="11" >11</option> 2083 2084 <option value="12" >12</option> 2085 2086 </select> 2087 2088 <select class="kidAgesSelect" id="agesRoom2_2" name="name" tabindex="1"> 2089 2090 <option value="4" selected="selected">4</option> 2091 2092 <option value="5" >5</option> 2093 2094 <option value="6" >6</option> 2095 2096 <option value="7" >7</option> 2097 2098 <option value="8" >8</option> 2099 2100 <option value="9" >9</option> 2101 2102 <option value="10" >10</option> 2103 2104 <option value="11" >11</option> 2105 2106 <option value="12" >12</option> 2107 2108 </select> 2109 2110 <select class="kidAgesSelect" id="agesRoom2_3" name="name" tabindex="1"> 2111 2112 <option value="4" selected="selected">4</option> 2113 2114 <option value="5" >5</option> 2115 2116 <option value="6" >6</option> 2117 2118 <option value="7" >7</option> 2119 2120 <option value="8" >8</option> 2121 2122 <option value="9" >9</option> 2123 2124 <option value="10" >10</option> 2125 2126 <option value="11" >11</option> 2127 2128 <option value="12" >12</option> 2129 2130 </select> 2131 2132 <select class="kidAgesSelect" id="agesRoom2_4" name="name" tabindex="1"> 2133 2134 <option value="4" selected="selected">4</option> 2135 2136 <option value="5" >5</option> 2137 2138 <option value="6" >6</option> 2139 2140 <option value="7" >7</option> 2141 2142 <option value="8" >8</option> 2143 2144 <option value="9" >9</option> 2145 2146 <option value="10" >10</option> 2147 2148 <option value="11" >11</option> 2149 2150 <option value="12" >12</option> 2151 2152 </select> 2153 2154 <select class="kidAgesSelect" id="agesRoom2_5" name="name" tabindex="1"> 2155 2156 <option value="4" selected="selected">4</option> 2157 2158 <option value="5" >5</option> 2159 2160 <option value="6" >6</option> 2161 2162 <option value="7" >7</option> 2163 2164 <option value="8" >8</option> 2165 2166 <option value="9" >9</option> 2167 2168 <option value="10" >10</option> 2169 2170 <option value="11" >11</option> 2171 2172 <option value="12" >12</option> 2173 2174 </select> 2175 2176 2177 </div> 2178 2179 2180 <br/> 2181 <br/> 2182 2183 <label id="label3" for="name">Quarto 3</label> 2184 2185 <div class="wrapper_age_kids clearfix"> 2186 2187 2188 <select class="kidAgesSelect" id="agesRoom3_1" name="name" tabindex="1"> 2189 2190 <option value="4" selected="selected">4</option> 2191 2192 <option value="5" >5</option> 2193 2194 <option value="6" >6</option> 2195 2196 <option value="7" >7</option> 2197 2198 <option value="8" >8</option> 2199 2200 <option value="9" >9</option> 2201 2202 <option value="10" >10</option> 2203 2204 <option value="11" >11</option> 2205 2206 <option value="12" >12</option> 2207 2208 </select> 2209 2210 <select class="kidAgesSelect" id="agesRoom3_2" name="name" tabindex="1"> 2211 2212 <option value="4" selected="selected">4</option> 2213 2214 <option value="5" >5</option> 2215 2216 <option value="6" >6</option> 2217 2218 <option value="7" >7</option> 2219 2220
2220 <option value="8" >8</option> 2221 2222 <option value="9" >9</option> 2223 2224 <option value="10" >10</option> 2225 2226 <option value="11" >11</option> 2227 2228 <option value="12" >12</option> 2229 2230 </select> 2231 2232 <select class="kidAgesSelect" id="agesRoom3_3" name="name" tabindex="1"> 2233 2234 <option value="4" selected="selected">4</option> 2235 2236 <option value="5" >5</option> 2237 2238 <option value="6" >6</option> 2239 2240 <option value="7" >7</option> 2241 2242 <option value="8" >8</option> 2243 2244 <option value="9" >9</option> 2245 2246 <option value="10" >10</option> 2247 2248 <option value="11" >11</option> 2249 2250 <option value="12" >12</option> 2251 2252 </select> 2253 2254 <select class="kidAgesSelect" id="agesRoom3_4" name="name" tabindex="1"> 2255 2256 <option value="4" selected="selected">4</option> 2257 2258 <option value="5" >5</option> 2259 2260 <option value="6" >6</option> 2261 2262 <option value="7" >7</option> 2263 2264 <option value="8" >8</option> 2265 2266 <option value="9" >9</option> 2267 2268 <option value="10" >10</option> 2269 2270 <option value="11" >11</option> 2271 2272 <option value="12" >12</option> 2273 2274 </select> 2275 2276 <select class="kidAgesSelect" id="agesRoom3_5" name="name" tabindex="1"> 2277 2278 <option value="4" selected="selected">4</option> 2279 2280 <option value="5" >5</option> 2281 2282 <option value="6" >6</option> 2283 2284 <option value="7" >7</option> 2285 2286 <option value="8" >8</option> 2287 2288 <option value="9" >9</option> 2289 2290 <option value="10" >10</option> 2291 2292 <option value="11" >11</option> 2293 2294 <option value="12" >12</option> 2295 2296 </select> 2297 2298 2299 </div> 2300 2301 2302 <br/> 2303 <br/> 2304 2305 2306 <input type="hidden" id="id_div_parent"> 2307 </form> 2308</div> 2309
2310<script type="text/javascript"> 2311 ($ => { 2312 const babiesNeedAgeSelection = false; 2313 2314 window.sendActiveForm = function () { 2315 return $(".booking_form").each(function () { 2316 2317 if ($(this).find(".submit_button:not(.popup_button)").css("display") == "none" || $(this).find(".submit_button:not(.popup_button)").attr("disabled") == "disabled") { 2318 if ($('#booking-search-popup').length) { 2319 show_booking_search_popup($(this)); 2320 return false; 2321 } 2322 2323 $(this).submit(); 2324 return true; 2325 } 2326 }); 2327 } 2328 2329 window.bookingSearchWithAgeSelection = function () { 2330 $(".booking_form").each(function () { 2331 const $booking_form = $(this); 2332 2333 let children_selected = false; 2334 const minor_room_selectors = '.children_selector select.room_selector' + (babiesNeedAgeSelection ? ', .babies_selector select.room_selector' : ''); 2335 $(minor_room_selectors).each(function(){ 2336 if ($(this).val() > 0) { 2337 children_selected = true; 2338 } 2339 }); 2340 2341 if ($('.ages_mandatory_wrapper').length && window.is_children_selector_changed && children_selected) { 2342 window.is_children_selector_changed = false; 2343 $('.ages_mandatory_wrapper').show(); 2344 toggle_guest_selector(true); 2345 2346 setTimeout(() => { 2347 $booking_form.find(".submit_button").css("display", "block"); 2348 }, 1000); 2349 2350 return false; 2351 } 2352 2353 const $submit_button = $booking_form.find(".submit_button:not(.popup_button)"); 2354 if ($submit_button.css("display") === "none" || $submit_button.attr("disabled") == "disabled") { 2355 //Check that user has selected startDate & endDate 2356 const start_date = $booking_form.find("input[name='startDate']").val(); 2357 const end_date = $booking_form.find("input[name='endDate']").val(); 2358 2359 if (!(start_date && end_date)) { 2360 $booking_form.find(".submit_button").css("display", "block"); 2361 if (!end_date) { 2362 if (typeof (open_departure_datepicker) != 'undefined') clearTimeout(open_departure_datepicker); 2363 open_departure_datepicker = setTimeout(function () { 2364 $(".departure_date_wrapper").trigger('click'); 2365 }, 200) 2366 } 2367 return false; 2368 } 2369 2370 if (kids_selected_in_widget($booking_form)) { 2371 const destination_field = $booking_form.find(".destination"); 2372 let booking_url = $booking_form.attr("action"); 2373 2374 if (destination_field.length && booking_url.indexOf("booking0") == -1 && destination_field.val() == "") { 2375 const $destination_wrapper = $booking_form.find(".destination_wrapper"); 2376 if ($destination_wrapper.length) { 2377 // If there is a destination selector wrapper, open it instead of submitting the form. 2378 $destination_wrapper.trigger('click'); 2379 return false; 2380 } 2381 2382 booking_url = $booking_form.attr("action", $booking_form.attr("action").replace("booking1", "booking0")).attr("action"); 2383 } 2384 2385 2386 updateAgesOptions(); 2387 $.fancybox.close(); 2388 var dialog_opt = { 2389 width: "auto", 2390 autoOpen: false, 2391 modal: true, 2392 buttons: { 2393 "Continuar": function () { 2394 for (let room_number = 1; room_number <= 3; room_number++) { 2395 const target_hidden_input = $("input[name=agesKid" + room_number + "]"); 2396 let ages_value_string = []; 2397 2398 2399 2400 for (let kid_number = 1; kid_number <= 5; kid_number++) { 2401 let age_selected = ''; 2402 const needed_age_id = `agesRoom${room_number}_${kid_number}`; 2403 2404 $(".kidAgesSelect:visible").each(function () { 2405 if ($(this).attr('id') == needed_age_id) { 2406 age_selected = $(this).val(); 2407 } 2408 }); 2409 2410 // avoid undefined or empty values 2411 if (age_selected) ages_value_string.push(age_selected); 2412 2413 2414 } 2415 2416 ages_value_string = ages_value_string.join(';'); 2417 target_hidden_input.each(function () { 2418 $(this).val(ages_value_string); 2419 }); 2420 2421 2422 } 2423 2424 $(this).dialog("close"); 2425 sendActiveForm(); 2426 } 2427 } 2428 }; 2429 $("#dialog-form").dialog(dialog_opt).dialog("open"); 2430 2431 } 2432 } 2433 }); 2434 } 2435 2436 window.kids_selected_in_widget = function (form) { 2437 let minors_are_selected = false;
2438 const minor_selectors = $(form).find('select[name^="childrenRoom"]' + (babiesNeedAgeSelection ? ', select[name^="babiesRoom"]' : '')); 2439 minor_selectors.each(function() { 2440 const selected_option = parseInt($(this).find("option:selected").val() ?? 0); 2441 if (selected_option > 0) { 2442 minors_are_selected = true; 2443 } 2444 }); 2445 2446 return minors_are_selected; 2447 } 2448 2449 window.prepare_kids_ages = function (force = false) { 2450 $(".booking_form").each(function () { 2451 const bookingForm = $(this); 2452 const submitButton = bookingForm.find(".submit_button:not(.popup_button)"); 2453 const isButtonHiddenOrDisabled = submitButton.css('display') === 'none' || 2454 submitButton.attr("disabled") === "disabled"; 2455 2456 if (force || isButtonHiddenOrDisabled) { 2457 let numRooms = bookingForm.find(".rooms_number option:selected").val(); 2458 2459 for (let i = 1; i <= numRooms; i++) { 2460 let roomKids = bookingForm.find(".children_room_" + i + " option:selected").val(), 2461 roomBabies = bookingForm.find(".babies_room_" + i + " option:selected").val(), 2462 roomAges = bookingForm.find(".room_ages_" + i), 2463 kidsAges = '', 2464 babiesAges = ''; 2465 2466 for (let j = 1; j <= roomKids; j++) { 2467 const selectElement = roomAges.find(`.kids_age_selection #agesRoom${i}_${j}`); 2468 const ageKid = selectElement.val() ?? selectElement.find('option:selected').val() ?? selectElement.find('option[selected]').val(); 2469 kidsAges += ageKid + ';'; 2470 } 2471 2472 for (let j = 1; j <= roomBabies; j++) { 2473 const selectElement = roomAges.find(`.babies_age_selection #babyAgesRoom${i}_${j}`); 2474 const ageBaby = selectElement.val() ?? selectElement.find('option:selected').val() ?? selectElement.find('option[selected]').val() ?? 0; 2475 babiesAges += ageBaby + ';'; 2476 } 2477 2478 // Check if input exists and create it if not 2479 if (bookingForm.find("#agesKid" + i).length == 0) { 2480 bookingForm.append('<input type="hidden" id="agesKid' + i + '" name="agesKid' + i + '" value="">'); 2481 } 2482 2483 if (bookingForm.find("#agesBaby" + i).length == 0) { 2484 bookingForm.append('<input type="hidden" id="agesBaby' + i + '" name="agesBaby' + i + '" value="">'); 2485 } 2486 2487 bookingForm.find("#agesKid" + i).val(kidsAges); 2488 bookingForm.find("#agesBaby" + i).val(babiesAges); 2489 } 2490 } 2491 }) 2492 }; 2493 2494 window.updateAgesOptions = function () { 2495 2496 2497 $(".booking_form").each(function () { 2498 2499 if ($(this).find(".submit_button:not(.popup_button)").css("display") == "none" || $(this).find(".submit_button:not(.popup_button)").attr("disabled") == "disabled") { 2500 2501 var numHab = $(this).find(".rooms_number option:selected").val(); 2502 for (var i = 3; i > 0; i--) { 2503 for (var j = 1; j <= 5; j++) { 2504 $("#agesRoom" + i + "_" + j).hide(); 2505 $("#agesRoom_baby" + i + "_" + j).hide(); 2506 2507 var roomElem = $("#agesRoom" + i + "_" + j); 2508 var babyElem = $("#agesRoom_baby" + i + "_" + j); 2509 2510 if (roomElem.parent().parent().hasClass('selectricWrapper')) { 2511 roomElem.parent().parent().hide(); 2512 } 2513 2514 if (babyElem.parent().parent().hasClass('selectricWrapper')) { 2515 babyElem.parent().parent().hide(); 2516 } 2517 } 2518 2519 $("#label" + i).hide(); 2520 $("#baby_label" + i).hide(); 2521 } 2522 2523 2524 2525 for (var i = numHab; i > 0; i--) { 2526 var childrenRoom = $(this).find(".children_room_" + i + " option:selected").val(); 2527 var babiesRoom = $(this).find(".babies_room_" + i + " option:selected").val(); 2528 2529 showAges("#label", i, childrenRoom); 2530 showAges("#baby_label", i, babiesRoom); 2531 } 2532 2533 function showAges(labelPrefix, i, num) { 2534 if (num > 0) { 2535 $(labelPrefix + i).show(); 2536 ageSelectPrefix = (labelPrefix === "#baby_label") ? "#agesRoom_baby" : "#agesRoom"; 2537 2538 for (var j = 1; j <= num; j++) {
2539 $(ageSelectPrefix + i + "_" + j).show(); 2540 if ($(ageSelectPrefix + i + "_" + j).parent().parent().hasClass('selectricWrapper')) { 2541 $(ageSelectPrefix + i + "_" + j).parent().parent().show(); 2542 } 2543 } 2544 } 2545 } 2546 } 2547 }); 2548 } 2549 2550 $(function () { 2551 updateAgesOptions(1); 2552 2553 setTimeout(() => { 2554 $(".children_selector select.room_selector, .babies_selector select.room_selector").change(function() { 2555 window.is_children_selector_changed = true; 2556 }); 2557 }, 1500); 2558 2559 $('.ages_mandatory_wrapper .button_mandatory_ages').click(function () { 2560 $(".booking_form .submit_button").click(); 2561 }); 2562 }); 2563 2564 2565 })(jQuery); 2566</script>
2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582</span> 2583 2584 2585 2586 2587 2588 2589 2590
2591<script> 2592 adult_tag = "Adulto"; 2593 adults_tag = "Adultos"; 2594 kid_tag = "Criança"; 2595 kids_tag = "Crianças"; 2596 baby_tag = "Bebé"; 2597 babies_tag = "Bebés"; 2598 no_dispo_text = "não disponÃvel"; 2599</script>
2599 2600
2601<script> 2602 night_tag = "Noite"; 2603 nights_tag = "Noites"; 2604</script>
2604 2605
2606<script> 2607 2608</script>
2608 2609
2610<script> 2611 $('.entry_date_wrapper, .departure_date_wrapper').on('click', function () { 2612 if ($('.room_list_wrapper').hasClass('active')) { 2613 $('.room_list_wrapper').removeClass('active'); 2614 } 2615 }); 2616 2617 $(document).on('click', '.close_button_datepicker', function () { 2618 const overlay = $('.black_overlay_guests'); 2619 2620 overlay.stop(true, true).fadeOut(300, function() { 2621 $(this).remove(); 2622 }); 2623 }); 2624</script>
2624 2625 2626 <!-- RESCUESEEKER --> 2627
2627<script async> 2628 ($ => { 2629 if (typeof window.only_once_rescueseeker == "undefined") { 2630 // Reserve synchronously so a concurrent re-injection does not fire a second load. 2631 window.only_once_rescueseeker = 1; 2632 $.getScript("https://rescueseeker-default-697653561069.europe-west1.run.app/static/rescue-seeker/common/js/rescue-seeker-widget.js?v=2") 2633 .done(function (script, textStatus) { 2634 if (typeof RescueSeeker === 'undefined') { 2635 console.error("RESCUE SEEKER: script loaded but global missing"); 2636 window.only_once_rescueseeker = undefined; // release so a later load can retry 2637 return; 2638 } 2639 console.log("RESCUE SEEKER: Main rescue seeker script loaded!"); 2640 2641 2642 RescueSeeker.config.email_controller = 'hotel-webs'; 2643 2644 RescueSeeker.load('casas-novas', 'pt', 'paraty'); 2645 }) 2646 .fail(function (jqxhr, settings, exception) { 2647 window.only_once_rescueseeker = undefined; // release on failure so a later load can retry 2648 console.error("RESCUE SEEKER: Main rescue seeker script NOT loaded!"); 2649 console.error(exception); 2650 }); 2651 } 2652 })(jQuery); 2653</script>
2653 2654 2655 2656 2657 2658 2659 <!-- RATECHECK --> 2660 2661 2662 2663 2664 </div> 2665 </div> 2666 </div> 2667 </section> 2668 2669 2670 2671 <section id="content"> 2672 <a class="circulo"><div class="half_square"></div></a> 2673 2674 2675 <div class="wrapper_content banner_section_title bg_image"> 2676 <div class="container12"> 2677 <div class="content_title "> 2678 <h1 class="title"> 2679 No coração de<br><span>Trás-os-montes</span> 2680 </h1> 2681 </div> 2682 2683 <div class="desc lead two_columns"> 2684 O <strong>Casas Novas Countryside Hotel Spa & Events</strong> conta com 34 quartos no total, 7 instalados num solar do século XVIII totalmente recuperado e 27 instalados numa ala moderna. Tem ainda: Centro Multiusos; Health Club; Campo Polidesportivo e Parque Infantil. 2685 2686 2687 </div> 2688 2689 </div> 2690 </div> 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 <div class="wrapper_content banner_bg_fullsize" style="background-image: url('https://cdn2.paraty.es/casas-novas/images/211fe39f812c5bc=s1900')"> 2705 <div class="container12"> 2706 2707 <div class="content_title"> 2708 <h3 class="title">O espaço ideal<br>para o seu Evento</h3> 2709 </div> 2710 <a href="eventos.html" class="btn btn_custom light">Ver mais</a> 2711 2712 </div> 2713</div> 2714 2715 2716 2717 2718 2719 2720 <div class="wrapper_content banner_carousel_bgcolor_wrapper"> 2721 <div class="container_fluid"> 2722 2723 <div class="content_title"> 2724 <h3 class="title"><big>Onde o Moderno <br> casa com o <br> Tradicional</big></h3> 2725 </div> 2726 2727 <div class="carousel_wrapper"> 2728 <div class="owl-carousel item_negative custom_nav carousel_7_items"> 2729 2730 <a href="https://cdn2.paraty.es/casas-novas/images/c0880cb9e3a41be" class="picture_link" rel="lightbox[rooms_gallery]"> 2731 <div class="picture_wrapper"> 2732 <img src="https://cdn2.paraty.es/casas-novas/images/c0880cb9e3a41be=s1900" alt=""> 2733 </div> 2734 </a> 2735 2736 <a href="https://cdn2.paraty.es/casas-novas/images/cc9eaa7895b37df" class="picture_link" rel="lightbox[rooms_gallery]"> 2737 <div class="picture_wrapper"> 2738 <img src="https://cdn2.paraty.es/casas-novas/images/cc9eaa7895b37df=s1900" alt=""> 2739 </div> 2740 </a> 2741 2742 <a href="https://cdn2.paraty.es/casas-novas/images/f7cbfc232826610" class="picture_link" rel="lightbox[rooms_gallery]"> 2743 <div class="picture_wrapper"> 2744 <img src="https://cdn2.paraty.es/casas-novas/images/f7cbfc232826610=s1900" alt=""> 2745 </div> 2746 </a> 2747 2748 <a href="https://cdn2.paraty.es/casas-novas/images/3c2ed57f8dbfba2" class="picture_link" rel="lightbox[rooms_gallery]"> 2749 <div class="picture_wrapper"> 2750 <img src="https://cdn2.paraty.es/casas-novas/images/3c2ed57f8dbfba2=s1900" alt=""> 2751 </div> 2752 </a> 2753 2754 <a href="https://cdn2.paraty.es/casas-novas/images/aaed94ef51d5a78" class="picture_link" rel="lightbox[rooms_gallery]"> 2755 <div class="picture_wrapper"> 2756 <img src="https://cdn2.paraty.es/casas-novas/images/aaed94ef51d5a78=s1900" alt=""> 2757 </div> 2758 </a> 2759 2760 <a href="https://cdn2.paraty.es/casas-novas/images/7f624a828f71533" class="picture_link" rel="lightbox[rooms_gallery]"> 2761 <div class="picture_wrapper"> 2762 <img src="https://cdn2.paraty.es/casas-novas/images/7f624a828f71533=s1900" alt=""> 2763 </div> 2764 </a> 2765 2766 <a href="https://cdn2.paraty.es/casas-novas/images/d4af4732d82192e" class="picture_link" rel="lightbox[rooms_gallery]"> 2767 <div class="picture_wrapper"> 2768 <img src="https://cdn2.paraty.es/casas-novas/images/d4af4732d82192e=s1900" alt=""> 2769 </div> 2770 </a> 2771 2772 </div> 2773 </div> 2774 </div> 2775</div> 2776
2777<script type="text/javascript"> 2778 2779 $(window).load(function () { 2780 2781 2782 2783 $(".banner_carousel_bgcolor_wrapper .owl-carousel").owlCarousel({ 2784 loop: true, 2785 nav: true, 2786 navText: ['<i aria-hidden="true"></i>', '<i aria-hidden="true"></i>'], 2787 dots: true, 2788 items: 1, 2789 margin: 15, 2790 smartSpeed: 600, 2791 fluidSpeed: 600, 2792 navSpeed: 600, 2793 dotsSpeed: 600, 2794 dragEndSpeed: 600, 2795 autoplay: true 2796 }); 2797 2798 2799 }); 2800 2801</script>
2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 </section> 2824 2825 2826 2827 2828 2829 <div class="newsletter_wrapper" style="background-image: url(https://cdn2.paraty.es/casas-novas/images/a99fe0a32812757=s1900)"> 2830 <div class="newsletter_container container12"> 2831 <div class="newsletter_title">Newsletter</div> 2832 <div class="newsletter_description">Subscreva e siga-nos!</div> 2833 2834 <form class="newsletter_form has_social" action="/utils?action=newsletter" method="post"> 2835 2836 2837 2838 <input id="suscEmail" class="input_email" type="text" name="suscEmail" placeholder="Introduza o seu e-mail" aria-required="true" aria-describedby="email-help" /> 2839 2840 2841 <button type="submit" class="button_newsletter" style="border:none"><span>ENVIAR</span></button> 2842 2843 2844 2845 <div class="check_newsletter"> 2846 <div class="newsletter_checkbox"> 2847 <input class="check_privacy" id="privacy" name="privacy" type="checkbox" value="privacy"/> 2848 <label for="privacy"> <a data-fancybox 2849 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%"}' 2850 data-width="1200" 2851 class="myFancyPopup fancybox.iframe newsletter_popup" 2852 href="pt/?sectionContent=politica-de-privacidad.html" 2853 rel="nofollow">Eu li e aceito a polÃtica de privacidade</a> 2854 </label> 2855 2856 </div> 2857 </div> 2858 2859 2860 2861 <div class="check_newsletter"> 2862 <div class="newsletter_checkbox"> 2863 <input class="check_privacy" id="promotions" name="promotions" type="checkbox" value="privacy"/> 2864 <label for="promotions">Autorizo o tratamento dos meus dados para que me enviem promoções, ofertas e outras comunicações próprias.</label> 2865 2866 </div> 2867 </div> 2868 2869 2870 </form> 2871 2872 2873 <nav class="social_newsletter" aria-label="Social media"> 2874 2875 <a href="https://www.facebook.com/CasasNovasHotel" target="_blank" rel="nofollow" aria-label="Facebook"> 2876 <i class="fa fa-facebook" aria-hidden="true"></i> 2877 </a> 2878 2879 2880 2881 2882 2883 2884 2885 <a href="http://www.instagram.com/casasnovashotel" target="_blank" rel="nofollow" aria-label="Instagram"> 2886 <i class="fa fa-instagram" aria-hidden="true"></i> 2887 </a> 2888 2889 2890 2891 2892 2893 2894 </nav> 2895 2896 </div> 2897</div> 2898 2899 2900
2901<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 2901
2901
2902<script type="text/javascript"> 2903 $(window).on('load', function () { 2904 if (typeof newsletter_launched !== 'undefined' && newsletter_launched === true) { 2905 return; 2906 } 2907 2908 $(".newsletter_form").each(function() { 2909 $(this).validate({ 2910 rules: { 2911 privacy: "required", 2912 promotions: "required", 2913 suscEmail: { 2914 required: true, 2915 email: true 2916 }, 2917 suscName: { 2918 required: true 2919 }, 2920 suscSurname: { 2921 required: true 2922 }, 2923 suscDate: { 2924 required: true, 2925 date: true 2926 }, 2927 suscTelephone: { 2928 required: true, 2929 date: true 2930 } 2931 }, 2932 messages: { 2933 suscEmail: { 2934 required: "Este campo é obrigatório", 2935 email: "O valor deste campo é inválido" 2936 }, 2937 suscName: { 2938 required: "Este campo é obrigatório" 2939 }, 2940 suscSurname: { 2941 required: "Este campo é obrigatório" 2942 }, 2943 suscDate: { 2944 required: "Este campo é obrigatório", 2945 date: "O valor deste campo é inválido" 2946 }, 2947 suscTelephone: { 2948 required: "Este campo é obrigatório", 2949 date: "O valor deste campo é inválido" 2950 }, 2951 privacy: "Este campo é obrigatório", 2952 promotions: "Este campo é obrigatório", 2953 }, 2954 highlight: function (input) { 2955 $(input).parent().find("a").addClass('error_class'); 2956 $(input).parent().find("label").addClass('error_class'); 2957 $(input).parent().find("#suscEmail").addClass('error_class'); 2958 $(input).parent().find("#suscName").addClass('error_class'); 2959 $(input).parent().find("#suscSurname").addClass('error_class'); 2960 $(input).parent().find("#suscDate").addClass('error_class'); 2961 $(input).parent().find("#suscTelephone").addClass('error_class'); 2962 }, 2963 errorPlacement: function (error, element) { 2964 //this keeps enable the validation but hides the error message 2965 } 2966 }); 2967 }); 2968 2969 $(".button_newsletter").each(function() { 2970 $(this).unbind('click').click(function () { 2971 var clicked_button = $(this), 2972 form_newsletter = clicked_button.parent(".newsletter_form"); 2973 2974 form_newsletter.on('submit', function(event) { 2975 event.preventDefault(); 2976 }); 2977 2978 if (form_newsletter.valid()) { 2979 if (!form_newsletter.find("#g-recaptcha-response").length || form_newsletter.find("#g-recaptcha-response").val()) { 2980 $.post("/utils?action=newsletter&language=PORTUGUESE", 2981 { 2982 'email': form_newsletter.find("#suscEmail").val(), 2983 'name': form_newsletter.find("#suscName").val(), 2984 'surname': form_newsletter.find("#suscSurname").val(), 2985 'date': form_newsletter.find("#suscDate").val(), 2986 'telephone': form_newsletter.find("#suscTelephone").val(), 2987 'custom_tags': '', 2988 'g-recaptcha-response': form_newsletter.find("#g-recaptcha-response").val() 2989 }, 2990 2991 function (data) { 2992 2993 alert("Obrigado por subscrever a nossa newsletter"); 2994 2995 2996 $("#suscEmail").val(""); 2997 $("#suscName").val(""); 2998 $("#suscDate").val(""); 2999 $("#suscTelephone").val(""); 3000 } 3001 ); 3002 } else { 3003 form_newsletter.find(".g-recaptcha > div").css('border', '1px solid red'); 3004 } 3005 } else { 3006 3007 alert("* Campos de preenchimento obrigatório "); 3008 console.log("invalid"); 3009 3010 } 3011 3012 }); 3013 }); 3014 3015 newsletter_launched = true; 3016 3017 var script_fa_tag = document.createElement('script'); 3018 script_fa_tag.src = 'https://kit.fontawesome.com/d8b9925505.js'; 3019 script_fa_tag.setAttribute("defer", ""); 3020 3021 document.head.appendChild(script_fa_tag); 3022 }); 3023</script>
3023 3024 3025<footer> 3026 <div class="wrapper_content footer_content"> 3027 <div class="container12"> 3028 3029 <div class="footer_columns_wrapper"> 3030 3031 <div class="hotels_column"> 3032 3033 3034 3035 <div class="desc"> 3036 Rua Visconde do Rosário, Nº1<br> 30375400-727, Redondelo<br> 3038Casas Novas, Portugal<br> 3039<span class="phone"><a href="tel:+351276300050">Tel: +351 276 300 050</span><br> 3040<small>Chamada para rede fixa nacional</small><br> 3041<a href="mailto:[email protected]">[email protected]</a> 3042 </div> 3043 3044 3045 </div> 3046 3047 <div class="hotels_column"> 3048 3049 3050 3051 3052 </div> 3053 3054 <div class="hotels_column"> 3055 3056 3057 3058 <div class="desc"> 3059 <ul class="menu_links_column"> 3060<li><a href="/">InÃcio</a></li> 3061<li><a href="/hotel.html">Hotel</a></li> 3062<li><a href="/quartos.html">Quartos</a></li> 3063<li><a href="/restaurante.html">Restaurante</a></li> 3064<li><a href="/health-club.html">Health Club</a></li> 3065<li><a href="/eventos.html">Eventos</a></li> 3066<li><a href="/ofertas.html">Ofertas</a></li> 3067<li><a href="/galeria.html">Galeria</a></li> 3068<li><a href="/localizacao.html">Localização</a></li> 3069<li><a href="/minhas-reservas.html">Reservas</a></li> 3070</ul> 3071 3072 </div> 3073 3074 3075 </div> 3076 3077 </div> 3078 </div> 3079 3080 <div class="footer_legal_text_wrapper"> 3081 <div class="container12"> 3082 <div class="footer_links_wrapper"> 3083 3084 <a href="/pt/?sectionContent=politica-de-privacidad.html" 3085 class="myFancyPopup fancybox.iframe">PolÃtica de Privacidade</a> | 3086 3087 <a href="/pt/?sectionContent=politica-de-cookies.html" 3088 class="myFancyPopup fancybox.iframe">PolÃtica de Cookies</a> | 3089 3090 <a href="/pt/?sectionContent=condiciones-de-reserva.html" 3091 class="myFancyPopup fancybox.iframe">Condições de Reserva</a> | 3092 3093 <a href="/pt/?sectionContent=" 3094 class="myFancyPopup fancybox.iframe">Gerir cookies</a> | 3095 3096 <a target="_blank" href="https://www.paratytech.com/motor-de-reservas.html" 3097 title="Motor de Reservas">Motor de Reservas</a> | 3098 <a target="_blank" href="/sitemap.xml" title="">Site Map</a> | 3099 <a target="_blank" href="/rss.xml">RSS</a> 3100 </div> 3101 3102 3103 <div class="legal_text"><br><br> 3104 3105<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> 3106 3107<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> 3108 3109<p> 3110© Copyright 2026 | Casas Novas Countryside Hotel SPA & Events</p> 3111<br>RNET: 1358<br><br> 3112<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> 3113</div> 3114 3115 </div> 3116 </div> 3117 </div> 3118</footer> 3119 3120 3121
vendor: 6,195 bytes, lines 3121-3261
3121<script>(function (r, G, f, v) { 3122 var J = f("html"), n = f(r), p = f(G), b = f.fancybox = function () { 3123 b.open.apply(this, arguments) 3124 }, I = navigator.userAgent.match(/msie/i), B = null, s = G.createTouch !== v, t = function (a) { 3125 return a && a.hasOwnProperty && a instanceof f 3126 }, q = function (a) { 3127 return a && "string" === f.type(a) 3128 }, E = function (a) { 3129 return q(a) && 0 < a.indexOf("%") 3130 }, l = function (a, d) { 3131 var e = parseInt(a, 10) || 0; 3132 d && E(a) && (e *= b.getViewport()[d] / 100); 3133 return Math.ceil(e) 3134 }, w = function (a, b) { 3135 return l(a, b) + "px" 3136 }; 3137 f.extend(b, { 3138 version: "2.1.5", 3139 defaults: { 3140 padding: 15, 3141 margin: 20, 3142 width: 800, 3143 height: 600, 3144 minWidth: 100, 3145 minHeight: 100, 3146 maxWidth: 9999, 3147 maxHeight: 9999, 3148 pixelRatio: 1, 3149 autoSize: !0, 3150 autoHeight: !1, 3151 autoWidth: !1, 3152 autoResize: !0, 3153 autoCenter: !s, 3154 fitToView: !0, 3155 aspectRatio: !1, 3156 topRatio: 0.5, 3157 leftRatio: 0.5, 3158 scrolling: "auto", 3159 wrapCSS: "", 3160 arrows: !0, 3161 closeBtn: !0, 3162 closeClick: !1, 3163 nextClick: !1, 3164 mouseWheel: !0, 3165 autoPlay: !1, 3166 playSpeed: 3E3, 3167 preload: 3, 3168 modal: !1, 3169 loop: !0, 3170 ajax: {dataType: "html", headers: {"X-fancyBox": !0}}, 3171 iframe: {scrolling: "auto", preload: !0}, 3172 swf: {wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always"}, 3173 keys: { 3174 next: {13: "left", 34: "up", 39: "left", 40: "up"}, 3175 prev: {8: "right", 33: "down", 37: "right", 38: "down"}, 3176 close: [27], 3177 play: [32], 3178 toggle: [70] 3179 }, 3180 direction: {next: "left", prev: "right"}, 3181 scrollOutside: !0, 3182 index: 0, 3183 type: null, 3184 href: null, 3185 content: null, 3186 title: null, 3187 tpl: { 3188 wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 3189 image: '<img class="fancybox-image" src="{href}" alt="" />', 3190 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>", 3191 error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 3192 closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 3193 next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 3194 prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>' 3195 }, 3196 openEffect: "fade", 3197 openSpeed: 250, 3198 openEasing: "swing", 3199 openOpacity: !0, 3200 openMethod: "zoomIn", 3201 closeEffect: "fade", 3202 closeSpeed: 250, 3203 closeEasing: "swing", 3204 closeOpacity: !0, 3205 closeMethod: "zoomOut", 3206 nextEffect: "elastic", 3207 nextSpeed: 250, 3208 nextEasing: "swing", 3209 nextMethod: "changeIn", 3210 prevEffect: "elastic", 3211 prevSpeed: 250, 3212 prevEasing: "swing", 3213 prevMethod: "changeOut", 3214 helpers: {overlay: !0, title: !0}, 3215 onCancel: f.noop, 3216 beforeLoad: f.noop, 3217 afterLoad: f.noop, 3218 beforeShow: f.noop, 3219 afterShow: f.noop, 3220 beforeChange: f.noop, 3221 beforeClose: f.noop, 3222 afterClose: f.noop 3223 }, 3224 group: {}, 3225 opts: {}, 3226 previous: null, 3227 coming: null, 3228 current: null, 3229 isActive: !1, 3230 isOpen: !1, 3231 isOpened: !1, 3232 wrap: null, 3233 skin: null, 3234 outer: null, 3235 inner: null, 3236 player: {timer: null, isActive: !1}, 3237 ajaxLoad: null, 3238 imgPreload: null, 3239 transitions: {}, 3240 helpers: {}, 3241 open: function (a, d) { 3242 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) { 3243 var k = {}, g, h, j, m, l; 3244 "object" === f.type(c) && (c.nodeType && (c = f(c)), t(c) ? (k = { 3245 href: c.data("fancybox-href") || c.attr("href"), 3246 title: c.data("fancybox-title") || c.attr("title"), 3247 isDom: !0, 3248 element: c 3249 }, f.metadata && f.extend(!0, k, c.metadata())) : k = c); 3250 g = d.href || k.href || (q(c) ? c : null); 3251 h = d.title !== v ? d.title : k.title || ""; 3252 m = (j = d.content || k.content) ? "html" : d.type || k.type; 3253 !m && k.isDom && (m = c.data("fancybox-type"), m || (m = (m = c.prop("class").match(/fancybox\.(\w+)/)) ? m[1] : null)); 3254 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())); 3255 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)); 3256 f.extend(k, {href: g, type: m, content: j, title: h, selector: l}); 3257 a[e] = k 3258 }), 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) 3259 }, 3260 cancel: function () { 3261 var a = b.coming;
3262 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)) 3263 }, 3264 close: function (a) { 3265 b.cancel(); 3266 !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]()))) 3267 }, 3268 play: function (a) { 3269 var d = function () { 3270 clearTimeout(b.player.timer) 3271 }, e = function () { 3272 d(); 3273 b.current && b.player.isActive && (b.player.timer = setTimeout(b.next, b.current.playSpeed)) 3274 }, c = function () { 3275 d(); 3276 p.unbind(".player"); 3277 b.player.isActive = !1; 3278 b.trigger("onPlayEnd") 3279 }; 3280 if (!0 === a || !b.player.isActive && !1 !== a) { 3281 if (b.current && (b.current.loop || b.current.index < b.group.length - 1)) b.player.isActive = !0, p.bind({ 3282 "onCancel.player beforeClose.player": c, 3283 "onUpdate.player": e, 3284 "beforeLoad.player": d 3285 }), e(), b.trigger("onPlayStart") 3286 } else c() 3287 }, 3288 next: function (a) { 3289 var d = b.current; 3290 d && (q(a) || (a = d.direction.next), b.jumpto(d.index + 1, a, "next")) 3291 }, 3292 prev: function (a) { 3293 var d = b.current; 3294 d && (q(a) || (a = d.direction.prev), b.jumpto(d.index - 1, a, "prev")) 3295 }, 3296 jumpto: function (a, d, e) { 3297 var c = b.current; 3298 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))) 3299 }, 3300 reposition: function (a, d) { 3301 var e = b.current, c = e ? e.wrap : null, k; 3302 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))) 3303 }, 3304 update: function (a) { 3305 var d = a && a.type, e = !d || "orientationchange" === d; 3306 e && (clearTimeout(B), B = null); 3307 b.isOpen && !B && (B = setTimeout(function () { 3308 var c = b.current; 3309 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) 3310 }, e && !s ? 0 : 300)) 3311 }, 3312 toggle: function (a) { 3313 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()) 3314 }, 3315 hideLoading: function () { 3316 p.unbind(".loading"); 3317 f("#fancybox-loading").remove() 3318 }, 3319 showLoading: function () { 3320 var a, d; 3321 b.hideLoading(); 3322 a = f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body"); 3323 p.bind("keydown.loading", function (a) { 3324 if (27 === (a.which || a.keyCode)) a.preventDefault(), b.cancel() 3325 }); 3326 b.defaults.fixed || (d = b.getViewport(), a.css({ 3327 position: "absolute", 3328 top: 0.5 * d.h + d.y, 3329 left: 0.5 * d.w + d.x 3330 })) 3331 }, 3332 getViewport: function () { 3333 var a = b.current && b.current.locked || !1, d = {x: n.scrollLeft(), y: n.scrollTop()}; 3334 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 3334-3640
3334ight ? r.innerHeight : n.height()); 3335 return d 3336 }, 3337 unbindEvents: function () { 3338 b.wrap && t(b.wrap) && b.wrap.unbind(".fb"); 3339 p.unbind(".fb"); 3340 n.unbind(".fb") 3341 }, 3342 bindEvents: function () { 3343 var a = b.current, d; 3344 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) { 3345 var c = e.which || e.keyCode, k = e.target || e.srcElement; 3346 if (27 === c && b.coming) return !1; 3347 !e.ctrlKey && (!e.altKey && !e.shiftKey && !e.metaKey && (!k || !k.type && !f(k).is("[contenteditable]"))) && f.each(d, function (d, k) { 3348 if (1 < a.group.length && k[c] !== v) return b[d](k[c]), e.preventDefault(), !1; 3349 if (-1 < f.inArray(c, k)) return b[d](), e.preventDefault(), !1 3350 }) 3351 }), f.fn.mousewheel && a.mouseWheel && b.wrap.bind("mousewheel.fb", function (d, c, k, g) { 3352 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(); 3353 if (0 !== c && !j && 1 < b.group.length && !a.canShrink) { 3354 if (0 < g || 0 < k) b.prev(0 < g ? "down" : "left"); else if (0 > g || 0 > k) b.next(0 > g ? "up" : "right"); 3355 d.preventDefault() 3356 } 3357 })) 3358 }, 3359 trigger: function (a, d) { 3360 var e, c = d || b.coming || b.current; 3361 if (c) { 3362 f.isFunction(c[a]) && (e = c[a].apply(c, Array.prototype.slice.call(arguments, 1))); 3363 if (!1 === e) return !1; 3364 c.helpers && f.each(c.helpers, function (d, e) { 3365 if (e && b.helpers[d] && f.isFunction(b.helpers[d][a])) b.helpers[d][a](f.extend(!0, {}, b.helpers[d].defaults, e), c) 3366 }); 3367 p.trigger(a) 3368 } 3369 }, 3370 isImage: function (a) { 3371 return q(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i) 3372 }, 3373 isSWF: function (a) { 3374 return q(a) && a.match(/\.(swf)((\?|#).*)?$/i) 3375 }, 3376 _start: function (a) { 3377 var d = {}, e, c; 3378 a = l(a); 3379 e = b.group[a] || null; 3380 if (!e) return !1; 3381 d = f.extend(!0, {}, b.opts, e); 3382 e = d.margin; 3383 c = d.padding; 3384 "number" === f.type(e) && (d.margin = [e, e, e, e]); 3385 "number" === f.type(c) && (d.padding = [c, c, c, c]); 3386 d.modal && f.extend(!0, d, { 3387 closeBtn: !1, 3388 closeClick: !1, 3389 nextClick: !1, 3390 arrows: !1, 3391 mouseWheel: !1, 3392 keys: null, 3393 helpers: {overlay: {closeClick: !1}} 3394 }); 3395 d.autoSize && (d.autoWidth = d.autoHeight = !0); 3396 "auto" === d.width && (d.autoWidth = !0); 3397 "auto" === d.height && (d.autoHeight = !0); 3398 d.group = b.group; 3399 d.index = a; 3400 b.coming = d; 3401 if (!1 === b.trigger("beforeLoad")) b.coming = null; else { 3402 c = d.type; 3403 e = d.href; 3404 if (!c) return b.coming = null, b.current && b.router && "jumpto" !== b.router ? (b.current.index = a, b[b.router](b.direction)) : !1; 3405 b.isActive = !0; 3406 if ("image" === c || "swf" === c) d.autoHeight = d.autoWidth = !1, d.scrolling = "visible"; 3407 "image" === c && (d.aspectRatio = !0); 3408 "iframe" === c && s && (d.scrolling = "scroll"); 3409 d.wrap = f(d.tpl.wrap).addClass("fancybox-" + (s ? "mobile" : "desktop") + " fancybox-type-" + c + " fancybox-tmp " + d.wrapCSS).appendTo(d.parent || "body"); 3410 f.extend(d, { 3411 skin: f(".fancybox-skin", d.wrap), 3412 outer: f(".fancybox-outer", d.wrap), 3413 inner: f(".fancybox-inner", d.wrap) 3414 }); 3415 f.each(["Top", "Right", "Bottom", "Left"], function (a, b) { 3416 d.skin.css("padding" + b, w(d.padding[a])) 3417 }); 3418 b.trigger("onReady"); 3419 if ("inline" === c || "html" === c) { 3420 if (!d.content || !d.content.length) return b._error("content") 3421 } else if (!e) return b._error("href"); 3422 "image" === c ? b._loadImage() : "ajax" === c ? b._loadAjax() : "iframe" === c ? b._loadIframe() : b._afterLoad() 3423 } 3424 }, 3425 _error: function (a) { 3426 f.extend(b.coming, { 3427 type: "html", 3428 autoWidth: !0, 3429 autoHeight: !0, 3430 minWidth: 0, 3431 minHeight: 0, 3432 scrolling: "no", 3433 hasError: a, 3434 content: b.coming.tpl.error 3435 }); 3436 b._afterLoad() 3437 }, 3438 _loadImage: function () { 3439 var a = b.imgPreload = new Image; 3440 a.onload = function () { 3441 this.onload = this.onerror = null; 3442 b.coming.width = this.width / b.opts.pixelRatio; 3443 b.coming.height = this.height / b.opts.pixelRatio; 3444 b._afterLoad() 3445 }; 3446 a.onerror = function () { 3447 this.onload = this.onerror = null; 3448 b._error("image") 3449 }; 3450 a.src = b.coming.href; 3451 !0 !== a.complete && b.showLoading() 3452 }, 3453 _loadAjax: function () { 3454 var a = b.coming; 3455 b.showLoading(); 3456 b.ajaxLoad = f.ajax(f.extend({}, a.ajax, { 3457 url: a.href, error: function (a, e) { 3458 b.coming && "abort" !== e ? b._error("ajax", a) : b.hideLoading() 3459 }, success: function (d, e) { 3460 "success" === e && (a.content = d, b._afterLoad()) 3461 } 3462 })) 3463 }, 3464 _loadIframe: function () { 3465 var a = b.coming, 3466 d = f(a.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", s ? "auto" : a.iframe.scrolling).attr("src", a.href); 3467 f(a.wrap).bind("onReset", function () { 3468 try { 3469 f(this).find("iframe").hide().attr("src", "//about:blank").end().empty() 3470 } catch (a) { 3471 } 3472 }); 3473 a.iframe.preload && (b.showLoading(), d.one("load", function () { 3474 f(this).data("ready", 1); 3475 s || f(this).bind("load.fb", b.update); 3476 f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(); 3477 b._afterLoad() 3478 })); 3479 a.content = d.appendTo(a.inner); 3480 a.iframe.preload || b._afterLoad() 3481 }, 3482 _preloadImages: function () { 3483 var a = b.group, d = b.current, e = a.length, c = d.preload ? Math.min(d.preload, e - 1) : 0, f, g; 3484 for (g = 1; g <= c; g += 1) f = a[(d.index + g) % e], "image" === f.type && f.href && ((new Image).src = f.href) 3485 }, 3486 _afterLoad: function () { 3487 var a = b.coming, d = b.current, e, c, k, g, h; 3488 b.hideLoading(); 3489 if (a && !1 !== b.isActive) if (!1 === b.trigger("afterLoad", a, d)) a.wrap.stop(!0).trigger("onReset").remove(), b.coming = null; else { 3490 d && (b.trigger("beforeChange", d), d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 3491 b.unbindEvents(); 3492 e = a.content; 3493 c = a.type; 3494 k = a.scrolling; 3495 f.extend(b, {wrap: a.wrap, skin: a.skin, outer: a.outer, inner: a.inner, current: a, previous: d}); 3496 g = a.href; 3497 switch (c) { 3498 case "inline": 3499 case "ajax": 3500 case "html": 3501 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 () { 3502 f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1) 3503 })); 3504 break; 3505 case "image": 3506 e = a.tpl.image.replace("{href}", g); 3507 break; 3508 case "swf": 3509 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) { 3510 e += '<param name="' + a + '" value="' + b + '"></param>'; 3511 h += " " + a + '="' + b + '"' 3512 }), e += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>" 3513 } 3514 (!t(e) || !e.parent().is(a.inner)) && a.inner.append(e); 3515 b.trigger("beforeShow"); 3516 a.inner.css("overflow", "yes" === k ? "scroll" : "no" === k ? "hidden" : k); 3517 b._setDimension(); 3518 b.reposition(); 3519 b.isOpen = !1; 3520 b.coming = null; 3521 b.bindEvents(); 3522 if (b.isOpened) { 3523 if (d.prevMethod) b.transitions[d.prevMethod]() 3524 } else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove(); 3525 b.transitions[b.isOpened ? a.nextMethod : a.openMethod](); 3526 b._preloadImages() 3527 } 3528 }, 3529 _setDimension: function () { 3530 var a = b.getViewport(), d = 0, e = !1, c = !1, e = b.wrap, k = b.skin, g = b.inner, h = b.current, 3531 c = h.width, j = h.height, m = h.minWidth, u = h.minHeight, n = h.maxWidth, p = h.maxHeight, 3532 s = h.scrolling, q = h.scrollOutside ? h.scrollbarWidth : 0, x = h.margin, y = l(x[1] + x[3]), 3533 r = l(x[0] + x[2]), v, z, t, C, A, F, B, D, H; 3534 e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp"); 3535 x = l(k.outerWidth(!0) - k.width()); 3536 v = l(k.outerHeight(!0) - k.height()); 3537 z = y + x; 3538 t = r + v; 3539 C = E(c) ? (a.w - z) * l(c) / 100 : c; 3540 A = E(j) ? (a.h - t) * l(j) / 100 : j; 3541 if ("iframe" === h.type) { 3542 if (H = h.content, h.autoHeight && 1 === H.data("ready")) try { 3543 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)) 3544 } catch (G) { 3545 } 3546 } 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"); 3547 c = l(C); 3548 j = l(A); 3549 D = C / A; 3550 m = l(E(m) ? l(m, "w") - z : m); 3551 n = l(E(n) ? l(n, "w") - z : n); 3552 u = l(E(u) ? l(u, "h") - t : u); 3553 p = l(E(p) ? l(p, "h") - t : p); 3554 F = n; 3555 B = p; 3556 h.fitToView && (n = Math.min(a.w - z, n), p = Math.min(a.h - t, p)); 3557 z = a.w - y; 3558 r = a.h - r; 3559 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))); 3560 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))); 3561 q && ("auto" === s && j < A && c + x + q < z) && (c += q); 3562 g.width(c).height(j); 3563 e.width(c + x); 3564 a = e.width(); 3565 y = e.height(); 3566 e = (a > z || y > r) && c > m && j > u; 3567 c = h.aspectRatio ? c < F && j < B && c < C && j < A : (c < F || j < B) && (c < C || j < A); 3568 f.extend(h, { 3569 dim: {width: w(a), height: w(y)}, 3570 origWidth: C, 3571 origHeight: A, 3572 canShrink: e, 3573 canExpand: c, 3574 wPadding: x, 3575 hPadding: v, 3576 wrapSpace: y - k.outerHeight(!0), 3577 skinSpace: k.height() - j 3578 }); 3579 !H && (h.autoHeight && j > u && j < p && !c) && g.height("auto") 3580 }, 3581 _getPosition: function (a) { 3582 var d = b.current, e = b.getViewport(), c = d.margin, f = b.wrap.width() + c[1] + c[3], 3583 g = b.wrap.height() + c[0] + c[2], c = {position: "absolute", top: c[0], left: c[3]}; 3584 d.autoCenter && d.fixed && !a && g <= e.h && f <= e.w ? c.position = "fixed" : d.locked || (c.top += e.y, c.left += e.x); 3585 c.top = w(Math.max(c.top, c.top + (e.h - g) * d.topRatio)); 3586 c.left = w(Math.max(c.left, c.left + (e.w - f) * d.leftRatio)); 3587 return c 3588 }, 3589 _afterZoomIn: function () { 3590 var a = b.current; 3591 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) { 3592 !f(d.target).is("a") && !f(d.target).parent().is("a") && (d.preventDefault(), b[a.closeClick ? "close" : "next"]()) 3593 }), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function (a) { 3594 a.preventDefault(); 3595 b.close() 3596 }), 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())) 3597 }, 3598 _afterZoomOut: function (a) { 3599 a = a || b.current; 3600 f(".fancybox-wrap").trigger("onReset").remove(); 3601 f.extend(b, { 3602 group: {}, 3603 opts: {}, 3604 router: !1, 3605 current: null, 3606 isActive: !1, 3607 isOpened: !1, 3608 isOpen: !1, 3609 isClosing: !1, 3610 wrap: null, 3611 skin: null, 3612 outer: null, 3613 inner: null 3614 }); 3615 b.trigger("afterClose", a) 3616 } 3617 }); 3618 b.transitions = { 3619 getOrigPosition: function () { 3620 var a = b.current, d = a.element, e = a.orig, c = {}, f = 50, g = 50, h = a.hPadding, j = a.wPadding, 3621 m = b.getViewport(); 3622 !e && (a.isDom && d.is(":visible")) && (e = d.find("img:first"), e.length || (e = d)); 3623 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); 3624 if ("fixed" === b.wrap.css("position") || a.locked) c.top -= m.y, c.left -= m.x; 3625 return c = { 3626 top: w(c.top - h * a.topRatio), 3627 left: w(c.left - j * a.leftRatio), 3628 width: w(f + j), 3629 height: w(g + h) 3630 } 3631 }, step: function (a, d) { 3632 var e, c, f = d.prop; 3633 c = b.current; 3634 var g = c.wrapSpace, h = c.skinSpace; 3635 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)) 3636 }, zoomIn: function () { 3637 var a = b.current, d = a.pos, e = a.openEffect, c = "elastic" === e, k = f.extend({opacity: 1}, d); 3638 delete k.position; 3639 c ? (d = this.getOrigPosition(), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1); 3640 b.wrap.css(d).animate(k, {
3641 duration: "none" === e ? 0 : a.openSpeed, 3642 easing: a.openEasing, 3643 step: c ? this.step : null, 3644 complete: b._afterZoomIn 3645 }) 3646 }, zoomOut: function () { 3647 var a = b.current, d = a.closeEffect, e = "elastic" === d, c = {opacity: 0.1}; 3648 e && (c = this.getOrigPosition(), a.closeOpacity && (c.opacity = 0.1)); 3649 b.wrap.animate(c, { 3650 duration: "none" === d ? 0 : a.closeSpeed, 3651 easing: a.closeEasing, 3652 step: e ? this.step : null, 3653 complete: b._afterZoomOut 3654 }) 3655 }, changeIn: function () { 3656 var a = b.current, d = a.nextEffect, e = a.pos, c = {opacity: 1}, f = b.direction, g; 3657 e.opacity = 0.1; 3658 "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")); 3659 "none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, { 3660 duration: a.nextSpeed, 3661 easing: a.nextEasing, 3662 complete: b._afterZoomIn 3663 }) 3664 }, changeOut: function () { 3665 var a = b.previous, d = a.prevEffect, e = {opacity: 0.1}, c = b.direction; 3666 "elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px"); 3667 a.wrap.animate(e, { 3668 duration: "none" === d ? 0 : a.prevSpeed, easing: a.prevEasing, complete: function () { 3669 f(this).trigger("onReset").remove() 3670 } 3671 }) 3672 } 3673 }; 3674 b.helpers.overlay = { 3675 defaults: {closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !s, fixed: !0}, 3676 overlay: null, 3677 fixed: !1, 3678 el: f("html"), 3679 create: function (a) { 3680 a = f.extend({}, this.defaults, a); 3681 this.overlay && this.close(); 3682 this.overlay = f('<div class="fancybox-overlay"></div>').appendTo(b.coming ? b.coming.parent : a.parent); 3683 this.fixed = !1; 3684 a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0) 3685 }, 3686 open: function (a) { 3687 var d = this; 3688 a = f.extend({}, this.defaults, a); 3689 this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a); 3690 this.fixed || (n.bind("resize.overlay", f.proxy(this.update, this)), this.update()); 3691 a.closeClick && this.overlay.bind("click.overlay", function (a) { 3692 if (f(a.target).hasClass("fancybox-overlay")) return b.isActive ? b.close() : d.close(), !1 3693 }); 3694 this.overlay.css(a.css).show() 3695 }, 3696 close: function () { 3697 var a, b; 3698 n.unbind("resize.overlay"); 3699 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)); 3700 f(".fancybox-overlay").remove().hide(); 3701 f.extend(this, {overlay: null, fixed: !1}) 3702 }, 3703 update: function () { 3704 var a = "100%", b; 3705 this.overlay.width(a).height("100%"); 3706 I ? (b = Math.max(G.documentElement.offsetWidth, G.body.offsetWidth), p.width() > b && (a = p.width())) : p.width() > n.width() && (a = p.width()); 3707 this.overlay.width(a).height(p.height()) 3708 }, 3709 onReady: function (a, b) { 3710 var e = this.overlay; 3711 f(".fancybox-overlay").stop(!0, !0); 3712 e || this.create(a); 3713 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); 3714 !0 === a.showEarly && this.beforeShow.apply(this, arguments) 3715 }, 3716 beforeShow: function (a, b) { 3717 var e, c; 3718 b.locked && (!1 !== this.margin && (f("*:not(object)").filter(function () { 3719 return "fixed" === f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap") 3720 }).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), e = n.scrollTop(), c = n.scrollLeft(), this.el.addClass("fancybox-lock"), n.scrollTop(e).scrollLeft(c)); 3721 this.open(a) 3722 }, 3723 onUpdate: function () { 3724 this.fixed || this.update() 3725 }, 3726 afterClose: function (a) { 3727 this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this)) 3728 } 3729 }; 3730 b.helpers.title = { 3731 defaults: {type: "float", position: "bottom"}, beforeShow: function (a) { 3732 var d = b.current, e = d.title, c = a.type; 3733 f.isFunction(e) && (e = e.call(d.element, d)); 3734 if (q(e) && "" !== f.trim(e)) { 3735 d = f('<div class="fancybox-title fancybox-title-' + c + '-wrap">' + e + "</div>"); 3736 switch (c) { 3737 case "inside": 3738 c = b.skin; 3739 break; 3740 case "outside": 3741 c = b.wrap; 3742 break; 3743 case "over": 3744 c = b.inner; 3745 break; 3746 default: 3747 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"))) 3748 } 3749 d["top" === a.position ? "prependTo" : "appendTo"](c) 3750 } 3751 } 3752 }; 3753 f.fn.fancybox = function (a) { 3754 var d, e = f(this), c = this.selector || "", k = function (g) { 3755 var h = f(this).blur(), j = d, k, l; 3756 !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()) 3757 }; 3758 a = a || {}; 3759 d = a.index || 0; 3760 !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); 3761 this.filter("[data-fancybox-start=1]").trigger("click"); 3762 return this 3763 }; 3764 p.ready(function () { 3765 var a, d; 3766 f.scrollbarWidth === v && (f.scrollbarWidth = function () { 3767 var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"), 3768 b = a.children(), b = b.innerWidth() - b.height(99).innerWidth(); 3769 a.remove(); 3770 return b 3771 }); 3772 if (f.support.fixedPosition === v) { 3773 a = f.support; 3774 d = f('<div style="position:fixed;top:20px;"></div>').appendTo("body"); 3775 var e = 20 === d[0].offsetTop || 15 === d[0].offsetTop; 3776 d.remove(); 3777 a.fixedPosition = e 3778 } 3779 f.extend(b.defaults, {scrollbarWidth: f.scrollbarWidth(), fixed: f.support.fixedPosition, parent: f("body")}); 3780 a = f(r).width(); 3781 J.addClass("fancybox-lock-test"); 3782 d = f(r).width(); 3783 J.removeClass("fancybox-lock-test"); 3784 f("<style type='text/css'>.fancybox-margin{margin-right:" + (d - a) + "px;}</style>").appendTo("head") 3785 }) 3786})(window, document, jQuery);</script>
3786<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 3786-3947
3786<script> 3787(function( $, undefined ) { 3788var uuid = 0, 3789 runiqueId = /^ui-id-\d+$/; 3790$.ui = $.ui || {}; 3791$.extend( $.ui, { 3792 version: "1.10.4", 3793 keyCode: { 3794 BACKSPACE: 8, 3795 COMMA: 188, 3796 DELETE: 46, 3797 DOWN: 40, 3798 END: 35, 3799 ENTER: 13, 3800 ESCAPE: 27, 3801 HOME: 36, 3802 LEFT: 37, 3803 NUMPAD_ADD: 107, 3804 NUMPAD_DECIMAL: 110, 3805 NUMPAD_DIVIDE: 111, 3806 NUMPAD_ENTER: 108, 3807 NUMPAD_MULTIPLY: 106, 3808 NUMPAD_SUBTRACT: 109, 3809 PAGE_DOWN: 34, 3810 PAGE_UP: 33, 3811 PERIOD: 190, 3812 RIGHT: 39, 3813 SPACE: 32, 3814 TAB: 9, 3815 UP: 38 3816 } 3817}); 3818$.fn.extend({ 3819 focus: (function( orig ) { 3820 return function( delay, fn ) { 3821 return typeof delay === "number" ? 3822 this.each(function() { 3823 var elem = this; 3824 setTimeout(function() { 3825 $( elem ).focus(); 3826 if ( fn ) { 3827 fn.call( elem ); 3828 } 3829 }, delay ); 3830 }) : 3831 orig.apply( this, arguments ); 3832 }; 3833 })( $.fn.focus ), 3834 scrollParent: function() { 3835 var scrollParent; 3836 if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { 3837 scrollParent = this.parents().filter(function() { 3838 return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); 3839 }).eq(0); 3840 } else { 3841 scrollParent = this.parents().filter(function() { 3842 return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); 3843 }).eq(0); 3844 } 3845 return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; 3846 }, 3847 zIndex: function( zIndex ) { 3848 if ( zIndex !== undefined ) { 3849 return this.css( "zIndex", zIndex ); 3850 } 3851 if ( this.length ) { 3852 var elem = $( this[ 0 ] ), position, value; 3853 while ( elem.length && elem[ 0 ] !== document ) { 3854 position = elem.css( "position" ); 3855 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 3856 value = parseInt( elem.css( "zIndex" ), 10 ); 3857 if ( !isNaN( value ) && value !== 0 ) { 3858 return value; 3859 } 3860 } 3861 elem = elem.parent(); 3862 } 3863 } 3864 return 0; 3865 }, 3866 uniqueId: function() { 3867 return this.each(function() { 3868 if ( !this.id ) { 3869 this.id = "ui-id-" + (++uuid); 3870 } 3871 }); 3872 }, 3873 removeUniqueId: function() { 3874 return this.each(function() { 3875 if ( runiqueId.test( this.id ) ) { 3876 $( this ).removeAttr( "id" ); 3877 } 3878 }); 3879 } 3880}); 3881function focusable( element, isTabIndexNotNaN ) { 3882 var map, mapName, img, 3883 nodeName = element.nodeName.toLowerCase(); 3884 if ( "area" === nodeName ) { 3885 map = element.parentNode; 3886 mapName = map.name; 3887 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 3888 return false; 3889 } 3890 img = $( "img[usemap=#" + mapName + "]" )[0]; 3891 return !!img && visible( img ); 3892 } 3893 return ( /input|select|textarea|button|object/.test( nodeName ) ? 3894 !element.disabled : 3895 "a" === nodeName ? 3896 element.href || isTabIndexNotNaN : 3897 isTabIndexNotNaN) && 3898 // the element and all of its ancestors must be visible 3899 visible( element ); 3900} 3901function visible( element ) { 3902 return $.expr.filters.visible( element ) && 3903 !$( element ).parents().addBack().filter(function() { 3904 return $.css( this, "visibility" ) === "hidden"; 3905 }).length; 3906} 3907$.extend( $.expr[ ":" ], { 3908 data: $.expr.createPseudo ? 3909 $.expr.createPseudo(function( dataName ) { 3910 return function( elem ) { 3911 return !!$.data( elem, dataName ); 3912 }; 3913 }) : 3914 function( elem, i, match ) { 3915 return !!$.data( elem, match[ 3 ] ); 3916 }, 3917 focusable: function( element ) { 3918 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 3919 }, 3920 tabbable: function( element ) { 3921 var tabIndex = $.attr( element, "tabindex" ), 3922 isTabIndexNaN = isNaN( tabIndex ); 3923 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 3924 } 3925}); 3926if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { 3927 $.each( [ "Width", "Height" ], function( i, name ) { 3928 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 3929 type = name.toLowerCase(), 3930 orig = { 3931 innerWidth: $.fn.innerWidth, 3932 innerHeight: $.fn.innerHeight, 3933 outerWidth: $.fn.outerWidth, 3934 outerHeight: $.fn.outerHeight 3935 }; 3936 function reduce( elem, size, border, margin ) { 3937 $.each( side, function() { 3938 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 3939 if ( border ) { 3940 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 3941 } 3942 if ( margin ) { 3943 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 3944 } 3945 }); 3946 return size; 3947 }
3948 $.fn[ "inner" + name ] = function( size ) { 3949 if ( size === undefined ) { 3950 return orig[ "inner" + name ].call( this ); 3951 } 3952 return this.each(function() { 3953 $( this ).css( type, reduce( this, size ) + "px" ); 3954 }); 3955 }; 3956 $.fn[ "outer" + name] = function( size, margin ) { 3957 if ( typeof size !== "number" ) { 3958 return orig[ "outer" + name ].call( this, size ); 3959 } 3960 return this.each(function() { 3961 $( this).css( type, reduce( this, size, true, margin ) + "px" ); 3962 }); 3963 }; 3964 }); 3965} 3966if ( !$.fn.addBack ) { 3967 $.fn.addBack = function( selector ) { 3968 return this.add( selector == null ? 3969 this.prevObject : this.prevObject.filter( selector ) 3970 ); 3971 }; 3972} 3973if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 3974 $.fn.removeData = (function( removeData ) { 3975 return function( key ) { 3976 if ( arguments.length ) { 3977 return removeData.call( this, $.camelCase( key ) ); 3978 } else { 3979 return removeData.call( this ); 3980 } 3981 }; 3982 })( $.fn.removeData ); 3983} 3984$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 3985$.support.selectstart = "onselectstart" in document.createElement( "div" ); 3986$.fn.extend({ 3987 disableSelection: function() { 3988 return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + 3989 ".ui-disableSelection", function( event ) { 3990 event.preventDefault(); 3991 }); 3992 }, 3993 enableSelection: function() { 3994 return this.unbind( ".ui-disableSelection" ); 3995 } 3996}); 3997$.extend( $.ui, { 3998 plugin: { 3999 add: function( module, option, set ) { 4000 var i, 4001 proto = $.ui[ module ].prototype; 4002 for ( i in set ) { 4003 proto.plugins[ i ] = proto.plugins[ i ] || []; 4004 proto.plugins[ i ].push( [ option, set[ i ] ] ); 4005 } 4006 }, 4007 call: function( instance, name, args ) { 4008 var i, 4009 set = instance.plugins[ name ]; 4010 if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { 4011 return; 4012 } 4013 for ( i = 0; i < set.length; i++ ) { 4014 if ( instance.options[ set[ i ][ 0 ] ] ) { 4015 set[ i ][ 1 ].apply( instance.element, args ); 4016 } 4017 } 4018 } 4019 }, 4020 hasScroll: function( el, a ) { 4021 //If overflow is hidden, the element might have extra content, but the user wants to hide it 4022 if ( $( el ).css( "overflow" ) === "hidden") { 4023 return false; 4024 } 4025 var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", 4026 has = false; 4027 if ( el[ scroll ] > 0 ) { 4028 return true; 4029 } 4030 el[ scroll ] = 1; 4031 has = ( el[ scroll ] > 0 ); 4032 el[ scroll ] = 0; 4033 return has; 4034 } 4035}); 4036})( jQuery ); 4037(function( $, undefined ) { 4038var uuid = 0, 4039 slice = Array.prototype.slice, 4040 _cleanData = $.cleanData; 4041$.cleanData = function( elems ) { 4042 for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { 4043 try { 4044 $( elem ).triggerHandler( "remove" ); 4045 } catch( e ) {} 4046 } 4047 _cleanData( elems ); 4048}; 4049$.widget = function( name, base, prototype ) { 4050 var fullName, existingConstructor, constructor, basePrototype, 4051 proxiedPrototype = {}, 4052 namespace = name.split( "." )[ 0 ]; 4053 name = name.split( "." )[ 1 ]; 4054 fullName = namespace + "-" + name; 4055 if ( !prototype ) { 4056 prototype = base; 4057 base = $.Widget; 4058 } 4059 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 4060 return !!$.data( elem, fullName ); 4061 }; 4062 $[ namespace ] = $[ namespace ] || {}; 4063 existingConstructor = $[ namespace ][ name ]; 4064 constructor = $[ namespace ][ name ] = function( options, element ) { 4065 if ( !this._createWidget ) { 4066 return new constructor( options, element ); 4067 } 4068 if ( arguments.length ) { 4069 this._createWidget( options, element ); 4070 } 4071 }; 4072 $.extend( constructor, existingConstructor, { 4073 version: prototype.version, 4074 _proto: $.extend( {}, prototype ), 4075 _childConstructors: [] 4076 }); 4077 basePrototype = new base(); 4078 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 4079 $.each( prototype, function( prop, value ) { 4080 if ( !$.isFunction( value ) ) { 4081 proxiedPrototype[ prop ] = value; 4082 return; 4083 } 4084 proxiedPrototype[ prop ] = (function() { 4085 var _super = function() { 4086 return base.prototype[ prop ].apply( this, arguments ); 4087 }, 4088 _superApply = function( args ) { 4089 return base.prototype[ prop ].apply( this, args ); 4090 }; 4091 return function() { 4092 var __super = this._super, 4093 __superApply = this._superApply, 4094 returnValue; 4095 this._super = _super; 4096 this._superApply = _superApply;
vendor: 9,998 bytes, lines 4097-4428
4097 returnValue = value.apply( this, arguments ); 4098 this._super = __super; 4099 this._superApply = __superApply; 4100 return returnValue; 4101 }; 4102 })(); 4103 }); 4104 constructor.prototype = $.widget.extend( basePrototype, { 4105 widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name 4106 }, proxiedPrototype, { 4107 constructor: constructor, 4108 namespace: namespace, 4109 widgetName: name, 4110 widgetFullName: fullName 4111 }); 4112 if ( existingConstructor ) { 4113 $.each( existingConstructor._childConstructors, function( i, child ) { 4114 var childPrototype = child.prototype; 4115 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); 4116 }); 4117 delete existingConstructor._childConstructors; 4118 } else { 4119 base._childConstructors.push( constructor ); 4120 } 4121 $.widget.bridge( name, constructor ); 4122}; 4123$.widget.extend = function( target ) { 4124 var input = slice.call( arguments, 1 ), 4125 inputIndex = 0, 4126 inputLength = input.length, 4127 key, 4128 value; 4129 for ( ; inputIndex < inputLength; inputIndex++ ) { 4130 for ( key in input[ inputIndex ] ) { 4131 value = input[ inputIndex ][ key ]; 4132 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 4133 if ( $.isPlainObject( value ) ) { 4134 target[ key ] = $.isPlainObject( target[ key ] ) ? 4135 $.widget.extend( {}, target[ key ], value ) : 4136 $.widget.extend( {}, value ); 4137 } else { 4138 target[ key ] = value; 4139 } 4140 } 4141 } 4142 } 4143 return target; 4144}; 4145$.widget.bridge = function( name, object ) { 4146 var fullName = object.prototype.widgetFullName || name; 4147 $.fn[ name ] = function( options ) { 4148 var isMethodCall = typeof options === "string", 4149 args = slice.call( arguments, 1 ), 4150 returnValue = this; 4151 options = !isMethodCall && args.length ? 4152 $.widget.extend.apply( null, [ options ].concat(args) ) : 4153 options; 4154 if ( isMethodCall ) { 4155 this.each(function() { 4156 var methodValue, 4157 instance = $.data( this, fullName ); 4158 if ( !instance ) { 4159 return $.error( "cannot call methods on " + name + " prior to initialization; " + 4160 "attempted to call method '" + options + "'" ); 4161 } 4162 if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { 4163 return $.error( "no such method '" + options + "' for " + name + " widget instance" ); 4164 } 4165 methodValue = instance[ options ].apply( instance, args ); 4166 if ( methodValue !== instance && methodValue !== undefined ) { 4167 returnValue = methodValue && methodValue.jquery ? 4168 returnValue.pushStack( methodValue.get() ) : 4169 methodValue; 4170 return false; 4171 } 4172 }); 4173 } else { 4174 this.each(function() { 4175 var instance = $.data( this, fullName ); 4176 if ( instance ) { 4177 instance.option( options || {} )._init(); 4178 } else { 4179 $.data( this, fullName, new object( options, this ) ); 4180 } 4181 }); 4182 } 4183 return returnValue; 4184 }; 4185}; 4186$.Widget = function() {}; 4187$.Widget._childConstructors = []; 4188$.Widget.prototype = { 4189 widgetName: "widget", 4190 widgetEventPrefix: "", 4191 defaultElement: "<div>", 4192 options: { 4193 disabled: false, 4194 create: null 4195 }, 4196 _createWidget: function( options, element ) { 4197 element = $( element || this.defaultElement || this )[ 0 ]; 4198 this.element = $( element ); 4199 this.uuid = uuid++; 4200 this.eventNamespace = "." + this.widgetName + this.uuid; 4201 this.options = $.widget.extend( {}, 4202 this.options, 4203 this._getCreateOptions(), 4204 options ); 4205 this.bindings = $(); 4206 this.hoverable = $(); 4207 this.focusable = $(); 4208 if ( element !== this ) { 4209 $.data( element, this.widgetFullName, this ); 4210 this._on( true, this.element, { 4211 remove: function( event ) { 4212 if ( event.target === element ) { 4213 this.destroy(); 4214 } 4215 } 4216 }); 4217 this.document = $( element.style ? 4218 element.ownerDocument : 4219 element.document || element ); 4220 this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); 4221 } 4222 this._create(); 4223 this._trigger( "create", null, this._getCreateEventData() ); 4224 this._init(); 4225 }, 4226 _getCreateOptions: $.noop, 4227 _getCreateEventData: $.noop, 4228 _create: $.noop, 4229 _init: $.noop, 4230 destroy: function() { 4231 this._destroy(); 4232 this.element 4233 .unbind( this.eventNamespace ) 4234 .removeData( this.widgetName ) 4235 .removeData( this.widgetFullName ) 4236 .removeData( $.camelCase( this.widgetFullName ) ); 4237 this.widget() 4238 .unbind( this.eventNamespace ) 4239 .removeAttr( "aria-disabled" ) 4240 .removeClass( 4241 this.widgetFullName + "-disabled " + 4242 "ui-state-disabled" ); 4243 this.bindings.unbind( this.eventNamespace ); 4244 this.hoverable.removeClass( "ui-state-hover" ); 4245 this.focusable.removeClass( "ui-state-focus" ); 4246 }, 4247 _destroy: $.noop, 4248 widget: function() { 4249 return this.element; 4250 }, 4251 option: function( key, value ) { 4252 var options = key, 4253 parts, 4254 curOption, 4255 i; 4256 if ( arguments.length === 0 ) { 4257 return $.widget.extend( {}, this.options ); 4258 } 4259 if ( typeof key === "string" ) { 4260 options = {}; 4261 parts = key.split( "." ); 4262 key = parts.shift(); 4263 if ( parts.length ) { 4264 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 4265 for ( i = 0; i < parts.length - 1; i++ ) { 4266 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 4267 curOption = curOption[ parts[ i ] ]; 4268 } 4269 key = parts.pop(); 4270 if ( arguments.length === 1 ) { 4271 return curOption[ key ] === undefined ? null : curOption[ key ]; 4272 } 4273 curOption[ key ] = value; 4274 } else { 4275 if ( arguments.length === 1 ) { 4276 return this.options[ key ] === undefined ? null : this.options[ key ]; 4277 } 4278 options[ key ] = value; 4279 } 4280 } 4281 this._setOptions( options ); 4282 return this; 4283 }, 4284 _setOptions: function( options ) { 4285 var key; 4286 for ( key in options ) { 4287 this._setOption( key, options[ key ] ); 4288 } 4289 return this; 4290 }, 4291 _setOption: function( key, value ) { 4292 this.options[ key ] = value; 4293 if ( key === "disabled" ) { 4294 this.widget() 4295 .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) 4296 .attr( "aria-disabled", value ); 4297 this.hoverable.removeClass( "ui-state-hover" ); 4298 this.focusable.removeClass( "ui-state-focus" ); 4299 } 4300 return this; 4301 }, 4302 enable: function() { 4303 return this._setOption( "disabled", false ); 4304 }, 4305 disable: function() { 4306 return this._setOption( "disabled", true ); 4307 }, 4308 _on: function( suppressDisabledCheck, element, handlers ) { 4309 var delegateElement, 4310 instance = this; 4311 if ( typeof suppressDisabledCheck !== "boolean" ) { 4312 handlers = element; 4313 element = suppressDisabledCheck; 4314 suppressDisabledCheck = false; 4315 } 4316 if ( !handlers ) { 4317 handlers = element; 4318 element = this.element; 4319 delegateElement = this.widget(); 4320 } else { 4321 element = delegateElement = $( element ); 4322 this.bindings = this.bindings.add( element ); 4323 } 4324 $.each( handlers, function( event, handler ) { 4325 function handlerProxy() { 4326 if ( !suppressDisabledCheck && 4327 ( instance.options.disabled === true || 4328 $( this ).hasClass( "ui-state-disabled" ) ) ) { 4329 return; 4330 } 4331 return ( typeof handler === "string" ? instance[ handler ] : handler ) 4332 .apply( instance, arguments ); 4333 } 4334 if ( typeof handler !== "string" ) { 4335 handlerProxy.guid = handler.guid = 4336 handler.guid || handlerProxy.guid || $.guid++; 4337 } 4338 var match = event.match( /^(\w+)\s*(.*)$/ ), 4339 eventName = match[1] + instance.eventNamespace, 4340 selector = match[2]; 4341 if ( selector ) { 4342 delegateElement.delegate( selector, eventName, handlerProxy ); 4343 } else { 4344 element.bind( eventName, handlerProxy ); 4345 } 4346 }); 4347 }, 4348 _off: function( element, eventName ) { 4349 eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; 4350 element.unbind( eventName ).undelegate( eventName ); 4351 }, 4352 _delay: function( handler, delay ) { 4353 function handlerProxy() { 4354 return ( typeof handler === "string" ? instance[ handler ] : handler ) 4355 .apply( instance, arguments ); 4356 } 4357 var instance = this; 4358 return setTimeout( handlerProxy, delay || 0 ); 4359 }, 4360 _hoverable: function( element ) { 4361 this.hoverable = this.hoverable.add( element ); 4362 this._on( element, { 4363 mouseenter: function( event ) { 4364 $( event.currentTarget ).addClass( "ui-state-hover" ); 4365 }, 4366 mouseleave: function( event ) { 4367 $( event.currentTarget ).removeClass( "ui-state-hover" ); 4368 } 4369 }); 4370 }, 4371 _focusable: function( element ) { 4372 this.focusable = this.focusable.add( element ); 4373 this._on( element, { 4374 focusin: function( event ) { 4375 $( event.currentTarget ).addClass( "ui-state-focus" ); 4376 }, 4377 focusout: function( event ) { 4378 $( event.currentTarget ).removeClass( "ui-state-focus" ); 4379 } 4380 }); 4381 }, 4382 _trigger: function( type, event, data ) { 4383 var prop, orig, 4384 callback = this.options[ type ]; 4385 4386 data = data || {}; 4387 event = $.Event( event ); 4388 event.type = ( type === this.widgetEventPrefix ? 4389 type : 4390 this.widgetEventPrefix + type ).toLowerCase(); 4391 event.target = this.element[ 0 ]; 4392 orig = event.originalEvent; 4393 if ( orig ) { 4394 for ( prop in orig ) { 4395 if ( !( prop in event ) ) { 4396 event[ prop ] = orig[ prop ]; 4397 } 4398 } 4399 } 4400 this.element.trigger( event, data ); 4401 return !( $.isFunction( callback ) && 4402 callback.apply( this.element[0], [ event ].concat( data ) ) === false || 4403 event.isDefaultPrevented() ); 4404 } 4405}; 4406$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 4407 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 4408 if ( typeof options === "string" ) { 4409 options = { effect: options }; 4410 } 4411 var hasOptions, 4412 effectName = !options ? 4413 method : 4414 options === true || typeof options === "number" ? 4415 defaultEffect : 4416 options.effect || defaultEffect; 4417 options = options || {}; 4418 if ( typeof options === "number" ) { 4419 options = { duration: options }; 4420 } 4421 hasOptions = !$.isEmptyObject( options ); 4422 options.complete = callback; 4423 if ( options.delay ) { 4424 element.delay( options.delay ); 4425 } 4426 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 4427 element[ method ]( options ); 4428 } else if ( effectName !== method && element[ effectName ] ) {
vendor: 60,818 bytes, lines 4429-6204
4429 element[ effectName ]( options.duration, options.easing, callback ); 4430 } else { 4431 element.queue(function( next ) { 4432 $( this )[ method ](); 4433 if ( callback ) { 4434 callback.call( element[ 0 ] ); 4435 } 4436 next(); 4437 }); 4438 } 4439 }; 4440}); 4441})( jQuery ); 4442(function( $, undefined ) { 4443var mouseHandled = false; 4444$( document ).mouseup( function() { 4445 mouseHandled = false; 4446}); 4447$.widget("ui.mouse", { 4448 version: "1.10.4", 4449 options: { 4450 cancel: "input,textarea,button,select,option", 4451 distance: 1, 4452 delay: 0 4453 }, 4454 _mouseInit: function() { 4455 var that = this; 4456 this.element 4457 .bind("mousedown."+this.widgetName, function(event) { 4458 return that._mouseDown(event); 4459 }) 4460 .bind("click."+this.widgetName, function(event) { 4461 if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { 4462 $.removeData(event.target, that.widgetName + ".preventClickEvent"); 4463 event.stopImmediatePropagation(); 4464 return false; 4465 } 4466 }); 4467 this.started = false; 4468 }, 4469 _mouseDestroy: function() { 4470 this.element.unbind("."+this.widgetName); 4471 if ( this._mouseMoveDelegate ) { 4472 $(document) 4473 .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) 4474 .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); 4475 } 4476 }, 4477 _mouseDown: function(event) { 4478 if( mouseHandled ) { return; } 4479 (this._mouseStarted && this._mouseUp(event)); 4480 this._mouseDownEvent = event; 4481 var that = this, 4482 btnIsLeft = (event.which === 1), 4483 elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); 4484 if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { 4485 return true; 4486 } 4487 this.mouseDelayMet = !this.options.delay; 4488 if (!this.mouseDelayMet) { 4489 this._mouseDelayTimer = setTimeout(function() { 4490 that.mouseDelayMet = true; 4491 }, this.options.delay); 4492 } 4493 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 4494 this._mouseStarted = (this._mouseStart(event) !== false); 4495 if (!this._mouseStarted) { 4496 event.preventDefault(); 4497 return true; 4498 } 4499 } 4500 if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { 4501 $.removeData(event.target, this.widgetName + ".preventClickEvent"); 4502 } 4503 this._mouseMoveDelegate = function(event) { 4504 return that._mouseMove(event); 4505 }; 4506 this._mouseUpDelegate = function(event) { 4507 return that._mouseUp(event); 4508 }; 4509 $(document) 4510 .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) 4511 .bind("mouseup."+this.widgetName, this._mouseUpDelegate); 4512 event.preventDefault(); 4513 mouseHandled = true; 4514 return true; 4515 }, 4516 _mouseMove: function(event) { 4517 if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { 4518 return this._mouseUp(event); 4519 } 4520 if (this._mouseStarted) { 4521 this._mouseDrag(event); 4522 return event.preventDefault(); 4523 } 4524 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 4525 this._mouseStarted = 4526 (this._mouseStart(this._mouseDownEvent, event) !== false); 4527 (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); 4528 } 4529 return !this._mouseStarted; 4530 }, 4531 _mouseUp: function(event) { 4532 $(document) 4533 .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) 4534 .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); 4535 if (this._mouseStarted) { 4536 this._mouseStarted = false; 4537 if (event.target === this._mouseDownEvent.target) { 4538 $.data(event.target, this.widgetName + ".preventClickEvent", true); 4539 } 4540 this._mouseStop(event); 4541 } 4542 return false; 4543 }, 4544 _mouseDistanceMet: function(event) { 4545 return (Math.max( 4546 Math.abs(this._mouseDownEvent.pageX - event.pageX), 4547 Math.abs(this._mouseDownEvent.pageY - event.pageY) 4548 ) >= this.options.distance 4549 ); 4550 }, 4551 _mouseDelayMet: function(/* event */) { 4552 return this.mouseDelayMet; 4553 }, 4554 _mouseStart: function(/* event */) {}, 4555 _mouseDrag: function(/* event */) {}, 4556 _mouseStop: function(/* event */) {}, 4557 _mouseCapture: function(/* event */) { return true; } 4558}); 4559})(jQuery); 4560(function( $, undefined ) { 4561$.ui = $.ui || {}; 4562var cachedScrollbarWidth, 4563 max = Math.max, 4564 abs = Math.abs, 4565 round = Math.round, 4566 rhorizontal = /left|center|right/, 4567 rvertical = /top|center|bottom/, 4568 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 4569 rposition = /^\w+/, 4570 rpercent = /%$/, 4571 _position = $.fn.position; 4572function getOffsets( offsets, width, height ) { 4573 return [ 4574 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 4575 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 4576 ]; 4577} 4578function parseCss( element, property ) { 4579 return parseInt( $.css( element, property ), 10 ) || 0; 4580} 4581function getDimensions( elem ) { 4582 var raw = elem[0]; 4583 if ( raw.nodeType === 9 ) { 4584 return { 4585 width: elem.width(), 4586 height: elem.height(), 4587 offset: { top: 0, left: 0 } 4588 }; 4589 } 4590 if ( $.isWindow( raw ) ) { 4591 return { 4592 width: elem.width(), 4593 height: elem.height(), 4594 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 4595 }; 4596 } 4597 if ( raw.preventDefault ) { 4598 return { 4599 width: 0, 4600 height: 0, 4601 offset: { top: raw.pageY, left: raw.pageX } 4602 }; 4603 } 4604 return { 4605 width: elem.outerWidth(), 4606 height: elem.outerHeight(), 4607 offset: elem.offset() 4608 }; 4609} 4610$.position = { 4611 scrollbarWidth: function() { 4612 if ( cachedScrollbarWidth !== undefined ) { 4613 return cachedScrollbarWidth; 4614 } 4615 var w1, w2, 4616 div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), 4617 innerDiv = div.children()[0]; 4618 $( "body" ).append( div ); 4619 w1 = innerDiv.offsetWidth; 4620 div.css( "overflow", "scroll" ); 4621 w2 = innerDiv.offsetWidth; 4622 if ( w1 === w2 ) { 4623 w2 = div[0].clientWidth; 4624 } 4625 div.remove(); 4626 return (cachedScrollbarWidth = w1 - w2); 4627 }, 4628 getScrollInfo: function( within ) { 4629 var overflowX = within.isWindow || within.isDocument ? "" : 4630 within.element.css( "overflow-x" ), 4631 overflowY = within.isWindow || within.isDocument ? "" : 4632 within.element.css( "overflow-y" ), 4633 hasOverflowX = overflowX === "scroll" || 4634 ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), 4635 hasOverflowY = overflowY === "scroll" || 4636 ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); 4637 return { 4638 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 4639 height: hasOverflowX ? $.position.scrollbarWidth() : 0 4640 }; 4641 }, 4642 getWithinInfo: function( element ) { 4643 var withinElement = $( element || window ), 4644 isWindow = $.isWindow( withinElement[0] ), 4645 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; 4646 return { 4647 element: withinElement, 4648 isWindow: isWindow, 4649 isDocument: isDocument, 4650 offset: withinElement.offset() || { left: 0, top: 0 }, 4651 scrollLeft: withinElement.scrollLeft(), 4652 scrollTop: withinElement.scrollTop(), 4653 width: isWindow ? withinElement.width() : withinElement.outerWidth(), 4654 height: isWindow ? withinElement.height() : withinElement.outerHeight() 4655 }; 4656 } 4657}; 4658$.fn.position = function( options ) { 4659 if ( !options || !options.of ) { 4660 return _position.apply( this, arguments ); 4661 } 4662 options = $.extend( {}, options ); 4663 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 4664 target = $( options.of ), 4665 within = $.position.getWithinInfo( options.within ), 4666 scrollInfo = $.position.getScrollInfo( within ), 4667 collision = ( options.collision || "flip" ).split( " " ), 4668 offsets = {}; 4669 dimensions = getDimensions( target ); 4670 if ( target[0].preventDefault ) { 4671 options.at = "left top"; 4672 } 4673 targetWidth = dimensions.width; 4674 targetHeight = dimensions.height; 4675 targetOffset = dimensions.offset; 4676 // clone to reuse original targetOffset later 4677 basePosition = $.extend( {}, targetOffset ); 4678 $.each( [ "my", "at" ], function() { 4679 var pos = ( options[ this ] || "" ).split( " " ), 4680 horizontalOffset, 4681 verticalOffset; 4682 if ( pos.length === 1) { 4683 pos = rhorizontal.test( pos[ 0 ] ) ? 4684 pos.concat( [ "center" ] ) : 4685 rvertical.test( pos[ 0 ] ) ? 4686 [ "center" ].concat( pos ) : 4687 [ "center", "center" ]; 4688 } 4689 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 4690 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 4691 horizontalOffset = roffset.exec( pos[ 0 ] ); 4692 verticalOffset = roffset.exec( pos[ 1 ] ); 4693 offsets[ this ] = [ 4694 horizontalOffset ? horizontalOffset[ 0 ] : 0, 4695 verticalOffset ? verticalOffset[ 0 ] : 0 4696 ]; 4697 options[ this ] = [ 4698 rposition.exec( pos[ 0 ] )[ 0 ], 4699 rposition.exec( pos[ 1 ] )[ 0 ] 4700 ]; 4701 }); 4702 if ( collision.length === 1 ) { 4703 collision[ 1 ] = collision[ 0 ]; 4704 } 4705 if ( options.at[ 0 ] === "right" ) { 4706 basePosition.left += targetWidth; 4707 } else if ( options.at[ 0 ] === "center" ) { 4708 basePosition.left += targetWidth / 2; 4709 } 4710 if ( options.at[ 1 ] === "bottom" ) { 4711 basePosition.top += targetHeight; 4712 } else if ( options.at[ 1 ] === "center" ) { 4713 basePosition.top += targetHeight / 2; 4714 } 4715 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 4716 basePosition.left += atOffset[ 0 ]; 4717 basePosition.top += atOffset[ 1 ]; 4718 return this.each(function() { 4719 var collisionPosition, using, 4720 elem = $( this ), 4721 elemWidth = elem.outerWidth(), 4722 elemHeight = elem.outerHeight(), 4723 marginLeft = parseCss( this, "marginLeft" ), 4724 marginTop = parseCss( this, "marginTop" ), 4725 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, 4726 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, 4727 position = $.extend( {}, basePosition ), 4728 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 4729 if ( options.my[ 0 ] === "right" ) { 4730 position.left -= elemWidth; 4731 } else if ( options.my[ 0 ] === "center" ) { 4732 position.left -= elemWidth / 2; 4733 } 4734 if ( options.my[ 1 ] === "bottom" ) { 4735 position.top -= elemHeight; 4736 } else if ( options.my[ 1 ] === "center" ) { 4737 position.top -= elemHeight / 2; 4738 } 4739 position.left += myOffset[ 0 ]; 4740 position.top += myOffset[ 1 ]; 4741 if ( !$.support.offsetFractions ) { 4742 position.left = round( position.left ); 4743 position.top = round( position.top ); 4744 } 4745 collisionPosition = { 4746 marginLeft: marginLeft, 4747 marginTop: marginTop 4748 }; 4749 $.each( [ "left", "top" ], function( i, dir ) { 4750 if ( $.ui.position[ collision[ i ] ] ) { 4751 $.ui.position[ collision[ i ] ][ dir ]( position, { 4752 targetWidth: targetWidth, 4753 targetHeight: targetHeight, 4754 elemWidth: elemWidth, 4755 elemHeight: elemHeight, 4756 collisionPosition: collisionPosition, 4757 collisionWidth: collisionWidth, 4758 collisionHeight: collisionHeight, 4759 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 4760 my: options.my, 4761 at: options.at, 4762 within: within, 4763 elem : elem 4764 }); 4765 } 4766 }); 4767 if ( options.using ) { 4768 using = function( props ) { 4769 var left = targetOffset.left - position.left, 4770 right = left + targetWidth - elemWidth, 4771 top = targetOffset.top - position.top, 4772 bottom = top + targetHeight - elemHeight, 4773 feedback = { 4774 target: { 4775 element: target, 4776 left: targetOffset.left, 4777 top: targetOffset.top, 4778 width: targetWidth, 4779 height: targetHeight 4780 }, 4781 element: { 4782 element: elem, 4783 left: position.left, 4784 top: position.top, 4785 width: elemWidth, 4786 height: elemHeight 4787 }, 4788 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 4789 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 4790 }; 4791 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 4792 feedback.horizontal = "center"; 4793 } 4794 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 4795 feedback.vertical = "middle"; 4796 } 4797 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 4798 feedback.important = "horizontal"; 4799 } else { 4800 feedback.important = "vertical"; 4801 } 4802 options.using.call( this, props, feedback ); 4803 }; 4804 } 4805 elem.offset( $.extend( position, { using: using } ) ); 4806 }); 4807}; 4808$.ui.position = { 4809 fit: { 4810 left: function( position, data ) { 4811 var within = data.within, 4812 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 4813 outerWidth = within.width, 4814 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 4815 overLeft = withinOffset - collisionPosLeft, 4816 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 4817 newOverRight; 4818 if ( data.collisionWidth > outerWidth ) { 4819 if ( overLeft > 0 && overRight <= 0 ) { 4820 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; 4821 position.left += overLeft - newOverRight; 4822 } else if ( overRight > 0 && overLeft <= 0 ) { 4823 position.left = withinOffset; 4824 } else { 4825 if ( overLeft > overRight ) { 4826 position.left = withinOffset + outerWidth - data.collisionWidth; 4827 } else { 4828 position.left = withinOffset; 4829 } 4830 } 4831 } else if ( overLeft > 0 ) { 4832 position.left += overLeft; 4833 } else if ( overRight > 0 ) { 4834 position.left -= overRight; 4835 } else { 4836 position.left = max( position.left - collisionPosLeft, position.left ); 4837 } 4838 }, 4839 top: function( position, data ) { 4840 var within = data.within, 4841 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 4842 outerHeight = data.within.height, 4843 collisionPosTop = position.top - data.collisionPosition.marginTop, 4844 overTop = withinOffset - collisionPosTop, 4845 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 4846 newOverBottom; 4847 if ( data.collisionHeight > outerHeight ) { 4848 if ( overTop > 0 && overBottom <= 0 ) { 4849 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; 4850 position.top += overTop - newOverBottom; 4851 } else if ( overBottom > 0 && overTop <= 0 ) { 4852 position.top = withinOffset; 4853 } else { 4854 if ( overTop > overBottom ) { 4855 position.top = withinOffset + outerHeight - data.collisionHeight; 4856 } else { 4857 position.top = withinOffset; 4858 } 4859 } 4860 } else if ( overTop > 0 ) { 4861 position.top += overTop; 4862 } else if ( overBottom > 0 ) { 4863 position.top -= overBottom; 4864 } else { 4865 position.top = max( position.top - collisionPosTop, position.top ); 4866 } 4867 } 4868 }, 4869 flip: { 4870 left: function( position, data ) { 4871 var within = data.within, 4872 withinOffset = within.offset.left + within.scrollLeft, 4873 outerWidth = within.width, 4874 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 4875 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 4876 overLeft = collisionPosLeft - offsetLeft, 4877 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 4878 myOffset = data.my[ 0 ] === "left" ? 4879 -data.elemWidth : 4880 data.my[ 0 ] === "right" ? 4881 data.elemWidth : 4882 0, 4883 atOffset = data.at[ 0 ] === "left" ? 4884 data.targetWidth : 4885 data.at[ 0 ] === "right" ? 4886 -data.targetWidth : 4887 0, 4888 offset = -2 * data.offset[ 0 ], 4889 newOverRight, 4890 newOverLeft; 4891 4892 if ( overLeft < 0 ) { 4893 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; 4894 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 4895 position.left += myOffset + atOffset + offset; 4896 } 4897 } 4898 else if ( overRight > 0 ) { 4899 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; 4900 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 4901 position.left += myOffset + atOffset + offset; 4902 } 4903 } 4904 }, 4905 top: function( position, data ) { 4906 var within = data.within, 4907 withinOffset = within.offset.top + within.scrollTop, 4908 outerHeight = within.height, 4909 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 4910 collisionPosTop = position.top - data.collisionPosition.marginTop, 4911 overTop = collisionPosTop - offsetTop, 4912 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 4913 top = data.my[ 1 ] === "top", 4914 myOffset = top ? 4915 -data.elemHeight : 4916 data.my[ 1 ] === "bottom" ? 4917 data.elemHeight : 4918 0, 4919 atOffset = data.at[ 1 ] === "top" ? 4920 data.targetHeight : 4921 data.at[ 1 ] === "bottom" ? 4922 -data.targetHeight : 4923 0, 4924 offset = -2 * data.offset[ 1 ], 4925 newOverTop, 4926 newOverBottom; 4927 if ( overTop < 0 ) { 4928 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; 4929 if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { 4930 position.top += myOffset + atOffset + offset; 4931 } 4932 } 4933 else if ( overBottom > 0 ) { 4934 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 4935 if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { 4936 position.top += myOffset + atOffset + offset; 4937 } 4938 } 4939 } 4940 }, 4941 flipfit: { 4942 left: function() { 4943 $.ui.position.flip.left.apply( this, arguments ); 4944 $.ui.position.fit.left.apply( this, arguments ); 4945 }, 4946 top: function() { 4947 $.ui.position.flip.top.apply( this, arguments ); 4948 $.ui.position.fit.top.apply( this, arguments ); 4949 } 4950 } 4951}; 4952(function () { 4953 var testElement, testElementParent, testElementStyle, offsetLeft, i, 4954 body = document.getElementsByTagName( "body" )[ 0 ], 4955 div = document.createElement( "div" ); 4956 testElement = document.createElement( body ? "div" : "body" ); 4957 testElementStyle = { 4958 visibility: "hidden", 4959 width: 0, 4960 height: 0, 4961 border: 0, 4962 margin: 0, 4963 background: "none" 4964 }; 4965 if ( body ) { 4966 $.extend( testElementStyle, { 4967 position: "absolute", 4968 left: "-1000px", 4969 top: "-1000px" 4970 }); 4971 } 4972 for ( i in testElementStyle ) { 4973 testElement.style[ i ] = testElementStyle[ i ]; 4974 } 4975 testElement.appendChild( div ); 4976 testElementParent = body || document.documentElement; 4977 testElementParent.insertBefore( testElement, testElementParent.firstChild ); 4978 div.style.cssText = "position: absolute; left: 10.7432222px;"; 4979 offsetLeft = $( div ).offset().left; 4980 $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; 4981 testElement.innerHTML = ""; 4982 testElementParent.removeChild( testElement ); 4983})(); 4984}( jQuery ) ); 4985(function( $, undefined ) { 4986$.widget("ui.draggable", $.ui.mouse, { 4987 version: "1.10.4", 4988 widgetEventPrefix: "drag", 4989 options: { 4990 addClasses: true, 4991 appendTo: "parent", 4992 axis: false, 4993 connectToSortable: false, 4994 containment: false, 4995 cursor: "auto", 4996 cursorAt: false, 4997 grid: false, 4998 handle: false, 4999 helper: "original", 5000 iframeFix: false, 5001 opacity: false, 5002 refreshPositions: false, 5003 revert: false, 5004 revertDuration: 500, 5005 scope: "default", 5006 scroll: true, 5007 scrollSensitivity: 20, 5008 scrollSpeed: 20, 5009 snap: false, 5010 snapMode: "both", 5011 snapTolerance: 20, 5012 stack: false, 5013 zIndex: false, 5014 drag: null, 5015 start: null, 5016 stop: null 5017 }, 5018 _create: function() { 5019 if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { 5020 this.element[0].style.position = "relative"; 5021 } 5022 if (this.options.addClasses){ 5023 this.element.addClass("ui-draggable"); 5024 } 5025 if (this.options.disabled){ 5026 this.element.addClass("ui-draggable-disabled"); 5027 } 5028 this._mouseInit(); 5029 }, 5030 _destroy: function() { 5031 this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); 5032 this._mouseDestroy(); 5033 }, 5034 _mouseCapture: function(event) { 5035 var o = this.options; 5036 if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { 5037 return false; 5038 } 5039 this.handle = this._getHandle(event); 5040 if (!this.handle) { 5041 return false; 5042 } 5043 $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { 5044 $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>") 5045 .css({ 5046 width: this.offsetWidth+"px", height: this.offsetHeight+"px", 5047 position: "absolute", opacity: "0.001", zIndex: 1000 5048 }) 5049 .css($(this).offset()) 5050 .appendTo("body"); 5051 }); 5052 return true; 5053 }, 5054 _mouseStart: function(event) { 5055 var o = this.options; 5056 this.helper = this._createHelper(event); 5057 this.helper.addClass("ui-draggable-dragging"); 5058 this._cacheHelperProportions(); 5059 if($.ui.ddmanager) { 5060 $.ui.ddmanager.current = this; 5061 } 5062 this._cacheMargins(); 5063 this.cssPosition = this.helper.css( "position" ); 5064 this.scrollParent = this.helper.scrollParent(); 5065 this.offsetParent = this.helper.offsetParent(); 5066 this.offsetParentCssPosition = this.offsetParent.css( "position" ); 5067 this.offset = this.positionAbs = this.element.offset(); 5068 this.offset = { 5069 top: this.offset.top - this.margins.top, 5070 left: this.offset.left - this.margins.left 5071 }; 5072 this.offset.scroll = false; 5073 $.extend(this.offset, { 5074 click: { 5075 left: event.pageX - this.offset.left, 5076 top: event.pageY - this.offset.top 5077 }, 5078 parent: this._getParentOffset(), 5079 relative: this._getRelativeOffset() 5080 }); 5081 this.originalPosition = this.position = this._generatePosition(event); 5082 this.originalPageX = event.pageX; 5083 this.originalPageY = event.pageY; 5084 (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); 5085 this._setContainment(); 5086 if(this._trigger("start", event) === false) { 5087 this._clear(); 5088 return false; 5089 } 5090 this._cacheHelperProportions(); 5091 if ($.ui.ddmanager && !o.dropBehaviour) { 5092 $.ui.ddmanager.prepareOffsets(this, event); 5093 } 5094 this._mouseDrag(event, true); 5095 if ( $.ui.ddmanager ) { 5096 $.ui.ddmanager.dragStart(this, event); 5097 } 5098 return true; 5099 }, 5100 _mouseDrag: function(event, noPropagation) { 5101 if ( this.offsetParentCssPosition === "fixed" ) { 5102 this.offset.parent = this._getParentOffset(); 5103 } 5104 this.position = this._generatePosition(event); 5105 this.positionAbs = this._convertPositionTo("absolute"); 5106 if (!noPropagation) { 5107 var ui = this._uiHash(); 5108 if(this._trigger("drag", event, ui) === false) { 5109 this._mouseUp({}); 5110 return false; 5111 } 5112 this.position = ui.position; 5113 } 5114 if(!this.options.axis || this.options.axis !== "y") { 5115 this.helper[0].style.left = this.position.left+"px"; 5116 } 5117 if(!this.options.axis || this.options.axis !== "x") { 5118 this.helper[0].style.top = this.position.top+"px"; 5119 } 5120 if($.ui.ddmanager) { 5121 $.ui.ddmanager.drag(this, event); 5122 } 5123 return false; 5124 }, 5125 _mouseStop: function(event) { 5126 var that = this, 5127 dropped = false; 5128 if ($.ui.ddmanager && !this.options.dropBehaviour) { 5129 dropped = $.ui.ddmanager.drop(this, event); 5130 } 5131 if(this.dropped) { 5132 dropped = this.dropped; 5133 this.dropped = false; 5134 } 5135 if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) { 5136 return false; 5137 } 5138 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))) { 5139 $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { 5140 if(that._trigger("stop", event) !== false) { 5141 that._clear(); 5142 } 5143 }); 5144 } else { 5145 if(this._trigger("stop", event) !== false) { 5146 this._clear(); 5147 } 5148 } 5149 return false; 5150 }, 5151 _mouseUp: function(event) { 5152 $("div.ui-draggable-iframeFix").each(function() { 5153 this.parentNode.removeChild(this); 5154 }); 5155 if( $.ui.ddmanager ) { 5156 $.ui.ddmanager.dragStop(this, event); 5157 } 5158 return $.ui.mouse.prototype._mouseUp.call(this, event); 5159 }, 5160 cancel: function() { 5161 if(this.helper.is(".ui-draggable-dragging")) { 5162 this._mouseUp({}); 5163 } else { 5164 this._clear(); 5165 } 5166 return this; 5167 }, 5168 _getHandle: function(event) { 5169 return this.options.handle ? 5170 !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : 5171 true; 5172 }, 5173 _createHelper: function(event) { 5174 var o = this.options, 5175 helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element); 5176 if(!helper.parents("body").length) { 5177 helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); 5178 } 5179 if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { 5180 helper.css("position", "absolute"); 5181 } 5182 return helper; 5183 }, 5184 _adjustOffsetFromHelper: function(obj) { 5185 if (typeof obj === "string") { 5186 obj = obj.split(" "); 5187 } 5188 if ($.isArray(obj)) { 5189 obj = {left: +obj[0], top: +obj[1] || 0}; 5190 } 5191 if ("left" in obj) { 5192 this.offset.click.left = obj.left + this.margins.left; 5193 } 5194 if ("right" in obj) { 5195 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 5196 } 5197 if ("top" in obj) { 5198 this.offset.click.top = obj.top + this.margins.top; 5199 } 5200 if ("bottom" in obj) { 5201 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 5202 } 5203 }, 5204 _getParentOffset: function() { 5205 var po = this.offsetParent.offset(); 5206 if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { 5207 po.left += this.scrollParent.scrollLeft(); 5208 po.top += this.scrollParent.scrollTop(); 5209 } 5210 if((this.offsetParent[0] === document.body) || 5211 (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { 5212 po = { top: 0, left: 0 }; 5213 } 5214 return { 5215 top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), 5216 left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) 5217 }; 5218 }, 5219 _getRelativeOffset: function() { 5220 if(this.cssPosition === "relative") { 5221 var p = this.element.position(); 5222 return { 5223 top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), 5224 left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() 5225 }; 5226 } else { 5227 return { top: 0, left: 0 }; 5228 } 5229 }, 5230 _cacheMargins: function() { 5231 this.margins = { 5232 left: (parseInt(this.element.css("marginLeft"),10) || 0), 5233 top: (parseInt(this.element.css("marginTop"),10) || 0), 5234 right: (parseInt(this.element.css("marginRight"),10) || 0), 5235 bottom: (parseInt(this.element.css("marginBottom"),10) || 0) 5236 }; 5237 }, 5238 _cacheHelperProportions: function() { 5239 this.helperProportions = { 5240 width: this.helper.outerWidth(), 5241 height: this.helper.outerHeight() 5242 }; 5243 }, 5244 _setContainment: function() { 5245 var over, c, ce, 5246 o = this.options; 5247 if ( !o.containment ) { 5248 this.containment = null; 5249 return; 5250 } 5251 if ( o.containment === "window" ) { 5252 this.containment = [ 5253 $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, 5254 $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, 5255 $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, 5256 $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top 5257 ]; 5258 return; 5259 } 5260 if ( o.containment === "document") { 5261 this.containment = [ 5262 0, 5263 0, 5264 $( document ).width() - this.helperProportions.width - this.margins.left, 5265 ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top 5266 ]; 5267 return; 5268 } 5269 if ( o.containment.constructor === Array ) { 5270 this.containment = o.containment; 5271 return; 5272 } 5273 if ( o.containment === "parent" ) { 5274 o.containment = this.helper[ 0 ].parentNode; 5275 } 5276 c = $( o.containment ); 5277 ce = c[ 0 ]; 5278 if( !ce ) { 5279 return; 5280 } 5281 over = c.css( "overflow" ) !== "hidden"; 5282 this.containment = [ 5283 ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 5284 ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) , 5285 ( 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, 5286 ( 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 5287 ]; 5288 this.relative_container = c; 5289 }, 5290 _convertPositionTo: function(d, pos) { 5291 if(!pos) { 5292 pos = this.position; 5293 } 5294 var mod = d === "absolute" ? 1 : -1, 5295 scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent; 5296 if (!this.offset.scroll) { 5297 this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; 5298 } 5299 return { 5300 top: ( 5301 pos.top + 5302 this.offset.relative.top * mod + 5303 this.offset.parent.top * mod - 5304 ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod ) 5305 ), 5306 left: ( 5307 pos.left + 5308 this.offset.relative.left * mod + 5309 this.offset.parent.left * mod - 5310 ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod ) 5311 ) 5312 }; 5313 5314 }, 5315 _generatePosition: function(event) { 5316 var containment, co, top, left, 5317 o = this.options, 5318 scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent, 5319 pageX = event.pageX, 5320 pageY = event.pageY; 5321 if (!this.offset.scroll) { 5322 this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; 5323 } 5324 if ( this.originalPosition ) { 5325 if ( this.containment ) { 5326 if ( this.relative_container ){ 5327 co = this.relative_container.offset(); 5328 containment = [ 5329 this.containment[ 0 ] + co.left, 5330 this.containment[ 1 ] + co.top, 5331 this.containment[ 2 ] + co.left, 5332 this.containment[ 3 ] + co.top 5333 ]; 5334 } 5335 else { 5336 containment = this.containment; 5337 } 5338 if(event.pageX - this.offset.click.left < containment[0]) { 5339 pageX = containment[0] + this.offset.click.left; 5340 } 5341 if(event.pageY - this.offset.click.top < containment[1]) { 5342 pageY = containment[1] + this.offset.click.top; 5343 } 5344 if(event.pageX - this.offset.click.left > containment[2]) { 5345 pageX = containment[2] + this.offset.click.left; 5346 } 5347 if(event.pageY - this.offset.click.top > containment[3]) { 5348 pageY = containment[3] + this.offset.click.top; 5349 } 5350 } 5351 if(o.grid) { 5352 top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; 5353 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; 5354 left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; 5355 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; 5356 } 5357 } 5358 return { 5359 top: ( 5360 pageY - 5361 this.offset.click.top - 5362 this.offset.relative.top - 5363 this.offset.parent.top + 5364 ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) 5365 ), 5366 left: ( 5367 pageX - 5368 this.offset.click.left - 5369 this.offset.relative.left - 5370 this.offset.parent.left + 5371 ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) 5372 ) 5373 }; 5374 }, 5375 _clear: function() { 5376 this.helper.removeClass("ui-draggable-dragging"); 5377 if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { 5378 this.helper.remove(); 5379 } 5380 this.helper = null; 5381 this.cancelHelperRemoval = false; 5382 }, 5383 _trigger: function(type, event, ui) { 5384 ui = ui || this._uiHash(); 5385 $.ui.plugin.call(this, type, [event, ui]); 5386 if(type === "drag") { 5387 this.positionAbs = this._convertPositionTo("absolute"); 5388 } 5389 return $.Widget.prototype._trigger.call(this, type, event, ui); 5390 }, 5391 plugins: {}, 5392 _uiHash: function() { 5393 return { 5394 helper: this.helper, 5395 position: this.position, 5396 originalPosition: this.originalPosition, 5397 offset: this.positionAbs 5398 }; 5399 } 5400}); 5401$.ui.plugin.add("draggable", "connectToSortable", { 5402 start: function(event, ui) { 5403 var inst = $(this).data("ui-draggable"), o = inst.options, 5404 uiSortable = $.extend({}, ui, { item: inst.element }); 5405 inst.sortables = []; 5406 $(o.connectToSortable).each(function() { 5407 var sortable = $.data(this, "ui-sortable"); 5408 if (sortable && !sortable.options.disabled) { 5409 inst.sortables.push({ 5410 instance: sortable, 5411 shouldRevert: sortable.options.revert 5412 }); 5413 sortable.refreshPositions(); 5414 sortable._trigger("activate", event, uiSortable); 5415 } 5416 }); 5417 }, 5418 stop: function(event, ui) { 5419 var inst = $(this).data("ui-draggable"), 5420 uiSortable = $.extend({}, ui, { item: inst.element }); 5421 $.each(inst.sortables, function() { 5422 if(this.instance.isOver) { 5423 this.instance.isOver = 0; 5424 inst.cancelHelperRemoval = true; 5425 this.instance.cancelHelperRemoval = false; 5426 if(this.shouldRevert) { 5427 this.instance.options.revert = this.shouldRevert; 5428 } 5429 this.instance._mouseStop(event); 5430 this.instance.options.helper = this.instance.options._helper; 5431 if(inst.options.helper === "original") { 5432 this.instance.currentItem.css({ top: "auto", left: "auto" }); 5433 } 5434 } else { 5435 this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance 5436 this.instance._trigger("deactivate", event, uiSortable); 5437 } 5438 }); 5439 }, 5440 drag: function(event, ui) { 5441 var inst = $(this).data("ui-draggable"), that = this; 5442 $.each(inst.sortables, function() { 5443 var innermostIntersecting = false, 5444 thisSortable = this; 5445 this.instance.positionAbs = inst.positionAbs; 5446 this.instance.helperProportions = inst.helperProportions; 5447 this.instance.offset.click = inst.offset.click; 5448 if(this.instance._intersectsWith(this.instance.containerCache)) { 5449 innermostIntersecting = true; 5450 $.each(inst.sortables, function () { 5451 this.instance.positionAbs = inst.positionAbs; 5452 this.instance.helperProportions = inst.helperProportions; 5453 this.instance.offset.click = inst.offset.click; 5454 if (this !== thisSortable && 5455 this.instance._intersectsWith(this.instance.containerCache) && 5456 $.contains(thisSortable.instance.element[0], this.instance.element[0]) 5457 ) { 5458 innermostIntersecting = false; 5459 } 5460 return innermostIntersecting; 5461 }); 5462 } 5463 if(innermostIntersecting) { 5464 if(!this.instance.isOver) { 5465 this.instance.isOver = 1; 5466 this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true); 5467 this.instance.options._helper = this.instance.options.helper; 5468 this.instance.options.helper = function() { return ui.helper[0]; }; 5469 event.target = this.instance.currentItem[0]; 5470 this.instance._mouseCapture(event, true); 5471 this.instance._mouseStart(event, true, true); 5472 this.instance.offset.click.top = inst.offset.click.top; 5473 this.instance.offset.click.left = inst.offset.click.left; 5474 this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; 5475 this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; 5476 inst._trigger("toSortable", event); 5477 inst.dropped = this.instance.element 5478 inst.currentItem = inst.element; 5479 this.instance.fromOutside = inst; 5480 } 5481 if(this.instance.currentItem) { 5482 this.instance._mouseDrag(event); 5483 } 5484 } else { 5485 if(this.instance.isOver) { 5486 this.instance.isOver = 0; 5487 this.instance.cancelHelperRemoval = true; 5488 this.instance.options.revert = false; 5489 this.instance._trigger("out", event, this.instance._uiHash(this.instance)); 5490 this.instance._mouseStop(event, true); 5491 this.instance.options.helper = this.instance.options._helper; 5492 this.instance.currentItem.remove(); 5493 if(this.instance.placeholder) { 5494 this.instance.placeholder.remove(); 5495 } 5496 inst._trigger("fromSortable", event); 5497 inst.dropped = false; 5498 } 5499 } 5500 }); 5501 } 5502}); 5503$.ui.plugin.add("draggable", "cursor", { 5504 start: function() { 5505 var t = $("body"), o = $(this).data("ui-draggable").options; 5506 if (t.css("cursor")) { 5507 o._cursor = t.css("cursor"); 5508 } 5509 t.css("cursor", o.cursor); 5510 }, 5511 stop: function() { 5512 var o = $(this).data("ui-draggable").options; 5513 if (o._cursor) { 5514 $("body").css("cursor", o._cursor); 5515 } 5516 } 5517}); 5518$.ui.plugin.add("draggable", "opacity", { 5519 start: function(event, ui) { 5520 var t = $(ui.helper), o = $(this).data("ui-draggable").options; 5521 if(t.css("opacity")) { 5522 o._opacity = t.css("opacity"); 5523 } 5524 t.css("opacity", o.opacity); 5525 }, 5526 stop: function(event, ui) { 5527 var o = $(this).data("ui-draggable").options; 5528 if(o._opacity) { 5529 $(ui.helper).css("opacity", o._opacity); 5530 } 5531 } 5532}); 5533$.ui.plugin.add("draggable", "scroll", { 5534 start: function() { 5535 var i = $(this).data("ui-draggable"); 5536 if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { 5537 i.overflowOffset = i.scrollParent.offset(); 5538 } 5539 }, 5540 drag: function( event ) { 5541 var i = $(this).data("ui-draggable"), o = i.options, scrolled = false; 5542 if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { 5543 if(!o.axis || o.axis !== "x") { 5544 if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { 5545 i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; 5546 } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) { 5547 i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; 5548 } 5549 } 5550 if(!o.axis || o.axis !== "y") { 5551 if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { 5552 i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; 5553 } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) { 5554 i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; 5555 } 5556 } 5557 } else { 5558 if(!o.axis || o.axis !== "x") { 5559 if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { 5560 scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); 5561 } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { 5562 scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); 5563 } 5564 } 5565 if(!o.axis || o.axis !== "y") { 5566 if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { 5567 scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); 5568 } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { 5569 scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); 5570 } 5571 } 5572 } 5573 if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { 5574 $.ui.ddmanager.prepareOffsets(i, event); 5575 } 5576 } 5577}); 5578$.ui.plugin.add("draggable", "snap", { 5579 start: function() { 5580 var i = $(this).data("ui-draggable"), 5581 o = i.options; 5582 i.snapElements = []; 5583 $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { 5584 var $t = $(this), 5585 $o = $t.offset(); 5586 if(this !== i.element[0]) { 5587 i.snapElements.push({ 5588 item: this, 5589 width: $t.outerWidth(), height: $t.outerHeight(), 5590 top: $o.top, left: $o.left 5591 }); 5592 } 5593 }); 5594 }, 5595 drag: function(event, ui) { 5596 var ts, bs, ls, rs, l, r, t, b, i, first, 5597 inst = $(this).data("ui-draggable"), 5598 o = inst.options, 5599 d = o.snapTolerance, 5600 x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, 5601 y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; 5602 for (i = inst.snapElements.length - 1; i >= 0; i--){ 5603 l = inst.snapElements[i].left; 5604 r = l + inst.snapElements[i].width; 5605 t = inst.snapElements[i].top; 5606 b = t + inst.snapElements[i].height; 5607 if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { 5608 if(inst.snapElements[i].snapping) { 5609 (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 5610 } 5611 inst.snapElements[i].snapping = false; 5612 continue; 5613 } 5614 if(o.snapMode !== "inner") { 5615 ts = Math.abs(t - y2) <= d; 5616 bs = Math.abs(b - y1) <= d; 5617 ls = Math.abs(l - x2) <= d; 5618 rs = Math.abs(r - x1) <= d; 5619 if(ts) { 5620 ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; 5621 } 5622 if(bs) { 5623 ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; 5624 } 5625 if(ls) { 5626 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; 5627 } 5628 if(rs) { 5629 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; 5630 } 5631 } 5632 first = (ts || bs || ls || rs); 5633 if(o.snapMode !== "outer") { 5634 ts = Math.abs(t - y1) <= d; 5635 bs = Math.abs(b - y2) <= d; 5636 ls = Math.abs(l - x1) <= d; 5637 rs = Math.abs(r - x2) <= d; 5638 if(ts) { 5639 ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; 5640 } 5641 if(bs) { 5642 ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; 5643 } 5644 if(ls) { 5645 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; 5646 } 5647 if(rs) { 5648 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; 5649 } 5650 } 5651 if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { 5652 (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 5653 } 5654 inst.snapElements[i].snapping = (ts || bs || ls || rs || first); 5655 } 5656 } 5657}); 5658$.ui.plugin.add("draggable", "stack", { 5659 start: function() { 5660 var min, 5661 o = this.data("ui-draggable").options, 5662 group = $.makeArray($(o.stack)).sort(function(a,b) { 5663 return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); 5664 }); 5665 if (!group.length) { return; } 5666 min = parseInt($(group[0]).css("zIndex"), 10) || 0; 5667 $(group).each(function(i) { 5668 $(this).css("zIndex", min + i); 5669 }); 5670 this.css("zIndex", (min + group.length)); 5671 } 5672}); 5673$.ui.plugin.add("draggable", "zIndex", { 5674 start: function(event, ui) { 5675 var t = $(ui.helper), o = $(this).data("ui-draggable").options; 5676 if(t.css("zIndex")) { 5677 o._zIndex = t.css("zIndex"); 5678 } 5679 t.css("zIndex", o.zIndex); 5680 }, 5681 stop: function(event, ui) { 5682 var o = $(this).data("ui-draggable").options; 5683 if(o._zIndex) { 5684 $(ui.helper).css("zIndex", o._zIndex); 5685 } 5686 } 5687}); 5688})(jQuery); 5689(function( $, undefined ) { 5690function num(v) { 5691 return parseInt(v, 10) || 0; 5692} 5693function isNumber(value) { 5694 return !isNaN(parseInt(value, 10)); 5695} 5696$.widget("ui.resizable", $.ui.mouse, { 5697 version: "1.10.4", 5698 widgetEventPrefix: "resize", 5699 options: { 5700 alsoResize: false, 5701 animate: false, 5702 animateDuration: "slow", 5703 animateEasing: "swing", 5704 aspectRatio: false, 5705 autoHide: false, 5706 containment: false, 5707 ghost: false, 5708 grid: false, 5709 handles: "e,s,se", 5710 helper: false, 5711 maxHeight: null, 5712 maxWidth: null, 5713 minHeight: 10, 5714 minWidth: 10, 5715 zIndex: 90, 5716 resize: null, 5717 start: null, 5718 stop: null 5719 }, 5720 _create: function() { 5721 var n, i, handle, axis, hname, 5722 that = this, 5723 o = this.options; 5724 this.element.addClass("ui-resizable"); 5725 $.extend(this, { 5726 _aspectRatio: !!(o.aspectRatio), 5727 aspectRatio: o.aspectRatio, 5728 originalElement: this.element, 5729 _proportionallyResizeElements: [], 5730 _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null 5731 }); 5732 if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { 5733 this.element.wrap( 5734 $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ 5735 position: this.element.css("position"), 5736 width: this.element.outerWidth(), 5737 height: this.element.outerHeight(), 5738 top: this.element.css("top"), 5739 left: this.element.css("left") 5740 }) 5741 ); 5742 this.element = this.element.parent().data( 5743 "ui-resizable", this.element.data("ui-resizable") 5744 ); 5745 this.elementIsWrapper = true; 5746 this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); 5747 this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); 5748 this.originalResizeStyle = this.originalElement.css("resize"); 5749 this.originalElement.css("resize", "none"); 5750 this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })); 5751 this.originalElement.css({ margin: this.originalElement.css("margin") }); 5752 this._proportionallyResize(); 5753 } 5754 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" }); 5755 if(this.handles.constructor === String) { 5756 if ( this.handles === "all") { 5757 this.handles = "n,e,s,w,se,sw,ne,nw"; 5758 } 5759 n = this.handles.split(","); 5760 this.handles = {}; 5761 for(i = 0; i < n.length; i++) { 5762 handle = $.trim(n[i]); 5763 hname = "ui-resizable-"+handle; 5764 axis = $("<div class='ui-resizable-handle " + hname + "'></div>"); 5765 axis.css({ zIndex: o.zIndex }); 5766 if ("se" === handle) { 5767 axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); 5768 } 5769 this.handles[handle] = ".ui-resizable-"+handle; 5770 this.element.append(axis); 5771 } 5772 } 5773 this._renderAxis = function(target) { 5774 var i, axis, padPos, padWrapper; 5775 target = target || this.element; 5776 for(i in this.handles) { 5777 if(this.handles[i].constructor === String) { 5778 this.handles[i] = $(this.handles[i], this.element).show(); 5779 } 5780 if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { 5781 axis = $(this.handles[i], this.element); 5782 padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); 5783 padPos = [ "padding", 5784 /ne|nw|n/.test(i) ? "Top" : 5785 /se|sw|s/.test(i) ? "Bottom" : 5786 /^e$/.test(i) ? "Right" : "Left" ].join(""); 5787 target.css(padPos, padWrapper); 5788 this._proportionallyResize(); 5789 } 5790 if(!$(this.handles[i]).length) { 5791 continue; 5792 } 5793 } 5794 }; 5795 this._renderAxis(this.element); 5796 this._handles = $(".ui-resizable-handle", this.element) 5797 .disableSelection(); 5798 this._handles.mouseover(function() { 5799 if (!that.resizing) { 5800 if (this.className) { 5801 axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); 5802 } 5803 that.axis = axis && axis[1] ? axis[1] : "se"; 5804 } 5805 }); 5806 if (o.autoHide) { 5807 this._handles.hide(); 5808 $(this.element) 5809 .addClass("ui-resizable-autohide") 5810 .mouseenter(function() { 5811 if (o.disabled) { 5812 return; 5813 } 5814 $(this).removeClass("ui-resizable-autohide"); 5815 that._handles.show(); 5816 }) 5817 .mouseleave(function(){ 5818 if (o.disabled) { 5819 return; 5820 } 5821 if (!that.resizing) { 5822 $(this).addClass("ui-resizable-autohide"); 5823 that._handles.hide(); 5824 } 5825 }); 5826 } 5827 this._mouseInit(); 5828 }, 5829 _destroy: function() { 5830 this._mouseDestroy(); 5831 var wrapper, 5832 _destroy = function(exp) { 5833 $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") 5834 .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove(); 5835 }; 5836 if (this.elementIsWrapper) { 5837 _destroy(this.element); 5838 wrapper = this.element; 5839 this.originalElement.css({ 5840 position: wrapper.css("position"), 5841 width: wrapper.outerWidth(), 5842 height: wrapper.outerHeight(), 5843 top: wrapper.css("top"), 5844 left: wrapper.css("left") 5845 }).insertAfter( wrapper ); 5846 wrapper.remove(); 5847 } 5848 this.originalElement.css("resize", this.originalResizeStyle); 5849 _destroy(this.originalElement); 5850 return this; 5851 }, 5852 _mouseCapture: function(event) { 5853 var i, handle, 5854 capture = false; 5855 for (i in this.handles) { 5856 handle = $(this.handles[i])[0]; 5857 if (handle === event.target || $.contains(handle, event.target)) { 5858 capture = true; 5859 } 5860 } 5861 return !this.options.disabled && capture; 5862 }, 5863 _mouseStart: function(event) { 5864 var curleft, curtop, cursor, 5865 o = this.options, 5866 iniPos = this.element.position(), 5867 el = this.element; 5868 this.resizing = true; 5869 if ( (/absolute/).test( el.css("position") ) ) { 5870 el.css({ position: "absolute", top: el.css("top"), left: el.css("left") }); 5871 } else if (el.is(".ui-draggable")) { 5872 el.css({ position: "absolute", top: iniPos.top, left: iniPos.left }); 5873 } 5874 this._renderProxy(); 5875 curleft = num(this.helper.css("left")); 5876 curtop = num(this.helper.css("top")); 5877 if (o.containment) { 5878 curleft += $(o.containment).scrollLeft() || 0; 5879 curtop += $(o.containment).scrollTop() || 0; 5880 } 5881 this.offset = this.helper.offset(); 5882 this.position = { left: curleft, top: curtop }; 5883 this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() }; 5884 this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; 5885 this.originalPosition = { left: curleft, top: curtop }; 5886 this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; 5887 this.originalMousePosition = { left: event.pageX, top: event.pageY }; 5888 this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); 5889 cursor = $(".ui-resizable-" + this.axis).css("cursor"); 5890 $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); 5891 el.addClass("ui-resizable-resizing"); 5892 this._propagate("start", event); 5893 return true; 5894 }, 5895 _mouseDrag: function(event) { 5896 var data, 5897 el = this.helper, props = {}, 5898 smp = this.originalMousePosition, 5899 a = this.axis, 5900 prevTop = this.position.top, 5901 prevLeft = this.position.left, 5902 prevWidth = this.size.width, 5903 prevHeight = this.size.height, 5904 dx = (event.pageX-smp.left)||0, 5905 dy = (event.pageY-smp.top)||0, 5906 trigger = this._change[a]; 5907 if (!trigger) { 5908 return false; 5909 } 5910 data = trigger.apply(this, [event, dx, dy]); 5911 this._updateVirtualBoundaries(event.shiftKey); 5912 if (this._aspectRatio || event.shiftKey) { 5913 data = this._updateRatio(data, event); 5914 } 5915 data = this._respectSize(data, event); 5916 this._updateCache(data); 5917 this._propagate("resize", event); 5918 if (this.position.top !== prevTop) { 5919 props.top = this.position.top + "px"; 5920 } 5921 if (this.position.left !== prevLeft) { 5922 props.left = this.position.left + "px"; 5923 } 5924 if (this.size.width !== prevWidth) { 5925 props.width = this.size.width + "px"; 5926 } 5927 if (this.size.height !== prevHeight) { 5928 props.height = this.size.height + "px"; 5929 } 5930 el.css(props); 5931 if (!this._helper && this._proportionallyResizeElements.length) { 5932 this._proportionallyResize(); 5933 } 5934 if ( ! $.isEmptyObject(props) ) { 5935 this._trigger("resize", event, this.ui()); 5936 } 5937 return false; 5938 }, 5939 _mouseStop: function(event) { 5940 this.resizing = false; 5941 var pr, ista, soffseth, soffsetw, s, left, top, 5942 o = this.options, that = this; 5943 if(this._helper) { 5944 pr = this._proportionallyResizeElements; 5945 ista = pr.length && (/textarea/i).test(pr[0].nodeName); 5946 soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height; 5947 soffsetw = ista ? 0 : that.sizeDiff.width; 5948 s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }; 5949 left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null; 5950 top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; 5951 if (!o.animate) { 5952 this.element.css($.extend(s, { top: top, left: left })); 5953 } 5954 that.helper.height(that.size.height); 5955 that.helper.width(that.size.width); 5956 if (this._helper && !o.animate) { 5957 this._proportionallyResize(); 5958 } 5959 } 5960 $("body").css("cursor", "auto"); 5961 this.element.removeClass("ui-resizable-resizing"); 5962 this._propagate("stop", event); 5963 if (this._helper) { 5964 this.helper.remove(); 5965 } 5966 return false; 5967 }, 5968 _updateVirtualBoundaries: function(forceAspectRatio) { 5969 var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, 5970 o = this.options; 5971 b = { 5972 minWidth: isNumber(o.minWidth) ? o.minWidth : 0, 5973 maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, 5974 minHeight: isNumber(o.minHeight) ? o.minHeight : 0, 5975 maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity 5976 }; 5977 if(this._aspectRatio || forceAspectRatio) { 5978 pMinWidth = b.minHeight * this.aspectRatio; 5979 pMinHeight = b.minWidth / this.aspectRatio; 5980 pMaxWidth = b.maxHeight * this.aspectRatio; 5981 pMaxHeight = b.maxWidth / this.aspectRatio; 5982 if(pMinWidth > b.minWidth) { 5983 b.minWidth = pMinWidth; 5984 } 5985 if(pMinHeight > b.minHeight) { 5986 b.minHeight = pMinHeight; 5987 } 5988 if(pMaxWidth < b.maxWidth) { 5989 b.maxWidth = pMaxWidth; 5990 } 5991 if(pMaxHeight < b.maxHeight) { 5992 b.maxHeight = pMaxHeight; 5993 } 5994 } 5995 this._vBoundaries = b; 5996 }, 5997 _updateCache: function(data) { 5998 this.offset = this.helper.offset(); 5999 if (isNumber(data.left)) { 6000 this.position.left = data.left; 6001 } 6002 if (isNumber(data.top)) { 6003 this.position.top = data.top; 6004 } 6005 if (isNumber(data.height)) { 6006 this.size.height = data.height; 6007 } 6008 if (isNumber(data.width)) { 6009 this.size.width = data.width; 6010 } 6011 }, 6012 _updateRatio: function( data ) { 6013 var cpos = this.position, 6014 csize = this.size, 6015 a = this.axis; 6016 if (isNumber(data.height)) { 6017 data.width = (data.height * this.aspectRatio); 6018 } else if (isNumber(data.width)) { 6019 data.height = (data.width / this.aspectRatio); 6020 } 6021 if (a === "sw") { 6022 data.left = cpos.left + (csize.width - data.width); 6023 data.top = null; 6024 } 6025 if (a === "nw") { 6026 data.top = cpos.top + (csize.height - data.height); 6027 data.left = cpos.left + (csize.width - data.width); 6028 } 6029 return data; 6030 }, 6031 _respectSize: function( data ) { 6032 var o = this._vBoundaries, 6033 a = this.axis, 6034 ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), 6035 isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height), 6036 dw = this.originalPosition.left + this.originalSize.width, 6037 dh = this.position.top + this.size.height, 6038 cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); 6039 if (isminw) { 6040 data.width = o.minWidth; 6041 } 6042 if (isminh) { 6043 data.height = o.minHeight; 6044 } 6045 if (ismaxw) { 6046 data.width = o.maxWidth; 6047 } 6048 if (ismaxh) { 6049 data.height = o.maxHeight; 6050 } 6051 if (isminw && cw) { 6052 data.left = dw - o.minWidth; 6053 } 6054 if (ismaxw && cw) { 6055 data.left = dw - o.maxWidth; 6056 } 6057 if (isminh && ch) { 6058 data.top = dh - o.minHeight; 6059 } 6060 if (ismaxh && ch) { 6061 data.top = dh - o.maxHeight; 6062 } 6063 if (!data.width && !data.height && !data.left && data.top) { 6064 data.top = null; 6065 } else if (!data.width && !data.height && !data.top && data.left) { 6066 data.left = null; 6067 } 6068 return data; 6069 }, 6070 _proportionallyResize: function() { 6071 if (!this._proportionallyResizeElements.length) { 6072 return; 6073 } 6074 var i, j, borders, paddings, prel, 6075 element = this.helper || this.element; 6076 for ( i=0; i < this._proportionallyResizeElements.length; i++) { 6077 prel = this._proportionallyResizeElements[i]; 6078 if (!this.borderDif) { 6079 this.borderDif = []; 6080 borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")]; 6081 paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")]; 6082 for ( j = 0; j < borders.length; j++ ) { 6083 this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 ); 6084 } 6085 } 6086 prel.css({ 6087 height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, 6088 width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 6089 }); 6090 } 6091 }, 6092 _renderProxy: function() { 6093 var el = this.element, o = this.options; 6094 this.elementOffset = el.offset(); 6095 if(this._helper) { 6096 this.helper = this.helper || $("<div style='overflow:hidden;'></div>"); 6097 this.helper.addClass(this._helper).css({ 6098 width: this.element.outerWidth() - 1, 6099 height: this.element.outerHeight() - 1, 6100 position: "absolute", 6101 left: this.elementOffset.left +"px", 6102 top: this.elementOffset.top +"px", 6103 zIndex: ++o.zIndex 6104 }); 6105 this.helper 6106 .appendTo("body") 6107 .disableSelection(); 6108 } else { 6109 this.helper = this.element; 6110 } 6111 }, 6112 _change: { 6113 e: function(event, dx) { 6114 return { width: this.originalSize.width + dx }; 6115 }, 6116 w: function(event, dx) { 6117 var cs = this.originalSize, sp = this.originalPosition; 6118 return { left: sp.left + dx, width: cs.width - dx }; 6119 }, 6120 n: function(event, dx, dy) { 6121 var cs = this.originalSize, sp = this.originalPosition; 6122 return { top: sp.top + dy, height: cs.height - dy }; 6123 }, 6124 s: function(event, dx, dy) { 6125 return { height: this.originalSize.height + dy }; 6126 }, 6127 se: function(event, dx, dy) { 6128 return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); 6129 }, 6130 sw: function(event, dx, dy) { 6131 return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); 6132 }, 6133 ne: function(event, dx, dy) { 6134 return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); 6135 }, 6136 nw: function(event, dx, dy) { 6137 return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); 6138 } 6139 }, 6140 _propagate: function(n, event) { 6141 $.ui.plugin.call(this, n, [event, this.ui()]); 6142 (n !== "resize" && this._trigger(n, event, this.ui())); 6143 }, 6144 plugins: {}, 6145 ui: function() { 6146 return { 6147 originalElement: this.originalElement, 6148 element: this.element, 6149 helper: this.helper, 6150 position: this.position, 6151 size: this.size, 6152 originalSize: this.originalSize, 6153 originalPosition: this.originalPosition 6154 }; 6155 } 6156}); 6157$.ui.plugin.add("resizable", "animate", { 6158 stop: function( event ) { 6159 var that = $(this).data("ui-resizable"), 6160 o = that.options, 6161 pr = that._proportionallyResizeElements, 6162 ista = pr.length && (/textarea/i).test(pr[0].nodeName), 6163 soffseth = ista && $.ui.hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height, 6164 soffsetw = ista ? 0 : that.sizeDiff.width, 6165 style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, 6166 left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null, 6167 top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; 6168 that.element.animate( 6169 $.extend(style, top && left ? { top: top, left: left } : {}), { 6170 duration: o.animateDuration, 6171 easing: o.animateEasing, 6172 step: function() { 6173 var data = { 6174 width: parseInt(that.element.css("width"), 10), 6175 height: parseInt(that.element.css("height"), 10), 6176 top: parseInt(that.element.css("top"), 10), 6177 left: parseInt(that.element.css("left"), 10) 6178 }; 6179 if (pr && pr.length) { 6180 $(pr[0]).css({ width: data.width, height: data.height }); 6181 } 6182 that._updateCache(data); 6183 that._propagate("resize", event); 6184 } 6185 } 6186 ); 6187 } 6188}); 6189$.ui.plugin.add("resizable", "containment", { 6190 start: function() { 6191 var element, p, co, ch, cw, width, height, 6192 that = $(this).data("ui-resizable"), 6193 o = that.options, 6194 el = that.element, 6195 oc = o.containment, 6196 ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; 6197 if (!ce) { 6198 return; 6199 } 6200 that.containerElement = $(ce); 6201 if (/document/.test(oc) || oc === document) { 6202 that.containerOffset = { left: 0, top: 0 }; 6203 that.containerPosition = { left: 0, top: 0 }; 6204 that.parentData = {
6205 element: $(document), left: 0, top: 0, 6206 width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight 6207 }; 6208 } 6209 else { 6210 element = $(ce); 6211 p = []; 6212 $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); 6213 that.containerOffset = element.offset(); 6214 that.containerPosition = element.position(); 6215 that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; 6216 co = that.containerOffset; 6217 ch = that.containerSize.height; 6218 cw = that.containerSize.width; 6219 width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ); 6220 height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); 6221 that.parentData = { 6222 element: ce, left: co.left, top: co.top, width: width, height: height 6223 }; 6224 } 6225 }, 6226 resize: function( event ) { 6227 var woset, hoset, isParent, isOffsetRelative, 6228 that = $(this).data("ui-resizable"), 6229 o = that.options, 6230 co = that.containerOffset, cp = that.position, 6231 pRatio = that._aspectRatio || event.shiftKey, 6232 cop = { top:0, left:0 }, ce = that.containerElement; 6233 6234 if (ce[0] !== document && (/static/).test(ce.css("position"))) { 6235 cop = co; 6236 } 6237 if (cp.left < (that._helper ? co.left : 0)) { 6238 that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); 6239 if (pRatio) { 6240 that.size.height = that.size.width / that.aspectRatio; 6241 } 6242 that.position.left = o.helper ? co.left : 0; 6243 } 6244 if (cp.top < (that._helper ? co.top : 0)) { 6245 that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); 6246 if (pRatio) { 6247 that.size.width = that.size.height * that.aspectRatio; 6248 } 6249 that.position.top = that._helper ? co.top : 0; 6250 } 6251 that.offset.left = that.parentData.left+that.position.left; 6252 that.offset.top = that.parentData.top+that.position.top; 6253 woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ); 6254 hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height ); 6255 isParent = that.containerElement.get(0) === that.element.parent().get(0); 6256 isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position")); 6257 if ( isParent && isOffsetRelative ) { 6258 woset -= Math.abs( that.parentData.left ); 6259 } 6260 if (woset + that.size.width >= that.parentData.width) { 6261 that.size.width = that.parentData.width - woset; 6262 if (pRatio) { 6263 that.size.height = that.size.width / that.aspectRatio; 6264 } 6265 } 6266 if (hoset + that.size.height >= that.parentData.height) { 6267 that.size.height = that.parentData.height - hoset; 6268 if (pRatio) { 6269 that.size.width = that.size.height * that.aspectRatio; 6270 } 6271 } 6272 }, 6273 stop: function(){ 6274 var that = $(this).data("ui-resizable"), 6275 o = that.options, 6276 co = that.containerOffset, 6277 cop = that.containerPosition, 6278 ce = that.containerElement, 6279 helper = $(that.helper), 6280 ho = helper.offset(), 6281 w = helper.outerWidth() - that.sizeDiff.width, 6282 h = helper.outerHeight() - that.sizeDiff.height; 6283 if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) { 6284 $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); 6285 } 6286 if (that._helper && !o.animate && (/static/).test(ce.css("position"))) { 6287 $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); 6288 } 6289 } 6290}); 6291$.ui.plugin.add("resizable", "alsoResize", { 6292 start: function () { 6293 var that = $(this).data("ui-resizable"), 6294 o = that.options, 6295 _store = function (exp) { 6296 $(exp).each(function() { 6297 var el = $(this); 6298 el.data("ui-resizable-alsoresize", { 6299 width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), 6300 left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) 6301 }); 6302 }); 6303 }; 6304 if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) { 6305 if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } 6306 else { $.each(o.alsoResize, function (exp) { _store(exp); }); } 6307 }else{ 6308 _store(o.alsoResize); 6309 } 6310 }, 6311 resize: function (event, ui) { 6312 var that = $(this).data("ui-resizable"), 6313 o = that.options, 6314 os = that.originalSize, 6315 op = that.originalPosition, 6316 delta = { 6317 height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0, 6318 top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0 6319 }, 6320 _alsoResize = function (exp, c) { 6321 $(exp).each(function() { 6322 var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, 6323 css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
vendor: 10,866 bytes, lines 6324-6687
6324 $.each(css, function (i, prop) { 6325 var sum = (start[prop]||0) + (delta[prop]||0); 6326 if (sum && sum >= 0) { 6327 style[prop] = sum || null; 6328 } 6329 }); 6330 el.css(style); 6331 }); 6332 }; 6333 if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) { 6334 $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); 6335 }else{ 6336 _alsoResize(o.alsoResize); 6337 } 6338 }, 6339 stop: function () { 6340 $(this).removeData("resizable-alsoresize"); 6341 } 6342}); 6343$.ui.plugin.add("resizable", "ghost", { 6344 start: function() { 6345 var that = $(this).data("ui-resizable"), o = that.options, cs = that.size; 6346 that.ghost = that.originalElement.clone(); 6347 that.ghost 6348 .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) 6349 .addClass("ui-resizable-ghost") 6350 .addClass(typeof o.ghost === "string" ? o.ghost : ""); 6351 that.ghost.appendTo(that.helper); 6352 }, 6353 resize: function(){ 6354 var that = $(this).data("ui-resizable"); 6355 if (that.ghost) { 6356 that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width }); 6357 } 6358 }, 6359 stop: function() { 6360 var that = $(this).data("ui-resizable"); 6361 if (that.ghost && that.helper) { 6362 that.helper.get(0).removeChild(that.ghost.get(0)); 6363 } 6364 } 6365}); 6366$.ui.plugin.add("resizable", "grid", { 6367 resize: function() { 6368 var that = $(this).data("ui-resizable"), 6369 o = that.options, 6370 cs = that.size, 6371 os = that.originalSize, 6372 op = that.originalPosition, 6373 a = that.axis, 6374 grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid, 6375 gridX = (grid[0]||1), 6376 gridY = (grid[1]||1), 6377 ox = Math.round((cs.width - os.width) / gridX) * gridX, 6378 oy = Math.round((cs.height - os.height) / gridY) * gridY, 6379 newWidth = os.width + ox, 6380 newHeight = os.height + oy, 6381 isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), 6382 isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), 6383 isMinWidth = o.minWidth && (o.minWidth > newWidth), 6384 isMinHeight = o.minHeight && (o.minHeight > newHeight); 6385 o.grid = grid; 6386 if (isMinWidth) { 6387 newWidth = newWidth + gridX; 6388 } 6389 if (isMinHeight) { 6390 newHeight = newHeight + gridY; 6391 } 6392 if (isMaxWidth) { 6393 newWidth = newWidth - gridX; 6394 } 6395 if (isMaxHeight) { 6396 newHeight = newHeight - gridY; 6397 } 6398 if (/^(se|s|e)$/.test(a)) { 6399 that.size.width = newWidth; 6400 that.size.height = newHeight; 6401 } else if (/^(ne)$/.test(a)) { 6402 that.size.width = newWidth; 6403 that.size.height = newHeight; 6404 that.position.top = op.top - oy; 6405 } else if (/^(sw)$/.test(a)) { 6406 that.size.width = newWidth; 6407 that.size.height = newHeight; 6408 that.position.left = op.left - ox; 6409 } else { 6410 if ( newHeight - gridY > 0 ) { 6411 that.size.height = newHeight; 6412 that.position.top = op.top - oy; 6413 } else { 6414 that.size.height = gridY; 6415 that.position.top = op.top + os.height - gridY; 6416 } 6417 if ( newWidth - gridX > 0 ) { 6418 that.size.width = newWidth; 6419 that.position.left = op.left - ox; 6420 } else { 6421 that.size.width = gridX; 6422 that.position.left = op.left + os.width - gridX; 6423 } 6424 } 6425 } 6426}); 6427})(jQuery); 6428(function( $, undefined ) { 6429var lastActive, 6430 baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", 6431 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", 6432 formResetHandler = function() { 6433 var form = $( this ); 6434 setTimeout(function() { 6435 form.find( ":ui-button" ).button( "refresh" ); 6436 }, 1 ); 6437 }, 6438 radioGroup = function( radio ) { 6439 var name = radio.name, 6440 form = radio.form, 6441 radios = $( [] ); 6442 if ( name ) { 6443 name = name.replace( /'/g, "\\'" ); 6444 if ( form ) { 6445 radios = $( form ).find( "[name='" + name + "']" ); 6446 } else { 6447 radios = $( "[name='" + name + "']", radio.ownerDocument ) 6448 .filter(function() { 6449 return !this.form; 6450 }); 6451 } 6452 } 6453 return radios; 6454 }; 6455$.widget( "ui.button", { 6456 version: "1.10.4", 6457 defaultElement: "<button>", 6458 options: { 6459 disabled: null, 6460 text: true, 6461 label: null, 6462 icons: { 6463 primary: null, 6464 secondary: null 6465 } 6466 }, 6467 _create: function() { 6468 this.element.closest( "form" ) 6469 .unbind( "reset" + this.eventNamespace ) 6470 .bind( "reset" + this.eventNamespace, formResetHandler ); 6471 if ( typeof this.options.disabled !== "boolean" ) { 6472 this.options.disabled = !!this.element.prop( "disabled" ); 6473 } else { 6474 this.element.prop( "disabled", this.options.disabled ); 6475 } 6476 this._determineButtonType(); 6477 this.hasTitle = !!this.buttonElement.attr( "title" ); 6478 var that = this, 6479 options = this.options, 6480 toggleButton = this.type === "checkbox" || this.type === "radio", 6481 activeClass = !toggleButton ? "ui-state-active" : ""; 6482 if ( options.label === null ) { 6483 options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); 6484 } 6485 this._hoverable( this.buttonElement ); 6486 this.buttonElement 6487 .addClass( baseClasses ) 6488 .attr( "role", "button" ) 6489 .bind( "mouseenter" + this.eventNamespace, function() { 6490 if ( options.disabled ) { 6491 return; 6492 } 6493 if ( this === lastActive ) { 6494 $( this ).addClass( "ui-state-active" ); 6495 } 6496 }) 6497 .bind( "mouseleave" + this.eventNamespace, function() { 6498 if ( options.disabled ) { 6499 return; 6500 } 6501 $( this ).removeClass( activeClass ); 6502 }) 6503 .bind( "click" + this.eventNamespace, function( event ) { 6504 if ( options.disabled ) { 6505 event.preventDefault(); 6506 event.stopImmediatePropagation(); 6507 } 6508 }); 6509 this._on({ 6510 focus: function() { 6511 this.buttonElement.addClass( "ui-state-focus" ); 6512 }, 6513 blur: function() { 6514 this.buttonElement.removeClass( "ui-state-focus" ); 6515 } 6516 }); 6517 if ( toggleButton ) { 6518 this.element.bind( "change" + this.eventNamespace, function() { 6519 that.refresh(); 6520 }); 6521 } 6522 if ( this.type === "checkbox" ) { 6523 this.buttonElement.bind( "click" + this.eventNamespace, function() { 6524 if ( options.disabled ) { 6525 return false; 6526 } 6527 }); 6528 } else if ( this.type === "radio" ) { 6529 this.buttonElement.bind( "click" + this.eventNamespace, function() { 6530 if ( options.disabled ) { 6531 return false; 6532 } 6533 $( this ).addClass( "ui-state-active" ); 6534 that.buttonElement.attr( "aria-pressed", "true" ); 6535 6536 var radio = that.element[ 0 ]; 6537 radioGroup( radio ) 6538 .not( radio ) 6539 .map(function() { 6540 return $( this ).button( "widget" )[ 0 ]; 6541 }) 6542 .removeClass( "ui-state-active" ) 6543 .attr( "aria-pressed", "false" ); 6544 }); 6545 } else { 6546 this.buttonElement 6547 .bind( "mousedown" + this.eventNamespace, function() { 6548 if ( options.disabled ) { 6549 return false; 6550 } 6551 $( this ).addClass( "ui-state-active" ); 6552 lastActive = this; 6553 that.document.one( "mouseup", function() { 6554 lastActive = null; 6555 }); 6556 }) 6557 .bind( "mouseup" + this.eventNamespace, function() { 6558 if ( options.disabled ) { 6559 return false; 6560 } 6561 $( this ).removeClass( "ui-state-active" ); 6562 }) 6563 .bind( "keydown" + this.eventNamespace, function(event) { 6564 if ( options.disabled ) { 6565 return false; 6566 } 6567 if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) { 6568 $( this ).addClass( "ui-state-active" ); 6569 } 6570 }) 6571 .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { 6572 $( this ).removeClass( "ui-state-active" ); 6573 }); 6574 if ( this.buttonElement.is("a") ) { 6575 this.buttonElement.keyup(function(event) { 6576 if ( event.keyCode === $.ui.keyCode.SPACE ) { 6577 $( this ).click(); 6578 } 6579 }); 6580 } 6581 } 6582 this._setOption( "disabled", options.disabled ); 6583 this._resetButton(); 6584 }, 6585 _determineButtonType: function() { 6586 var ancestor, labelSelector, checked; 6587 if ( this.element.is("[type=checkbox]") ) { 6588 this.type = "checkbox"; 6589 } else if ( this.element.is("[type=radio]") ) { 6590 this.type = "radio"; 6591 } else if ( this.element.is("input") ) { 6592 this.type = "input"; 6593 } else { 6594 this.type = "button"; 6595 } 6596 if ( this.type === "checkbox" || this.type === "radio" ) { 6597 ancestor = this.element.parents().last(); 6598 labelSelector = "label[for='" + this.element.attr("id") + "']"; 6599 this.buttonElement = ancestor.find( labelSelector ); 6600 if ( !this.buttonElement.length ) { 6601 ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); 6602 this.buttonElement = ancestor.filter( labelSelector ); 6603 if ( !this.buttonElement.length ) { 6604 this.buttonElement = ancestor.find( labelSelector ); 6605 } 6606 } 6607 this.element.addClass( "ui-helper-hidden-accessible" ); 6608 checked = this.element.is( ":checked" ); 6609 if ( checked ) { 6610 this.buttonElement.addClass( "ui-state-active" ); 6611 } 6612 this.buttonElement.prop( "aria-pressed", checked ); 6613 } else { 6614 this.buttonElement = this.element; 6615 } 6616 }, 6617 widget: function() { 6618 return this.buttonElement; 6619 }, 6620 _destroy: function() { 6621 this.element 6622 .removeClass( "ui-helper-hidden-accessible" ); 6623 this.buttonElement 6624 .removeClass( baseClasses + " ui-state-active " + typeClasses ) 6625 .removeAttr( "role" ) 6626 .removeAttr( "aria-pressed" ) 6627 .html( this.buttonElement.find(".ui-button-text").html() ); 6628 6629 if ( !this.hasTitle ) { 6630 this.buttonElement.removeAttr( "title" ); 6631 } 6632 }, 6633 _setOption: function( key, value ) { 6634 this._super( key, value ); 6635 if ( key === "disabled" ) { 6636 this.element.prop( "disabled", !!value ); 6637 if ( value ) { 6638 this.buttonElement.removeClass( "ui-state-focus" ); 6639 } 6640 return; 6641 } 6642 this._resetButton(); 6643 }, 6644 refresh: function() { 6645 var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" ); 6646 if ( isDisabled !== this.options.disabled ) { 6647 this._setOption( "disabled", isDisabled ); 6648 } 6649 if ( this.type === "radio" ) { 6650 radioGroup( this.element[0] ).each(function() { 6651 if ( $( this ).is( ":checked" ) ) { 6652 $( this ).button( "widget" ) 6653 .addClass( "ui-state-active" ) 6654 .attr( "aria-pressed", "true" ); 6655 } else { 6656 $( this ).button( "widget" ) 6657 .removeClass( "ui-state-active" ) 6658 .attr( "aria-pressed", "false" ); 6659 } 6660 }); 6661 } else if ( this.type === "checkbox" ) { 6662 if ( this.element.is( ":checked" ) ) { 6663 this.buttonElement 6664 .addClass( "ui-state-active" ) 6665 .attr( "aria-pressed", "true" ); 6666 } else { 6667 this.buttonElement 6668 .removeClass( "ui-state-active" ) 6669 .attr( "aria-pressed", "false" ); 6670 } 6671 } 6672 }, 6673 _resetButton: function() { 6674 if ( this.type === "input" ) { 6675 if ( this.options.label ) { 6676 this.element.val( this.options.label ); 6677 } 6678 return; 6679 } 6680 var buttonElement = this.buttonElement.removeClass( typeClasses ), 6681 buttonText = $( "<span></span>", this.document[0] ) 6682 .addClass( "ui-button-text" ) 6683 .html( this.options.label ) 6684 .appendTo( buttonElement.empty() ) 6685 .text(), 6686 icons = this.options.icons, 6687 multipleIcons = icons.primary && icons.secondary,
vendor: 4,703 bytes, lines 6688-6842
6688 buttonClasses = []; 6689 if ( icons.primary || icons.secondary ) { 6690 if ( this.options.text ) { 6691 buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); 6692 } 6693 if ( icons.primary ) { 6694 buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); 6695 } 6696 if ( icons.secondary ) { 6697 buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" ); 6698 } 6699 if ( !this.options.text ) { 6700 buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); 6701 if ( !this.hasTitle ) { 6702 buttonElement.attr( "title", $.trim( buttonText ) ); 6703 } 6704 } 6705 } else { 6706 buttonClasses.push( "ui-button-text-only" ); 6707 } 6708 buttonElement.addClass( buttonClasses.join( " " ) ); 6709 } 6710}); 6711$.widget( "ui.buttonset", { 6712 version: "1.10.4", 6713 options: { 6714 items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)" 6715 }, 6716 _create: function() { 6717 this.element.addClass( "ui-buttonset" ); 6718 }, 6719 _init: function() { 6720 this.refresh(); 6721 }, 6722 _setOption: function( key, value ) { 6723 if ( key === "disabled" ) { 6724 this.buttons.button( "option", key, value ); 6725 } 6726 this._super( key, value ); 6727 }, 6728 refresh: function() { 6729 var rtl = this.element.css( "direction" ) === "rtl"; 6730 this.buttons = this.element.find( this.options.items ) 6731 .filter( ":ui-button" ) 6732 .button( "refresh" ) 6733 .end() 6734 .not( ":ui-button" ) 6735 .button() 6736 .end() 6737 .map(function() { 6738 return $( this ).button( "widget" )[ 0 ]; 6739 }) 6740 .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) 6741 .filter( ":first" ) 6742 .addClass( rtl ? "ui-corner-right" : "ui-corner-left" ) 6743 .end() 6744 .filter( ":last" ) 6745 .addClass( rtl ? "ui-corner-left" : "ui-corner-right" ) 6746 .end() 6747 .end(); 6748 }, 6749 _destroy: function() { 6750 this.element.removeClass( "ui-buttonset" ); 6751 this.buttons 6752 .map(function() { 6753 return $( this ).button( "widget" )[ 0 ]; 6754 }) 6755 .removeClass( "ui-corner-left ui-corner-right" ) 6756 .end() 6757 .button( "destroy" ); 6758 } 6759}); 6760}( jQuery ) ); 6761(function( $, undefined ) { 6762$.extend($.ui, { datepicker: { version: "1.10.4" } }); 6763var PROP_NAME = "datepicker", 6764 instActive; 6765function Datepicker() { 6766 this._curInst = null; 6767 this._keyEvent = false; 6768 this._disabledInputs = []; 6769 this._datepickerShowing = false; 6770 this._inDialog = false; 6771 this._mainDivId = "ui-datepicker-div"; 6772 this._inlineClass = "ui-datepicker-inline"; 6773 this._appendClass = "ui-datepicker-append"; 6774 this._triggerClass = "ui-datepicker-trigger"; 6775 this._dialogClass = "ui-datepicker-dialog"; 6776 this._disableClass = "ui-datepicker-disabled"; 6777 this._unselectableClass = "ui-datepicker-unselectable"; 6778 this._currentClass = "ui-datepicker-current-day"; 6779 this._dayOverClass = "ui-datepicker-days-cell-over"; 6780 this.regional = []; 6781 this.regional[""] = { 6782 closeText: "Done", 6783 prevText: "Prev", 6784 nextText: "Next", 6785 currentText: "Today", 6786 monthNames: ["January","February","March","April","May","June", 6787 "July","August","September","October","November","December"], 6788 monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 6789 dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 6790 dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 6791 dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], 6792 weekHeader: "Wk", 6793 dateFormat: "mm/dd/yy", 6794 firstDay: 0, 6795 isRTL: false, 6796 showMonthAfterYear: false, 6797 yearSuffix: "" 6798 }; 6799 this._defaults = { 6800 showOn: "focus", 6801 showAnim: "show", 6802 showOptions: {}, 6803 defaultDate: null, 6804 appendText: "", 6805 buttonText: "...", 6806 buttonImage: "", 6807 buttonImageOnly: false, 6808 hideIfNoPrevNext: false, 6809 navigationAsDateFormat: false, 6810 gotoCurrent: false, 6811 changeMonth: false, 6812 changeYear: false, 6813 yearRange: "c-10:c+10", 6814 showOtherMonths: false, 6815 selectOtherMonths: false, 6816 showWeek: false, 6817 calculateWeek: this.iso8601Week, 6818 shortYearCutoff: "+10", 6819 minDate: null, 6820 maxDate: null, 6821 duration: "fast", 6822 beforeShowDay: null, 6823 beforeShow: null, 6824 onSelect: null, 6825 onChangeMonthYear: null, 6826 onClose: null, 6827 numberOfMonths: 1, 6828 showCurrentAtPos: 0, 6829 stepMonths: 1, 6830 stepBigMonths: 12, 6831 altField: "", 6832 altFormat: "", 6833 constrainInput: true, 6834 showButtonPanel: false, 6835 autoSize: false, 6836 disabled: false 6837 }; 6838 $.extend(this._defaults, this.regional[""]); 6839 this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")); 6840} 6841$.extend(Datepicker.prototype, { 6842 markerClassName: "hasDatepicker",
vendor: 6,228 bytes, lines 6843-7020
6843 maxRows: 4, 6844 _widgetDatepicker: function() { 6845 return this.dpDiv; 6846 }, 6847 setDefaults: function(settings) { 6848 extendRemove(this._defaults, settings || {}); 6849 return this; 6850 }, 6851 _attachDatepicker: function(target, settings) { 6852 var nodeName, inline, inst; 6853 nodeName = target.nodeName.toLowerCase(); 6854 inline = (nodeName === "div" || nodeName === "span"); 6855 if (!target.id) { 6856 this.uuid += 1; 6857 target.id = "dp" + this.uuid; 6858 } 6859 inst = this._newInst($(target), inline); 6860 inst.settings = $.extend({}, settings || {}); 6861 if (nodeName === "input") { 6862 this._connectDatepicker(target, inst); 6863 } else if (inline) { 6864 this._inlineDatepicker(target, inst); 6865 } 6866 }, 6867 _newInst: function(target, inline) { 6868 var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); 6869 return {id: id, input: target, 6870 selectedDay: 0, selectedMonth: 0, selectedYear: 0, 6871 drawMonth: 0, drawYear: 0, 6872 inline: inline, 6873 dpDiv: (!inline ? this.dpDiv : 6874 bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))}; 6875 }, 6876 _connectDatepicker: function(target, inst) { 6877 var input = $(target); 6878 inst.append = $([]); 6879 inst.trigger = $([]); 6880 if (input.hasClass(this.markerClassName)) { 6881 return; 6882 } 6883 this._attachments(input, inst); 6884 input.addClass(this.markerClassName).keydown(this._doKeyDown). 6885 keypress(this._doKeyPress).keyup(this._doKeyUp); 6886 this._autoSize(inst); 6887 $.data(target, PROP_NAME, inst); 6888 if( inst.settings.disabled ) { 6889 this._disableDatepicker( target ); 6890 } 6891 }, 6892 _attachments: function(input, inst) { 6893 var showOn, buttonText, buttonImage, 6894 appendText = this._get(inst, "appendText"), 6895 isRTL = this._get(inst, "isRTL"); 6896 if (inst.append) { 6897 inst.append.remove(); 6898 } 6899 if (appendText) { 6900 inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>"); 6901 input[isRTL ? "before" : "after"](inst.append); 6902 } 6903 input.unbind("focus", this._showDatepicker); 6904 if (inst.trigger) { 6905 inst.trigger.remove(); 6906 } 6907 showOn = this._get(inst, "showOn"); 6908 if (showOn === "focus" || showOn === "both") { 6909 input.focus(this._showDatepicker); 6910 } 6911 if (showOn === "button" || showOn === "both") { 6912 buttonText = this._get(inst, "buttonText"); 6913 buttonImage = this._get(inst, "buttonImage"); 6914 inst.trigger = $(this._get(inst, "buttonImageOnly") ? 6915 $("<img/>").addClass(this._triggerClass). 6916 attr({ src: buttonImage, alt: buttonText, title: buttonText }) : 6917 $("<button type='button'></button>").addClass(this._triggerClass). 6918 html(!buttonImage ? buttonText : $("<img/>").attr( 6919 { src:buttonImage, alt:buttonText, title:buttonText }))); 6920 input[isRTL ? "before" : "after"](inst.trigger); 6921 inst.trigger.click(function() { 6922 if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { 6923 $.datepicker._hideDatepicker(); 6924 } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { 6925 $.datepicker._hideDatepicker(); 6926 $.datepicker._showDatepicker(input[0]); 6927 } else { 6928 $.datepicker._showDatepicker(input[0]); 6929 } 6930 return false; 6931 }); 6932 } 6933 }, 6934 _autoSize: function(inst) { 6935 if (this._get(inst, "autoSize") && !inst.inline) { 6936 var findMax, max, maxI, i, 6937 date = new Date(2009, 12 - 1, 20), 6938 dateFormat = this._get(inst, "dateFormat"); 6939 if (dateFormat.match(/[DM]/)) { 6940 findMax = function(names) { 6941 max = 0; 6942 maxI = 0; 6943 for (i = 0; i < names.length; i++) { 6944 if (names[i].length > max) { 6945 max = names[i].length; 6946 maxI = i; 6947 } 6948 } 6949 return maxI; 6950 }; 6951 date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? 6952 "monthNames" : "monthNamesShort")))); 6953 date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? 6954 "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); 6955 } 6956 inst.input.attr("size", this._formatDate(inst, date).length); 6957 } 6958 }, 6959 _inlineDatepicker: function(target, inst) { 6960 var divSpan = $(target); 6961 if (divSpan.hasClass(this.markerClassName)) { 6962 return; 6963 } 6964 divSpan.addClass(this.markerClassName).append(inst.dpDiv); 6965 $.data(target, PROP_NAME, inst); 6966 this._setDate(inst, this._getDefaultDate(inst), true); 6967 this._updateDatepicker(inst); 6968 this._updateAlternate(inst); 6969 if( inst.settings.disabled ) { 6970 this._disableDatepicker( target ); 6971 } 6972 inst.dpDiv.css( "display", "block" ); 6973 }, 6974 _dialogDatepicker: function(input, date, onSelect, settings, pos) { 6975 var id, browserWidth, browserHeight, scrollX, scrollY, 6976 inst = this._dialogInst; 6977 if (!inst) { 6978 this.uuid += 1; 6979 id = "dp" + this.uuid; 6980 this._dialogInput = $("<input type='text' id='" + id + 6981 "' style='position: absolute; top: -100px; width: 0px;'/>"); 6982 this._dialogInput.keydown(this._doKeyDown); 6983 $("body").append(this._dialogInput); 6984 inst = this._dialogInst = this._newInst(this._dialogInput, false); 6985 inst.settings = {}; 6986 $.data(this._dialogInput[0], PROP_NAME, inst); 6987 } 6988 extendRemove(inst.settings, settings || {}); 6989 date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); 6990 this._dialogInput.val(date); 6991 this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); 6992 if (!this._pos) { 6993 browserWidth = document.documentElement.clientWidth; 6994 browserHeight = document.documentElement.clientHeight; 6995 scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 6996 scrollY = document.documentElement.scrollTop || document.body.scrollTop; 6997 this._pos = 6998 [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; 6999 } 7000 this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); 7001 inst.settings.onSelect = onSelect; 7002 this._inDialog = true; 7003 this.dpDiv.addClass(this._dialogClass); 7004 this._showDatepicker(this._dialogInput[0]); 7005 if ($.blockUI) { 7006 $.blockUI(this.dpDiv); 7007 } 7008 $.data(this._dialogInput[0], PROP_NAME, inst); 7009 return this; 7010 }, 7011 _destroyDatepicker: function(target) { 7012 var nodeName, 7013 $target = $(target), 7014 inst = $.data(target, PROP_NAME); 7015 if (!$target.hasClass(this.markerClassName)) { 7016 return; 7017 } 7018 nodeName = target.nodeName.toLowerCase(); 7019 $.removeData(target, PROP_NAME); 7020 if (nodeName === "input") {
vendor: 9,764 bytes, lines 7021-7308
7021 inst.append.remove(); 7022 inst.trigger.remove(); 7023 $target.removeClass(this.markerClassName). 7024 unbind("focus", this._showDatepicker). 7025 unbind("keydown", this._doKeyDown). 7026 unbind("keypress", this._doKeyPress). 7027 unbind("keyup", this._doKeyUp); 7028 } else if (nodeName === "div" || nodeName === "span") { 7029 $target.removeClass(this.markerClassName).empty(); 7030 } 7031 }, 7032 _enableDatepicker: function(target) { 7033 var nodeName, inline, 7034 $target = $(target), 7035 inst = $.data(target, PROP_NAME); 7036 if (!$target.hasClass(this.markerClassName)) { 7037 return; 7038 } 7039 nodeName = target.nodeName.toLowerCase(); 7040 if (nodeName === "input") { 7041 target.disabled = false; 7042 inst.trigger.filter("button"). 7043 each(function() { this.disabled = false; }).end(). 7044 filter("img").css({opacity: "1.0", cursor: ""}); 7045 } else if (nodeName === "div" || nodeName === "span") { 7046 inline = $target.children("." + this._inlineClass); 7047 inline.children().removeClass("ui-state-disabled"); 7048 inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). 7049 prop("disabled", false); 7050 } 7051 this._disabledInputs = $.map(this._disabledInputs, 7052 function(value) { return (value === target ? null : value); }); // delete entry 7053 }, 7054 _disableDatepicker: function(target) { 7055 var nodeName, inline, 7056 $target = $(target), 7057 inst = $.data(target, PROP_NAME); 7058 if (!$target.hasClass(this.markerClassName)) { 7059 return; 7060 } 7061 nodeName = target.nodeName.toLowerCase(); 7062 if (nodeName === "input") { 7063 target.disabled = true; 7064 inst.trigger.filter("button"). 7065 each(function() { this.disabled = true; }).end(). 7066 filter("img").css({opacity: "0.5", cursor: "default"}); 7067 } else if (nodeName === "div" || nodeName === "span") { 7068 inline = $target.children("." + this._inlineClass); 7069 inline.children().addClass("ui-state-disabled"); 7070 inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). 7071 prop("disabled", true); 7072 } 7073 this._disabledInputs = $.map(this._disabledInputs, 7074 function(value) { return (value === target ? null : value); }); 7075 this._disabledInputs[this._disabledInputs.length] = target; 7076 }, 7077 _isDisabledDatepicker: function(target) { 7078 if (!target) { 7079 return false; 7080 } 7081 for (var i = 0; i < this._disabledInputs.length; i++) { 7082 if (this._disabledInputs[i] === target) { 7083 return true; 7084 } 7085 } 7086 return false; 7087 }, 7088 _getInst: function(target) { 7089 try { 7090 return $.data(target, PROP_NAME); 7091 } 7092 catch (err) { 7093 throw "Missing instance data for this datepicker"; 7094 } 7095 }, 7096 _optionDatepicker: function(target, name, value) { 7097 var settings, date, minDate, maxDate, 7098 inst = this._getInst(target); 7099 if (arguments.length === 2 && typeof name === "string") { 7100 return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : 7101 (inst ? (name === "all" ? $.extend({}, inst.settings) : 7102 this._get(inst, name)) : null)); 7103 } 7104 settings = name || {}; 7105 if (typeof name === "string") { 7106 settings = {}; 7107 settings[name] = value; 7108 } 7109 if (inst) { 7110 if (this._curInst === inst) { 7111 this._hideDatepicker(); 7112 } 7113 date = this._getDateDatepicker(target, true); 7114 minDate = this._getMinMaxDate(inst, "min"); 7115 maxDate = this._getMinMaxDate(inst, "max"); 7116 extendRemove(inst.settings, settings); 7117 if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { 7118 inst.settings.minDate = this._formatDate(inst, minDate); 7119 } 7120 if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { 7121 inst.settings.maxDate = this._formatDate(inst, maxDate); 7122 } 7123 if ( "disabled" in settings ) { 7124 if ( settings.disabled ) { 7125 this._disableDatepicker(target); 7126 } else { 7127 this._enableDatepicker(target); 7128 } 7129 } 7130 this._attachments($(target), inst); 7131 this._autoSize(inst); 7132 this._setDate(inst, date); 7133 this._updateAlternate(inst); 7134 this._updateDatepicker(inst); 7135 } 7136 }, 7137 _changeDatepicker: function(target, name, value) { 7138 this._optionDatepicker(target, name, value); 7139 }, 7140 _refreshDatepicker: function(target) { 7141 var inst = this._getInst(target); 7142 if (inst) { 7143 this._updateDatepicker(inst); 7144 } 7145 }, 7146 _setDateDatepicker: function(target, date) { 7147 var inst = this._getInst(target); 7148 if (inst) { 7149 this._setDate(inst, date); 7150 this._updateDatepicker(inst); 7151 this._updateAlternate(inst); 7152 } 7153 }, 7154 _getDateDatepicker: function(target, noDefault) { 7155 var inst = this._getInst(target); 7156 if (inst && !inst.inline) { 7157 this._setDateFromField(inst, noDefault); 7158 } 7159 return (inst ? this._getDate(inst) : null); 7160 }, 7161 _doKeyDown: function(event) { 7162 var onSelect, dateStr, sel, 7163 inst = $.datepicker._getInst(event.target), 7164 handled = true, 7165 isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); 7166 inst._keyEvent = true; 7167 if ($.datepicker._datepickerShowing) { 7168 switch (event.keyCode) { 7169 case 9: $.datepicker._hideDatepicker(); 7170 handled = false; 7171 break; // hide on tab out 7172 case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + 7173 $.datepicker._currentClass + ")", inst.dpDiv); 7174 if (sel[0]) { 7175 $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); 7176 } 7177 onSelect = $.datepicker._get(inst, "onSelect"); 7178 if (onSelect) { 7179 dateStr = $.datepicker._formatDate(inst); 7180 onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); 7181 } else { 7182 $.datepicker._hideDatepicker(); 7183 } 7184 return false; 7185 case 27: $.datepicker._hideDatepicker(); 7186 break; 7187 case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7188 -$.datepicker._get(inst, "stepBigMonths") : 7189 -$.datepicker._get(inst, "stepMonths")), "M"); 7190 break; 7191 case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7192 +$.datepicker._get(inst, "stepBigMonths") : 7193 +$.datepicker._get(inst, "stepMonths")), "M"); 7194 break; 7195 case 35: if (event.ctrlKey || event.metaKey) { 7196 $.datepicker._clearDate(event.target); 7197 } 7198 handled = event.ctrlKey || event.metaKey; 7199 break; 7200 case 36: if (event.ctrlKey || event.metaKey) { 7201 $.datepicker._gotoToday(event.target); 7202 } 7203 handled = event.ctrlKey || event.metaKey; 7204 break; 7205 case 37: if (event.ctrlKey || event.metaKey) { 7206 $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); 7207 } 7208 handled = event.ctrlKey || event.metaKey; 7209 if (event.originalEvent.altKey) { 7210 $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7211 -$.datepicker._get(inst, "stepBigMonths") : 7212 -$.datepicker._get(inst, "stepMonths")), "M"); 7213 } 7214 break; 7215 case 38: if (event.ctrlKey || event.metaKey) { 7216 $.datepicker._adjustDate(event.target, -7, "D"); 7217 } 7218 handled = event.ctrlKey || event.metaKey; 7219 break; // -1 week on ctrl or command +up 7220 case 39: if (event.ctrlKey || event.metaKey) { 7221 $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); 7222 } 7223 handled = event.ctrlKey || event.metaKey; 7224 if (event.originalEvent.altKey) { 7225 $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7226 +$.datepicker._get(inst, "stepBigMonths") : 7227 +$.datepicker._get(inst, "stepMonths")), "M"); 7228 } 7229 break; 7230 case 40: if (event.ctrlKey || event.metaKey) { 7231 $.datepicker._adjustDate(event.target, +7, "D"); 7232 } 7233 handled = event.ctrlKey || event.metaKey; 7234 break; 7235 default: handled = false; 7236 } 7237 } else if (event.keyCode === 36 && event.ctrlKey) { 7238 $.datepicker._showDatepicker(this); 7239 } else { 7240 handled = false; 7241 } 7242 if (handled) { 7243 event.preventDefault(); 7244 event.stopPropagation(); 7245 } 7246 }, 7247 _doKeyPress: function(event) { 7248 var chars, chr, 7249 inst = $.datepicker._getInst(event.target); 7250 if ($.datepicker._get(inst, "constrainInput")) { 7251 chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); 7252 chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); 7253 return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); 7254 } 7255 }, 7256 _doKeyUp: function(event) { 7257 var date, 7258 inst = $.datepicker._getInst(event.target); 7259 if (inst.input.val() !== inst.lastVal) { 7260 try { 7261 date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), 7262 (inst.input ? inst.input.val() : null), 7263 $.datepicker._getFormatConfig(inst)); 7264 if (date) { 7265 $.datepicker._setDateFromField(inst); 7266 $.datepicker._updateAlternate(inst); 7267 $.datepicker._updateDatepicker(inst); 7268 } 7269 } 7270 catch (err) { 7271 } 7272 } 7273 return true; 7274 }, 7275 _showDatepicker: function(input) { 7276 input = input.target || input; 7277 if (input.nodeName.toLowerCase() !== "input") { 7278 input = $("input", input.parentNode)[0]; 7279 } 7280 if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { 7281 return; 7282 } 7283 var inst, beforeShow, beforeShowSettings, isFixed, 7284 offset, showAnim, duration; 7285 inst = $.datepicker._getInst(input); 7286 if ($.datepicker._curInst && $.datepicker._curInst !== inst) { 7287 $.datepicker._curInst.dpDiv.stop(true, true); 7288 if ( inst && $.datepicker._datepickerShowing ) { 7289 $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); 7290 } 7291 } 7292 beforeShow = $.datepicker._get(inst, "beforeShow"); 7293 beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; 7294 if(beforeShowSettings === false){ 7295 return; 7296 } 7297 extendRemove(inst.settings, beforeShowSettings); 7298 inst.lastVal = null; 7299 $.datepicker._lastInput = input; 7300 $.datepicker._setDateFromField(inst); 7301 if ($.datepicker._inDialog) { // hide cursor 7302 input.value = ""; 7303 } 7304 if (!$.datepicker._pos) { 7305 $.datepicker._pos = $.datepicker._findPos(input); 7306 $.datepicker._pos[1] += input.offsetHeight; 7307 } 7308 isFixed = false;
vendor: 4,824 bytes, lines 7309-7423
7309 $(input).parents().each(function() { 7310 isFixed |= $(this).css("position") === "fixed"; 7311 return !isFixed; 7312 }); 7313 offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; 7314 $.datepicker._pos = null; 7315 inst.dpDiv.empty(); 7316 inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); 7317 $.datepicker._updateDatepicker(inst); 7318 offset = $.datepicker._checkOffset(inst, offset, isFixed); 7319 inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? 7320 "static" : (isFixed ? "fixed" : "absolute")), display: "none", 7321 left: offset.left + "px", top: offset.top + "px"}); 7322 if (!inst.inline) { 7323 showAnim = $.datepicker._get(inst, "showAnim"); 7324 duration = $.datepicker._get(inst, "duration"); 7325 inst.dpDiv.zIndex($(input).zIndex()+1); 7326 $.datepicker._datepickerShowing = true; 7327 if ( $.effects && $.effects.effect[ showAnim ] ) { 7328 inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); 7329 } else { 7330 inst.dpDiv[showAnim || "show"](null); 7331 frozen_timeout = setTimeout(function(){ 7332 datepicker_frozen = inst.dpDiv.css('display') == 'none' ? true : false; 7333 }, 2000); 7334 } 7335 if ( $.datepicker._shouldFocusInput( inst ) ) { 7336 inst.input.focus(); 7337 } 7338 $.datepicker._curInst = inst; 7339 } 7340 }, 7341 _updateDatepicker: function(inst) { 7342 this.maxRows = 4; 7343 instActive = inst; 7344 inst.dpDiv.empty().append(this._generateHTML(inst)); 7345 this._attachHandlers(inst); 7346 inst.dpDiv.find("." + this._dayOverClass + " a").mouseover(); 7347 var origyearshtml, 7348 numMonths = this._getNumberOfMonths(inst), 7349 cols = numMonths[1], 7350 width = 17; 7351 inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); 7352 if (cols > 1) { 7353 inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); 7354 } 7355 inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + 7356 "Class"]("ui-datepicker-multi"); 7357 inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + 7358 "Class"]("ui-datepicker-rtl"); 7359 if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 7360 inst.input.focus(); 7361 } 7362 if( inst.yearshtml ){ 7363 origyearshtml = inst.yearshtml; 7364 setTimeout(function(){ 7365 if( origyearshtml === inst.yearshtml && inst.yearshtml ){ 7366 inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); 7367 } 7368 origyearshtml = inst.yearshtml = null; 7369 }, 0); 7370 } 7371 }, 7372 _shouldFocusInput: function( inst ) { 7373 return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 7374 }, 7375 _checkOffset: function(inst, offset, isFixed) { 7376 var dpWidth = inst.dpDiv.outerWidth(), 7377 dpHeight = inst.dpDiv.outerHeight(), 7378 inputWidth = inst.input ? inst.input.outerWidth() : 0, 7379 inputHeight = inst.input ? inst.input.outerHeight() : 0, 7380 viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), 7381 viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); 7382 offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); 7383 offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; 7384 offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; 7385 offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? 7386 Math.abs(offset.left + dpWidth - viewWidth) : 0); 7387 offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? 7388 Math.abs(dpHeight + inputHeight) : 0); 7389 return offset; 7390 }, 7391 _findPos: function(obj) { 7392 var position, 7393 inst = this._getInst(obj), 7394 isRTL = this._get(inst, "isRTL"); 7395 while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { 7396 obj = obj[isRTL ? "previousSibling" : "nextSibling"]; 7397 } 7398 position = $(obj).offset(); 7399 return [position.left, position.top]; 7400 }, 7401 _hideDatepicker: function(input) { 7402 var showAnim, duration, postProcess, onClose, 7403 inst = this._curInst; 7404 if (!inst || (input && inst !== $.data(input, PROP_NAME))) { 7405 return; 7406 } 7407 if (this._datepickerShowing) { 7408 showAnim = this._get(inst, "showAnim"); 7409 duration = this._get(inst, "duration"); 7410 postProcess = function() { 7411 $.datepicker._tidyDialog(inst); 7412 }; 7413 if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { 7414 inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); 7415 } else { 7416 inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : 7417 (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((null), postProcess); 7418 } 7419 clearTimeout(frozen_timeout); 7420 if (!showAnim) { 7421 postProcess(); 7422 } 7423 this._datepickerShowing = false;
vendor: 4,939 bytes, lines 7424-7571
7424 onClose = this._get(inst, "onClose"); 7425 if (onClose) { 7426 onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); 7427 } 7428 this._lastInput = null; 7429 if (this._inDialog) { 7430 this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); 7431 if ($.blockUI) { 7432 $.unblockUI(); 7433 $("body").append(this.dpDiv); 7434 } 7435 } 7436 this._inDialog = false; 7437 } 7438 }, 7439 _tidyDialog: function(inst) { 7440 inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); 7441 }, 7442 _checkExternalClick: function(event) { 7443 if (!$.datepicker._curInst) { 7444 return; 7445 } 7446 var $target = $(event.target), 7447 inst = $.datepicker._getInst($target[0]); 7448 if ( ( ( $target[0].id !== $.datepicker._mainDivId && 7449 $target.parents("#" + $.datepicker._mainDivId).length === 0 && 7450 !$target.hasClass($.datepicker.markerClassName) && 7451 !$target.closest("." + $.datepicker._triggerClass).length && 7452 $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || 7453 ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { 7454 $.datepicker._hideDatepicker(); 7455 } 7456 }, 7457 _adjustDate: function(id, offset, period) { 7458 var target = $(id), 7459 inst = this._getInst(target[0]); 7460 if (this._isDisabledDatepicker(target[0])) { 7461 return; 7462 } 7463 this._adjustInstDate(inst, offset + 7464 (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning 7465 period); 7466 this._updateDatepicker(inst); 7467 }, 7468 _gotoToday: function(id) { 7469 var date, 7470 target = $(id), 7471 inst = this._getInst(target[0]); 7472 if (this._get(inst, "gotoCurrent") && inst.currentDay) { 7473 inst.selectedDay = inst.currentDay; 7474 inst.drawMonth = inst.selectedMonth = inst.currentMonth; 7475 inst.drawYear = inst.selectedYear = inst.currentYear; 7476 } else { 7477 date = new Date(); 7478 inst.selectedDay = date.getDate(); 7479 inst.drawMonth = inst.selectedMonth = date.getMonth(); 7480 inst.drawYear = inst.selectedYear = date.getFullYear(); 7481 } 7482 this._notifyChange(inst); 7483 this._adjustDate(target); 7484 }, 7485 _selectMonthYear: function(id, select, period) { 7486 var target = $(id), 7487 inst = this._getInst(target[0]); 7488 inst["selected" + (period === "M" ? "Month" : "Year")] = 7489 inst["draw" + (period === "M" ? "Month" : "Year")] = 7490 parseInt(select.options[select.selectedIndex].value,10); 7491 this._notifyChange(inst); 7492 this._adjustDate(target); 7493 }, 7494 _selectDay: function(id, month, year, td) { 7495 var inst, 7496 target = $(id); 7497 if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { 7498 return; 7499 } 7500 inst = this._getInst(target[0]); 7501 inst.selectedDay = inst.currentDay = $("a", td).html(); 7502 inst.selectedMonth = inst.currentMonth = month; 7503 inst.selectedYear = inst.currentYear = year; 7504 this._selectDate(id, this._formatDate(inst, 7505 inst.currentDay, inst.currentMonth, inst.currentYear)); 7506 }, 7507 _clearDate: function(id) { 7508 var target = $(id); 7509 this._selectDate(target, ""); 7510 }, 7511 _selectDate: function(id, dateStr) { 7512 var onSelect, 7513 target = $(id), 7514 inst = this._getInst(target[0]); 7515 dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); 7516 if (inst.input) { 7517 inst.input.val(dateStr); 7518 } 7519 this._updateAlternate(inst); 7520 onSelect = this._get(inst, "onSelect"); 7521 if (onSelect) { 7522 onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); 7523 } else if (inst.input) { 7524 inst.input.trigger("change"); 7525 } 7526 if (inst.inline){ 7527 this._updateDatepicker(inst); 7528 } else { 7529 this._hideDatepicker(); 7530 this._lastInput = inst.input[0]; 7531 if (typeof(inst.input[0]) !== "object") { 7532 inst.input.focus(); 7533 } 7534 this._lastInput = null; 7535 } 7536 }, 7537 _updateAlternate: function(inst) { 7538 var altFormat, date, dateStr, 7539 altField = this._get(inst, "altField"); 7540 if (altField) { 7541 altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); 7542 date = this._getDate(inst); 7543 dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); 7544 $(altField).each(function() { $(this).val(dateStr); }); 7545 } 7546 }, 7547 noWeekends: function(date) { 7548 var day = date.getDay(); 7549 return [(day > 0 && day < 6), ""]; 7550 }, 7551 iso8601Week: function(date) { 7552 var time, 7553 checkDate = new Date(date.getTime()); 7554 checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); 7555 time = checkDate.getTime(); 7556 checkDate.setMonth(0); // Compare with Jan 1 7557 checkDate.setDate(1); 7558 return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; 7559 }, 7560 parseDate: function (format, value, settings) { 7561 if (format == null || value == null) { 7562 throw "Invalid arguments"; 7563 } 7564 value = (typeof value === "object" ? value.toString() : value + ""); 7565 if (value === "") { 7566 return null; 7567 } 7568 var iFormat, dim, extra, 7569 iValue = 0, 7570 shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, 7571 shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp
vendor: 5,115 bytes, lines 7571-7748
7571: 7572 new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), 7573 dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, 7574 dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, 7575 monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, 7576 monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, 7577 year = -1, 7578 month = -1, 7579 day = -1, 7580 doy = -1, 7581 literal = false, 7582 date, 7583 lookAhead = function(match) { 7584 var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 7585 if (matches) { 7586 iFormat++; 7587 } 7588 return matches; 7589 }, 7590 getNumber = function(match) { 7591 var isDoubled = lookAhead(match), 7592 size = (match === "@" ? 14 : (match === "!" ? 20 : 7593 (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), 7594 digits = new RegExp("^\\d{1," + size + "}"), 7595 num = value.substring(iValue).match(digits); 7596 if (!num) { 7597 throw "Missing number at position " + iValue; 7598 } 7599 iValue += num[0].length; 7600 return parseInt(num[0], 10); 7601 }, 7602 getName = function(match, shortNames, longNames) { 7603 var index = -1, 7604 names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { 7605 return [ [k, v] ]; 7606 }).sort(function (a, b) { 7607 return -(a[1].length - b[1].length); 7608 }); 7609 $.each(names, function (i, pair) { 7610 var name = pair[1]; 7611 if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { 7612 index = pair[0]; 7613 iValue += name.length; 7614 return false; 7615 } 7616 }); 7617 if (index !== -1) { 7618 return index + 1; 7619 } else { 7620 throw "Unknown name at position " + iValue; 7621 } 7622 }, 7623 checkLiteral = function() { 7624 if (value.charAt(iValue) !== format.charAt(iFormat)) { 7625 throw "Unexpected literal at position " + iValue; 7626 } 7627 iValue++; 7628 }; 7629 for (iFormat = 0; iFormat < format.length; iFormat++) { 7630 if (literal) { 7631 if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 7632 literal = false; 7633 } else { 7634 checkLiteral(); 7635 } 7636 } else { 7637 switch (format.charAt(iFormat)) { 7638 case "d": 7639 day = getNumber("d"); 7640 break; 7641 case "D": 7642 getName("D", dayNamesShort, dayNames); 7643 break; 7644 case "o": 7645 doy = getNumber("o"); 7646 break; 7647 case "m": 7648 month = getNumber("m"); 7649 break; 7650 case "M": 7651 month = getName("M", monthNamesShort, monthNames); 7652 break; 7653 case "y": 7654 year = getNumber("y"); 7655 break; 7656 case "@": 7657 date = new Date(getNumber("@")); 7658 year = date.getFullYear(); 7659 month = date.getMonth() + 1; 7660 day = date.getDate(); 7661 break; 7662 case "!": 7663 date = new Date((getNumber("!") - this._ticksTo1970) / 10000); 7664 year = date.getFullYear(); 7665 month = date.getMonth() + 1; 7666 day = date.getDate(); 7667 break; 7668 case "'": 7669 if (lookAhead("'")){ 7670 checkLiteral(); 7671 } else { 7672 literal = true; 7673 } 7674 break; 7675 default: 7676 checkLiteral(); 7677 } 7678 } 7679 } 7680 if (iValue < value.length){ 7681 extra = value.substr(iValue); 7682 if (!/^\s+/.test(extra)) { 7683 throw "Extra/unparsed characters found in date: " + extra; 7684 } 7685 } 7686 if (year === -1) { 7687 year = new Date().getFullYear(); 7688 } else if (year < 100) { 7689 year += new Date().getFullYear() - new Date().getFullYear() % 100 + 7690 (year <= shortYearCutoff ? 0 : -100); 7691 } 7692 if (doy > -1) { 7693 month = 1; 7694 day = doy; 7695 do { 7696 dim = this._getDaysInMonth(year, month - 1); 7697 if (day <= dim) { 7698 break; 7699 } 7700 month++; 7701 day -= dim; 7702 } while (true); 7703 } 7704 date = this._daylightSavingAdjust(new Date(year, month - 1, day)); 7705 if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { 7706 throw "Invalid date"; // E.g. 31/02/00 7707 } 7708 return date; 7709 }, 7710 ATOM: "yy-mm-dd", 7711 COOKIE: "D, dd M yy", 7712 ISO_8601: "yy-mm-dd", 7713 RFC_822: "D, d M y", 7714 RFC_850: "DD, dd-M-y", 7715 RFC_1036: "D, d M y", 7716 RFC_1123: "D, d M yy", 7717 RFC_2822: "D, d M yy", 7718 RSS: "D, d M y", 7719 TICKS: "!", 7720 TIMESTAMP: "@", 7721 W3C: "yy-mm-dd", 7722 _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + 7723 Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), 7724 formatDate: function (format, date, settings) { 7725 if (!date) { 7726 return ""; 7727 } 7728 var iFormat, 7729 dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, 7730 dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, 7731 monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, 7732 monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, 7733 lookAhead = function(match) { 7734 var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 7735 if (matches) { 7736 iFormat++; 7737 } 7738 return matches; 7739 }, 7740 formatNumber = function(match, value, len) { 7741 var num = "" + value; 7742 if (lookAhead(match)) { 7743 while (num.length < len) { 7744 num = "0" + num; 7745 } 7746 } 7747 return num; 7748 },
vendor: 8,713 bytes, lines 7749-8006
7749 formatName = function(match, value, shortNames, longNames) { 7750 return (lookAhead(match) ? longNames[value] : shortNames[value]); 7751 }, 7752 output = "", 7753 literal = false; 7754 if (date) { 7755 for (iFormat = 0; iFormat < format.length; iFormat++) { 7756 if (literal) { 7757 if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 7758 literal = false; 7759 } else { 7760 output += format.charAt(iFormat); 7761 } 7762 } else { 7763 switch (format.charAt(iFormat)) { 7764 case "d": 7765 output += formatNumber("d", date.getDate(), 2); 7766 break; 7767 case "D": 7768 output += formatName("D", date.getDay(), dayNamesShort, dayNames); 7769 break; 7770 case "o": 7771 output += formatNumber("o", 7772 Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); 7773 break; 7774 case "m": 7775 output += formatNumber("m", date.getMonth() + 1, 2); 7776 break; 7777 case "M": 7778 output += formatName("M", date.getMonth(), monthNamesShort, monthNames); 7779 break; 7780 case "y": 7781 output += (lookAhead("y") ? date.getFullYear() : 7782 (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); 7783 break; 7784 case "@": 7785 output += date.getTime(); 7786 break; 7787 case "!": 7788 output += date.getTime() * 10000 + this._ticksTo1970; 7789 break; 7790 case "'": 7791 if (lookAhead("'")) { 7792 output += "'"; 7793 } else { 7794 literal = true; 7795 } 7796 break; 7797 default: 7798 output += format.charAt(iFormat); 7799 } 7800 } 7801 } 7802 } 7803 return output; 7804 }, 7805 _possibleChars: function (format) { 7806 var iFormat, 7807 chars = "", 7808 literal = false, 7809 lookAhead = function(match) { 7810 var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 7811 if (matches) { 7812 iFormat++; 7813 } 7814 return matches; 7815 }; 7816 for (iFormat = 0; iFormat < format.length; iFormat++) { 7817 if (literal) { 7818 if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 7819 literal = false; 7820 } else { 7821 chars += format.charAt(iFormat); 7822 } 7823 } else { 7824 switch (format.charAt(iFormat)) { 7825 case "d": case "m": case "y": case "@": 7826 chars += "0123456789"; 7827 break; 7828 case "D": case "M": 7829 return null; // Accept anything 7830 case "'": 7831 if (lookAhead("'")) { 7832 chars += "'"; 7833 } else { 7834 literal = true; 7835 } 7836 break; 7837 default: 7838 chars += format.charAt(iFormat); 7839 } 7840 } 7841 } 7842 return chars; 7843 }, 7844 _get: function(inst, name) { 7845 return inst.settings[name] !== undefined ? 7846 inst.settings[name] : this._defaults[name]; 7847 }, 7848 _setDateFromField: function(inst, noDefault) { 7849 if (inst.input.val() === inst.lastVal) { 7850 return; 7851 } 7852 var dateFormat = this._get(inst, "dateFormat"), 7853 dates = inst.lastVal = inst.input ? inst.input.val() : null, 7854 defaultDate = this._getDefaultDate(inst), 7855 date = defaultDate, 7856 settings = this._getFormatConfig(inst); 7857 try { 7858 date = this.parseDate(dateFormat, dates, settings) || defaultDate; 7859 } catch (event) { 7860 dates = (noDefault ? "" : dates); 7861 } 7862 inst.selectedDay = date.getDate(); 7863 inst.drawMonth = inst.selectedMonth = date.getMonth(); 7864 inst.drawYear = inst.selectedYear = date.getFullYear(); 7865 inst.currentDay = (dates ? date.getDate() : 0); 7866 inst.currentMonth = (dates ? date.getMonth() : 0); 7867 inst.currentYear = (dates ? date.getFullYear() : 0); 7868 this._adjustInstDate(inst); 7869 }, 7870 _getDefaultDate: function(inst) { 7871 return this._restrictMinMax(inst, 7872 this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); 7873 }, 7874 _determineDate: function(inst, date, defaultDate) { 7875 var offsetNumeric = function(offset) { 7876 var date = new Date(); 7877 date.setDate(date.getDate() + offset); 7878 return date; 7879 }, 7880 offsetString = function(offset) { 7881 try { 7882 return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), 7883 offset, $.datepicker._getFormatConfig(inst)); 7884 } 7885 catch (e) { 7886 } 7887 var date = (offset.toLowerCase().match(/^c/) ? 7888 $.datepicker._getDate(inst) : null) || new Date(), 7889 year = date.getFullYear(), 7890 month = date.getMonth(), 7891 day = date.getDate(), 7892 pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, 7893 matches = pattern.exec(offset); 7894 while (matches) { 7895 switch (matches[2] || "d") { 7896 case "d" : case "D" : 7897 day += parseInt(matches[1],10); break; 7898 case "w" : case "W" : 7899 day += parseInt(matches[1],10) * 7; break; 7900 case "m" : case "M" : 7901 month += parseInt(matches[1],10); 7902 day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); 7903 break; 7904 case "y": case "Y" : 7905 year += parseInt(matches[1],10); 7906 day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); 7907 break; 7908 } 7909 matches = pattern.exec(offset); 7910 } 7911 return new Date(year, month, day); 7912 }, 7913 newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : 7914 (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); 7915 newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); 7916 if (newDate) { 7917 newDate.setHours(0); 7918 newDate.setMinutes(0); 7919 newDate.setSeconds(0); 7920 newDate.setMilliseconds(0); 7921 } 7922 return this._daylightSavingAdjust(newDate); 7923 }, 7924 _daylightSavingAdjust: function(date) { 7925 if (!date) { 7926 return null; 7927 } 7928 date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); 7929 return date; 7930 }, 7931 _setDate: function(inst, date, noChange) { 7932 var clear = !date, 7933 origMonth = inst.selectedMonth, 7934 origYear = inst.selectedYear, 7935 newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); 7936 inst.selectedDay = inst.currentDay = newDate.getDate(); 7937 inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); 7938 inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); 7939 if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { 7940 this._notifyChange(inst); 7941 } 7942 this._adjustInstDate(inst); 7943 if (inst.input) { 7944 inst.input.val(clear ? "" : this._formatDate(inst)); 7945 } 7946 }, 7947 _getDate: function(inst) { 7948 var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : 7949 this._daylightSavingAdjust(new Date( 7950 inst.currentYear, inst.currentMonth, inst.currentDay))); 7951 return startDate; 7952 }, 7953 _attachHandlers: function(inst) { 7954 var stepMonths = this._get(inst, "stepMonths"), 7955 id = "#" + inst.id.replace( /\\\\/g, "\\" ); 7956 inst.dpDiv.find("[data-handler]").map(function () { 7957 var handler = { 7958 prev: function () { 7959 $.datepicker._adjustDate(id, -stepMonths, "M"); 7960 }, 7961 next: function () { 7962 $.datepicker._adjustDate(id, +stepMonths, "M"); 7963 }, 7964 hide: function () { 7965 $.datepicker._hideDatepicker(); 7966 }, 7967 today: function () { 7968 $.datepicker._gotoToday(id); 7969 }, 7970 selectDay: function () { 7971 $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); 7972 return false; 7973 }, 7974 selectMonth: function () { 7975 $.datepicker._selectMonthYear(id, this, "M"); 7976 return false; 7977 }, 7978 selectYear: function () { 7979 $.datepicker._selectMonthYear(id, this, "Y"); 7980 return false; 7981 } 7982 }; 7983 $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); 7984 }); 7985 }, 7986 _generateHTML: function(inst) { 7987 var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, 7988 controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, 7989 monthNames, monthNamesShort, beforeShowDay, showOtherMonths, 7990 selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, 7991 cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, 7992 printDate, dRow, tbody, daySettings, otherMonth, unselectable, 7993 tempDate = new Date(), 7994 today = this._daylightSavingAdjust( 7995 new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time 7996 isRTL = this._get(inst, "isRTL"), 7997 showButtonPanel = this._get(inst, "showButtonPanel"), 7998 hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), 7999 navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), 8000 numMonths = this._getNumberOfMonths(inst), 8001 showCurrentAtPos = this._get(inst, "showCurrentAtPos"), 8002 stepMonths = this._get(inst, "stepMonths"), 8003 isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), 8004 currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : 8005 new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), 8006 minDate = this._getMinMaxDate(inst, "min"),
vendor: 33,347 bytes, lines 8007-8954
8007 maxDate = this._getMinMaxDate(inst, "max"), 8008 drawMonth = inst.drawMonth - showCurrentAtPos, 8009 drawYear = inst.drawYear; 8010 8011 if (drawMonth < 0) { 8012 drawMonth += 12; 8013 drawYear--; 8014 } 8015 if (maxDate) { 8016 maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), 8017 maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); 8018 maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); 8019 while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { 8020 drawMonth--; 8021 if (drawMonth < 0) { 8022 drawMonth = 11; 8023 drawYear--; 8024 } 8025 } 8026 } 8027 inst.drawMonth = drawMonth; 8028 inst.drawYear = drawYear; 8029 prevText = this._get(inst, "prevText"); 8030 prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, 8031 this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), 8032 this._getFormatConfig(inst))); 8033 prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? 8034 "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + 8035 " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" : 8036 (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>")); 8037 nextText = this._get(inst, "nextText"); 8038 nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, 8039 this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), 8040 this._getFormatConfig(inst))); 8041 next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? 8042 "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + 8043 " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" : 8044 (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>")); 8045 currentText = this._get(inst, "currentText"); 8046 gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); 8047 currentText = (!navigationAsDateFormat ? currentText : 8048 this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); 8049 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'>" + 8050 this._get(inst, "closeText") + "</button>" : ""); 8051 buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") + 8052 (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'" + 8053 ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : ""; 8054 firstDay = parseInt(this._get(inst, "firstDay"),10); 8055 firstDay = (isNaN(firstDay) ? 0 : firstDay); 8056 showWeek = this._get(inst, "showWeek"); 8057 dayNames = this._get(inst, "dayNames"); 8058 dayNamesMin = this._get(inst, "dayNamesMin"); 8059 monthNames = this._get(inst, "monthNames"); 8060 monthNamesShort = this._get(inst, "monthNamesShort"); 8061 beforeShowDay = this._get(inst, "beforeShowDay"); 8062 showOtherMonths = this._get(inst, "showOtherMonths"); 8063 selectOtherMonths = this._get(inst, "selectOtherMonths"); 8064 defaultDate = this._getDefaultDate(inst); 8065 html = ""; 8066 dow; 8067 for (row = 0; row < numMonths[0]; row++) { 8068 group = ""; 8069 this.maxRows = 4; 8070 for (col = 0; col < numMonths[1]; col++) { 8071 selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); 8072 cornerClass = " ui-corner-all"; 8073 calender = ""; 8074 if (isMultiMonth) { 8075 calender += "<div class='ui-datepicker-group"; 8076 if (numMonths[1] > 1) { 8077 switch (col) { 8078 case 0: calender += " ui-datepicker-group-first"; 8079 cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break; 8080 case numMonths[1]-1: calender += " ui-datepicker-group-last"; 8081 cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break; 8082 default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; 8083 } 8084 } 8085 calender += "'>"; 8086 } 8087 calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + 8088 (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + 8089 (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + 8090 this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, 8091 row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers 8092 "</div><table class='ui-datepicker-calendar'><caption style='display:none;'>Calendar</caption><thead>" + 8093 "<tr>"; 8094 thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : ""); 8095 for (dow = 0; dow < 7; dow++) { // days of the week 8096 day = (dow + firstDay) % 7; 8097 thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + 8098 "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>"; 8099 } 8100 calender += thead + "</tr></thead><tbody>"; 8101 daysInMonth = this._getDaysInMonth(drawYear, drawMonth); 8102 if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { 8103 inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); 8104 } 8105 leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; 8106 curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate 8107 numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) 8108 this.maxRows = numRows; 8109 printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); 8110 for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows 8111 calender += "<tr>"; 8112 tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" + 8113 this._get(inst, "calculateWeek")(printDate) + "</td>"); 8114 for (dow = 0; dow < 7; dow++) { // create date picker days 8115 daySettings = (beforeShowDay ? 8116 beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); 8117 otherMonth = (printDate.getMonth() !== drawMonth); 8118 unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || 8119 (minDate && printDate < minDate) || (maxDate && printDate > maxDate); 8120 tbody += "<td class='" + 8121 ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends 8122 (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months 8123 ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key 8124 (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ? 8125 // or defaultDate is current printedDate and defaultDate is selectedDate 8126 " " + this._dayOverClass : "") + // highlight selected day 8127 (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days 8128 (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates 8129 (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day 8130 (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different) 8131 ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title 8132 (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions 8133 (otherMonth && !showOtherMonths ? " " : // display for other months 8134 (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + 8135 (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") + 8136 (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day 8137 (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months 8138 "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date 8139 printDate.setDate(printDate.getDate() + 1); 8140 printDate = this._daylightSavingAdjust(printDate); 8141 } 8142 calender += tbody + "</tr>"; 8143 } 8144 drawMonth++; 8145 if (drawMonth > 11) { 8146 drawMonth = 0; 8147 drawYear++; 8148 } 8149 calender += "</tbody></table>" + (isMultiMonth ? "</div>" + 8150 ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : ""); 8151 group += calender; 8152 } 8153 html += group; 8154 } 8155 html += buttonPanel; 8156 inst._keyEvent = false; 8157 return html; 8158 }, 8159 _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, 8160 secondary, monthNames, monthNamesShort) { 8161 var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, 8162 changeMonth = this._get(inst, "changeMonth"), 8163 changeYear = this._get(inst, "changeYear"), 8164 showMonthAfterYear = this._get(inst, "showMonthAfterYear"), 8165 html = "<div class='ui-datepicker-title'>", 8166 monthHtml = ""; 8167 if (secondary || !changeMonth) { 8168 monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>"; 8169 } else { 8170 inMinYear = (minDate && minDate.getFullYear() === drawYear); 8171 inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); 8172 monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; 8173 for ( month = 0; month < 12; month++) { 8174 if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) { 8175 monthHtml += "<option value='" + month + "'" + 8176 (month === drawMonth ? " selected='selected'" : "") + 8177 ">" + monthNamesShort[month] + "</option>"; 8178 } 8179 } 8180 monthHtml += "</select>"; 8181 } 8182 if (!showMonthAfterYear) { 8183 html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); 8184 } 8185 if ( !inst.yearshtml ) { 8186 inst.yearshtml = ""; 8187 if (secondary || !changeYear) { 8188 html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; 8189 } else { 8190 years = this._get(inst, "yearRange").split(":"); 8191 thisYear = new Date().getFullYear(); 8192 determineYear = function(value) { 8193 var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : 8194 (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : 8195 parseInt(value, 10))); 8196 return (isNaN(year) ? thisYear : year); 8197 }; 8198 year = determineYear(years[0]); 8199 endYear = Math.max(year, determineYear(years[1] || "")); 8200 year = (minDate ? Math.max(year, minDate.getFullYear()) : year); 8201 endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); 8202 inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; 8203 for (; year <= endYear; year++) { 8204 inst.yearshtml += "<option value='" + year + "'" + 8205 (year === drawYear ? " selected='selected'" : "") + 8206 ">" + year + "</option>"; 8207 } 8208 inst.yearshtml += "</select>"; 8209 8210 html += inst.yearshtml; 8211 inst.yearshtml = null; 8212 } 8213 } 8214 html += this._get(inst, "yearSuffix"); 8215 if (showMonthAfterYear) { 8216 html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; 8217 } 8218 html += "</div>"; // Close datepicker_header 8219 return html; 8220 }, 8221 _adjustInstDate: function(inst, offset, period) { 8222 var year = inst.drawYear + (period === "Y" ? offset : 0), 8223 month = inst.drawMonth + (period === "M" ? offset : 0), 8224 day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), 8225 date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); 8226 inst.selectedDay = date.getDate(); 8227 inst.drawMonth = inst.selectedMonth = date.getMonth(); 8228 inst.drawYear = inst.selectedYear = date.getFullYear(); 8229 if (period === "M" || period === "Y") { 8230 this._notifyChange(inst); 8231 } 8232 }, 8233 _restrictMinMax: function(inst, date) { 8234 var minDate = this._getMinMaxDate(inst, "min"), 8235 maxDate = this._getMinMaxDate(inst, "max"), 8236 newDate = (minDate && date < minDate ? minDate : date); 8237 return (maxDate && newDate > maxDate ? maxDate : newDate); 8238 }, 8239 _notifyChange: function(inst) { 8240 var onChange = this._get(inst, "onChangeMonthYear"); 8241 if (onChange) { 8242 onChange.apply((inst.input ? inst.input[0] : null), 8243 [inst.selectedYear, inst.selectedMonth + 1, inst]); 8244 } 8245 }, 8246 _getNumberOfMonths: function(inst) { 8247 var numMonths = this._get(inst, "numberOfMonths"); 8248 return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); 8249 }, 8250 _getMinMaxDate: function(inst, minMax) { 8251 return this._determineDate(inst, this._get(inst, minMax + "Date"), null); 8252 }, 8253 _getDaysInMonth: function(year, month) { 8254 return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); 8255 }, 8256 _getFirstDayOfMonth: function(year, month) { 8257 return new Date(year, month, 1).getDay(); 8258 }, 8259 _canAdjustMonth: function(inst, offset, curYear, curMonth) { 8260 var numMonths = this._getNumberOfMonths(inst), 8261 date = this._daylightSavingAdjust(new Date(curYear, 8262 curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); 8263 8264 if (offset < 0) { 8265 date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); 8266 } 8267 return this._isInRange(inst, date); 8268 }, 8269 _isInRange: function(inst, date) { 8270 var yearSplit, currentYear, 8271 minDate = this._getMinMaxDate(inst, "min"), 8272 maxDate = this._getMinMaxDate(inst, "max"), 8273 minYear = null, 8274 maxYear = null, 8275 years = this._get(inst, "yearRange"); 8276 if (years){ 8277 yearSplit = years.split(":"); 8278 currentYear = new Date().getFullYear(); 8279 minYear = parseInt(yearSplit[0], 10); 8280 maxYear = parseInt(yearSplit[1], 10); 8281 if ( yearSplit[0].match(/[+\-].*/) ) { 8282 minYear += currentYear; 8283 } 8284 if ( yearSplit[1].match(/[+\-].*/) ) { 8285 maxYear += currentYear; 8286 } 8287 } 8288 return ((!minDate || date.getTime() >= minDate.getTime()) && 8289 (!maxDate || date.getTime() <= maxDate.getTime()) && 8290 (!minYear || date.getFullYear() >= minYear) && 8291 (!maxYear || date.getFullYear() <= maxYear)); 8292 }, 8293 _getFormatConfig: function(inst) { 8294 var shortYearCutoff = this._get(inst, "shortYearCutoff"); 8295 shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : 8296 new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); 8297 return {shortYearCutoff: shortYearCutoff, 8298 dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), 8299 monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; 8300 }, 8301 _formatDate: function(inst, day, month, year) { 8302 if (!day) { 8303 inst.currentDay = inst.selectedDay; 8304 inst.currentMonth = inst.selectedMonth; 8305 inst.currentYear = inst.selectedYear; 8306 } 8307 var date = (day ? (typeof day === "object" ? day : 8308 this._daylightSavingAdjust(new Date(year, month, day))) : 8309 this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); 8310 return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); 8311 } 8312}); 8313function bindHover(dpDiv) { 8314 var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 8315 return dpDiv.delegate(selector, "mouseout", function() { 8316 $(this).removeClass("ui-state-hover"); 8317 if (this.className.indexOf("ui-datepicker-prev") !== -1) { 8318 $(this).removeClass("ui-datepicker-prev-hover"); 8319 } 8320 if (this.className.indexOf("ui-datepicker-next") !== -1) { 8321 $(this).removeClass("ui-datepicker-next-hover"); 8322 } 8323 }) 8324 .delegate(selector, "mouseover", function(){ 8325 if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { 8326 $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); 8327 $(this).addClass("ui-state-hover"); 8328 if (this.className.indexOf("ui-datepicker-prev") !== -1) { 8329 $(this).addClass("ui-datepicker-prev-hover"); 8330 } 8331 if (this.className.indexOf("ui-datepicker-next") !== -1) { 8332 $(this).addClass("ui-datepicker-next-hover"); 8333 } 8334 } 8335 }); 8336} 8337function extendRemove(target, props) { 8338 $.extend(target, props); 8339 for (var name in props) { 8340 if (props[name] == null) { 8341 target[name] = props[name]; 8342 } 8343 } 8344 return target; 8345} 8346$.fn.datepicker = function(options){ 8347 if ( !this.length ) { 8348 return this; 8349 } 8350 if (!$.datepicker.initialized) { 8351 $(document).mousedown($.datepicker._checkExternalClick); 8352 $.datepicker.initialized = true; 8353 } 8354 if ($("#"+$.datepicker._mainDivId).length === 0) { 8355 $("body").append($.datepicker.dpDiv); 8356 } 8357 var otherArgs = Array.prototype.slice.call(arguments, 1); 8358 if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { 8359 return $.datepicker["_" + options + "Datepicker"]. 8360 apply($.datepicker, [this[0]].concat(otherArgs)); 8361 } 8362 if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { 8363 return $.datepicker["_" + options + "Datepicker"]. 8364 apply($.datepicker, [this[0]].concat(otherArgs)); 8365 } 8366 return this.each(function() { 8367 typeof options === "string" ? 8368 $.datepicker["_" + options + "Datepicker"]. 8369 apply($.datepicker, [this].concat(otherArgs)) : 8370 $.datepicker._attachDatepicker(this, options); 8371 }); 8372}; 8373$.datepicker = new Datepicker(); 8374$.datepicker.initialized = false; 8375$.datepicker.uuid = new Date().getTime(); 8376$.datepicker.version = "1.10.4"; 8377})(jQuery); 8378(function( $, undefined ) { 8379var sizeRelatedOptions = { 8380 buttons: true, 8381 height: true, 8382 maxHeight: true, 8383 maxWidth: true, 8384 minHeight: true, 8385 minWidth: true, 8386 width: true 8387 }, 8388 resizableRelatedOptions = { 8389 maxHeight: true, 8390 maxWidth: true, 8391 minHeight: true, 8392 minWidth: true 8393 }; 8394$.widget( "ui.dialog", { 8395 version: "1.10.4", 8396 options: { 8397 appendTo: "body", 8398 autoOpen: true, 8399 buttons: [], 8400 closeOnEscape: true, 8401 closeText: "close", 8402 dialogClass: "", 8403 draggable: true, 8404 hide: null, 8405 height: "auto", 8406 maxHeight: null, 8407 maxWidth: null, 8408 minHeight: 150, 8409 minWidth: 150, 8410 modal: false, 8411 position: { 8412 my: "center", 8413 at: "center", 8414 of: window, 8415 collision: "fit", 8416 using: function( pos ) { 8417 var topOffset = $( this ).css( pos ).offset().top; 8418 if ( topOffset < 0 ) { 8419 $( this ).css( "top", pos.top - topOffset ); 8420 } 8421 } 8422 }, 8423 resizable: true, 8424 show: null, 8425 title: null, 8426 width: 300, 8427 beforeClose: null, 8428 close: null, 8429 drag: null, 8430 dragStart: null, 8431 dragStop: null, 8432 focus: null, 8433 open: null, 8434 resize: null, 8435 resizeStart: null, 8436 resizeStop: null 8437 }, 8438 _create: function() { 8439 this.originalCss = { 8440 display: this.element[0].style.display, 8441 width: this.element[0].style.width, 8442 minHeight: this.element[0].style.minHeight, 8443 maxHeight: this.element[0].style.maxHeight, 8444 height: this.element[0].style.height 8445 }; 8446 this.originalPosition = { 8447 parent: this.element.parent(), 8448 index: this.element.parent().children().index( this.element ) 8449 }; 8450 this.originalTitle = this.element.attr("title"); 8451 this.options.title = this.options.title || this.originalTitle; 8452 this._createWrapper(); 8453 this.element 8454 .show() 8455 .removeAttr("title") 8456 .addClass("ui-dialog-content ui-widget-content") 8457 .appendTo( this.uiDialog ); 8458 this._createTitlebar(); 8459 this._createButtonPane(); 8460 if ( this.options.draggable && $.fn.draggable ) { 8461 this._makeDraggable(); 8462 } 8463 if ( this.options.resizable && $.fn.resizable ) { 8464 this._makeResizable(); 8465 } 8466 this._isOpen = false; 8467 }, 8468 _init: function() { 8469 if ( this.options.autoOpen ) { 8470 this.open(); 8471 } 8472 }, 8473 _appendTo: function() { 8474 var element = this.options.appendTo; 8475 if ( element && (element.jquery || element.nodeType) ) { 8476 return $( element ); 8477 } 8478 return this.document.find( element || "body" ).eq( 0 ); 8479 }, 8480 _destroy: function() { 8481 var next, 8482 originalPosition = this.originalPosition; 8483 this._destroyOverlay(); 8484 this.element 8485 .removeUniqueId() 8486 .removeClass("ui-dialog-content ui-widget-content") 8487 .css( this.originalCss ) 8488 .detach(); 8489 this.uiDialog.stop( true, true ).remove(); 8490 if ( this.originalTitle ) { 8491 this.element.attr( "title", this.originalTitle ); 8492 } 8493 next = originalPosition.parent.children().eq( originalPosition.index ); 8494 if ( next.length && next[0] !== this.element[0] ) { 8495 next.before( this.element ); 8496 } else { 8497 originalPosition.parent.append( this.element ); 8498 } 8499 }, 8500 widget: function() { 8501 return this.uiDialog; 8502 }, 8503 disable: $.noop, 8504 enable: $.noop, 8505 close: function( event ) { 8506 var activeElement, 8507 that = this; 8508 if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { 8509 return; 8510 } 8511 this._isOpen = false; 8512 this._destroyOverlay(); 8513 if ( !this.opener.filter(":focusable").focus().length ) { 8514 try { 8515 activeElement = this.document[ 0 ].activeElement; 8516 if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) { 8517 $( activeElement ).blur(); 8518 } 8519 } catch ( error ) {} 8520 } 8521 this._hide( this.uiDialog, this.options.hide, function() { 8522 that._trigger( "close", event ); 8523 }); 8524 }, 8525 isOpen: function() { 8526 return this._isOpen; 8527 }, 8528 moveToTop: function() { 8529 this._moveToTop(); 8530 }, 8531 _moveToTop: function( event, silent ) { 8532 var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length; 8533 if ( moved && !silent ) { 8534 this._trigger( "focus", event ); 8535 } 8536 return moved; 8537 }, 8538 open: function() { 8539 var that = this; 8540 if ( this._isOpen ) { 8541 if ( this._moveToTop() ) { 8542 this._focusTabbable(); 8543 } 8544 return; 8545 } 8546 this._isOpen = true; 8547 this.opener = $( this.document[0].activeElement ); 8548 this._size(); 8549 this._position(); 8550 this._createOverlay(); 8551 this._moveToTop( null, true ); 8552 this._show( this.uiDialog, this.options.show, function() { 8553 that._focusTabbable(); 8554 that._trigger("focus"); 8555 }); 8556 this._trigger("open"); 8557 }, 8558 _focusTabbable: function() { 8559 var hasFocus = this.element.find("[autofocus]"); 8560 if ( !hasFocus.length ) { 8561 hasFocus = this.element.find(":tabbable"); 8562 } 8563 if ( !hasFocus.length ) { 8564 hasFocus = this.uiDialogButtonPane.find(":tabbable"); 8565 } 8566 if ( !hasFocus.length ) { 8567 hasFocus = this.uiDialogTitlebarClose.filter(":tabbable"); 8568 } 8569 if ( !hasFocus.length ) { 8570 hasFocus = this.uiDialog; 8571 } 8572 hasFocus.eq( 0 ).focus(); 8573 }, 8574 _keepFocus: function( event ) { 8575 function checkFocus() { 8576 var activeElement = this.document[0].activeElement, 8577 isActive = this.uiDialog[0] === activeElement || 8578 $.contains( this.uiDialog[0], activeElement ); 8579 if ( !isActive ) { 8580 this._focusTabbable(); 8581 } 8582 } 8583 event.preventDefault(); 8584 checkFocus.call( this ); 8585 this._delay( checkFocus ); 8586 }, 8587 _createWrapper: function() { 8588 this.uiDialog = $("<div>") 8589 .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + 8590 this.options.dialogClass ) 8591 .hide() 8592 .attr({ 8593 tabIndex: -1, 8594 role: "dialog" 8595 }) 8596 .appendTo( this._appendTo() ); 8597 this._on( this.uiDialog, { 8598 keydown: function( event ) { 8599 if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 8600 event.keyCode === $.ui.keyCode.ESCAPE ) { 8601 event.preventDefault(); 8602 this.close( event ); 8603 return; 8604 } 8605 if ( event.keyCode !== $.ui.keyCode.TAB ) { 8606 return; 8607 } 8608 var tabbables = this.uiDialog.find(":tabbable"), 8609 first = tabbables.filter(":first"), 8610 last = tabbables.filter(":last"); 8611 if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) { 8612 first.focus( 1 ); 8613 event.preventDefault(); 8614 } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) { 8615 last.focus( 1 ); 8616 event.preventDefault(); 8617 } 8618 }, 8619 mousedown: function( event ) { 8620 if ( this._moveToTop( event ) ) { 8621 this._focusTabbable(); 8622 } 8623 } 8624 }); 8625 if ( !this.element.find("[aria-describedby]").length ) { 8626 this.uiDialog.attr({ 8627 "aria-describedby": this.element.uniqueId().attr("id") 8628 }); 8629 } 8630 }, 8631 _createTitlebar: function() { 8632 var uiDialogTitle; 8633 this.uiDialogTitlebar = $("<div>") 8634 .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix") 8635 .prependTo( this.uiDialog ); 8636 this._on( this.uiDialogTitlebar, { 8637 mousedown: function( event ) { 8638 if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) { 8639 this.uiDialog.focus(); 8640 } 8641 } 8642 }); 8643 this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) 8644 .button({ 8645 label: this.options.closeText, 8646 icons: { 8647 primary: "ui-icon-closethick" 8648 }, 8649 text: false 8650 }) 8651 .addClass("ui-dialog-titlebar-close") 8652 .appendTo( this.uiDialogTitlebar ); 8653 this._on( this.uiDialogTitlebarClose, { 8654 click: function( event ) { 8655 event.preventDefault(); 8656 this.close( event ); 8657 } 8658 }); 8659 uiDialogTitle = $("<span>") 8660 .uniqueId() 8661 .addClass("ui-dialog-title") 8662 .prependTo( this.uiDialogTitlebar ); 8663 this._title( uiDialogTitle ); 8664 this.uiDialog.attr({ 8665 "aria-labelledby": uiDialogTitle.attr("id") 8666 }); 8667 }, 8668 _title: function( title ) { 8669 if ( !this.options.title ) { 8670 title.html(" "); 8671 } 8672 title.text( this.options.title ); 8673 }, 8674 _createButtonPane: function() { 8675 this.uiDialogButtonPane = $("<div>") 8676 .addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"); 8677 this.uiButtonSet = $("<div>") 8678 .addClass("ui-dialog-buttonset") 8679 .appendTo( this.uiDialogButtonPane ); 8680 this._createButtons(); 8681 }, 8682 _createButtons: function() { 8683 var that = this, 8684 buttons = this.options.buttons; 8685 this.uiDialogButtonPane.remove(); 8686 this.uiButtonSet.empty(); 8687 if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) { 8688 this.uiDialog.removeClass("ui-dialog-buttons"); 8689 return; 8690 } 8691 $.each( buttons, function( name, props ) { 8692 var click, buttonOptions; 8693 props = $.isFunction( props ) ? 8694 { click: props, text: name } : 8695 props; 8696 props = $.extend( { type: "button" }, props ); 8697 click = props.click; 8698 props.click = function() { 8699 click.apply( that.element[0], arguments ); 8700 }; 8701 buttonOptions = { 8702 icons: props.icons, 8703 text: props.showText 8704 }; 8705 delete props.icons; 8706 delete props.showText; 8707 $( "<button></button>", props ) 8708 .button( buttonOptions ) 8709 .appendTo( that.uiButtonSet ); 8710 }); 8711 this.uiDialog.addClass("ui-dialog-buttons"); 8712 this.uiDialogButtonPane.appendTo( this.uiDialog ); 8713 }, 8714 _makeDraggable: function() { 8715 var that = this, 8716 options = this.options; 8717 function filteredUi( ui ) { 8718 return { 8719 position: ui.position, 8720 offset: ui.offset 8721 }; 8722 } 8723 this.uiDialog.draggable({ 8724 cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", 8725 handle: ".ui-dialog-titlebar", 8726 containment: "document", 8727 start: function( event, ui ) { 8728 $( this ).addClass("ui-dialog-dragging"); 8729 that._blockFrames(); 8730 that._trigger( "dragStart", event, filteredUi( ui ) ); 8731 }, 8732 drag: function( event, ui ) { 8733 that._trigger( "drag", event, filteredUi( ui ) ); 8734 }, 8735 stop: function( event, ui ) { 8736 options.position = [ 8737 ui.position.left - that.document.scrollLeft(), 8738 ui.position.top - that.document.scrollTop() 8739 ]; 8740 $( this ).removeClass("ui-dialog-dragging"); 8741 that._unblockFrames(); 8742 that._trigger( "dragStop", event, filteredUi( ui ) ); 8743 } 8744 }); 8745 }, 8746 _makeResizable: function() { 8747 var that = this, 8748 options = this.options, 8749 handles = options.resizable, 8750 position = this.uiDialog.css("position"), 8751 resizeHandles = typeof handles === "string" ? 8752 handles : 8753 "n,e,s,w,se,sw,ne,nw"; 8754 function filteredUi( ui ) { 8755 return { 8756 originalPosition: ui.originalPosition, 8757 originalSize: ui.originalSize, 8758 position: ui.position, 8759 size: ui.size 8760 }; 8761 } 8762 this.uiDialog.resizable({ 8763 cancel: ".ui-dialog-content", 8764 containment: "document", 8765 alsoResize: this.element, 8766 maxWidth: options.maxWidth, 8767 maxHeight: options.maxHeight, 8768 minWidth: options.minWidth, 8769 minHeight: this._minHeight(), 8770 handles: resizeHandles, 8771 start: function( event, ui ) { 8772 $( this ).addClass("ui-dialog-resizing"); 8773 that._blockFrames(); 8774 that._trigger( "resizeStart", event, filteredUi( ui ) ); 8775 }, 8776 resize: function( event, ui ) { 8777 that._trigger( "resize", event, filteredUi( ui ) ); 8778 }, 8779 stop: function( event, ui ) { 8780 options.height = $( this ).height(); 8781 options.width = $( this ).width(); 8782 $( this ).removeClass("ui-dialog-resizing"); 8783 that._unblockFrames(); 8784 that._trigger( "resizeStop", event, filteredUi( ui ) ); 8785 } 8786 }) 8787 .css( "position", position ); 8788 }, 8789 _minHeight: function() { 8790 var options = this.options; 8791 return options.height === "auto" ? 8792 options.minHeight : 8793 Math.min( options.minHeight, options.height ); 8794 }, 8795 _position: function() { 8796 var isVisible = this.uiDialog.is(":visible"); 8797 if ( !isVisible ) { 8798 this.uiDialog.show(); 8799 } 8800 this.uiDialog.position( this.options.position ); 8801 if ( !isVisible ) { 8802 this.uiDialog.hide(); 8803 } 8804 }, 8805 _setOptions: function( options ) { 8806 var that = this, 8807 resize = false, 8808 resizableOptions = {}; 8809 $.each( options, function( key, value ) { 8810 that._setOption( key, value ); 8811 if ( key in sizeRelatedOptions ) { 8812 resize = true; 8813 } 8814 if ( key in resizableRelatedOptions ) { 8815 resizableOptions[ key ] = value; 8816 } 8817 }); 8818 if ( resize ) { 8819 this._size(); 8820 this._position(); 8821 } 8822 if ( this.uiDialog.is(":data(ui-resizable)") ) { 8823 this.uiDialog.resizable( "option", resizableOptions ); 8824 } 8825 }, 8826 _setOption: function( key, value ) { 8827 var isDraggable, isResizable, 8828 uiDialog = this.uiDialog; 8829 if ( key === "dialogClass" ) { 8830 uiDialog 8831 .removeClass( this.options.dialogClass ) 8832 .addClass( value ); 8833 } 8834 if ( key === "disabled" ) { 8835 return; 8836 } 8837 this._super( key, value ); 8838 if ( key === "appendTo" ) { 8839 this.uiDialog.appendTo( this._appendTo() ); 8840 } 8841 if ( key === "buttons" ) { 8842 this._createButtons(); 8843 } 8844 if ( key === "closeText" ) { 8845 this.uiDialogTitlebarClose.button({ 8846 label: "" + value 8847 }); 8848 } 8849 if ( key === "draggable" ) { 8850 isDraggable = uiDialog.is(":data(ui-draggable)"); 8851 if ( isDraggable && !value ) { 8852 uiDialog.draggable("destroy"); 8853 } 8854 if ( !isDraggable && value ) { 8855 this._makeDraggable(); 8856 } 8857 } 8858 if ( key === "position" ) { 8859 this._position(); 8860 } 8861 if ( key === "resizable" ) { 8862 isResizable = uiDialog.is(":data(ui-resizable)"); 8863 if ( isResizable && !value ) { 8864 uiDialog.resizable("destroy"); 8865 } 8866 if ( isResizable && typeof value === "string" ) { 8867 uiDialog.resizable( "option", "handles", value ); 8868 } 8869 if ( !isResizable && value !== false ) { 8870 this._makeResizable(); 8871 } 8872 } 8873 if ( key === "title" ) { 8874 this._title( this.uiDialogTitlebar.find(".ui-dialog-title") ); 8875 } 8876 }, 8877 _size: function() { 8878 var nonContentHeight, minContentHeight, maxContentHeight, 8879 options = this.options; 8880 this.element.show().css({ 8881 width: "auto", 8882 minHeight: 0, 8883 maxHeight: "none", 8884 height: 0 8885 }); 8886 if ( options.minWidth > options.width ) { 8887 options.width = options.minWidth; 8888 } 8889 nonContentHeight = this.uiDialog.css({ 8890 height: "auto", 8891 width: options.width 8892 }) 8893 .outerHeight(); 8894 minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); 8895 maxContentHeight = typeof options.maxHeight === "number" ? 8896 Math.max( 0, options.maxHeight - nonContentHeight ) : 8897 "none"; 8898 if ( options.height === "auto" ) { 8899 this.element.css({ 8900 minHeight: minContentHeight, 8901 maxHeight: maxContentHeight, 8902 height: "auto" 8903 }); 8904 } else { 8905 this.element.height( Math.max( 0, options.height - nonContentHeight ) ); 8906 } 8907 if (this.uiDialog.is(":data(ui-resizable)") ) { 8908 this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); 8909 } 8910 }, 8911 _blockFrames: function() { 8912 this.iframeBlocks = this.document.find( "iframe" ).map(function() { 8913 var iframe = $( this ); 8914 return $( "<div>" ) 8915 .css({ 8916 position: "absolute", 8917 width: iframe.outerWidth(), 8918 height: iframe.outerHeight() 8919 }) 8920 .appendTo( iframe.parent() ) 8921 .offset( iframe.offset() )[0]; 8922 }); 8923 }, 8924 _unblockFrames: function() { 8925 if ( this.iframeBlocks ) { 8926 this.iframeBlocks.remove(); 8927 delete this.iframeBlocks; 8928 } 8929 }, 8930 _allowInteraction: function( event ) { 8931 if ( $( event.target ).closest(".ui-dialog").length ) { 8932 return true; 8933 } 8934 return !!$( event.target ).closest(".ui-datepicker").length; 8935 }, 8936 _createOverlay: function() { 8937 if ( !this.options.modal ) { 8938 return; 8939 } 8940 var that = this, 8941 widgetFullName = this.widgetFullName; 8942 if ( !$.ui.dialog.overlayInstances ) { 8943 this._delay(function() { 8944 if ( $.ui.dialog.overlayInstances ) { 8945 this.document.bind( "focusin.dialog", function( event ) { 8946 if ( !that._allowInteraction( event ) ) { 8947 event.preventDefault(); 8948 $(".ui-dialog:visible:last .ui-dialog-content") 8949 .data( widgetFullName )._focusTabbable(); 8950 } 8951 }); 8952 } 8953 }); 8954 }
8955 this.overlay = $("<div>") 8956 .addClass("ui-widget-overlay ui-front") 8957 .appendTo( this._appendTo() ); 8958 this._on( this.overlay, { 8959 mousedown: "_keepFocus" 8960 }); 8961 $.ui.dialog.overlayInstances++; 8962 }, 8963 _destroyOverlay: function() { 8964 if ( !this.options.modal ) { 8965 return; 8966 } 8967 if ( this.overlay ) { 8968 $.ui.dialog.overlayInstances--; 8969 8970 if ( !$.ui.dialog.overlayInstances ) { 8971 this.document.unbind( "focusin.dialog" ); 8972 } 8973 this.overlay.remove(); 8974 this.overlay = null; 8975 } 8976 } 8977}); 8978$.ui.dialog.overlayInstances = 0; 8979if ( $.uiBackCompat !== false ) { 8980 $.widget( "ui.dialog", $.ui.dialog, { 8981 _position: function() { 8982 var position = this.options.position, 8983 myAt = [], 8984 offset = [ 0, 0 ], 8985 isVisible; 8986 if ( position ) { 8987 if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) { 8988 myAt = position.split ? position.split(" ") : [ position[0], position[1] ]; 8989 if ( myAt.length === 1 ) { 8990 myAt[1] = myAt[0]; 8991 } 8992 $.each( [ "left", "top" ], function( i, offsetPosition ) { 8993 if ( +myAt[ i ] === myAt[ i ] ) { 8994 offset[ i ] = myAt[ i ]; 8995 myAt[ i ] = offsetPosition; 8996 } 8997 }); 8998 position = { 8999 my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " + 9000 myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]), 9001 at: myAt.join(" ") 9002 }; 9003 } 9004 position = $.extend( {}, $.ui.dialog.prototype.options.position, position ); 9005 } else { 9006 position = $.ui.dialog.prototype.options.position; 9007 } 9008 isVisible = this.uiDialog.is(":visible"); 9009 if ( !isVisible ) { 9010 this.uiDialog.show(); 9011 } 9012 this.uiDialog.position( position ); 9013 if ( !isVisible ) { 9014 this.uiDialog.hide(); 9015 } 9016 } 9017 }); 9018} 9019}( jQuery ) ); 9020(function( $ ) { 9021function modifier( fn ) { 9022 return function() { 9023 var previous = this.element.val(); 9024 fn.apply( this, arguments ); 9025 this._refresh(); 9026 if ( previous !== this.element.val() ) { 9027 this._trigger( "change" ); 9028 } 9029 }; 9030} 9031$.widget( "ui.spinner", { 9032 version: "1.10.4", 9033 defaultElement: "<input>", 9034 widgetEventPrefix: "spin", 9035 options: { 9036 culture: null, 9037 icons: { 9038 down: "ui-icon-triangle-1-s", 9039 up: "ui-icon-triangle-1-n" 9040 }, 9041 incremental: true, 9042 max: null, 9043 min: null, 9044 numberFormat: null, 9045 page: 10, 9046 step: 1, 9047 9048 change: null, 9049 spin: null, 9050 start: null, 9051 stop: null 9052 }, 9053 _create: function() { 9054 // handle string values that need to be parsed 9055 this._setOption( "max", this.options.max ); 9056 this._setOption( "min", this.options.min ); 9057 this._setOption( "step", this.options.step ); 9058 if ( this.value() !== "" ) { 9059 // Format the value, but don't constrain. 9060 this._value( this.element.val(), true ); 9061 } 9062 this._draw(); 9063 this._on( this._events ); 9064 this._refresh(); 9065 this._on( this.window, { 9066 beforeunload: function() { 9067 this.element.removeAttr( "autocomplete" ); 9068 } 9069 }); 9070 }, 9071 _getCreateOptions: function() { 9072 var options = {}, 9073 element = this.element; 9074 $.each( [ "min", "max", "step" ], function( i, option ) { 9075 var value = element.attr( option ); 9076 if ( value !== undefined && value.length ) { 9077 options[ option ] = value; 9078 } 9079 }); 9080 return options; 9081 }, 9082 _events: { 9083 keydown: function( event ) { 9084 if ( this._start( event ) && this._keydown( event ) ) { 9085 event.preventDefault(); 9086 } 9087 }, 9088 keyup: "_stop", 9089 focus: function() { 9090 this.previous = this.element.val(); 9091 }, 9092 blur: function( event ) { 9093 if ( this.cancelBlur ) { 9094 delete this.cancelBlur; 9095 return; 9096 } 9097 this._stop(); 9098 this._refresh(); 9099 if ( this.previous !== this.element.val() ) { 9100 this._trigger( "change", event ); 9101 } 9102 }, 9103 mousewheel: function( event, delta ) { 9104 if ( !delta ) { 9105 return; 9106 } 9107 if ( !this.spinning && !this._start( event ) ) { 9108 return false; 9109 } 9110 9111 this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); 9112 clearTimeout( this.mousewheelTimer ); 9113 this.mousewheelTimer = this._delay(function() { 9114 if ( this.spinning ) { 9115 this._stop( event ); 9116 } 9117 }, 100 ); 9118 event.preventDefault(); 9119 }, 9120 "mousedown .ui-spinner-button": function( event ) { 9121 var previous; 9122 previous = this.element[0] === this.document[0].activeElement ? 9123 this.previous : this.element.val(); 9124 function checkFocus() { 9125 var isActive = this.element[0] === this.document[0].activeElement; 9126 if ( !isActive ) { 9127 this.element.focus(); 9128 this.previous = previous; 9129 this._delay(function() { 9130 this.previous = previous; 9131 }); 9132 } 9133 } 9134 event.preventDefault();
vendor: 11,899 bytes, lines 9135-9568
9135 checkFocus.call( this ); 9136 this.cancelBlur = true; 9137 this._delay(function() { 9138 delete this.cancelBlur; 9139 checkFocus.call( this ); 9140 }); 9141 if ( this._start( event ) === false ) { 9142 return; 9143 } 9144 this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 9145 }, 9146 "mouseup .ui-spinner-button": "_stop", 9147 "mouseenter .ui-spinner-button": function( event ) { 9148 if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { 9149 return; 9150 } 9151 if ( this._start( event ) === false ) { 9152 return false; 9153 } 9154 this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 9155 }, 9156 "mouseleave .ui-spinner-button": "_stop" 9157 }, 9158 _draw: function() { 9159 var uiSpinner = this.uiSpinner = this.element 9160 .addClass( "ui-spinner-input" ) 9161 .attr( "autocomplete", "off" ) 9162 .wrap( this._uiSpinnerHtml() ) 9163 .parent() 9164 // add buttons 9165 .append( this._buttonHtml() ); 9166 this.element.attr( "role", "spinbutton" ); 9167 this.buttons = uiSpinner.find( ".ui-spinner-button" ) 9168 .attr( "tabIndex", -1 ) 9169 .button() 9170 .removeClass( "ui-corner-all" ); 9171 if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && 9172 uiSpinner.height() > 0 ) { 9173 uiSpinner.height( uiSpinner.height() ); 9174 } 9175 if ( this.options.disabled ) { 9176 this.disable(); 9177 } 9178 }, 9179 _keydown: function( event ) { 9180 var options = this.options, 9181 keyCode = $.ui.keyCode; 9182 switch ( event.keyCode ) { 9183 case keyCode.UP: 9184 this._repeat( null, 1, event ); 9185 return true; 9186 case keyCode.DOWN: 9187 this._repeat( null, -1, event ); 9188 return true; 9189 case keyCode.PAGE_UP: 9190 this._repeat( null, options.page, event ); 9191 return true; 9192 case keyCode.PAGE_DOWN: 9193 this._repeat( null, -options.page, event ); 9194 return true; 9195 } 9196 9197 return false; 9198 }, 9199 _uiSpinnerHtml: function() { 9200 return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"; 9201 }, 9202 _buttonHtml: function() { 9203 return "" + 9204 "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" + 9205 "<span class='ui-icon " + this.options.icons.up + "'>▲</span>" + 9206 "</a>" + 9207 "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + 9208 "<span class='ui-icon " + this.options.icons.down + "'>▼</span>" + 9209 "</a>"; 9210 }, 9211 _start: function( event ) { 9212 if ( !this.spinning && this._trigger( "start", event ) === false ) { 9213 return false; 9214 } 9215 if ( !this.counter ) { 9216 this.counter = 1; 9217 } 9218 this.spinning = true; 9219 return true; 9220 }, 9221 _repeat: function( i, steps, event ) { 9222 i = i || 500; 9223 clearTimeout( this.timer ); 9224 this.timer = this._delay(function() { 9225 this._repeat( 40, steps, event ); 9226 }, i ); 9227 this._spin( steps * this.options.step, event ); 9228 }, 9229 _spin: function( step, event ) { 9230 var value = this.value() || 0; 9231 if ( !this.counter ) { 9232 this.counter = 1; 9233 } 9234 value = this._adjustValue( value + step * this._increment( this.counter ) ); 9235 if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { 9236 this._value( value ); 9237 this.counter++; 9238 } 9239 }, 9240 _increment: function( i ) { 9241 var incremental = this.options.incremental; 9242 if ( incremental ) { 9243 return $.isFunction( incremental ) ? 9244 incremental( i ) : 9245 Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 ); 9246 } 9247 return 1; 9248 }, 9249 _precision: function() { 9250 var precision = this._precisionOf( this.options.step ); 9251 if ( this.options.min !== null ) { 9252 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 9253 } 9254 return precision; 9255 }, 9256 _precisionOf: function( num ) { 9257 var str = num.toString(), 9258 decimal = str.indexOf( "." ); 9259 return decimal === -1 ? 0 : str.length - decimal - 1; 9260 }, 9261 _adjustValue: function( value ) { 9262 var base, aboveMin, 9263 options = this.options; 9264 base = options.min !== null ? options.min : 0; 9265 aboveMin = value - base; 9266 aboveMin = Math.round(aboveMin / options.step) * options.step; 9267 value = base + aboveMin; 9268 value = parseFloat( value.toFixed( this._precision() ) ); 9269 if ( options.max !== null && value > options.max) { 9270 return options.max; 9271 } 9272 if ( options.min !== null && value < options.min ) { 9273 return options.min; 9274 } 9275 return value; 9276 }, 9277 _stop: function( event ) { 9278 if ( !this.spinning ) { 9279 return; 9280 } 9281 clearTimeout( this.timer ); 9282 clearTimeout( this.mousewheelTimer ); 9283 this.counter = 0; 9284 this.spinning = false; 9285 this._trigger( "stop", event ); 9286 }, 9287 _setOption: function( key, value ) { 9288 if ( key === "culture" || key === "numberFormat" ) { 9289 var prevValue = this._parse( this.element.val() ); 9290 this.options[ key ] = value; 9291 this.element.val( this._format( prevValue ) ); 9292 return; 9293 } 9294 if ( key === "max" || key === "min" || key === "step" ) { 9295 if ( typeof value === "string" ) { 9296 value = this._parse( value ); 9297 } 9298 } 9299 if ( key === "icons" ) { 9300 this.buttons.first().find( ".ui-icon" ) 9301 .removeClass( this.options.icons.up ) 9302 .addClass( value.up ); 9303 this.buttons.last().find( ".ui-icon" ) 9304 .removeClass( this.options.icons.down ) 9305 .addClass( value.down ); 9306 } 9307 this._super( key, value ); 9308 if ( key === "disabled" ) { 9309 if ( value ) { 9310 this.element.prop( "disabled", true ); 9311 this.buttons.button( "disable" ); 9312 } else { 9313 this.element.prop( "disabled", false ); 9314 this.buttons.button( "enable" ); 9315 } 9316 } 9317 }, 9318 _setOptions: modifier(function( options ) { 9319 this._super( options ); 9320 this._value( this.element.val() ); 9321 }), 9322 _parse: function( val ) { 9323 if ( typeof val === "string" && val !== "" ) { 9324 val = window.Globalize && this.options.numberFormat ? 9325 Globalize.parseFloat( val, 10, this.options.culture ) : +val; 9326 } 9327 return val === "" || isNaN( val ) ? null : val; 9328 }, 9329 _format: function( value ) { 9330 if ( value === "" ) { 9331 return ""; 9332 } 9333 return window.Globalize && this.options.numberFormat ? 9334 Globalize.format( value, this.options.numberFormat, this.options.culture ) : 9335 value; 9336 }, 9337 _refresh: function() { 9338 this.element.attr({ 9339 "aria-valuemin": this.options.min, 9340 "aria-valuemax": this.options.max, 9341 // TODO: what should we do with values that can't be parsed? 9342 "aria-valuenow": this._parse( this.element.val() ) 9343 }); 9344 }, 9345 _value: function( value, allowAny ) { 9346 var parsed; 9347 if ( value !== "" ) { 9348 parsed = this._parse( value ); 9349 if ( parsed !== null ) { 9350 if ( !allowAny ) { 9351 parsed = this._adjustValue( parsed ); 9352 } 9353 value = this._format( parsed ); 9354 } 9355 } 9356 this.element.val( value ); 9357 this._refresh(); 9358 }, 9359 _destroy: function() { 9360 this.element 9361 .removeClass( "ui-spinner-input" ) 9362 .prop( "disabled", false ) 9363 .removeAttr( "autocomplete" ) 9364 .removeAttr( "role" ) 9365 .removeAttr( "aria-valuemin" ) 9366 .removeAttr( "aria-valuemax" ) 9367 .removeAttr( "aria-valuenow" ); 9368 this.uiSpinner.replaceWith( this.element ); 9369 }, 9370 stepUp: modifier(function( steps ) { 9371 this._stepUp( steps ); 9372 }), 9373 _stepUp: function( steps ) { 9374 if ( this._start() ) { 9375 this._spin( (steps || 1) * this.options.step ); 9376 this._stop(); 9377 } 9378 }, 9379 stepDown: modifier(function( steps ) { 9380 this._stepDown( steps ); 9381 }), 9382 _stepDown: function( steps ) { 9383 if ( this._start() ) { 9384 this._spin( (steps || 1) * -this.options.step ); 9385 this._stop(); 9386 } 9387 }, 9388 pageUp: modifier(function( pages ) { 9389 this._stepUp( (pages || 1) * this.options.page ); 9390 }), 9391 pageDown: modifier(function( pages ) { 9392 this._stepDown( (pages || 1) * this.options.page ); 9393 }), 9394 value: function( newVal ) { 9395 if ( !arguments.length ) { 9396 return this._parse( this.element.val() ); 9397 } 9398 modifier( this._value ).call( this, newVal ); 9399 }, 9400 widget: function() { 9401 return this.uiSpinner; 9402 } 9403}); 9404}( jQuery ) ); 9405(function( $ ) { 9406var increments = 0; 9407function addDescribedBy( elem, id ) { 9408 var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); 9409 describedby.push( id ); 9410 elem 9411 .data( "ui-tooltip-id", id ) 9412 .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); 9413} 9414function removeDescribedBy( elem ) { 9415 var id = elem.data( "ui-tooltip-id" ), 9416 describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), 9417 index = $.inArray( id, describedby ); 9418 if ( index !== -1 ) { 9419 describedby.splice( index, 1 ); 9420 } 9421 elem.removeData( "ui-tooltip-id" ); 9422 describedby = $.trim( describedby.join( " " ) ); 9423 if ( describedby ) { 9424 elem.attr( "aria-describedby", describedby ); 9425 } else { 9426 elem.removeAttr( "aria-describedby" ); 9427 } 9428} 9429$.widget( "ui.tooltip", { 9430 version: "1.10.4", 9431 options: { 9432 content: function() { 9433 var title = $( this ).attr( "title" ) || ""; 9434 return $( "<a>" ).text( title ).html(); 9435 }, 9436 hide: true, 9437 items: "[title]:not([disabled])", 9438 position: { 9439 my: "left top+15", 9440 at: "left bottom", 9441 collision: "flipfit flip" 9442 }, 9443 show: true, 9444 tooltipClass: null, 9445 track: false, 9446 close: null, 9447 open: null 9448 }, 9449 _create: function() { 9450 this._on({ 9451 mouseover: "open", 9452 focusin: "open" 9453 }); 9454 this.tooltips = {}; 9455 this.parents = {}; 9456 if ( this.options.disabled ) { 9457 this._disable(); 9458 } 9459 }, 9460 _setOption: function( key, value ) { 9461 var that = this; 9462 if ( key === "disabled" ) { 9463 this[ value ? "_disable" : "_enable" ](); 9464 this.options[ key ] = value; 9465 return; 9466 } 9467 this._super( key, value ); 9468 if ( key === "content" ) { 9469 $.each( this.tooltips, function( id, element ) { 9470 that._updateContent( element ); 9471 }); 9472 } 9473 }, 9474 _disable: function() { 9475 var that = this; 9476 $.each( this.tooltips, function( id, element ) { 9477 var event = $.Event( "blur" ); 9478 event.target = event.currentTarget = element[0]; 9479 that.close( event, true ); 9480 }); 9481 this.element.find( this.options.items ).addBack().each(function() { 9482 var element = $( this ); 9483 if ( element.is( "[title]" ) ) { 9484 element 9485 .data( "ui-tooltip-title", element.attr( "title" ) ) 9486 .attr( "title", "" ); 9487 } 9488 }); 9489 }, 9490 _enable: function() { 9491 this.element.find( this.options.items ).addBack().each(function() { 9492 var element = $( this ); 9493 if ( element.data( "ui-tooltip-title" ) ) { 9494 element.attr( "title", element.data( "ui-tooltip-title" ) ); 9495 } 9496 }); 9497 }, 9498 open: function( event ) { 9499 var that = this, 9500 target = $( event ? event.target : this.element ) 9501 .closest( this.options.items ); 9502 if ( !target.length || target.data( "ui-tooltip-id" ) ) { 9503 return; 9504 } 9505 if ( target.attr( "title" ) ) { 9506 target.data( "ui-tooltip-title", target.attr( "title" ) ); 9507 } 9508 target.data( "ui-tooltip-open", true ); 9509 if ( event && event.type === "mouseover" ) { 9510 target.parents().each(function() { 9511 var parent = $( this ), 9512 blurEvent; 9513 if ( parent.data( "ui-tooltip-open" ) ) { 9514 blurEvent = $.Event( "blur" ); 9515 blurEvent.target = blurEvent.currentTarget = this; 9516 that.close( blurEvent, true ); 9517 } 9518 if ( parent.attr( "title" ) ) { 9519 parent.uniqueId(); 9520 that.parents[ this.id ] = { 9521 element: this, 9522 title: parent.attr( "title" ) 9523 }; 9524 parent.attr( "title", "" ); 9525 } 9526 }); 9527 } 9528 this._updateContent( target, event ); 9529 }, 9530 _updateContent: function( target, event ) { 9531 var content, 9532 contentOption = this.options.content, 9533 that = this, 9534 eventType = event ? event.type : null; 9535 9536 if ( typeof contentOption === "string" ) { 9537 return this._open( event, target, contentOption ); 9538 } 9539 content = contentOption.call( target[0], function( response ) { 9540 if ( !target.data( "ui-tooltip-open" ) ) { 9541 return; 9542 } 9543 that._delay(function() { 9544 if ( event ) { 9545 event.type = eventType; 9546 } 9547 this._open( event, target, response ); 9548 }); 9549 }); 9550 if ( content ) { 9551 this._open( event, target, content ); 9552 } 9553 }, 9554 _open: function( event, target, content ) { 9555 var tooltip, events, delayedShow, 9556 positionOption = $.extend( {}, this.options.position ); 9557 if ( !content ) { 9558 return; 9559 } 9560 tooltip = this._find( target ); 9561 if ( tooltip.length ) { 9562 tooltip.find( ".ui-tooltip-content" ).html( content ); 9563 return; 9564 } 9565 if ( target.is( "[title]" ) ) { 9566 if ( event && event.type === "mouseover" ) { 9567 target.attr( "title", "" ); 9568 } else {
9569 target.removeAttr( "title" ); 9570 } 9571 } 9572 tooltip = this._tooltip( target ); 9573 addDescribedBy( target, tooltip.attr( "id" ) ); 9574 tooltip.find( ".ui-tooltip-content" ).html( content ); 9575 function position( event ) { 9576 positionOption.of = event; 9577 if ( tooltip.is( ":hidden" ) ) { 9578 return; 9579 } 9580 tooltip.position( positionOption ); 9581 } 9582 if ( this.options.track && event && /^mouse/.test( event.type ) ) { 9583 this._on( this.document, { 9584 mousemove: position 9585 }); 9586 position( event ); 9587 } else { 9588 tooltip.position( $.extend({ 9589 of: target 9590 }, this.options.position ) ); 9591 } 9592 tooltip.hide(); 9593 this._show( tooltip, this.options.show ); 9594 if ( this.options.show && this.options.show.delay ) { 9595 delayedShow = this.delayedShow = setInterval(function() { 9596 if ( tooltip.is( ":visible" ) ) { 9597 position( positionOption.of ); 9598 clearInterval( delayedShow ); 9599 } 9600 }, $.fx.interval ); 9601 } 9602 this._trigger( "open", event, { tooltip: tooltip } ); 9603 events = { 9604 keyup: function( event ) { 9605 if ( event.keyCode === $.ui.keyCode.ESCAPE ) { 9606 var fakeEvent = $.Event(event); 9607 fakeEvent.currentTarget = target[0]; 9608 this.close( fakeEvent, true ); 9609 } 9610 }, 9611 remove: function() { 9612 this._removeTooltip( tooltip ); 9613 } 9614 }; 9615 if ( !event || event.type === "mouseover" ) { 9616 events.mouseleave = "close"; 9617 } 9618 if ( !event || event.type === "focusin" ) { 9619 events.focusout = "close"; 9620 } 9621 this._on( true, target, events ); 9622 }, 9623 close: function( event ) { 9624 var that = this, 9625 target = $( event ? event.currentTarget : this.element ), 9626 tooltip = this._find( target ); 9627 if ( this.closing ) { 9628 return; 9629 } 9630 clearInterval( this.delayedShow ); 9631 if ( target.data( "ui-tooltip-title" ) ) { 9632 target.attr( "title", target.data( "ui-tooltip-title" ) ); 9633 } 9634 removeDescribedBy( target ); 9635 tooltip.stop( true ); 9636 this._hide( tooltip, this.options.hide, function() { 9637 that._removeTooltip( $( this ) ); 9638 }); 9639 target.removeData( "ui-tooltip-open" ); 9640 this._off( target, "mouseleave focusout keyup" ); 9641 if ( target[0] !== this.element[0] ) { 9642 this._off( target, "remove" ); 9643 } 9644 this._off( this.document, "mousemove" ); 9645 if ( event && event.type === "mouseleave" ) { 9646 $.each( this.parents, function( id, parent ) { 9647 $( parent.element ).attr( "title", parent.title ); 9648 delete that.parents[ id ]; 9649 }); 9650 } 9651 this.closing = true; 9652 this._trigger( "close", event, { tooltip: tooltip } ); 9653 this.closing = false; 9654 }, 9655 _tooltip: function( element ) { 9656 var id = "ui-tooltip-" + increments++, 9657 tooltip = $( "<div>" ) 9658 .attr({ 9659 id: id, 9660 role: "tooltip" 9661 }) 9662 .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + 9663 ( this.options.tooltipClass || "" ) ); 9664 $( "<div>" ) 9665 .addClass( "ui-tooltip-content" ) 9666 .appendTo( tooltip ); 9667 tooltip.appendTo( this.document[0].body ); 9668 this.tooltips[ id ] = element; 9669 return tooltip; 9670 }, 9671 _find: function( target ) { 9672 var id = target.data( "ui-tooltip-id" ); 9673 return id ? $( "#" + id ) : $(); 9674 }, 9675 _removeTooltip: function( tooltip ) { 9676 tooltip.remove(); 9677 delete this.tooltips[ tooltip.attr( "id" ) ]; 9678 }, 9679 _destroy: function() { 9680 var that = this; 9681 $.each( this.tooltips, function( id, element ) { 9682 var event = $.Event( "blur" ); 9683 event.target = event.currentTarget = element[0]; 9684 that.close( event, true ); 9685 $( "#" + id ).remove(); 9686 if ( element.data( "ui-tooltip-title" ) ) { 9687 element.attr( "title", element.data( "ui-tooltip-title" ) ); 9688 element.removeData( "ui-tooltip-title" ); 9689 } 9690 }); 9691 } 9692}); 9693}(jQuery)); 9694</script>
9694<script>jQuery(function(a){a.datepicker.regional.pt={closeText:"Fechar",preposition:"",prevText:"<Anterior",nextText:"Seguinte",currentText:"Hoje",monthNames:"Janeiro Fevereiro Març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ça-feira Quarta-feira Quinta-feira Sexta-feira Sábado".split(" "),dayNamesShort:"Dom Seg Ter Qua Qui Sex Sáb".split(" "),dayNamesMin:"Dom Seg Ter Qua Qui Sex Sáb".split(" "),weekHeader:"Sem",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};a.datepicker.setDefaults(a.datepicker.regional.pt)});</script>
9694<script> 9695(function() { 9696 var $ = jQuery; 9697 var LightboxOptions = (function() { 9698 function LightboxOptions() { 9699 this.fadeDuration = 500; 9700 this.fitImagesInViewport = true; 9701 this.resizeDuration = 700; 9702 this.positionFromTop = 50; 9703 this.showImageNumberLabel = true; 9704 this.alwaysShowNavOnTouchDevices = false; 9705 this.wrapAround = false; 9706 } 9707 LightboxOptions.prototype.albumLabel = function(curImageNum, albumSize) { 9708 return "Image " + curImageNum + " of " + albumSize; 9709 }; 9710 return LightboxOptions; 9711 })(); 9712 var Lightbox = (function() { 9713 function Lightbox(options) { 9714 this.options = options; 9715 this.album = []; 9716 this.currentImageIndex = void 0; 9717 this.init(); 9718 } 9719 Lightbox.prototype.init = function() { 9720 this.enable(); 9721 this.build(); 9722 }; 9723 Lightbox.prototype.enable = function() { 9724 var self = this; 9725 $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { 9726 self.start($(event.currentTarget)); 9727 return false; 9728 }); 9729 }; 9730 Lightbox.prototype.build = function() { 9731 var self = this; 9732 $("<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')); 9733 this.$lightbox = $('#lightbox'); 9734 this.$overlay = $('#lightboxOverlay'); 9735 this.$outerContainer = this.$lightbox.find('.lb-outerContainer'); 9736 this.$container = this.$lightbox.find('.lb-container'); 9737 this.containerTopPadding = parseInt(this.$container.css('padding-top'), 10); 9738 this.containerRightPadding = parseInt(this.$container.css('padding-right'), 10); 9739 this.containerBottomPadding = parseInt(this.$container.css('padding-bottom'), 10); 9740 this.containerLeftPadding = parseInt(this.$container.css('padding-left'), 10); 9741 this.$overlay.hide().on('click', function() { 9742 self.end(); 9743 return false; 9744 }); 9745 this.$lightbox.hide().on('click', function(event) { 9746 if ($(event.target).attr('id') === 'lightbox') { 9747 self.end(); 9748 } 9749 return false; 9750 }); 9751 this.$outerContainer.on('click', function(event) { 9752 if ($(event.target).attr('id') === 'lightbox') { 9753 self.end(); 9754 } 9755 return false; 9756 }); 9757 this.$lightbox.find('.lb-prev').on('click', function() { 9758 if (self.currentImageIndex === 0) { 9759 self.changeImage(self.album.length - 1); 9760 } else { 9761 self.changeImage(self.currentImageIndex - 1); 9762 } 9763 return false; 9764 }); 9765 this.$lightbox.find('.lb-next').on('click', function() { 9766 if (self.currentImageIndex === self.album.length - 1) { 9767 self.changeImage(0); 9768 } else { 9769 self.changeImage(self.currentImageIndex + 1); 9770 } 9771 return false; 9772 }); 9773 this.$lightbox.find('.lb-loader, .lb-close').on('click', function() { 9774 self.end(); 9775 return false; 9776 }); 9777 }; 9778 Lightbox.prototype.start = function($link) { 9779 var self = this; 9780 var $window = $(window); 9781 $window.on('resize', $.proxy(this.sizeOverlay, this)); 9782 $('select, object, embed').css({ 9783 visibility: "hidden" 9784 }); 9785 this.sizeOverlay(); 9786 this.album = []; 9787 var imageNumber = 0; 9788 function addToAlbum($link) { 9789 self.album.push({ 9790 link: $link.attr('href'), 9791 title: $link.attr('data-title') || $link.attr('title') 9792 }); 9793 } 9794 var dataLightboxValue = $link.attr('data-lightbox'); 9795 var $links; 9796 if (dataLightboxValue) { 9797 $links = $($link.prop("tagName") + '[data-lightbox="' + dataLightboxValue + '"]'); 9798 for (var i = 0; i < $links.length; i = ++i) { 9799 addToAlbum($($links[i])); 9800 if ($links[i] === $link[0]) { 9801 imageNumber = i; 9802 } 9803 } 9804 } else { 9805 if ($link.attr('rel') === 'lightbox') { 9806 // If image is not part of a set 9807 addToAlbum($link); 9808 } else { 9809 // If image is part of a set 9810 $links = $($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]'); 9811 for (var j = 0; j < $links.length; j = ++j) { 9812 addToAlbum($($links[j])); 9813 if ($links[j] === $link[0]) { 9814 imageNumber = j; 9815 } 9816 } 9817 } 9818 } 9819 var top = $window.scrollTop() + this.options.positionFromTop; 9820 var left = $window.scrollLeft(); 9821 this.$lightbox.css({ 9822 top: top + 'px', 9823 left: left + 'px' 9824 }).fadeIn(this.options.fadeDuration); 9825 this.changeImage(imageNumber); 9826 }; 9827 Lightbox.prototype.changeImage = function(imageNumber) { 9828 var self = this; 9829 this.disableKeyboardNav(); 9830 var $image = this.$lightbox.find('.lb-image'); 9831 this.$overlay.fadeIn(this.options.fadeDuration); 9832 $('.lb-loader').fadeIn('slow'); 9833 this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide(); 9834 this.$outerContainer.addClass('animating'); 9835 var preloader = new Image(); 9836 preloader.onload = function() { 9837 var $preloader, imageHeight, imageWidth, maxImageHeight, maxImageWidth, windowHeight, windowWidth; 9838 $image.attr('src', self.album[imageNumber].link); 9839 $preloader = $(preloader); 9840 $image.width(preloader.width); 9841 $image.height(preloader.height); 9842 if (self.options.fitImagesInViewport) { 9843 windowWidth = $(window).width(); 9844 windowHeight = $(window).height(); 9845 maxImageWidth = windowWidth - self.containerLeftPadding - self.containerRightPadding - 20; 9846 maxImageHeight = windowHeight - self.containerTopPadding - self.containerBottomPadding - 120; 9847 if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { 9848 if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { 9849 imageWidth = maxImageWidth; 9850 imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); 9851 $image.width(imageWidth); 9852 $image.height(imageHeight); 9853 } else { 9854 imageHeight = maxImageHeight; 9855 imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); 9856 $image.width(imageWidth); 9857 $image.height(imageHeight); 9858 } 9859 } 9860 } 9861 self.sizeContainer($image.width(), $image.height()); 9862 }; 9863 preloader.src = this.album[imageNumber].link; 9864 this.currentImageIndex = imageNumber; 9865 }; 9866 Lightbox.prototype.sizeOverlay = function() { 9867 this.$overlay 9868 .width($(window).width()) 9869 .height($(document).height()); 9870 }; 9871 Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) { 9872 var self = this; 9873 var oldWidth = this.$outerContainer.outerWidth(); 9874 var oldHeight = this.$outerContainer.outerHeight(); 9875 var newWidth = imageWidth + this.containerLeftPadding + this.containerRightPadding; 9876 var newHeight = imageHeight + this.containerTopPadding + this.containerBottomPadding; 9877 function postResize() { 9878 self.$lightbox.find('.lb-dataContainer').width(newWidth); 9879 self.$lightbox.find('.lb-prevLink').height(newHeight); 9880 self.$lightbox.find('.lb-nextLink').height(newHeight); 9881 self.showImage(); 9882 } 9883 if (oldWidth !== newWidth || oldHeight !== newHeight) { 9884 this.$outerContainer.animate({ 9885 width: newWidth, 9886 height: newHeight 9887 }, this.options.resizeDuration, 'swing', function() { 9888 postResize(); 9889 }); 9890 } else { 9891 postResize(); 9892 } 9893 }; 9894 Lightbox.prototype.showImage = function() { 9895 this.$lightbox.find('.lb-loader').hide(); 9896 this.$lightbox.find('.lb-image').fadeIn('slow'); 9897 this.updateNav(); 9898 this.updateDetails(); 9899 this.preloadNeighboringImages(); 9900 this.enableKeyboardNav(); 9901 }; 9902 Lightbox.prototype.updateNav = function() { 9903 var alwaysShowNav = false;
9904 try { 9905 document.createEvent("TouchEvent"); 9906 alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices)? true: false; 9907 } catch (e) {} 9908 this.$lightbox.find('.lb-nav').show(); 9909 if (this.album.length > 1) { 9910 if (this.options.wrapAround) { 9911 if (alwaysShowNav) { 9912 this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1'); 9913 } 9914 this.$lightbox.find('.lb-prev, .lb-next').show(); 9915 } else { 9916 if (this.currentImageIndex > 0) { 9917 this.$lightbox.find('.lb-prev').show(); 9918 if (alwaysShowNav) { 9919 this.$lightbox.find('.lb-prev').css('opacity', '1'); 9920 } 9921 } 9922 if (this.currentImageIndex < this.album.length - 1) { 9923 this.$lightbox.find('.lb-next').show(); 9924 if (alwaysShowNav) { 9925 this.$lightbox.find('.lb-next').css('opacity', '1'); 9926 } 9927 } 9928 } 9929 } 9930 }; 9931 Lightbox.prototype.updateDetails = function() { 9932 var self = this; 9933 if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") { 9934 this.$lightbox.find('.lb-caption') 9935 .html(this.album[this.currentImageIndex].title) 9936 .fadeIn('fast') 9937 .find('a').on('click', function(event){ 9938 location.href = $(this).attr('href'); 9939 }); 9940 } 9941 if (this.album.length > 1 && this.options.showImageNumberLabel) { 9942 this.$lightbox.find('.lb-number').text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn('fast'); 9943 } else { 9944 this.$lightbox.find('.lb-number').hide(); 9945 } 9946 this.$outerContainer.removeClass('animating'); 9947 this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() { 9948 return self.sizeOverlay(); 9949 }); 9950 }; 9951 Lightbox.prototype.preloadNeighboringImages = function() { 9952 if (this.album.length > this.currentImageIndex + 1) { 9953 var preloadNext = new Image(); 9954 preloadNext.src = this.album[this.currentImageIndex + 1].link; 9955 } 9956 if (this.currentImageIndex > 0) { 9957 var preloadPrev = new Image(); 9958 preloadPrev.src = this.album[this.currentImageIndex - 1].link; 9959 } 9960 }; 9961 Lightbox.prototype.enableKeyboardNav = function() { 9962 $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); 9963 }; 9964 Lightbox.prototype.disableKeyboardNav = function() { 9965 $(document).off('.keyboard'); 9966 }; 9967 Lightbox.prototype.keyboardAction = function(event) { 9968 var KEYCODE_ESC = 27; 9969 var KEYCODE_LEFTARROW = 37; 9970 var KEYCODE_RIGHTARROW = 39; 9971 var keycode = event.keyCode; 9972 var key = String.fromCharCode(keycode).toLowerCase(); 9973 if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) { 9974 this.end(); 9975 } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) { 9976 if (this.currentImageIndex !== 0) { 9977 this.changeImage(this.currentImageIndex - 1); 9978 } else if (this.options.wrapAround && this.album.length > 1) { 9979 this.changeImage(this.album.length - 1); 9980 } 9981 } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) { 9982 if (this.currentImageIndex !== this.album.length - 1) { 9983 this.changeImage(this.currentImageIndex + 1); 9984 } else if (this.options.wrapAround && this.album.length > 1) { 9985 this.changeImage(0); 9986 } 9987 } 9988 }; 9989 Lightbox.prototype.end = function() { 9990 this.disableKeyboardNav(); 9991 $(window).off("resize", this.sizeOverlay); 9992 this.$lightbox.fadeOut(this.options.fadeDuration); 9993 this.$overlay.fadeOut(this.options.fadeDuration); 9994 $('select, object, embed').css({ 9995 visibility: "visible" 9996 }); 9997 }; 9998 return Lightbox; 9999 })(); 10000 $(function() { 10001 var options = new LightboxOptions(); 10002 var lightbox = new Lightbox(options); 10003 }); 10004}).call(this); 10005</script>
10005<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">▾</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>
10005<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 10005
10005<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 10005-10023
10005<script> 10006(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)}}})); 10007if(typeof(console) === 'undefined') { 10008 var console = {} 10009 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() {}; 10010} 10011if (window.tplogs==true) 10012 try { 10013 console.groupCollapsed("ThemePunch GreenSocks Logs"); 10014 } catch(e) { } 10015var oldgs = window.GreenSockGlobals; 10016 oldgs_queue = window._gsQueue; 10017var punchgs = window.GreenSockGlobals = {}; 10018if (window.tplogs==true) 10019 try { 10020 console.info("Build GreenSock SandBox for ThemePunch Plugins"); 10021 console.info("GreenSock TweenLite Engine Initalised by ThemePunch Plugin"); 10022 } catch(e) {} 10023(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 10023-10024
10023,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"); 10024var _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}
10024,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)}
10024,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 10024-10026
10024,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"); 10025var _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()(); 10026var _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=/(?
10026:\+=|\-=|\-|\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)}
10026,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;
10026if(-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;
10026if(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"
10026in 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 10026-10027
10026p.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); 10027return 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,
10027s._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"); 10028var _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?"­ ":" ",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 10028-10048
10028S.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=" "),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"); 10029try{ 10030 window.GreenSockGlobals = null; 10031 window._gsQueue = null; 10032 window._gsDefine = null; 10033 delete(window.GreenSockGlobals); 10034 delete(window._gsQueue); 10035 delete(window._gsDefine); 10036 } catch(e) {} 10037try{ 10038 window.GreenSockGlobals = oldgs; 10039 window._gsQueue = oldgs_queue; 10040 } catch(e) {} 10041if (window.tplogs==true) 10042 try { 10043 console.groupEnd(); 10044 } catch(e) {} 10045(function(e,t){ 10046 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})})}; 10047})(jQuery) 10048function revslider_showDoubleJqueryError(a){var b="Revolution Slider Error: You have some jquery.js library include that c
10048omes 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> 1. In the Slider Settings -> Troubleshooting set option: <strong><b>Put JS Includes To Body</b></strong> option to true.",b+="<br> 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")}
10048),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>
10048a(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>
100480){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> </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);
10048d.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(">
10048ul: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>'), 10049"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+'">
10049'),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"));
10049var 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}
10049),(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 10049
10049: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}
10049)},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"),
100491==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
10049arseInt(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)), 10050"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">
10050<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%"}));
10050var 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"),
100500)||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
100505-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{ 10051a(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
10051onthover-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;
10051for(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;
10051case"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();
10051g.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); 10052</script>
10052 10053
10053<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/i18n/messages_pt.js" crossorigin="anonymous"></script>
10053 10054
10054<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>
10054 10055
10055<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>
10055 10056
10056<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>
10056 10057
10057<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>
10057 10058
10058<script>$(function () { 10059 DP_extend_info.config.booking_version = '7'; 10060 DP_extend_info.config.custom_format_day_month = function (dateComponents) { 10061 dateComponents = dateComponents.split("/"); 10062 var month_names = $.datepicker._defaults.monthNames, 10063 html_date = "<div class='day'>%d</div> <div class='month'>%m</div> <div class='year'>%y</div>", 10064 month = (parseInt(dateComponents[1]) - 1); 10065 10066 return html_date.replace("%d", dateComponents[0]).replace("%m", month_names[month]).replace("%y", dateComponents[2]); 10067 }; 10068 });$(window).load(function () { 10069 DP_extend_info.init(); 10070 $("label.dates_selector_label").html("<span>Chegada</span><span>SaÃda</span>"); 10071 });</script>
10071 10072
10072<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>
10072 10073
10073<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>
10073 10074
10074<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>
10074 10075
10075<script async type="text/javascript" type="text/javascript" src="/js/casas/booking_engine_personalize.js?v=1.11"></script>
10075 10076
10076<script async type="text/javascript" type="text/javascript" src="/js/casas/functions.js?v=1.79"></script>
10076 10077
10077<script async type="text/javascript" src="//www.tripadvisor.com/js3/conversion/pixel.js" crossorigin="anonymous" integrity="sha512-SqG9s7MDCO3rsgQClul/Zc+o4IfKK0trb4ozTj2bwIz1jKACSgBThnpH85WWGMviEKs33h60W4XE5WwHllfYMQ=="></script>
10077 10078 10079 <div style="display: none;"> 10080 <div id="data"> 10081 <div id="wrapper_booking_fancybox"> 10082 <div id="booking_widget_popup" class="booking_widget_fancybox"> 10083 10084 10085 10086 10087 10088<div id="motor_reserva"> 10089<!-- booking engine 2 --> 10090 <form action="https://www.hotelcasasnovas.com/booking1" name="searchForm" id="searchForm" method="post" class="paraty-booking-form motor2"> 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 <input type="hidden" id="language" name="language" value="PORTUGUESE" /> 10102 <input type="hidden" id="agesKid1" name="agesKid1" value="" /> 10103 <input type="hidden" id="agesKid2" name="agesKid2" value="" /> 10104 <input type="hidden" id="agesKid3" name="agesKid3" value="" /> 10105 10106 <input id="roomType" type="hidden" name="roomType" value=""> 10107 <input class="roomTypeValue" type="hidden" name="roomTypeValue" value=""> 10108 10109 <input id="roomFilter" type="hidden" name="roomFilter" value=""> 10110 <input id="roomFilterName" type="hidden" name="roomFilterName" value=""> 10111 10112 <input type="hidden" id="roomtype_list_json" name="roomtype_list_json" value=""> 10113 10114 <input id="boardFilter" type="hidden" name="boardFilter" value=""> 10115 <input id="keyBooking0Source" type="hidden" name="keyBooking0Source" value=""> 10116 10117 10118 10119 <input type="hidden" value="" name="priceSeekerHotel" id="priceSeekerHotel"/> 10120 10121 10122 10123 10124 10125 10126 10127 <!-- EXTRA PARAMS --> 10128 10129 <!-- END EXTRA PARAMS --> 10130 10131 <input type="hidden" id="gclid" name="gclid" value="" /> 10132 10133 <input type="hidden" id="using_booking_0" name="using_booking_0" value="" /> 10134 10135 10136 10137 10138 10139 <input type="hidden" id="namespace" name="namespace" value="casas-novas" /> 10140 10141 <div id="booking_engine_title"> 10142 10143 10144 <h4 id="booking_title1">Reservas</h4> 10145 <h4 id="booking_title2">Reserve agora</h4> 10146 <h3 id="best_price">MELHOR PREÃO ON-LINE</h3> 10147 10148 10149 10150 </div> 10151 10152 10153 10154 10155 10156 <div id="contenedor_hotel"> 10157 10158 10159 10160 10161 10162 10163 10164 10165 </div> 10166 10167 <fieldset id="contenedor_fechas"> 10168 <legend class="sr-only">datas</legend> 10169 <div id="fecha_entrada" class="colocar_fechas fecha_entrada"> 10170 <label id="titulo_fecha_entrada" class="float_fecha" for="datepicker1">Data de Chegada</label> 10171 <input type="text" class="float_fecha classdatepicker1" name="startDate" id="datepicker1" tabindex="4" readonly="readonly" autocomplete="off"/> 10172 </div> 10173 <div id="fecha_salida" class="colocar_fechas fecha_salida"> 10174 <label id="titulo_fecha_salida" class="float_fecha" for="datepicker2">Data de SaÃda</label> 10175 <input type="text" class="float_fecha classdatepicker2" name="endDate" id="datepicker2" tabindex="5" readonly="readonly" autocomplete="off"/> 10176 </div> 10177 <div id="contador_noches" class="colocar_fechas"> 10178 <p class="float_fecha">Número de noites: X</p> 10179 </div> 10180 </fieldset> 10181 10182 10183 <fieldset id="contenedor_habitaciones" > 10184 <legend class="sr-only">Quartos</legend> 10185 <label for="selector_habitaciones"> Quartos </label> 10186 <select id="selector_habitaciones" name="numRooms" onchange="mostrarHabitaciones(this.value);" tabindex="6"> 10187 10188 <option value="1" selected="selected">1</option> 10189 10190 <option value="2" >2</option> 10191 10192 <option value="3" >3</option> 10193 10194 </select> 10195 </fieldset> 10196 <fieldset id="contenedor_opciones" class="contenedor_opciones_babies"> 10197 <legend class="sr-only">Ocupação</legend> 10198 <div id="hab1"> 10199 <label class="numero_habitacion"> Quarto 1</label> 10200 <div class="adultos numero_personas"> 10201 <label class="selector_adultos" id="titulo_adultos">Adultos</label> 10202 <select class="selector_adultos" id="hab1_adultos" name="adultsRoom1" tabindex="7"> 10203 10204 <option value="1" >1</option> 10205 10206 <option value="2" selected="selected">2</option> 10207 10208 <option value="3" >3</option> 10209 10210 <option value="4" >4</option> 10211 10212 <option value="5" >5</option> 10213 10214 <option value="6" >6</option> 10215 10216 <option value="7" >7</option> 10217 10218 <option value="8" >8</option> 10219 10220 </select> 10221 </div> 10222 <div class="ninos numero_personas ninos-con-babies" title="Bebés grátis"> 10223 <label for="childrenRoom1" id="titulo_ninos" class="selector_ninos">Crianças</label> 10224 <select id="hab1_ninos" class="selector_ninos" name="childrenRoom1" onchange="" tabindex="8"> 10225 10226 <option value="0" selected="selected" > 10227 10228 0 10229 10230 </option> 10231 10232 <option value="1" > 10233 10234 1 10235 10236 </option> 10237 10238 <option value="2" > 10239 10240 2 10241 10242 </option> 10243 10244 <option value="3" > 10245 10246 3 10247 10248 </option> 10249 10250 <option value="4" > 10251 10252 4 10253 10254 </option> 10255 10256 </select> 10257 <label id="info_ninos" class="selector_ninos"> 10258 10259 10260 (De 4 a 12 anos) 10261 10262 10263 </label> 10264 </div> 10265 10266 10267 <div class="numero_personas bebes"> 10268 <label class="selector_bebes">Bebés </label> 10269 <select id="hab1_bebes" class="selector_bebes" name="babiesRoom1" onchange="" tabindex="9"> 10270 10271 <option value="0" >0</option> 10272 10273 <option value="1" >1</option> 10274 10275 <option value="2" >2</option> 10276 10277 </select> 10278 </div> 10279 10280 </div> 10281 10282 10283 <div id="hab2"> 10284 <label class="numero_habitacion">Quarto 2</label> 10285 <div class="adultos numero_personas"> 10286 <select class="selector_adultos" id="hab2_adultos" name="adultsRoom2" tabindex="10"> 10287 10288 <option value="1" >1</option> 10289 10290 <option value="2" selected="selected">2</option> 10291 10292 <option value="3" >3</option> 10293 10294 <option value="4" >4</option> 10295 10296 <option value="5" >5</option> 10297 10298 <option value="6" >6</option> 10299 10300 <option value="7" >7</option> 10301 10302 <option value="8" >8</option> 10303 10304 </select> 10305 </div> 10306 <div class="ninos numero_personas ninos-con-babies" title="Bebés grátis"> 10307 <select id="hab2_ninos" class="selector_ninos" name="childrenRoom2" onchange="" tabindex="11"> 10308 10309 <option value="0" selected="selected" > 10310 10311 0 10312 10313 </option> 10314 10315 <option value="1" > 10316 10317 1 10318 10319 </option> 10320 10321 <option value="2" > 10322 10323 2 10324 10325 </option> 10326 10327 <option value="3" > 10328 10329 3 10330 10331 </option> 10332 10333 <option value="4" > 10334 10335 4 10336 10337 </option> 10338 10339 </select> 10340 </div> 10341 10342 10343 <div class="numero_personas bebes"> 10344 <select id="hab2_bebes" class="selector_bebes" name="babiesRoom2" onchange="" tabindex="12"> 10345 <option value="0" selected="selected">0</option> 10346 <option value="1">1</option> 10347 <option value="2">2</option> 10348 </select> 10349 </div> 10350 10351 </div> 10352 10353 <div id="hab3"> 10354 <label class="numero_habitacion">Quarto 3</label> 10355 <div class="adultos numero_personas"> 10356 <select class="selector_adultos" id="hab3_adultos" name="adultsRoom3" tabindex="13"> 10357 10358 <option value="1" >1</option> 10359 10360 <option value="2" selected="selected">2</option> 10361 10362 <option value="3" >3</option> 10363 10364 <option value="4" >4</option> 10365 10366 <option value="5" >5</option> 10367 10368 <option value="6" >6</option> 10369 10370 <option value="7" >7</option> 10371 10372 <option value="8" >8</option> 10373 10374 </select> 10375 </div> 10376 <div class="ninos numero_personas ninos-con-babies" title="Bebés grátis"> 10377 <select id="hab3_ninos" class="selector_ninos" name="childrenRoom3" onchange="" tabindex="14"> 10378 10379 <option value="0" selected="selected" > 10380 10381 0 10382 10383 </option> 10384 10385 <option value="1" > 10386 10387 1 10388 10389 </option> 10390 10391 <option value="2" > 10392 10393 2 10394 10395 </option> 10396 10397 <option value="3" > 10398 10399 3 10400 10401 </option> 10402 10403 <option value="4" > 10404 10405 4 10406 10407 </option> 10408 10409 </select> 10410 </div> 10411 10412 10413 <div class="numero_personas bebes"> 10414 <select id="hab3_bebes" class="selector_bebes" name="babiesRoom3" onchange="" tabindex="15"> 10415 <option value="0" selected="selected">0</option> 10416 <option value="1">1</option> 10417 <option value="2">2</option> 10418 </select> 10419 </div> 10420 10421 </div> 10422 </fieldset> 10423 10424 <fieldset id="envio"> 10425 <legend class="sr-only">Reservar</legend> 10426 10427 <input type="text" id="promocode" class="colocar_envio promocode_input_class" name="promocode" aria-label="Código Promocional" 10428 placeholder="Código Promocional" 10429 value="" 10430 tabindex="16"> 10431 10432 10433 10434 10435 <button type="submit" onclick="$(this).addClass('clicked_button');return bookingSearchWithAgeSelection2() " id="search-button" class="colocar_envio buttonsearch-ratecheck" tabindex="17">Reservar</button> 10436 <div id="envio_spinner"></div> 10437 </fieldset> 10438 10439 10440 10441 <input type="hidden" id="booking-search-popup" name="booking-search-popup" value="true"> 10442 10443
10443<script> 10444 10445 function show_booking_search_popup(myForm) { 10446 if (typeof(sending_form_custom_from_paraty) == 'undefined'){ 10447 sending_form_custom_from_paraty = true; 10448 setTimeout( function(myForm) { openBookingSearchPopup(myForm); }, 1000, myForm ); 10449 } 10450 }; 10451 10452 function openBookingSearchPopup(myForm) { 10453 10454 return openBookingSearchPopup_v2(myForm); 10455 10456 10457 var elements = [ 10458 10459 ] 10460 10461 var popup_description = ""; 10462 if (typeof(custom_popup_loading_description) != 'undefined') { 10463 popup_description = custom_popup_loading_description; 10464 } 10465 10466 10467 10468 showGallery(elements); 10469 10470 10471 myForm.submit(); 10472 10473 } 10474 10475 function openBookingSearchPopup_v2(myForm, show_popup=true) { 10476 10477 if ((window.location !== window.parent.location) && show_popup) { 10478 const parentMessage = { 10479 message: 'resize_iframe', 10480 height: 700, 10481 }; 10482 10483 window.parent.postMessage(parentMessage, '*'); 10484 } 10485 10486 var container_booking_popup = $('<div></div>').addClass('container_popup_booking').css('text-align', 'center'), 10487 loading_popup_top_text = `Atualizando para continuar com sua reserva`; 10488 10489 10490 var loading_popup_top_text = $("<img src='https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb'>"); 10491 10492 10493 if ($('.logo_namespace').length) { 10494 var logo_namespace = $("input[name='namespace']").val(); 10495 var url_logo = $('#logo_' + logo_namespace).val(); 10496 loading_popup_top_text = $("<img src='"+ url_logo +"'>"); 10497 } 10498 10499 let loading_popup_bottom_text = `<div><font color='#030303'> Verificando a disponibilidade da sua pesquisa:<br /> <br /> De <strong>@@start_date@@</strong> até <strong>@@end_date@@</strong></font></div>`, 10500 descipription_top_booking_popup = $("<div></div>").addClass('description_top_popup_booking').html(loading_popup_top_text); 10501 10502 const specialLoadingTextElem = $('input[name="special_loading_text"]'); 10503 if(specialLoadingTextElem.length && specialLoadingTextElem.val()){ 10504 loading_popup_bottom_text = specialLoadingTextElem.val(); 10505 } 10506 10507 let descipription_bottom_booking_popup = $("<div></div>").addClass('description_bottom_popup_booking').html(loading_popup_bottom_text), 10508 gif_wrapper = $("<div></div>").addClass('gif_wrapper'), 10509 number_of_lines = 20; 10510 10511 for (var x = 0; x < number_of_lines; x++) { 10512 var target_delay_css = { 10513 '-webkit-animation-delay': -(1.5 - (0.1 * x)) + 's', 10514 '-moz-animation-delay': -(1.5 - (0.1 * x)) + 's', 10515 '-o-animation-delay': -(1.5 - (0.1 * x)) + 's', 10516 'animation-delay': -(1.5 - (0.1 * x)) + 's' 10517 }; 10518 var element_line_to_append = $("<div></div>").addClass("default_line_loading").css(target_delay_css); 10519 10520 element_line_to_append.css('background', '#3E5902'); 10521 10522 10523 element_line_to_append.appendTo(gif_wrapper); 10524 } 10525 10526 10527 container_booking_popup.css('border', '1px solid #3E5902'); 10528 10529 10530 10531 10532 10533 10534 10535 container_booking_popup.append(descipription_top_booking_popup).append(gif_wrapper).append(descipription_bottom_booking_popup); 10536 10537 10538 var selected_start_date = $("input.has_datepicker[name='startDate']").val() || $("input[name='startDate']").val(); 10539 selected_end_date = $("input.has_datepicker[name='endDate']").val() || $("input[name='endDate']").val(); 10540 if(selected_start_date === ''){ 10541 var today = new Date(); 10542 var dd = today.getDate(); 10543 var mm = today.getMonth()+1; //January is 0! 10544 var yyyy = today.getFullYear(); 10545 if(dd<10) {dd = '0'+dd} 10546 if(mm<10) {mm = '0'+mm} 10547 today = dd + '/' + mm + '/' + yyyy; 10548 selected_start_date = today; 10549 } 10550 10551 var custom_format_date = ""; 10552 if (custom_format_date) { 10553 10554 var splitted_start_date = selected_start_date.split("/"), 10555 start_day = splitted_start_date[0], 10556 start_month = splitted_start_date[1], 10557 start_year = splitted_start_date[2], 10558 start_datetime = new Date(start_year, start_month - 1, start_day), 10559 week_start_day = start_datetime.getDay(); 10560 10561 var splitted_end_date = selected_end_date.split("/"), 10562 end_day = splitted_end_date[0], 10563 end_month = splitted_end_date[1], 10564 end_year = splitted_end_date[2], 10565 end_datetime = new Date(end_year, end_month - 1, end_day), 10566 week_end_day = end_datetime.getDay(); 10567 10568 var days_list = $.datepicker._defaults.dayNames; 10569 10570 //Start date 10571 selected_start_date = custom_format_date.replace("%m", start_month).replace("%d", start_day).replace("%Y", start_year); 10572 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]); 10573 10574 //End date 10575 selected_end_date = custom_format_date.replace("%m", end_month).replace("%d", end_day).replace("%Y", end_year); 10576 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]); 10577 } 10578 10579 //Protection for failures 10580 if(selected_start_date.indexOf('NaN') > -1 || selected_end_date.indexOf('NaN')){ 10581 container_booking_popup.html(container_booking_popup.html().replace("@@start_date@@", selected_start_date).replace("@@end_date@@", selected_end_date)); 10582 } else { 10583 container_booking_popup.find(".description_bottom_popup_booking").remove(); 10584 } 10585 if (show_popup) { 10586 var fancybox_params = { 10587 width: 'auto', 10588 maxWidth: 800, 10589 height: 'auto', 10590 fitToView: false, 10591 autoSize: false, 10592 padding: 0, 10593 closeClick: false, 10594 closeBtn: false, 10595 helpers: { 10596 overlay: { 10597 css: 10598 {'background': '#FFFFFF'}, 10599 closeClick: false 10600 } // prevents closing when clicking OUTSIDE fancybox 10601 }, 10602 wrapCSS: 'fancy-booking-search_v2 full_screen_engine custom_color_overlay', 10603 beforeShow: function () { 10604 $('.fancybox-bg').css('background', '#FFFFFF');
10605 if (typeof (cookiesController) !== 'undefined' && cookiesController.search_cookie("step_history_back")) { 10606 cookiesController.delete_cookie("step_history_back"); 10607 } 10608 } 10609 }; 10610 if ($.fancybox.version.slice(0, 2) === '3.') { 10611 fancybox_params['baseClass'] = 'fancybox-wrap fancy-booking-search_v2 full_screen_engine custom_color_overlay'; 10612 fancybox_params['modal'] = true; 10613 $.fancybox.open(container_booking_popup, fancybox_params); 10614 } else { 10615 $.fancybox(container_booking_popup, fancybox_params); 10616 } 10617 if (myForm) { 10618 if (!navigator.userAgent.match(/chrome/i) && (navigator.userAgent.match(/safari/i) || !navigator.userAgent.match(/firefox/i))) { 10619 setTimeout(function () { 10620 myForm.submit(); 10621 }, 700); 10622 } else { 10623 myForm.submit(); 10624 } 10625 } 10626 } 10627 } 10628 10629 10630 10631 10632 function showGallery(elements) { 10633 $.fancybox(elements, { 10634 'modal': true, 10635 'closeBtn': false, 10636 'autoPlay': true, 10637 'playSpeed': 3000, 10638 'prevEffect': 'none', 10639 'nextEffect': 'none', 10640 'type': 'image', 10641 'arrows': false, 10642 'nextClick': false, 10643 'mouseWheel': false, 10644 'helpers': { 10645 title: { 10646 type: 'outside' 10647 }, 10648 overlay: { 10649 opacity: 0.8, 10650 css: { 10651 'background-color': '#000' 10652 } 10653 } 10654 }, 10655 'padding': 0 10656 }); 10657 } 10658 10659 </script>
10659 10660 10661 10662 10663 </form> 10664 10665 10666 10667 </div> 10668 10669 10670 <!-- Javascript at the bottom to increase speed --> 10671 10672
10673<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>
10673 10674 10675
10676<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>
10676 10677 10678 10679<!-- Javascript at the bottom to increase speed --> 10680 10681 10682<style> 10683.ui-dialog { 10684 position: absolute; 10685 top: 0; 10686 left: 0; 10687 padding: .2em; 10688 outline: 0; 10689} 10690.ui-dialog .ui-dialog-titlebar { 10691 padding: .4em 1em; 10692 position: relative; 10693} 10694.ui-dialog .ui-dialog-title { 10695 float: left; 10696 margin: .1em 0; 10697 white-space: nowrap; 10698 width: 90%; 10699 overflow: hidden; 10700 text-overflow: ellipsis; 10701} 10702.ui-dialog .ui-dialog-titlebar-close { 10703 position: absolute; 10704 right: .3em; 10705 top: 50%; 10706 width: 21px; 10707 margin: -10px 0 0 0; 10708 padding: 1px; 10709 height: 20px; 10710} 10711.ui-dialog .ui-dialog-content { 10712 position: relative; 10713 border: 0; 10714 padding: .5em 1em; 10715 background: none; 10716 overflow: auto; 10717 text-align: center; 10718} 10719.ui-dialog .ui-dialog-buttonpane { 10720 text-align: left; 10721 border-width: 1px 0 0 0; 10722 background-image: none; 10723 margin-top: .5em; 10724 padding: .3em 1em .5em .4em; 10725} 10726.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 10727 /*float: right;*/ 10728 float: none; 10729 text-align: center; 10730} 10731.ui-dialog .ui-dialog-buttonpane button { 10732 margin: .5em .4em .5em 0; 10733 cursor: pointer; 10734} 10735.ui-dialog .ui-resizable-se { 10736 width: 12px; 10737 height: 12px; 10738 right: -5px; 10739 bottom: -5px; 10740 background-position: 16px 16px; 10741} 10742.ui-dialog .ui-button-text { 10743 /*padding: 10px;*/ 10744 /*margin: 10px;*/ 10745} 10746 10747.ui-dialog .ui-button{ 10748 /*height: 30px;*/ 10749} 10750 10751.ui-draggable .ui-dialog-titlebar { 10752 cursor: move; 10753} 10754 10755.ui-dialog { 10756 min-width: 300px; 10757 z-index: 9999; 10758} 10759 10760</style> 10761 10762 <style> 10763 .ui-dialog-titlebar-close { 10764 display: none !important; 10765 } 10766 10767 #dialog-form{ 10768 padding: 10px; 10769 } 10770 10771 .ui-dialog-titlebar{ 10772 padding: 5px; 10773 } 10774 10775 .kidAgesSelect{ 10776 margin-left: 10px; 10777 10778 } 10779 10780 10781</style> 10782 10783<!-- New style Age popup --> 10784<style> 10785body .ui-widget-overlay.ui-front { 10786 background: rgba(0, 0, 0, 0.6); 10787 opacity: 1; 10788 z-index: 9998; 10789 position: fixed; 10790} 10791body .ui-dialog.ui-widget { 10792 padding: 20px 10px; 10793 border: 0; 10794 border-radius: 0; 10795 line-height: 1; 10796 max-width: 370px; 10797 width: 100% !important; 10798 box-sizing: border-box; 10799} 10800body .ui-dialog.ui-widget .ui-dialog-titlebar { 10801 background: none!important; 10802 padding: 0 0 20px 0; 10803 border-radius: 0; 10804 border: 0; 10805 color: black!important; 10806 border-bottom: 1px solid rgba(0, 0, 0, 0.2); 10807 text-align: center; 10808 margin-bottom: 20px; 10809} 10810body .ui-dialog.ui-widget .ui-dialog-titlebar .ui-dialog-title { 10811 width: 100%; 10812 margin: 0; 10813} 10814body .ui-dialog.ui-widget #dialog-form { 10815 padding: 0; 10816 text-align: left; 10817 width: 100% !important; 10818 max-width: 350px; 10819} 10820body .ui-dialog.ui-widget #dialog-form form label { 10821 clear: both; 10822 width: 100%; 10823 float: left; 10824} 10825body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids { 10826 display: inline-block; 10827 width: 100%; 10828 float: left; 10829} 10830body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select { 10831 width: calc((100% - 10px)/2); 10832 margin: 0px 10px 10px 0; 10833 float: left; 10834 -webkit-appearance: none; 10835 -moz-appearance: none; 10836 appearance: none; 10837 border-radius: 0; 10838 padding: 5px 10px; 10839} 10840body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(even) { 10841 margin-right: 0; 10842} 10843body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(-n+2) { 10844 margin-top: 10px; 10845} 10846body .ui-dialog.ui-widget .ui-dialog-buttonpane { 10847 margin: 0; 10848 padding: 0; 10849 vertical-align: bottom; 10850 display: inline-block; 10851 float: left; 10852 width: 100% !important; 10853 max-width: 350px; 10854 border-radius: 0; 10855 margin-top: 10px; 10856} 10857body .ui-dialog.ui-widget .ui-dialog-buttonpane .ui-button { 10858 margin: 0; 10859 display: inline-block; 10860 width: 100% !important; 10861 max-width: 350px; 10862 border-radius: 0; 10863 background: #446ca9; 10864 color:white; 10865} 10866body .ui-dialog.ui-widget .ui-resizable-handle { 10867 display: none; 10868} 10869</style> 10870<!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" type="text/css"/> --> 10871 <div id="dialog-form" title="As idades das crianças" style="display:none"> 10872 <form> 10873 10874 <label id="label1" for="name">Quarto 1</label> 10875 <div class="wrapper_age_kids clearfix"> 10876 10877 10878 10879 <select class="kidAgesSelect" id="agesRoom1_1" name="name" tabindex="1"> 10880 10881 <option value="4" selected="selected">4</option> 10882 10883 <option value="5" >5</option> 10884 10885 <option value="6" >6</option> 10886 10887 <option value="7" >7</option> 10888 10889 <option value="8" >8</option> 10890 10891 <option value="9" >9</option> 10892 10893 <option value="10" >10</option> 10894 10895 <option value="11" >11</option> 10896 10897 <option value="12" >12</option> 10898 10899 </select> 10900 10901 10902 10903 <select class="kidAgesSelect" id="agesRoom1_2" name="name" tabindex="1"> 10904 10905 <option value="4" selected="selected">4</option> 10906 10907 <option value="5" >5</option> 10908 10909 <option value="6" >6</option> 10910 10911 <option value="7" >7</option> 10912 10913 <option value="8" >8</option> 10914 10915 <option value="9" >9</option> 10916 10917 <option value="10" >10</option> 10918 10919 <option value="11" >11</option> 10920 10921 <option value="12" >12</option> 10922 10923 </select> 10924 10925 10926 10927 <select class="kidAgesSelect" id="agesRoom1_3" name="name" tabindex="1"> 10928 10929 <option value="4" selected="selected">4</option> 10930 10931 <option value="5" >5</option> 10932 10933 <option value="6" >6</option> 10934 10935 <option value="7" >7</option> 10936 10937 <option value="8" >8</option> 10938 10939 <option value="9" >9</option> 10940 10941 <option value="10" >10</option> 10942 10943 <option value="11" >11</option> 10944 10945 <option value="12" >12</option> 10946 10947 </select> 10948 10949 10950 10951 <select class="kidAgesSelect" id="agesRoom1_4" name="name" tabindex="1"> 10952 10953 <option value="4" selected="selected">4</option> 10954 10955 <option value="5" >5</option> 10956 10957 <option value="6" >6</option> 10958 10959 <option value="7" >7</option> 10960 10961 <option value="8" >8</option> 10962 10963 <option value="9" >9</option> 10964 10965 <option value="10" >10</option> 10966 10967 <option value="11" >11</option> 10968 10969 <option value="12" >12</option> 10970 10971 </select> 10972 10973 10974 10975 </div> 10976 10977 10978 <label id="label2" for="name">Quarto 2</label> 10979 <div class="wrapper_age_kids clearfix"> 10980 10981 10982 10983 <select class="kidAgesSelect" id="agesRoom2_1" name="name" tabindex="1"> 10984 10985 <option value="4" selected="selected">4</option> 10986 10987 <option value="5" >5</option> 10988 10989 <option value="6" >6</option> 10990 10991 <option value="7" >7</option> 10992 10993 <option value="8" >8</option> 10994 10995 <option value="9" >9</option> 10996 10997 <option value="10" >10</option> 10998 10999 <option value="11" >11</option> 11000 11001 <option value="12" >12</option> 11002 11003 </select> 11004 11005 11006 11007 <select class="kidAgesSelect" id="agesRoom2_2" name="name" tabindex="1"> 11008 11009 <option value="4" selected="selected">4</option> 11010 11011 <option value="5" >5</option> 11012 11013 <option value="6" >6</option> 11014 11015 <option value="7" >7</option> 11016 11017 <option value="8" >8</option> 11018 11019 <option value="9" >9</option> 11020 11021 <option value="10" >10</option> 11022 11023 <option value="11" >11</option> 11024 11025 <option value="12" >12</option> 11026 11027 </select> 11028 11029 11030 11031 <select class="kidAgesSelect" id="agesRoom2_3" name="name" tabindex="1"> 11032 11033 <option value="4" selected="selected">4</option> 11034 11035 <option value="5" >5</option> 11036 11037 <option value="6" >6</option> 11038 11039 <option value="7" >7</option> 11040 11041 <option value="8" >8</option> 11042 11043 <option value="9" >9</option> 11044 11045 <option value="10" >10</option> 11046 11047 <option value="11" >11</option> 11048 11049 <option value="12" >12</option> 11050 11051 </select> 11052 11053 11054 11055 <select class="kidAgesSelect" id="agesRoom2_4" name="name" tabindex="1"> 11056 11057 <option value="4" selected="selected">4</option> 11058 11059 <option value="5" >5</option> 11060 11061 <option value="6" >6</option> 11062 11063 <option value="7" >7</option> 11064 11065 <option value="8" >8</option> 11066 11067 <option value="9" >9</option> 11068 11069 <option value="10" >10</option> 11070 11071 <option value="11" >11</option> 11072 11073 <option value="12" >12</option> 11074 11075 </select> 11076 11077 11078 11079 </div> 11080 11081 11082 <label id="label3" for="name">Quarto 3</label> 11083 <div class="wrapper_age_kids clearfix"> 11084 11085 11086 11087 <select class="kidAgesSelect" id="agesRoom3_1" name="name" tabindex="1"> 11088 11089 <option value="4" selected="selected">4</option> 11090 11091 <option value="5" >5</option> 11092 11093 <option value="6" >6</option> 11094 11095 <option value="7" >7</option> 11096 11097 <option value="8" >8</option> 11098 11099 <option value="9" >9</option> 11100 11101 <option value="10" >10</option> 11102 11103 <option value="11" >11</option> 11104 11105 <option value="12" >12</option> 11106 11107 </select> 11108 11109 11110 11111 <select class="kidAgesSelect" id="agesRoom3_2" name="name" tabindex="1"> 11112 11113 <option value="4" selected="selected">4</option> 11114 11115 <option value="5" >5</option> 11116 11117 <option value="6" >6</option> 11118 11119 <option value="7" >7</option> 11120 11121 <option value="8" >8</option> 11122 11123 <option value="9" >9</option> 11124 11125 <option value="10" >10</option> 11126 11127 <option value="11" >11</option> 11128 11129 <option value="12" >12</option> 11130 11131 </select> 11132 11133 11134 11135 <select class="kidAgesSelect" id="agesRoom3_3" name="name" tabindex="1"> 11136 11137 <option value="4" selected="selected">4</option> 11138 11139 <option value="5" >5</option> 11140 11141 <option value="6" >6</option> 11142 11143 <option value="7" >7</option> 11144 11145 <option value="8" >8</option> 11146 11147 <option value="9" >9</option> 11148 11149 <option value="10" >10</option> 11150 11151 <option value="11" >11</option> 11152 11153 <option value="12" >12</option> 11154 11155 </select> 11156 11157 11158 11159 <select class="kidAgesSelect" id="agesRoom3_4" 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 </div> 11184 11185 11186 </form> 11187</div> 11188
11189<script type="text/javascript"> 11190 11191 function sendActiveForm_booking_engine2() { 11192 11193 $(".booking_form").each(function () { 11194 if ($(this).find(".submit_button").css("display") == "none" || $(this).find(".submit_button").hasClass('clicked_button')) { 11195 if ($('#booking-search-popup').length) { 11196 show_booking_search_popup($(this)); 11197 return false; 11198 } 11199 11200 $(this).submit(); 11201 return true; 11202 } 11203 }); 11204 11205 $("#searchForm").each(function () { 11206 if ($(this).find("#search-button").css("display") == "none") { 11207 if ($('#booking-search-popup').length) { 11208 show_booking_search_popup($(this)); 11209 return false; 11210 } 11211 11212 $(this).submit(); 11213 return true; 11214 } 11215 }); 11216 11217 11218 } 11219 11220function bookingSearchWithAgeSelection2(){ 11221 if (!checkDates()){ 11222 return false; 11223 }; 11224 11225 kids1 = $('#hab1_ninos').val(); 11226 kids2 = $('#hab2_ninos').val(); 11227 kids3 = $('#hab3_ninos').val(); 11228 numRooms = $("input[name='numRooms']").val(); 11229 11230 if (kids1 == "0" && (kids2 == "0" || numRooms == '1') && (kids3 == "0" || numRooms == '1' || numRooms == '2')){ 11231 if (bookingSearch()){ 11232 11233 $('#searchForm').submit(); 11234 } 11235 } else { 11236 updateAgesOptions2(); 11237 $("#dialog-form").dialog("open"); 11238 return false; 11239 } 11240} 11241 11242function updateAgesOptions2() { 11243 11244 var numHab = $("#selector_habitaciones").val(); 11245 11246 for ( var i = 3; i > 0; i--) { 11247 11248 $("#label" + i).hide(); 11249 $("#dialog-form #agesRoom" + i + "_1, #full_wrapper_booking #agesRoom" + i +"_1").hide(); 11250 $("#dialog-form #agesRoom" + i + "_2, #full_wrapper_booking #agesRoom" + i +"_2").hide(); 11251 $("#dialog-form #agesRoom" + i + "_3, #full_wrapper_booking #agesRoom" + i +"_3").hide(); 11252 $("#dialog-form #agesRoom" + i + "_4, #full_wrapper_booking #agesRoom" + i +"_4").hide(); 11253 } 11254 for ( var i = numHab; i > 0; i--) { 11255 numKids = $("#hab" + i + "_ninos").val(); 11256 if (numKids > 0){ 11257 $("#label" + i).show(); 11258 11259 $("#dialog-form #agesRoom" + i + "_1, #full_wrapper_booking #agesRoom" + i +"_1").show(); 11260 if (numKids > 1) 11261 $("#dialog-form #agesRoom" + i + "_2, #full_wrapper_booking #agesRoom" + i +"_2").show(); 11262 if (numKids > 2) 11263 $("#dialog-form #agesRoom" + i + "_3, #full_wrapper_booking #agesRoom" + i +"_3").show(); 11264 if (numKids > 3) 11265 $("#dialog-form #agesRoom" + i + "_4, #full_wrapper_booking #agesRoom" + i +"_4").show(); 11266 } 11267 } 11268} 11269 11270$(function() { 11271 if (!$("#dialog-form").hasClass('ui-dialog-content')) { 11272 $("#dialog-form").dialog({ 11273 width: "auto", 11274 autoOpen: false, 11275 11276 modal: true, 11277 buttons: { 11278 "Continuar": function() { 11279 $( this ).dialog( "close" ); 11280 var dialog_wrapper = $(this); 11281 11282 $("input[name='agesKid1']").each(function() { 11283 var age_1_1 = dialog_wrapper.find("#agesRoom1_1").val(); 11284 var age_1_2 = dialog_wrapper.find("#agesRoom1_2").val(); 11285 var age_1_3 = dialog_wrapper.find("#agesRoom1_3").val(); 11286 var age_1_4 = dialog_wrapper.find("#agesRoom1_4").val(); 11287 $(this).val(age_1_1 + ";" + age_1_2 + ";" + age_1_3 + ";" + age_1_4); 11288 }); 11289 $("input[name='agesKid2']").each(function () { 11290 var age_2_1 = dialog_wrapper.find("#agesRoom2_1").val(); 11291 var age_2_2 = dialog_wrapper.find("#agesRoom2_2").val(); 11292 var age_2_3 = dialog_wrapper.find("#agesRoom2_3").val(); 11293 var age_2_4 = dialog_wrapper.find("#agesRoom2_4").val(); 11294 $(this).val(age_2_1 + ";" + age_2_2 + ";" + age_2_3 + ";" + age_2_4); 11295 }); 11296 $("input[name='agesKid3']").each(function () { 11297 var age_3_1 = dialog_wrapper.find("#agesRoom3_1").val(); 11298 var age_3_2 = dialog_wrapper.find("#agesRoom3_2").val(); 11299 var age_3_3 = dialog_wrapper.find("#agesRoom3_3").val(); 11300 var age_3_4 = dialog_wrapper.find("#agesRoom3_4").val(); 11301 $(this).val(age_3_1 + ";" + age_3_2 + ";" + age_3_3 + ";" + age_3_4); 11302 }); 11303 11304 bookingSearch(); 11305 sendActiveForm_booking_engine2(); 11306 } 11307 } 11308 }); 11309 } 11310 11311 updateAgesOptions2(1); 11312}); 11313</script>
11313 11314 11315
11316<script type="text/javascript"> 11317 11318 11319 11320 var datePicker1Selector = ".classdatepicker1"; 11321 var datePicker2Selector = ".classdatepicker2"; 11322 11323 11324 11325 11326$("#hotel_destino").change(function() { 11327 var action = $(this).val(); 11328 $("#searchForm").attr("action", action); 11329 var newNamespace = namespaces[action]; 11330 $("#namespace").val(newNamespace); 11331 11332 }); 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342$(function(){ 11343 $.datepicker.setDefaults($.datepicker.regional["pt"]); 11344}); 11345 11346var checkDates = function() { 11347 11348 11349 var date1_str = $(datePicker1Selector).val(); 11350 var date2_str = $(datePicker2Selector).val(); 11351 11352 if (date1_str == "" || date2_str == ""){ 11353 return false; 11354 } else { 11355 return true; 11356 } 11357} 11358 11359$(document).ready(function () { 11360 11361 if ($('#internalStartDate').length != 0) { 11362 var startDate = $('#internalStartDate').val(); 11363 var startYear = startDate.substring(0,4); 11364 var startMonth = startDate.substring(5,7); 11365 var startDay = startDate.substring(8,10); 11366 var startParse = startDay + "/" + startMonth + "/" + startYear; 11367 var endDate = $('#internalEndDate').val(); 11368 var endYear = endDate.substring(0,4); 11369 var endMonth = endDate.substring(5,7); 11370 var endDay = endDate.substring(8,10); 11371 var endParse = endDay + "/" + endMonth + "/" + endYear; 11372 } else { 11373 var startParse = ""; 11374 var endParse = ""; 11375 } 11376 11377 $(datePicker1Selector).val(startParse); 11378 $(datePicker2Selector).val(endParse); 11379 11380 if ($(".internalUrlParamsTransfer").length){ 11381 11382 let target_value = $(".internalUrlParamsTransfer").val(); 11383 if (!$(".transfer_to_booking").length) { 11384 $(".paraty-booking-form").each(function(){ 11385 $(this).append($("<input type='hidden' class='transfer_to_booking' name='transfer_url_params' value='" + target_value + "'>")); 11386 }) 11387 } else { 11388 $(".transfer_to_booking").val(target_value) 11389 } 11390 } 11391 11392 if ($('#internalNumRooms').length != 0){ 11393 11394 $("#selector_habitaciones").val($("#internalNumRooms").val()); 11395 $("#selector_habitaciones").change(); 11396 11397 var internalNum1AdultsRooms = 2; 11398 var internalNum2AdultsRooms = 2; 11399 var internalNum3AdultsRooms = 2; 11400 11401 var internalNum1BabiesRooms = 0; 11402 var internalNum2BabiesRooms = 0; 11403 var internalNum3BabiesRooms = 0; 11404 11405 if ($('#internalNum1AdultsRooms').length != 0) internalNum1AdultsRooms = $("#internalNum1AdultsRooms").val() 11406 if ($('#internalNum2AdultsRooms').length != 0) internalNum2AdultsRooms = $("#internalNum2AdultsRooms").val() 11407 if ($('#internalNum3AdultsRooms').length != 0) internalNum3AdultsRooms = $("#internalNum3AdultsRooms").val() 11408 11409 11410 if ($('#internalNum1BabiesRooms').length != 0) internalNum1BabiesRooms = $("#internalNum1BabiesRooms").val() 11411 if ($('#internalNum2BabiesRooms').length != 0) internalNum2BabiesRooms = $("#internalNum2BabiesRooms").val() 11412 if ($('#internalNum3BabiesRooms').length != 0) internalNum3BabiesRooms = $("#internalNum3BabiesRooms").val() 11413 11414 11415 $("#hab1_adultos").val(internalNum1AdultsRooms); 11416 $("#hab2_adultos").val(internalNum2AdultsRooms); 11417 $("#hab3_adultos").val(internalNum3AdultsRooms); 11418 $("#hab1_ninos").val($("#internalNum1KidsRooms").val()); 11419 $("#hab2_ninos").val($("#internalNum2KidsRooms").val()); 11420 $("#hab3_ninos").val($("#internalNum3KidsRooms").val()); 11421 $("#hab1_bebes").val(internalNum1BabiesRooms); 11422 $("#hab2_bebes").val(internalNum2BabiesRooms); 11423 $("#hab3_bebes").val(internalNum3BabiesRooms); 11424 11425 11426 11427 11428 } 11429 11430 11431if ($("#internalPromocode") && $("#internalPromocode").val()){ 11432 11433 $("#promocode").val($("#internalPromocode").val()); 11434} 11435 11436 11437 11438 11439 if (typeof(DP_extend_info) === 'undefined' || !DP_extend_info.config.initialized || DP_extend_info.config.start_datepicker_input !== datePicker1Selector) { 11440 $(datePicker1Selector).datepicker({ 11441 11442 11443 minDate: new Date(), 11444 altFormat: "dd/mm/yy", 11445 dateFormat: "dd/mm/yy", 11446 11447 onClose: function (selectedDate, inst) { 11448 if (selectedDate) { 11449 var theDate = $.datepicker.parseDate("dd/mm/yy", selectedDate); 11450 11451 var theSelectedDate = $.datepicker.parseDate("dd/mm/yy", selectedDate); 11452 theSelectedDate.setDate(theSelectedDate.getDate()); 11453 $(datePicker1Selector).datepicker('setDate', theSelectedDate); 11454 11455 if (typeof(min_stay_number) != 'undefined'){ 11456 theDate.setDate(theDate.getDate() + min_stay_number); 11457 } else { 11458 theDate.setDate(theDate.getDate() + 1); 11459 } 11460 $(datePicker2Selector).datepicker("option", "minDate", theDate); 11461 $(datePicker2Selector).datepicker('setDate', theDate); 11462 $(this).closest("#contenedor_fechas").find(datePicker2Selector).datepicker("show"); 11463 } 11464 } 11465 }); 11466 11467 11468 $(datePicker2Selector).datepicker({ 11469 11470 11471 minDate: minDateDeparture(), 11472 altFormat: "dd/mm/yy", 11473 dateFormat: "dd/mm/yy" 11474 }); 11475 11476 11477 $(datePicker1Selector).change(function () { 11478 var date2 = $(this).datepicker('getDate', '+3d'); 11479 $(datePicker1Selector).datepicker('setDate', date2); 11480 date2.setDate(date2.getDate() + 1); 11481 $(datePicker2Selector).datepicker('setDate', date2); 11482 checkDates(); 11483 }); 11484 11485 $(datePicker2Selector).change(function () { 11486 var date2 = $(this).datepicker('getDate', '+3d'); 11487 $(datePicker2Selector).datepicker('setDate', date2); 11488 checkDates(); 11489 }); 11490 11491 $(datePicker1Selector).removeAttr('disabled'); 11492 $(datePicker2Selector).removeAttr('disabled'); 11493 } 11494 11495 11496 11497 11498}); 11499 11500 11501 11502 11503function minDateDeparture(){ 11504 11505 if ($(datePicker1Selector).val()){ 11506 var theDate = $.datepicker.parseDate("dd/mm/yy", $(datePicker1Selector).val()); 11507 theDate.setDate(theDate.getDate() + 1 ); 11508 } 11509 else{ 11510 var theDate = new Date(); 11511 } 11512 11513 return theDate; 11514 11515} 11516 11517function mostrarHabitaciones(selector_habitaciones) { 11518 11519 11520 11521 for ( var i = 3; i > selector_habitaciones; i--) { 11522 11523 //$('#hab' + i).hide(); 11524 $('[id="hab'+ i + '"]').each(function() { 11525 $(this).hide(); 11526 }); 11527
11528 //$('#childrenRoom' + (i + 1)).val("0"); 11529 $('[id="childrenRoom'+ (i + 1) + '"]').each(function() { 11530 $(this).val("0"); 11531 }); 11532 } 11533 for ( var i = selector_habitaciones; i > 0; i--) { 11534 //$('#hab' + i).show(); 11535 11536 $('[id="hab'+ i + '"]').each(function() { 11537 $(this).show(); 11538 11539 }); 11540 } 11541} 11542 11543function bookingSearch(){ 11544 11545 if (!checkDates()){ 11546 return false; 11547 } 11548 11549 var destination_input = $("form.paraty-booking-form.motor2").find(".destination"); 11550 if(destination_input.length && destination_input.val() == ''){ 11551 $("form.paraty-booking-form .destination_field, form.paraty-booking-form.motor2 .destination_wrapper").show(); 11552 return false; 11553 } 11554 11555 try { 11556 ga(function (tracker) { 11557 client_id = tracker.get('clientId'); 11558 }); 11559 $('<input>').attr({ 11560 type: 'hidden', 11561 id: '_ga', 11562 name: '_ga', 11563 value: client_id 11564 }).appendTo($("#search-button").closest('form')); 11565 } 11566 catch (err) { 11567 console.log("Google Analytics defined incorrectly (May use a old version)"); 11568 } 11569 11570 var opts = { 11571 lines: 13, // The number of lines to draw 11572 length: 4, // The length of each line 11573 width: 3, // The line thickness 11574 radius: 10, // The radius of the inner circle 11575 rotate: 0, // The rotation offset 11576 color: '#e1e1e1', // #rgb or #rrggbb 11577 speed: 1.5, // Rounds per second 11578 trail: 60, // Afterglow percentage 11579 shadow: false, // Whether to render a shadow 11580 hwaccel: false, // Whether to use hardware acceleration 11581 className: 'spinner', // The CSS class to assign to the spinner 11582 zIndex: 2e9, // The z-index (defaults to 2000000000) 11583 top: 'auto', // Top position relative to parent in px 11584 left: 'auto' // Left position relative to parent in px 11585 }; 11586 11587 11588 var target = document.getElementById('envio_spinner'); 11589 11590 if( $('#booking-search-popup').length ) { 11591 show_booking_search_popup($('#searchForm')); 11592 return false; 11593 11594 } else { 11595 $("#search-button").hide(); 11596 var spinner = new Spinner(opts).spin(target); 11597 $('#searchForm').submit(); 11598 } 11599}; 11600 11601</script>
11601 11602 11603
11604<script> 11605 adult_tag = "Adulto"; 11606 adults_tag = "Adultos"; 11607 kid_tag = "Criança"; 11608 kids_tag = "Crianças"; 11609 baby_tag = "Bebé"; 11610 babies_tag = "Bebés"; 11611 no_dispo_text = "não disponÃvel"; 11612</script>
11612 11613 11614 11615 11616 11617
11618<script async> 11619 ($ => { 11620 if (typeof window.only_once_rescueseeker == "undefined") { 11621 // Reserve synchronously so a concurrent re-injection does not fire a second load. 11622 window.only_once_rescueseeker = 1; 11623 $.getScript("https://rescueseeker-default-697653561069.europe-west1.run.app/static/rescue-seeker/common/js/rescue-seeker-widget.js?v=2") 11624 .done(function (script, textStatus) { 11625 if (typeof RescueSeeker === 'undefined') { 11626 console.error("RESCUE SEEKER: script loaded but global missing"); 11627 window.only_once_rescueseeker = undefined; // release so a later load can retry 11628 return; 11629 } 11630 console.log("RESCUE SEEKER: Main rescue seeker script loaded!"); 11631 11632 11633 RescueSeeker.config.email_controller = 'hotel-webs'; 11634 11635 RescueSeeker.load('casas-novas', 'pt', 'paraty'); 11636 }) 11637 .fail(function (jqxhr, settings, exception) { 11638 window.only_once_rescueseeker = undefined; // release on failure so a later load can retry 11639 console.error("RESCUE SEEKER: Main rescue seeker script NOT loaded!"); 11640 console.error(exception); 11641 }); 11642 } 11643 })(jQuery); 11644</script>
11644 11645 11646 11647 11648 11649 11650 11651</div> 11652 </div> 11653 </div> 11654 </div> 11655 11656<style> 11657 .automatic_floating_picture { 11658 position: fixed; 11659 bottom: 32px; 11660 left: 32px; 11661 z-index: 1000; 11662 transition: .3s all; 11663 } 11664 11665 11666 .automatic_floating_picture.hide_picture{ 11667 opacity: 0; 11668 left: -100%; 11669 } 11670 11671 11672 .automatic_floating_picture .right { 11673 position: fixed; 11674 bottom: 32px; 11675 right: 32px; 11676 z-index: 1000; 11677 } 11678 11679 11680 .automatic_floating_picture img { 11681 width: 100%; 11682 height: 100%; 11683 } 11684 11685 11686</style> 11687 11688<div class="automatic_floating_picture "> 11689 11690</div> 11691 11692 11693 11694 11695
11696<script> 11697 $(document).on('popupSeekerReady', function () { 11698 const sid = new URL(window.location.href).searchParams.get('sid'); 11699 const sidParam = sid ? `&sid=${encodeURIComponent(sid)}` : ''; 11700 $.post(`/utils?action=get_last_search&namespace=casas-novas${sidParam}`) 11701 .done(function (data) { 11702 if (data.event_name && data.event_data) { 11703 $(document).trigger(data.event_name, data.event_data); 11704 } 11705 }) 11706 .fail(function (jqxhr, settings, exception) { 11707 console.error("LAST SEARCH: get_last_search request failed!"); 11708 console.error(exception); 11709 }); 11710 }); 11711 11712 $(document).on('last_search.copy_url', function (event, eventData) { 11713 const shareElement = $("#share_last_search"); 11714 const path = (shareElement.data('link') || '').trim() || window.last_search?.search_url; 11715 11716 if (!path) { 11717 showCopyErrorNotification(''); 11718 return; 11719 } 11720 11721 const link = window.location.origin + path; 11722 11723 if (navigator.clipboard && navigator.clipboard.writeText) { 11724 navigator.clipboard.writeText(link).then(function() { 11725 showCopySuccessNotification(); 11726 }).catch(function(err) { 11727 fallbackCopyToClipboard(link); 11728 }); 11729 } else { 11730 fallbackCopyToClipboard(link); 11731 } 11732 11733 // Fallback for older browsers or errors 11734 function fallbackCopyToClipboard(text) { 11735 try { 11736 const tempInput = $('<input>'); 11737 $('body').append(tempInput); 11738 tempInput.val(text).select(); 11739 11740 const successful = document.execCommand('copy'); 11741 tempInput.remove(); 11742 11743 if (successful) { 11744 showCopySuccessNotification(); 11745 } else { 11746 showCopyErrorNotification(text); 11747 } 11748 } catch (err) { 11749 showCopyErrorNotification(text); 11750 } 11751 } 11752 11753 function showCopySuccessNotification() { 11754 try { 11755 $(document).trigger("notification.popup.seeker", { 11756 type: 'success', 11757 title: 'Copiado!', 11758 content: 'O link de pesquisa foi copiado para sua área de transferência' 11759 }); 11760 } catch { 11761 alert('O link de pesquisa foi copiado para sua área de transferência'); 11762 } 11763 } 11764 11765 function showCopyErrorNotification(link) { 11766 try { 11767 $(document).trigger("notification.popup.seeker", { 11768 type: 'error', 11769 title: "Erro de cópia", 11770 content: `Você não pode copiar o link para a área de transferência. Experimente novamente ou copie o URL manualmente. ${link}` 11771 }); 11772 } catch { 11773 alert(`Você não pode copiar o link para a área de transferência. Experimente novamente ou copie o URL manualmente. ${link}`); 11774 } 11775 } 11776 }); 11777</script>
11777<script data-cookieconsent="ignore" src="https://popup-seeker-296770026789.europe-west1.run.app/script.js?v=1.00"></script>
vendor: 1 bytes, line 11777
11777
11778<script> 11779 $(function () { 11780 try { 11781 POPUP_SEEKER.init({ 11782 11783 11784 11785 public_captcha_key: '6LcKsfMZAAAAAEL5D4XaIPZ7t_kNWm3pFaKv_dOn', 11786 11787 language_code: 'pt', 11788 hotel_code: 'casas-novas', 11789 11790 is_mobile: false, 11791 11792 section_type: 'Inicio', 11793 section_key: 'ahJlfnNlY3VyZS1ib29raW5nMjRyFwsSCldlYlNlY3Rpb24YgICA7I3ulgsMogELY2FzYXMtbm92YXM', 11794 user_type: ['normal'], 11795 }); 11796 } catch (e) { 11797 console.warn('Error initializing Popup Seeker'); 11798 console.warn(e); 11799 } 11800 }); 11801</script>
11801 11802 11803 11804 11805 11806 11807 11808 11809</body> 11810</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.