1<!DOCTYPE html> 2<html lang="en" xml:lang="en"> 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 | Official Website </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="The Casas Novas Countryside Hotel Spa & Events has 34 rooms. A modern rural space that combines Baroque architecture and contemporary style."/> 42 43 <meta name="revisit-after" content="2 days"/> 44 <meta http-equiv="Content-Language" content="en"/> 45 <meta name="dc.title" content=" Casas Novas Countryside Hotel | Chaves | Official Website "/> 46 <meta name="dc.description" content="The Casas Novas Countryside Hotel Spa & Events has 34 rooms. A modern rural space that combines Baroque architecture and contemporary style."/> 47 <meta name="dc.keywords" content=""/> 48 <meta name="dc.language" content="en"/> 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('The current version of your browser is not supported. Please upgrade to a newer version or use another browser');</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/en/" /><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="The Casas Novas Countryside Hotel Spa & Events has 34 rooms. A modern rural space that combines Baroque architecture and contemporary style."> 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/en/my-bookings.html"> 342 343 <span>My Bookings</span></a> 344 345 </div> 346 <div id="lang"> 347 348 <a href="https://www.hotelcasasnovas.com/pt/" 349 > 350 PT 351 </a> 352 353 <a href="https://www.hotelcasasnovas.com/en/" 354 class="selected" > 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/en/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/en/rooms.html"> 384 <span itemprop="name">Rooms</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/en/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/en/restaurant.html"> 404 <span itemprop="name">Restaurant</span> 405 </a> 406 407 408 </div> 409 410</ul> 411<a href="https://www.hotelcasasnovas.com/en/" 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/en/events.html"> 420 <span itemprop="name">Events</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/en/photo-tour.html">
430 <span itemprop="name">Photo Tour</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/en/location.html"> 440 <span itemprop="name">Location</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/en/offers.html"> 450 <span itemprop="name">Offers</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">pause</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="offers.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="Two wooden chairs overlooking hills at 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="Casas Novas courtyard featuring stone arches and historic staircase."> 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="Casas Novas restaurant with elegant table settings and scenic countryside views."> 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="Cozy Casas Novas living room with cream sofas and rustic stone walls."> 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="Cozy Casas Novas room with a comfortable bed, rustic details, and natural light."> 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 = `Prev`; 589 const nextLabel = `Next`; 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 = `Resume`; 634 this.setAttribute('aria-pressed', 'true'); 635 } else { 636 revapi.revresume(); 637 this.innerText = capitalize(`pause`); 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">Book here</p> 668 <p class="booking_title_2">Book now</p> 669 <p class="best_price">BOOK AT THE BEST PRICE</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: 'en', 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="ENGLISH"/> 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">Check-In</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">Check-Out</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">Dates</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"> Night </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">Check-In Date</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">Check-Out Date</span> 894 </div> 895</div> 896 897 898 899 900<div class="rooms_number_wrapper " > 901 <label class="rooms_label" for="numRooms"> 902 Rooms</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>Occupancy</label> 920 921 <span class="placeholder_text">Select</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 Room 1</div> 941 942 <div class="adults_selector"> 943 <label class="adults_label" for="adultsRoom1">Adults 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">Children 986 987 <span class="range-age"> 988 989 990 991 (<span class="kids_label">4-12 </span> years) 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">Babies 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 Room 2</div> 1072 1073 <div class="adults_selector"> 1074 <label class="adults_label" for="adultsRoom2">Adults 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">Children 1117
1118 <span class="range-age"> 1119 1120 1121 1122 (<span class="kids_label">4-12 </span> years) 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">Babies 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 Room 3</div> 1203 1204 <div class="adults_selector"> 1205 <label class="adults_label" for="adultsRoom3">Adults 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">Children 1248 1249 <span class="range-age"> 1250 1251 1252 1253 (<span class="kids_label">4-12 </span> years) 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">Babies 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 Promotional code 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 Book here 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 = `Updating to continue with your booking`; 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'> Checking the availability of your search:<br><br> From <strong>@@start_date@@</strong> to <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(`Your search dates have associated restrictions. We are directing you to the pricing calendar.`); 1613 const description_bottom_booking_popup = $('<div class="description_bottom_popup_calendar"></div>').html(`In order for you to continue with your booking, we are redirecting you to our availability calendar so that you can book your next stay with us at the best available rate.`); 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="Children's ages" style="display:none"> 1937 <form> 1938 1939 <label id="label1" for="name">Room 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">Room 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">Room 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 "Next": 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 = "Adult"; 2593 adults_tag = "Adults"; 2594 kid_tag = "Child"; 2595 kids_tag = "Children"; 2596 baby_tag = "Baby"; 2597 babies_tag = "Babies"; 2598 no_dispo_text = "Unavailable"; 2599</script>
2599 2600
2601<script> 2602 night_tag = "Night"; 2603 nights_tag = "Nights"; 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', 'en', '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 In the heart of<br><span>Trás-os-montes </span> 2680 </h1> 2681 </div> 2682 2683 <div class="desc lead two_columns"> 2684 The <strong>Casas Novas Countryside Hotel Spa & Events</strong> has 34 rooms in total, 7 installed in a fully restored 18th century manor house and 27 installed in a modern wing. It also has a Health Club, Multisport field and playground. 2685 </div> 2686 2687 </div> 2688 </div> 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 <div class="wrapper_content banner_bg_fullsize" style="background-image: url('https://cdn2.paraty.es/casas-novas/images/211fe39f812c5bc=s1900')"> 2703 <div class="container12"> 2704 2705 <div class="content_title"> 2706 <h3 class="title">The ideal Venue<br>for your Event</h3> 2707 </div> 2708 <a href="events.html" class="btn btn_custom light">See More</a> 2709 2710 </div> 2711</div> 2712 2713 2714 2715 2716 2717 2718 <div class="wrapper_content banner_carousel_bgcolor_wrapper"> 2719 <div class="container_fluid"> 2720 2721 <div class="content_title"> 2722 <h3 class="title"><big>Where the Modern <br> meets the<br>Traditional</big></h3> 2723 </div> 2724 2725 <div class="carousel_wrapper"> 2726 <div class="owl-carousel item_negative custom_nav carousel_7_items"> 2727 2728 <a href="https://cdn2.paraty.es/casas-novas/images/c0880cb9e3a41be" class="picture_link" rel="lightbox[rooms_gallery]"> 2729 <div class="picture_wrapper"> 2730 <img src="https://cdn2.paraty.es/casas-novas/images/c0880cb9e3a41be=s1900" alt=""> 2731 </div> 2732 </a> 2733 2734 <a href="https://cdn2.paraty.es/casas-novas/images/cc9eaa7895b37df" class="picture_link" rel="lightbox[rooms_gallery]"> 2735 <div class="picture_wrapper"> 2736 <img src="https://cdn2.paraty.es/casas-novas/images/cc9eaa7895b37df=s1900" alt=""> 2737 </div> 2738 </a> 2739 2740 <a href="https://cdn2.paraty.es/casas-novas/images/f7cbfc232826610" class="picture_link" rel="lightbox[rooms_gallery]"> 2741 <div class="picture_wrapper"> 2742 <img src="https://cdn2.paraty.es/casas-novas/images/f7cbfc232826610=s1900" alt=""> 2743 </div> 2744 </a> 2745 2746 <a href="https://cdn2.paraty.es/casas-novas/images/3c2ed57f8dbfba2" class="picture_link" rel="lightbox[rooms_gallery]"> 2747 <div class="picture_wrapper"> 2748 <img src="https://cdn2.paraty.es/casas-novas/images/3c2ed57f8dbfba2=s1900" alt=""> 2749 </div> 2750 </a> 2751 2752 <a href="https://cdn2.paraty.es/casas-novas/images/aaed94ef51d5a78" class="picture_link" rel="lightbox[rooms_gallery]"> 2753 <div class="picture_wrapper"> 2754 <img src="https://cdn2.paraty.es/casas-novas/images/aaed94ef51d5a78=s1900" alt=""> 2755 </div> 2756 </a> 2757 2758 <a href="https://cdn2.paraty.es/casas-novas/images/7f624a828f71533" class="picture_link" rel="lightbox[rooms_gallery]"> 2759 <div class="picture_wrapper"> 2760 <img src="https://cdn2.paraty.es/casas-novas/images/7f624a828f71533=s1900" alt=""> 2761 </div> 2762 </a> 2763 2764 <a href="https://cdn2.paraty.es/casas-novas/images/d4af4732d82192e" class="picture_link" rel="lightbox[rooms_gallery]"> 2765 <div class="picture_wrapper"> 2766 <img src="https://cdn2.paraty.es/casas-novas/images/d4af4732d82192e=s1900" alt=""> 2767 </div> 2768 </a> 2769 2770 </div> 2771 </div> 2772 </div> 2773</div> 2774
2775<script type="text/javascript"> 2776 2777 $(window).load(function () { 2778 2779 2780 2781 $(".banner_carousel_bgcolor_wrapper .owl-carousel").owlCarousel({ 2782 loop: true, 2783 nav: true, 2784 navText: ['<i aria-hidden="true"></i>', '<i aria-hidden="true"></i>'], 2785 dots: true, 2786 items: 1, 2787 margin: 15, 2788 smartSpeed: 600, 2789 fluidSpeed: 600, 2790 navSpeed: 600, 2791 dotsSpeed: 600, 2792 dragEndSpeed: 600, 2793 autoplay: true 2794 }); 2795 2796 2797 }); 2798 2799</script>
2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 </section> 2822 2823 2824 2825 2826 2827 <div class="newsletter_wrapper" style="background-image: url(https://cdn2.paraty.es/casas-novas/images/a99fe0a32812757=s1900)"> 2828 <div class="newsletter_container container12"> 2829 <div class="newsletter_title">Newsletter</div> 2830 <div class="newsletter_description">Subscribe and Follow us</div> 2831 2832 <form class="newsletter_form has_social" action="/utils?action=newsletter" method="post"> 2833 2834 2835 2836 <input id="suscEmail" class="input_email" type="text" name="suscEmail" placeholder="Enter your email address" aria-required="true" aria-describedby="email-help" /> 2837 2838 2839 <button type="submit" class="button_newsletter" style="border:none"><span>SUBMIT</span></button> 2840 2841 2842 2843 <div class="check_newsletter"> 2844 <div class="newsletter_checkbox"> 2845 <input class="check_privacy" id="privacy" name="privacy" type="checkbox" value="privacy"/> 2846 <label for="privacy"> <a data-fancybox 2847 data-options='{"caption" : "I have read and accept the privacy policy", "src" : "/en/?sectionContent=politica-de-privacidad.html", "type" : "iframe", "width" : "100%", "max-width" : "100%"}' 2848 data-width="1200" 2849 class="myFancyPopup fancybox.iframe newsletter_popup" 2850 href="en/?sectionContent=politica-de-privacidad.html" 2851 rel="nofollow">I have read and accept the privacy policy</a> 2852 </label> 2853 2854 </div> 2855 </div> 2856 2857 2858 2859 <div class="check_newsletter"> 2860 <div class="newsletter_checkbox"> 2861 <input class="check_privacy" id="promotions" name="promotions" type="checkbox" value="privacy"/> 2862 <label for="promotions">I authorise the processing of my personal data for marketing purposes (promotions, offers and other communications).</label> 2863 2864 </div> 2865 </div> 2866 2867 2868 </form> 2869 2870 2871 <nav class="social_newsletter" aria-label="Social media"> 2872 2873 <a href="https://www.facebook.com/CasasNovasHotel" target="_blank" rel="nofollow" aria-label="Facebook"> 2874 <i class="fa fa-facebook" aria-hidden="true"></i> 2875 </a> 2876 2877 2878 2879 2880 2881 2882 2883 <a href="http://www.instagram.com/casasnovashotel" target="_blank" rel="nofollow" aria-label="Instagram"> 2884 <i class="fa fa-instagram" aria-hidden="true"></i> 2885 </a> 2886 2887 2888 2889 2890 2891 2892 </nav> 2893 2894 </div> 2895</div> 2896 2897 2898
2899<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 2899
2899
2900<script type="text/javascript"> 2901 $(window).on('load', function () { 2902 if (typeof newsletter_launched !== 'undefined' && newsletter_launched === true) { 2903 return; 2904 } 2905 2906 $(".newsletter_form").each(function() { 2907 $(this).validate({ 2908 rules: { 2909 privacy: "required", 2910 promotions: "required", 2911 suscEmail: { 2912 required: true, 2913 email: true 2914 }, 2915 suscName: { 2916 required: true 2917 }, 2918 suscSurname: { 2919 required: true 2920 }, 2921 suscDate: { 2922 required: true, 2923 date: true 2924 }, 2925 suscTelephone: { 2926 required: true, 2927 date: true 2928 } 2929 }, 2930 messages: { 2931 suscEmail: { 2932 required: "This field is required", 2933 email: "The value of this field is not valid" 2934 }, 2935 suscName: { 2936 required: "This field is required" 2937 }, 2938 suscSurname: { 2939 required: "This field is required" 2940 }, 2941 suscDate: { 2942 required: "This field is required", 2943 date: "The value of this field is not valid" 2944 }, 2945 suscTelephone: { 2946 required: "This field is required", 2947 date: "The value of this field is not valid" 2948 }, 2949 privacy: "This field is required", 2950 promotions: "This field is required", 2951 }, 2952 highlight: function (input) { 2953 $(input).parent().find("a").addClass('error_class'); 2954 $(input).parent().find("label").addClass('error_class'); 2955 $(input).parent().find("#suscEmail").addClass('error_class'); 2956 $(input).parent().find("#suscName").addClass('error_class'); 2957 $(input).parent().find("#suscSurname").addClass('error_class'); 2958 $(input).parent().find("#suscDate").addClass('error_class'); 2959 $(input).parent().find("#suscTelephone").addClass('error_class'); 2960 }, 2961 errorPlacement: function (error, element) { 2962 //this keeps enable the validation but hides the error message 2963 } 2964 }); 2965 }); 2966 2967 $(".button_newsletter").each(function() { 2968 $(this).unbind('click').click(function () { 2969 var clicked_button = $(this), 2970 form_newsletter = clicked_button.parent(".newsletter_form"); 2971 2972 form_newsletter.on('submit', function(event) { 2973 event.preventDefault(); 2974 }); 2975 2976 if (form_newsletter.valid()) { 2977 if (!form_newsletter.find("#g-recaptcha-response").length || form_newsletter.find("#g-recaptcha-response").val()) { 2978 $.post("/utils?action=newsletter&language=ENGLISH", 2979 { 2980 'email': form_newsletter.find("#suscEmail").val(), 2981 'name': form_newsletter.find("#suscName").val(), 2982 'surname': form_newsletter.find("#suscSurname").val(), 2983 'date': form_newsletter.find("#suscDate").val(), 2984 'telephone': form_newsletter.find("#suscTelephone").val(), 2985 'custom_tags': '', 2986 'g-recaptcha-response': form_newsletter.find("#g-recaptcha-response").val() 2987 }, 2988 2989 function (data) { 2990 2991 alert("Thank you for subscribing to our newsletter"); 2992 2993 2994 $("#suscEmail").val(""); 2995 $("#suscName").val(""); 2996 $("#suscDate").val(""); 2997 $("#suscTelephone").val(""); 2998 } 2999 ); 3000 } else { 3001 form_newsletter.find(".g-recaptcha > div").css('border', '1px solid red'); 3002 } 3003 } else { 3004 3005 alert("* Required fields "); 3006 console.log("invalid"); 3007 3008 } 3009 3010 }); 3011 }); 3012 3013 newsletter_launched = true; 3014 3015 var script_fa_tag = document.createElement('script'); 3016 script_fa_tag.src = 'https://kit.fontawesome.com/d8b9925505.js'; 3017 script_fa_tag.setAttribute("defer", ""); 3018 3019 document.head.appendChild(script_fa_tag); 3020 }); 3021</script>
3021 3022 3023<footer> 3024 <div class="wrapper_content footer_content"> 3025 <div class="container12"> 3026 3027 <div class="footer_columns_wrapper"> 3028 3029 <div class="hotels_column"> 3030 3031 3032 3033 <div class="desc"> 3034 Rua Visconde do Rosário, Nº1<br> 30355400-727, Redondelo<br> 3036Casas Novas, Portugal<br> 3037<span class="phone"><a href="tel:+351276300050">Tel: +351 276 300 050</span><br> 3038<small>Call to national network</small><br> 3039<a href="mailto:[email protected]">[email protected]</a> 3040 </div> 3041 3042 3043 </div> 3044 3045 <div class="hotels_column"> 3046 3047 3048 3049 3050 </div> 3051 3052 <div class="hotels_column"> 3053 3054 3055 3056 <div class="desc"> 3057 <ul class="menu_links_column"> 3058<li><a href="/en/">Home</a></li> 3059<li><a href="/en/hotel.html">Hotel</a></li> 3060<li><a href="/en/rooms.html">Rooms</a></li> 3061<li><a href="/en/restaurant.html">Restaurant</a></li> 3062<li><a href="/en/health-club.html">Health Club</a></li> 3063<li><a href="/en/events.html">Events</a></li> 3064<li><a href="/en/offers.html">Offers</a></li> 3065<li><a href="/en/photo-tour.html">Photo Tour</a></li> 3066<li><a href="/en/location.html">Location</a></li> 3067<li><a href="/en/my-bookings.html">My Bookings</a></li> 3068</ul> 3069 3070 </div> 3071 3072 3073 </div> 3074 3075 </div> 3076 </div> 3077 3078 <div class="footer_legal_text_wrapper"> 3079 <div class="container12"> 3080 <div class="footer_links_wrapper"> 3081 3082 <a href="/en/?sectionContent=politica-de-privacidad.html" 3083 class="myFancyPopup fancybox.iframe">Privacy Policy</a> | 3084 3085 <a href="/en/?sectionContent=politica-de-cookies.html" 3086 class="myFancyPopup fancybox.iframe">Cookies policy</a> | 3087 3088 <a href="/en/?sectionContent=condiciones-de-reserva.html" 3089 class="myFancyPopup fancybox.iframe">Booking conditions</a> | 3090 3091 <a href="/en/?sectionContent=" 3092 class="myFancyPopup fancybox.iframe">Manage cookies</a> | 3093 3094 <a target="_blank" href="https://www.paratytech.com/motor-de-reservas.html" 3095 title="Booking engine">Booking engine</a> | 3096 <a target="_blank" href="/sitemap.xml" title="">Site Map</a> | 3097 <a target="_blank" href="/rss.xml">RSS</a> 3098 </div> 3099 3100 3101 <div class="legal_text"><br><br> 3102 3103<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> 3104 3105<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> 3106 3107<p> 3108© Copyright 2026 | Casas Novas Countryside Hotel SPA & Events</p> 3109<br>RNET: 1358<br><br> 3110<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> 3111</div> 3112 3113 </div> 3114 </div> 3115 </div> 3116</footer> 3117 3118 3119
vendor: 6,195 bytes, lines 3119-3259
3119<script>(function (r, G, f, v) { 3120 var J = f("html"), n = f(r), p = f(G), b = f.fancybox = function () { 3121 b.open.apply(this, arguments) 3122 }, I = navigator.userAgent.match(/msie/i), B = null, s = G.createTouch !== v, t = function (a) { 3123 return a && a.hasOwnProperty && a instanceof f 3124 }, q = function (a) { 3125 return a && "string" === f.type(a) 3126 }, E = function (a) { 3127 return q(a) && 0 < a.indexOf("%") 3128 }, l = function (a, d) { 3129 var e = parseInt(a, 10) || 0; 3130 d && E(a) && (e *= b.getViewport()[d] / 100); 3131 return Math.ceil(e) 3132 }, w = function (a, b) { 3133 return l(a, b) + "px" 3134 }; 3135 f.extend(b, { 3136 version: "2.1.5", 3137 defaults: { 3138 padding: 15, 3139 margin: 20, 3140 width: 800, 3141 height: 600, 3142 minWidth: 100, 3143 minHeight: 100, 3144 maxWidth: 9999, 3145 maxHeight: 9999, 3146 pixelRatio: 1, 3147 autoSize: !0, 3148 autoHeight: !1, 3149 autoWidth: !1, 3150 autoResize: !0, 3151 autoCenter: !s, 3152 fitToView: !0, 3153 aspectRatio: !1, 3154 topRatio: 0.5, 3155 leftRatio: 0.5, 3156 scrolling: "auto", 3157 wrapCSS: "", 3158 arrows: !0, 3159 closeBtn: !0, 3160 closeClick: !1, 3161 nextClick: !1, 3162 mouseWheel: !0, 3163 autoPlay: !1, 3164 playSpeed: 3E3, 3165 preload: 3, 3166 modal: !1, 3167 loop: !0, 3168 ajax: {dataType: "html", headers: {"X-fancyBox": !0}}, 3169 iframe: {scrolling: "auto", preload: !0}, 3170 swf: {wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always"}, 3171 keys: { 3172 next: {13: "left", 34: "up", 39: "left", 40: "up"}, 3173 prev: {8: "right", 33: "down", 37: "right", 38: "down"}, 3174 close: [27], 3175 play: [32], 3176 toggle: [70] 3177 }, 3178 direction: {next: "left", prev: "right"}, 3179 scrollOutside: !0, 3180 index: 0, 3181 type: null, 3182 href: null, 3183 content: null, 3184 title: null, 3185 tpl: { 3186 wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 3187 image: '<img class="fancybox-image" src="{href}" alt="" />', 3188 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>", 3189 error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 3190 closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 3191 next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 3192 prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>' 3193 }, 3194 openEffect: "fade", 3195 openSpeed: 250, 3196 openEasing: "swing", 3197 openOpacity: !0, 3198 openMethod: "zoomIn", 3199 closeEffect: "fade", 3200 closeSpeed: 250, 3201 closeEasing: "swing", 3202 closeOpacity: !0, 3203 closeMethod: "zoomOut", 3204 nextEffect: "elastic", 3205 nextSpeed: 250, 3206 nextEasing: "swing", 3207 nextMethod: "changeIn", 3208 prevEffect: "elastic", 3209 prevSpeed: 250, 3210 prevEasing: "swing", 3211 prevMethod: "changeOut", 3212 helpers: {overlay: !0, title: !0}, 3213 onCancel: f.noop, 3214 beforeLoad: f.noop, 3215 afterLoad: f.noop, 3216 beforeShow: f.noop, 3217 afterShow: f.noop, 3218 beforeChange: f.noop, 3219 beforeClose: f.noop, 3220 afterClose: f.noop 3221 }, 3222 group: {}, 3223 opts: {}, 3224 previous: null, 3225 coming: null, 3226 current: null, 3227 isActive: !1, 3228 isOpen: !1, 3229 isOpened: !1, 3230 wrap: null, 3231 skin: null, 3232 outer: null, 3233 inner: null, 3234 player: {timer: null, isActive: !1}, 3235 ajaxLoad: null, 3236 imgPreload: null, 3237 transitions: {}, 3238 helpers: {}, 3239 open: function (a, d) { 3240 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) { 3241 var k = {}, g, h, j, m, l; 3242 "object" === f.type(c) && (c.nodeType && (c = f(c)), t(c) ? (k = { 3243 href: c.data("fancybox-href") || c.attr("href"), 3244 title: c.data("fancybox-title") || c.attr("title"), 3245 isDom: !0, 3246 element: c 3247 }, f.metadata && f.extend(!0, k, c.metadata())) : k = c); 3248 g = d.href || k.href || (q(c) ? c : null); 3249 h = d.title !== v ? d.title : k.title || ""; 3250 m = (j = d.content || k.content) ? "html" : d.type || k.type; 3251 !m && k.isDom && (m = c.data("fancybox-type"), m || (m = (m = c.prop("class").match(/fancybox\.(\w+)/)) ? m[1] : null)); 3252 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())); 3253 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)); 3254 f.extend(k, {href: g, type: m, content: j, title: h, selector: l}); 3255 a[e] = k 3256 }), 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) 3257 }, 3258 cancel: function () { 3259 var a = b.coming;
3260 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)) 3261 }, 3262 close: function (a) { 3263 b.cancel(); 3264 !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]()))) 3265 }, 3266 play: function (a) { 3267 var d = function () { 3268 clearTimeout(b.player.timer) 3269 }, e = function () { 3270 d(); 3271 b.current && b.player.isActive && (b.player.timer = setTimeout(b.next, b.current.playSpeed)) 3272 }, c = function () { 3273 d(); 3274 p.unbind(".player"); 3275 b.player.isActive = !1; 3276 b.trigger("onPlayEnd") 3277 }; 3278 if (!0 === a || !b.player.isActive && !1 !== a) { 3279 if (b.current && (b.current.loop || b.current.index < b.group.length - 1)) b.player.isActive = !0, p.bind({ 3280 "onCancel.player beforeClose.player": c, 3281 "onUpdate.player": e, 3282 "beforeLoad.player": d 3283 }), e(), b.trigger("onPlayStart") 3284 } else c() 3285 }, 3286 next: function (a) { 3287 var d = b.current; 3288 d && (q(a) || (a = d.direction.next), b.jumpto(d.index + 1, a, "next")) 3289 }, 3290 prev: function (a) { 3291 var d = b.current; 3292 d && (q(a) || (a = d.direction.prev), b.jumpto(d.index - 1, a, "prev")) 3293 }, 3294 jumpto: function (a, d, e) { 3295 var c = b.current; 3296 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))) 3297 }, 3298 reposition: function (a, d) { 3299 var e = b.current, c = e ? e.wrap : null, k; 3300 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))) 3301 }, 3302 update: function (a) { 3303 var d = a && a.type, e = !d || "orientationchange" === d; 3304 e && (clearTimeout(B), B = null); 3305 b.isOpen && !B && (B = setTimeout(function () { 3306 var c = b.current; 3307 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) 3308 }, e && !s ? 0 : 300)) 3309 }, 3310 toggle: function (a) { 3311 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()) 3312 }, 3313 hideLoading: function () { 3314 p.unbind(".loading"); 3315 f("#fancybox-loading").remove() 3316 }, 3317 showLoading: function () { 3318 var a, d; 3319 b.hideLoading(); 3320 a = f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body"); 3321 p.bind("keydown.loading", function (a) { 3322 if (27 === (a.which || a.keyCode)) a.preventDefault(), b.cancel() 3323 }); 3324 b.defaults.fixed || (d = b.getViewport(), a.css({ 3325 position: "absolute", 3326 top: 0.5 * d.h + d.y, 3327 left: 0.5 * d.w + d.x 3328 })) 3329 }, 3330 getViewport: function () { 3331 var a = b.current && b.current.locked || !1, d = {x: n.scrollLeft(), y: n.scrollTop()}; 3332 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 3332-3638
3332ight ? r.innerHeight : n.height()); 3333 return d 3334 }, 3335 unbindEvents: function () { 3336 b.wrap && t(b.wrap) && b.wrap.unbind(".fb"); 3337 p.unbind(".fb"); 3338 n.unbind(".fb") 3339 }, 3340 bindEvents: function () { 3341 var a = b.current, d; 3342 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) { 3343 var c = e.which || e.keyCode, k = e.target || e.srcElement; 3344 if (27 === c && b.coming) return !1; 3345 !e.ctrlKey && (!e.altKey && !e.shiftKey && !e.metaKey && (!k || !k.type && !f(k).is("[contenteditable]"))) && f.each(d, function (d, k) { 3346 if (1 < a.group.length && k[c] !== v) return b[d](k[c]), e.preventDefault(), !1; 3347 if (-1 < f.inArray(c, k)) return b[d](), e.preventDefault(), !1 3348 }) 3349 }), f.fn.mousewheel && a.mouseWheel && b.wrap.bind("mousewheel.fb", function (d, c, k, g) { 3350 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(); 3351 if (0 !== c && !j && 1 < b.group.length && !a.canShrink) { 3352 if (0 < g || 0 < k) b.prev(0 < g ? "down" : "left"); else if (0 > g || 0 > k) b.next(0 > g ? "up" : "right"); 3353 d.preventDefault() 3354 } 3355 })) 3356 }, 3357 trigger: function (a, d) { 3358 var e, c = d || b.coming || b.current; 3359 if (c) { 3360 f.isFunction(c[a]) && (e = c[a].apply(c, Array.prototype.slice.call(arguments, 1))); 3361 if (!1 === e) return !1; 3362 c.helpers && f.each(c.helpers, function (d, e) { 3363 if (e && b.helpers[d] && f.isFunction(b.helpers[d][a])) b.helpers[d][a](f.extend(!0, {}, b.helpers[d].defaults, e), c) 3364 }); 3365 p.trigger(a) 3366 } 3367 }, 3368 isImage: function (a) { 3369 return q(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i) 3370 }, 3371 isSWF: function (a) { 3372 return q(a) && a.match(/\.(swf)((\?|#).*)?$/i) 3373 }, 3374 _start: function (a) { 3375 var d = {}, e, c; 3376 a = l(a); 3377 e = b.group[a] || null; 3378 if (!e) return !1; 3379 d = f.extend(!0, {}, b.opts, e); 3380 e = d.margin; 3381 c = d.padding; 3382 "number" === f.type(e) && (d.margin = [e, e, e, e]); 3383 "number" === f.type(c) && (d.padding = [c, c, c, c]); 3384 d.modal && f.extend(!0, d, { 3385 closeBtn: !1, 3386 closeClick: !1, 3387 nextClick: !1, 3388 arrows: !1, 3389 mouseWheel: !1, 3390 keys: null, 3391 helpers: {overlay: {closeClick: !1}} 3392 }); 3393 d.autoSize && (d.autoWidth = d.autoHeight = !0); 3394 "auto" === d.width && (d.autoWidth = !0); 3395 "auto" === d.height && (d.autoHeight = !0); 3396 d.group = b.group; 3397 d.index = a; 3398 b.coming = d; 3399 if (!1 === b.trigger("beforeLoad")) b.coming = null; else { 3400 c = d.type; 3401 e = d.href; 3402 if (!c) return b.coming = null, b.current && b.router && "jumpto" !== b.router ? (b.current.index = a, b[b.router](b.direction)) : !1; 3403 b.isActive = !0; 3404 if ("image" === c || "swf" === c) d.autoHeight = d.autoWidth = !1, d.scrolling = "visible"; 3405 "image" === c && (d.aspectRatio = !0); 3406 "iframe" === c && s && (d.scrolling = "scroll"); 3407 d.wrap = f(d.tpl.wrap).addClass("fancybox-" + (s ? "mobile" : "desktop") + " fancybox-type-" + c + " fancybox-tmp " + d.wrapCSS).appendTo(d.parent || "body"); 3408 f.extend(d, { 3409 skin: f(".fancybox-skin", d.wrap), 3410 outer: f(".fancybox-outer", d.wrap), 3411 inner: f(".fancybox-inner", d.wrap) 3412 }); 3413 f.each(["Top", "Right", "Bottom", "Left"], function (a, b) { 3414 d.skin.css("padding" + b, w(d.padding[a])) 3415 }); 3416 b.trigger("onReady"); 3417 if ("inline" === c || "html" === c) { 3418 if (!d.content || !d.content.length) return b._error("content") 3419 } else if (!e) return b._error("href"); 3420 "image" === c ? b._loadImage() : "ajax" === c ? b._loadAjax() : "iframe" === c ? b._loadIframe() : b._afterLoad() 3421 } 3422 }, 3423 _error: function (a) { 3424 f.extend(b.coming, { 3425 type: "html", 3426 autoWidth: !0, 3427 autoHeight: !0, 3428 minWidth: 0, 3429 minHeight: 0, 3430 scrolling: "no", 3431 hasError: a, 3432 content: b.coming.tpl.error 3433 }); 3434 b._afterLoad() 3435 }, 3436 _loadImage: function () { 3437 var a = b.imgPreload = new Image; 3438 a.onload = function () { 3439 this.onload = this.onerror = null; 3440 b.coming.width = this.width / b.opts.pixelRatio; 3441 b.coming.height = this.height / b.opts.pixelRatio; 3442 b._afterLoad() 3443 }; 3444 a.onerror = function () { 3445 this.onload = this.onerror = null; 3446 b._error("image") 3447 }; 3448 a.src = b.coming.href; 3449 !0 !== a.complete && b.showLoading() 3450 }, 3451 _loadAjax: function () { 3452 var a = b.coming; 3453 b.showLoading(); 3454 b.ajaxLoad = f.ajax(f.extend({}, a.ajax, { 3455 url: a.href, error: function (a, e) { 3456 b.coming && "abort" !== e ? b._error("ajax", a) : b.hideLoading() 3457 }, success: function (d, e) { 3458 "success" === e && (a.content = d, b._afterLoad()) 3459 } 3460 })) 3461 }, 3462 _loadIframe: function () { 3463 var a = b.coming, 3464 d = f(a.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", s ? "auto" : a.iframe.scrolling).attr("src", a.href); 3465 f(a.wrap).bind("onReset", function () { 3466 try { 3467 f(this).find("iframe").hide().attr("src", "//about:blank").end().empty() 3468 } catch (a) { 3469 } 3470 }); 3471 a.iframe.preload && (b.showLoading(), d.one("load", function () { 3472 f(this).data("ready", 1); 3473 s || f(this).bind("load.fb", b.update); 3474 f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(); 3475 b._afterLoad() 3476 })); 3477 a.content = d.appendTo(a.inner); 3478 a.iframe.preload || b._afterLoad() 3479 }, 3480 _preloadImages: function () { 3481 var a = b.group, d = b.current, e = a.length, c = d.preload ? Math.min(d.preload, e - 1) : 0, f, g; 3482 for (g = 1; g <= c; g += 1) f = a[(d.index + g) % e], "image" === f.type && f.href && ((new Image).src = f.href) 3483 }, 3484 _afterLoad: function () { 3485 var a = b.coming, d = b.current, e, c, k, g, h; 3486 b.hideLoading(); 3487 if (a && !1 !== b.isActive) if (!1 === b.trigger("afterLoad", a, d)) a.wrap.stop(!0).trigger("onReset").remove(), b.coming = null; else { 3488 d && (b.trigger("beforeChange", d), d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 3489 b.unbindEvents(); 3490 e = a.content; 3491 c = a.type; 3492 k = a.scrolling; 3493 f.extend(b, {wrap: a.wrap, skin: a.skin, outer: a.outer, inner: a.inner, current: a, previous: d}); 3494 g = a.href; 3495 switch (c) { 3496 case "inline": 3497 case "ajax": 3498 case "html": 3499 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 () { 3500 f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1) 3501 })); 3502 break; 3503 case "image": 3504 e = a.tpl.image.replace("{href}", g); 3505 break; 3506 case "swf": 3507 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) { 3508 e += '<param name="' + a + '" value="' + b + '"></param>'; 3509 h += " " + a + '="' + b + '"' 3510 }), e += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>" 3511 } 3512 (!t(e) || !e.parent().is(a.inner)) && a.inner.append(e); 3513 b.trigger("beforeShow"); 3514 a.inner.css("overflow", "yes" === k ? "scroll" : "no" === k ? "hidden" : k); 3515 b._setDimension(); 3516 b.reposition(); 3517 b.isOpen = !1; 3518 b.coming = null; 3519 b.bindEvents(); 3520 if (b.isOpened) { 3521 if (d.prevMethod) b.transitions[d.prevMethod]() 3522 } else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove(); 3523 b.transitions[b.isOpened ? a.nextMethod : a.openMethod](); 3524 b._preloadImages() 3525 } 3526 }, 3527 _setDimension: function () { 3528 var a = b.getViewport(), d = 0, e = !1, c = !1, e = b.wrap, k = b.skin, g = b.inner, h = b.current, 3529 c = h.width, j = h.height, m = h.minWidth, u = h.minHeight, n = h.maxWidth, p = h.maxHeight, 3530 s = h.scrolling, q = h.scrollOutside ? h.scrollbarWidth : 0, x = h.margin, y = l(x[1] + x[3]), 3531 r = l(x[0] + x[2]), v, z, t, C, A, F, B, D, H; 3532 e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp"); 3533 x = l(k.outerWidth(!0) - k.width()); 3534 v = l(k.outerHeight(!0) - k.height()); 3535 z = y + x; 3536 t = r + v; 3537 C = E(c) ? (a.w - z) * l(c) / 100 : c; 3538 A = E(j) ? (a.h - t) * l(j) / 100 : j; 3539 if ("iframe" === h.type) { 3540 if (H = h.content, h.autoHeight && 1 === H.data("ready")) try { 3541 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)) 3542 } catch (G) { 3543 } 3544 } 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"); 3545 c = l(C); 3546 j = l(A); 3547 D = C / A; 3548 m = l(E(m) ? l(m, "w") - z : m); 3549 n = l(E(n) ? l(n, "w") - z : n); 3550 u = l(E(u) ? l(u, "h") - t : u); 3551 p = l(E(p) ? l(p, "h") - t : p); 3552 F = n; 3553 B = p; 3554 h.fitToView && (n = Math.min(a.w - z, n), p = Math.min(a.h - t, p)); 3555 z = a.w - y; 3556 r = a.h - r; 3557 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))); 3558 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))); 3559 q && ("auto" === s && j < A && c + x + q < z) && (c += q); 3560 g.width(c).height(j); 3561 e.width(c + x); 3562 a = e.width(); 3563 y = e.height(); 3564 e = (a > z || y > r) && c > m && j > u; 3565 c = h.aspectRatio ? c < F && j < B && c < C && j < A : (c < F || j < B) && (c < C || j < A); 3566 f.extend(h, { 3567 dim: {width: w(a), height: w(y)}, 3568 origWidth: C, 3569 origHeight: A, 3570 canShrink: e, 3571 canExpand: c, 3572 wPadding: x, 3573 hPadding: v, 3574 wrapSpace: y - k.outerHeight(!0), 3575 skinSpace: k.height() - j 3576 }); 3577 !H && (h.autoHeight && j > u && j < p && !c) && g.height("auto") 3578 }, 3579 _getPosition: function (a) { 3580 var d = b.current, e = b.getViewport(), c = d.margin, f = b.wrap.width() + c[1] + c[3], 3581 g = b.wrap.height() + c[0] + c[2], c = {position: "absolute", top: c[0], left: c[3]}; 3582 d.autoCenter && d.fixed && !a && g <= e.h && f <= e.w ? c.position = "fixed" : d.locked || (c.top += e.y, c.left += e.x); 3583 c.top = w(Math.max(c.top, c.top + (e.h - g) * d.topRatio)); 3584 c.left = w(Math.max(c.left, c.left + (e.w - f) * d.leftRatio)); 3585 return c 3586 }, 3587 _afterZoomIn: function () { 3588 var a = b.current; 3589 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) { 3590 !f(d.target).is("a") && !f(d.target).parent().is("a") && (d.preventDefault(), b[a.closeClick ? "close" : "next"]()) 3591 }), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function (a) { 3592 a.preventDefault(); 3593 b.close() 3594 }), 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())) 3595 }, 3596 _afterZoomOut: function (a) { 3597 a = a || b.current; 3598 f(".fancybox-wrap").trigger("onReset").remove(); 3599 f.extend(b, { 3600 group: {}, 3601 opts: {}, 3602 router: !1, 3603 current: null, 3604 isActive: !1, 3605 isOpened: !1, 3606 isOpen: !1, 3607 isClosing: !1, 3608 wrap: null, 3609 skin: null, 3610 outer: null, 3611 inner: null 3612 }); 3613 b.trigger("afterClose", a) 3614 } 3615 }); 3616 b.transitions = { 3617 getOrigPosition: function () { 3618 var a = b.current, d = a.element, e = a.orig, c = {}, f = 50, g = 50, h = a.hPadding, j = a.wPadding, 3619 m = b.getViewport(); 3620 !e && (a.isDom && d.is(":visible")) && (e = d.find("img:first"), e.length || (e = d)); 3621 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); 3622 if ("fixed" === b.wrap.css("position") || a.locked) c.top -= m.y, c.left -= m.x; 3623 return c = { 3624 top: w(c.top - h * a.topRatio), 3625 left: w(c.left - j * a.leftRatio), 3626 width: w(f + j), 3627 height: w(g + h) 3628 } 3629 }, step: function (a, d) { 3630 var e, c, f = d.prop; 3631 c = b.current; 3632 var g = c.wrapSpace, h = c.skinSpace; 3633 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)) 3634 }, zoomIn: function () { 3635 var a = b.current, d = a.pos, e = a.openEffect, c = "elastic" === e, k = f.extend({opacity: 1}, d); 3636 delete k.position; 3637 c ? (d = this.getOrigPosition(), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1); 3638 b.wrap.css(d).animate(k, {
3639 duration: "none" === e ? 0 : a.openSpeed, 3640 easing: a.openEasing, 3641 step: c ? this.step : null, 3642 complete: b._afterZoomIn 3643 }) 3644 }, zoomOut: function () { 3645 var a = b.current, d = a.closeEffect, e = "elastic" === d, c = {opacity: 0.1}; 3646 e && (c = this.getOrigPosition(), a.closeOpacity && (c.opacity = 0.1)); 3647 b.wrap.animate(c, { 3648 duration: "none" === d ? 0 : a.closeSpeed, 3649 easing: a.closeEasing, 3650 step: e ? this.step : null, 3651 complete: b._afterZoomOut 3652 }) 3653 }, changeIn: function () { 3654 var a = b.current, d = a.nextEffect, e = a.pos, c = {opacity: 1}, f = b.direction, g; 3655 e.opacity = 0.1; 3656 "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")); 3657 "none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, { 3658 duration: a.nextSpeed, 3659 easing: a.nextEasing, 3660 complete: b._afterZoomIn 3661 }) 3662 }, changeOut: function () { 3663 var a = b.previous, d = a.prevEffect, e = {opacity: 0.1}, c = b.direction; 3664 "elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px"); 3665 a.wrap.animate(e, { 3666 duration: "none" === d ? 0 : a.prevSpeed, easing: a.prevEasing, complete: function () { 3667 f(this).trigger("onReset").remove() 3668 } 3669 }) 3670 } 3671 }; 3672 b.helpers.overlay = { 3673 defaults: {closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !s, fixed: !0}, 3674 overlay: null, 3675 fixed: !1, 3676 el: f("html"), 3677 create: function (a) { 3678 a = f.extend({}, this.defaults, a); 3679 this.overlay && this.close(); 3680 this.overlay = f('<div class="fancybox-overlay"></div>').appendTo(b.coming ? b.coming.parent : a.parent); 3681 this.fixed = !1; 3682 a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0) 3683 }, 3684 open: function (a) { 3685 var d = this; 3686 a = f.extend({}, this.defaults, a); 3687 this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a); 3688 this.fixed || (n.bind("resize.overlay", f.proxy(this.update, this)), this.update()); 3689 a.closeClick && this.overlay.bind("click.overlay", function (a) { 3690 if (f(a.target).hasClass("fancybox-overlay")) return b.isActive ? b.close() : d.close(), !1 3691 }); 3692 this.overlay.css(a.css).show() 3693 }, 3694 close: function () { 3695 var a, b; 3696 n.unbind("resize.overlay"); 3697 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)); 3698 f(".fancybox-overlay").remove().hide(); 3699 f.extend(this, {overlay: null, fixed: !1}) 3700 }, 3701 update: function () { 3702 var a = "100%", b; 3703 this.overlay.width(a).height("100%"); 3704 I ? (b = Math.max(G.documentElement.offsetWidth, G.body.offsetWidth), p.width() > b && (a = p.width())) : p.width() > n.width() && (a = p.width()); 3705 this.overlay.width(a).height(p.height()) 3706 }, 3707 onReady: function (a, b) { 3708 var e = this.overlay; 3709 f(".fancybox-overlay").stop(!0, !0); 3710 e || this.create(a); 3711 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); 3712 !0 === a.showEarly && this.beforeShow.apply(this, arguments) 3713 }, 3714 beforeShow: function (a, b) { 3715 var e, c; 3716 b.locked && (!1 !== this.margin && (f("*:not(object)").filter(function () { 3717 return "fixed" === f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap") 3718 }).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), e = n.scrollTop(), c = n.scrollLeft(), this.el.addClass("fancybox-lock"), n.scrollTop(e).scrollLeft(c)); 3719 this.open(a) 3720 }, 3721 onUpdate: function () { 3722 this.fixed || this.update() 3723 }, 3724 afterClose: function (a) { 3725 this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this)) 3726 } 3727 }; 3728 b.helpers.title = { 3729 defaults: {type: "float", position: "bottom"}, beforeShow: function (a) { 3730 var d = b.current, e = d.title, c = a.type; 3731 f.isFunction(e) && (e = e.call(d.element, d)); 3732 if (q(e) && "" !== f.trim(e)) { 3733 d = f('<div class="fancybox-title fancybox-title-' + c + '-wrap">' + e + "</div>"); 3734 switch (c) { 3735 case "inside": 3736 c = b.skin; 3737 break; 3738 case "outside": 3739 c = b.wrap; 3740 break; 3741 case "over": 3742 c = b.inner; 3743 break; 3744 default: 3745 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"))) 3746 } 3747 d["top" === a.position ? "prependTo" : "appendTo"](c) 3748 } 3749 } 3750 }; 3751 f.fn.fancybox = function (a) { 3752 var d, e = f(this), c = this.selector || "", k = function (g) { 3753 var h = f(this).blur(), j = d, k, l; 3754 !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()) 3755 }; 3756 a = a || {}; 3757 d = a.index || 0; 3758 !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); 3759 this.filter("[data-fancybox-start=1]").trigger("click"); 3760 return this 3761 }; 3762 p.ready(function () { 3763 var a, d; 3764 f.scrollbarWidth === v && (f.scrollbarWidth = function () { 3765 var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"), 3766 b = a.children(), b = b.innerWidth() - b.height(99).innerWidth(); 3767 a.remove(); 3768 return b 3769 }); 3770 if (f.support.fixedPosition === v) { 3771 a = f.support; 3772 d = f('<div style="position:fixed;top:20px;"></div>').appendTo("body"); 3773 var e = 20 === d[0].offsetTop || 15 === d[0].offsetTop; 3774 d.remove(); 3775 a.fixedPosition = e 3776 } 3777 f.extend(b.defaults, {scrollbarWidth: f.scrollbarWidth(), fixed: f.support.fixedPosition, parent: f("body")}); 3778 a = f(r).width(); 3779 J.addClass("fancybox-lock-test"); 3780 d = f(r).width(); 3781 J.removeClass("fancybox-lock-test"); 3782 f("<style type='text/css'>.fancybox-margin{margin-right:" + (d - a) + "px;}</style>").appendTo("head") 3783 }) 3784})(window, document, jQuery);</script>
3784<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 3784-3945
3784<script> 3785(function( $, undefined ) { 3786var uuid = 0, 3787 runiqueId = /^ui-id-\d+$/; 3788$.ui = $.ui || {}; 3789$.extend( $.ui, { 3790 version: "1.10.4", 3791 keyCode: { 3792 BACKSPACE: 8, 3793 COMMA: 188, 3794 DELETE: 46, 3795 DOWN: 40, 3796 END: 35, 3797 ENTER: 13, 3798 ESCAPE: 27, 3799 HOME: 36, 3800 LEFT: 37, 3801 NUMPAD_ADD: 107, 3802 NUMPAD_DECIMAL: 110, 3803 NUMPAD_DIVIDE: 111, 3804 NUMPAD_ENTER: 108, 3805 NUMPAD_MULTIPLY: 106, 3806 NUMPAD_SUBTRACT: 109, 3807 PAGE_DOWN: 34, 3808 PAGE_UP: 33, 3809 PERIOD: 190, 3810 RIGHT: 39, 3811 SPACE: 32, 3812 TAB: 9, 3813 UP: 38 3814 } 3815}); 3816$.fn.extend({ 3817 focus: (function( orig ) { 3818 return function( delay, fn ) { 3819 return typeof delay === "number" ? 3820 this.each(function() { 3821 var elem = this; 3822 setTimeout(function() { 3823 $( elem ).focus(); 3824 if ( fn ) { 3825 fn.call( elem ); 3826 } 3827 }, delay ); 3828 }) : 3829 orig.apply( this, arguments ); 3830 }; 3831 })( $.fn.focus ), 3832 scrollParent: function() { 3833 var scrollParent; 3834 if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { 3835 scrollParent = this.parents().filter(function() { 3836 return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); 3837 }).eq(0); 3838 } else { 3839 scrollParent = this.parents().filter(function() { 3840 return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); 3841 }).eq(0); 3842 } 3843 return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; 3844 }, 3845 zIndex: function( zIndex ) { 3846 if ( zIndex !== undefined ) { 3847 return this.css( "zIndex", zIndex ); 3848 } 3849 if ( this.length ) { 3850 var elem = $( this[ 0 ] ), position, value; 3851 while ( elem.length && elem[ 0 ] !== document ) { 3852 position = elem.css( "position" ); 3853 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 3854 value = parseInt( elem.css( "zIndex" ), 10 ); 3855 if ( !isNaN( value ) && value !== 0 ) { 3856 return value; 3857 } 3858 } 3859 elem = elem.parent(); 3860 } 3861 } 3862 return 0; 3863 }, 3864 uniqueId: function() { 3865 return this.each(function() { 3866 if ( !this.id ) { 3867 this.id = "ui-id-" + (++uuid); 3868 } 3869 }); 3870 }, 3871 removeUniqueId: function() { 3872 return this.each(function() { 3873 if ( runiqueId.test( this.id ) ) { 3874 $( this ).removeAttr( "id" ); 3875 } 3876 }); 3877 } 3878}); 3879function focusable( element, isTabIndexNotNaN ) { 3880 var map, mapName, img, 3881 nodeName = element.nodeName.toLowerCase(); 3882 if ( "area" === nodeName ) { 3883 map = element.parentNode; 3884 mapName = map.name; 3885 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 3886 return false; 3887 } 3888 img = $( "img[usemap=#" + mapName + "]" )[0]; 3889 return !!img && visible( img ); 3890 } 3891 return ( /input|select|textarea|button|object/.test( nodeName ) ? 3892 !element.disabled : 3893 "a" === nodeName ? 3894 element.href || isTabIndexNotNaN : 3895 isTabIndexNotNaN) && 3896 // the element and all of its ancestors must be visible 3897 visible( element ); 3898} 3899function visible( element ) { 3900 return $.expr.filters.visible( element ) && 3901 !$( element ).parents().addBack().filter(function() { 3902 return $.css( this, "visibility" ) === "hidden"; 3903 }).length; 3904} 3905$.extend( $.expr[ ":" ], { 3906 data: $.expr.createPseudo ? 3907 $.expr.createPseudo(function( dataName ) { 3908 return function( elem ) { 3909 return !!$.data( elem, dataName ); 3910 }; 3911 }) : 3912 function( elem, i, match ) { 3913 return !!$.data( elem, match[ 3 ] ); 3914 }, 3915 focusable: function( element ) { 3916 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 3917 }, 3918 tabbable: function( element ) { 3919 var tabIndex = $.attr( element, "tabindex" ), 3920 isTabIndexNaN = isNaN( tabIndex ); 3921 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 3922 } 3923}); 3924if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { 3925 $.each( [ "Width", "Height" ], function( i, name ) { 3926 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 3927 type = name.toLowerCase(), 3928 orig = { 3929 innerWidth: $.fn.innerWidth, 3930 innerHeight: $.fn.innerHeight, 3931 outerWidth: $.fn.outerWidth, 3932 outerHeight: $.fn.outerHeight 3933 }; 3934 function reduce( elem, size, border, margin ) { 3935 $.each( side, function() { 3936 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 3937 if ( border ) { 3938 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 3939 } 3940 if ( margin ) { 3941 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 3942 } 3943 }); 3944 return size; 3945 }
3946 $.fn[ "inner" + name ] = function( size ) { 3947 if ( size === undefined ) { 3948 return orig[ "inner" + name ].call( this ); 3949 } 3950 return this.each(function() { 3951 $( this ).css( type, reduce( this, size ) + "px" ); 3952 }); 3953 }; 3954 $.fn[ "outer" + name] = function( size, margin ) { 3955 if ( typeof size !== "number" ) { 3956 return orig[ "outer" + name ].call( this, size ); 3957 } 3958 return this.each(function() { 3959 $( this).css( type, reduce( this, size, true, margin ) + "px" ); 3960 }); 3961 }; 3962 }); 3963} 3964if ( !$.fn.addBack ) { 3965 $.fn.addBack = function( selector ) { 3966 return this.add( selector == null ? 3967 this.prevObject : this.prevObject.filter( selector ) 3968 ); 3969 }; 3970} 3971if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 3972 $.fn.removeData = (function( removeData ) { 3973 return function( key ) { 3974 if ( arguments.length ) { 3975 return removeData.call( this, $.camelCase( key ) ); 3976 } else { 3977 return removeData.call( this ); 3978 } 3979 }; 3980 })( $.fn.removeData ); 3981} 3982$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 3983$.support.selectstart = "onselectstart" in document.createElement( "div" ); 3984$.fn.extend({ 3985 disableSelection: function() { 3986 return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + 3987 ".ui-disableSelection", function( event ) { 3988 event.preventDefault(); 3989 }); 3990 }, 3991 enableSelection: function() { 3992 return this.unbind( ".ui-disableSelection" ); 3993 } 3994}); 3995$.extend( $.ui, { 3996 plugin: { 3997 add: function( module, option, set ) { 3998 var i, 3999 proto = $.ui[ module ].prototype; 4000 for ( i in set ) { 4001 proto.plugins[ i ] = proto.plugins[ i ] || []; 4002 proto.plugins[ i ].push( [ option, set[ i ] ] ); 4003 } 4004 }, 4005 call: function( instance, name, args ) { 4006 var i, 4007 set = instance.plugins[ name ]; 4008 if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { 4009 return; 4010 } 4011 for ( i = 0; i < set.length; i++ ) { 4012 if ( instance.options[ set[ i ][ 0 ] ] ) { 4013 set[ i ][ 1 ].apply( instance.element, args ); 4014 } 4015 } 4016 } 4017 }, 4018 hasScroll: function( el, a ) { 4019 //If overflow is hidden, the element might have extra content, but the user wants to hide it 4020 if ( $( el ).css( "overflow" ) === "hidden") { 4021 return false; 4022 } 4023 var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", 4024 has = false; 4025 if ( el[ scroll ] > 0 ) { 4026 return true; 4027 } 4028 el[ scroll ] = 1; 4029 has = ( el[ scroll ] > 0 ); 4030 el[ scroll ] = 0; 4031 return has; 4032 } 4033}); 4034})( jQuery ); 4035(function( $, undefined ) { 4036var uuid = 0, 4037 slice = Array.prototype.slice, 4038 _cleanData = $.cleanData; 4039$.cleanData = function( elems ) { 4040 for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { 4041 try { 4042 $( elem ).triggerHandler( "remove" ); 4043 } catch( e ) {} 4044 } 4045 _cleanData( elems ); 4046}; 4047$.widget = function( name, base, prototype ) { 4048 var fullName, existingConstructor, constructor, basePrototype, 4049 proxiedPrototype = {}, 4050 namespace = name.split( "." )[ 0 ]; 4051 name = name.split( "." )[ 1 ]; 4052 fullName = namespace + "-" + name; 4053 if ( !prototype ) { 4054 prototype = base; 4055 base = $.Widget; 4056 } 4057 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 4058 return !!$.data( elem, fullName ); 4059 }; 4060 $[ namespace ] = $[ namespace ] || {}; 4061 existingConstructor = $[ namespace ][ name ]; 4062 constructor = $[ namespace ][ name ] = function( options, element ) { 4063 if ( !this._createWidget ) { 4064 return new constructor( options, element ); 4065 } 4066 if ( arguments.length ) { 4067 this._createWidget( options, element ); 4068 } 4069 }; 4070 $.extend( constructor, existingConstructor, { 4071 version: prototype.version, 4072 _proto: $.extend( {}, prototype ), 4073 _childConstructors: [] 4074 }); 4075 basePrototype = new base(); 4076 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 4077 $.each( prototype, function( prop, value ) { 4078 if ( !$.isFunction( value ) ) { 4079 proxiedPrototype[ prop ] = value; 4080 return; 4081 } 4082 proxiedPrototype[ prop ] = (function() { 4083 var _super = function() { 4084 return base.prototype[ prop ].apply( this, arguments ); 4085 }, 4086 _superApply = function( args ) { 4087 return base.prototype[ prop ].apply( this, args ); 4088 }; 4089 return function() { 4090 var __super = this._super, 4091 __superApply = this._superApply, 4092 returnValue; 4093 this._super = _super; 4094 this._superApply = _superApply;
vendor: 9,998 bytes, lines 4095-4426
4095 returnValue = value.apply( this, arguments ); 4096 this._super = __super; 4097 this._superApply = __superApply; 4098 return returnValue; 4099 }; 4100 })(); 4101 }); 4102 constructor.prototype = $.widget.extend( basePrototype, { 4103 widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name 4104 }, proxiedPrototype, { 4105 constructor: constructor, 4106 namespace: namespace, 4107 widgetName: name, 4108 widgetFullName: fullName 4109 }); 4110 if ( existingConstructor ) { 4111 $.each( existingConstructor._childConstructors, function( i, child ) { 4112 var childPrototype = child.prototype; 4113 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); 4114 }); 4115 delete existingConstructor._childConstructors; 4116 } else { 4117 base._childConstructors.push( constructor ); 4118 } 4119 $.widget.bridge( name, constructor ); 4120}; 4121$.widget.extend = function( target ) { 4122 var input = slice.call( arguments, 1 ), 4123 inputIndex = 0, 4124 inputLength = input.length, 4125 key, 4126 value; 4127 for ( ; inputIndex < inputLength; inputIndex++ ) { 4128 for ( key in input[ inputIndex ] ) { 4129 value = input[ inputIndex ][ key ]; 4130 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 4131 if ( $.isPlainObject( value ) ) { 4132 target[ key ] = $.isPlainObject( target[ key ] ) ? 4133 $.widget.extend( {}, target[ key ], value ) : 4134 $.widget.extend( {}, value ); 4135 } else { 4136 target[ key ] = value; 4137 } 4138 } 4139 } 4140 } 4141 return target; 4142}; 4143$.widget.bridge = function( name, object ) { 4144 var fullName = object.prototype.widgetFullName || name; 4145 $.fn[ name ] = function( options ) { 4146 var isMethodCall = typeof options === "string", 4147 args = slice.call( arguments, 1 ), 4148 returnValue = this; 4149 options = !isMethodCall && args.length ? 4150 $.widget.extend.apply( null, [ options ].concat(args) ) : 4151 options; 4152 if ( isMethodCall ) { 4153 this.each(function() { 4154 var methodValue, 4155 instance = $.data( this, fullName ); 4156 if ( !instance ) { 4157 return $.error( "cannot call methods on " + name + " prior to initialization; " + 4158 "attempted to call method '" + options + "'" ); 4159 } 4160 if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { 4161 return $.error( "no such method '" + options + "' for " + name + " widget instance" ); 4162 } 4163 methodValue = instance[ options ].apply( instance, args ); 4164 if ( methodValue !== instance && methodValue !== undefined ) { 4165 returnValue = methodValue && methodValue.jquery ? 4166 returnValue.pushStack( methodValue.get() ) : 4167 methodValue; 4168 return false; 4169 } 4170 }); 4171 } else { 4172 this.each(function() { 4173 var instance = $.data( this, fullName ); 4174 if ( instance ) { 4175 instance.option( options || {} )._init(); 4176 } else { 4177 $.data( this, fullName, new object( options, this ) ); 4178 } 4179 }); 4180 } 4181 return returnValue; 4182 }; 4183}; 4184$.Widget = function() {}; 4185$.Widget._childConstructors = []; 4186$.Widget.prototype = { 4187 widgetName: "widget", 4188 widgetEventPrefix: "", 4189 defaultElement: "<div>", 4190 options: { 4191 disabled: false, 4192 create: null 4193 }, 4194 _createWidget: function( options, element ) { 4195 element = $( element || this.defaultElement || this )[ 0 ]; 4196 this.element = $( element ); 4197 this.uuid = uuid++; 4198 this.eventNamespace = "." + this.widgetName + this.uuid; 4199 this.options = $.widget.extend( {}, 4200 this.options, 4201 this._getCreateOptions(), 4202 options ); 4203 this.bindings = $(); 4204 this.hoverable = $(); 4205 this.focusable = $(); 4206 if ( element !== this ) { 4207 $.data( element, this.widgetFullName, this ); 4208 this._on( true, this.element, { 4209 remove: function( event ) { 4210 if ( event.target === element ) { 4211 this.destroy(); 4212 } 4213 } 4214 }); 4215 this.document = $( element.style ? 4216 element.ownerDocument : 4217 element.document || element ); 4218 this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); 4219 } 4220 this._create(); 4221 this._trigger( "create", null, this._getCreateEventData() ); 4222 this._init(); 4223 }, 4224 _getCreateOptions: $.noop, 4225 _getCreateEventData: $.noop, 4226 _create: $.noop, 4227 _init: $.noop, 4228 destroy: function() { 4229 this._destroy(); 4230 this.element 4231 .unbind( this.eventNamespace ) 4232 .removeData( this.widgetName ) 4233 .removeData( this.widgetFullName ) 4234 .removeData( $.camelCase( this.widgetFullName ) ); 4235 this.widget() 4236 .unbind( this.eventNamespace ) 4237 .removeAttr( "aria-disabled" ) 4238 .removeClass( 4239 this.widgetFullName + "-disabled " + 4240 "ui-state-disabled" ); 4241 this.bindings.unbind( this.eventNamespace ); 4242 this.hoverable.removeClass( "ui-state-hover" ); 4243 this.focusable.removeClass( "ui-state-focus" ); 4244 }, 4245 _destroy: $.noop, 4246 widget: function() { 4247 return this.element; 4248 }, 4249 option: function( key, value ) { 4250 var options = key, 4251 parts, 4252 curOption, 4253 i; 4254 if ( arguments.length === 0 ) { 4255 return $.widget.extend( {}, this.options ); 4256 } 4257 if ( typeof key === "string" ) { 4258 options = {}; 4259 parts = key.split( "." ); 4260 key = parts.shift(); 4261 if ( parts.length ) { 4262 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 4263 for ( i = 0; i < parts.length - 1; i++ ) { 4264 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 4265 curOption = curOption[ parts[ i ] ]; 4266 } 4267 key = parts.pop(); 4268 if ( arguments.length === 1 ) { 4269 return curOption[ key ] === undefined ? null : curOption[ key ]; 4270 } 4271 curOption[ key ] = value; 4272 } else { 4273 if ( arguments.length === 1 ) { 4274 return this.options[ key ] === undefined ? null : this.options[ key ]; 4275 } 4276 options[ key ] = value; 4277 } 4278 } 4279 this._setOptions( options ); 4280 return this; 4281 }, 4282 _setOptions: function( options ) { 4283 var key; 4284 for ( key in options ) { 4285 this._setOption( key, options[ key ] ); 4286 } 4287 return this; 4288 }, 4289 _setOption: function( key, value ) { 4290 this.options[ key ] = value; 4291 if ( key === "disabled" ) { 4292 this.widget() 4293 .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) 4294 .attr( "aria-disabled", value ); 4295 this.hoverable.removeClass( "ui-state-hover" ); 4296 this.focusable.removeClass( "ui-state-focus" ); 4297 } 4298 return this; 4299 }, 4300 enable: function() { 4301 return this._setOption( "disabled", false ); 4302 }, 4303 disable: function() { 4304 return this._setOption( "disabled", true ); 4305 }, 4306 _on: function( suppressDisabledCheck, element, handlers ) { 4307 var delegateElement, 4308 instance = this; 4309 if ( typeof suppressDisabledCheck !== "boolean" ) { 4310 handlers = element; 4311 element = suppressDisabledCheck; 4312 suppressDisabledCheck = false; 4313 } 4314 if ( !handlers ) { 4315 handlers = element; 4316 element = this.element; 4317 delegateElement = this.widget(); 4318 } else { 4319 element = delegateElement = $( element ); 4320 this.bindings = this.bindings.add( element ); 4321 } 4322 $.each( handlers, function( event, handler ) { 4323 function handlerProxy() { 4324 if ( !suppressDisabledCheck && 4325 ( instance.options.disabled === true || 4326 $( this ).hasClass( "ui-state-disabled" ) ) ) { 4327 return; 4328 } 4329 return ( typeof handler === "string" ? instance[ handler ] : handler ) 4330 .apply( instance, arguments ); 4331 } 4332 if ( typeof handler !== "string" ) { 4333 handlerProxy.guid = handler.guid = 4334 handler.guid || handlerProxy.guid || $.guid++; 4335 } 4336 var match = event.match( /^(\w+)\s*(.*)$/ ), 4337 eventName = match[1] + instance.eventNamespace, 4338 selector = match[2]; 4339 if ( selector ) { 4340 delegateElement.delegate( selector, eventName, handlerProxy ); 4341 } else { 4342 element.bind( eventName, handlerProxy ); 4343 } 4344 }); 4345 }, 4346 _off: function( element, eventName ) { 4347 eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; 4348 element.unbind( eventName ).undelegate( eventName ); 4349 }, 4350 _delay: function( handler, delay ) { 4351 function handlerProxy() { 4352 return ( typeof handler === "string" ? instance[ handler ] : handler ) 4353 .apply( instance, arguments ); 4354 } 4355 var instance = this; 4356 return setTimeout( handlerProxy, delay || 0 ); 4357 }, 4358 _hoverable: function( element ) { 4359 this.hoverable = this.hoverable.add( element ); 4360 this._on( element, { 4361 mouseenter: function( event ) { 4362 $( event.currentTarget ).addClass( "ui-state-hover" ); 4363 }, 4364 mouseleave: function( event ) { 4365 $( event.currentTarget ).removeClass( "ui-state-hover" ); 4366 } 4367 }); 4368 }, 4369 _focusable: function( element ) { 4370 this.focusable = this.focusable.add( element ); 4371 this._on( element, { 4372 focusin: function( event ) { 4373 $( event.currentTarget ).addClass( "ui-state-focus" ); 4374 }, 4375 focusout: function( event ) { 4376 $( event.currentTarget ).removeClass( "ui-state-focus" ); 4377 } 4378 }); 4379 }, 4380 _trigger: function( type, event, data ) { 4381 var prop, orig, 4382 callback = this.options[ type ]; 4383 4384 data = data || {}; 4385 event = $.Event( event ); 4386 event.type = ( type === this.widgetEventPrefix ? 4387 type : 4388 this.widgetEventPrefix + type ).toLowerCase(); 4389 event.target = this.element[ 0 ]; 4390 orig = event.originalEvent; 4391 if ( orig ) { 4392 for ( prop in orig ) { 4393 if ( !( prop in event ) ) { 4394 event[ prop ] = orig[ prop ]; 4395 } 4396 } 4397 } 4398 this.element.trigger( event, data ); 4399 return !( $.isFunction( callback ) && 4400 callback.apply( this.element[0], [ event ].concat( data ) ) === false || 4401 event.isDefaultPrevented() ); 4402 } 4403}; 4404$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 4405 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 4406 if ( typeof options === "string" ) { 4407 options = { effect: options }; 4408 } 4409 var hasOptions, 4410 effectName = !options ? 4411 method : 4412 options === true || typeof options === "number" ? 4413 defaultEffect : 4414 options.effect || defaultEffect; 4415 options = options || {}; 4416 if ( typeof options === "number" ) { 4417 options = { duration: options }; 4418 } 4419 hasOptions = !$.isEmptyObject( options ); 4420 options.complete = callback; 4421 if ( options.delay ) { 4422 element.delay( options.delay ); 4423 } 4424 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 4425 element[ method ]( options ); 4426 } else if ( effectName !== method && element[ effectName ] ) {
vendor: 60,818 bytes, lines 4427-6202
4427 element[ effectName ]( options.duration, options.easing, callback ); 4428 } else { 4429 element.queue(function( next ) { 4430 $( this )[ method ](); 4431 if ( callback ) { 4432 callback.call( element[ 0 ] ); 4433 } 4434 next(); 4435 }); 4436 } 4437 }; 4438}); 4439})( jQuery ); 4440(function( $, undefined ) { 4441var mouseHandled = false; 4442$( document ).mouseup( function() { 4443 mouseHandled = false; 4444}); 4445$.widget("ui.mouse", { 4446 version: "1.10.4", 4447 options: { 4448 cancel: "input,textarea,button,select,option", 4449 distance: 1, 4450 delay: 0 4451 }, 4452 _mouseInit: function() { 4453 var that = this; 4454 this.element 4455 .bind("mousedown."+this.widgetName, function(event) { 4456 return that._mouseDown(event); 4457 }) 4458 .bind("click."+this.widgetName, function(event) { 4459 if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { 4460 $.removeData(event.target, that.widgetName + ".preventClickEvent"); 4461 event.stopImmediatePropagation(); 4462 return false; 4463 } 4464 }); 4465 this.started = false; 4466 }, 4467 _mouseDestroy: function() { 4468 this.element.unbind("."+this.widgetName); 4469 if ( this._mouseMoveDelegate ) { 4470 $(document) 4471 .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) 4472 .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); 4473 } 4474 }, 4475 _mouseDown: function(event) { 4476 if( mouseHandled ) { return; } 4477 (this._mouseStarted && this._mouseUp(event)); 4478 this._mouseDownEvent = event; 4479 var that = this, 4480 btnIsLeft = (event.which === 1), 4481 elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); 4482 if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { 4483 return true; 4484 } 4485 this.mouseDelayMet = !this.options.delay; 4486 if (!this.mouseDelayMet) { 4487 this._mouseDelayTimer = setTimeout(function() { 4488 that.mouseDelayMet = true; 4489 }, this.options.delay); 4490 } 4491 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 4492 this._mouseStarted = (this._mouseStart(event) !== false); 4493 if (!this._mouseStarted) { 4494 event.preventDefault(); 4495 return true; 4496 } 4497 } 4498 if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { 4499 $.removeData(event.target, this.widgetName + ".preventClickEvent"); 4500 } 4501 this._mouseMoveDelegate = function(event) { 4502 return that._mouseMove(event); 4503 }; 4504 this._mouseUpDelegate = function(event) { 4505 return that._mouseUp(event); 4506 }; 4507 $(document) 4508 .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) 4509 .bind("mouseup."+this.widgetName, this._mouseUpDelegate); 4510 event.preventDefault(); 4511 mouseHandled = true; 4512 return true; 4513 }, 4514 _mouseMove: function(event) { 4515 if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { 4516 return this._mouseUp(event); 4517 } 4518 if (this._mouseStarted) { 4519 this._mouseDrag(event); 4520 return event.preventDefault(); 4521 } 4522 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 4523 this._mouseStarted = 4524 (this._mouseStart(this._mouseDownEvent, event) !== false); 4525 (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); 4526 } 4527 return !this._mouseStarted; 4528 }, 4529 _mouseUp: function(event) { 4530 $(document) 4531 .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) 4532 .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); 4533 if (this._mouseStarted) { 4534 this._mouseStarted = false; 4535 if (event.target === this._mouseDownEvent.target) { 4536 $.data(event.target, this.widgetName + ".preventClickEvent", true); 4537 } 4538 this._mouseStop(event); 4539 } 4540 return false; 4541 }, 4542 _mouseDistanceMet: function(event) { 4543 return (Math.max( 4544 Math.abs(this._mouseDownEvent.pageX - event.pageX), 4545 Math.abs(this._mouseDownEvent.pageY - event.pageY) 4546 ) >= this.options.distance 4547 ); 4548 }, 4549 _mouseDelayMet: function(/* event */) { 4550 return this.mouseDelayMet; 4551 }, 4552 _mouseStart: function(/* event */) {}, 4553 _mouseDrag: function(/* event */) {}, 4554 _mouseStop: function(/* event */) {}, 4555 _mouseCapture: function(/* event */) { return true; } 4556}); 4557})(jQuery); 4558(function( $, undefined ) { 4559$.ui = $.ui || {}; 4560var cachedScrollbarWidth, 4561 max = Math.max, 4562 abs = Math.abs, 4563 round = Math.round, 4564 rhorizontal = /left|center|right/, 4565 rvertical = /top|center|bottom/, 4566 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 4567 rposition = /^\w+/, 4568 rpercent = /%$/, 4569 _position = $.fn.position; 4570function getOffsets( offsets, width, height ) { 4571 return [ 4572 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 4573 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 4574 ]; 4575} 4576function parseCss( element, property ) { 4577 return parseInt( $.css( element, property ), 10 ) || 0; 4578} 4579function getDimensions( elem ) { 4580 var raw = elem[0]; 4581 if ( raw.nodeType === 9 ) { 4582 return { 4583 width: elem.width(), 4584 height: elem.height(), 4585 offset: { top: 0, left: 0 } 4586 }; 4587 } 4588 if ( $.isWindow( raw ) ) { 4589 return { 4590 width: elem.width(), 4591 height: elem.height(), 4592 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 4593 }; 4594 } 4595 if ( raw.preventDefault ) { 4596 return { 4597 width: 0, 4598 height: 0, 4599 offset: { top: raw.pageY, left: raw.pageX } 4600 }; 4601 } 4602 return { 4603 width: elem.outerWidth(), 4604 height: elem.outerHeight(), 4605 offset: elem.offset() 4606 }; 4607} 4608$.position = { 4609 scrollbarWidth: function() { 4610 if ( cachedScrollbarWidth !== undefined ) { 4611 return cachedScrollbarWidth; 4612 } 4613 var w1, w2, 4614 div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), 4615 innerDiv = div.children()[0]; 4616 $( "body" ).append( div ); 4617 w1 = innerDiv.offsetWidth; 4618 div.css( "overflow", "scroll" ); 4619 w2 = innerDiv.offsetWidth; 4620 if ( w1 === w2 ) { 4621 w2 = div[0].clientWidth; 4622 } 4623 div.remove(); 4624 return (cachedScrollbarWidth = w1 - w2); 4625 }, 4626 getScrollInfo: function( within ) { 4627 var overflowX = within.isWindow || within.isDocument ? "" : 4628 within.element.css( "overflow-x" ), 4629 overflowY = within.isWindow || within.isDocument ? "" : 4630 within.element.css( "overflow-y" ), 4631 hasOverflowX = overflowX === "scroll" || 4632 ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), 4633 hasOverflowY = overflowY === "scroll" || 4634 ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); 4635 return { 4636 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 4637 height: hasOverflowX ? $.position.scrollbarWidth() : 0 4638 }; 4639 }, 4640 getWithinInfo: function( element ) { 4641 var withinElement = $( element || window ), 4642 isWindow = $.isWindow( withinElement[0] ), 4643 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; 4644 return { 4645 element: withinElement, 4646 isWindow: isWindow, 4647 isDocument: isDocument, 4648 offset: withinElement.offset() || { left: 0, top: 0 }, 4649 scrollLeft: withinElement.scrollLeft(), 4650 scrollTop: withinElement.scrollTop(), 4651 width: isWindow ? withinElement.width() : withinElement.outerWidth(), 4652 height: isWindow ? withinElement.height() : withinElement.outerHeight() 4653 }; 4654 } 4655}; 4656$.fn.position = function( options ) { 4657 if ( !options || !options.of ) { 4658 return _position.apply( this, arguments ); 4659 } 4660 options = $.extend( {}, options ); 4661 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 4662 target = $( options.of ), 4663 within = $.position.getWithinInfo( options.within ), 4664 scrollInfo = $.position.getScrollInfo( within ), 4665 collision = ( options.collision || "flip" ).split( " " ), 4666 offsets = {}; 4667 dimensions = getDimensions( target ); 4668 if ( target[0].preventDefault ) { 4669 options.at = "left top"; 4670 } 4671 targetWidth = dimensions.width; 4672 targetHeight = dimensions.height; 4673 targetOffset = dimensions.offset; 4674 // clone to reuse original targetOffset later 4675 basePosition = $.extend( {}, targetOffset ); 4676 $.each( [ "my", "at" ], function() { 4677 var pos = ( options[ this ] || "" ).split( " " ), 4678 horizontalOffset, 4679 verticalOffset; 4680 if ( pos.length === 1) { 4681 pos = rhorizontal.test( pos[ 0 ] ) ? 4682 pos.concat( [ "center" ] ) : 4683 rvertical.test( pos[ 0 ] ) ? 4684 [ "center" ].concat( pos ) : 4685 [ "center", "center" ]; 4686 } 4687 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 4688 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 4689 horizontalOffset = roffset.exec( pos[ 0 ] ); 4690 verticalOffset = roffset.exec( pos[ 1 ] ); 4691 offsets[ this ] = [ 4692 horizontalOffset ? horizontalOffset[ 0 ] : 0, 4693 verticalOffset ? verticalOffset[ 0 ] : 0 4694 ]; 4695 options[ this ] = [ 4696 rposition.exec( pos[ 0 ] )[ 0 ], 4697 rposition.exec( pos[ 1 ] )[ 0 ] 4698 ]; 4699 }); 4700 if ( collision.length === 1 ) { 4701 collision[ 1 ] = collision[ 0 ]; 4702 } 4703 if ( options.at[ 0 ] === "right" ) { 4704 basePosition.left += targetWidth; 4705 } else if ( options.at[ 0 ] === "center" ) { 4706 basePosition.left += targetWidth / 2; 4707 } 4708 if ( options.at[ 1 ] === "bottom" ) { 4709 basePosition.top += targetHeight; 4710 } else if ( options.at[ 1 ] === "center" ) { 4711 basePosition.top += targetHeight / 2; 4712 } 4713 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 4714 basePosition.left += atOffset[ 0 ]; 4715 basePosition.top += atOffset[ 1 ]; 4716 return this.each(function() { 4717 var collisionPosition, using, 4718 elem = $( this ), 4719 elemWidth = elem.outerWidth(), 4720 elemHeight = elem.outerHeight(), 4721 marginLeft = parseCss( this, "marginLeft" ), 4722 marginTop = parseCss( this, "marginTop" ), 4723 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, 4724 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, 4725 position = $.extend( {}, basePosition ), 4726 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 4727 if ( options.my[ 0 ] === "right" ) { 4728 position.left -= elemWidth; 4729 } else if ( options.my[ 0 ] === "center" ) { 4730 position.left -= elemWidth / 2; 4731 } 4732 if ( options.my[ 1 ] === "bottom" ) { 4733 position.top -= elemHeight; 4734 } else if ( options.my[ 1 ] === "center" ) { 4735 position.top -= elemHeight / 2; 4736 } 4737 position.left += myOffset[ 0 ]; 4738 position.top += myOffset[ 1 ]; 4739 if ( !$.support.offsetFractions ) { 4740 position.left = round( position.left ); 4741 position.top = round( position.top ); 4742 } 4743 collisionPosition = { 4744 marginLeft: marginLeft, 4745 marginTop: marginTop 4746 }; 4747 $.each( [ "left", "top" ], function( i, dir ) { 4748 if ( $.ui.position[ collision[ i ] ] ) { 4749 $.ui.position[ collision[ i ] ][ dir ]( position, { 4750 targetWidth: targetWidth, 4751 targetHeight: targetHeight, 4752 elemWidth: elemWidth, 4753 elemHeight: elemHeight, 4754 collisionPosition: collisionPosition, 4755 collisionWidth: collisionWidth, 4756 collisionHeight: collisionHeight, 4757 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 4758 my: options.my, 4759 at: options.at, 4760 within: within, 4761 elem : elem 4762 }); 4763 } 4764 }); 4765 if ( options.using ) { 4766 using = function( props ) { 4767 var left = targetOffset.left - position.left, 4768 right = left + targetWidth - elemWidth, 4769 top = targetOffset.top - position.top, 4770 bottom = top + targetHeight - elemHeight, 4771 feedback = { 4772 target: { 4773 element: target, 4774 left: targetOffset.left, 4775 top: targetOffset.top, 4776 width: targetWidth, 4777 height: targetHeight 4778 }, 4779 element: { 4780 element: elem, 4781 left: position.left, 4782 top: position.top, 4783 width: elemWidth, 4784 height: elemHeight 4785 }, 4786 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 4787 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 4788 }; 4789 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 4790 feedback.horizontal = "center"; 4791 } 4792 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 4793 feedback.vertical = "middle"; 4794 } 4795 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 4796 feedback.important = "horizontal"; 4797 } else { 4798 feedback.important = "vertical"; 4799 } 4800 options.using.call( this, props, feedback ); 4801 }; 4802 } 4803 elem.offset( $.extend( position, { using: using } ) ); 4804 }); 4805}; 4806$.ui.position = { 4807 fit: { 4808 left: function( position, data ) { 4809 var within = data.within, 4810 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 4811 outerWidth = within.width, 4812 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 4813 overLeft = withinOffset - collisionPosLeft, 4814 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 4815 newOverRight; 4816 if ( data.collisionWidth > outerWidth ) { 4817 if ( overLeft > 0 && overRight <= 0 ) { 4818 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; 4819 position.left += overLeft - newOverRight; 4820 } else if ( overRight > 0 && overLeft <= 0 ) { 4821 position.left = withinOffset; 4822 } else { 4823 if ( overLeft > overRight ) { 4824 position.left = withinOffset + outerWidth - data.collisionWidth; 4825 } else { 4826 position.left = withinOffset; 4827 } 4828 } 4829 } else if ( overLeft > 0 ) { 4830 position.left += overLeft; 4831 } else if ( overRight > 0 ) { 4832 position.left -= overRight; 4833 } else { 4834 position.left = max( position.left - collisionPosLeft, position.left ); 4835 } 4836 }, 4837 top: function( position, data ) { 4838 var within = data.within, 4839 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 4840 outerHeight = data.within.height, 4841 collisionPosTop = position.top - data.collisionPosition.marginTop, 4842 overTop = withinOffset - collisionPosTop, 4843 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 4844 newOverBottom; 4845 if ( data.collisionHeight > outerHeight ) { 4846 if ( overTop > 0 && overBottom <= 0 ) { 4847 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; 4848 position.top += overTop - newOverBottom; 4849 } else if ( overBottom > 0 && overTop <= 0 ) { 4850 position.top = withinOffset; 4851 } else { 4852 if ( overTop > overBottom ) { 4853 position.top = withinOffset + outerHeight - data.collisionHeight; 4854 } else { 4855 position.top = withinOffset; 4856 } 4857 } 4858 } else if ( overTop > 0 ) { 4859 position.top += overTop; 4860 } else if ( overBottom > 0 ) { 4861 position.top -= overBottom; 4862 } else { 4863 position.top = max( position.top - collisionPosTop, position.top ); 4864 } 4865 } 4866 }, 4867 flip: { 4868 left: function( position, data ) { 4869 var within = data.within, 4870 withinOffset = within.offset.left + within.scrollLeft, 4871 outerWidth = within.width, 4872 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 4873 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 4874 overLeft = collisionPosLeft - offsetLeft, 4875 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 4876 myOffset = data.my[ 0 ] === "left" ? 4877 -data.elemWidth : 4878 data.my[ 0 ] === "right" ? 4879 data.elemWidth : 4880 0, 4881 atOffset = data.at[ 0 ] === "left" ? 4882 data.targetWidth : 4883 data.at[ 0 ] === "right" ? 4884 -data.targetWidth : 4885 0, 4886 offset = -2 * data.offset[ 0 ], 4887 newOverRight, 4888 newOverLeft; 4889 4890 if ( overLeft < 0 ) { 4891 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; 4892 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 4893 position.left += myOffset + atOffset + offset; 4894 } 4895 } 4896 else if ( overRight > 0 ) { 4897 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; 4898 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 4899 position.left += myOffset + atOffset + offset; 4900 } 4901 } 4902 }, 4903 top: function( position, data ) { 4904 var within = data.within, 4905 withinOffset = within.offset.top + within.scrollTop, 4906 outerHeight = within.height, 4907 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 4908 collisionPosTop = position.top - data.collisionPosition.marginTop, 4909 overTop = collisionPosTop - offsetTop, 4910 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 4911 top = data.my[ 1 ] === "top", 4912 myOffset = top ? 4913 -data.elemHeight : 4914 data.my[ 1 ] === "bottom" ? 4915 data.elemHeight : 4916 0, 4917 atOffset = data.at[ 1 ] === "top" ? 4918 data.targetHeight : 4919 data.at[ 1 ] === "bottom" ? 4920 -data.targetHeight : 4921 0, 4922 offset = -2 * data.offset[ 1 ], 4923 newOverTop, 4924 newOverBottom; 4925 if ( overTop < 0 ) { 4926 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; 4927 if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { 4928 position.top += myOffset + atOffset + offset; 4929 } 4930 } 4931 else if ( overBottom > 0 ) { 4932 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 4933 if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { 4934 position.top += myOffset + atOffset + offset; 4935 } 4936 } 4937 } 4938 }, 4939 flipfit: { 4940 left: function() { 4941 $.ui.position.flip.left.apply( this, arguments ); 4942 $.ui.position.fit.left.apply( this, arguments ); 4943 }, 4944 top: function() { 4945 $.ui.position.flip.top.apply( this, arguments ); 4946 $.ui.position.fit.top.apply( this, arguments ); 4947 } 4948 } 4949}; 4950(function () { 4951 var testElement, testElementParent, testElementStyle, offsetLeft, i, 4952 body = document.getElementsByTagName( "body" )[ 0 ], 4953 div = document.createElement( "div" ); 4954 testElement = document.createElement( body ? "div" : "body" ); 4955 testElementStyle = { 4956 visibility: "hidden", 4957 width: 0, 4958 height: 0, 4959 border: 0, 4960 margin: 0, 4961 background: "none" 4962 }; 4963 if ( body ) { 4964 $.extend( testElementStyle, { 4965 position: "absolute", 4966 left: "-1000px", 4967 top: "-1000px" 4968 }); 4969 } 4970 for ( i in testElementStyle ) { 4971 testElement.style[ i ] = testElementStyle[ i ]; 4972 } 4973 testElement.appendChild( div ); 4974 testElementParent = body || document.documentElement; 4975 testElementParent.insertBefore( testElement, testElementParent.firstChild ); 4976 div.style.cssText = "position: absolute; left: 10.7432222px;"; 4977 offsetLeft = $( div ).offset().left; 4978 $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; 4979 testElement.innerHTML = ""; 4980 testElementParent.removeChild( testElement ); 4981})(); 4982}( jQuery ) ); 4983(function( $, undefined ) { 4984$.widget("ui.draggable", $.ui.mouse, { 4985 version: "1.10.4", 4986 widgetEventPrefix: "drag", 4987 options: { 4988 addClasses: true, 4989 appendTo: "parent", 4990 axis: false, 4991 connectToSortable: false, 4992 containment: false, 4993 cursor: "auto", 4994 cursorAt: false, 4995 grid: false, 4996 handle: false, 4997 helper: "original", 4998 iframeFix: false, 4999 opacity: false, 5000 refreshPositions: false, 5001 revert: false, 5002 revertDuration: 500, 5003 scope: "default", 5004 scroll: true, 5005 scrollSensitivity: 20, 5006 scrollSpeed: 20, 5007 snap: false, 5008 snapMode: "both", 5009 snapTolerance: 20, 5010 stack: false, 5011 zIndex: false, 5012 drag: null, 5013 start: null, 5014 stop: null 5015 }, 5016 _create: function() { 5017 if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { 5018 this.element[0].style.position = "relative"; 5019 } 5020 if (this.options.addClasses){ 5021 this.element.addClass("ui-draggable"); 5022 } 5023 if (this.options.disabled){ 5024 this.element.addClass("ui-draggable-disabled"); 5025 } 5026 this._mouseInit(); 5027 }, 5028 _destroy: function() { 5029 this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); 5030 this._mouseDestroy(); 5031 }, 5032 _mouseCapture: function(event) { 5033 var o = this.options; 5034 if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { 5035 return false; 5036 } 5037 this.handle = this._getHandle(event); 5038 if (!this.handle) { 5039 return false; 5040 } 5041 $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { 5042 $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>") 5043 .css({ 5044 width: this.offsetWidth+"px", height: this.offsetHeight+"px", 5045 position: "absolute", opacity: "0.001", zIndex: 1000 5046 }) 5047 .css($(this).offset()) 5048 .appendTo("body"); 5049 }); 5050 return true; 5051 }, 5052 _mouseStart: function(event) { 5053 var o = this.options; 5054 this.helper = this._createHelper(event); 5055 this.helper.addClass("ui-draggable-dragging"); 5056 this._cacheHelperProportions(); 5057 if($.ui.ddmanager) { 5058 $.ui.ddmanager.current = this; 5059 } 5060 this._cacheMargins(); 5061 this.cssPosition = this.helper.css( "position" ); 5062 this.scrollParent = this.helper.scrollParent(); 5063 this.offsetParent = this.helper.offsetParent(); 5064 this.offsetParentCssPosition = this.offsetParent.css( "position" ); 5065 this.offset = this.positionAbs = this.element.offset(); 5066 this.offset = { 5067 top: this.offset.top - this.margins.top, 5068 left: this.offset.left - this.margins.left 5069 }; 5070 this.offset.scroll = false; 5071 $.extend(this.offset, { 5072 click: { 5073 left: event.pageX - this.offset.left, 5074 top: event.pageY - this.offset.top 5075 }, 5076 parent: this._getParentOffset(), 5077 relative: this._getRelativeOffset() 5078 }); 5079 this.originalPosition = this.position = this._generatePosition(event); 5080 this.originalPageX = event.pageX; 5081 this.originalPageY = event.pageY; 5082 (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); 5083 this._setContainment(); 5084 if(this._trigger("start", event) === false) { 5085 this._clear(); 5086 return false; 5087 } 5088 this._cacheHelperProportions(); 5089 if ($.ui.ddmanager && !o.dropBehaviour) { 5090 $.ui.ddmanager.prepareOffsets(this, event); 5091 } 5092 this._mouseDrag(event, true); 5093 if ( $.ui.ddmanager ) { 5094 $.ui.ddmanager.dragStart(this, event); 5095 } 5096 return true; 5097 }, 5098 _mouseDrag: function(event, noPropagation) { 5099 if ( this.offsetParentCssPosition === "fixed" ) { 5100 this.offset.parent = this._getParentOffset(); 5101 } 5102 this.position = this._generatePosition(event); 5103 this.positionAbs = this._convertPositionTo("absolute"); 5104 if (!noPropagation) { 5105 var ui = this._uiHash(); 5106 if(this._trigger("drag", event, ui) === false) { 5107 this._mouseUp({}); 5108 return false; 5109 } 5110 this.position = ui.position; 5111 } 5112 if(!this.options.axis || this.options.axis !== "y") { 5113 this.helper[0].style.left = this.position.left+"px"; 5114 } 5115 if(!this.options.axis || this.options.axis !== "x") { 5116 this.helper[0].style.top = this.position.top+"px"; 5117 } 5118 if($.ui.ddmanager) { 5119 $.ui.ddmanager.drag(this, event); 5120 } 5121 return false; 5122 }, 5123 _mouseStop: function(event) { 5124 var that = this, 5125 dropped = false; 5126 if ($.ui.ddmanager && !this.options.dropBehaviour) { 5127 dropped = $.ui.ddmanager.drop(this, event); 5128 } 5129 if(this.dropped) { 5130 dropped = this.dropped; 5131 this.dropped = false; 5132 } 5133 if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) { 5134 return false; 5135 } 5136 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))) { 5137 $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { 5138 if(that._trigger("stop", event) !== false) { 5139 that._clear(); 5140 } 5141 }); 5142 } else { 5143 if(this._trigger("stop", event) !== false) { 5144 this._clear(); 5145 } 5146 } 5147 return false; 5148 }, 5149 _mouseUp: function(event) { 5150 $("div.ui-draggable-iframeFix").each(function() { 5151 this.parentNode.removeChild(this); 5152 }); 5153 if( $.ui.ddmanager ) { 5154 $.ui.ddmanager.dragStop(this, event); 5155 } 5156 return $.ui.mouse.prototype._mouseUp.call(this, event); 5157 }, 5158 cancel: function() { 5159 if(this.helper.is(".ui-draggable-dragging")) { 5160 this._mouseUp({}); 5161 } else { 5162 this._clear(); 5163 } 5164 return this; 5165 }, 5166 _getHandle: function(event) { 5167 return this.options.handle ? 5168 !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : 5169 true; 5170 }, 5171 _createHelper: function(event) { 5172 var o = this.options, 5173 helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element); 5174 if(!helper.parents("body").length) { 5175 helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); 5176 } 5177 if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { 5178 helper.css("position", "absolute"); 5179 } 5180 return helper; 5181 }, 5182 _adjustOffsetFromHelper: function(obj) { 5183 if (typeof obj === "string") { 5184 obj = obj.split(" "); 5185 } 5186 if ($.isArray(obj)) { 5187 obj = {left: +obj[0], top: +obj[1] || 0}; 5188 } 5189 if ("left" in obj) { 5190 this.offset.click.left = obj.left + this.margins.left; 5191 } 5192 if ("right" in obj) { 5193 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 5194 } 5195 if ("top" in obj) { 5196 this.offset.click.top = obj.top + this.margins.top; 5197 } 5198 if ("bottom" in obj) { 5199 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 5200 } 5201 }, 5202 _getParentOffset: function() { 5203 var po = this.offsetParent.offset(); 5204 if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { 5205 po.left += this.scrollParent.scrollLeft(); 5206 po.top += this.scrollParent.scrollTop(); 5207 } 5208 if((this.offsetParent[0] === document.body) || 5209 (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { 5210 po = { top: 0, left: 0 }; 5211 } 5212 return { 5213 top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), 5214 left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) 5215 }; 5216 }, 5217 _getRelativeOffset: function() { 5218 if(this.cssPosition === "relative") { 5219 var p = this.element.position(); 5220 return { 5221 top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), 5222 left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() 5223 }; 5224 } else { 5225 return { top: 0, left: 0 }; 5226 } 5227 }, 5228 _cacheMargins: function() { 5229 this.margins = { 5230 left: (parseInt(this.element.css("marginLeft"),10) || 0), 5231 top: (parseInt(this.element.css("marginTop"),10) || 0), 5232 right: (parseInt(this.element.css("marginRight"),10) || 0), 5233 bottom: (parseInt(this.element.css("marginBottom"),10) || 0) 5234 }; 5235 }, 5236 _cacheHelperProportions: function() { 5237 this.helperProportions = { 5238 width: this.helper.outerWidth(), 5239 height: this.helper.outerHeight() 5240 }; 5241 }, 5242 _setContainment: function() { 5243 var over, c, ce, 5244 o = this.options; 5245 if ( !o.containment ) { 5246 this.containment = null; 5247 return; 5248 } 5249 if ( o.containment === "window" ) { 5250 this.containment = [ 5251 $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, 5252 $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, 5253 $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, 5254 $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top 5255 ]; 5256 return; 5257 } 5258 if ( o.containment === "document") { 5259 this.containment = [ 5260 0, 5261 0, 5262 $( document ).width() - this.helperProportions.width - this.margins.left, 5263 ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top 5264 ]; 5265 return; 5266 } 5267 if ( o.containment.constructor === Array ) { 5268 this.containment = o.containment; 5269 return; 5270 } 5271 if ( o.containment === "parent" ) { 5272 o.containment = this.helper[ 0 ].parentNode; 5273 } 5274 c = $( o.containment ); 5275 ce = c[ 0 ]; 5276 if( !ce ) { 5277 return; 5278 } 5279 over = c.css( "overflow" ) !== "hidden"; 5280 this.containment = [ 5281 ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 5282 ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) , 5283 ( 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, 5284 ( 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 5285 ]; 5286 this.relative_container = c; 5287 }, 5288 _convertPositionTo: function(d, pos) { 5289 if(!pos) { 5290 pos = this.position; 5291 } 5292 var mod = d === "absolute" ? 1 : -1, 5293 scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent; 5294 if (!this.offset.scroll) { 5295 this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; 5296 } 5297 return { 5298 top: ( 5299 pos.top + 5300 this.offset.relative.top * mod + 5301 this.offset.parent.top * mod - 5302 ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod ) 5303 ), 5304 left: ( 5305 pos.left + 5306 this.offset.relative.left * mod + 5307 this.offset.parent.left * mod - 5308 ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod ) 5309 ) 5310 }; 5311 5312 }, 5313 _generatePosition: function(event) { 5314 var containment, co, top, left, 5315 o = this.options, 5316 scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent, 5317 pageX = event.pageX, 5318 pageY = event.pageY; 5319 if (!this.offset.scroll) { 5320 this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()}; 5321 } 5322 if ( this.originalPosition ) { 5323 if ( this.containment ) { 5324 if ( this.relative_container ){ 5325 co = this.relative_container.offset(); 5326 containment = [ 5327 this.containment[ 0 ] + co.left, 5328 this.containment[ 1 ] + co.top, 5329 this.containment[ 2 ] + co.left, 5330 this.containment[ 3 ] + co.top 5331 ]; 5332 } 5333 else { 5334 containment = this.containment; 5335 } 5336 if(event.pageX - this.offset.click.left < containment[0]) { 5337 pageX = containment[0] + this.offset.click.left; 5338 } 5339 if(event.pageY - this.offset.click.top < containment[1]) { 5340 pageY = containment[1] + this.offset.click.top; 5341 } 5342 if(event.pageX - this.offset.click.left > containment[2]) { 5343 pageX = containment[2] + this.offset.click.left; 5344 } 5345 if(event.pageY - this.offset.click.top > containment[3]) { 5346 pageY = containment[3] + this.offset.click.top; 5347 } 5348 } 5349 if(o.grid) { 5350 top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; 5351 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; 5352 left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; 5353 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; 5354 } 5355 } 5356 return { 5357 top: ( 5358 pageY - 5359 this.offset.click.top - 5360 this.offset.relative.top - 5361 this.offset.parent.top + 5362 ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) 5363 ), 5364 left: ( 5365 pageX - 5366 this.offset.click.left - 5367 this.offset.relative.left - 5368 this.offset.parent.left + 5369 ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) 5370 ) 5371 }; 5372 }, 5373 _clear: function() { 5374 this.helper.removeClass("ui-draggable-dragging"); 5375 if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { 5376 this.helper.remove(); 5377 } 5378 this.helper = null; 5379 this.cancelHelperRemoval = false; 5380 }, 5381 _trigger: function(type, event, ui) { 5382 ui = ui || this._uiHash(); 5383 $.ui.plugin.call(this, type, [event, ui]); 5384 if(type === "drag") { 5385 this.positionAbs = this._convertPositionTo("absolute"); 5386 } 5387 return $.Widget.prototype._trigger.call(this, type, event, ui); 5388 }, 5389 plugins: {}, 5390 _uiHash: function() { 5391 return { 5392 helper: this.helper, 5393 position: this.position, 5394 originalPosition: this.originalPosition, 5395 offset: this.positionAbs 5396 }; 5397 } 5398}); 5399$.ui.plugin.add("draggable", "connectToSortable", { 5400 start: function(event, ui) { 5401 var inst = $(this).data("ui-draggable"), o = inst.options, 5402 uiSortable = $.extend({}, ui, { item: inst.element }); 5403 inst.sortables = []; 5404 $(o.connectToSortable).each(function() { 5405 var sortable = $.data(this, "ui-sortable"); 5406 if (sortable && !sortable.options.disabled) { 5407 inst.sortables.push({ 5408 instance: sortable, 5409 shouldRevert: sortable.options.revert 5410 }); 5411 sortable.refreshPositions(); 5412 sortable._trigger("activate", event, uiSortable); 5413 } 5414 }); 5415 }, 5416 stop: function(event, ui) { 5417 var inst = $(this).data("ui-draggable"), 5418 uiSortable = $.extend({}, ui, { item: inst.element }); 5419 $.each(inst.sortables, function() { 5420 if(this.instance.isOver) { 5421 this.instance.isOver = 0; 5422 inst.cancelHelperRemoval = true; 5423 this.instance.cancelHelperRemoval = false; 5424 if(this.shouldRevert) { 5425 this.instance.options.revert = this.shouldRevert; 5426 } 5427 this.instance._mouseStop(event); 5428 this.instance.options.helper = this.instance.options._helper; 5429 if(inst.options.helper === "original") { 5430 this.instance.currentItem.css({ top: "auto", left: "auto" }); 5431 } 5432 } else { 5433 this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance 5434 this.instance._trigger("deactivate", event, uiSortable); 5435 } 5436 }); 5437 }, 5438 drag: function(event, ui) { 5439 var inst = $(this).data("ui-draggable"), that = this; 5440 $.each(inst.sortables, function() { 5441 var innermostIntersecting = false, 5442 thisSortable = this; 5443 this.instance.positionAbs = inst.positionAbs; 5444 this.instance.helperProportions = inst.helperProportions; 5445 this.instance.offset.click = inst.offset.click; 5446 if(this.instance._intersectsWith(this.instance.containerCache)) { 5447 innermostIntersecting = true; 5448 $.each(inst.sortables, function () { 5449 this.instance.positionAbs = inst.positionAbs; 5450 this.instance.helperProportions = inst.helperProportions; 5451 this.instance.offset.click = inst.offset.click; 5452 if (this !== thisSortable && 5453 this.instance._intersectsWith(this.instance.containerCache) && 5454 $.contains(thisSortable.instance.element[0], this.instance.element[0]) 5455 ) { 5456 innermostIntersecting = false; 5457 } 5458 return innermostIntersecting; 5459 }); 5460 } 5461 if(innermostIntersecting) { 5462 if(!this.instance.isOver) { 5463 this.instance.isOver = 1; 5464 this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true); 5465 this.instance.options._helper = this.instance.options.helper; 5466 this.instance.options.helper = function() { return ui.helper[0]; }; 5467 event.target = this.instance.currentItem[0]; 5468 this.instance._mouseCapture(event, true); 5469 this.instance._mouseStart(event, true, true); 5470 this.instance.offset.click.top = inst.offset.click.top; 5471 this.instance.offset.click.left = inst.offset.click.left; 5472 this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; 5473 this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; 5474 inst._trigger("toSortable", event); 5475 inst.dropped = this.instance.element 5476 inst.currentItem = inst.element; 5477 this.instance.fromOutside = inst; 5478 } 5479 if(this.instance.currentItem) { 5480 this.instance._mouseDrag(event); 5481 } 5482 } else { 5483 if(this.instance.isOver) { 5484 this.instance.isOver = 0; 5485 this.instance.cancelHelperRemoval = true; 5486 this.instance.options.revert = false; 5487 this.instance._trigger("out", event, this.instance._uiHash(this.instance)); 5488 this.instance._mouseStop(event, true); 5489 this.instance.options.helper = this.instance.options._helper; 5490 this.instance.currentItem.remove(); 5491 if(this.instance.placeholder) { 5492 this.instance.placeholder.remove(); 5493 } 5494 inst._trigger("fromSortable", event); 5495 inst.dropped = false; 5496 } 5497 } 5498 }); 5499 } 5500}); 5501$.ui.plugin.add("draggable", "cursor", { 5502 start: function() { 5503 var t = $("body"), o = $(this).data("ui-draggable").options; 5504 if (t.css("cursor")) { 5505 o._cursor = t.css("cursor"); 5506 } 5507 t.css("cursor", o.cursor); 5508 }, 5509 stop: function() { 5510 var o = $(this).data("ui-draggable").options; 5511 if (o._cursor) { 5512 $("body").css("cursor", o._cursor); 5513 } 5514 } 5515}); 5516$.ui.plugin.add("draggable", "opacity", { 5517 start: function(event, ui) { 5518 var t = $(ui.helper), o = $(this).data("ui-draggable").options; 5519 if(t.css("opacity")) { 5520 o._opacity = t.css("opacity"); 5521 } 5522 t.css("opacity", o.opacity); 5523 }, 5524 stop: function(event, ui) { 5525 var o = $(this).data("ui-draggable").options; 5526 if(o._opacity) { 5527 $(ui.helper).css("opacity", o._opacity); 5528 } 5529 } 5530}); 5531$.ui.plugin.add("draggable", "scroll", { 5532 start: function() { 5533 var i = $(this).data("ui-draggable"); 5534 if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { 5535 i.overflowOffset = i.scrollParent.offset(); 5536 } 5537 }, 5538 drag: function( event ) { 5539 var i = $(this).data("ui-draggable"), o = i.options, scrolled = false; 5540 if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") { 5541 if(!o.axis || o.axis !== "x") { 5542 if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { 5543 i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; 5544 } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) { 5545 i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; 5546 } 5547 } 5548 if(!o.axis || o.axis !== "y") { 5549 if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { 5550 i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; 5551 } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) { 5552 i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; 5553 } 5554 } 5555 } else { 5556 if(!o.axis || o.axis !== "x") { 5557 if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) { 5558 scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); 5559 } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { 5560 scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); 5561 } 5562 } 5563 if(!o.axis || o.axis !== "y") { 5564 if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { 5565 scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); 5566 } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { 5567 scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); 5568 } 5569 } 5570 } 5571 if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { 5572 $.ui.ddmanager.prepareOffsets(i, event); 5573 } 5574 } 5575}); 5576$.ui.plugin.add("draggable", "snap", { 5577 start: function() { 5578 var i = $(this).data("ui-draggable"), 5579 o = i.options; 5580 i.snapElements = []; 5581 $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { 5582 var $t = $(this), 5583 $o = $t.offset(); 5584 if(this !== i.element[0]) { 5585 i.snapElements.push({ 5586 item: this, 5587 width: $t.outerWidth(), height: $t.outerHeight(), 5588 top: $o.top, left: $o.left 5589 }); 5590 } 5591 }); 5592 }, 5593 drag: function(event, ui) { 5594 var ts, bs, ls, rs, l, r, t, b, i, first, 5595 inst = $(this).data("ui-draggable"), 5596 o = inst.options, 5597 d = o.snapTolerance, 5598 x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, 5599 y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; 5600 for (i = inst.snapElements.length - 1; i >= 0; i--){ 5601 l = inst.snapElements[i].left; 5602 r = l + inst.snapElements[i].width; 5603 t = inst.snapElements[i].top; 5604 b = t + inst.snapElements[i].height; 5605 if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { 5606 if(inst.snapElements[i].snapping) { 5607 (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 5608 } 5609 inst.snapElements[i].snapping = false; 5610 continue; 5611 } 5612 if(o.snapMode !== "inner") { 5613 ts = Math.abs(t - y2) <= d; 5614 bs = Math.abs(b - y1) <= d; 5615 ls = Math.abs(l - x2) <= d; 5616 rs = Math.abs(r - x1) <= d; 5617 if(ts) { 5618 ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; 5619 } 5620 if(bs) { 5621 ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; 5622 } 5623 if(ls) { 5624 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; 5625 } 5626 if(rs) { 5627 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; 5628 } 5629 } 5630 first = (ts || bs || ls || rs); 5631 if(o.snapMode !== "outer") { 5632 ts = Math.abs(t - y1) <= d; 5633 bs = Math.abs(b - y2) <= d; 5634 ls = Math.abs(l - x1) <= d; 5635 rs = Math.abs(r - x2) <= d; 5636 if(ts) { 5637 ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; 5638 } 5639 if(bs) { 5640 ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; 5641 } 5642 if(ls) { 5643 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; 5644 } 5645 if(rs) { 5646 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; 5647 } 5648 } 5649 if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { 5650 (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 5651 } 5652 inst.snapElements[i].snapping = (ts || bs || ls || rs || first); 5653 } 5654 } 5655}); 5656$.ui.plugin.add("draggable", "stack", { 5657 start: function() { 5658 var min, 5659 o = this.data("ui-draggable").options, 5660 group = $.makeArray($(o.stack)).sort(function(a,b) { 5661 return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); 5662 }); 5663 if (!group.length) { return; } 5664 min = parseInt($(group[0]).css("zIndex"), 10) || 0; 5665 $(group).each(function(i) { 5666 $(this).css("zIndex", min + i); 5667 }); 5668 this.css("zIndex", (min + group.length)); 5669 } 5670}); 5671$.ui.plugin.add("draggable", "zIndex", { 5672 start: function(event, ui) { 5673 var t = $(ui.helper), o = $(this).data("ui-draggable").options; 5674 if(t.css("zIndex")) { 5675 o._zIndex = t.css("zIndex"); 5676 } 5677 t.css("zIndex", o.zIndex); 5678 }, 5679 stop: function(event, ui) { 5680 var o = $(this).data("ui-draggable").options; 5681 if(o._zIndex) { 5682 $(ui.helper).css("zIndex", o._zIndex); 5683 } 5684 } 5685}); 5686})(jQuery); 5687(function( $, undefined ) { 5688function num(v) { 5689 return parseInt(v, 10) || 0; 5690} 5691function isNumber(value) { 5692 return !isNaN(parseInt(value, 10)); 5693} 5694$.widget("ui.resizable", $.ui.mouse, { 5695 version: "1.10.4", 5696 widgetEventPrefix: "resize", 5697 options: { 5698 alsoResize: false, 5699 animate: false, 5700 animateDuration: "slow", 5701 animateEasing: "swing", 5702 aspectRatio: false, 5703 autoHide: false, 5704 containment: false, 5705 ghost: false, 5706 grid: false, 5707 handles: "e,s,se", 5708 helper: false, 5709 maxHeight: null, 5710 maxWidth: null, 5711 minHeight: 10, 5712 minWidth: 10, 5713 zIndex: 90, 5714 resize: null, 5715 start: null, 5716 stop: null 5717 }, 5718 _create: function() { 5719 var n, i, handle, axis, hname, 5720 that = this, 5721 o = this.options; 5722 this.element.addClass("ui-resizable"); 5723 $.extend(this, { 5724 _aspectRatio: !!(o.aspectRatio), 5725 aspectRatio: o.aspectRatio, 5726 originalElement: this.element, 5727 _proportionallyResizeElements: [], 5728 _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null 5729 }); 5730 if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { 5731 this.element.wrap( 5732 $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ 5733 position: this.element.css("position"), 5734 width: this.element.outerWidth(), 5735 height: this.element.outerHeight(), 5736 top: this.element.css("top"), 5737 left: this.element.css("left") 5738 }) 5739 ); 5740 this.element = this.element.parent().data( 5741 "ui-resizable", this.element.data("ui-resizable") 5742 ); 5743 this.elementIsWrapper = true; 5744 this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); 5745 this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); 5746 this.originalResizeStyle = this.originalElement.css("resize"); 5747 this.originalElement.css("resize", "none"); 5748 this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })); 5749 this.originalElement.css({ margin: this.originalElement.css("margin") }); 5750 this._proportionallyResize(); 5751 } 5752 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" }); 5753 if(this.handles.constructor === String) { 5754 if ( this.handles === "all") { 5755 this.handles = "n,e,s,w,se,sw,ne,nw"; 5756 } 5757 n = this.handles.split(","); 5758 this.handles = {}; 5759 for(i = 0; i < n.length; i++) { 5760 handle = $.trim(n[i]); 5761 hname = "ui-resizable-"+handle; 5762 axis = $("<div class='ui-resizable-handle " + hname + "'></div>"); 5763 axis.css({ zIndex: o.zIndex }); 5764 if ("se" === handle) { 5765 axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); 5766 } 5767 this.handles[handle] = ".ui-resizable-"+handle; 5768 this.element.append(axis); 5769 } 5770 } 5771 this._renderAxis = function(target) { 5772 var i, axis, padPos, padWrapper; 5773 target = target || this.element; 5774 for(i in this.handles) { 5775 if(this.handles[i].constructor === String) { 5776 this.handles[i] = $(this.handles[i], this.element).show(); 5777 } 5778 if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { 5779 axis = $(this.handles[i], this.element); 5780 padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); 5781 padPos = [ "padding", 5782 /ne|nw|n/.test(i) ? "Top" : 5783 /se|sw|s/.test(i) ? "Bottom" : 5784 /^e$/.test(i) ? "Right" : "Left" ].join(""); 5785 target.css(padPos, padWrapper); 5786 this._proportionallyResize(); 5787 } 5788 if(!$(this.handles[i]).length) { 5789 continue; 5790 } 5791 } 5792 }; 5793 this._renderAxis(this.element); 5794 this._handles = $(".ui-resizable-handle", this.element) 5795 .disableSelection(); 5796 this._handles.mouseover(function() { 5797 if (!that.resizing) { 5798 if (this.className) { 5799 axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); 5800 } 5801 that.axis = axis && axis[1] ? axis[1] : "se"; 5802 } 5803 }); 5804 if (o.autoHide) { 5805 this._handles.hide(); 5806 $(this.element) 5807 .addClass("ui-resizable-autohide") 5808 .mouseenter(function() { 5809 if (o.disabled) { 5810 return; 5811 } 5812 $(this).removeClass("ui-resizable-autohide"); 5813 that._handles.show(); 5814 }) 5815 .mouseleave(function(){ 5816 if (o.disabled) { 5817 return; 5818 } 5819 if (!that.resizing) { 5820 $(this).addClass("ui-resizable-autohide"); 5821 that._handles.hide(); 5822 } 5823 }); 5824 } 5825 this._mouseInit(); 5826 }, 5827 _destroy: function() { 5828 this._mouseDestroy(); 5829 var wrapper, 5830 _destroy = function(exp) { 5831 $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") 5832 .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove(); 5833 }; 5834 if (this.elementIsWrapper) { 5835 _destroy(this.element); 5836 wrapper = this.element; 5837 this.originalElement.css({ 5838 position: wrapper.css("position"), 5839 width: wrapper.outerWidth(), 5840 height: wrapper.outerHeight(), 5841 top: wrapper.css("top"), 5842 left: wrapper.css("left") 5843 }).insertAfter( wrapper ); 5844 wrapper.remove(); 5845 } 5846 this.originalElement.css("resize", this.originalResizeStyle); 5847 _destroy(this.originalElement); 5848 return this; 5849 }, 5850 _mouseCapture: function(event) { 5851 var i, handle, 5852 capture = false; 5853 for (i in this.handles) { 5854 handle = $(this.handles[i])[0]; 5855 if (handle === event.target || $.contains(handle, event.target)) { 5856 capture = true; 5857 } 5858 } 5859 return !this.options.disabled && capture; 5860 }, 5861 _mouseStart: function(event) { 5862 var curleft, curtop, cursor, 5863 o = this.options, 5864 iniPos = this.element.position(), 5865 el = this.element; 5866 this.resizing = true; 5867 if ( (/absolute/).test( el.css("position") ) ) { 5868 el.css({ position: "absolute", top: el.css("top"), left: el.css("left") }); 5869 } else if (el.is(".ui-draggable")) { 5870 el.css({ position: "absolute", top: iniPos.top, left: iniPos.left }); 5871 } 5872 this._renderProxy(); 5873 curleft = num(this.helper.css("left")); 5874 curtop = num(this.helper.css("top")); 5875 if (o.containment) { 5876 curleft += $(o.containment).scrollLeft() || 0; 5877 curtop += $(o.containment).scrollTop() || 0; 5878 } 5879 this.offset = this.helper.offset(); 5880 this.position = { left: curleft, top: curtop }; 5881 this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() }; 5882 this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; 5883 this.originalPosition = { left: curleft, top: curtop }; 5884 this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; 5885 this.originalMousePosition = { left: event.pageX, top: event.pageY }; 5886 this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); 5887 cursor = $(".ui-resizable-" + this.axis).css("cursor"); 5888 $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); 5889 el.addClass("ui-resizable-resizing"); 5890 this._propagate("start", event); 5891 return true; 5892 }, 5893 _mouseDrag: function(event) { 5894 var data, 5895 el = this.helper, props = {}, 5896 smp = this.originalMousePosition, 5897 a = this.axis, 5898 prevTop = this.position.top, 5899 prevLeft = this.position.left, 5900 prevWidth = this.size.width, 5901 prevHeight = this.size.height, 5902 dx = (event.pageX-smp.left)||0, 5903 dy = (event.pageY-smp.top)||0, 5904 trigger = this._change[a]; 5905 if (!trigger) { 5906 return false; 5907 } 5908 data = trigger.apply(this, [event, dx, dy]); 5909 this._updateVirtualBoundaries(event.shiftKey); 5910 if (this._aspectRatio || event.shiftKey) { 5911 data = this._updateRatio(data, event); 5912 } 5913 data = this._respectSize(data, event); 5914 this._updateCache(data); 5915 this._propagate("resize", event); 5916 if (this.position.top !== prevTop) { 5917 props.top = this.position.top + "px"; 5918 } 5919 if (this.position.left !== prevLeft) { 5920 props.left = this.position.left + "px"; 5921 } 5922 if (this.size.width !== prevWidth) { 5923 props.width = this.size.width + "px"; 5924 } 5925 if (this.size.height !== prevHeight) { 5926 props.height = this.size.height + "px"; 5927 } 5928 el.css(props); 5929 if (!this._helper && this._proportionallyResizeElements.length) { 5930 this._proportionallyResize(); 5931 } 5932 if ( ! $.isEmptyObject(props) ) { 5933 this._trigger("resize", event, this.ui()); 5934 } 5935 return false; 5936 }, 5937 _mouseStop: function(event) { 5938 this.resizing = false; 5939 var pr, ista, soffseth, soffsetw, s, left, top, 5940 o = this.options, that = this; 5941 if(this._helper) { 5942 pr = this._proportionallyResizeElements; 5943 ista = pr.length && (/textarea/i).test(pr[0].nodeName); 5944 soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height; 5945 soffsetw = ista ? 0 : that.sizeDiff.width; 5946 s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) }; 5947 left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null; 5948 top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; 5949 if (!o.animate) { 5950 this.element.css($.extend(s, { top: top, left: left })); 5951 } 5952 that.helper.height(that.size.height); 5953 that.helper.width(that.size.width); 5954 if (this._helper && !o.animate) { 5955 this._proportionallyResize(); 5956 } 5957 } 5958 $("body").css("cursor", "auto"); 5959 this.element.removeClass("ui-resizable-resizing"); 5960 this._propagate("stop", event); 5961 if (this._helper) { 5962 this.helper.remove(); 5963 } 5964 return false; 5965 }, 5966 _updateVirtualBoundaries: function(forceAspectRatio) { 5967 var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, 5968 o = this.options; 5969 b = { 5970 minWidth: isNumber(o.minWidth) ? o.minWidth : 0, 5971 maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity, 5972 minHeight: isNumber(o.minHeight) ? o.minHeight : 0, 5973 maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity 5974 }; 5975 if(this._aspectRatio || forceAspectRatio) { 5976 pMinWidth = b.minHeight * this.aspectRatio; 5977 pMinHeight = b.minWidth / this.aspectRatio; 5978 pMaxWidth = b.maxHeight * this.aspectRatio; 5979 pMaxHeight = b.maxWidth / this.aspectRatio; 5980 if(pMinWidth > b.minWidth) { 5981 b.minWidth = pMinWidth; 5982 } 5983 if(pMinHeight > b.minHeight) { 5984 b.minHeight = pMinHeight; 5985 } 5986 if(pMaxWidth < b.maxWidth) { 5987 b.maxWidth = pMaxWidth; 5988 } 5989 if(pMaxHeight < b.maxHeight) { 5990 b.maxHeight = pMaxHeight; 5991 } 5992 } 5993 this._vBoundaries = b; 5994 }, 5995 _updateCache: function(data) { 5996 this.offset = this.helper.offset(); 5997 if (isNumber(data.left)) { 5998 this.position.left = data.left; 5999 } 6000 if (isNumber(data.top)) { 6001 this.position.top = data.top; 6002 } 6003 if (isNumber(data.height)) { 6004 this.size.height = data.height; 6005 } 6006 if (isNumber(data.width)) { 6007 this.size.width = data.width; 6008 } 6009 }, 6010 _updateRatio: function( data ) { 6011 var cpos = this.position, 6012 csize = this.size, 6013 a = this.axis; 6014 if (isNumber(data.height)) { 6015 data.width = (data.height * this.aspectRatio); 6016 } else if (isNumber(data.width)) { 6017 data.height = (data.width / this.aspectRatio); 6018 } 6019 if (a === "sw") { 6020 data.left = cpos.left + (csize.width - data.width); 6021 data.top = null; 6022 } 6023 if (a === "nw") { 6024 data.top = cpos.top + (csize.height - data.height); 6025 data.left = cpos.left + (csize.width - data.width); 6026 } 6027 return data; 6028 }, 6029 _respectSize: function( data ) { 6030 var o = this._vBoundaries, 6031 a = this.axis, 6032 ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), 6033 isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height), 6034 dw = this.originalPosition.left + this.originalSize.width, 6035 dh = this.position.top + this.size.height, 6036 cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); 6037 if (isminw) { 6038 data.width = o.minWidth; 6039 } 6040 if (isminh) { 6041 data.height = o.minHeight; 6042 } 6043 if (ismaxw) { 6044 data.width = o.maxWidth; 6045 } 6046 if (ismaxh) { 6047 data.height = o.maxHeight; 6048 } 6049 if (isminw && cw) { 6050 data.left = dw - o.minWidth; 6051 } 6052 if (ismaxw && cw) { 6053 data.left = dw - o.maxWidth; 6054 } 6055 if (isminh && ch) { 6056 data.top = dh - o.minHeight; 6057 } 6058 if (ismaxh && ch) { 6059 data.top = dh - o.maxHeight; 6060 } 6061 if (!data.width && !data.height && !data.left && data.top) { 6062 data.top = null; 6063 } else if (!data.width && !data.height && !data.top && data.left) { 6064 data.left = null; 6065 } 6066 return data; 6067 }, 6068 _proportionallyResize: function() { 6069 if (!this._proportionallyResizeElements.length) { 6070 return; 6071 } 6072 var i, j, borders, paddings, prel, 6073 element = this.helper || this.element; 6074 for ( i=0; i < this._proportionallyResizeElements.length; i++) { 6075 prel = this._proportionallyResizeElements[i]; 6076 if (!this.borderDif) { 6077 this.borderDif = []; 6078 borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")]; 6079 paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")]; 6080 for ( j = 0; j < borders.length; j++ ) { 6081 this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 ); 6082 } 6083 } 6084 prel.css({ 6085 height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, 6086 width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 6087 }); 6088 } 6089 }, 6090 _renderProxy: function() { 6091 var el = this.element, o = this.options; 6092 this.elementOffset = el.offset(); 6093 if(this._helper) { 6094 this.helper = this.helper || $("<div style='overflow:hidden;'></div>"); 6095 this.helper.addClass(this._helper).css({ 6096 width: this.element.outerWidth() - 1, 6097 height: this.element.outerHeight() - 1, 6098 position: "absolute", 6099 left: this.elementOffset.left +"px", 6100 top: this.elementOffset.top +"px", 6101 zIndex: ++o.zIndex 6102 }); 6103 this.helper 6104 .appendTo("body") 6105 .disableSelection(); 6106 } else { 6107 this.helper = this.element; 6108 } 6109 }, 6110 _change: { 6111 e: function(event, dx) { 6112 return { width: this.originalSize.width + dx }; 6113 }, 6114 w: function(event, dx) { 6115 var cs = this.originalSize, sp = this.originalPosition; 6116 return { left: sp.left + dx, width: cs.width - dx }; 6117 }, 6118 n: function(event, dx, dy) { 6119 var cs = this.originalSize, sp = this.originalPosition; 6120 return { top: sp.top + dy, height: cs.height - dy }; 6121 }, 6122 s: function(event, dx, dy) { 6123 return { height: this.originalSize.height + dy }; 6124 }, 6125 se: function(event, dx, dy) { 6126 return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); 6127 }, 6128 sw: function(event, dx, dy) { 6129 return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); 6130 }, 6131 ne: function(event, dx, dy) { 6132 return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); 6133 }, 6134 nw: function(event, dx, dy) { 6135 return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); 6136 } 6137 }, 6138 _propagate: function(n, event) { 6139 $.ui.plugin.call(this, n, [event, this.ui()]); 6140 (n !== "resize" && this._trigger(n, event, this.ui())); 6141 }, 6142 plugins: {}, 6143 ui: function() { 6144 return { 6145 originalElement: this.originalElement, 6146 element: this.element, 6147 helper: this.helper, 6148 position: this.position, 6149 size: this.size, 6150 originalSize: this.originalSize, 6151 originalPosition: this.originalPosition 6152 }; 6153 } 6154}); 6155$.ui.plugin.add("resizable", "animate", { 6156 stop: function( event ) { 6157 var that = $(this).data("ui-resizable"), 6158 o = that.options, 6159 pr = that._proportionallyResizeElements, 6160 ista = pr.length && (/textarea/i).test(pr[0].nodeName), 6161 soffseth = ista && $.ui.hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height, 6162 soffsetw = ista ? 0 : that.sizeDiff.width, 6163 style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, 6164 left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null, 6165 top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null; 6166 that.element.animate( 6167 $.extend(style, top && left ? { top: top, left: left } : {}), { 6168 duration: o.animateDuration, 6169 easing: o.animateEasing, 6170 step: function() { 6171 var data = { 6172 width: parseInt(that.element.css("width"), 10), 6173 height: parseInt(that.element.css("height"), 10), 6174 top: parseInt(that.element.css("top"), 10), 6175 left: parseInt(that.element.css("left"), 10) 6176 }; 6177 if (pr && pr.length) { 6178 $(pr[0]).css({ width: data.width, height: data.height }); 6179 } 6180 that._updateCache(data); 6181 that._propagate("resize", event); 6182 } 6183 } 6184 ); 6185 } 6186}); 6187$.ui.plugin.add("resizable", "containment", { 6188 start: function() { 6189 var element, p, co, ch, cw, width, height, 6190 that = $(this).data("ui-resizable"), 6191 o = that.options, 6192 el = that.element, 6193 oc = o.containment, 6194 ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; 6195 if (!ce) { 6196 return; 6197 } 6198 that.containerElement = $(ce); 6199 if (/document/.test(oc) || oc === document) { 6200 that.containerOffset = { left: 0, top: 0 }; 6201 that.containerPosition = { left: 0, top: 0 }; 6202 that.parentData = {
6203 element: $(document), left: 0, top: 0, 6204 width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight 6205 }; 6206 } 6207 else { 6208 element = $(ce); 6209 p = []; 6210 $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); 6211 that.containerOffset = element.offset(); 6212 that.containerPosition = element.position(); 6213 that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; 6214 co = that.containerOffset; 6215 ch = that.containerSize.height; 6216 cw = that.containerSize.width; 6217 width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ); 6218 height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); 6219 that.parentData = { 6220 element: ce, left: co.left, top: co.top, width: width, height: height 6221 }; 6222 } 6223 }, 6224 resize: function( event ) { 6225 var woset, hoset, isParent, isOffsetRelative, 6226 that = $(this).data("ui-resizable"), 6227 o = that.options, 6228 co = that.containerOffset, cp = that.position, 6229 pRatio = that._aspectRatio || event.shiftKey, 6230 cop = { top:0, left:0 }, ce = that.containerElement; 6231 6232 if (ce[0] !== document && (/static/).test(ce.css("position"))) { 6233 cop = co; 6234 } 6235 if (cp.left < (that._helper ? co.left : 0)) { 6236 that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left)); 6237 if (pRatio) { 6238 that.size.height = that.size.width / that.aspectRatio; 6239 } 6240 that.position.left = o.helper ? co.left : 0; 6241 } 6242 if (cp.top < (that._helper ? co.top : 0)) { 6243 that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top); 6244 if (pRatio) { 6245 that.size.width = that.size.height * that.aspectRatio; 6246 } 6247 that.position.top = that._helper ? co.top : 0; 6248 } 6249 that.offset.left = that.parentData.left+that.position.left; 6250 that.offset.top = that.parentData.top+that.position.top; 6251 woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ); 6252 hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height ); 6253 isParent = that.containerElement.get(0) === that.element.parent().get(0); 6254 isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position")); 6255 if ( isParent && isOffsetRelative ) { 6256 woset -= Math.abs( that.parentData.left ); 6257 } 6258 if (woset + that.size.width >= that.parentData.width) { 6259 that.size.width = that.parentData.width - woset; 6260 if (pRatio) { 6261 that.size.height = that.size.width / that.aspectRatio; 6262 } 6263 } 6264 if (hoset + that.size.height >= that.parentData.height) { 6265 that.size.height = that.parentData.height - hoset; 6266 if (pRatio) { 6267 that.size.width = that.size.height * that.aspectRatio; 6268 } 6269 } 6270 }, 6271 stop: function(){ 6272 var that = $(this).data("ui-resizable"), 6273 o = that.options, 6274 co = that.containerOffset, 6275 cop = that.containerPosition, 6276 ce = that.containerElement, 6277 helper = $(that.helper), 6278 ho = helper.offset(), 6279 w = helper.outerWidth() - that.sizeDiff.width, 6280 h = helper.outerHeight() - that.sizeDiff.height; 6281 if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) { 6282 $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); 6283 } 6284 if (that._helper && !o.animate && (/static/).test(ce.css("position"))) { 6285 $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); 6286 } 6287 } 6288}); 6289$.ui.plugin.add("resizable", "alsoResize", { 6290 start: function () { 6291 var that = $(this).data("ui-resizable"), 6292 o = that.options, 6293 _store = function (exp) { 6294 $(exp).each(function() { 6295 var el = $(this); 6296 el.data("ui-resizable-alsoresize", { 6297 width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), 6298 left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) 6299 }); 6300 }); 6301 }; 6302 if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) { 6303 if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } 6304 else { $.each(o.alsoResize, function (exp) { _store(exp); }); } 6305 }else{ 6306 _store(o.alsoResize); 6307 } 6308 }, 6309 resize: function (event, ui) { 6310 var that = $(this).data("ui-resizable"), 6311 o = that.options, 6312 os = that.originalSize, 6313 op = that.originalPosition, 6314 delta = { 6315 height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0, 6316 top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0 6317 }, 6318 _alsoResize = function (exp, c) { 6319 $(exp).each(function() { 6320 var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, 6321 css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
vendor: 10,866 bytes, lines 6322-6685
6322 $.each(css, function (i, prop) { 6323 var sum = (start[prop]||0) + (delta[prop]||0); 6324 if (sum && sum >= 0) { 6325 style[prop] = sum || null; 6326 } 6327 }); 6328 el.css(style); 6329 }); 6330 }; 6331 if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) { 6332 $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); }); 6333 }else{ 6334 _alsoResize(o.alsoResize); 6335 } 6336 }, 6337 stop: function () { 6338 $(this).removeData("resizable-alsoresize"); 6339 } 6340}); 6341$.ui.plugin.add("resizable", "ghost", { 6342 start: function() { 6343 var that = $(this).data("ui-resizable"), o = that.options, cs = that.size; 6344 that.ghost = that.originalElement.clone(); 6345 that.ghost 6346 .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) 6347 .addClass("ui-resizable-ghost") 6348 .addClass(typeof o.ghost === "string" ? o.ghost : ""); 6349 that.ghost.appendTo(that.helper); 6350 }, 6351 resize: function(){ 6352 var that = $(this).data("ui-resizable"); 6353 if (that.ghost) { 6354 that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width }); 6355 } 6356 }, 6357 stop: function() { 6358 var that = $(this).data("ui-resizable"); 6359 if (that.ghost && that.helper) { 6360 that.helper.get(0).removeChild(that.ghost.get(0)); 6361 } 6362 } 6363}); 6364$.ui.plugin.add("resizable", "grid", { 6365 resize: function() { 6366 var that = $(this).data("ui-resizable"), 6367 o = that.options, 6368 cs = that.size, 6369 os = that.originalSize, 6370 op = that.originalPosition, 6371 a = that.axis, 6372 grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid, 6373 gridX = (grid[0]||1), 6374 gridY = (grid[1]||1), 6375 ox = Math.round((cs.width - os.width) / gridX) * gridX, 6376 oy = Math.round((cs.height - os.height) / gridY) * gridY, 6377 newWidth = os.width + ox, 6378 newHeight = os.height + oy, 6379 isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), 6380 isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), 6381 isMinWidth = o.minWidth && (o.minWidth > newWidth), 6382 isMinHeight = o.minHeight && (o.minHeight > newHeight); 6383 o.grid = grid; 6384 if (isMinWidth) { 6385 newWidth = newWidth + gridX; 6386 } 6387 if (isMinHeight) { 6388 newHeight = newHeight + gridY; 6389 } 6390 if (isMaxWidth) { 6391 newWidth = newWidth - gridX; 6392 } 6393 if (isMaxHeight) { 6394 newHeight = newHeight - gridY; 6395 } 6396 if (/^(se|s|e)$/.test(a)) { 6397 that.size.width = newWidth; 6398 that.size.height = newHeight; 6399 } else if (/^(ne)$/.test(a)) { 6400 that.size.width = newWidth; 6401 that.size.height = newHeight; 6402 that.position.top = op.top - oy; 6403 } else if (/^(sw)$/.test(a)) { 6404 that.size.width = newWidth; 6405 that.size.height = newHeight; 6406 that.position.left = op.left - ox; 6407 } else { 6408 if ( newHeight - gridY > 0 ) { 6409 that.size.height = newHeight; 6410 that.position.top = op.top - oy; 6411 } else { 6412 that.size.height = gridY; 6413 that.position.top = op.top + os.height - gridY; 6414 } 6415 if ( newWidth - gridX > 0 ) { 6416 that.size.width = newWidth; 6417 that.position.left = op.left - ox; 6418 } else { 6419 that.size.width = gridX; 6420 that.position.left = op.left + os.width - gridX; 6421 } 6422 } 6423 } 6424}); 6425})(jQuery); 6426(function( $, undefined ) { 6427var lastActive, 6428 baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", 6429 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", 6430 formResetHandler = function() { 6431 var form = $( this ); 6432 setTimeout(function() { 6433 form.find( ":ui-button" ).button( "refresh" ); 6434 }, 1 ); 6435 }, 6436 radioGroup = function( radio ) { 6437 var name = radio.name, 6438 form = radio.form, 6439 radios = $( [] ); 6440 if ( name ) { 6441 name = name.replace( /'/g, "\\'" ); 6442 if ( form ) { 6443 radios = $( form ).find( "[name='" + name + "']" ); 6444 } else { 6445 radios = $( "[name='" + name + "']", radio.ownerDocument ) 6446 .filter(function() { 6447 return !this.form; 6448 }); 6449 } 6450 } 6451 return radios; 6452 }; 6453$.widget( "ui.button", { 6454 version: "1.10.4", 6455 defaultElement: "<button>", 6456 options: { 6457 disabled: null, 6458 text: true, 6459 label: null, 6460 icons: { 6461 primary: null, 6462 secondary: null 6463 } 6464 }, 6465 _create: function() { 6466 this.element.closest( "form" ) 6467 .unbind( "reset" + this.eventNamespace ) 6468 .bind( "reset" + this.eventNamespace, formResetHandler ); 6469 if ( typeof this.options.disabled !== "boolean" ) { 6470 this.options.disabled = !!this.element.prop( "disabled" ); 6471 } else { 6472 this.element.prop( "disabled", this.options.disabled ); 6473 } 6474 this._determineButtonType(); 6475 this.hasTitle = !!this.buttonElement.attr( "title" ); 6476 var that = this, 6477 options = this.options, 6478 toggleButton = this.type === "checkbox" || this.type === "radio", 6479 activeClass = !toggleButton ? "ui-state-active" : ""; 6480 if ( options.label === null ) { 6481 options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); 6482 } 6483 this._hoverable( this.buttonElement ); 6484 this.buttonElement 6485 .addClass( baseClasses ) 6486 .attr( "role", "button" ) 6487 .bind( "mouseenter" + this.eventNamespace, function() { 6488 if ( options.disabled ) { 6489 return; 6490 } 6491 if ( this === lastActive ) { 6492 $( this ).addClass( "ui-state-active" ); 6493 } 6494 }) 6495 .bind( "mouseleave" + this.eventNamespace, function() { 6496 if ( options.disabled ) { 6497 return; 6498 } 6499 $( this ).removeClass( activeClass ); 6500 }) 6501 .bind( "click" + this.eventNamespace, function( event ) { 6502 if ( options.disabled ) { 6503 event.preventDefault(); 6504 event.stopImmediatePropagation(); 6505 } 6506 }); 6507 this._on({ 6508 focus: function() { 6509 this.buttonElement.addClass( "ui-state-focus" ); 6510 }, 6511 blur: function() { 6512 this.buttonElement.removeClass( "ui-state-focus" ); 6513 } 6514 }); 6515 if ( toggleButton ) { 6516 this.element.bind( "change" + this.eventNamespace, function() { 6517 that.refresh(); 6518 }); 6519 } 6520 if ( this.type === "checkbox" ) { 6521 this.buttonElement.bind( "click" + this.eventNamespace, function() { 6522 if ( options.disabled ) { 6523 return false; 6524 } 6525 }); 6526 } else if ( this.type === "radio" ) { 6527 this.buttonElement.bind( "click" + this.eventNamespace, function() { 6528 if ( options.disabled ) { 6529 return false; 6530 } 6531 $( this ).addClass( "ui-state-active" ); 6532 that.buttonElement.attr( "aria-pressed", "true" ); 6533 6534 var radio = that.element[ 0 ]; 6535 radioGroup( radio ) 6536 .not( radio ) 6537 .map(function() { 6538 return $( this ).button( "widget" )[ 0 ]; 6539 }) 6540 .removeClass( "ui-state-active" ) 6541 .attr( "aria-pressed", "false" ); 6542 }); 6543 } else { 6544 this.buttonElement 6545 .bind( "mousedown" + this.eventNamespace, function() { 6546 if ( options.disabled ) { 6547 return false; 6548 } 6549 $( this ).addClass( "ui-state-active" ); 6550 lastActive = this; 6551 that.document.one( "mouseup", function() { 6552 lastActive = null; 6553 }); 6554 }) 6555 .bind( "mouseup" + this.eventNamespace, function() { 6556 if ( options.disabled ) { 6557 return false; 6558 } 6559 $( this ).removeClass( "ui-state-active" ); 6560 }) 6561 .bind( "keydown" + this.eventNamespace, function(event) { 6562 if ( options.disabled ) { 6563 return false; 6564 } 6565 if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) { 6566 $( this ).addClass( "ui-state-active" ); 6567 } 6568 }) 6569 .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { 6570 $( this ).removeClass( "ui-state-active" ); 6571 }); 6572 if ( this.buttonElement.is("a") ) { 6573 this.buttonElement.keyup(function(event) { 6574 if ( event.keyCode === $.ui.keyCode.SPACE ) { 6575 $( this ).click(); 6576 } 6577 }); 6578 } 6579 } 6580 this._setOption( "disabled", options.disabled ); 6581 this._resetButton(); 6582 }, 6583 _determineButtonType: function() { 6584 var ancestor, labelSelector, checked; 6585 if ( this.element.is("[type=checkbox]") ) { 6586 this.type = "checkbox"; 6587 } else if ( this.element.is("[type=radio]") ) { 6588 this.type = "radio"; 6589 } else if ( this.element.is("input") ) { 6590 this.type = "input"; 6591 } else { 6592 this.type = "button"; 6593 } 6594 if ( this.type === "checkbox" || this.type === "radio" ) { 6595 ancestor = this.element.parents().last(); 6596 labelSelector = "label[for='" + this.element.attr("id") + "']"; 6597 this.buttonElement = ancestor.find( labelSelector ); 6598 if ( !this.buttonElement.length ) { 6599 ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); 6600 this.buttonElement = ancestor.filter( labelSelector ); 6601 if ( !this.buttonElement.length ) { 6602 this.buttonElement = ancestor.find( labelSelector ); 6603 } 6604 } 6605 this.element.addClass( "ui-helper-hidden-accessible" ); 6606 checked = this.element.is( ":checked" ); 6607 if ( checked ) { 6608 this.buttonElement.addClass( "ui-state-active" ); 6609 } 6610 this.buttonElement.prop( "aria-pressed", checked ); 6611 } else { 6612 this.buttonElement = this.element; 6613 } 6614 }, 6615 widget: function() { 6616 return this.buttonElement; 6617 }, 6618 _destroy: function() { 6619 this.element 6620 .removeClass( "ui-helper-hidden-accessible" ); 6621 this.buttonElement 6622 .removeClass( baseClasses + " ui-state-active " + typeClasses ) 6623 .removeAttr( "role" ) 6624 .removeAttr( "aria-pressed" ) 6625 .html( this.buttonElement.find(".ui-button-text").html() ); 6626 6627 if ( !this.hasTitle ) { 6628 this.buttonElement.removeAttr( "title" ); 6629 } 6630 }, 6631 _setOption: function( key, value ) { 6632 this._super( key, value ); 6633 if ( key === "disabled" ) { 6634 this.element.prop( "disabled", !!value ); 6635 if ( value ) { 6636 this.buttonElement.removeClass( "ui-state-focus" ); 6637 } 6638 return; 6639 } 6640 this._resetButton(); 6641 }, 6642 refresh: function() { 6643 var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" ); 6644 if ( isDisabled !== this.options.disabled ) { 6645 this._setOption( "disabled", isDisabled ); 6646 } 6647 if ( this.type === "radio" ) { 6648 radioGroup( this.element[0] ).each(function() { 6649 if ( $( this ).is( ":checked" ) ) { 6650 $( this ).button( "widget" ) 6651 .addClass( "ui-state-active" ) 6652 .attr( "aria-pressed", "true" ); 6653 } else { 6654 $( this ).button( "widget" ) 6655 .removeClass( "ui-state-active" ) 6656 .attr( "aria-pressed", "false" ); 6657 } 6658 }); 6659 } else if ( this.type === "checkbox" ) { 6660 if ( this.element.is( ":checked" ) ) { 6661 this.buttonElement 6662 .addClass( "ui-state-active" ) 6663 .attr( "aria-pressed", "true" ); 6664 } else { 6665 this.buttonElement 6666 .removeClass( "ui-state-active" ) 6667 .attr( "aria-pressed", "false" ); 6668 } 6669 } 6670 }, 6671 _resetButton: function() { 6672 if ( this.type === "input" ) { 6673 if ( this.options.label ) { 6674 this.element.val( this.options.label ); 6675 } 6676 return; 6677 } 6678 var buttonElement = this.buttonElement.removeClass( typeClasses ), 6679 buttonText = $( "<span></span>", this.document[0] ) 6680 .addClass( "ui-button-text" ) 6681 .html( this.options.label ) 6682 .appendTo( buttonElement.empty() ) 6683 .text(), 6684 icons = this.options.icons, 6685 multipleIcons = icons.primary && icons.secondary,
vendor: 4,703 bytes, lines 6686-6840
6686 buttonClasses = []; 6687 if ( icons.primary || icons.secondary ) { 6688 if ( this.options.text ) { 6689 buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); 6690 } 6691 if ( icons.primary ) { 6692 buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); 6693 } 6694 if ( icons.secondary ) { 6695 buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" ); 6696 } 6697 if ( !this.options.text ) { 6698 buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); 6699 if ( !this.hasTitle ) { 6700 buttonElement.attr( "title", $.trim( buttonText ) ); 6701 } 6702 } 6703 } else { 6704 buttonClasses.push( "ui-button-text-only" ); 6705 } 6706 buttonElement.addClass( buttonClasses.join( " " ) ); 6707 } 6708}); 6709$.widget( "ui.buttonset", { 6710 version: "1.10.4", 6711 options: { 6712 items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)" 6713 }, 6714 _create: function() { 6715 this.element.addClass( "ui-buttonset" ); 6716 }, 6717 _init: function() { 6718 this.refresh(); 6719 }, 6720 _setOption: function( key, value ) { 6721 if ( key === "disabled" ) { 6722 this.buttons.button( "option", key, value ); 6723 } 6724 this._super( key, value ); 6725 }, 6726 refresh: function() { 6727 var rtl = this.element.css( "direction" ) === "rtl"; 6728 this.buttons = this.element.find( this.options.items ) 6729 .filter( ":ui-button" ) 6730 .button( "refresh" ) 6731 .end() 6732 .not( ":ui-button" ) 6733 .button() 6734 .end() 6735 .map(function() { 6736 return $( this ).button( "widget" )[ 0 ]; 6737 }) 6738 .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) 6739 .filter( ":first" ) 6740 .addClass( rtl ? "ui-corner-right" : "ui-corner-left" ) 6741 .end() 6742 .filter( ":last" ) 6743 .addClass( rtl ? "ui-corner-left" : "ui-corner-right" ) 6744 .end() 6745 .end(); 6746 }, 6747 _destroy: function() { 6748 this.element.removeClass( "ui-buttonset" ); 6749 this.buttons 6750 .map(function() { 6751 return $( this ).button( "widget" )[ 0 ]; 6752 }) 6753 .removeClass( "ui-corner-left ui-corner-right" ) 6754 .end() 6755 .button( "destroy" ); 6756 } 6757}); 6758}( jQuery ) ); 6759(function( $, undefined ) { 6760$.extend($.ui, { datepicker: { version: "1.10.4" } }); 6761var PROP_NAME = "datepicker", 6762 instActive; 6763function Datepicker() { 6764 this._curInst = null; 6765 this._keyEvent = false; 6766 this._disabledInputs = []; 6767 this._datepickerShowing = false; 6768 this._inDialog = false; 6769 this._mainDivId = "ui-datepicker-div"; 6770 this._inlineClass = "ui-datepicker-inline"; 6771 this._appendClass = "ui-datepicker-append"; 6772 this._triggerClass = "ui-datepicker-trigger"; 6773 this._dialogClass = "ui-datepicker-dialog"; 6774 this._disableClass = "ui-datepicker-disabled"; 6775 this._unselectableClass = "ui-datepicker-unselectable"; 6776 this._currentClass = "ui-datepicker-current-day"; 6777 this._dayOverClass = "ui-datepicker-days-cell-over"; 6778 this.regional = []; 6779 this.regional[""] = { 6780 closeText: "Done", 6781 prevText: "Prev", 6782 nextText: "Next", 6783 currentText: "Today", 6784 monthNames: ["January","February","March","April","May","June", 6785 "July","August","September","October","November","December"], 6786 monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 6787 dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 6788 dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 6789 dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], 6790 weekHeader: "Wk", 6791 dateFormat: "mm/dd/yy", 6792 firstDay: 0, 6793 isRTL: false, 6794 showMonthAfterYear: false, 6795 yearSuffix: "" 6796 }; 6797 this._defaults = { 6798 showOn: "focus", 6799 showAnim: "show", 6800 showOptions: {}, 6801 defaultDate: null, 6802 appendText: "", 6803 buttonText: "...", 6804 buttonImage: "", 6805 buttonImageOnly: false, 6806 hideIfNoPrevNext: false, 6807 navigationAsDateFormat: false, 6808 gotoCurrent: false, 6809 changeMonth: false, 6810 changeYear: false, 6811 yearRange: "c-10:c+10", 6812 showOtherMonths: false, 6813 selectOtherMonths: false, 6814 showWeek: false, 6815 calculateWeek: this.iso8601Week, 6816 shortYearCutoff: "+10", 6817 minDate: null, 6818 maxDate: null, 6819 duration: "fast", 6820 beforeShowDay: null, 6821 beforeShow: null, 6822 onSelect: null, 6823 onChangeMonthYear: null, 6824 onClose: null, 6825 numberOfMonths: 1, 6826 showCurrentAtPos: 0, 6827 stepMonths: 1, 6828 stepBigMonths: 12, 6829 altField: "", 6830 altFormat: "", 6831 constrainInput: true, 6832 showButtonPanel: false, 6833 autoSize: false, 6834 disabled: false 6835 }; 6836 $.extend(this._defaults, this.regional[""]); 6837 this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")); 6838} 6839$.extend(Datepicker.prototype, { 6840 markerClassName: "hasDatepicker",
vendor: 6,228 bytes, lines 6841-7018
6841 maxRows: 4, 6842 _widgetDatepicker: function() { 6843 return this.dpDiv; 6844 }, 6845 setDefaults: function(settings) { 6846 extendRemove(this._defaults, settings || {}); 6847 return this; 6848 }, 6849 _attachDatepicker: function(target, settings) { 6850 var nodeName, inline, inst; 6851 nodeName = target.nodeName.toLowerCase(); 6852 inline = (nodeName === "div" || nodeName === "span"); 6853 if (!target.id) { 6854 this.uuid += 1; 6855 target.id = "dp" + this.uuid; 6856 } 6857 inst = this._newInst($(target), inline); 6858 inst.settings = $.extend({}, settings || {}); 6859 if (nodeName === "input") { 6860 this._connectDatepicker(target, inst); 6861 } else if (inline) { 6862 this._inlineDatepicker(target, inst); 6863 } 6864 }, 6865 _newInst: function(target, inline) { 6866 var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); 6867 return {id: id, input: target, 6868 selectedDay: 0, selectedMonth: 0, selectedYear: 0, 6869 drawMonth: 0, drawYear: 0, 6870 inline: inline, 6871 dpDiv: (!inline ? this.dpDiv : 6872 bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))}; 6873 }, 6874 _connectDatepicker: function(target, inst) { 6875 var input = $(target); 6876 inst.append = $([]); 6877 inst.trigger = $([]); 6878 if (input.hasClass(this.markerClassName)) { 6879 return; 6880 } 6881 this._attachments(input, inst); 6882 input.addClass(this.markerClassName).keydown(this._doKeyDown). 6883 keypress(this._doKeyPress).keyup(this._doKeyUp); 6884 this._autoSize(inst); 6885 $.data(target, PROP_NAME, inst); 6886 if( inst.settings.disabled ) { 6887 this._disableDatepicker( target ); 6888 } 6889 }, 6890 _attachments: function(input, inst) { 6891 var showOn, buttonText, buttonImage, 6892 appendText = this._get(inst, "appendText"), 6893 isRTL = this._get(inst, "isRTL"); 6894 if (inst.append) { 6895 inst.append.remove(); 6896 } 6897 if (appendText) { 6898 inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>"); 6899 input[isRTL ? "before" : "after"](inst.append); 6900 } 6901 input.unbind("focus", this._showDatepicker); 6902 if (inst.trigger) { 6903 inst.trigger.remove(); 6904 } 6905 showOn = this._get(inst, "showOn"); 6906 if (showOn === "focus" || showOn === "both") { 6907 input.focus(this._showDatepicker); 6908 } 6909 if (showOn === "button" || showOn === "both") { 6910 buttonText = this._get(inst, "buttonText"); 6911 buttonImage = this._get(inst, "buttonImage"); 6912 inst.trigger = $(this._get(inst, "buttonImageOnly") ? 6913 $("<img/>").addClass(this._triggerClass). 6914 attr({ src: buttonImage, alt: buttonText, title: buttonText }) : 6915 $("<button type='button'></button>").addClass(this._triggerClass). 6916 html(!buttonImage ? buttonText : $("<img/>").attr( 6917 { src:buttonImage, alt:buttonText, title:buttonText }))); 6918 input[isRTL ? "before" : "after"](inst.trigger); 6919 inst.trigger.click(function() { 6920 if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { 6921 $.datepicker._hideDatepicker(); 6922 } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { 6923 $.datepicker._hideDatepicker(); 6924 $.datepicker._showDatepicker(input[0]); 6925 } else { 6926 $.datepicker._showDatepicker(input[0]); 6927 } 6928 return false; 6929 }); 6930 } 6931 }, 6932 _autoSize: function(inst) { 6933 if (this._get(inst, "autoSize") && !inst.inline) { 6934 var findMax, max, maxI, i, 6935 date = new Date(2009, 12 - 1, 20), 6936 dateFormat = this._get(inst, "dateFormat"); 6937 if (dateFormat.match(/[DM]/)) { 6938 findMax = function(names) { 6939 max = 0; 6940 maxI = 0; 6941 for (i = 0; i < names.length; i++) { 6942 if (names[i].length > max) { 6943 max = names[i].length; 6944 maxI = i; 6945 } 6946 } 6947 return maxI; 6948 }; 6949 date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? 6950 "monthNames" : "monthNamesShort")))); 6951 date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? 6952 "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); 6953 } 6954 inst.input.attr("size", this._formatDate(inst, date).length); 6955 } 6956 }, 6957 _inlineDatepicker: function(target, inst) { 6958 var divSpan = $(target); 6959 if (divSpan.hasClass(this.markerClassName)) { 6960 return; 6961 } 6962 divSpan.addClass(this.markerClassName).append(inst.dpDiv); 6963 $.data(target, PROP_NAME, inst); 6964 this._setDate(inst, this._getDefaultDate(inst), true); 6965 this._updateDatepicker(inst); 6966 this._updateAlternate(inst); 6967 if( inst.settings.disabled ) { 6968 this._disableDatepicker( target ); 6969 } 6970 inst.dpDiv.css( "display", "block" ); 6971 }, 6972 _dialogDatepicker: function(input, date, onSelect, settings, pos) { 6973 var id, browserWidth, browserHeight, scrollX, scrollY, 6974 inst = this._dialogInst; 6975 if (!inst) { 6976 this.uuid += 1; 6977 id = "dp" + this.uuid; 6978 this._dialogInput = $("<input type='text' id='" + id + 6979 "' style='position: absolute; top: -100px; width: 0px;'/>"); 6980 this._dialogInput.keydown(this._doKeyDown); 6981 $("body").append(this._dialogInput); 6982 inst = this._dialogInst = this._newInst(this._dialogInput, false); 6983 inst.settings = {}; 6984 $.data(this._dialogInput[0], PROP_NAME, inst); 6985 } 6986 extendRemove(inst.settings, settings || {}); 6987 date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); 6988 this._dialogInput.val(date); 6989 this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); 6990 if (!this._pos) { 6991 browserWidth = document.documentElement.clientWidth; 6992 browserHeight = document.documentElement.clientHeight; 6993 scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 6994 scrollY = document.documentElement.scrollTop || document.body.scrollTop; 6995 this._pos = 6996 [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; 6997 } 6998 this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); 6999 inst.settings.onSelect = onSelect; 7000 this._inDialog = true; 7001 this.dpDiv.addClass(this._dialogClass); 7002 this._showDatepicker(this._dialogInput[0]); 7003 if ($.blockUI) { 7004 $.blockUI(this.dpDiv); 7005 } 7006 $.data(this._dialogInput[0], PROP_NAME, inst); 7007 return this; 7008 }, 7009 _destroyDatepicker: function(target) { 7010 var nodeName, 7011 $target = $(target), 7012 inst = $.data(target, PROP_NAME); 7013 if (!$target.hasClass(this.markerClassName)) { 7014 return; 7015 } 7016 nodeName = target.nodeName.toLowerCase(); 7017 $.removeData(target, PROP_NAME); 7018 if (nodeName === "input") {
vendor: 9,764 bytes, lines 7019-7306
7019 inst.append.remove(); 7020 inst.trigger.remove(); 7021 $target.removeClass(this.markerClassName). 7022 unbind("focus", this._showDatepicker). 7023 unbind("keydown", this._doKeyDown). 7024 unbind("keypress", this._doKeyPress). 7025 unbind("keyup", this._doKeyUp); 7026 } else if (nodeName === "div" || nodeName === "span") { 7027 $target.removeClass(this.markerClassName).empty(); 7028 } 7029 }, 7030 _enableDatepicker: function(target) { 7031 var nodeName, inline, 7032 $target = $(target), 7033 inst = $.data(target, PROP_NAME); 7034 if (!$target.hasClass(this.markerClassName)) { 7035 return; 7036 } 7037 nodeName = target.nodeName.toLowerCase(); 7038 if (nodeName === "input") { 7039 target.disabled = false; 7040 inst.trigger.filter("button"). 7041 each(function() { this.disabled = false; }).end(). 7042 filter("img").css({opacity: "1.0", cursor: ""}); 7043 } else if (nodeName === "div" || nodeName === "span") { 7044 inline = $target.children("." + this._inlineClass); 7045 inline.children().removeClass("ui-state-disabled"); 7046 inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). 7047 prop("disabled", false); 7048 } 7049 this._disabledInputs = $.map(this._disabledInputs, 7050 function(value) { return (value === target ? null : value); }); // delete entry 7051 }, 7052 _disableDatepicker: function(target) { 7053 var nodeName, inline, 7054 $target = $(target), 7055 inst = $.data(target, PROP_NAME); 7056 if (!$target.hasClass(this.markerClassName)) { 7057 return; 7058 } 7059 nodeName = target.nodeName.toLowerCase(); 7060 if (nodeName === "input") { 7061 target.disabled = true; 7062 inst.trigger.filter("button"). 7063 each(function() { this.disabled = true; }).end(). 7064 filter("img").css({opacity: "0.5", cursor: "default"}); 7065 } else if (nodeName === "div" || nodeName === "span") { 7066 inline = $target.children("." + this._inlineClass); 7067 inline.children().addClass("ui-state-disabled"); 7068 inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). 7069 prop("disabled", true); 7070 } 7071 this._disabledInputs = $.map(this._disabledInputs, 7072 function(value) { return (value === target ? null : value); }); 7073 this._disabledInputs[this._disabledInputs.length] = target; 7074 }, 7075 _isDisabledDatepicker: function(target) { 7076 if (!target) { 7077 return false; 7078 } 7079 for (var i = 0; i < this._disabledInputs.length; i++) { 7080 if (this._disabledInputs[i] === target) { 7081 return true; 7082 } 7083 } 7084 return false; 7085 }, 7086 _getInst: function(target) { 7087 try { 7088 return $.data(target, PROP_NAME); 7089 } 7090 catch (err) { 7091 throw "Missing instance data for this datepicker"; 7092 } 7093 }, 7094 _optionDatepicker: function(target, name, value) { 7095 var settings, date, minDate, maxDate, 7096 inst = this._getInst(target); 7097 if (arguments.length === 2 && typeof name === "string") { 7098 return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : 7099 (inst ? (name === "all" ? $.extend({}, inst.settings) : 7100 this._get(inst, name)) : null)); 7101 } 7102 settings = name || {}; 7103 if (typeof name === "string") { 7104 settings = {}; 7105 settings[name] = value; 7106 } 7107 if (inst) { 7108 if (this._curInst === inst) { 7109 this._hideDatepicker(); 7110 } 7111 date = this._getDateDatepicker(target, true); 7112 minDate = this._getMinMaxDate(inst, "min"); 7113 maxDate = this._getMinMaxDate(inst, "max"); 7114 extendRemove(inst.settings, settings); 7115 if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { 7116 inst.settings.minDate = this._formatDate(inst, minDate); 7117 } 7118 if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { 7119 inst.settings.maxDate = this._formatDate(inst, maxDate); 7120 } 7121 if ( "disabled" in settings ) { 7122 if ( settings.disabled ) { 7123 this._disableDatepicker(target); 7124 } else { 7125 this._enableDatepicker(target); 7126 } 7127 } 7128 this._attachments($(target), inst); 7129 this._autoSize(inst); 7130 this._setDate(inst, date); 7131 this._updateAlternate(inst); 7132 this._updateDatepicker(inst); 7133 } 7134 }, 7135 _changeDatepicker: function(target, name, value) { 7136 this._optionDatepicker(target, name, value); 7137 }, 7138 _refreshDatepicker: function(target) { 7139 var inst = this._getInst(target); 7140 if (inst) { 7141 this._updateDatepicker(inst); 7142 } 7143 }, 7144 _setDateDatepicker: function(target, date) { 7145 var inst = this._getInst(target); 7146 if (inst) { 7147 this._setDate(inst, date); 7148 this._updateDatepicker(inst); 7149 this._updateAlternate(inst); 7150 } 7151 }, 7152 _getDateDatepicker: function(target, noDefault) { 7153 var inst = this._getInst(target); 7154 if (inst && !inst.inline) { 7155 this._setDateFromField(inst, noDefault); 7156 } 7157 return (inst ? this._getDate(inst) : null); 7158 }, 7159 _doKeyDown: function(event) { 7160 var onSelect, dateStr, sel, 7161 inst = $.datepicker._getInst(event.target), 7162 handled = true, 7163 isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); 7164 inst._keyEvent = true; 7165 if ($.datepicker._datepickerShowing) { 7166 switch (event.keyCode) { 7167 case 9: $.datepicker._hideDatepicker(); 7168 handled = false; 7169 break; // hide on tab out 7170 case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + 7171 $.datepicker._currentClass + ")", inst.dpDiv); 7172 if (sel[0]) { 7173 $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); 7174 } 7175 onSelect = $.datepicker._get(inst, "onSelect"); 7176 if (onSelect) { 7177 dateStr = $.datepicker._formatDate(inst); 7178 onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); 7179 } else { 7180 $.datepicker._hideDatepicker(); 7181 } 7182 return false; 7183 case 27: $.datepicker._hideDatepicker(); 7184 break; 7185 case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7186 -$.datepicker._get(inst, "stepBigMonths") : 7187 -$.datepicker._get(inst, "stepMonths")), "M"); 7188 break; 7189 case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7190 +$.datepicker._get(inst, "stepBigMonths") : 7191 +$.datepicker._get(inst, "stepMonths")), "M"); 7192 break; 7193 case 35: if (event.ctrlKey || event.metaKey) { 7194 $.datepicker._clearDate(event.target); 7195 } 7196 handled = event.ctrlKey || event.metaKey; 7197 break; 7198 case 36: if (event.ctrlKey || event.metaKey) { 7199 $.datepicker._gotoToday(event.target); 7200 } 7201 handled = event.ctrlKey || event.metaKey; 7202 break; 7203 case 37: if (event.ctrlKey || event.metaKey) { 7204 $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); 7205 } 7206 handled = event.ctrlKey || event.metaKey; 7207 if (event.originalEvent.altKey) { 7208 $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7209 -$.datepicker._get(inst, "stepBigMonths") : 7210 -$.datepicker._get(inst, "stepMonths")), "M"); 7211 } 7212 break; 7213 case 38: if (event.ctrlKey || event.metaKey) { 7214 $.datepicker._adjustDate(event.target, -7, "D"); 7215 } 7216 handled = event.ctrlKey || event.metaKey; 7217 break; // -1 week on ctrl or command +up 7218 case 39: if (event.ctrlKey || event.metaKey) { 7219 $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); 7220 } 7221 handled = event.ctrlKey || event.metaKey; 7222 if (event.originalEvent.altKey) { 7223 $.datepicker._adjustDate(event.target, (event.ctrlKey ? 7224 +$.datepicker._get(inst, "stepBigMonths") : 7225 +$.datepicker._get(inst, "stepMonths")), "M"); 7226 } 7227 break; 7228 case 40: if (event.ctrlKey || event.metaKey) { 7229 $.datepicker._adjustDate(event.target, +7, "D"); 7230 } 7231 handled = event.ctrlKey || event.metaKey; 7232 break; 7233 default: handled = false; 7234 } 7235 } else if (event.keyCode === 36 && event.ctrlKey) { 7236 $.datepicker._showDatepicker(this); 7237 } else { 7238 handled = false; 7239 } 7240 if (handled) { 7241 event.preventDefault(); 7242 event.stopPropagation(); 7243 } 7244 }, 7245 _doKeyPress: function(event) { 7246 var chars, chr, 7247 inst = $.datepicker._getInst(event.target); 7248 if ($.datepicker._get(inst, "constrainInput")) { 7249 chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); 7250 chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); 7251 return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); 7252 } 7253 }, 7254 _doKeyUp: function(event) { 7255 var date, 7256 inst = $.datepicker._getInst(event.target); 7257 if (inst.input.val() !== inst.lastVal) { 7258 try { 7259 date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), 7260 (inst.input ? inst.input.val() : null), 7261 $.datepicker._getFormatConfig(inst)); 7262 if (date) { 7263 $.datepicker._setDateFromField(inst); 7264 $.datepicker._updateAlternate(inst); 7265 $.datepicker._updateDatepicker(inst); 7266 } 7267 } 7268 catch (err) { 7269 } 7270 } 7271 return true; 7272 }, 7273 _showDatepicker: function(input) { 7274 input = input.target || input; 7275 if (input.nodeName.toLowerCase() !== "input") { 7276 input = $("input", input.parentNode)[0]; 7277 } 7278 if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { 7279 return; 7280 } 7281 var inst, beforeShow, beforeShowSettings, isFixed, 7282 offset, showAnim, duration; 7283 inst = $.datepicker._getInst(input); 7284 if ($.datepicker._curInst && $.datepicker._curInst !== inst) { 7285 $.datepicker._curInst.dpDiv.stop(true, true); 7286 if ( inst && $.datepicker._datepickerShowing ) { 7287 $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); 7288 } 7289 } 7290 beforeShow = $.datepicker._get(inst, "beforeShow"); 7291 beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; 7292 if(beforeShowSettings === false){ 7293 return; 7294 } 7295 extendRemove(inst.settings, beforeShowSettings); 7296 inst.lastVal = null; 7297 $.datepicker._lastInput = input; 7298 $.datepicker._setDateFromField(inst); 7299 if ($.datepicker._inDialog) { // hide cursor 7300 input.value = ""; 7301 } 7302 if (!$.datepicker._pos) { 7303 $.datepicker._pos = $.datepicker._findPos(input); 7304 $.datepicker._pos[1] += input.offsetHeight; 7305 } 7306 isFixed = false;
vendor: 4,824 bytes, lines 7307-7421
7307 $(input).parents().each(function() { 7308 isFixed |= $(this).css("position") === "fixed"; 7309 return !isFixed; 7310 }); 7311 offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; 7312 $.datepicker._pos = null; 7313 inst.dpDiv.empty(); 7314 inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); 7315 $.datepicker._updateDatepicker(inst); 7316 offset = $.datepicker._checkOffset(inst, offset, isFixed); 7317 inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? 7318 "static" : (isFixed ? "fixed" : "absolute")), display: "none", 7319 left: offset.left + "px", top: offset.top + "px"}); 7320 if (!inst.inline) { 7321 showAnim = $.datepicker._get(inst, "showAnim"); 7322 duration = $.datepicker._get(inst, "duration"); 7323 inst.dpDiv.zIndex($(input).zIndex()+1); 7324 $.datepicker._datepickerShowing = true; 7325 if ( $.effects && $.effects.effect[ showAnim ] ) { 7326 inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); 7327 } else { 7328 inst.dpDiv[showAnim || "show"](null); 7329 frozen_timeout = setTimeout(function(){ 7330 datepicker_frozen = inst.dpDiv.css('display') == 'none' ? true : false; 7331 }, 2000); 7332 } 7333 if ( $.datepicker._shouldFocusInput( inst ) ) { 7334 inst.input.focus(); 7335 } 7336 $.datepicker._curInst = inst; 7337 } 7338 }, 7339 _updateDatepicker: function(inst) { 7340 this.maxRows = 4; 7341 instActive = inst; 7342 inst.dpDiv.empty().append(this._generateHTML(inst)); 7343 this._attachHandlers(inst); 7344 inst.dpDiv.find("." + this._dayOverClass + " a").mouseover(); 7345 var origyearshtml, 7346 numMonths = this._getNumberOfMonths(inst), 7347 cols = numMonths[1], 7348 width = 17; 7349 inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); 7350 if (cols > 1) { 7351 inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); 7352 } 7353 inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + 7354 "Class"]("ui-datepicker-multi"); 7355 inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + 7356 "Class"]("ui-datepicker-rtl"); 7357 if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 7358 inst.input.focus(); 7359 } 7360 if( inst.yearshtml ){ 7361 origyearshtml = inst.yearshtml; 7362 setTimeout(function(){ 7363 if( origyearshtml === inst.yearshtml && inst.yearshtml ){ 7364 inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); 7365 } 7366 origyearshtml = inst.yearshtml = null; 7367 }, 0); 7368 } 7369 }, 7370 _shouldFocusInput: function( inst ) { 7371 return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 7372 }, 7373 _checkOffset: function(inst, offset, isFixed) { 7374 var dpWidth = inst.dpDiv.outerWidth(), 7375 dpHeight = inst.dpDiv.outerHeight(), 7376 inputWidth = inst.input ? inst.input.outerWidth() : 0, 7377 inputHeight = inst.input ? inst.input.outerHeight() : 0, 7378 viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), 7379 viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); 7380 offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); 7381 offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; 7382 offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; 7383 offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? 7384 Math.abs(offset.left + dpWidth - viewWidth) : 0); 7385 offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? 7386 Math.abs(dpHeight + inputHeight) : 0); 7387 return offset; 7388 }, 7389 _findPos: function(obj) { 7390 var position, 7391 inst = this._getInst(obj), 7392 isRTL = this._get(inst, "isRTL"); 7393 while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { 7394 obj = obj[isRTL ? "previousSibling" : "nextSibling"]; 7395 } 7396 position = $(obj).offset(); 7397 return [position.left, position.top]; 7398 }, 7399 _hideDatepicker: function(input) { 7400 var showAnim, duration, postProcess, onClose, 7401 inst = this._curInst; 7402 if (!inst || (input && inst !== $.data(input, PROP_NAME))) { 7403 return; 7404 } 7405 if (this._datepickerShowing) { 7406 showAnim = this._get(inst, "showAnim"); 7407 duration = this._get(inst, "duration"); 7408 postProcess = function() { 7409 $.datepicker._tidyDialog(inst); 7410 }; 7411 if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { 7412 inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); 7413 } else { 7414 inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : 7415 (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((null), postProcess); 7416 } 7417 clearTimeout(frozen_timeout); 7418 if (!showAnim) { 7419 postProcess(); 7420 } 7421 this._datepickerShowing = false;
vendor: 4,939 bytes, lines 7422-7569
7422 onClose = this._get(inst, "onClose"); 7423 if (onClose) { 7424 onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); 7425 } 7426 this._lastInput = null; 7427 if (this._inDialog) { 7428 this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); 7429 if ($.blockUI) { 7430 $.unblockUI(); 7431 $("body").append(this.dpDiv); 7432 } 7433 } 7434 this._inDialog = false; 7435 } 7436 }, 7437 _tidyDialog: function(inst) { 7438 inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); 7439 }, 7440 _checkExternalClick: function(event) { 7441 if (!$.datepicker._curInst) { 7442 return; 7443 } 7444 var $target = $(event.target), 7445 inst = $.datepicker._getInst($target[0]); 7446 if ( ( ( $target[0].id !== $.datepicker._mainDivId && 7447 $target.parents("#" + $.datepicker._mainDivId).length === 0 && 7448 !$target.hasClass($.datepicker.markerClassName) && 7449 !$target.closest("." + $.datepicker._triggerClass).length && 7450 $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || 7451 ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { 7452 $.datepicker._hideDatepicker(); 7453 } 7454 }, 7455 _adjustDate: function(id, offset, period) { 7456 var target = $(id), 7457 inst = this._getInst(target[0]); 7458 if (this._isDisabledDatepicker(target[0])) { 7459 return; 7460 } 7461 this._adjustInstDate(inst, offset + 7462 (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning 7463 period); 7464 this._updateDatepicker(inst); 7465 }, 7466 _gotoToday: function(id) { 7467 var date, 7468 target = $(id), 7469 inst = this._getInst(target[0]); 7470 if (this._get(inst, "gotoCurrent") && inst.currentDay) { 7471 inst.selectedDay = inst.currentDay; 7472 inst.drawMonth = inst.selectedMonth = inst.currentMonth; 7473 inst.drawYear = inst.selectedYear = inst.currentYear; 7474 } else { 7475 date = new Date(); 7476 inst.selectedDay = date.getDate(); 7477 inst.drawMonth = inst.selectedMonth = date.getMonth(); 7478 inst.drawYear = inst.selectedYear = date.getFullYear(); 7479 } 7480 this._notifyChange(inst); 7481 this._adjustDate(target); 7482 }, 7483 _selectMonthYear: function(id, select, period) { 7484 var target = $(id), 7485 inst = this._getInst(target[0]); 7486 inst["selected" + (period === "M" ? "Month" : "Year")] = 7487 inst["draw" + (period === "M" ? "Month" : "Year")] = 7488 parseInt(select.options[select.selectedIndex].value,10); 7489 this._notifyChange(inst); 7490 this._adjustDate(target); 7491 }, 7492 _selectDay: function(id, month, year, td) { 7493 var inst, 7494 target = $(id); 7495 if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { 7496 return; 7497 } 7498 inst = this._getInst(target[0]); 7499 inst.selectedDay = inst.currentDay = $("a", td).html(); 7500 inst.selectedMonth = inst.currentMonth = month; 7501 inst.selectedYear = inst.currentYear = year; 7502 this._selectDate(id, this._formatDate(inst, 7503 inst.currentDay, inst.currentMonth, inst.currentYear)); 7504 }, 7505 _clearDate: function(id) { 7506 var target = $(id); 7507 this._selectDate(target, ""); 7508 }, 7509 _selectDate: function(id, dateStr) { 7510 var onSelect, 7511 target = $(id), 7512 inst = this._getInst(target[0]); 7513 dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); 7514 if (inst.input) { 7515 inst.input.val(dateStr); 7516 } 7517 this._updateAlternate(inst); 7518 onSelect = this._get(inst, "onSelect"); 7519 if (onSelect) { 7520 onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); 7521 } else if (inst.input) { 7522 inst.input.trigger("change"); 7523 } 7524 if (inst.inline){ 7525 this._updateDatepicker(inst); 7526 } else { 7527 this._hideDatepicker(); 7528 this._lastInput = inst.input[0]; 7529 if (typeof(inst.input[0]) !== "object") { 7530 inst.input.focus(); 7531 } 7532 this._lastInput = null; 7533 } 7534 }, 7535 _updateAlternate: function(inst) { 7536 var altFormat, date, dateStr, 7537 altField = this._get(inst, "altField"); 7538 if (altField) { 7539 altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); 7540 date = this._getDate(inst); 7541 dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); 7542 $(altField).each(function() { $(this).val(dateStr); }); 7543 } 7544 }, 7545 noWeekends: function(date) { 7546 var day = date.getDay(); 7547 return [(day > 0 && day < 6), ""]; 7548 }, 7549 iso8601Week: function(date) { 7550 var time, 7551 checkDate = new Date(date.getTime()); 7552 checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); 7553 time = checkDate.getTime(); 7554 checkDate.setMonth(0); // Compare with Jan 1 7555 checkDate.setDate(1); 7556 return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; 7557 }, 7558 parseDate: function (format, value, settings) { 7559 if (format == null || value == null) { 7560 throw "Invalid arguments"; 7561 } 7562 value = (typeof value === "object" ? value.toString() : value + ""); 7563 if (value === "") { 7564 return null; 7565 } 7566 var iFormat, dim, extra, 7567 iValue = 0, 7568 shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, 7569 shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp
vendor: 5,115 bytes, lines 7569-7746
7569: 7570 new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), 7571 dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, 7572 dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, 7573 monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, 7574 monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, 7575 year = -1, 7576 month = -1, 7577 day = -1, 7578 doy = -1, 7579 literal = false, 7580 date, 7581 lookAhead = function(match) { 7582 var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 7583 if (matches) { 7584 iFormat++; 7585 } 7586 return matches; 7587 }, 7588 getNumber = function(match) { 7589 var isDoubled = lookAhead(match), 7590 size = (match === "@" ? 14 : (match === "!" ? 20 : 7591 (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), 7592 digits = new RegExp("^\\d{1," + size + "}"), 7593 num = value.substring(iValue).match(digits); 7594 if (!num) { 7595 throw "Missing number at position " + iValue; 7596 } 7597 iValue += num[0].length; 7598 return parseInt(num[0], 10); 7599 }, 7600 getName = function(match, shortNames, longNames) { 7601 var index = -1, 7602 names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { 7603 return [ [k, v] ]; 7604 }).sort(function (a, b) { 7605 return -(a[1].length - b[1].length); 7606 }); 7607 $.each(names, function (i, pair) { 7608 var name = pair[1]; 7609 if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { 7610 index = pair[0]; 7611 iValue += name.length; 7612 return false; 7613 } 7614 }); 7615 if (index !== -1) { 7616 return index + 1; 7617 } else { 7618 throw "Unknown name at position " + iValue; 7619 } 7620 }, 7621 checkLiteral = function() { 7622 if (value.charAt(iValue) !== format.charAt(iFormat)) { 7623 throw "Unexpected literal at position " + iValue; 7624 } 7625 iValue++; 7626 }; 7627 for (iFormat = 0; iFormat < format.length; iFormat++) { 7628 if (literal) { 7629 if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 7630 literal = false; 7631 } else { 7632 checkLiteral(); 7633 } 7634 } else { 7635 switch (format.charAt(iFormat)) { 7636 case "d": 7637 day = getNumber("d"); 7638 break; 7639 case "D": 7640 getName("D", dayNamesShort, dayNames); 7641 break; 7642 case "o": 7643 doy = getNumber("o"); 7644 break; 7645 case "m": 7646 month = getNumber("m"); 7647 break; 7648 case "M": 7649 month = getName("M", monthNamesShort, monthNames); 7650 break; 7651 case "y": 7652 year = getNumber("y"); 7653 break; 7654 case "@": 7655 date = new Date(getNumber("@")); 7656 year = date.getFullYear(); 7657 month = date.getMonth() + 1; 7658 day = date.getDate(); 7659 break; 7660 case "!": 7661 date = new Date((getNumber("!") - this._ticksTo1970) / 10000); 7662 year = date.getFullYear(); 7663 month = date.getMonth() + 1; 7664 day = date.getDate(); 7665 break; 7666 case "'": 7667 if (lookAhead("'")){ 7668 checkLiteral(); 7669 } else { 7670 literal = true; 7671 } 7672 break; 7673 default: 7674 checkLiteral(); 7675 } 7676 } 7677 } 7678 if (iValue < value.length){ 7679 extra = value.substr(iValue); 7680 if (!/^\s+/.test(extra)) { 7681 throw "Extra/unparsed characters found in date: " + extra; 7682 } 7683 } 7684 if (year === -1) { 7685 year = new Date().getFullYear(); 7686 } else if (year < 100) { 7687 year += new Date().getFullYear() - new Date().getFullYear() % 100 + 7688 (year <= shortYearCutoff ? 0 : -100); 7689 } 7690 if (doy > -1) { 7691 month = 1; 7692 day = doy; 7693 do { 7694 dim = this._getDaysInMonth(year, month - 1); 7695 if (day <= dim) { 7696 break; 7697 } 7698 month++; 7699 day -= dim; 7700 } while (true); 7701 } 7702 date = this._daylightSavingAdjust(new Date(year, month - 1, day)); 7703 if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { 7704 throw "Invalid date"; // E.g. 31/02/00 7705 } 7706 return date; 7707 }, 7708 ATOM: "yy-mm-dd", 7709 COOKIE: "D, dd M yy", 7710 ISO_8601: "yy-mm-dd", 7711 RFC_822: "D, d M y", 7712 RFC_850: "DD, dd-M-y", 7713 RFC_1036: "D, d M y", 7714 RFC_1123: "D, d M yy", 7715 RFC_2822: "D, d M yy", 7716 RSS: "D, d M y", 7717 TICKS: "!", 7718 TIMESTAMP: "@", 7719 W3C: "yy-mm-dd", 7720 _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + 7721 Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), 7722 formatDate: function (format, date, settings) { 7723 if (!date) { 7724 return ""; 7725 } 7726 var iFormat, 7727 dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, 7728 dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, 7729 monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, 7730 monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, 7731 lookAhead = function(match) { 7732 var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 7733 if (matches) { 7734 iFormat++; 7735 } 7736 return matches; 7737 }, 7738 formatNumber = function(match, value, len) { 7739 var num = "" + value; 7740 if (lookAhead(match)) { 7741 while (num.length < len) { 7742 num = "0" + num; 7743 } 7744 } 7745 return num; 7746 },
vendor: 8,713 bytes, lines 7747-8004
7747 formatName = function(match, value, shortNames, longNames) { 7748 return (lookAhead(match) ? longNames[value] : shortNames[value]); 7749 }, 7750 output = "", 7751 literal = false; 7752 if (date) { 7753 for (iFormat = 0; iFormat < format.length; iFormat++) { 7754 if (literal) { 7755 if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 7756 literal = false; 7757 } else { 7758 output += format.charAt(iFormat); 7759 } 7760 } else { 7761 switch (format.charAt(iFormat)) { 7762 case "d": 7763 output += formatNumber("d", date.getDate(), 2); 7764 break; 7765 case "D": 7766 output += formatName("D", date.getDay(), dayNamesShort, dayNames); 7767 break; 7768 case "o": 7769 output += formatNumber("o", 7770 Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); 7771 break; 7772 case "m": 7773 output += formatNumber("m", date.getMonth() + 1, 2); 7774 break; 7775 case "M": 7776 output += formatName("M", date.getMonth(), monthNamesShort, monthNames); 7777 break; 7778 case "y": 7779 output += (lookAhead("y") ? date.getFullYear() : 7780 (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); 7781 break; 7782 case "@": 7783 output += date.getTime(); 7784 break; 7785 case "!": 7786 output += date.getTime() * 10000 + this._ticksTo1970; 7787 break; 7788 case "'": 7789 if (lookAhead("'")) { 7790 output += "'"; 7791 } else { 7792 literal = true; 7793 } 7794 break; 7795 default: 7796 output += format.charAt(iFormat); 7797 } 7798 } 7799 } 7800 } 7801 return output; 7802 }, 7803 _possibleChars: function (format) { 7804 var iFormat, 7805 chars = "", 7806 literal = false, 7807 lookAhead = function(match) { 7808 var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 7809 if (matches) { 7810 iFormat++; 7811 } 7812 return matches; 7813 }; 7814 for (iFormat = 0; iFormat < format.length; iFormat++) { 7815 if (literal) { 7816 if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 7817 literal = false; 7818 } else { 7819 chars += format.charAt(iFormat); 7820 } 7821 } else { 7822 switch (format.charAt(iFormat)) { 7823 case "d": case "m": case "y": case "@": 7824 chars += "0123456789"; 7825 break; 7826 case "D": case "M": 7827 return null; // Accept anything 7828 case "'": 7829 if (lookAhead("'")) { 7830 chars += "'"; 7831 } else { 7832 literal = true; 7833 } 7834 break; 7835 default: 7836 chars += format.charAt(iFormat); 7837 } 7838 } 7839 } 7840 return chars; 7841 }, 7842 _get: function(inst, name) { 7843 return inst.settings[name] !== undefined ? 7844 inst.settings[name] : this._defaults[name]; 7845 }, 7846 _setDateFromField: function(inst, noDefault) { 7847 if (inst.input.val() === inst.lastVal) { 7848 return; 7849 } 7850 var dateFormat = this._get(inst, "dateFormat"), 7851 dates = inst.lastVal = inst.input ? inst.input.val() : null, 7852 defaultDate = this._getDefaultDate(inst), 7853 date = defaultDate, 7854 settings = this._getFormatConfig(inst); 7855 try { 7856 date = this.parseDate(dateFormat, dates, settings) || defaultDate; 7857 } catch (event) { 7858 dates = (noDefault ? "" : dates); 7859 } 7860 inst.selectedDay = date.getDate(); 7861 inst.drawMonth = inst.selectedMonth = date.getMonth(); 7862 inst.drawYear = inst.selectedYear = date.getFullYear(); 7863 inst.currentDay = (dates ? date.getDate() : 0); 7864 inst.currentMonth = (dates ? date.getMonth() : 0); 7865 inst.currentYear = (dates ? date.getFullYear() : 0); 7866 this._adjustInstDate(inst); 7867 }, 7868 _getDefaultDate: function(inst) { 7869 return this._restrictMinMax(inst, 7870 this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); 7871 }, 7872 _determineDate: function(inst, date, defaultDate) { 7873 var offsetNumeric = function(offset) { 7874 var date = new Date(); 7875 date.setDate(date.getDate() + offset); 7876 return date; 7877 }, 7878 offsetString = function(offset) { 7879 try { 7880 return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), 7881 offset, $.datepicker._getFormatConfig(inst)); 7882 } 7883 catch (e) { 7884 } 7885 var date = (offset.toLowerCase().match(/^c/) ? 7886 $.datepicker._getDate(inst) : null) || new Date(), 7887 year = date.getFullYear(), 7888 month = date.getMonth(), 7889 day = date.getDate(), 7890 pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, 7891 matches = pattern.exec(offset); 7892 while (matches) { 7893 switch (matches[2] || "d") { 7894 case "d" : case "D" : 7895 day += parseInt(matches[1],10); break; 7896 case "w" : case "W" : 7897 day += parseInt(matches[1],10) * 7; break; 7898 case "m" : case "M" : 7899 month += parseInt(matches[1],10); 7900 day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); 7901 break; 7902 case "y": case "Y" : 7903 year += parseInt(matches[1],10); 7904 day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); 7905 break; 7906 } 7907 matches = pattern.exec(offset); 7908 } 7909 return new Date(year, month, day); 7910 }, 7911 newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : 7912 (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); 7913 newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); 7914 if (newDate) { 7915 newDate.setHours(0); 7916 newDate.setMinutes(0); 7917 newDate.setSeconds(0); 7918 newDate.setMilliseconds(0); 7919 } 7920 return this._daylightSavingAdjust(newDate); 7921 }, 7922 _daylightSavingAdjust: function(date) { 7923 if (!date) { 7924 return null; 7925 } 7926 date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); 7927 return date; 7928 }, 7929 _setDate: function(inst, date, noChange) { 7930 var clear = !date, 7931 origMonth = inst.selectedMonth, 7932 origYear = inst.selectedYear, 7933 newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); 7934 inst.selectedDay = inst.currentDay = newDate.getDate(); 7935 inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); 7936 inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); 7937 if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { 7938 this._notifyChange(inst); 7939 } 7940 this._adjustInstDate(inst); 7941 if (inst.input) { 7942 inst.input.val(clear ? "" : this._formatDate(inst)); 7943 } 7944 }, 7945 _getDate: function(inst) { 7946 var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : 7947 this._daylightSavingAdjust(new Date( 7948 inst.currentYear, inst.currentMonth, inst.currentDay))); 7949 return startDate; 7950 }, 7951 _attachHandlers: function(inst) { 7952 var stepMonths = this._get(inst, "stepMonths"), 7953 id = "#" + inst.id.replace( /\\\\/g, "\\" ); 7954 inst.dpDiv.find("[data-handler]").map(function () { 7955 var handler = { 7956 prev: function () { 7957 $.datepicker._adjustDate(id, -stepMonths, "M"); 7958 }, 7959 next: function () { 7960 $.datepicker._adjustDate(id, +stepMonths, "M"); 7961 }, 7962 hide: function () { 7963 $.datepicker._hideDatepicker(); 7964 }, 7965 today: function () { 7966 $.datepicker._gotoToday(id); 7967 }, 7968 selectDay: function () { 7969 $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); 7970 return false; 7971 }, 7972 selectMonth: function () { 7973 $.datepicker._selectMonthYear(id, this, "M"); 7974 return false; 7975 }, 7976 selectYear: function () { 7977 $.datepicker._selectMonthYear(id, this, "Y"); 7978 return false; 7979 } 7980 }; 7981 $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); 7982 }); 7983 }, 7984 _generateHTML: function(inst) { 7985 var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, 7986 controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, 7987 monthNames, monthNamesShort, beforeShowDay, showOtherMonths, 7988 selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, 7989 cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, 7990 printDate, dRow, tbody, daySettings, otherMonth, unselectable, 7991 tempDate = new Date(), 7992 today = this._daylightSavingAdjust( 7993 new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time 7994 isRTL = this._get(inst, "isRTL"), 7995 showButtonPanel = this._get(inst, "showButtonPanel"), 7996 hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), 7997 navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), 7998 numMonths = this._getNumberOfMonths(inst), 7999 showCurrentAtPos = this._get(inst, "showCurrentAtPos"), 8000 stepMonths = this._get(inst, "stepMonths"), 8001 isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), 8002 currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : 8003 new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), 8004 minDate = this._getMinMaxDate(inst, "min"),
vendor: 33,347 bytes, lines 8005-8952
8005 maxDate = this._getMinMaxDate(inst, "max"), 8006 drawMonth = inst.drawMonth - showCurrentAtPos, 8007 drawYear = inst.drawYear; 8008 8009 if (drawMonth < 0) { 8010 drawMonth += 12; 8011 drawYear--; 8012 } 8013 if (maxDate) { 8014 maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), 8015 maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); 8016 maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); 8017 while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { 8018 drawMonth--; 8019 if (drawMonth < 0) { 8020 drawMonth = 11; 8021 drawYear--; 8022 } 8023 } 8024 } 8025 inst.drawMonth = drawMonth; 8026 inst.drawYear = drawYear; 8027 prevText = this._get(inst, "prevText"); 8028 prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, 8029 this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), 8030 this._getFormatConfig(inst))); 8031 prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? 8032 "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + 8033 " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" : 8034 (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>")); 8035 nextText = this._get(inst, "nextText"); 8036 nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, 8037 this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), 8038 this._getFormatConfig(inst))); 8039 next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? 8040 "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + 8041 " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" : 8042 (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>")); 8043 currentText = this._get(inst, "currentText"); 8044 gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); 8045 currentText = (!navigationAsDateFormat ? currentText : 8046 this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); 8047 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'>" + 8048 this._get(inst, "closeText") + "</button>" : ""); 8049 buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") + 8050 (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'" + 8051 ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : ""; 8052 firstDay = parseInt(this._get(inst, "firstDay"),10); 8053 firstDay = (isNaN(firstDay) ? 0 : firstDay); 8054 showWeek = this._get(inst, "showWeek"); 8055 dayNames = this._get(inst, "dayNames"); 8056 dayNamesMin = this._get(inst, "dayNamesMin"); 8057 monthNames = this._get(inst, "monthNames"); 8058 monthNamesShort = this._get(inst, "monthNamesShort"); 8059 beforeShowDay = this._get(inst, "beforeShowDay"); 8060 showOtherMonths = this._get(inst, "showOtherMonths"); 8061 selectOtherMonths = this._get(inst, "selectOtherMonths"); 8062 defaultDate = this._getDefaultDate(inst); 8063 html = ""; 8064 dow; 8065 for (row = 0; row < numMonths[0]; row++) { 8066 group = ""; 8067 this.maxRows = 4; 8068 for (col = 0; col < numMonths[1]; col++) { 8069 selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); 8070 cornerClass = " ui-corner-all"; 8071 calender = ""; 8072 if (isMultiMonth) { 8073 calender += "<div class='ui-datepicker-group"; 8074 if (numMonths[1] > 1) { 8075 switch (col) { 8076 case 0: calender += " ui-datepicker-group-first"; 8077 cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break; 8078 case numMonths[1]-1: calender += " ui-datepicker-group-last"; 8079 cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break; 8080 default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; 8081 } 8082 } 8083 calender += "'>"; 8084 } 8085 calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + 8086 (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + 8087 (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + 8088 this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, 8089 row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers 8090 "</div><table class='ui-datepicker-calendar'><caption style='display:none;'>Calendar</caption><thead>" + 8091 "<tr>"; 8092 thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : ""); 8093 for (dow = 0; dow < 7; dow++) { // days of the week 8094 day = (dow + firstDay) % 7; 8095 thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + 8096 "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>"; 8097 } 8098 calender += thead + "</tr></thead><tbody>"; 8099 daysInMonth = this._getDaysInMonth(drawYear, drawMonth); 8100 if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { 8101 inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); 8102 } 8103 leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; 8104 curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate 8105 numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) 8106 this.maxRows = numRows; 8107 printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); 8108 for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows 8109 calender += "<tr>"; 8110 tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" + 8111 this._get(inst, "calculateWeek")(printDate) + "</td>"); 8112 for (dow = 0; dow < 7; dow++) { // create date picker days 8113 daySettings = (beforeShowDay ? 8114 beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); 8115 otherMonth = (printDate.getMonth() !== drawMonth); 8116 unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || 8117 (minDate && printDate < minDate) || (maxDate && printDate > maxDate); 8118 tbody += "<td class='" + 8119 ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends 8120 (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months 8121 ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key 8122 (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ? 8123 // or defaultDate is current printedDate and defaultDate is selectedDate 8124 " " + this._dayOverClass : "") + // highlight selected day 8125 (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days 8126 (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates 8127 (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day 8128 (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different) 8129 ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title 8130 (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions 8131 (otherMonth && !showOtherMonths ? " " : // display for other months 8132 (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + 8133 (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") + 8134 (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day 8135 (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months 8136 "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date 8137 printDate.setDate(printDate.getDate() + 1); 8138 printDate = this._daylightSavingAdjust(printDate); 8139 } 8140 calender += tbody + "</tr>"; 8141 } 8142 drawMonth++; 8143 if (drawMonth > 11) { 8144 drawMonth = 0; 8145 drawYear++; 8146 } 8147 calender += "</tbody></table>" + (isMultiMonth ? "</div>" + 8148 ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : ""); 8149 group += calender; 8150 } 8151 html += group; 8152 } 8153 html += buttonPanel; 8154 inst._keyEvent = false; 8155 return html; 8156 }, 8157 _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, 8158 secondary, monthNames, monthNamesShort) { 8159 var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, 8160 changeMonth = this._get(inst, "changeMonth"), 8161 changeYear = this._get(inst, "changeYear"), 8162 showMonthAfterYear = this._get(inst, "showMonthAfterYear"), 8163 html = "<div class='ui-datepicker-title'>", 8164 monthHtml = ""; 8165 if (secondary || !changeMonth) { 8166 monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>"; 8167 } else { 8168 inMinYear = (minDate && minDate.getFullYear() === drawYear); 8169 inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); 8170 monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; 8171 for ( month = 0; month < 12; month++) { 8172 if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) { 8173 monthHtml += "<option value='" + month + "'" + 8174 (month === drawMonth ? " selected='selected'" : "") + 8175 ">" + monthNamesShort[month] + "</option>"; 8176 } 8177 } 8178 monthHtml += "</select>"; 8179 } 8180 if (!showMonthAfterYear) { 8181 html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); 8182 } 8183 if ( !inst.yearshtml ) { 8184 inst.yearshtml = ""; 8185 if (secondary || !changeYear) { 8186 html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; 8187 } else { 8188 years = this._get(inst, "yearRange").split(":"); 8189 thisYear = new Date().getFullYear(); 8190 determineYear = function(value) { 8191 var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : 8192 (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : 8193 parseInt(value, 10))); 8194 return (isNaN(year) ? thisYear : year); 8195 }; 8196 year = determineYear(years[0]); 8197 endYear = Math.max(year, determineYear(years[1] || "")); 8198 year = (minDate ? Math.max(year, minDate.getFullYear()) : year); 8199 endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); 8200 inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; 8201 for (; year <= endYear; year++) { 8202 inst.yearshtml += "<option value='" + year + "'" + 8203 (year === drawYear ? " selected='selected'" : "") + 8204 ">" + year + "</option>"; 8205 } 8206 inst.yearshtml += "</select>"; 8207 8208 html += inst.yearshtml; 8209 inst.yearshtml = null; 8210 } 8211 } 8212 html += this._get(inst, "yearSuffix"); 8213 if (showMonthAfterYear) { 8214 html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; 8215 } 8216 html += "</div>"; // Close datepicker_header 8217 return html; 8218 }, 8219 _adjustInstDate: function(inst, offset, period) { 8220 var year = inst.drawYear + (period === "Y" ? offset : 0), 8221 month = inst.drawMonth + (period === "M" ? offset : 0), 8222 day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), 8223 date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); 8224 inst.selectedDay = date.getDate(); 8225 inst.drawMonth = inst.selectedMonth = date.getMonth(); 8226 inst.drawYear = inst.selectedYear = date.getFullYear(); 8227 if (period === "M" || period === "Y") { 8228 this._notifyChange(inst); 8229 } 8230 }, 8231 _restrictMinMax: function(inst, date) { 8232 var minDate = this._getMinMaxDate(inst, "min"), 8233 maxDate = this._getMinMaxDate(inst, "max"), 8234 newDate = (minDate && date < minDate ? minDate : date); 8235 return (maxDate && newDate > maxDate ? maxDate : newDate); 8236 }, 8237 _notifyChange: function(inst) { 8238 var onChange = this._get(inst, "onChangeMonthYear"); 8239 if (onChange) { 8240 onChange.apply((inst.input ? inst.input[0] : null), 8241 [inst.selectedYear, inst.selectedMonth + 1, inst]); 8242 } 8243 }, 8244 _getNumberOfMonths: function(inst) { 8245 var numMonths = this._get(inst, "numberOfMonths"); 8246 return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); 8247 }, 8248 _getMinMaxDate: function(inst, minMax) { 8249 return this._determineDate(inst, this._get(inst, minMax + "Date"), null); 8250 }, 8251 _getDaysInMonth: function(year, month) { 8252 return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); 8253 }, 8254 _getFirstDayOfMonth: function(year, month) { 8255 return new Date(year, month, 1).getDay(); 8256 }, 8257 _canAdjustMonth: function(inst, offset, curYear, curMonth) { 8258 var numMonths = this._getNumberOfMonths(inst), 8259 date = this._daylightSavingAdjust(new Date(curYear, 8260 curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); 8261 8262 if (offset < 0) { 8263 date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); 8264 } 8265 return this._isInRange(inst, date); 8266 }, 8267 _isInRange: function(inst, date) { 8268 var yearSplit, currentYear, 8269 minDate = this._getMinMaxDate(inst, "min"), 8270 maxDate = this._getMinMaxDate(inst, "max"), 8271 minYear = null, 8272 maxYear = null, 8273 years = this._get(inst, "yearRange"); 8274 if (years){ 8275 yearSplit = years.split(":"); 8276 currentYear = new Date().getFullYear(); 8277 minYear = parseInt(yearSplit[0], 10); 8278 maxYear = parseInt(yearSplit[1], 10); 8279 if ( yearSplit[0].match(/[+\-].*/) ) { 8280 minYear += currentYear; 8281 } 8282 if ( yearSplit[1].match(/[+\-].*/) ) { 8283 maxYear += currentYear; 8284 } 8285 } 8286 return ((!minDate || date.getTime() >= minDate.getTime()) && 8287 (!maxDate || date.getTime() <= maxDate.getTime()) && 8288 (!minYear || date.getFullYear() >= minYear) && 8289 (!maxYear || date.getFullYear() <= maxYear)); 8290 }, 8291 _getFormatConfig: function(inst) { 8292 var shortYearCutoff = this._get(inst, "shortYearCutoff"); 8293 shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : 8294 new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); 8295 return {shortYearCutoff: shortYearCutoff, 8296 dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), 8297 monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; 8298 }, 8299 _formatDate: function(inst, day, month, year) { 8300 if (!day) { 8301 inst.currentDay = inst.selectedDay; 8302 inst.currentMonth = inst.selectedMonth; 8303 inst.currentYear = inst.selectedYear; 8304 } 8305 var date = (day ? (typeof day === "object" ? day : 8306 this._daylightSavingAdjust(new Date(year, month, day))) : 8307 this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); 8308 return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); 8309 } 8310}); 8311function bindHover(dpDiv) { 8312 var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 8313 return dpDiv.delegate(selector, "mouseout", function() { 8314 $(this).removeClass("ui-state-hover"); 8315 if (this.className.indexOf("ui-datepicker-prev") !== -1) { 8316 $(this).removeClass("ui-datepicker-prev-hover"); 8317 } 8318 if (this.className.indexOf("ui-datepicker-next") !== -1) { 8319 $(this).removeClass("ui-datepicker-next-hover"); 8320 } 8321 }) 8322 .delegate(selector, "mouseover", function(){ 8323 if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { 8324 $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); 8325 $(this).addClass("ui-state-hover"); 8326 if (this.className.indexOf("ui-datepicker-prev") !== -1) { 8327 $(this).addClass("ui-datepicker-prev-hover"); 8328 } 8329 if (this.className.indexOf("ui-datepicker-next") !== -1) { 8330 $(this).addClass("ui-datepicker-next-hover"); 8331 } 8332 } 8333 }); 8334} 8335function extendRemove(target, props) { 8336 $.extend(target, props); 8337 for (var name in props) { 8338 if (props[name] == null) { 8339 target[name] = props[name]; 8340 } 8341 } 8342 return target; 8343} 8344$.fn.datepicker = function(options){ 8345 if ( !this.length ) { 8346 return this; 8347 } 8348 if (!$.datepicker.initialized) { 8349 $(document).mousedown($.datepicker._checkExternalClick); 8350 $.datepicker.initialized = true; 8351 } 8352 if ($("#"+$.datepicker._mainDivId).length === 0) { 8353 $("body").append($.datepicker.dpDiv); 8354 } 8355 var otherArgs = Array.prototype.slice.call(arguments, 1); 8356 if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { 8357 return $.datepicker["_" + options + "Datepicker"]. 8358 apply($.datepicker, [this[0]].concat(otherArgs)); 8359 } 8360 if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { 8361 return $.datepicker["_" + options + "Datepicker"]. 8362 apply($.datepicker, [this[0]].concat(otherArgs)); 8363 } 8364 return this.each(function() { 8365 typeof options === "string" ? 8366 $.datepicker["_" + options + "Datepicker"]. 8367 apply($.datepicker, [this].concat(otherArgs)) : 8368 $.datepicker._attachDatepicker(this, options); 8369 }); 8370}; 8371$.datepicker = new Datepicker(); 8372$.datepicker.initialized = false; 8373$.datepicker.uuid = new Date().getTime(); 8374$.datepicker.version = "1.10.4"; 8375})(jQuery); 8376(function( $, undefined ) { 8377var sizeRelatedOptions = { 8378 buttons: true, 8379 height: true, 8380 maxHeight: true, 8381 maxWidth: true, 8382 minHeight: true, 8383 minWidth: true, 8384 width: true 8385 }, 8386 resizableRelatedOptions = { 8387 maxHeight: true, 8388 maxWidth: true, 8389 minHeight: true, 8390 minWidth: true 8391 }; 8392$.widget( "ui.dialog", { 8393 version: "1.10.4", 8394 options: { 8395 appendTo: "body", 8396 autoOpen: true, 8397 buttons: [], 8398 closeOnEscape: true, 8399 closeText: "close", 8400 dialogClass: "", 8401 draggable: true, 8402 hide: null, 8403 height: "auto", 8404 maxHeight: null, 8405 maxWidth: null, 8406 minHeight: 150, 8407 minWidth: 150, 8408 modal: false, 8409 position: { 8410 my: "center", 8411 at: "center", 8412 of: window, 8413 collision: "fit", 8414 using: function( pos ) { 8415 var topOffset = $( this ).css( pos ).offset().top; 8416 if ( topOffset < 0 ) { 8417 $( this ).css( "top", pos.top - topOffset ); 8418 } 8419 } 8420 }, 8421 resizable: true, 8422 show: null, 8423 title: null, 8424 width: 300, 8425 beforeClose: null, 8426 close: null, 8427 drag: null, 8428 dragStart: null, 8429 dragStop: null, 8430 focus: null, 8431 open: null, 8432 resize: null, 8433 resizeStart: null, 8434 resizeStop: null 8435 }, 8436 _create: function() { 8437 this.originalCss = { 8438 display: this.element[0].style.display, 8439 width: this.element[0].style.width, 8440 minHeight: this.element[0].style.minHeight, 8441 maxHeight: this.element[0].style.maxHeight, 8442 height: this.element[0].style.height 8443 }; 8444 this.originalPosition = { 8445 parent: this.element.parent(), 8446 index: this.element.parent().children().index( this.element ) 8447 }; 8448 this.originalTitle = this.element.attr("title"); 8449 this.options.title = this.options.title || this.originalTitle; 8450 this._createWrapper(); 8451 this.element 8452 .show() 8453 .removeAttr("title") 8454 .addClass("ui-dialog-content ui-widget-content") 8455 .appendTo( this.uiDialog ); 8456 this._createTitlebar(); 8457 this._createButtonPane(); 8458 if ( this.options.draggable && $.fn.draggable ) { 8459 this._makeDraggable(); 8460 } 8461 if ( this.options.resizable && $.fn.resizable ) { 8462 this._makeResizable(); 8463 } 8464 this._isOpen = false; 8465 }, 8466 _init: function() { 8467 if ( this.options.autoOpen ) { 8468 this.open(); 8469 } 8470 }, 8471 _appendTo: function() { 8472 var element = this.options.appendTo; 8473 if ( element && (element.jquery || element.nodeType) ) { 8474 return $( element ); 8475 } 8476 return this.document.find( element || "body" ).eq( 0 ); 8477 }, 8478 _destroy: function() { 8479 var next, 8480 originalPosition = this.originalPosition; 8481 this._destroyOverlay(); 8482 this.element 8483 .removeUniqueId() 8484 .removeClass("ui-dialog-content ui-widget-content") 8485 .css( this.originalCss ) 8486 .detach(); 8487 this.uiDialog.stop( true, true ).remove(); 8488 if ( this.originalTitle ) { 8489 this.element.attr( "title", this.originalTitle ); 8490 } 8491 next = originalPosition.parent.children().eq( originalPosition.index ); 8492 if ( next.length && next[0] !== this.element[0] ) { 8493 next.before( this.element ); 8494 } else { 8495 originalPosition.parent.append( this.element ); 8496 } 8497 }, 8498 widget: function() { 8499 return this.uiDialog; 8500 }, 8501 disable: $.noop, 8502 enable: $.noop, 8503 close: function( event ) { 8504 var activeElement, 8505 that = this; 8506 if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { 8507 return; 8508 } 8509 this._isOpen = false; 8510 this._destroyOverlay(); 8511 if ( !this.opener.filter(":focusable").focus().length ) { 8512 try { 8513 activeElement = this.document[ 0 ].activeElement; 8514 if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) { 8515 $( activeElement ).blur(); 8516 } 8517 } catch ( error ) {} 8518 } 8519 this._hide( this.uiDialog, this.options.hide, function() { 8520 that._trigger( "close", event ); 8521 }); 8522 }, 8523 isOpen: function() { 8524 return this._isOpen; 8525 }, 8526 moveToTop: function() { 8527 this._moveToTop(); 8528 }, 8529 _moveToTop: function( event, silent ) { 8530 var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length; 8531 if ( moved && !silent ) { 8532 this._trigger( "focus", event ); 8533 } 8534 return moved; 8535 }, 8536 open: function() { 8537 var that = this; 8538 if ( this._isOpen ) { 8539 if ( this._moveToTop() ) { 8540 this._focusTabbable(); 8541 } 8542 return; 8543 } 8544 this._isOpen = true; 8545 this.opener = $( this.document[0].activeElement ); 8546 this._size(); 8547 this._position(); 8548 this._createOverlay(); 8549 this._moveToTop( null, true ); 8550 this._show( this.uiDialog, this.options.show, function() { 8551 that._focusTabbable(); 8552 that._trigger("focus"); 8553 }); 8554 this._trigger("open"); 8555 }, 8556 _focusTabbable: function() { 8557 var hasFocus = this.element.find("[autofocus]"); 8558 if ( !hasFocus.length ) { 8559 hasFocus = this.element.find(":tabbable"); 8560 } 8561 if ( !hasFocus.length ) { 8562 hasFocus = this.uiDialogButtonPane.find(":tabbable"); 8563 } 8564 if ( !hasFocus.length ) { 8565 hasFocus = this.uiDialogTitlebarClose.filter(":tabbable"); 8566 } 8567 if ( !hasFocus.length ) { 8568 hasFocus = this.uiDialog; 8569 } 8570 hasFocus.eq( 0 ).focus(); 8571 }, 8572 _keepFocus: function( event ) { 8573 function checkFocus() { 8574 var activeElement = this.document[0].activeElement, 8575 isActive = this.uiDialog[0] === activeElement || 8576 $.contains( this.uiDialog[0], activeElement ); 8577 if ( !isActive ) { 8578 this._focusTabbable(); 8579 } 8580 } 8581 event.preventDefault(); 8582 checkFocus.call( this ); 8583 this._delay( checkFocus ); 8584 }, 8585 _createWrapper: function() { 8586 this.uiDialog = $("<div>") 8587 .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + 8588 this.options.dialogClass ) 8589 .hide() 8590 .attr({ 8591 tabIndex: -1, 8592 role: "dialog" 8593 }) 8594 .appendTo( this._appendTo() ); 8595 this._on( this.uiDialog, { 8596 keydown: function( event ) { 8597 if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 8598 event.keyCode === $.ui.keyCode.ESCAPE ) { 8599 event.preventDefault(); 8600 this.close( event ); 8601 return; 8602 } 8603 if ( event.keyCode !== $.ui.keyCode.TAB ) { 8604 return; 8605 } 8606 var tabbables = this.uiDialog.find(":tabbable"), 8607 first = tabbables.filter(":first"), 8608 last = tabbables.filter(":last"); 8609 if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) { 8610 first.focus( 1 ); 8611 event.preventDefault(); 8612 } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) { 8613 last.focus( 1 ); 8614 event.preventDefault(); 8615 } 8616 }, 8617 mousedown: function( event ) { 8618 if ( this._moveToTop( event ) ) { 8619 this._focusTabbable(); 8620 } 8621 } 8622 }); 8623 if ( !this.element.find("[aria-describedby]").length ) { 8624 this.uiDialog.attr({ 8625 "aria-describedby": this.element.uniqueId().attr("id") 8626 }); 8627 } 8628 }, 8629 _createTitlebar: function() { 8630 var uiDialogTitle; 8631 this.uiDialogTitlebar = $("<div>") 8632 .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix") 8633 .prependTo( this.uiDialog ); 8634 this._on( this.uiDialogTitlebar, { 8635 mousedown: function( event ) { 8636 if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) { 8637 this.uiDialog.focus(); 8638 } 8639 } 8640 }); 8641 this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) 8642 .button({ 8643 label: this.options.closeText, 8644 icons: { 8645 primary: "ui-icon-closethick" 8646 }, 8647 text: false 8648 }) 8649 .addClass("ui-dialog-titlebar-close") 8650 .appendTo( this.uiDialogTitlebar ); 8651 this._on( this.uiDialogTitlebarClose, { 8652 click: function( event ) { 8653 event.preventDefault(); 8654 this.close( event ); 8655 } 8656 }); 8657 uiDialogTitle = $("<span>") 8658 .uniqueId() 8659 .addClass("ui-dialog-title") 8660 .prependTo( this.uiDialogTitlebar ); 8661 this._title( uiDialogTitle ); 8662 this.uiDialog.attr({ 8663 "aria-labelledby": uiDialogTitle.attr("id") 8664 }); 8665 }, 8666 _title: function( title ) { 8667 if ( !this.options.title ) { 8668 title.html(" "); 8669 } 8670 title.text( this.options.title ); 8671 }, 8672 _createButtonPane: function() { 8673 this.uiDialogButtonPane = $("<div>") 8674 .addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"); 8675 this.uiButtonSet = $("<div>") 8676 .addClass("ui-dialog-buttonset") 8677 .appendTo( this.uiDialogButtonPane ); 8678 this._createButtons(); 8679 }, 8680 _createButtons: function() { 8681 var that = this, 8682 buttons = this.options.buttons; 8683 this.uiDialogButtonPane.remove(); 8684 this.uiButtonSet.empty(); 8685 if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) { 8686 this.uiDialog.removeClass("ui-dialog-buttons"); 8687 return; 8688 } 8689 $.each( buttons, function( name, props ) { 8690 var click, buttonOptions; 8691 props = $.isFunction( props ) ? 8692 { click: props, text: name } : 8693 props; 8694 props = $.extend( { type: "button" }, props ); 8695 click = props.click; 8696 props.click = function() { 8697 click.apply( that.element[0], arguments ); 8698 }; 8699 buttonOptions = { 8700 icons: props.icons, 8701 text: props.showText 8702 }; 8703 delete props.icons; 8704 delete props.showText; 8705 $( "<button></button>", props ) 8706 .button( buttonOptions ) 8707 .appendTo( that.uiButtonSet ); 8708 }); 8709 this.uiDialog.addClass("ui-dialog-buttons"); 8710 this.uiDialogButtonPane.appendTo( this.uiDialog ); 8711 }, 8712 _makeDraggable: function() { 8713 var that = this, 8714 options = this.options; 8715 function filteredUi( ui ) { 8716 return { 8717 position: ui.position, 8718 offset: ui.offset 8719 }; 8720 } 8721 this.uiDialog.draggable({ 8722 cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", 8723 handle: ".ui-dialog-titlebar", 8724 containment: "document", 8725 start: function( event, ui ) { 8726 $( this ).addClass("ui-dialog-dragging"); 8727 that._blockFrames(); 8728 that._trigger( "dragStart", event, filteredUi( ui ) ); 8729 }, 8730 drag: function( event, ui ) { 8731 that._trigger( "drag", event, filteredUi( ui ) ); 8732 }, 8733 stop: function( event, ui ) { 8734 options.position = [ 8735 ui.position.left - that.document.scrollLeft(), 8736 ui.position.top - that.document.scrollTop() 8737 ]; 8738 $( this ).removeClass("ui-dialog-dragging"); 8739 that._unblockFrames(); 8740 that._trigger( "dragStop", event, filteredUi( ui ) ); 8741 } 8742 }); 8743 }, 8744 _makeResizable: function() { 8745 var that = this, 8746 options = this.options, 8747 handles = options.resizable, 8748 position = this.uiDialog.css("position"), 8749 resizeHandles = typeof handles === "string" ? 8750 handles : 8751 "n,e,s,w,se,sw,ne,nw"; 8752 function filteredUi( ui ) { 8753 return { 8754 originalPosition: ui.originalPosition, 8755 originalSize: ui.originalSize, 8756 position: ui.position, 8757 size: ui.size 8758 }; 8759 } 8760 this.uiDialog.resizable({ 8761 cancel: ".ui-dialog-content", 8762 containment: "document", 8763 alsoResize: this.element, 8764 maxWidth: options.maxWidth, 8765 maxHeight: options.maxHeight, 8766 minWidth: options.minWidth, 8767 minHeight: this._minHeight(), 8768 handles: resizeHandles, 8769 start: function( event, ui ) { 8770 $( this ).addClass("ui-dialog-resizing"); 8771 that._blockFrames(); 8772 that._trigger( "resizeStart", event, filteredUi( ui ) ); 8773 }, 8774 resize: function( event, ui ) { 8775 that._trigger( "resize", event, filteredUi( ui ) ); 8776 }, 8777 stop: function( event, ui ) { 8778 options.height = $( this ).height(); 8779 options.width = $( this ).width(); 8780 $( this ).removeClass("ui-dialog-resizing"); 8781 that._unblockFrames(); 8782 that._trigger( "resizeStop", event, filteredUi( ui ) ); 8783 } 8784 }) 8785 .css( "position", position ); 8786 }, 8787 _minHeight: function() { 8788 var options = this.options; 8789 return options.height === "auto" ? 8790 options.minHeight : 8791 Math.min( options.minHeight, options.height ); 8792 }, 8793 _position: function() { 8794 var isVisible = this.uiDialog.is(":visible"); 8795 if ( !isVisible ) { 8796 this.uiDialog.show(); 8797 } 8798 this.uiDialog.position( this.options.position ); 8799 if ( !isVisible ) { 8800 this.uiDialog.hide(); 8801 } 8802 }, 8803 _setOptions: function( options ) { 8804 var that = this, 8805 resize = false, 8806 resizableOptions = {}; 8807 $.each( options, function( key, value ) { 8808 that._setOption( key, value ); 8809 if ( key in sizeRelatedOptions ) { 8810 resize = true; 8811 } 8812 if ( key in resizableRelatedOptions ) { 8813 resizableOptions[ key ] = value; 8814 } 8815 }); 8816 if ( resize ) { 8817 this._size(); 8818 this._position(); 8819 } 8820 if ( this.uiDialog.is(":data(ui-resizable)") ) { 8821 this.uiDialog.resizable( "option", resizableOptions ); 8822 } 8823 }, 8824 _setOption: function( key, value ) { 8825 var isDraggable, isResizable, 8826 uiDialog = this.uiDialog; 8827 if ( key === "dialogClass" ) { 8828 uiDialog 8829 .removeClass( this.options.dialogClass ) 8830 .addClass( value ); 8831 } 8832 if ( key === "disabled" ) { 8833 return; 8834 } 8835 this._super( key, value ); 8836 if ( key === "appendTo" ) { 8837 this.uiDialog.appendTo( this._appendTo() ); 8838 } 8839 if ( key === "buttons" ) { 8840 this._createButtons(); 8841 } 8842 if ( key === "closeText" ) { 8843 this.uiDialogTitlebarClose.button({ 8844 label: "" + value 8845 }); 8846 } 8847 if ( key === "draggable" ) { 8848 isDraggable = uiDialog.is(":data(ui-draggable)"); 8849 if ( isDraggable && !value ) { 8850 uiDialog.draggable("destroy"); 8851 } 8852 if ( !isDraggable && value ) { 8853 this._makeDraggable(); 8854 } 8855 } 8856 if ( key === "position" ) { 8857 this._position(); 8858 } 8859 if ( key === "resizable" ) { 8860 isResizable = uiDialog.is(":data(ui-resizable)"); 8861 if ( isResizable && !value ) { 8862 uiDialog.resizable("destroy"); 8863 } 8864 if ( isResizable && typeof value === "string" ) { 8865 uiDialog.resizable( "option", "handles", value ); 8866 } 8867 if ( !isResizable && value !== false ) { 8868 this._makeResizable(); 8869 } 8870 } 8871 if ( key === "title" ) { 8872 this._title( this.uiDialogTitlebar.find(".ui-dialog-title") ); 8873 } 8874 }, 8875 _size: function() { 8876 var nonContentHeight, minContentHeight, maxContentHeight, 8877 options = this.options; 8878 this.element.show().css({ 8879 width: "auto", 8880 minHeight: 0, 8881 maxHeight: "none", 8882 height: 0 8883 }); 8884 if ( options.minWidth > options.width ) { 8885 options.width = options.minWidth; 8886 } 8887 nonContentHeight = this.uiDialog.css({ 8888 height: "auto", 8889 width: options.width 8890 }) 8891 .outerHeight(); 8892 minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); 8893 maxContentHeight = typeof options.maxHeight === "number" ? 8894 Math.max( 0, options.maxHeight - nonContentHeight ) : 8895 "none"; 8896 if ( options.height === "auto" ) { 8897 this.element.css({ 8898 minHeight: minContentHeight, 8899 maxHeight: maxContentHeight, 8900 height: "auto" 8901 }); 8902 } else { 8903 this.element.height( Math.max( 0, options.height - nonContentHeight ) ); 8904 } 8905 if (this.uiDialog.is(":data(ui-resizable)") ) { 8906 this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); 8907 } 8908 }, 8909 _blockFrames: function() { 8910 this.iframeBlocks = this.document.find( "iframe" ).map(function() { 8911 var iframe = $( this ); 8912 return $( "<div>" ) 8913 .css({ 8914 position: "absolute", 8915 width: iframe.outerWidth(), 8916 height: iframe.outerHeight() 8917 }) 8918 .appendTo( iframe.parent() ) 8919 .offset( iframe.offset() )[0]; 8920 }); 8921 }, 8922 _unblockFrames: function() { 8923 if ( this.iframeBlocks ) { 8924 this.iframeBlocks.remove(); 8925 delete this.iframeBlocks; 8926 } 8927 }, 8928 _allowInteraction: function( event ) { 8929 if ( $( event.target ).closest(".ui-dialog").length ) { 8930 return true; 8931 } 8932 return !!$( event.target ).closest(".ui-datepicker").length; 8933 }, 8934 _createOverlay: function() { 8935 if ( !this.options.modal ) { 8936 return; 8937 } 8938 var that = this, 8939 widgetFullName = this.widgetFullName; 8940 if ( !$.ui.dialog.overlayInstances ) { 8941 this._delay(function() { 8942 if ( $.ui.dialog.overlayInstances ) { 8943 this.document.bind( "focusin.dialog", function( event ) { 8944 if ( !that._allowInteraction( event ) ) { 8945 event.preventDefault(); 8946 $(".ui-dialog:visible:last .ui-dialog-content") 8947 .data( widgetFullName )._focusTabbable(); 8948 } 8949 }); 8950 } 8951 }); 8952 }
8953 this.overlay = $("<div>") 8954 .addClass("ui-widget-overlay ui-front") 8955 .appendTo( this._appendTo() ); 8956 this._on( this.overlay, { 8957 mousedown: "_keepFocus" 8958 }); 8959 $.ui.dialog.overlayInstances++; 8960 }, 8961 _destroyOverlay: function() { 8962 if ( !this.options.modal ) { 8963 return; 8964 } 8965 if ( this.overlay ) { 8966 $.ui.dialog.overlayInstances--; 8967 8968 if ( !$.ui.dialog.overlayInstances ) { 8969 this.document.unbind( "focusin.dialog" ); 8970 } 8971 this.overlay.remove(); 8972 this.overlay = null; 8973 } 8974 } 8975}); 8976$.ui.dialog.overlayInstances = 0; 8977if ( $.uiBackCompat !== false ) { 8978 $.widget( "ui.dialog", $.ui.dialog, { 8979 _position: function() { 8980 var position = this.options.position, 8981 myAt = [], 8982 offset = [ 0, 0 ], 8983 isVisible; 8984 if ( position ) { 8985 if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) { 8986 myAt = position.split ? position.split(" ") : [ position[0], position[1] ]; 8987 if ( myAt.length === 1 ) { 8988 myAt[1] = myAt[0]; 8989 } 8990 $.each( [ "left", "top" ], function( i, offsetPosition ) { 8991 if ( +myAt[ i ] === myAt[ i ] ) { 8992 offset[ i ] = myAt[ i ]; 8993 myAt[ i ] = offsetPosition; 8994 } 8995 }); 8996 position = { 8997 my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " + 8998 myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]), 8999 at: myAt.join(" ") 9000 }; 9001 } 9002 position = $.extend( {}, $.ui.dialog.prototype.options.position, position ); 9003 } else { 9004 position = $.ui.dialog.prototype.options.position; 9005 } 9006 isVisible = this.uiDialog.is(":visible"); 9007 if ( !isVisible ) { 9008 this.uiDialog.show(); 9009 } 9010 this.uiDialog.position( position ); 9011 if ( !isVisible ) { 9012 this.uiDialog.hide(); 9013 } 9014 } 9015 }); 9016} 9017}( jQuery ) ); 9018(function( $ ) { 9019function modifier( fn ) { 9020 return function() { 9021 var previous = this.element.val(); 9022 fn.apply( this, arguments ); 9023 this._refresh(); 9024 if ( previous !== this.element.val() ) { 9025 this._trigger( "change" ); 9026 } 9027 }; 9028} 9029$.widget( "ui.spinner", { 9030 version: "1.10.4", 9031 defaultElement: "<input>", 9032 widgetEventPrefix: "spin", 9033 options: { 9034 culture: null, 9035 icons: { 9036 down: "ui-icon-triangle-1-s", 9037 up: "ui-icon-triangle-1-n" 9038 }, 9039 incremental: true, 9040 max: null, 9041 min: null, 9042 numberFormat: null, 9043 page: 10, 9044 step: 1, 9045 9046 change: null, 9047 spin: null, 9048 start: null, 9049 stop: null 9050 }, 9051 _create: function() { 9052 // handle string values that need to be parsed 9053 this._setOption( "max", this.options.max ); 9054 this._setOption( "min", this.options.min ); 9055 this._setOption( "step", this.options.step ); 9056 if ( this.value() !== "" ) { 9057 // Format the value, but don't constrain. 9058 this._value( this.element.val(), true ); 9059 } 9060 this._draw(); 9061 this._on( this._events ); 9062 this._refresh(); 9063 this._on( this.window, { 9064 beforeunload: function() { 9065 this.element.removeAttr( "autocomplete" ); 9066 } 9067 }); 9068 }, 9069 _getCreateOptions: function() { 9070 var options = {}, 9071 element = this.element; 9072 $.each( [ "min", "max", "step" ], function( i, option ) { 9073 var value = element.attr( option ); 9074 if ( value !== undefined && value.length ) { 9075 options[ option ] = value; 9076 } 9077 }); 9078 return options; 9079 }, 9080 _events: { 9081 keydown: function( event ) { 9082 if ( this._start( event ) && this._keydown( event ) ) { 9083 event.preventDefault(); 9084 } 9085 }, 9086 keyup: "_stop", 9087 focus: function() { 9088 this.previous = this.element.val(); 9089 }, 9090 blur: function( event ) { 9091 if ( this.cancelBlur ) { 9092 delete this.cancelBlur; 9093 return; 9094 } 9095 this._stop(); 9096 this._refresh(); 9097 if ( this.previous !== this.element.val() ) { 9098 this._trigger( "change", event ); 9099 } 9100 }, 9101 mousewheel: function( event, delta ) { 9102 if ( !delta ) { 9103 return; 9104 } 9105 if ( !this.spinning && !this._start( event ) ) { 9106 return false; 9107 } 9108 9109 this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); 9110 clearTimeout( this.mousewheelTimer ); 9111 this.mousewheelTimer = this._delay(function() { 9112 if ( this.spinning ) { 9113 this._stop( event ); 9114 } 9115 }, 100 ); 9116 event.preventDefault(); 9117 }, 9118 "mousedown .ui-spinner-button": function( event ) { 9119 var previous; 9120 previous = this.element[0] === this.document[0].activeElement ? 9121 this.previous : this.element.val(); 9122 function checkFocus() { 9123 var isActive = this.element[0] === this.document[0].activeElement; 9124 if ( !isActive ) { 9125 this.element.focus(); 9126 this.previous = previous; 9127 this._delay(function() { 9128 this.previous = previous; 9129 }); 9130 } 9131 } 9132 event.preventDefault();
vendor: 11,899 bytes, lines 9133-9566
9133 checkFocus.call( this ); 9134 this.cancelBlur = true; 9135 this._delay(function() { 9136 delete this.cancelBlur; 9137 checkFocus.call( this ); 9138 }); 9139 if ( this._start( event ) === false ) { 9140 return; 9141 } 9142 this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 9143 }, 9144 "mouseup .ui-spinner-button": "_stop", 9145 "mouseenter .ui-spinner-button": function( event ) { 9146 if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { 9147 return; 9148 } 9149 if ( this._start( event ) === false ) { 9150 return false; 9151 } 9152 this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 9153 }, 9154 "mouseleave .ui-spinner-button": "_stop" 9155 }, 9156 _draw: function() { 9157 var uiSpinner = this.uiSpinner = this.element 9158 .addClass( "ui-spinner-input" ) 9159 .attr( "autocomplete", "off" ) 9160 .wrap( this._uiSpinnerHtml() ) 9161 .parent() 9162 // add buttons 9163 .append( this._buttonHtml() ); 9164 this.element.attr( "role", "spinbutton" ); 9165 this.buttons = uiSpinner.find( ".ui-spinner-button" ) 9166 .attr( "tabIndex", -1 ) 9167 .button() 9168 .removeClass( "ui-corner-all" ); 9169 if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && 9170 uiSpinner.height() > 0 ) { 9171 uiSpinner.height( uiSpinner.height() ); 9172 } 9173 if ( this.options.disabled ) { 9174 this.disable(); 9175 } 9176 }, 9177 _keydown: function( event ) { 9178 var options = this.options, 9179 keyCode = $.ui.keyCode; 9180 switch ( event.keyCode ) { 9181 case keyCode.UP: 9182 this._repeat( null, 1, event ); 9183 return true; 9184 case keyCode.DOWN: 9185 this._repeat( null, -1, event ); 9186 return true; 9187 case keyCode.PAGE_UP: 9188 this._repeat( null, options.page, event ); 9189 return true; 9190 case keyCode.PAGE_DOWN: 9191 this._repeat( null, -options.page, event ); 9192 return true; 9193 } 9194 9195 return false; 9196 }, 9197 _uiSpinnerHtml: function() { 9198 return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"; 9199 }, 9200 _buttonHtml: function() { 9201 return "" + 9202 "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" + 9203 "<span class='ui-icon " + this.options.icons.up + "'>▲</span>" + 9204 "</a>" + 9205 "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + 9206 "<span class='ui-icon " + this.options.icons.down + "'>▼</span>" + 9207 "</a>"; 9208 }, 9209 _start: function( event ) { 9210 if ( !this.spinning && this._trigger( "start", event ) === false ) { 9211 return false; 9212 } 9213 if ( !this.counter ) { 9214 this.counter = 1; 9215 } 9216 this.spinning = true; 9217 return true; 9218 }, 9219 _repeat: function( i, steps, event ) { 9220 i = i || 500; 9221 clearTimeout( this.timer ); 9222 this.timer = this._delay(function() { 9223 this._repeat( 40, steps, event ); 9224 }, i ); 9225 this._spin( steps * this.options.step, event ); 9226 }, 9227 _spin: function( step, event ) { 9228 var value = this.value() || 0; 9229 if ( !this.counter ) { 9230 this.counter = 1; 9231 } 9232 value = this._adjustValue( value + step * this._increment( this.counter ) ); 9233 if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { 9234 this._value( value ); 9235 this.counter++; 9236 } 9237 }, 9238 _increment: function( i ) { 9239 var incremental = this.options.incremental; 9240 if ( incremental ) { 9241 return $.isFunction( incremental ) ? 9242 incremental( i ) : 9243 Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 ); 9244 } 9245 return 1; 9246 }, 9247 _precision: function() { 9248 var precision = this._precisionOf( this.options.step ); 9249 if ( this.options.min !== null ) { 9250 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 9251 } 9252 return precision; 9253 }, 9254 _precisionOf: function( num ) { 9255 var str = num.toString(), 9256 decimal = str.indexOf( "." ); 9257 return decimal === -1 ? 0 : str.length - decimal - 1; 9258 }, 9259 _adjustValue: function( value ) { 9260 var base, aboveMin, 9261 options = this.options; 9262 base = options.min !== null ? options.min : 0; 9263 aboveMin = value - base; 9264 aboveMin = Math.round(aboveMin / options.step) * options.step; 9265 value = base + aboveMin; 9266 value = parseFloat( value.toFixed( this._precision() ) ); 9267 if ( options.max !== null && value > options.max) { 9268 return options.max; 9269 } 9270 if ( options.min !== null && value < options.min ) { 9271 return options.min; 9272 } 9273 return value; 9274 }, 9275 _stop: function( event ) { 9276 if ( !this.spinning ) { 9277 return; 9278 } 9279 clearTimeout( this.timer ); 9280 clearTimeout( this.mousewheelTimer ); 9281 this.counter = 0; 9282 this.spinning = false; 9283 this._trigger( "stop", event ); 9284 }, 9285 _setOption: function( key, value ) { 9286 if ( key === "culture" || key === "numberFormat" ) { 9287 var prevValue = this._parse( this.element.val() ); 9288 this.options[ key ] = value; 9289 this.element.val( this._format( prevValue ) ); 9290 return; 9291 } 9292 if ( key === "max" || key === "min" || key === "step" ) { 9293 if ( typeof value === "string" ) { 9294 value = this._parse( value ); 9295 } 9296 } 9297 if ( key === "icons" ) { 9298 this.buttons.first().find( ".ui-icon" ) 9299 .removeClass( this.options.icons.up ) 9300 .addClass( value.up ); 9301 this.buttons.last().find( ".ui-icon" ) 9302 .removeClass( this.options.icons.down ) 9303 .addClass( value.down ); 9304 } 9305 this._super( key, value ); 9306 if ( key === "disabled" ) { 9307 if ( value ) { 9308 this.element.prop( "disabled", true ); 9309 this.buttons.button( "disable" ); 9310 } else { 9311 this.element.prop( "disabled", false ); 9312 this.buttons.button( "enable" ); 9313 } 9314 } 9315 }, 9316 _setOptions: modifier(function( options ) { 9317 this._super( options ); 9318 this._value( this.element.val() ); 9319 }), 9320 _parse: function( val ) { 9321 if ( typeof val === "string" && val !== "" ) { 9322 val = window.Globalize && this.options.numberFormat ? 9323 Globalize.parseFloat( val, 10, this.options.culture ) : +val; 9324 } 9325 return val === "" || isNaN( val ) ? null : val; 9326 }, 9327 _format: function( value ) { 9328 if ( value === "" ) { 9329 return ""; 9330 } 9331 return window.Globalize && this.options.numberFormat ? 9332 Globalize.format( value, this.options.numberFormat, this.options.culture ) : 9333 value; 9334 }, 9335 _refresh: function() { 9336 this.element.attr({ 9337 "aria-valuemin": this.options.min, 9338 "aria-valuemax": this.options.max, 9339 // TODO: what should we do with values that can't be parsed? 9340 "aria-valuenow": this._parse( this.element.val() ) 9341 }); 9342 }, 9343 _value: function( value, allowAny ) { 9344 var parsed; 9345 if ( value !== "" ) { 9346 parsed = this._parse( value ); 9347 if ( parsed !== null ) { 9348 if ( !allowAny ) { 9349 parsed = this._adjustValue( parsed ); 9350 } 9351 value = this._format( parsed ); 9352 } 9353 } 9354 this.element.val( value ); 9355 this._refresh(); 9356 }, 9357 _destroy: function() { 9358 this.element 9359 .removeClass( "ui-spinner-input" ) 9360 .prop( "disabled", false ) 9361 .removeAttr( "autocomplete" ) 9362 .removeAttr( "role" ) 9363 .removeAttr( "aria-valuemin" ) 9364 .removeAttr( "aria-valuemax" ) 9365 .removeAttr( "aria-valuenow" ); 9366 this.uiSpinner.replaceWith( this.element ); 9367 }, 9368 stepUp: modifier(function( steps ) { 9369 this._stepUp( steps ); 9370 }), 9371 _stepUp: function( steps ) { 9372 if ( this._start() ) { 9373 this._spin( (steps || 1) * this.options.step ); 9374 this._stop(); 9375 } 9376 }, 9377 stepDown: modifier(function( steps ) { 9378 this._stepDown( steps ); 9379 }), 9380 _stepDown: function( steps ) { 9381 if ( this._start() ) { 9382 this._spin( (steps || 1) * -this.options.step ); 9383 this._stop(); 9384 } 9385 }, 9386 pageUp: modifier(function( pages ) { 9387 this._stepUp( (pages || 1) * this.options.page ); 9388 }), 9389 pageDown: modifier(function( pages ) { 9390 this._stepDown( (pages || 1) * this.options.page ); 9391 }), 9392 value: function( newVal ) { 9393 if ( !arguments.length ) { 9394 return this._parse( this.element.val() ); 9395 } 9396 modifier( this._value ).call( this, newVal ); 9397 }, 9398 widget: function() { 9399 return this.uiSpinner; 9400 } 9401}); 9402}( jQuery ) ); 9403(function( $ ) { 9404var increments = 0; 9405function addDescribedBy( elem, id ) { 9406 var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); 9407 describedby.push( id ); 9408 elem 9409 .data( "ui-tooltip-id", id ) 9410 .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); 9411} 9412function removeDescribedBy( elem ) { 9413 var id = elem.data( "ui-tooltip-id" ), 9414 describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), 9415 index = $.inArray( id, describedby ); 9416 if ( index !== -1 ) { 9417 describedby.splice( index, 1 ); 9418 } 9419 elem.removeData( "ui-tooltip-id" ); 9420 describedby = $.trim( describedby.join( " " ) ); 9421 if ( describedby ) { 9422 elem.attr( "aria-describedby", describedby ); 9423 } else { 9424 elem.removeAttr( "aria-describedby" ); 9425 } 9426} 9427$.widget( "ui.tooltip", { 9428 version: "1.10.4", 9429 options: { 9430 content: function() { 9431 var title = $( this ).attr( "title" ) || ""; 9432 return $( "<a>" ).text( title ).html(); 9433 }, 9434 hide: true, 9435 items: "[title]:not([disabled])", 9436 position: { 9437 my: "left top+15", 9438 at: "left bottom", 9439 collision: "flipfit flip" 9440 }, 9441 show: true, 9442 tooltipClass: null, 9443 track: false, 9444 close: null, 9445 open: null 9446 }, 9447 _create: function() { 9448 this._on({ 9449 mouseover: "open", 9450 focusin: "open" 9451 }); 9452 this.tooltips = {}; 9453 this.parents = {}; 9454 if ( this.options.disabled ) { 9455 this._disable(); 9456 } 9457 }, 9458 _setOption: function( key, value ) { 9459 var that = this; 9460 if ( key === "disabled" ) { 9461 this[ value ? "_disable" : "_enable" ](); 9462 this.options[ key ] = value; 9463 return; 9464 } 9465 this._super( key, value ); 9466 if ( key === "content" ) { 9467 $.each( this.tooltips, function( id, element ) { 9468 that._updateContent( element ); 9469 }); 9470 } 9471 }, 9472 _disable: function() { 9473 var that = this; 9474 $.each( this.tooltips, function( id, element ) { 9475 var event = $.Event( "blur" ); 9476 event.target = event.currentTarget = element[0]; 9477 that.close( event, true ); 9478 }); 9479 this.element.find( this.options.items ).addBack().each(function() { 9480 var element = $( this ); 9481 if ( element.is( "[title]" ) ) { 9482 element 9483 .data( "ui-tooltip-title", element.attr( "title" ) ) 9484 .attr( "title", "" ); 9485 } 9486 }); 9487 }, 9488 _enable: function() { 9489 this.element.find( this.options.items ).addBack().each(function() { 9490 var element = $( this ); 9491 if ( element.data( "ui-tooltip-title" ) ) { 9492 element.attr( "title", element.data( "ui-tooltip-title" ) ); 9493 } 9494 }); 9495 }, 9496 open: function( event ) { 9497 var that = this, 9498 target = $( event ? event.target : this.element ) 9499 .closest( this.options.items ); 9500 if ( !target.length || target.data( "ui-tooltip-id" ) ) { 9501 return; 9502 } 9503 if ( target.attr( "title" ) ) { 9504 target.data( "ui-tooltip-title", target.attr( "title" ) ); 9505 } 9506 target.data( "ui-tooltip-open", true ); 9507 if ( event && event.type === "mouseover" ) { 9508 target.parents().each(function() { 9509 var parent = $( this ), 9510 blurEvent; 9511 if ( parent.data( "ui-tooltip-open" ) ) { 9512 blurEvent = $.Event( "blur" ); 9513 blurEvent.target = blurEvent.currentTarget = this; 9514 that.close( blurEvent, true ); 9515 } 9516 if ( parent.attr( "title" ) ) { 9517 parent.uniqueId(); 9518 that.parents[ this.id ] = { 9519 element: this, 9520 title: parent.attr( "title" ) 9521 }; 9522 parent.attr( "title", "" ); 9523 } 9524 }); 9525 } 9526 this._updateContent( target, event ); 9527 }, 9528 _updateContent: function( target, event ) { 9529 var content, 9530 contentOption = this.options.content, 9531 that = this, 9532 eventType = event ? event.type : null; 9533 9534 if ( typeof contentOption === "string" ) { 9535 return this._open( event, target, contentOption ); 9536 } 9537 content = contentOption.call( target[0], function( response ) { 9538 if ( !target.data( "ui-tooltip-open" ) ) { 9539 return; 9540 } 9541 that._delay(function() { 9542 if ( event ) { 9543 event.type = eventType; 9544 } 9545 this._open( event, target, response ); 9546 }); 9547 }); 9548 if ( content ) { 9549 this._open( event, target, content ); 9550 } 9551 }, 9552 _open: function( event, target, content ) { 9553 var tooltip, events, delayedShow, 9554 positionOption = $.extend( {}, this.options.position ); 9555 if ( !content ) { 9556 return; 9557 } 9558 tooltip = this._find( target ); 9559 if ( tooltip.length ) { 9560 tooltip.find( ".ui-tooltip-content" ).html( content ); 9561 return; 9562 } 9563 if ( target.is( "[title]" ) ) { 9564 if ( event && event.type === "mouseover" ) { 9565 target.attr( "title", "" ); 9566 } else {
9567 target.removeAttr( "title" ); 9568 } 9569 } 9570 tooltip = this._tooltip( target ); 9571 addDescribedBy( target, tooltip.attr( "id" ) ); 9572 tooltip.find( ".ui-tooltip-content" ).html( content ); 9573 function position( event ) { 9574 positionOption.of = event; 9575 if ( tooltip.is( ":hidden" ) ) { 9576 return; 9577 } 9578 tooltip.position( positionOption ); 9579 } 9580 if ( this.options.track && event && /^mouse/.test( event.type ) ) { 9581 this._on( this.document, { 9582 mousemove: position 9583 }); 9584 position( event ); 9585 } else { 9586 tooltip.position( $.extend({ 9587 of: target 9588 }, this.options.position ) ); 9589 } 9590 tooltip.hide(); 9591 this._show( tooltip, this.options.show ); 9592 if ( this.options.show && this.options.show.delay ) { 9593 delayedShow = this.delayedShow = setInterval(function() { 9594 if ( tooltip.is( ":visible" ) ) { 9595 position( positionOption.of ); 9596 clearInterval( delayedShow ); 9597 } 9598 }, $.fx.interval ); 9599 } 9600 this._trigger( "open", event, { tooltip: tooltip } ); 9601 events = { 9602 keyup: function( event ) { 9603 if ( event.keyCode === $.ui.keyCode.ESCAPE ) { 9604 var fakeEvent = $.Event(event); 9605 fakeEvent.currentTarget = target[0]; 9606 this.close( fakeEvent, true ); 9607 } 9608 }, 9609 remove: function() { 9610 this._removeTooltip( tooltip ); 9611 } 9612 }; 9613 if ( !event || event.type === "mouseover" ) { 9614 events.mouseleave = "close"; 9615 } 9616 if ( !event || event.type === "focusin" ) { 9617 events.focusout = "close"; 9618 } 9619 this._on( true, target, events ); 9620 }, 9621 close: function( event ) { 9622 var that = this, 9623 target = $( event ? event.currentTarget : this.element ), 9624 tooltip = this._find( target ); 9625 if ( this.closing ) { 9626 return; 9627 } 9628 clearInterval( this.delayedShow ); 9629 if ( target.data( "ui-tooltip-title" ) ) { 9630 target.attr( "title", target.data( "ui-tooltip-title" ) ); 9631 } 9632 removeDescribedBy( target ); 9633 tooltip.stop( true ); 9634 this._hide( tooltip, this.options.hide, function() { 9635 that._removeTooltip( $( this ) ); 9636 }); 9637 target.removeData( "ui-tooltip-open" ); 9638 this._off( target, "mouseleave focusout keyup" ); 9639 if ( target[0] !== this.element[0] ) { 9640 this._off( target, "remove" ); 9641 } 9642 this._off( this.document, "mousemove" ); 9643 if ( event && event.type === "mouseleave" ) { 9644 $.each( this.parents, function( id, parent ) { 9645 $( parent.element ).attr( "title", parent.title ); 9646 delete that.parents[ id ]; 9647 }); 9648 } 9649 this.closing = true; 9650 this._trigger( "close", event, { tooltip: tooltip } ); 9651 this.closing = false; 9652 }, 9653 _tooltip: function( element ) { 9654 var id = "ui-tooltip-" + increments++, 9655 tooltip = $( "<div>" ) 9656 .attr({ 9657 id: id, 9658 role: "tooltip" 9659 }) 9660 .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + 9661 ( this.options.tooltipClass || "" ) ); 9662 $( "<div>" ) 9663 .addClass( "ui-tooltip-content" ) 9664 .appendTo( tooltip ); 9665 tooltip.appendTo( this.document[0].body ); 9666 this.tooltips[ id ] = element; 9667 return tooltip; 9668 }, 9669 _find: function( target ) { 9670 var id = target.data( "ui-tooltip-id" ); 9671 return id ? $( "#" + id ) : $(); 9672 }, 9673 _removeTooltip: function( tooltip ) { 9674 tooltip.remove(); 9675 delete this.tooltips[ tooltip.attr( "id" ) ]; 9676 }, 9677 _destroy: function() { 9678 var that = this; 9679 $.each( this.tooltips, function( id, element ) { 9680 var event = $.Event( "blur" ); 9681 event.target = event.currentTarget = element[0]; 9682 that.close( event, true ); 9683 $( "#" + id ).remove(); 9684 if ( element.data( "ui-tooltip-title" ) ) { 9685 element.attr( "title", element.data( "ui-tooltip-title" ) ); 9686 element.removeData( "ui-tooltip-title" ); 9687 } 9688 }); 9689 } 9690}); 9691}(jQuery)); 9692</script>
9692<script>jQuery(function(a){a.datepicker.regional.en={closeText:"Done",preposition:"",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:"January February March April May June July August September October November December".split(" "),monthNamesShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),dayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),dayNamesShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),dayNamesMin:"Su Mo Tu We Th Fr Sa".split(" "),weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};a.datepicker.setDefaults(a.datepicker.regional.en)});</script>
9692<script> 9693(function() { 9694 var $ = jQuery; 9695 var LightboxOptions = (function() { 9696 function LightboxOptions() { 9697 this.fadeDuration = 500; 9698 this.fitImagesInViewport = true; 9699 this.resizeDuration = 700; 9700 this.positionFromTop = 50; 9701 this.showImageNumberLabel = true; 9702 this.alwaysShowNavOnTouchDevices = false; 9703 this.wrapAround = false; 9704 } 9705 LightboxOptions.prototype.albumLabel = function(curImageNum, albumSize) { 9706 return "Image " + curImageNum + " of " + albumSize; 9707 }; 9708 return LightboxOptions; 9709 })(); 9710 var Lightbox = (function() { 9711 function Lightbox(options) { 9712 this.options = options; 9713 this.album = []; 9714 this.currentImageIndex = void 0; 9715 this.init(); 9716 } 9717 Lightbox.prototype.init = function() { 9718 this.enable(); 9719 this.build(); 9720 }; 9721 Lightbox.prototype.enable = function() { 9722 var self = this; 9723 $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { 9724 self.start($(event.currentTarget)); 9725 return false; 9726 }); 9727 }; 9728 Lightbox.prototype.build = function() { 9729 var self = this; 9730 $("<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')); 9731 this.$lightbox = $('#lightbox'); 9732 this.$overlay = $('#lightboxOverlay'); 9733 this.$outerContainer = this.$lightbox.find('.lb-outerContainer'); 9734 this.$container = this.$lightbox.find('.lb-container'); 9735 this.containerTopPadding = parseInt(this.$container.css('padding-top'), 10); 9736 this.containerRightPadding = parseInt(this.$container.css('padding-right'), 10); 9737 this.containerBottomPadding = parseInt(this.$container.css('padding-bottom'), 10); 9738 this.containerLeftPadding = parseInt(this.$container.css('padding-left'), 10); 9739 this.$overlay.hide().on('click', function() { 9740 self.end(); 9741 return false; 9742 }); 9743 this.$lightbox.hide().on('click', function(event) { 9744 if ($(event.target).attr('id') === 'lightbox') { 9745 self.end(); 9746 } 9747 return false; 9748 }); 9749 this.$outerContainer.on('click', function(event) { 9750 if ($(event.target).attr('id') === 'lightbox') { 9751 self.end(); 9752 } 9753 return false; 9754 }); 9755 this.$lightbox.find('.lb-prev').on('click', function() { 9756 if (self.currentImageIndex === 0) { 9757 self.changeImage(self.album.length - 1); 9758 } else { 9759 self.changeImage(self.currentImageIndex - 1); 9760 } 9761 return false; 9762 }); 9763 this.$lightbox.find('.lb-next').on('click', function() { 9764 if (self.currentImageIndex === self.album.length - 1) { 9765 self.changeImage(0); 9766 } else { 9767 self.changeImage(self.currentImageIndex + 1); 9768 } 9769 return false; 9770 }); 9771 this.$lightbox.find('.lb-loader, .lb-close').on('click', function() { 9772 self.end(); 9773 return false; 9774 }); 9775 }; 9776 Lightbox.prototype.start = function($link) { 9777 var self = this; 9778 var $window = $(window); 9779 $window.on('resize', $.proxy(this.sizeOverlay, this)); 9780 $('select, object, embed').css({ 9781 visibility: "hidden" 9782 }); 9783 this.sizeOverlay(); 9784 this.album = []; 9785 var imageNumber = 0; 9786 function addToAlbum($link) { 9787 self.album.push({ 9788 link: $link.attr('href'), 9789 title: $link.attr('data-title') || $link.attr('title') 9790 }); 9791 } 9792 var dataLightboxValue = $link.attr('data-lightbox'); 9793 var $links; 9794 if (dataLightboxValue) { 9795 $links = $($link.prop("tagName") + '[data-lightbox="' + dataLightboxValue + '"]'); 9796 for (var i = 0; i < $links.length; i = ++i) { 9797 addToAlbum($($links[i])); 9798 if ($links[i] === $link[0]) { 9799 imageNumber = i; 9800 } 9801 } 9802 } else { 9803 if ($link.attr('rel') === 'lightbox') { 9804 // If image is not part of a set 9805 addToAlbum($link); 9806 } else { 9807 // If image is part of a set 9808 $links = $($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]'); 9809 for (var j = 0; j < $links.length; j = ++j) { 9810 addToAlbum($($links[j])); 9811 if ($links[j] === $link[0]) { 9812 imageNumber = j; 9813 } 9814 } 9815 } 9816 } 9817 var top = $window.scrollTop() + this.options.positionFromTop; 9818 var left = $window.scrollLeft(); 9819 this.$lightbox.css({ 9820 top: top + 'px', 9821 left: left + 'px' 9822 }).fadeIn(this.options.fadeDuration); 9823 this.changeImage(imageNumber); 9824 }; 9825 Lightbox.prototype.changeImage = function(imageNumber) { 9826 var self = this; 9827 this.disableKeyboardNav(); 9828 var $image = this.$lightbox.find('.lb-image'); 9829 this.$overlay.fadeIn(this.options.fadeDuration); 9830 $('.lb-loader').fadeIn('slow'); 9831 this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide(); 9832 this.$outerContainer.addClass('animating'); 9833 var preloader = new Image(); 9834 preloader.onload = function() { 9835 var $preloader, imageHeight, imageWidth, maxImageHeight, maxImageWidth, windowHeight, windowWidth; 9836 $image.attr('src', self.album[imageNumber].link); 9837 $preloader = $(preloader); 9838 $image.width(preloader.width); 9839 $image.height(preloader.height); 9840 if (self.options.fitImagesInViewport) { 9841 windowWidth = $(window).width(); 9842 windowHeight = $(window).height(); 9843 maxImageWidth = windowWidth - self.containerLeftPadding - self.containerRightPadding - 20; 9844 maxImageHeight = windowHeight - self.containerTopPadding - self.containerBottomPadding - 120; 9845 if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { 9846 if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { 9847 imageWidth = maxImageWidth; 9848 imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); 9849 $image.width(imageWidth); 9850 $image.height(imageHeight); 9851 } else { 9852 imageHeight = maxImageHeight; 9853 imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); 9854 $image.width(imageWidth); 9855 $image.height(imageHeight); 9856 } 9857 } 9858 } 9859 self.sizeContainer($image.width(), $image.height()); 9860 }; 9861 preloader.src = this.album[imageNumber].link; 9862 this.currentImageIndex = imageNumber; 9863 }; 9864 Lightbox.prototype.sizeOverlay = function() { 9865 this.$overlay 9866 .width($(window).width()) 9867 .height($(document).height()); 9868 }; 9869 Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) { 9870 var self = this; 9871 var oldWidth = this.$outerContainer.outerWidth(); 9872 var oldHeight = this.$outerContainer.outerHeight(); 9873 var newWidth = imageWidth + this.containerLeftPadding + this.containerRightPadding; 9874 var newHeight = imageHeight + this.containerTopPadding + this.containerBottomPadding; 9875 function postResize() { 9876 self.$lightbox.find('.lb-dataContainer').width(newWidth); 9877 self.$lightbox.find('.lb-prevLink').height(newHeight); 9878 self.$lightbox.find('.lb-nextLink').height(newHeight); 9879 self.showImage(); 9880 } 9881 if (oldWidth !== newWidth || oldHeight !== newHeight) { 9882 this.$outerContainer.animate({ 9883 width: newWidth, 9884 height: newHeight 9885 }, this.options.resizeDuration, 'swing', function() { 9886 postResize(); 9887 }); 9888 } else { 9889 postResize(); 9890 } 9891 }; 9892 Lightbox.prototype.showImage = function() { 9893 this.$lightbox.find('.lb-loader').hide(); 9894 this.$lightbox.find('.lb-image').fadeIn('slow'); 9895 this.updateNav(); 9896 this.updateDetails(); 9897 this.preloadNeighboringImages(); 9898 this.enableKeyboardNav(); 9899 }; 9900 Lightbox.prototype.updateNav = function() { 9901 var alwaysShowNav = false;
9902 try { 9903 document.createEvent("TouchEvent"); 9904 alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices)? true: false; 9905 } catch (e) {} 9906 this.$lightbox.find('.lb-nav').show(); 9907 if (this.album.length > 1) { 9908 if (this.options.wrapAround) { 9909 if (alwaysShowNav) { 9910 this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1'); 9911 } 9912 this.$lightbox.find('.lb-prev, .lb-next').show(); 9913 } else { 9914 if (this.currentImageIndex > 0) { 9915 this.$lightbox.find('.lb-prev').show(); 9916 if (alwaysShowNav) { 9917 this.$lightbox.find('.lb-prev').css('opacity', '1'); 9918 } 9919 } 9920 if (this.currentImageIndex < this.album.length - 1) { 9921 this.$lightbox.find('.lb-next').show(); 9922 if (alwaysShowNav) { 9923 this.$lightbox.find('.lb-next').css('opacity', '1'); 9924 } 9925 } 9926 } 9927 } 9928 }; 9929 Lightbox.prototype.updateDetails = function() { 9930 var self = this; 9931 if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") { 9932 this.$lightbox.find('.lb-caption') 9933 .html(this.album[this.currentImageIndex].title) 9934 .fadeIn('fast') 9935 .find('a').on('click', function(event){ 9936 location.href = $(this).attr('href'); 9937 }); 9938 } 9939 if (this.album.length > 1 && this.options.showImageNumberLabel) { 9940 this.$lightbox.find('.lb-number').text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn('fast'); 9941 } else { 9942 this.$lightbox.find('.lb-number').hide(); 9943 } 9944 this.$outerContainer.removeClass('animating'); 9945 this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() { 9946 return self.sizeOverlay(); 9947 }); 9948 }; 9949 Lightbox.prototype.preloadNeighboringImages = function() { 9950 if (this.album.length > this.currentImageIndex + 1) { 9951 var preloadNext = new Image(); 9952 preloadNext.src = this.album[this.currentImageIndex + 1].link; 9953 } 9954 if (this.currentImageIndex > 0) { 9955 var preloadPrev = new Image(); 9956 preloadPrev.src = this.album[this.currentImageIndex - 1].link; 9957 } 9958 }; 9959 Lightbox.prototype.enableKeyboardNav = function() { 9960 $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); 9961 }; 9962 Lightbox.prototype.disableKeyboardNav = function() { 9963 $(document).off('.keyboard'); 9964 }; 9965 Lightbox.prototype.keyboardAction = function(event) { 9966 var KEYCODE_ESC = 27; 9967 var KEYCODE_LEFTARROW = 37; 9968 var KEYCODE_RIGHTARROW = 39; 9969 var keycode = event.keyCode; 9970 var key = String.fromCharCode(keycode).toLowerCase(); 9971 if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) { 9972 this.end(); 9973 } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) { 9974 if (this.currentImageIndex !== 0) { 9975 this.changeImage(this.currentImageIndex - 1); 9976 } else if (this.options.wrapAround && this.album.length > 1) { 9977 this.changeImage(this.album.length - 1); 9978 } 9979 } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) { 9980 if (this.currentImageIndex !== this.album.length - 1) { 9981 this.changeImage(this.currentImageIndex + 1); 9982 } else if (this.options.wrapAround && this.album.length > 1) { 9983 this.changeImage(0); 9984 } 9985 } 9986 }; 9987 Lightbox.prototype.end = function() { 9988 this.disableKeyboardNav(); 9989 $(window).off("resize", this.sizeOverlay); 9990 this.$lightbox.fadeOut(this.options.fadeDuration); 9991 this.$overlay.fadeOut(this.options.fadeDuration); 9992 $('select, object, embed').css({ 9993 visibility: "visible" 9994 }); 9995 }; 9996 return Lightbox; 9997 })(); 9998 $(function() { 9999 var options = new LightboxOptions(); 10000 var lightbox = new Lightbox(options); 10001 }); 10002}).call(this); 10003</script>
10003<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>
10003<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 10003
10003<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 10003-10021
10003<script> 10004(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)}}})); 10005if(typeof(console) === 'undefined') { 10006 var console = {} 10007 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() {}; 10008} 10009if (window.tplogs==true) 10010 try { 10011 console.groupCollapsed("ThemePunch GreenSocks Logs"); 10012 } catch(e) { } 10013var oldgs = window.GreenSockGlobals; 10014 oldgs_queue = window._gsQueue; 10015var punchgs = window.GreenSockGlobals = {}; 10016if (window.tplogs==true) 10017 try { 10018 console.info("Build GreenSock SandBox for ThemePunch Plugins"); 10019 console.info("GreenSock TweenLite Engine Initalised by ThemePunch Plugin"); 10020 } catch(e) {} 10021(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 10021-10022
10021,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"); 10022var _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}
10022,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)}
10022,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 10022-10024
10022,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"); 10023var _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()(); 10024var _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=/(?
10024:\+=|\-=|\-|\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)}
10024,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;
10024if(-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;
10024if(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"
10024in 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 10024-10025
10024p.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); 10025return 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,
10025s._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"); 10026var _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 10026-10046
10026S.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"); 10027try{ 10028 window.GreenSockGlobals = null; 10029 window._gsQueue = null; 10030 window._gsDefine = null; 10031 delete(window.GreenSockGlobals); 10032 delete(window._gsQueue); 10033 delete(window._gsDefine); 10034 } catch(e) {} 10035try{ 10036 window.GreenSockGlobals = oldgs; 10037 window._gsQueue = oldgs_queue; 10038 } catch(e) {} 10039if (window.tplogs==true) 10040 try { 10041 console.groupEnd(); 10042 } catch(e) {} 10043(function(e,t){ 10044 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})})}; 10045})(jQuery) 10046function revslider_showDoubleJqueryError(a){var b="Revolution Slider Error: You have some jquery.js library include that c
10046omes 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")}
10046),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>
10046a(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>
100460){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);
10046d.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(">
10046ul: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>'), 10047"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+'">
10047'),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"));
10047var 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}
10047),(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 10047
10047: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}
10047)},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"),
100471==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
10047arseInt(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)), 10048"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">
10048<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%"}));
10048var 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"),
100480)||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
100485-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{ 10049a(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
10049onthover-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;
10049for(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;
10049case"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();
10049g.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); 10050</script>
10050 10051
10051<script type="text/javascript" src="https://cdn.paraty.es/static_files/secure-booking24/generic/202609301403/i18n/messages_en.js" crossorigin="anonymous"></script>
10051 10052
10052<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>
10052 10053
10053<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>
10053 10054
10054<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>
10054 10055
10055<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>
10055 10056
10056<script>$(function () { 10057 DP_extend_info.config.booking_version = '7'; 10058 DP_extend_info.config.custom_format_day_month = function (dateComponents) { 10059 dateComponents = dateComponents.split("/"); 10060 var month_names = $.datepicker._defaults.monthNames, 10061 html_date = "<div class='day'>%d</div> <div class='month'>%m</div> <div class='year'>%y</div>", 10062 month = (parseInt(dateComponents[1]) - 1); 10063 10064 return html_date.replace("%d", dateComponents[0]).replace("%m", month_names[month]).replace("%y", dateComponents[2]); 10065 }; 10066 });$(window).load(function () { 10067 DP_extend_info.init(); 10068 $("label.dates_selector_label").html("<span>Check-In</span><span>Check-Out</span>"); 10069 });</script>
10069 10070
10070<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>
10070 10071
10071<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>
10071 10072
10072<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>
10072 10073
10073<script async type="text/javascript" type="text/javascript" src="/js/casas/booking_engine_personalize.js?v=1.11"></script>
10073 10074
10074<script async type="text/javascript" type="text/javascript" src="/js/casas/functions.js?v=1.79"></script>
10074 10075
10075<script async type="text/javascript" src="//www.tripadvisor.com/js3/conversion/pixel.js" crossorigin="anonymous" integrity="sha512-SqG9s7MDCO3rsgQClul/Zc+o4IfKK0trb4ozTj2bwIz1jKACSgBThnpH85WWGMviEKs33h60W4XE5WwHllfYMQ=="></script>
10075 10076 10077 <div style="display: none;"> 10078 <div id="data"> 10079 <div id="wrapper_booking_fancybox"> 10080 <div id="booking_widget_popup" class="booking_widget_fancybox"> 10081 10082 10083 10084 10085 10086<div id="motor_reserva"> 10087<!-- booking engine 2 --> 10088 <form action="https://www.hotelcasasnovas.com/booking1" name="searchForm" id="searchForm" method="post" class="paraty-booking-form motor2"> 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 <input type="hidden" id="language" name="language" value="ENGLISH" /> 10100 <input type="hidden" id="agesKid1" name="agesKid1" value="" /> 10101 <input type="hidden" id="agesKid2" name="agesKid2" value="" /> 10102 <input type="hidden" id="agesKid3" name="agesKid3" value="" /> 10103 10104 <input id="roomType" type="hidden" name="roomType" value=""> 10105 <input class="roomTypeValue" type="hidden" name="roomTypeValue" value=""> 10106 10107 <input id="roomFilter" type="hidden" name="roomFilter" value=""> 10108 <input id="roomFilterName" type="hidden" name="roomFilterName" value=""> 10109 10110 <input type="hidden" id="roomtype_list_json" name="roomtype_list_json" value=""> 10111 10112 <input id="boardFilter" type="hidden" name="boardFilter" value=""> 10113 <input id="keyBooking0Source" type="hidden" name="keyBooking0Source" value=""> 10114 10115 10116 10117 <input type="hidden" value="" name="priceSeekerHotel" id="priceSeekerHotel"/> 10118 10119 10120 10121 10122 10123 10124 10125 <!-- EXTRA PARAMS --> 10126 10127 <!-- END EXTRA PARAMS --> 10128 10129 <input type="hidden" id="gclid" name="gclid" value="" /> 10130 10131 <input type="hidden" id="using_booking_0" name="using_booking_0" value="" /> 10132 10133 10134 10135 10136 10137 <input type="hidden" id="namespace" name="namespace" value="casas-novas" /> 10138 10139 <div id="booking_engine_title"> 10140 10141 10142 <h4 id="booking_title1">Book here</h4> 10143 <h4 id="booking_title2">Book now</h4> 10144 <h3 id="best_price">BEST PRICE GUARANTEED</h3> 10145 10146 10147 10148 </div> 10149 10150 10151 10152 10153 10154 <div id="contenedor_hotel"> 10155 10156 10157 10158 10159 10160 10161 10162 10163 </div> 10164 10165 <fieldset id="contenedor_fechas"> 10166 <legend class="sr-only">Dates</legend> 10167 <div id="fecha_entrada" class="colocar_fechas fecha_entrada"> 10168 <label id="titulo_fecha_entrada" class="float_fecha" for="datepicker1">Check-In Date</label> 10169 <input type="text" class="float_fecha classdatepicker1" name="startDate" id="datepicker1" tabindex="4" readonly="readonly" autocomplete="off"/> 10170 </div> 10171 <div id="fecha_salida" class="colocar_fechas fecha_salida"> 10172 <label id="titulo_fecha_salida" class="float_fecha" for="datepicker2">Check-Out Date</label> 10173 <input type="text" class="float_fecha classdatepicker2" name="endDate" id="datepicker2" tabindex="5" readonly="readonly" autocomplete="off"/> 10174 </div> 10175 <div id="contador_noches" class="colocar_fechas"> 10176 <p class="float_fecha">Number of Nights: X</p> 10177 </div> 10178 </fieldset> 10179 10180 10181 <fieldset id="contenedor_habitaciones" > 10182 <legend class="sr-only">Rooms</legend> 10183 <label for="selector_habitaciones"> Rooms </label> 10184 <select id="selector_habitaciones" name="numRooms" onchange="mostrarHabitaciones(this.value);" tabindex="6"> 10185 10186 <option value="1" selected="selected">1</option> 10187 10188 <option value="2" >2</option> 10189 10190 <option value="3" >3</option> 10191 10192 </select> 10193 </fieldset> 10194 <fieldset id="contenedor_opciones" class="contenedor_opciones_babies"> 10195 <legend class="sr-only">Occupancy</legend> 10196 <div id="hab1"> 10197 <label class="numero_habitacion"> Room 1</label> 10198 <div class="adultos numero_personas"> 10199 <label class="selector_adultos" id="titulo_adultos">Adults</label> 10200 <select class="selector_adultos" id="hab1_adultos" name="adultsRoom1" tabindex="7"> 10201 10202 <option value="1" >1</option> 10203 10204 <option value="2" selected="selected">2</option> 10205 10206 <option value="3" >3</option> 10207 10208 <option value="4" >4</option> 10209 10210 <option value="5" >5</option> 10211 10212 <option value="6" >6</option> 10213 10214 <option value="7" >7</option> 10215 10216 <option value="8" >8</option> 10217 10218 </select> 10219 </div> 10220 <div class="ninos numero_personas ninos-con-babies" title="Babies go free"> 10221 <label for="childrenRoom1" id="titulo_ninos" class="selector_ninos">Children</label> 10222 <select id="hab1_ninos" class="selector_ninos" name="childrenRoom1" onchange="" tabindex="8"> 10223 10224 <option value="0" selected="selected" > 10225 10226 0 10227 10228 </option> 10229 10230 <option value="1" > 10231 10232 1 10233 10234 </option> 10235 10236 <option value="2" > 10237 10238 2 10239 10240 </option> 10241 10242 <option value="3" > 10243 10244 3 10245 10246 </option> 10247 10248 <option value="4" > 10249 10250 4 10251 10252 </option> 10253 10254 </select> 10255 <label id="info_ninos" class="selector_ninos"> 10256 10257 10258 (from 4 to 12 years) 10259 10260 10261 </label> 10262 </div> 10263 10264 10265 <div class="numero_personas bebes"> 10266 <label class="selector_bebes">Babies </label> 10267 <select id="hab1_bebes" class="selector_bebes" name="babiesRoom1" onchange="" tabindex="9"> 10268 10269 <option value="0" >0</option> 10270 10271 <option value="1" >1</option> 10272 10273 <option value="2" >2</option> 10274 10275 </select> 10276 </div> 10277 10278 </div> 10279 10280 10281 <div id="hab2"> 10282 <label class="numero_habitacion">Room 2</label> 10283 <div class="adultos numero_personas"> 10284 <select class="selector_adultos" id="hab2_adultos" name="adultsRoom2" tabindex="10"> 10285 10286 <option value="1" >1</option> 10287 10288 <option value="2" selected="selected">2</option> 10289 10290 <option value="3" >3</option> 10291 10292 <option value="4" >4</option> 10293 10294 <option value="5" >5</option> 10295 10296 <option value="6" >6</option> 10297 10298 <option value="7" >7</option> 10299 10300 <option value="8" >8</option> 10301 10302 </select> 10303 </div> 10304 <div class="ninos numero_personas ninos-con-babies" title="Babies go free"> 10305 <select id="hab2_ninos" class="selector_ninos" name="childrenRoom2" onchange="" tabindex="11"> 10306 10307 <option value="0" selected="selected" > 10308 10309 0 10310 10311 </option> 10312 10313 <option value="1" > 10314 10315 1 10316 10317 </option> 10318 10319 <option value="2" > 10320 10321 2 10322 10323 </option> 10324 10325 <option value="3" > 10326 10327 3 10328 10329 </option> 10330 10331 <option value="4" > 10332 10333 4 10334 10335 </option> 10336 10337 </select> 10338 </div> 10339 10340 10341 <div class="numero_personas bebes"> 10342 <select id="hab2_bebes" class="selector_bebes" name="babiesRoom2" onchange="" tabindex="12"> 10343 <option value="0" selected="selected">0</option> 10344 <option value="1">1</option> 10345 <option value="2">2</option> 10346 </select> 10347 </div> 10348 10349 </div> 10350 10351 <div id="hab3"> 10352 <label class="numero_habitacion">Room 3</label> 10353 <div class="adultos numero_personas"> 10354 <select class="selector_adultos" id="hab3_adultos" name="adultsRoom3" tabindex="13"> 10355 10356 <option value="1" >1</option> 10357 10358 <option value="2" selected="selected">2</option> 10359 10360 <option value="3" >3</option> 10361 10362 <option value="4" >4</option> 10363 10364 <option value="5" >5</option> 10365 10366 <option value="6" >6</option> 10367 10368 <option value="7" >7</option> 10369 10370 <option value="8" >8</option> 10371 10372 </select> 10373 </div> 10374 <div class="ninos numero_personas ninos-con-babies" title="Babies go free"> 10375 <select id="hab3_ninos" class="selector_ninos" name="childrenRoom3" onchange="" tabindex="14"> 10376 10377 <option value="0" selected="selected" > 10378 10379 0 10380 10381 </option> 10382 10383 <option value="1" > 10384 10385 1 10386 10387 </option> 10388 10389 <option value="2" > 10390 10391 2 10392 10393 </option> 10394 10395 <option value="3" > 10396 10397 3 10398 10399 </option> 10400 10401 <option value="4" > 10402 10403 4 10404 10405 </option> 10406 10407 </select> 10408 </div> 10409 10410 10411 <div class="numero_personas bebes"> 10412 <select id="hab3_bebes" class="selector_bebes" name="babiesRoom3" onchange="" tabindex="15"> 10413 <option value="0" selected="selected">0</option> 10414 <option value="1">1</option> 10415 <option value="2">2</option> 10416 </select> 10417 </div> 10418 10419 </div> 10420 </fieldset> 10421 10422 <fieldset id="envio"> 10423 <legend class="sr-only">Book here</legend> 10424 10425 <input type="text" id="promocode" class="colocar_envio promocode_input_class" name="promocode" aria-label="Promotional code" 10426 placeholder="Promotional code" 10427 value="" 10428 tabindex="16"> 10429 10430 10431 10432 10433 <button type="submit" onclick="$(this).addClass('clicked_button');return bookingSearchWithAgeSelection2() " id="search-button" class="colocar_envio buttonsearch-ratecheck" tabindex="17">Book here</button> 10434 <div id="envio_spinner"></div> 10435 </fieldset> 10436 10437 10438 10439 <input type="hidden" id="booking-search-popup" name="booking-search-popup" value="true"> 10440 10441
10441<script> 10442 10443 function show_booking_search_popup(myForm) { 10444 if (typeof(sending_form_custom_from_paraty) == 'undefined'){ 10445 sending_form_custom_from_paraty = true; 10446 setTimeout( function(myForm) { openBookingSearchPopup(myForm); }, 1000, myForm ); 10447 } 10448 }; 10449 10450 function openBookingSearchPopup(myForm) { 10451 10452 return openBookingSearchPopup_v2(myForm); 10453 10454 10455 var elements = [ 10456 10457 ] 10458 10459 var popup_description = ""; 10460 if (typeof(custom_popup_loading_description) != 'undefined') { 10461 popup_description = custom_popup_loading_description; 10462 } 10463 10464 10465 10466 showGallery(elements); 10467 10468 10469 myForm.submit(); 10470 10471 } 10472 10473 function openBookingSearchPopup_v2(myForm, show_popup=true) { 10474 10475 if ((window.location !== window.parent.location) && show_popup) { 10476 const parentMessage = { 10477 message: 'resize_iframe', 10478 height: 700, 10479 }; 10480 10481 window.parent.postMessage(parentMessage, '*'); 10482 } 10483 10484 var container_booking_popup = $('<div></div>').addClass('container_popup_booking').css('text-align', 'center'), 10485 loading_popup_top_text = `Updating to continue with your booking`; 10486 10487 10488 var loading_popup_top_text = $("<img src='https://cdn2.paraty.es/casas-novas/images/5cefb938e0d17eb'>"); 10489 10490 10491 if ($('.logo_namespace').length) { 10492 var logo_namespace = $("input[name='namespace']").val(); 10493 var url_logo = $('#logo_' + logo_namespace).val(); 10494 loading_popup_top_text = $("<img src='"+ url_logo +"'>"); 10495 } 10496 10497 let loading_popup_bottom_text = `<div><font color='#030303'> Checking the availability of your search:<br><br> From <strong>@@start_date@@</strong> to <strong>@@end_date@@</strong></font></div>`, 10498 descipription_top_booking_popup = $("<div></div>").addClass('description_top_popup_booking').html(loading_popup_top_text); 10499 10500 const specialLoadingTextElem = $('input[name="special_loading_text"]'); 10501 if(specialLoadingTextElem.length && specialLoadingTextElem.val()){ 10502 loading_popup_bottom_text = specialLoadingTextElem.val(); 10503 } 10504 10505 let descipription_bottom_booking_popup = $("<div></div>").addClass('description_bottom_popup_booking').html(loading_popup_bottom_text), 10506 gif_wrapper = $("<div></div>").addClass('gif_wrapper'), 10507 number_of_lines = 20; 10508 10509 for (var x = 0; x < number_of_lines; x++) { 10510 var target_delay_css = { 10511 '-webkit-animation-delay': -(1.5 - (0.1 * x)) + 's', 10512 '-moz-animation-delay': -(1.5 - (0.1 * x)) + 's', 10513 '-o-animation-delay': -(1.5 - (0.1 * x)) + 's', 10514 'animation-delay': -(1.5 - (0.1 * x)) + 's' 10515 }; 10516 var element_line_to_append = $("<div></div>").addClass("default_line_loading").css(target_delay_css); 10517 10518 element_line_to_append.css('background', '#3E5902'); 10519 10520 10521 element_line_to_append.appendTo(gif_wrapper); 10522 } 10523 10524 10525 container_booking_popup.css('border', '1px solid #3E5902'); 10526 10527 10528 10529 10530 10531 10532 10533 container_booking_popup.append(descipription_top_booking_popup).append(gif_wrapper).append(descipription_bottom_booking_popup); 10534 10535 10536 var selected_start_date = $("input.has_datepicker[name='startDate']").val() || $("input[name='startDate']").val(); 10537 selected_end_date = $("input.has_datepicker[name='endDate']").val() || $("input[name='endDate']").val(); 10538 if(selected_start_date === ''){ 10539 var today = new Date(); 10540 var dd = today.getDate(); 10541 var mm = today.getMonth()+1; //January is 0! 10542 var yyyy = today.getFullYear(); 10543 if(dd<10) {dd = '0'+dd} 10544 if(mm<10) {mm = '0'+mm} 10545 today = dd + '/' + mm + '/' + yyyy; 10546 selected_start_date = today; 10547 } 10548 10549 var custom_format_date = ""; 10550 if (custom_format_date) { 10551 10552 var splitted_start_date = selected_start_date.split("/"), 10553 start_day = splitted_start_date[0], 10554 start_month = splitted_start_date[1], 10555 start_year = splitted_start_date[2], 10556 start_datetime = new Date(start_year, start_month - 1, start_day), 10557 week_start_day = start_datetime.getDay(); 10558 10559 var splitted_end_date = selected_end_date.split("/"), 10560 end_day = splitted_end_date[0], 10561 end_month = splitted_end_date[1], 10562 end_year = splitted_end_date[2], 10563 end_datetime = new Date(end_year, end_month - 1, end_day), 10564 week_end_day = end_datetime.getDay(); 10565 10566 var days_list = $.datepicker._defaults.dayNames; 10567 10568 //Start date 10569 selected_start_date = custom_format_date.replace("%m", start_month).replace("%d", start_day).replace("%Y", start_year); 10570 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]); 10571 10572 //End date 10573 selected_end_date = custom_format_date.replace("%m", end_month).replace("%d", end_day).replace("%Y", end_year); 10574 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]); 10575 } 10576 10577 //Protection for failures 10578 if(selected_start_date.indexOf('NaN') > -1 || selected_end_date.indexOf('NaN')){ 10579 container_booking_popup.html(container_booking_popup.html().replace("@@start_date@@", selected_start_date).replace("@@end_date@@", selected_end_date)); 10580 } else { 10581 container_booking_popup.find(".description_bottom_popup_booking").remove(); 10582 } 10583 if (show_popup) { 10584 var fancybox_params = { 10585 width: 'auto', 10586 maxWidth: 800, 10587 height: 'auto', 10588 fitToView: false, 10589 autoSize: false, 10590 padding: 0, 10591 closeClick: false, 10592 closeBtn: false, 10593 helpers: { 10594 overlay: { 10595 css: 10596 {'background': '#FFFFFF'}, 10597 closeClick: false 10598 } // prevents closing when clicking OUTSIDE fancybox 10599 }, 10600 wrapCSS: 'fancy-booking-search_v2 full_screen_engine custom_color_overlay', 10601 beforeShow: function () { 10602 $('.fancybox-bg').css('background', '#FFFFFF');
10603 if (typeof (cookiesController) !== 'undefined' && cookiesController.search_cookie("step_history_back")) { 10604 cookiesController.delete_cookie("step_history_back"); 10605 } 10606 } 10607 }; 10608 if ($.fancybox.version.slice(0, 2) === '3.') { 10609 fancybox_params['baseClass'] = 'fancybox-wrap fancy-booking-search_v2 full_screen_engine custom_color_overlay'; 10610 fancybox_params['modal'] = true; 10611 $.fancybox.open(container_booking_popup, fancybox_params); 10612 } else { 10613 $.fancybox(container_booking_popup, fancybox_params); 10614 } 10615 if (myForm) { 10616 if (!navigator.userAgent.match(/chrome/i) && (navigator.userAgent.match(/safari/i) || !navigator.userAgent.match(/firefox/i))) { 10617 setTimeout(function () { 10618 myForm.submit(); 10619 }, 700); 10620 } else { 10621 myForm.submit(); 10622 } 10623 } 10624 } 10625 } 10626 10627 10628 10629 10630 function showGallery(elements) { 10631 $.fancybox(elements, { 10632 'modal': true, 10633 'closeBtn': false, 10634 'autoPlay': true, 10635 'playSpeed': 3000, 10636 'prevEffect': 'none', 10637 'nextEffect': 'none', 10638 'type': 'image', 10639 'arrows': false, 10640 'nextClick': false, 10641 'mouseWheel': false, 10642 'helpers': { 10643 title: { 10644 type: 'outside' 10645 }, 10646 overlay: { 10647 opacity: 0.8, 10648 css: { 10649 'background-color': '#000' 10650 } 10651 } 10652 }, 10653 'padding': 0 10654 }); 10655 } 10656 10657 </script>
10657 10658 10659 10660 10661 </form> 10662 10663 10664 10665 </div> 10666 10667 10668 <!-- Javascript at the bottom to increase speed --> 10669 10670 10671
10672<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>
10672 10673 10674 10675<!-- Javascript at the bottom to increase speed --> 10676 10677 10678<style> 10679.ui-dialog { 10680 position: absolute; 10681 top: 0; 10682 left: 0; 10683 padding: .2em; 10684 outline: 0; 10685} 10686.ui-dialog .ui-dialog-titlebar { 10687 padding: .4em 1em; 10688 position: relative; 10689} 10690.ui-dialog .ui-dialog-title { 10691 float: left; 10692 margin: .1em 0; 10693 white-space: nowrap; 10694 width: 90%; 10695 overflow: hidden; 10696 text-overflow: ellipsis; 10697} 10698.ui-dialog .ui-dialog-titlebar-close { 10699 position: absolute; 10700 right: .3em; 10701 top: 50%; 10702 width: 21px; 10703 margin: -10px 0 0 0; 10704 padding: 1px; 10705 height: 20px; 10706} 10707.ui-dialog .ui-dialog-content { 10708 position: relative; 10709 border: 0; 10710 padding: .5em 1em; 10711 background: none; 10712 overflow: auto; 10713 text-align: center; 10714} 10715.ui-dialog .ui-dialog-buttonpane { 10716 text-align: left; 10717 border-width: 1px 0 0 0; 10718 background-image: none; 10719 margin-top: .5em; 10720 padding: .3em 1em .5em .4em; 10721} 10722.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 10723 /*float: right;*/ 10724 float: none; 10725 text-align: center; 10726} 10727.ui-dialog .ui-dialog-buttonpane button { 10728 margin: .5em .4em .5em 0; 10729 cursor: pointer; 10730} 10731.ui-dialog .ui-resizable-se { 10732 width: 12px; 10733 height: 12px; 10734 right: -5px; 10735 bottom: -5px; 10736 background-position: 16px 16px; 10737} 10738.ui-dialog .ui-button-text { 10739 /*padding: 10px;*/ 10740 /*margin: 10px;*/ 10741} 10742 10743.ui-dialog .ui-button{ 10744 /*height: 30px;*/ 10745} 10746 10747.ui-draggable .ui-dialog-titlebar { 10748 cursor: move; 10749} 10750 10751.ui-dialog { 10752 min-width: 300px; 10753 z-index: 9999; 10754} 10755 10756</style> 10757 10758 <style> 10759 .ui-dialog-titlebar-close { 10760 display: none !important; 10761 } 10762 10763 #dialog-form{ 10764 padding: 10px; 10765 } 10766 10767 .ui-dialog-titlebar{ 10768 padding: 5px; 10769 } 10770 10771 .kidAgesSelect{ 10772 margin-left: 10px; 10773 10774 } 10775 10776 10777</style> 10778 10779<!-- New style Age popup --> 10780<style> 10781body .ui-widget-overlay.ui-front { 10782 background: rgba(0, 0, 0, 0.6); 10783 opacity: 1; 10784 z-index: 9998; 10785 position: fixed; 10786} 10787body .ui-dialog.ui-widget { 10788 padding: 20px 10px; 10789 border: 0; 10790 border-radius: 0; 10791 line-height: 1; 10792 max-width: 370px; 10793 width: 100% !important; 10794 box-sizing: border-box; 10795} 10796body .ui-dialog.ui-widget .ui-dialog-titlebar { 10797 background: none!important; 10798 padding: 0 0 20px 0; 10799 border-radius: 0; 10800 border: 0; 10801 color: black!important; 10802 border-bottom: 1px solid rgba(0, 0, 0, 0.2); 10803 text-align: center; 10804 margin-bottom: 20px; 10805} 10806body .ui-dialog.ui-widget .ui-dialog-titlebar .ui-dialog-title { 10807 width: 100%; 10808 margin: 0; 10809} 10810body .ui-dialog.ui-widget #dialog-form { 10811 padding: 0; 10812 text-align: left; 10813 width: 100% !important; 10814 max-width: 350px; 10815} 10816body .ui-dialog.ui-widget #dialog-form form label { 10817 clear: both; 10818 width: 100%; 10819 float: left; 10820} 10821body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids { 10822 display: inline-block; 10823 width: 100%; 10824 float: left; 10825} 10826body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select { 10827 width: calc((100% - 10px)/2); 10828 margin: 0px 10px 10px 0; 10829 float: left; 10830 -webkit-appearance: none; 10831 -moz-appearance: none; 10832 appearance: none; 10833 border-radius: 0; 10834 padding: 5px 10px; 10835} 10836body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(even) { 10837 margin-right: 0; 10838} 10839body .ui-dialog.ui-widget #dialog-form form .wrapper_age_kids select:nth-child(-n+2) { 10840 margin-top: 10px; 10841} 10842body .ui-dialog.ui-widget .ui-dialog-buttonpane { 10843 margin: 0; 10844 padding: 0; 10845 vertical-align: bottom; 10846 display: inline-block; 10847 float: left; 10848 width: 100% !important; 10849 max-width: 350px; 10850 border-radius: 0; 10851 margin-top: 10px; 10852} 10853body .ui-dialog.ui-widget .ui-dialog-buttonpane .ui-button { 10854 margin: 0; 10855 display: inline-block; 10856 width: 100% !important; 10857 max-width: 350px; 10858 border-radius: 0; 10859 background: #446ca9; 10860 color:white; 10861} 10862body .ui-dialog.ui-widget .ui-resizable-handle { 10863 display: none; 10864} 10865</style> 10866<!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" type="text/css"/> --> 10867 <div id="dialog-form" title="Children's ages" style="display:none"> 10868 <form> 10869 10870 <label id="label1" for="name">Room 1</label> 10871 <div class="wrapper_age_kids clearfix"> 10872 10873 10874 10875 <select class="kidAgesSelect" id="agesRoom1_1" name="name" tabindex="1"> 10876 10877 <option value="4" selected="selected">4</option> 10878 10879 <option value="5" >5</option> 10880 10881 <option value="6" >6</option> 10882 10883 <option value="7" >7</option> 10884 10885 <option value="8" >8</option> 10886 10887 <option value="9" >9</option> 10888 10889 <option value="10" >10</option> 10890 10891 <option value="11" >11</option> 10892 10893 <option value="12" >12</option> 10894 10895 </select> 10896 10897 10898 10899 <select class="kidAgesSelect" id="agesRoom1_2" name="name" tabindex="1"> 10900 10901 <option value="4" selected="selected">4</option> 10902 10903 <option value="5" >5</option> 10904 10905 <option value="6" >6</option> 10906 10907 <option value="7" >7</option> 10908 10909 <option value="8" >8</option> 10910 10911 <option value="9" >9</option> 10912 10913 <option value="10" >10</option> 10914 10915 <option value="11" >11</option> 10916 10917 <option value="12" >12</option> 10918 10919 </select> 10920 10921 10922 10923 <select class="kidAgesSelect" id="agesRoom1_3" name="name" tabindex="1"> 10924 10925 <option value="4" selected="selected">4</option> 10926 10927 <option value="5" >5</option> 10928 10929 <option value="6" >6</option> 10930 10931 <option value="7" >7</option> 10932 10933 <option value="8" >8</option> 10934 10935 <option value="9" >9</option> 10936 10937 <option value="10" >10</option> 10938 10939 <option value="11" >11</option> 10940 10941 <option value="12" >12</option> 10942 10943 </select> 10944 10945 10946 10947 <select class="kidAgesSelect" id="agesRoom1_4" name="name" tabindex="1"> 10948 10949 <option value="4" selected="selected">4</option> 10950 10951 <option value="5" >5</option> 10952 10953 <option value="6" >6</option> 10954 10955 <option value="7" >7</option> 10956 10957 <option value="8" >8</option> 10958 10959 <option value="9" >9</option> 10960 10961 <option value="10" >10</option> 10962 10963 <option value="11" >11</option> 10964 10965 <option value="12" >12</option> 10966 10967 </select> 10968 10969 10970 10971 </div> 10972 10973 10974 <label id="label2" for="name">Room 2</label> 10975 <div class="wrapper_age_kids clearfix"> 10976 10977 10978 10979 <select class="kidAgesSelect" id="agesRoom2_1" name="name" tabindex="1"> 10980 10981 <option value="4" selected="selected">4</option> 10982 10983 <option value="5" >5</option> 10984 10985 <option value="6" >6</option> 10986 10987 <option value="7" >7</option> 10988 10989 <option value="8" >8</option> 10990 10991 <option value="9" >9</option> 10992 10993 <option value="10" >10</option> 10994 10995 <option value="11" >11</option> 10996 10997 <option value="12" >12</option> 10998 10999 </select> 11000 11001 11002 11003 <select class="kidAgesSelect" id="agesRoom2_2" name="name" tabindex="1"> 11004 11005 <option value="4" selected="selected">4</option> 11006 11007 <option value="5" >5</option> 11008 11009 <option value="6" >6</option> 11010 11011 <option value="7" >7</option> 11012 11013 <option value="8" >8</option> 11014 11015 <option value="9" >9</option> 11016 11017 <option value="10" >10</option> 11018 11019 <option value="11" >11</option> 11020 11021 <option value="12" >12</option> 11022 11023 </select> 11024 11025 11026 11027 <select class="kidAgesSelect" id="agesRoom2_3" name="name" tabindex="1"> 11028 11029 <option value="4" selected="selected">4</option> 11030 11031 <option value="5" >5</option> 11032 11033 <option value="6" >6</option> 11034 11035 <option value="7" >7</option> 11036 11037 <option value="8" >8</option> 11038 11039 <option value="9" >9</option> 11040 11041 <option value="10" >10</option> 11042 11043 <option value="11" >11</option> 11044 11045 <option value="12" >12</option> 11046 11047 </select> 11048 11049 11050 11051 <select class="kidAgesSelect" id="agesRoom2_4" name="name" tabindex="1"> 11052 11053 <option value="4" selected="selected">4</option> 11054 11055 <option value="5" >5</option> 11056 11057 <option value="6" >6</option> 11058 11059 <option value="7" >7</option> 11060 11061 <option value="8" >8</option> 11062 11063 <option value="9" >9</option> 11064 11065 <option value="10" >10</option> 11066 11067 <option value="11" >11</option> 11068 11069 <option value="12" >12</option> 11070 11071 </select> 11072 11073 11074 11075 </div> 11076 11077 11078 <label id="label3" for="name">Room 3</label> 11079 <div class="wrapper_age_kids clearfix"> 11080 11081 11082 11083 <select class="kidAgesSelect" id="agesRoom3_1" name="name" tabindex="1"> 11084 11085 <option value="4" selected="selected">4</option> 11086 11087 <option value="5" >5</option> 11088 11089 <option value="6" >6</option> 11090 11091 <option value="7" >7</option> 11092 11093 <option value="8" >8</option> 11094 11095 <option value="9" >9</option> 11096 11097 <option value="10" >10</option> 11098 11099 <option value="11" >11</option> 11100 11101 <option value="12" >12</option> 11102 11103 </select> 11104 11105 11106 11107 <select class="kidAgesSelect" id="agesRoom3_2" name="name" tabindex="1"> 11108 11109 <option value="4" selected="selected">4</option> 11110 11111 <option value="5" >5</option> 11112 11113 <option value="6" >6</option> 11114 11115 <option value="7" >7</option> 11116 11117 <option value="8" >8</option> 11118 11119 <option value="9" >9</option> 11120 11121 <option value="10" >10</option> 11122 11123 <option value="11" >11</option> 11124 11125 <option value="12" >12</option> 11126 11127 </select> 11128 11129 11130 11131 <select class="kidAgesSelect" id="agesRoom3_3" name="name" tabindex="1"> 11132 11133 <option value="4" selected="selected">4</option> 11134 11135 <option value="5" >5</option> 11136 11137 <option value="6" >6</option> 11138 11139 <option value="7" >7</option> 11140 11141 <option value="8" >8</option> 11142 11143 <option value="9" >9</option> 11144 11145 <option value="10" >10</option> 11146 11147 <option value="11" >11</option> 11148 11149 <option value="12" >12</option> 11150 11151 </select> 11152 11153 11154 11155 <select class="kidAgesSelect" id="agesRoom3_4" name="name" tabindex="1"> 11156 11157 <option value="4" selected="selected">4</option> 11158 11159 <option value="5" >5</option> 11160 11161 <option value="6" >6</option> 11162 11163 <option value="7" >7</option> 11164 11165 <option value="8" >8</option> 11166 11167 <option value="9" >9</option> 11168 11169 <option value="10" >10</option> 11170 11171 <option value="11" >11</option> 11172 11173 <option value="12" >12</option> 11174 11175 </select> 11176 11177 11178 11179 </div> 11180 11181 11182 </form> 11183</div> 11184
11185<script type="text/javascript"> 11186 11187 function sendActiveForm_booking_engine2() { 11188 11189 $(".booking_form").each(function () { 11190 if ($(this).find(".submit_button").css("display") == "none" || $(this).find(".submit_button").hasClass('clicked_button')) { 11191 if ($('#booking-search-popup').length) { 11192 show_booking_search_popup($(this)); 11193 return false; 11194 } 11195 11196 $(this).submit(); 11197 return true; 11198 } 11199 }); 11200 11201 $("#searchForm").each(function () { 11202 if ($(this).find("#search-button").css("display") == "none") { 11203 if ($('#booking-search-popup').length) { 11204 show_booking_search_popup($(this)); 11205 return false; 11206 } 11207 11208 $(this).submit(); 11209 return true; 11210 } 11211 }); 11212 11213 11214 } 11215 11216function bookingSearchWithAgeSelection2(){ 11217 if (!checkDates()){ 11218 return false; 11219 }; 11220 11221 kids1 = $('#hab1_ninos').val(); 11222 kids2 = $('#hab2_ninos').val(); 11223 kids3 = $('#hab3_ninos').val(); 11224 numRooms = $("input[name='numRooms']").val(); 11225 11226 if (kids1 == "0" && (kids2 == "0" || numRooms == '1') && (kids3 == "0" || numRooms == '1' || numRooms == '2')){ 11227 if (bookingSearch()){ 11228 11229 $('#searchForm').submit(); 11230 } 11231 } else { 11232 updateAgesOptions2(); 11233 $("#dialog-form").dialog("open"); 11234 return false; 11235 } 11236} 11237 11238function updateAgesOptions2() { 11239 11240 var numHab = $("#selector_habitaciones").val(); 11241 11242 for ( var i = 3; i > 0; i--) { 11243 11244 $("#label" + i).hide(); 11245 $("#dialog-form #agesRoom" + i + "_1, #full_wrapper_booking #agesRoom" + i +"_1").hide(); 11246 $("#dialog-form #agesRoom" + i + "_2, #full_wrapper_booking #agesRoom" + i +"_2").hide(); 11247 $("#dialog-form #agesRoom" + i + "_3, #full_wrapper_booking #agesRoom" + i +"_3").hide(); 11248 $("#dialog-form #agesRoom" + i + "_4, #full_wrapper_booking #agesRoom" + i +"_4").hide(); 11249 } 11250 for ( var i = numHab; i > 0; i--) { 11251 numKids = $("#hab" + i + "_ninos").val(); 11252 if (numKids > 0){ 11253 $("#label" + i).show(); 11254 11255 $("#dialog-form #agesRoom" + i + "_1, #full_wrapper_booking #agesRoom" + i +"_1").show(); 11256 if (numKids > 1) 11257 $("#dialog-form #agesRoom" + i + "_2, #full_wrapper_booking #agesRoom" + i +"_2").show(); 11258 if (numKids > 2) 11259 $("#dialog-form #agesRoom" + i + "_3, #full_wrapper_booking #agesRoom" + i +"_3").show(); 11260 if (numKids > 3) 11261 $("#dialog-form #agesRoom" + i + "_4, #full_wrapper_booking #agesRoom" + i +"_4").show(); 11262 } 11263 } 11264} 11265 11266$(function() { 11267 if (!$("#dialog-form").hasClass('ui-dialog-content')) { 11268 $("#dialog-form").dialog({ 11269 width: "auto", 11270 autoOpen: false, 11271 11272 modal: true, 11273 buttons: { 11274 "Next": function() { 11275 $( this ).dialog( "close" ); 11276 var dialog_wrapper = $(this); 11277 11278 $("input[name='agesKid1']").each(function() { 11279 var age_1_1 = dialog_wrapper.find("#agesRoom1_1").val(); 11280 var age_1_2 = dialog_wrapper.find("#agesRoom1_2").val(); 11281 var age_1_3 = dialog_wrapper.find("#agesRoom1_3").val(); 11282 var age_1_4 = dialog_wrapper.find("#agesRoom1_4").val(); 11283 $(this).val(age_1_1 + ";" + age_1_2 + ";" + age_1_3 + ";" + age_1_4); 11284 }); 11285 $("input[name='agesKid2']").each(function () { 11286 var age_2_1 = dialog_wrapper.find("#agesRoom2_1").val(); 11287 var age_2_2 = dialog_wrapper.find("#agesRoom2_2").val(); 11288 var age_2_3 = dialog_wrapper.find("#agesRoom2_3").val(); 11289 var age_2_4 = dialog_wrapper.find("#agesRoom2_4").val(); 11290 $(this).val(age_2_1 + ";" + age_2_2 + ";" + age_2_3 + ";" + age_2_4); 11291 }); 11292 $("input[name='agesKid3']").each(function () { 11293 var age_3_1 = dialog_wrapper.find("#agesRoom3_1").val(); 11294 var age_3_2 = dialog_wrapper.find("#agesRoom3_2").val(); 11295 var age_3_3 = dialog_wrapper.find("#agesRoom3_3").val(); 11296 var age_3_4 = dialog_wrapper.find("#agesRoom3_4").val(); 11297 $(this).val(age_3_1 + ";" + age_3_2 + ";" + age_3_3 + ";" + age_3_4); 11298 }); 11299 11300 bookingSearch(); 11301 sendActiveForm_booking_engine2(); 11302 } 11303 } 11304 }); 11305 } 11306 11307 updateAgesOptions2(1); 11308}); 11309</script>
11309 11310 11311
11312<script type="text/javascript"> 11313 11314 11315 11316 var datePicker1Selector = ".classdatepicker1"; 11317 var datePicker2Selector = ".classdatepicker2"; 11318 11319 11320 11321 11322$("#hotel_destino").change(function() { 11323 var action = $(this).val(); 11324 $("#searchForm").attr("action", action); 11325 var newNamespace = namespaces[action]; 11326 $("#namespace").val(newNamespace); 11327 11328 }); 11329 11330 11331 11332 11333 11334 11335 11336 11337if (typeof $.datepicker !== "undefined"){ 11338 $.datepicker.regional['en'] = { 11339 closeText: 'Done', 11340 prevText: 'Prev', 11341 nextText: 'Next', 11342 currentText: 'Today', 11343 monthNames: ['January','February','March','April','May','June', 11344 'July','August','September','October','November','December'], 11345 monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 11346 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 11347 dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 11348 dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 11349 dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], 11350 weekHeader: 'Wk', 11351 dateFormat: 'dd/mm/yy', 11352 firstDay: 1, 11353 isRTL: false, 11354 showMonthAfterYear: false, 11355 yearSuffix: ''}; 11356 $.datepicker.setDefaults($.datepicker.regional['en-GB']); 11357} 11358 11359 11360 11361$(function(){ 11362 $.datepicker.setDefaults($.datepicker.regional["en"]); 11363}); 11364 11365var checkDates = function() { 11366 11367 11368 var date1_str = $(datePicker1Selector).val(); 11369 var date2_str = $(datePicker2Selector).val(); 11370 11371 if (date1_str == "" || date2_str == ""){ 11372 return false; 11373 } else { 11374 return true; 11375 } 11376} 11377 11378$(document).ready(function () { 11379 11380 if ($('#internalStartDate').length != 0) { 11381 var startDate = $('#internalStartDate').val(); 11382 var startYear = startDate.substring(0,4); 11383 var startMonth = startDate.substring(5,7); 11384 var startDay = startDate.substring(8,10); 11385 var startParse = startDay + "/" + startMonth + "/" + startYear; 11386 var endDate = $('#internalEndDate').val(); 11387 var endYear = endDate.substring(0,4); 11388 var endMonth = endDate.substring(5,7); 11389 var endDay = endDate.substring(8,10); 11390 var endParse = endDay + "/" + endMonth + "/" + endYear; 11391 } else { 11392 var startParse = ""; 11393 var endParse = ""; 11394 } 11395 11396 $(datePicker1Selector).val(startParse); 11397 $(datePicker2Selector).val(endParse); 11398 11399 if ($(".internalUrlParamsTransfer").length){ 11400 11401 let target_value = $(".internalUrlParamsTransfer").val(); 11402 if (!$(".transfer_to_booking").length) { 11403 $(".paraty-booking-form").each(function(){ 11404 $(this).append($("<input type='hidden' class='transfer_to_booking' name='transfer_url_params' value='" + target_value + "'>")); 11405 }) 11406 } else { 11407 $(".transfer_to_booking").val(target_value) 11408 } 11409 } 11410 11411 if ($('#internalNumRooms').length != 0){ 11412 11413 $("#selector_habitaciones").val($("#internalNumRooms").val()); 11414 $("#selector_habitaciones").change(); 11415 11416 var internalNum1AdultsRooms = 2; 11417 var internalNum2AdultsRooms = 2; 11418 var internalNum3AdultsRooms = 2; 11419 11420 var internalNum1BabiesRooms = 0; 11421 var internalNum2BabiesRooms = 0; 11422 var internalNum3BabiesRooms = 0; 11423 11424 if ($('#internalNum1AdultsRooms').length != 0) internalNum1AdultsRooms = $("#internalNum1AdultsRooms").val() 11425 if ($('#internalNum2AdultsRooms').length != 0) internalNum2AdultsRooms = $("#internalNum2AdultsRooms").val() 11426 if ($('#internalNum3AdultsRooms').length != 0) internalNum3AdultsRooms = $("#internalNum3AdultsRooms").val() 11427 11428 11429 if ($('#internalNum1BabiesRooms').length != 0) internalNum1BabiesRooms = $("#internalNum1BabiesRooms").val() 11430 if ($('#internalNum2BabiesRooms').length != 0) internalNum2BabiesRooms = $("#internalNum2BabiesRooms").val() 11431 if ($('#internalNum3BabiesRooms').length != 0) internalNum3BabiesRooms = $("#internalNum3BabiesRooms").val() 11432 11433 11434 $("#hab1_adultos").val(internalNum1AdultsRooms); 11435 $("#hab2_adultos").val(internalNum2AdultsRooms); 11436 $("#hab3_adultos").val(internalNum3AdultsRooms); 11437 $("#hab1_ninos").val($("#internalNum1KidsRooms").val()); 11438 $("#hab2_ninos").val($("#internalNum2KidsRooms").val()); 11439 $("#hab3_ninos").val($("#internalNum3KidsRooms").val()); 11440 $("#hab1_bebes").val(internalNum1BabiesRooms); 11441 $("#hab2_bebes").val(internalNum2BabiesRooms); 11442 $("#hab3_bebes").val(internalNum3BabiesRooms); 11443 11444 11445 11446 11447 } 11448 11449 11450if ($("#internalPromocode") && $("#internalPromocode").val()){ 11451 11452 $("#promocode").val($("#internalPromocode").val()); 11453} 11454 11455 11456 11457 11458 if (typeof(DP_extend_info) === 'undefined' || !DP_extend_info.config.initialized || DP_extend_info.config.start_datepicker_input !== datePicker1Selector) { 11459 $(datePicker1Selector).datepicker({ 11460 11461 11462 minDate: new Date(), 11463 altFormat: "dd/mm/yy", 11464 dateFormat: "dd/mm/yy", 11465 11466 onClose: function (selectedDate, inst) { 11467 if (selectedDate) { 11468 var theDate = $.datepicker.parseDate("dd/mm/yy", selectedDate); 11469 11470 var theSelectedDate = $.datepicker.parseDate("dd/mm/yy", selectedDate); 11471 theSelectedDate.setDate(theSelectedDate.getDate()); 11472 $(datePicker1Selector).datepicker('setDate', theSelectedDate); 11473 11474 if (typeof(min_stay_number) != 'undefined'){ 11475 theDate.setDate(theDate.getDate() + min_stay_number); 11476 } else { 11477 theDate.setDate(theDate.getDate() + 1); 11478 } 11479 $(datePicker2Selector).datepicker("option", "minDate", theDate); 11480 $(datePicker2Selector).datepicker('setDate', theDate); 11481 $(this).closest("#contenedor_fechas").find(datePicker2Selector).datepicker("show"); 11482 } 11483 } 11484 }); 11485 11486 11487 $(datePicker2Selector).datepicker({ 11488 11489 11490 minDate: minDateDeparture(), 11491 altFormat: "dd/mm/yy", 11492 dateFormat: "dd/mm/yy" 11493 }); 11494 11495 11496 $(datePicker1Selector).change(function () { 11497 var date2 = $(this).datepicker('getDate', '+3d'); 11498 $(datePicker1Selector).datepicker('setDate', date2); 11499 date2.setDate(date2.getDate() + 1); 11500 $(datePicker2Selector).datepicker('setDate', date2); 11501 checkDates(); 11502 }); 11503 11504 $(datePicker2Selector).change(function () { 11505 var date2 = $(this).datepicker('getDate', '+3d'); 11506 $(datePicker2Selector).datepicker('setDate', date2); 11507 checkDates(); 11508 }); 11509 11510 $(datePicker1Selector).removeAttr('disabled'); 11511 $(datePicker2Selector).removeAttr('disabled'); 11512 } 11513 11514 11515 11516 11517}); 11518 11519 11520 11521 11522function minDateDeparture(){ 11523 11524 if ($(datePicker1Selector).val()){ 11525 var theDate = $.datepicker.parseDate("dd/mm/yy", $(datePicker1Selector).val()); 11526 theDate.setDate(theDate.getDate() + 1 ); 11527 } 11528 else{ 11529 var theDate = new Date(); 11530 } 11531 11532 return theDate; 11533 11534} 11535 11536function mostrarHabitaciones(selector_habitaciones) { 11537 11538 11539 11540 for ( var i = 3; i > selector_habitaciones; i--) { 11541 11542 //$('#hab' + i).hide(); 11543 $('[id="hab'+ i + '"]').each(function() { 11544 $(this).hide(); 11545 }); 11546
11547 //$('#childrenRoom' + (i + 1)).val("0"); 11548 $('[id="childrenRoom'+ (i + 1) + '"]').each(function() { 11549 $(this).val("0"); 11550 }); 11551 } 11552 for ( var i = selector_habitaciones; i > 0; i--) { 11553 //$('#hab' + i).show(); 11554 11555 $('[id="hab'+ i + '"]').each(function() { 11556 $(this).show(); 11557 11558 }); 11559 } 11560} 11561 11562function bookingSearch(){ 11563 11564 if (!checkDates()){ 11565 return false; 11566 } 11567 11568 var destination_input = $("form.paraty-booking-form.motor2").find(".destination"); 11569 if(destination_input.length && destination_input.val() == ''){ 11570 $("form.paraty-booking-form .destination_field, form.paraty-booking-form.motor2 .destination_wrapper").show(); 11571 return false; 11572 } 11573 11574 try { 11575 ga(function (tracker) { 11576 client_id = tracker.get('clientId'); 11577 }); 11578 $('<input>').attr({ 11579 type: 'hidden', 11580 id: '_ga', 11581 name: '_ga', 11582 value: client_id 11583 }).appendTo($("#search-button").closest('form')); 11584 } 11585 catch (err) { 11586 console.log("Google Analytics defined incorrectly (May use a old version)"); 11587 } 11588 11589 var opts = { 11590 lines: 13, // The number of lines to draw 11591 length: 4, // The length of each line 11592 width: 3, // The line thickness 11593 radius: 10, // The radius of the inner circle 11594 rotate: 0, // The rotation offset 11595 color: '#e1e1e1', // #rgb or #rrggbb 11596 speed: 1.5, // Rounds per second 11597 trail: 60, // Afterglow percentage 11598 shadow: false, // Whether to render a shadow 11599 hwaccel: false, // Whether to use hardware acceleration 11600 className: 'spinner', // The CSS class to assign to the spinner 11601 zIndex: 2e9, // The z-index (defaults to 2000000000) 11602 top: 'auto', // Top position relative to parent in px 11603 left: 'auto' // Left position relative to parent in px 11604 }; 11605 11606 11607 var target = document.getElementById('envio_spinner'); 11608 11609 if( $('#booking-search-popup').length ) { 11610 show_booking_search_popup($('#searchForm')); 11611 return false; 11612 11613 } else { 11614 $("#search-button").hide(); 11615 var spinner = new Spinner(opts).spin(target); 11616 $('#searchForm').submit(); 11617 } 11618}; 11619 11620</script>
11620 11621 11622
11623<script> 11624 adult_tag = "Adult"; 11625 adults_tag = "Adults"; 11626 kid_tag = "Child"; 11627 kids_tag = "Children"; 11628 baby_tag = "Baby"; 11629 babies_tag = "Babies"; 11630 no_dispo_text = "Unavailable"; 11631</script>
11631 11632 11633 11634 11635 11636
11637<script async> 11638 ($ => { 11639 if (typeof window.only_once_rescueseeker == "undefined") { 11640 // Reserve synchronously so a concurrent re-injection does not fire a second load. 11641 window.only_once_rescueseeker = 1; 11642 $.getScript("https://rescueseeker-default-697653561069.europe-west1.run.app/static/rescue-seeker/common/js/rescue-seeker-widget.js?v=2") 11643 .done(function (script, textStatus) { 11644 if (typeof RescueSeeker === 'undefined') { 11645 console.error("RESCUE SEEKER: script loaded but global missing"); 11646 window.only_once_rescueseeker = undefined; // release so a later load can retry 11647 return; 11648 } 11649 console.log("RESCUE SEEKER: Main rescue seeker script loaded!"); 11650 11651 11652 RescueSeeker.config.email_controller = 'hotel-webs'; 11653 11654 RescueSeeker.load('casas-novas', 'en', 'paraty'); 11655 }) 11656 .fail(function (jqxhr, settings, exception) { 11657 window.only_once_rescueseeker = undefined; // release on failure so a later load can retry 11658 console.error("RESCUE SEEKER: Main rescue seeker script NOT loaded!"); 11659 console.error(exception); 11660 }); 11661 } 11662 })(jQuery); 11663</script>
11663 11664 11665 11666 11667 11668 11669 11670</div> 11671 </div> 11672 </div> 11673 </div> 11674 11675<style> 11676 .automatic_floating_picture { 11677 position: fixed; 11678 bottom: 32px; 11679 left: 32px; 11680 z-index: 1000; 11681 transition: .3s all; 11682 } 11683 11684 11685 .automatic_floating_picture.hide_picture{ 11686 opacity: 0; 11687 left: -100%; 11688 } 11689 11690 11691 .automatic_floating_picture .right { 11692 position: fixed; 11693 bottom: 32px; 11694 right: 32px; 11695 z-index: 1000; 11696 } 11697 11698 11699 .automatic_floating_picture img { 11700 width: 100%; 11701 height: 100%; 11702 } 11703 11704 11705</style> 11706 11707<div class="automatic_floating_picture "> 11708 11709</div> 11710 11711 11712 11713 11714
11715<script> 11716 $(document).on('popupSeekerReady', function () { 11717 const sid = new URL(window.location.href).searchParams.get('sid'); 11718 const sidParam = sid ? `&sid=${encodeURIComponent(sid)}` : ''; 11719 $.post(`/utils?action=get_last_search&namespace=casas-novas${sidParam}`) 11720 .done(function (data) { 11721 if (data.event_name && data.event_data) { 11722 $(document).trigger(data.event_name, data.event_data); 11723 } 11724 }) 11725 .fail(function (jqxhr, settings, exception) { 11726 console.error("LAST SEARCH: get_last_search request failed!"); 11727 console.error(exception); 11728 }); 11729 }); 11730 11731 $(document).on('last_search.copy_url', function (event, eventData) { 11732 const shareElement = $("#share_last_search"); 11733 const path = (shareElement.data('link') || '').trim() || window.last_search?.search_url; 11734 11735 if (!path) { 11736 showCopyErrorNotification(''); 11737 return; 11738 } 11739 11740 const link = window.location.origin + path; 11741 11742 if (navigator.clipboard && navigator.clipboard.writeText) { 11743 navigator.clipboard.writeText(link).then(function() { 11744 showCopySuccessNotification(); 11745 }).catch(function(err) { 11746 fallbackCopyToClipboard(link); 11747 }); 11748 } else { 11749 fallbackCopyToClipboard(link); 11750 } 11751 11752 // Fallback for older browsers or errors 11753 function fallbackCopyToClipboard(text) { 11754 try { 11755 const tempInput = $('<input>'); 11756 $('body').append(tempInput); 11757 tempInput.val(text).select(); 11758 11759 const successful = document.execCommand('copy'); 11760 tempInput.remove(); 11761 11762 if (successful) { 11763 showCopySuccessNotification(); 11764 } else { 11765 showCopyErrorNotification(text); 11766 } 11767 } catch (err) { 11768 showCopyErrorNotification(text); 11769 } 11770 } 11771 11772 function showCopySuccessNotification() { 11773 try { 11774 $(document).trigger("notification.popup.seeker", { 11775 type: 'success', 11776 title: 'Copied!', 11777 content: 'The search link has been copied to its clipboard' 11778 }); 11779 } catch { 11780 alert('The search link has been copied to its clipboard'); 11781 } 11782 } 11783 11784 function showCopyErrorNotification(link) { 11785 try { 11786 $(document).trigger("notification.popup.seeker", { 11787 type: 'error', 11788 title: "Copy error", 11789 content: `You cannot copy the link to the clipboard. Try it again or copy the URL manually. ${link}` 11790 }); 11791 } catch { 11792 alert(`You cannot copy the link to the clipboard. Try it again or copy the URL manually. ${link}`); 11793 } 11794 } 11795 }); 11796</script>
11796<script data-cookieconsent="ignore" src="https://popup-seeker-296770026789.europe-west1.run.app/script.js?v=1.00"></script>
vendor: 1 bytes, line 11796
11796
11797<script> 11798 $(function () { 11799 try { 11800 POPUP_SEEKER.init({ 11801 11802 11803 11804 public_captcha_key: '6LcKsfMZAAAAAEL5D4XaIPZ7t_kNWm3pFaKv_dOn', 11805 11806 language_code: 'en', 11807 hotel_code: 'casas-novas', 11808 11809 is_mobile: false, 11810 11811 section_type: 'Inicio', 11812 section_key: 'ahJlfnNlY3VyZS1ib29raW5nMjRyFwsSCldlYlNlY3Rpb24YgICA7I3ulgsMogELY2FzYXMtbm92YXM', 11813 user_type: ['normal'], 11814 }); 11815 } catch (e) { 11816 console.warn('Error initializing Popup Seeker'); 11817 console.warn(e); 11818 } 11819 }); 11820</script>
11820 11821 11822 11823 11824 11825 11826 11827 11828</body> 11829</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.