PageSourceSearch

https://luxurylist.com.au/sites/default/files/advagg_js/js__1DAR8a…bKt1wI4QirVfzJ8iXj1a23wzb-BC8BXKt1Vbdf5Q.js

js luxurylist.com.au collected 2026-10-04 01:41:09 UTC 428,922 bytes, 5,253 lines download raw bytes

vendor: 93,577 bytes, lines 1-2
1/*! jQuery v1.8.3 jquery.com | jquery.org/license */
2(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.
2jQuery&&define("jquery",[],function(){return v})})(window);
3;/*})'"*/
4;/*})'"*/
5/**
6 * For jQuery versions less than 3.4.0, this replaces the jQuery.extend
7 * function with the one from jQuery 3.4.0, slightly modified (documented
8 * below) to be compatible with older jQuery versions and browsers.
9 *
10 * This provides the Object.prototype pollution vulnerability fix to Drupal
11 * installations running older jQuery versions, including the versions shipped
12 * with Drupal core and https://www.drupal.org/project/jquery_update.
13 *
14 * @see https://github.com/jquery/jquery/pull/4333
15 */
16
17(function (jQuery) {
18
19// Do not override jQuery.extend() if the jQuery version is already >=3.4.0.
20var versionParts = jQuery.fn.jquery.split('.');
21var majorVersion = parseInt(versionParts[0]);
22var minorVersion = parseInt(versionParts[1]);
23var patchVersion = parseInt(versionParts[2]);
24var isPreReleaseVersion = (patchVersion.toString() !== versionParts[2]);
25if (
26  (majorVersion > 3) ||
27  (majorVersion === 3 && minorVersion > 4) ||
28  (majorVersion === 3 && minorVersion === 4 && patchVersion > 0) ||
29  (majorVersion === 3 && minorVersion === 4 && patchVersion === 0 && !isPreReleaseVersion)
30) {
31  return;
32}
33
34/**
35 * This is almost verbatim copied from jQuery 3.4.0.
36 *
37 * Only two minor changes have been made:
38 * - The call to isFunction() is changed to jQuery.isFunction().
39 * - The two calls to Array.isArray() is changed to jQuery.isArray().
40 *
41 * The above two changes ensure compatibility with all older jQuery versions
42 * (1.4.4 - 3.3.1) and older browser versions (e.g., IE8).
43 */
44jQuery.extend = jQuery.fn.extend = function() {
45  var options, name, src, copy, copyIsArray, clone,
46    target = arguments[ 0 ] || {},
47    i = 1,
48    length = arguments.length,
49    deep = false;
50
51  // Handle a deep copy situation
52  if ( typeof target === "boolean" ) {
53    deep = target;
54
55    // Skip the boolean and the target
56    target = arguments[ i ] || {};
57    i++;
58  }
59
60  // Handle case when target is a string or something (possible in deep copy)
61  if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
62    target = {};
63  }
64
65  // Extend jQuery itself if only one argument is passed
66  if ( i === length ) {
67    target = this;
68    i--;
69  }
70
71  for ( ; i < length; i++ ) {
72
73    // Only deal with non-null/undefined values
74    if ( ( options = arguments[ i ] ) != null ) {
75
76      // Extend the base object
77      for ( name in options ) {
78        copy = options[ name ];
79
80        // Prevent Object.prototype pollution
81        // Prevent never-ending loop
82        if ( name === "__proto__" || target === copy ) {
83          continue;
84        }
85
86        // Recurse if we're merging plain objects or arrays
87        if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
88          ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
89          src = target[ name ];
90
91          // Ensure proper type for the source value
92          if ( copyIsArray && !jQuery.isArray( src ) ) {
93            clone = [];
94          } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
95            clone = {};
96          } else {
97            clone = src;
98          }
99          copyIsArray = false;
100
101          // Never move original objects, clone them
102          target[ name ] = jQuery.extend( deep, clone, copy );
103
104          // Don't bring in undefined values
105        } else if ( copy !== undefined ) {
106          target[ name ] = copy;
107        }
108      }
109    }
110  }
111
112  // Return the modified object
113  return target;
114};
115
116})(jQuery);
117
118;/*})'"*/
119;/*})'"*/
120
121/**
122 * jQuery Once Plugin v1.2
123 * http://plugins.jquery.com/project/once
124 *
125 * Dual licensed under the MIT and GPL licenses:
126 *   http://www.opensource.org/licenses/mit-license.php
127 *   http://www.gnu.org/licenses/gpl.html
128 */
129
130(function ($) {
131  var cache = {}, uuid = 0;
132
133  /**
134   * Filters elements by whether they have not yet been processed.
135   *
136   * @param id
137   *   (Optional) If this is a string, then it will be used as the CSS class
138   *   name that is applied to the elements for determining whether it has
139   *   already been processed. The elements will get a class in the form of
140   *   "id-processed".
141   *
142   *   If the id parameter is a function, it will be passed off to the fn
143   *   parameter and the id will become a unique identifier, represented as a
144   *   number.
145   *
146   *   When the id is neither a string or a function, it becomes a unique
147   *   identifier, depicted as a number. The element's class will then be
148   *   represented in the form of "jquery-once-#-processed".
149   *
150   *   Take note that the id must be valid for usage as an element's class 
150name.
151   * @param fn
152   *   (Optional) If given, this function will be called for each element that
153   *   has not yet been processed. The function's return value follows the same
154   *   logic as $.each(). Returning true will continue to the next matched
155   *   element in the set, while returning false will entirely break the
156   *   iteration.
157   */
158  $.fn.once = function (id, fn) {
159    if (typeof id != 'string') {
160      // Generate a numeric ID if the id passed can't be used as a CSS class.
161      if (!(id in cache)) {
162        cache[id] = ++uuid;
163      }
164      // When the fn parameter is not passed, we interpret it from the id.
165      if (!fn) {
166        fn = id;
167      }
168      id = 'jquery-once-' + cache[id];
169    }
170    // Remove elements from the set that have already been processed.
171    var name = id + '-processed';
172    var elements = this.not('.' + name).addClass(name);
173
174    return $.isFunction(fn) ? elements.each(fn) : elements;
175  };
176
177  /**
178   * Filters elements that have been processed once already.
179   *
180   * @param id
181   *   A required string representing the name of the class which should be used
182   *   when filtering the elements. This only filters elements that have already
183   *   been processed by the once function. The id should be the same id that
184   *   was originally passed to the once() function.
185   * @param fn
186   *   (Optional) If given, this function will be called for each element that
187   *   has not yet been processed. The function's return value follows the same
188   *   logic as $.each(). Returning true will continue to the next matched
189   *   element in the set, while returning false will entirely break the
190   *   iteration.
191   */
192  $.fn.removeOnce = function (id, fn) {
193    var name = id + '-processed';
194    var elements = this.filter('.' + name).removeClass(name);
195
196    return $.isFunction(fn) ? elements.each(fn) : elements;
197  };
198})(jQuery);
199
200;/*})'"*/
201;/*})'"*/
202
203var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} };
204
205// Allow other JavaScript libraries to use $.
206jQuery.noConflict();
207
208(function ($) {
209
210/**
211 * Override jQuery.fn.init to guard against XSS attacks.
212 *
213 * See http://bugs.jquery.com/ticket/9521
214 */
215var jquery_init = $.fn.init;
216$.fn.init = function (selector, context, rootjQuery) {
217  // If the string contains a "#" before a "<", treat it as invalid HTML.
218  if (selector && typeof selector === 'string') {
219    var hash_position = selector.indexOf('#');
220    if (hash_position >= 0) {
221      var bracket_position = selector.indexOf('<');
222      if (bracket_position > hash_position) {
223        throw 'Syntax error, unrecognized expression: ' + selector;
224      }
225    }
226  }
227  return jquery_init.call(this, selector, context, rootjQuery);
228};
229$.fn.init.prototype = jquery_init.prototype;
230
231/**
232 * Pre-filter Ajax requests to guard against XSS attacks.
233 *
234 * See https://github.com/jquery/jquery/issues/2432
235 */
236if ($.ajaxPrefilter) {
237  // For newer versions of jQuery, use an Ajax prefilter to prevent
238  // auto-executing script tags from untrusted domains. This is similar to the
239  // fix that is built in to jQuery 3.0 and higher.
240  $.ajaxPrefilter(function (s) {
241    if (s.crossDomain) {
242      s.contents.script = false;
243    }
244  });
245}
246else if ($.httpData) {
247  // For the version of jQuery that ships with Drupal core, override
248  // jQuery.httpData to prevent auto-detecting "script" data types from
249  // untrusted domains.
250  var jquery_httpData = $.httpData;
251  $.httpData = function (xhr, type, s) {
252    // @todo Consider backporting code from newer jQuery versions to check for
253    //   a cross-domain request here, rather than using Drupal.urlIsLocal() to
254    //   block scripts from all URLs that are not on the same site.
255    if (!type && !Drupal.urlIsLocal(s.url)) {
256      var content_type = xhr.getResponseHeader('content-type') || '';
257      if (content_type.indexOf('javascript') >= 0) {
258        // Default to a safe data type.
259        type = 'text';
260      }
261    }
262    return jquery_httpData.call(this, xhr, type, s);
263  };
264  $.httpData.prototype = jquery_httpData.prototype;
265}
266
267/**
268 * Attach all registered behaviors to a page element.
269 *
270 * Behaviors are event-triggered actions that attach to page elements, enhancing
271 * default non-JavaScript UIs. Behaviors are registered in the Drupal.behaviors
272 * object using the method 'attach' and optionally also 'detach' as follows:
273 * @code
274 *    Drupal.behaviors.behaviorName = {
275 *      attach: function (context, settings) {
276 *        ...
277 *      },
278 *      detach: function (context, settings, trigger) {
279 *        ...
280 *      }
281 *    };
282 * @endcode
283 *
284 * Drupal.attachBehaviors is added below to the jQuery ready event and so
285 * runs on initial page load. Developers implementing AHAH/Ajax in their
286 * solutions should also call this function after new page content has been
287 * loaded, feeding in an element to be processed, in order to attach all
288 * behaviors to the new content.
289 *
290 * Behaviors should use
291 * @code
292 *   $(selector).once('behavior-name', function () {
293 *     ...
294 *   });
295 * @endcode
296 * to ensure the behavior is attached only once to a given element. (Doing so
297 * enables the reprocessing of given elements, which may be needed on occasion
298 * despite the ability to limit behavior attachment to a particular element.)
299 *
300 * @param context
301 *   An element to attach behaviors to. If none is given, the document element
302 *   is used.
303 * @param settings
304 *   An object containing settings for the current context. If none given, the
305 *   global Drupal.settings object is used.
306 */
307Drupal.attachBehaviors = function (context, settings) {
308  context = context || document;
309  settings = settings || Drupal.settings;
310  // Execute all of them.
311  $.each(Drupal.behaviors, function () {
312    if ($.isFunction(this.attach)) {
313      this.attach(context, settings);
314    }
315  });
316};
317
318/**
319 * Detach registered behaviors from a page element.
320 *
321 * Developers implementing AHAH/Ajax in their solutions should call this
322 * function before page content is about to be removed, feeding in an element
323 * to be processed, in order to allow special behaviors to detach from the
324 * content.
325 *
326 * Such implementations should look for the class name that was added in their
327 * corresponding Drupal.behaviors.behaviorName.attach implementation, i.e.
328 * behaviorName-processed, to ensure the behavior is detached only from
329 * previously processed elements.
330 *
331 * @param context
332 *   An element to detach behaviors from. If none is given, the document element
333 *   is used.
334 * @param settings
335 *   An object containing settings for the current context. If none given, the
336 *   global Drupal.settings object is used.
337 * @param trigger
338 *   A string containing what's causing the behaviors to be detached. The
339 *   possible triggers are:
340 *   - unload: (default) The context element is being removed from the DOM.
341 *   - move: The element is about to be moved within the DOM (for example,
342 *     during a tabledrag row swap). After the move is completed,
343 *     Drupal.attachBehaviors() is called, so that the behavior can undo
344 *     whatever it did in response to the move. Many behaviors won't need to
345 *     do anything simply in response to the element being moved, but because
346 *     IFRAME elements reload their "src" when being moved within the DOM,
347 *     behaviors bound to IFRAME elements (like WYSIWYG editors) may need to
348 *     take some action.
349 *   - serialize: When an Ajax form is submitted, this is called with the
350 *     form as the context. This provides every behavior within the form an
351 *     opportunity to ensure that the field elements have correct content
352 *     in them before the form is serialized. The canonical use-case is so
353 *     that WYSIWYG editors can update the hidden textarea to which they are
354 *     bound.
355 *
356 * @see Drupal.attachBehaviors
357 */
358Drupal.detachBehaviors = function (context, settings, trigger) {
359  context = context || document;
360  settings = settings || Drupal.settings;
361  trigger = trigger || 'unload';
362  // Execute all of them.
363  $.each(Drupal.behaviors, function () {
364    if ($.isFunction(this.detach)) {
365      this.detach(context, settings, trigger);
366    }
367  });
368};
369
370/**
371 * Encode special characters in a plain-text string for display as HTML.
372 *
373 * @ingroup sanitization
374 */
375Drupal.checkPlain = function (str) {
376  var character, regex,
377      replace = { '&': '&amp;', "'": '&#39;', '"': '&quot;', '<': '&lt;', '>': '&gt;' };
378  str = String(str);
379  for (character in replace) {
380    if (replace.hasOwnProperty(character)) {
381      regex = new RegExp(character, 'g');
382      str = str.replace(regex, replace[character]);
383    }
384  }
385  return str;
386};
387
388/**
389 * Replace placeholders with sanitized values in a string.
390 *
391 * @param str
392 *   A string with placeholders.
393 * @param args
394 *   An object of replacements pairs to make. Incidences of any key in this
395 *   array are replaced with the corresponding value. Based on the first
396 *   character of the key, the value is escaped and/or themed:
397 *    - !variable: inserted as is
398 *    - @variable: escape plain text to HTML (Drupal.checkPlain)
399 *    - %variable: escape text and theme as a placeholder for user-submitted
400 *      content (checkPlain + Drupal.theme('placeholder'))
401 *
402 * @see Drupal.t()
403 * @ingroup sanitization
404 */
405Drupal.formatString = function(str, args) {
406  // Transform arguments before inserting them.
407  for (var key in args) {
408    if (args.hasOwnProperty(key)) {
409      switch (key.charAt(0)) {
410        // Escaped only.
411        case '@':
412          args[key] = Drupal.checkPlain(args[key]);
413          break;
414        // Pass-through.
415        case '!':
416          break;
417        // Escaped and placeholder.
418        default:
419          args[key] = Drupal.theme('placeholder', args[key]);
420          break;
421      }
422    }
423  }
424
425  return Drupal.stringReplace(str, args, null);
426};
427
428/**
429 * Replace substring.
430 *
431 * The longest keys will be tried first. Once a substring has been replaced,
432 * its new value will not be searched again.
433 *
434 * @param {String} str
435 *   A string with placeholders.
436 * @param {Object} args
437 *   Key-value pairs.
438 * @param {Array|null} keys
439 *   Array of keys from the "args".  Internal use only.
440 *
441 * @return {String}
442 *   Returns the replaced string.
443 */
444Drupal.stringReplace = function (str, args, keys) {
445  if (str.length === 0) {
446    return str;
447  }
448
449  // If the array of keys is not passed then collect the keys from the args.
450  if (!$.isArray(keys)) {
451    keys = [];
452    for (var k in args) {
453      if (args.hasOwnProperty(k)) {
454        keys.push(k);
455      }
456    }
457
458    // Order the keys by the character length. The shortest one is the first.
459    keys.sort(function (a, b) { return a.length - b.length; });
460  }
461
462  if (keys.length === 0) {
463    return str;
464  }
465
466  // Take next longest one from the end.
467  var key = keys.pop();
468  var fragments = str.split(key);
469
470  if (keys.length) {
471    for (var i = 0; i < fragments.length; i++) {
472      // Process each fragment with a copy of remaining keys.
473      fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0));
474    }
475  }
476
477  return fragments.join(args[key]);
478};
479
480/**
481 * Translate strings to the page language or a given language.
482 *
483 * See the documentation of the server-side t() function for further details.
484 *
485 * @param str
486 *   A string containing the English string to translate.
487 * @param args
488 *   An object of replacements pairs to make after translation. Incidences
489 *   of any key in this array are replaced with the corresponding value.
490 *   See Drupal.formatString().
491 *
492 * @param options
493 *   - 'context' (defaults to the empty context): The context the source string
494 *     belongs to.
495 *
496 * @return
497 *   The translated string.
498 */
499Drupal.t = function (str, args, options) {
500  options = options || {};
501  options.context = options.context || '';
502
503  // Fetch the localized version of the string.
504  if (Drupal.locale.strings && Drupal.locale.strings[options.context] && Drupal.locale.strings[options.context][str]) {
505    str = Drupal.locale.strings[options.context][str];
506  }
507
508  if (args) {
509    str = Drupal.formatString(str, args);
510  }
511  return str;
512};
513
514/**
515 * Format a string containing a count of items.
516 *
517 * This function ensures that the string is pluralized correctly. Since Drupal.t() is
518 * called by this function, make sure not to pass already-localized strings to it.
519 *
520 * See the documentation of the server-side format_plural() function for further details.
521 *
522 * @param count
523 *   The item count to display.
524 * @param singular
525 *   The string for the singular case. Please make sure it is clear this is
526 *   singular, to ease translation (e.g. use "1 new comment" instead of "1 new").
527 *   Do not use @count in the singular string.
528 * @param plural
529 *   The string for the plural case. Please make sure it is clear this is plural,
530 *   to ease translation. Use @count in place of the item count, as in "@count
531 *   new comments".
532 * @param args
533 *   An object of replacements pairs to make after translation. Incidences
534 *   of any key in this array are replaced with the corresponding value.
535 *   See Drupal.formatString().
536 *   Note that you do not need to include @count in this array.
537 *   This replacement is done automatically for the plural case.
538 * @param options
539 *   The options to pass to the Drupal.t() function.
540 * @return
541 *   A translated string.
542 */
543Drupal.formatPlural = function (count, singular, plural, args, options) {
544  args = args || {};
545  args['@count'] = count;
546  // Determine the index of the plural form.
547  var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1);
548
549  if (index == 0) {
550    return Drupal.t(singular, args, options);
551  }
552  else if (index == 1) {
553    return Drupal.t(plural, args, options);
554  }
555  else {
556    args['@count[' + index + ']'] = args['@count'];
557    delete args['@count'];
558    return Drupal.t(plural.replace('@count', '@count[' + index + ']'), args, options);
559  }
560};
561
562/**
563 * Returns the passed in URL as an absolute URL.
564 *
565 * @param url
566 *   The URL string to be normalized to an absolute URL.
567 *
568 * @return
569 *   The normalized, absolute URL.
570 *
571 * @see https://github.com/angular/angular.js/blob/v1.4.4/src/ng/urlUtils.js
572 * @see https://grack.com/blog/2009/11/17/absolutizing-url-in-javascript
573 * @see https://github.com/jquery/jquery-ui/blob/1.11.4/ui/tabs.js#L53
574 */
575Drupal.absoluteUrl = function (url) {
576  var urlParsingNode = document.createElement('a');
577
578  // Decode the URL first; this is required by IE <= 6. Decoding non-UTF-8
579  // strings may throw an exception.
580  try {
581    url = decodeURIComponent(url);
582  } catch (e) {}
583
584  urlParsingNode.setAttribute('href', url);
585
586  // IE <= 7 normalizes the URL when assigned to the anchor node similar to
587  // the other browsers.
588  return urlParsingNode.cloneNode(false).href;
589};
590
591/**
592 * Returns true if the URL is within Drupal's base path.
593 *
594 * @param url
595 *   The URL string to be tested.
596 *
597 * @return
598 *   Boolean true if local.
599 *
600 * @see https://github.com/jquery/jquery-ui/blob/1.11.4/ui/tabs.js#L58
601 */
602Drupal.urlIsLocal = function (url) {
603  // Always use browser-derived absolute URLs in the comparison, to avoid
604  // attempts to break out of the base path using directory traversal.
605  var absoluteUrl = Drupal.absoluteUrl(url);
606  var protocol = location.protocol;
607
608  // Consider URLs that match this site's base URL but use HTTPS instead of HTTP
609  // as local as well.
610  if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) {
611    protocol = 'https:';
612  }
613  var baseUrl = protocol + '//' + location.host + Drupal.settings.basePath.slice(0, -1);
614
615  // Decoding non-UTF-8 strings may throw an exception.
616  try {
617    absoluteUrl = decodeURIComponent(absoluteUrl);
618  } catch (e) {}
619  try {
620    baseUrl = decodeURIComponent(baseUrl);
621  } catch (e) {}
622
623  // The given URL matches the site's base URL, or has a path under the site's
624  // base URL.
625  return absoluteUrl === baseUrl || absoluteUrl.indexOf(baseUrl + '/') === 0;
626};
627
628/**
629 * Generate the themed representation of a Drupal object.
630 *
631 * All requests for themed output must go through this function. It examines
632 * the request and routes it to the appropriate theme function. If the current
633 * theme does not provide an override function, the generic theme function is
634 * called.
635 *
636 * For example, to retrieve the HTML for text that should be emphasized and
637 * displayed as a placeholder inside a sentence, call
638 * Drupal.theme('placeholder', text).
639 *
640 * @param func
641 *   The name of the theme function to call.
642 * @param ...
643 *   Additional arguments to pass along to the theme function.
644 * @return
645 *   Any data the theme function returns. This could be a plain HTML string,
646 *   but also a complex object.
647 */
648Drupal.theme = function (func) {
649  var args = Array.prototype.slice.apply(arguments, [1]);
650
651  return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args);
652};
653
654/**
655 * Freeze the current body height (as minimum height). Used to prevent
656 * unnecessary upwards scrolling when doing DOM manipulations.
657 */
658Drupal.freezeHeight = function () {
659  Drupal.unfreezeHeight();
660  $('<div id="freeze-height"></div>').css({
661    position: 'absolute',
662    top: '0px',
663    left: '0px',
664    width: '1px',
665    height: $('body').css('height')
666  }).appendTo('body');
667};
668
669/**
670 * Unfreeze the body height.
671 */
672Drupal.unfreezeHeight = function () {
673  $('#freeze-height').remove();
674};
675
676/**
677 * Encodes a Drupal path for use in a URL.
678 *
679 * For aesthetic reasons slashes are not escaped.
680 */
681Drupal.encodePath = function (item, uri) {
682  uri = uri || location.href;
683  return encodeURIComponent(item).replace(/%2F/g, '/');
684};
685
686/**
687 * Get the text selection in a textarea.
688 */
689Drupal.getSelection = function (element) {
690  if (typeof element.selectionStart != 'number' && document.selection) {
691    // The current selection.
692    var range1 = document.selection.createRange();
693    var range2 = range1.duplicate();
694    // Select all text.
695    range2.moveToElementText(element);
696    // Now move 'dummy' end point to end point of original range.
697    range2.setEndPoint('EndToEnd', range1);
698    // Now we can calculate start and end points.
699    var start = range2.text.length - range1.text.length;
700    var end = start + range1.text.length;
701    return { 'start': start, 'end': end };
702  }
703  return { 'start': element.selectionStart, 'end': element.selectionEnd };
704};
705
706/**
707 * Add a global variable which determines if the window is being unloaded.
708 *
709 * This is primarily used by Drupal.displayAjaxError().
710 */
711Drupal.beforeUnloadCalled = false;
712$(window).bind('beforeunload pagehide', function () {
713    Drupal.beforeUnloadCalled = true;
714});
715
716/**
717 * Displays a JavaScript error from an Ajax response when appropriate to do so.
718 */
719Drupal.displayAjaxError = function (message) {
720  // Skip displaying the message if the user deliberately aborted (for example,
721  // by reloading the page or navigating to a different page) while the Ajax
722  // request was still ongoing. See, for example, the discussion at
723  // http://stackoverflow.com/questions/699941/handle-ajax-error-when-a-user-clicks-refresh.
724  if (!Drupal.beforeUnloadCalled) {
725    alert(message);
726  }
727};
728
729/**
730 * Build an error message from an Ajax response.
731 */
732Drupal.ajaxError = function (xmlhttp, uri, customMessage) {
733  var statusCode, statusText, pathText, responseText, readyStateText, message;
734  if (xmlhttp.status) {
735    statusCode = "\n" + Drupal.t("An AJAX HTTP error occurred.") +  "\n" + Drupal.t("HTTP Result Code: !status", {'!status': xmlhttp.status});
736  }
737  else {
738    statusCode = "\n" + Drupal.t("An AJAX HTTP request terminated abnormally.");
739  }
740  statusCode += "\n" + Drupal.t("Debugging information follows.");
741  pathText = "\n" + Drupal.t("Path: !uri", {'!uri': uri} );
742  statusText = '';
743  // In some cases, when statusCode == 0, xmlhttp.statusText may not be defined.
744  // Unfortunately, testing for it with typeof, etc, doesn't seem to catch that
745  // and the test causes an exception. So we need to catch the exception here.
746  try {
747    statusText = "\n" + Drupal.t("StatusText: !statusText", {'!statusText': $.trim(xmlhttp.statusText)});
748  }
749  catch (e) {}
750
751  responseText = '';
752  // Again, we don't have a way to know for sure whether accessing
753  // xmlhttp.responseText is going to throw an exception. So we'll catch it.
754  try {
755    responseText = "\n" + Drupal.t("ResponseText: !responseText", {'!responseText': $.trim(xmlhttp.responseText) } );
756  } catch (e) {}
757
758  // Make the responseText more readable by stripping HTML tags and newlines.
759  responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,"");
760  responseText = responseText.replace(/[\n]+\s+/g,"\n");
761
762  // We don't need readyState except for status == 0.
763  readyStateText = xmlhttp.status == 0 ? ("\n" + Drupal.t("ReadyState: !readyState", {'!readyState': xmlhttp.readyState})) : "";
764
765  // Additional message beyond what the xmlhttp object provides.
766  customMessage = customMessage ? ("\n" + Drupal.t("CustomMessage: !customMessage", {'!customMessage': customMessage})) : "";
767
768  message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
769  return message;
770};
771
772// Class indicating that JS is enabled; used for styling purpose.
773$('html').addClass('js');
774
775// 'js enabled' cookie.
776document.cookie = 'has_js=1; path=/';
777
778/**
779 * Additions to jQuery.support.
780 */
781$(function () {
782  /**
783   * Boolean indicating whether or not position:fixed is supported.
784   */
785  if (jQuery.support.positionFixed === undefined) {
786    var el = $('<div style="position:fixed; top:10px" />').appendTo(document.body);
787    jQuery.support.positionFixed = el[0].offsetTop === 10;
788    el.remove();
789  }
790});
791
792//Attach all behaviors.
793$(function () {
794  Drupal.attachBehaviors(document, Drupal.settings);
795});
796
797/**
798 * The default themes.
799 */
800Drupal.theme.prototype = {
801
802  /**
803   * Formats text for emphasized display in a placeholder inside a sentence.
804   *
805   * @param str
806   *   The text to format (plain-text).
807   * @return
808   *   The formatted text (html).
809   */
810  placeholder: function (str) {
811    return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
812  }
813};
814
815})(jQuery);
816
817;/*})'"*/
818;/*})'"*/
819/*! jQuery UI - v1.10.2 - 2013-03-14
820* http://jqueryui.com
821* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
822(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id
vendor: 18,913 bytes, lines 822-845
822)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);
823;/*})'"*/
824;/*})'"*/
825/*! jQuery UI - v1.10.2 - 2013-03-14
826* http://jqueryui.com
827* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
828(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);
829;/*})'"*/
830;/*})'"*/
831/*! jQuery UI - v1.10.2 - 2013-03-14
832* http://jqueryui.com
833* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
834(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="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",h=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
835;/*})'"*/
836;/*})'"*/
837/*! jQuery UI - v1.10.2 - 2013-03-14
838* http://jqueryui.com
839* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
840(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
841;/*})'"*/
842;/*})'"*/
843/*! jQuery UI - v1.10.2 - 2013-03-14
844* http://jqueryui.com
845* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
vendor: 18,211 bytes, line 846
846(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i,s=this,n=!1,a=!1;for(e.ui.ddmanager&&!this.options.dropBehaviour&&(a=e.ui.ddmanager.drop(this,t)),this.dropped&&(a=this.dropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(n=!0);return n||"original"!==this.options.helper?("invalid"===this.options.revert&&!a||"valid"===this.options.revert&&a||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,a)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;if("parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=["document"===n.containment?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"===n.containment?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"===n.containment?0:e(window).scrollLeft())+e("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"===n.containment?0:e(window).scrollTop())+(e("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||n.containment.constructor===Array)n.containment.constructor===Array&&(this.containment=n.containment);else{if(i=e(n.containment),s=i[0],!s)return;t="hidden"!==e(s).css("overflow"),this.containment=[(parseInt(e(s).css("borderLeftWidth"),10)||0)+(parseInt(e(s).css("paddingLeft"),10)||0),(parseInt(e(s).css("borderTopWidth"),10)||0)+(parseInt(e(s).css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(e(s).css("borderRightWidth"),10)||0)-(parseInt(e(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(e(s).css("borderBottomWidth"),10)||0)-(parseInt(e(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName),l=t.pageX,u=t.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(u=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,u=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,y=i.offset.top,b=y+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,g>r-m&&h+m>g&&y>l-m&&u+m>y||g>r-m&&h+m>g&&b>l-m&&u+m>b||v>r-m&&h+m>v&&y>l-m&&u+m>y||v>r-m&&h+m>v&&b>l-m&&u+m>b?("inner"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d):(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);
vendor: 6,449 bytes, lines 846-857
846
847;/*})'"*/
848;/*})'"*/
849/*! jQuery UI - v1.10.2 - 2013-03-14
850* http://jqueryui.com
851* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
852(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,m=_.height,g=_.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+_+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:b,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);
853;/*})'"*/
854;/*})'"*/
855/*! jQuery UI - v1.10.2 - 2013-03-14
856* http://jqueryui.com
857* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
vendor: 17,139 bytes, line 858
858(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);
vendor: 10,720 bytes, lines 858-864
858
859;/*})'"*/
860;/*})'"*/
861/*! jQuery UI - v1.10.2 - 2013-03-14
862* http://jqueryui.com
863* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
864(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.2",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];
864i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery);
865;/*})'"*/
866;/*})'"*/
867/*jslint browser: true */ /*global jQuery: true */
868
869/**
870 * jQuery Cookie plugin
871 *
872 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
873 * Dual licensed under the MIT and GPL licenses:
874 * http://www.opensource.org/licenses/mit-license.php
875 * http://www.gnu.org/licenses/gpl.html
876 *
877 */
878
879// TODO JsDoc
880
881/**
882 * Create a cookie with the given key and value and other optional parameters.
883 *
884 * @example $.cookie('the_cookie', 'the_value');
885 * @desc Set the value of a cookie.
886 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
887 * @desc Create a cookie with all available options.
888 * @example $.cookie('the_cookie', 'the_value');
889 * @desc Create a session cookie.
890 * @example $.cookie('the_cookie', null);
891 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
892 *       used when the cookie was set.
893 *
894 * @param String key The key of the cookie.
895 * @param String value The value of the cookie.
896 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
897 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
898 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
899 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
900 *                             when the the browser exits.
901 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
902 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
903 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
904 *                        require a secure protocol (like HTTPS).
905 * @type undefined
906 *
907 * @name $.cookie
908 * @cat Plugins/Cookie
909 * @author Klaus Hartl/[email protected]
910 */
911
912/**
913 * Get the value of a cookie with the given key.
914 *
915 * @example $.cookie('the_cookie');
916 * @desc Get the value of a cookie.
917 *
918 * @param String key The key of the cookie.
919 * @return The value of the cookie.
920 * @type String
921 *
922 * @name $.cookie
923 * @cat Plugins/Cookie
924 * @author Klaus Hartl/[email protected]
925 */
926jQuery.cookie = function (key, value, options) {
927
928    // key and value given, set cookie...
929    if (arguments.length > 1 && (value === null || typeof value !== "object")) {
930        options = jQuery.extend({}, options);
931
932        if (value === null) {
933            options.expires = -1;
934        }
935
936        if (typeof options.expires === 'number') {
937            var days = options.expires, t = options.expires = new Date();
938            t.setDate(t.getDate() + days);
939        }
940
941        return (document.cookie = [
942            encodeURIComponent(key), '=',
943            options.raw ? String(value) : encodeURIComponent(String(value)),
944            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
945            options.path ? '; path=' + options.path : '',
946            options.domain ? '; domain=' + options.domain : '',
947            options.secure ? '; secure' : ''
948        ].join(''));
949    }
950
951    // key and possibly options given, get cookie...
952    options = value || {};
953    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
954    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
955};
956
957;/*})'"*/
958;/*})'"*/
959/*!
960 * jQuery Form Plugin
961 * version: 2.69 (06-APR-2011)
962 * @requires jQuery v1.3.2 or later
963 *
964 * Examples and documentation at: http://malsup.com/jquery/form/
965 * Dual licensed under the MIT and GPL licenses:
966 *   http://www.opensource.org/licenses/mit-license.php
967 *   http://www.gnu.org/licenses/gpl.html
968 */
969(function(a){function b(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}a.fn.ajaxSubmit=function(c){function r(){function t(){if(!j.aborted){var c=i.contentWindow?i.contentWindow.document:i.contentDocument?i.contentDocument:i.document;if(!c||c.location.href==e.iframeSrc)if(!m)return;i.detachEvent?i.detachEvent("onload",t):i.removeEventListener("load",t,!1);var d=!0;try{if(m)throw"timeout";var f=e.dataType=="xml"||c.XMLDocument||a.isXMLDoc(c);b("isXml="+f);if(!f&&window.opera&&(c.body==null||c.body.innerHTML=="")&&--s){b("requeing onLoad callback, DOM not available"),setTimeout(t,250);return}j.responseText=c.body?c.body.innerHTML:c.documentElement?c.documentElement.innerHTML:null,j.responseXML=c.XMLDocument?c.XMLDocument:c,j.getResponseHeader=function(a){var b={"content-type":e.dataType};return b[a]};var g=/(json|script)/.test(e.dataType);if(g||e.textarea){var l=c.getElementsByTagName("textarea")[0];if(l)j.responseText=l.value;else if(g){var n=c.getElementsByTagName("pre")[0],o=c.getElementsByTagName("body")[0];n?j.responseText=n.textContent:o&&(j.responseText=o.innerHTML)}}else e.dataType=="xml"&&!j.responseXML&&j.responseText!=null&&(j.responseXML=u(j.responseText));q=w(j,e.dataType,e)}catch(p){b("error caught:",p),d=!1,j.error=p,e.error&&e.error.call(e.context,j,"error",p),k&&a.event.trigger("ajaxError",[j,e,p])}j.aborted&&(b("upload aborted"),d=!1),d&&(e.success&&e.success.call(e.context,q,"success",j),k&&a.event.trigger("ajaxSuccess",[j,e])),k&&a.event.trigger("ajaxComplete",[j,e]),k&&!--a.active&&a.event.trigger("ajaxStop"),e.complete&&e.complete.call(e.context,j,d?"success":"error"),setTimeout(function(){h.removeData("form-plugin-onload"),h.remove(),j.responseXML=null},100)}}function p(){var b=l.attr("target"),c=l.attr("action");d.setAttribute("target",f),d.getAttribute("method")!="POST"&&d.setAttribute("method","POST"),d.getAttribute("action")!=e.url&&d.setAttribute("action",e.url),e.skipEncodingOverride||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),e.timeout&&setTimeout(function(){m=!0,t()}
969,e.timeout);var g=[];try{if(e.extraData)for(var j in e.extraData)g.push(a('<input type="hidden" name="'+j+'" value="'+e.extraData[j]+'" />').appendTo(d)[0]);h.appendTo("body"),i.attachEvent?i.attachEvent("onload",t):i.addEventListener("load",t,!1),d.submit()}finally{d.setAttribute("action",c),b?d.setAttribute("target",b):l.removeAttr("target"),a(g).remove()}}var d=l[0];if(a(":input[name=submit],:input[id=submit]",d).length)alert('Error: Form elements must not have name or id of "submit".');else{var e=a.extend(!0,{},a.ajaxSettings,c);e.context=e.context||e;var f="jqFormIO"+(new Date).getTime(),g="_"+f,h=a('<iframe id="'+f+'" name="'+f+'" src="'+e.iframeSrc+'" />'),i=h[0];h.css({position:"absolute",top:"-1000px",left:"-1000px"});var j={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){b("aborting upload...");var c="aborted";this.aborted=1,h.attr("src",e.iframeSrc),j.error=c,e.error&&e.error.call(e.context,j,"error",c),k&&a.event.trigger("ajaxError",[j,e,c]),e.complete&&e.complete.call(e.context,j,"error")}},k=e.global;k&&!(a.active++)&&a.event.trigger("ajaxStart"),k&&a.event.trigger("ajaxSend",[j,e]);if(e.beforeSend&&e.beforeSend.call(e.context,j,e)===!1){e.global&&a.active--;return}if(j.aborted)return;var m=0,n=d.clk;if(n){var o=n.name;o&&!n.disabled&&(e.extraData=e.extraData||{},e.extraData[o]=n.value,n.type=="image"&&(e.extraData[o+".x"]=d.clk_x,e.extraData[o+".y"]=d.clk_y))}e.forceSync?p():setTimeout(p,10);var q,r,s=50,u=a.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");return b&&b.documentElement&&b.documentElement.nodeName!="parsererror"?b:null},v=a.parseJSON||function(a){return window.eval("("+a+")")},w=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=c==="xml"||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;f&&g.documentElement.nodeName==="parsererror"&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),typeof g=="string"&&(c==="json"||!c&&e.indexOf("json")>=0?g=v(g):(c==="script"||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g));return g}}}if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}typeof c=="function"&&(c={success:c});var d=this.attr("action"),e=typeof d=="string"?a.trim(d):"";e&&(e=(e.match(/^([^#]+)/)||[])[1]),e=e||window.location.href||"",c=a.extend(!0,{url:e,success:a.ajaxSettings.success,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c);var f={};this.trigger("form-pre-serialize",[this,c,f]);if(f.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(c.beforeSerialize&&c.beforeSerialize(this,c)===!1){b("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var g,h,i=this.formToArray(c.semantic);if(c.data){c.extraData=c.data;for(g in c.data)if(c.data[g]instanceof Array)for(var j in c.data[g])i.push({name:g,value:c.data[g][j]});else h=c.data[g],h=a.isFunction(h)?h():h,i.push({name:g,value:h})}if(c.beforeSubmit&&c.beforeSubmit(i,this,c)===!1){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[i,this,c,f]);if(f.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var k=a.param(i);c.type.toUpperCase()=="GET"?(c.url+=(c.url.indexOf("?")>=0?"&":"?")+k,c.data=null):c.data=k;var l=this,m=[];c.resetForm&&m.push(function(){l.resetForm()}),c.clearForm&&m.push(function(){l.clearForm()});if(!c.dataType&&c.target){var n=c.success||function(){};m.push(function(b){var d=c.replaceTarget?"replaceWith":"html";a(c.target)[d](b).each(n,arguments)})}else c.success&&m.push(c.success);c.success=function(a,b,d){var e=c.context||c;for(var f=0,g=m.length;f<g;f++)m[f].apply(e,[a,b,d||l,l])};var o=a("input:file",this).length>0,p="multipart/form-data",q=l.attr("enctype")==p||l.attr("encoding")==p;c.iframe!==!1&&(o||c.iframe||q)?c.closeKeepAlive?a.get(c.closeKeepAlive,r):r():a.ajax(c),this.trigger("form-submit-notify",[this,c]);return this},a.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!a.isReady&&d.s){b("DOM not ready, queuing ajaxForm"),a(function(){a(d.s,d.c).ajaxForm(c)});return this}b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}).bind("click.form-plugin",function(b){var c=b.target,d=a(c);if(!d.is(":submit,input:image")){var e=d.closest(":submit");
969if(e.length==0)return;c=e[0]}var f=this;f.clk=c;if(c.type=="image")if(b.offsetX!=undefined)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if(typeof a.fn.offset=="function"){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b){var c=[];if(this.length===0)return c;var d=this[0],e=b?d.getElementsByTagName("*"):d.elements;if(!e)return c;var f,g,h,i,j,k,l;for(f=0,k=e.length;f<k;f++){j=e[f],h=j.name;if(!h)continue;if(b&&d.clk&&j.type=="image"){!j.disabled&&d.clk==j&&(c.push({name:h,value:a(j).val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}));continue}i=a.fieldValue(j,!0);if(i&&i.constructor==Array)for(g=0,l=i.length;g<l;g++)c.push({name:h,value:i[g]});else i!==null&&typeof i!="undefined"&&c.push({name:h,value:i})}if(!b&&d.clk){var m=a(d.clk),n=m[0];h=n.name,h&&!n.disabled&&n.type=="image"&&(c.push({name:h,value:m.val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}))}return c},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];this.each(function(){var d=this.name;if(!!d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;f<g;f++)c.push({name:d,value:e[f]});else e!==null&&typeof e!="undefined"&&c.push({name:this.name,value:e})}});return a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var f=this[d],g=a.fieldValue(f,b);if(g===null||typeof g=="undefined"||g.constructor==Array&&!g.length)continue;
969g.constructor==Array?a.merge(c,g):c.push(g)}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();c===undefined&&(c=!0);if(c&&(!d||b.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!b.checked||(e=="submit"||e=="image")&&b.form&&b.form.clk!=b||f=="select"&&b.selectedIndex==-1))return null;if(f=="select"){var g=b.selectedIndex;if(g<0)return null;var h=[],i=b.options,j=e=="select-one",k=j?g+1:i.length;for(var l=j?g:0;l<k;l++){var m=i[l];if(m.selected){var n=m.value;n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(){return this.each(function(){a("input,select,textarea",this).clearFields()})},a.fn.clearFields=a.fn.clearInputs=function(){return this.each(function(){var a=this.type,b=this.tagName.toLowerCase();a=="text"||a=="password"||b=="textarea"?this.value="":a=="checkbox"||a=="radio"?this.checked=!1:b=="select"&&(this.selectedIndex=-1)})},a.fn.resetForm=function(){return this.each(function(){(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){a===undefined&&(a=!0);return this.each(function(){this.disabled=!a})},a.fn.selected=function(b){b===undefined&&(b=!0);return this.each(function(){var c=this.type;if(c=="checkbox"||c=="radio")this.checked=b;else if(this.tagName.toLowerCase()=="option"){var d=a(this).parent("select");b&&d[0]&&d[0].type=="select-one"&&d.find("option").selected(!1),this.selected=b}})}})(jQuery)
970;/*})'"*/
971;/*})'"*/
972(function ($) {
973
974/**
975 * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML).
976 *
977 * Ajax is a method of making a request via JavaScript while viewing an HTML
978 * page. The request returns an array of commands encoded in JSON, which is
979 * then executed to make any changes that are necessary to the page.
980 *
981 * Drupal uses this file to enhance form elements with #ajax['path'] and
982 * #ajax['wrapper'] properties. If set, this file will automatically be included
983 * to provide Ajax capabilities.
984 */
985
986Drupal.ajax = Drupal.ajax || {};
987
988Drupal.settings.urlIsAjaxTrusted = Drupal.settings.urlIsAjaxTrusted || {};
989
990/**
991 * Attaches the Ajax behavior to each Ajax form element.
992 */
993Drupal.behaviors.AJAX = {
994  attach: function (context, settings) {
995    // Load all Ajax behaviors specified in the settings.
996    for (var base in settings.ajax) {
997      if (!$('#' + base + '.ajax-processed').length) {
998        var element_settings = settings.ajax[base];
999
1000        if (typeof element_settings.selector == 'undefined') {
1001          element_settings.selector = '#' + base;
1002        }
1003        $(element_settings.selector).each(function () {
1004          element_settings.element = this;
1005          Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
1006        });
1007
1008        $('#' + base).addClass('ajax-processed');
1009      }
1010    }
1011
1012    // Bind Ajax behaviors to all items showing the class.
1013    $('.use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () {
1014      var element_settings = {};
1015      // Clicked links look better with the throbber than the progress bar.
1016      element_settings.progress = { 'type': 'throbber' };
1017
1018      // For anchor tags, these will go to the target of the anchor rather
1019      // than the usual location.
1020      if ($(this).attr('href')) {
1021        element_settings.url = $(this).attr('href');
1022        element_settings.event = 'click';
1023      }
1024      var base = $(this).attr('id');
1025      Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
1026    });
1027
1028    // This class means to submit the form to the action using Ajax.
1029    $('.use-ajax-submit:not(.ajax-processed)').addClass('ajax-processed').each(function () {
1030      var element_settings = {};
1031
1032      // Ajax submits specified in this manner automatically submit to the
1033      // normal form action.
1034      element_settings.url = $(this.form).attr('action');
1035      // Form submit button clicks need to tell the form what was clicked so
1036      // it gets passed in the POST request.
1037      element_settings.setClick = true;
1038      // Form buttons use the 'click' event rather than mousedown.
1039      element_settings.event = 'click';
1040      // Clicked form buttons look better with the throbber than the progress bar.
1041      element_settings.progress = { 'type': 'throbber' };
1042
1043      var base = $(this).attr('id');
1044      Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
1045    });
1046  }
1047};
1048
1049/**
1050 * Ajax object.
1051 *
1052 * All Ajax objects on a page are accessible through the global Drupal.ajax
1053 * object and are keyed by the submit button's ID. You can access them from
1054 * your module's JavaScript file to override properties or functions.
1055 *
1056 * For example, if your Ajax enabled button has the ID 'edit-submit', you can
1057 * redefine the function that is called to insert the new content like this
1058 * (inside a Drupal.behaviors attach block):
1059 * @code
1060 *    Drupal.behaviors.myCustomAJAXStuff = {
1061 *      attach: function (context, settings) {
1062 *        Drupal.ajax['edit-submit'].commands.insert = function (ajax, response, status) {
1063 *          new_content = $(response.data);
1064 *          $('#my-wrapper').append(new_content);
1065 *          alert('New content was appended to #my-wrapper');
1066 *        }
1067 *      }
1068 *    };
1069 * @endcode
1070 */
1071Drupal.ajax = function (base, element, element_settings) {
1072  var defaults = {
1073    url: 'system/ajax',
1074    event: 'mousedown',
1075    keypress: true,
1076    selector: '#' + base,
1077    effect: 'none',
1078    speed: 'none',
1079    method: 'replaceWith',
1080    progress: {
1081      type: 'throbber',
1082      message: Drupal.t('Please wait...')
1083    },
1084    submit: {
1085      'js': true
1086    }
1087  };
1088
1089  $.extend(this, defaults, element_settings);
1090
1091  this.element = element;
1092  this.element_settings = element_settings;
1093
1094  // Replacing 'nojs' with 'ajax' in the URL allows for an easy method to let
1095  // the server detect when it needs to degrade gracefully.
1096  // There are five scenarios to check for:
1097  // 1. /nojs/
1098  // 2. /nojs$ - The end of a URL string.
1099  // 3. /nojs? - Followed by a query (with clean URLs enabled).
1100  //      E.g.: path/nojs?destination=foobar
1101  // 4. /nojs& - Followed by a query (without clean URLs enabled).
1102  //      E.g.: ?q=path/nojs&destination=foobar
1103  // 5. /nojs# - Followed by a fragment.
1104  //      E.g.: path/nojs#myfragment
1105  this.url = element_settings.url.replace(/\/nojs(\/|$|\?|&|#)/g, '/ajax$1');
1106  // If the 'nojs' version of the URL is trusted, also trust the 'ajax' version.
1107  if (Drupal.settings.urlIsAjaxTrusted[element_settings.url]) {
1108    Drupal.settings.urlIsAjaxTrusted[this.url] = true;
1109  }
1110
1111  this.wrapper = '#' + element_settings.wrapper;
1112
1113  // If there isn't a form, jQuery.ajax() will be used instead, allowing us to
1114  // bind Ajax to links as well.
1115  if (this.element.form) {
1116    this.form = $(this.element.form);
1117  }
1118
1119  // Set the options for the ajaxSubmit function.
1120  // The 'this' variable will not persist inside of the options object.
1121  var ajax = this;
1122  ajax.options = {
1123    url: ajax.url,
1124    data: ajax.submit,
1125    beforeSerialize: function (element_settings, options) {
1126      return ajax.beforeSerialize(element_settings, options);
1127    },
1128    beforeSubmit: function (form_values, element_settings, options) {
1129      ajax.ajaxing = true;
1130      return ajax.beforeSubmit(form_values, element_settings, options);
1131    },
1132    beforeSend: function (xmlhttprequest, options) {
1133      ajax.ajaxing = true;
1134      return ajax.beforeSend(xmlhttprequest, options);
1135    },
1136    success: function (response, status, xmlhttprequest) {
1137      // Sanity check for browser support (object expected).
1138      // When using iFrame uploads, responses must be returned as a string.
1139      if (typeof response == 'string') {
1140        response = $.parseJSON(response);
1141      }
1142
1143      // Prior to invoking the response's commands, verify that they can be
1144      // trusted by checking for a response header. See
1145      // ajax_set_verification_header() for details.
1146      // - Empty responses are harmless so can bypass verification. This avoids
1147      //   an alert message for server-generated no-op responses that skip Ajax
1148      //   rendering.
1149      // - Ajax objects with trusted URLs (e.g., ones defined server-side via
1150      //   #ajax) can bypass header verification. This is especially useful for
1151      //   Ajax with multipart forms. Because IFRAME transport is used, the
1152      //   response headers cannot be accessed for verification.
1153      if (response !== null && !Drupal.settings.urlIsAjaxTrusted[ajax.url]) {
1154        if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
1155          var customMessage = Drupal.t("The response failed verification so will not be processed.");
1156          return ajax.error(xmlhttprequest, ajax.url, customMessage);
1157        }
1158      }
1159
1160      return ajax.success(response, status);
1161    },
1162    complete: function (xmlhttprequest, status) {
1163      ajax.ajaxing = false;
1164      if (status == 'error' || status == 'parsererror') {
1165        return ajax.error(xmlhttprequest, ajax.url);
1166      }
1167    },
1168    dataType: 'json',
1169    type: 'POST'
1170  };
1171
1172  // Bind the ajaxSubmit function to the element event.
1173  $(ajax.element).bind(element_settings.event, function (event) {
1174    if (!Drupal.settings.urlIsAjaxTrusted[ajax.url] && !Drupal.urlIsLocal(ajax.url)) {
1175      throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', {'!url': ajax.url}));
1176    }
1177    return ajax.eventResponse(this, event);
1178  });
1179
1180  // If necessary, enable keyboard submission so that Ajax behaviors
1181  // can be triggered through keyboard input as well as e.g. a mousedown
1182  // action.
1183  if (element_settings.keypress) {
1184    $(ajax.element).keypress(function (event) {
1185      return ajax.keypressResponse(this, event);
1186    });
1187  }
1188
1189  // If necessary, prevent the browser default action of an additional event.
1190  // For example, prevent the browser default action of a click, even if the
1191  // AJAX behavior binds to mousedown.
1192  if (element_settings.prevent) {
1193    $(ajax.element).bind(element_settings.prevent, false);
1194  }
1195};
1196
1197/**
1198 * Handle a key press.
1199 *
1200 * The Ajax object will, if instructed, bind to a key press response. This
1201 * will test to see if the key press is valid to trigger this event and
1202 * if it is, trigger it for us and prevent other keypresses from triggering.
1203 * In this case we're handling RETURN and SPACEBAR keypresses (event codes 13
1204 * and 32. RETURN is often used to submit a form when in a textfield, and 
1205 * SPACE is often used to activate an element without submitting. 
1206 */
1207Drupal.ajax.prototype.keypressResponse = function (element, event) {
1208  // Create a synonym for this to reduce code confusion.
1209  var ajax = this;
1210
1211  // Detect enter key and space bar and allow the standard response for them,
1212  // except for form elements of type 'text' and 'textarea', where the 
1213  // spacebar activation causes inappropriate activation if #ajax['keypress'] is 
1214  // TRUE. On a text-type widget a space should always be a space.
1215  if (event.which == 13 || (event.which == 32 && element.type != 'text' && element.type != 'textarea')) {
1216    $(ajax.element_settings.element).trigger(ajax.element_settings.event);
1217    return false;
1218  }
1219};
1220
1221/**
1222 * Handle an event that triggers an Ajax response.
1223 *
1224 * When an event that triggers an Ajax response happens, this method will
1225 * perform the actual Ajax call. It is bound to the event using
1226 * bind() in the constructor, and it uses the options specified on the
1227 * ajax object.
1228 */
1229Drupal.ajax.prototype.eventResponse = function (element, event) {
1230  // Create a synonym for this to reduce code confusion.
1231  var ajax = this;
1232
1233  // Do not perform another ajax command if one is already in progress.
1234  if (ajax.ajaxing) {
1235    return false;
1236  }
1237
1238  try {
1239    if (ajax.form) {
1240      // If setClick is set, we must set this to ensure that the button's
1241      // value is passed.
1242      if (ajax.setClick) {
1243        // Mark the clicked button. 'form.clk' is a special variable for
1244        // ajaxSubmit that tells the system which element got clicked to
1245        // trigger the submit. Without it there would be no 'op' or
1246        // equivalent.
1247        element.form.clk = element;
1248      }
1249
1250      ajax.form.ajaxSubmit(ajax.options);
1251    }
1252    else {
1253      ajax.beforeSerialize(ajax.element, ajax.options);
1254      $.ajax(ajax.options);
1255    }
1256  }
1257  catch (e) {
1258    // Unset the ajax.ajaxing flag here because it won't be unset during
1259    // the complete response.
1260    ajax.ajaxing = false;
1261    alert("An error occurred while attempting to process " + ajax.options.url + ": " + e.message);
1262  }
1263
1264  // For radio/checkbox, allow the default event. On IE, this means letting
1265  // it actually check the box.
1266  if (typeof element.type != 'undefined' && (element.type == 'checkbox' || element.type == 'radio')) {
1267    return true;
1268  }
1269  else {
1270    return false;
1271  }
1272
1273};
1274
1275/**
1276 * Handler for the form serialization.
1277 *
1278 * Runs before the beforeSend() handler (see below), and unlike that one, runs
1279 * before field data is collected.
1280 */
1281Drupal.ajax.prototype.beforeSerialize = function (element, options) {
1282  // Allow detaching behaviors to update field values before collecting them.
1283  // This is only needed when field values are added to the POST data, so only
1284  // when there is a form such that this.form.ajaxSubmit() is used instead of
1285  // $.ajax(). When there is no form and $.ajax() is used, beforeSerialize()
1286  // isn't called, but don't rely on that: explicitly check this.form.
1287  if (this.form) {
1288    var settings = this.settings || Drupal.settings;
1289    Drupal.detachBehaviors(this.form, settings, 'serialize');
1290  }
1291
1292  // Prevent duplicate HTML ids in the returned markup.
1293  // @see drupal_html_id()
1294  options.data['ajax_html_ids[]'] = [];
1295  $('[id]').each(function () {
1296    options.data['ajax_html_ids[]'].push(this.id);
1297  });
1298
1299  // Allow Drupal to return new JavaScript and CSS files to load without
1300  // returning the ones already loaded.
1301  // @see ajax_base_page_theme()
1302  // @see drupal_get_css()
1303  // @see drupal_get_js()
1304  options.data['ajax_page_state[theme]'] = Drupal.settings.ajaxPageState.theme;
1305  options.data['ajax_page_state[theme_token]'] = Drupal.settings.ajaxPageState.theme_token;
1306  for (var key in Drupal.settings.ajaxPageState.css) {
1307    options.data['ajax_page_state[css][' + key + ']'] = 1;
1308  }
1309  for (var key in Drupal.settings.ajaxPageState.js) {
1310    options.data['ajax_page_state[js][' + key + ']'] = 1;
1311  }
1312};
1313
1314/**
1315 * Modify form values prior to form submission.
1316 */
1317Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) {
1318  // This function is left empty to make it simple to override for modules
1319  // that wish to add functionality here.
1320};
1321
1322/**
1323 * Prepare the Ajax request before it is sent.
1324 */
1325Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {
1326  // For forms without file inputs, the jQuery Form plugin serializes the form
1327  // values, and then calls jQuery's $.ajax() function, which invokes this
1328  // handler. In this circumstance, options.extraData is never used. For forms
1329  // with file inputs, the jQuery Form plugin uses the browser's normal form
1330  // submission mechanism, but captures the response in a hidden IFRAME. In this
1331  // circumstance, it calls this handler first, and then appends hidden fields
1332  // to the form to submit the values in options.extraData. There is no simple
1333  // way to know which submission mechanism will be used, so we add to extraData
1334  // regardless, and allow it to be ignored in the former case.
1335  if (this.form) {
1336    options.extraData = options.extraData || {};
1337
1338    // Let the server know when the IFRAME submission mechanism is used. The
1339    // server can use this information to wrap the JSON response in a TEXTAREA,
1340    // as per http://jquery.malsup.com/form/#file-upload.
1341    options.extraData.ajax_iframe_upload = '1';
1342
1343    // The triggering element is about to be disabled (see below), but if it
1344    // contains a value (e.g., a checkbox, textfield, select, etc.), ensure that
1345    // value is included in the submission. As per above, submissions that use
1346    // $.ajax() are already serialized prior to the element being disabled, so
1347    // this is only needed for IFRAME submissions.
1348    var v = $.fieldValue(this.element);
1349    if (v !== null) {
1350      options.extraData[this.element.name] = Drupal.checkPlain(v);
1351    }
1352  }
1353
1354  // Disable the element that received the change to prevent user interface
1355  // interaction while the Ajax request is in progress. ajax.ajaxing prevents
1356  // the element from triggering a new request, but does not prevent the user
1357  // from changing its value.
1358  $(this.element).addClass('progress-disabled').attr('disabled', true);
1359
1360  // Insert progressbar or throbber.
1361  if (this.progress.type == 'bar') {
1362    var progressBar = new Drupal.progressBar('ajax-progress-' + this.element.i
1362d, eval(this.progress.update_callback), this.progress.method, eval(this.progress.error_callback));
1363    if (this.progress.message) {
1364      progressBar.setProgress(-1, this.progress.message);
1365    }
1366    if (this.progress.url) {
1367      progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
1368    }
1369    this.progress.element = $(progressBar.element).addClass('ajax-progress ajax-progress-bar');
1370    this.progress.object = progressBar;
1371    $(this.element).after(this.progress.element);
1372  }
1373  else if (this.progress.type == 'throbber') {
1374    this.progress.element = $('<div class="ajax-progress ajax-progress-throbber"><div class="throbber">&nbsp;</div></div>');
1375    if (this.progress.message) {
1376      $('.throbber', this.progress.element).after('<div class="message">' + this.progress.message + '</div>');
1377    }
1378    $(this.element).after(this.progress.element);
1379  }
1380};
1381
1382/**
1383 * Handler for the form redirection completion.
1384 */
1385Drupal.ajax.prototype.success = function (response, status) {
1386  // Remove the progress element.
1387  if (this.progress.element) {
1388    $(this.progress.element).remove();
1389  }
1390  if (this.progress.object) {
1391    this.progress.object.stopMonitoring();
1392  }
1393  $(this.element).removeClass('progress-disabled').removeAttr('disabled');
1394
1395  Drupal.freezeHeight();
1396
1397  for (var i in response) {
1398    if (response.hasOwnProperty(i) && response[i]['command'] && this.commands[response[i]['command']]) {
1399      this.commands[response[i]['command']](this, response[i], status);
1400    }
1401  }
1402
1403  // Reattach behaviors, if they were detached in beforeSerialize(). The
1404  // attachBehaviors() called on the new content from processing the response
1405  // commands is not sufficient, because behaviors from the entire form need
1406  // to be reattached.
1407  if (this.form) {
1408    var settings = this.settings || Drupal.settings;
1409    Drupal.attachBehaviors(this.form, settings);
1410  }
1411
1412  Drupal.unfreezeHeight();
1413
1414  // Remove any response-specific settings so they don't get used on the next
1415  // call by mistake.
1416  this.settings = null;
1417};
1418
1419/**
1420 * Build an effect object which tells us how to apply the effect when adding new HTML.
1421 */
1422Drupal.ajax.prototype.getEffect = function (response) {
1423  var type = response.effect || this.effect;
1424  var speed = response.speed || this.speed;
1425
1426  var effect = {};
1427  if (type == 'none') {
1428    effect.showEffect = 'show';
1429    effect.hideEffect = 'hide';
1430    effect.showSpeed = '';
1431  }
1432  else if (type == 'fade') {
1433    effect.showEffect = 'fadeIn';
1434    effect.hideEffect = 'fadeOut';
1435    effect.showSpeed = speed;
1436  }
1437  else {
1438    effect.showEffect = type + 'Toggle';
1439    effect.hideEffect = type + 'Toggle';
1440    effect.showSpeed = speed;
1441  }
1442
1443  return effect;
1444};
1445
1446/**
1447 * Handler for the form redirection error.
1448 */
1449Drupal.ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
1450  Drupal.displayAjaxError(Drupal.ajaxError(xmlhttprequest, uri, customMessage));
1451  // Remove the progress element.
1452  if (this.progress.element) {
1453    $(this.progress.element).remove();
1454  }
1455  if (this.progress.object) {
1456    this.progress.object.stopMonitoring();
1457  }
1458  // Undo hide.
1459  $(this.wrapper).show();
1460  // Re-enable the element.
1461  $(this.element).removeClass('progress-disabled').removeAttr('disabled');
1462  // Reattach behaviors, if they were detached in beforeSerialize().
1463  if (this.form) {
1464    var settings = this.settings || Drupal.settings;
1465    Drupal.attachBehaviors(this.form, settings);
1466  }
1467};
1468
1469/**
1470 * Provide a series of commands that the server can request the client perform.
1471 */
1472Drupal.ajax.prototype.commands = {
1473  /**
1474   * Command to insert new content into the DOM.
1475   */
1476  insert: function (ajax, response, status) {
1477    // Get information from the response. If it is not there, default to
1478    // our presets.
1479    var wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
1480    var method = response.method || ajax.method;
1481    var effect = ajax.getEffect(response);
1482
1483    // We don't know what response.data contains: it might be a string of text
1484    // without HTML, so don't rely on jQuery correctly iterpreting
1485    // $(response.data) as new HTML rather than a CSS selector. Also, if
1486    // response.data contains top-level text nodes, they get lost with either
1487    // $(response.data) or $('<div></div>').replaceWith(response.data).
1488    var new_content_wrapped = $('<div></div>').html(response.data);
1489    var new_content = new_content_wrapped.contents();
1490
1491    // For legacy reasons, the effects processing code assumes that new_content
1492    // consists of a single top-level element. Also, it has not been
1493    // sufficiently tested whether attachBehaviors() can be successfully called
1494    // with a context object that includes top-level text nodes. However, to
1495    // give developers full control of the HTML appearing in the page, and to
1496    // enable Ajax content to be inserted in places where DIV elements are not
1497    // allowed (e.g., within TABLE, TR, and SPAN parents), we check if the new
1498    // content satisfies the requirement of a single top-level element, and
1499    // only use the container DIV created above when it doesn't. For more
1500    // information, please see http://drupal.org/node/736066.
1501    if (new_content.length != 1 || new_content.get(0).nodeType != 1) {
1502      new_content = new_content_wrapped;
1503    }
1504
1505    // If removing content from the wrapper, detach behaviors first.
1506    switch (method) {
1507      case 'html':
1508      case 'replaceWith':
1509      case 'replaceAll':
1510      case 'empty':
1511      case 'remove':
1512        var settings = response.settings || ajax.settings || Drupal.settings;
1513        Drupal.detachBehaviors(wrapper, settings);
1514    }
1515
1516    // Add the new content to the page.
1517    wrapper[method](new_content);
1518
1519    // Immediately hide the new content if we're using any effects.
1520    if (effect.showEffect != 'show') {
1521      new_content.hide();
1522    }
1523
1524    // Determine which effect to use and what content will receive the
1525    // effect, then show the new content.
1526    if ($('.ajax-new-content', new_content).length > 0) {
1527      $('.ajax-new-content', new_content).hide();
1528      new_content.show();
1529      $('.ajax-new-content', new_content)[effect.showEffect](effect.showSpeed);
1530    }
1531    else if (effect.showEffect != 'show') {
1532      new_content[effect.showEffect](effect.showSpeed);
1533    }
1534
1535    // Attach all JavaScript behaviors to the new content, if it was successfully
1536    // added to the page, this if statement allows #ajax['wrapper'] to be
1537    // optional.
1538    if (new_content.parents('html').length > 0) {
1539      // Apply any settings from the returned JSON if available.
1540      var settings = response.settings || ajax.settings || Drupal.settings;
1541      Drupal.attachBehaviors(new_content, settings);
1542    }
1543  },
1544
1545  /**
1546   * Command to remove a chunk from the page.
1547   */
1548  remove: function (ajax, response, status) {
1549    var settings = response.settings || ajax.settings || Drupal.settings;
1550    Drupal.detachBehaviors($(response.selector), settings);
1551    $(response.selector).remove();
1552  },
1553
1554  /**
1555   * Command to mark a chunk changed.
1556   */
1557  changed: function (ajax, response, status) {
1558    if (!$(response.selector).hasClass('ajax-changed')) {
1559      $(response.selector).addClass('ajax-changed');
1560      if (response.asterisk) {
1561        $(response.selector).find(response.asterisk).append(' <span class="ajax-changed">*</span> ');
1562      }
1563    }
1564  },
1565
1566  /**
1567   * Command to provide an alert.
1568   */
1569  alert: function (ajax, response, status) {
1570    alert(response.text, response.title);
1571  },
1572
1573  /**
1574   * Command to provide the jQuery css() function.
1575   */
1576  css: function (ajax, response, status) {
1577    $(response.selector).css(response.argument);
1578  },
1579
1580  /**
1581   * Command to set the settings that will be used for other commands in this response.
1582   */
1583  settings: function (ajax, response, status) {
1584    if (response.merge) {
1585      $.extend(true, Drupal.settings, response.settings);
1586    }
1587    else {
1588      ajax.settings = response.settings;
1589    }
1590  },
1591
1592  /**
1593   * Command to attach data using jQuery's data API.
1594   */
1595  data: function (ajax, response, status) {
1596    $(response.selector).data(response.name, response.value);
1597  },
1598
1599  /**
1600   * Command to apply a jQuery method.
1601   */
1602  invoke: function (ajax, response, status) {
1603    var $element = $(response.selector);
1604    $element[response.method].apply($element, response.arguments);
1605  },
1606
1607  /**
1608   * Command to restripe a table.
1609   */
1610  restripe: function (ajax, response, status) {
1611    // :even and :odd are reversed because jQuery counts from 0 and
1612    // we count from 1, so we're out of sync.
1613    // Match immediate children of the parent element to allow nesting.
1614    $('> tbody > tr:visible, > tr:visible', $(response.selector))
1615      .removeClass('odd even')
1616      .filter(':even').addClass('odd').end()
1617      .filter(':odd').addClass('even');
1618  },
1619
1620  /**
1621   * Command to add css.
1622   *
1623   * Uses the proprietary addImport method if available as browsers which
1624   * support that method ignore @import statements in dynamically added
1625   * stylesheets.
1626   */
1627  add_css: function (ajax, response, status) {
1628    // Add the styles in the normal way.
1629    $('head').prepend(response.data);
1630    // Add imports in the styles using the addImport method if available.
1631    var match, importMatch = /^@import url\("(.*)"\);$/igm;
1632    if (document.styleSheets[0].addImport && importMatch.test(response.data)) {
1633      importMatch.lastIndex = 0;
1634      while (match = importMatch.exec(response.data)) {
1635        document.styleSheets[0].addImport(match[1]);
1636      }
1637    }
1638  },
1639
1640  /**
1641   * Command to update a form's build ID.
1642   */
1643  updateBuildId: function(ajax, response, status) {
1644    $('input[name="form_build_id"][value="' + response['old'] + '"]').val(response['new']);
1645  }
1646};
1647
1648})(jQuery);
1649
1650;/*})'"*/
1651;/*})'"*/
1652(function (D) {
1653  var beforeSerialize = D.ajax.prototype.beforeSerialize;
1654  D.ajax.prototype.beforeSerialize = function (element, options) {
1655    beforeSerialize.call(this, element, options);
1656    options.data['ajax_page_state[jquery_version]'] = D.settings.ajaxPageState.jquery_version;
1657  }
1658})(Drupal);
1659
1660;/*})'"*/
1661;/*})'"*/
1662// Set up a global variable to hold all SW Objects.
1663var sw_common = {};
1664;/*})'"*/
1665;/*})'"*/
1666(function ($) {
1667	sw_common.utility = (function(){
1668		// Force strict mode
1669		"use strict";
1670		
1671		console.log("sw_utility loaded.");
1672		
1673		
1674	});
1675}(jQuery));
1676;/*})'"*/
1677;/*})'"*/
1678( function ($) {
1679
1680	// If not set we are in Admin UI.
1681	if (typeof baseUrl !== 'undefined') {
1682		baseURL = Drupal.settings.sw_common.baseUrl;
1683	}
1684	else {
1685		baseURL = '';
1686	}
1687
1688	sw_common.form = (function() {
1689		// Force strict mode
1690		"use strict";
1691
1692		var bindCountryList = function(select, change) {
1693			var options = {
1694					url: baseURL + "/includes/countries.json",
1695					theme: "bootstrap",
1696					getValue: function(select) {
1697
1698						var selectedCountry = select.name;
1699						return selectedCountry;
1700					},
1701					list: {
1702						match: {
1703							enabled: true
1704						},
1705						onSelectItemEvent: function() {
1706							var value = $(select).getSelectedItemData().countryCallingCodes;
1707							$(change).val(value).trigger("change");
1708						},
1709					},
1710					adjustWidth: false,
1711				};
1712
1713			if (typeof $(select).easyAutocomplete !== "undefined") {
1714				$(select).easyAutocomplete(options);
1715			}
1716		}
1717
1718		return {
1719			bindCountryList : bindCountryList,
1720		}
1721	})();
1722}(jQuery) );
1723;/*})'"*/
1724;/*})'"*/
1725( function ($) {
1726
1727	sw_common.dialog = (function() {
1728
1729		// Force strict mode
1730		"use strict";
1731
1732		var bindDialog = function(select, target) {
1733
1734			let dialog
1735
1736			let contactID
1737			let sourceID
1738			let agentName = $('.contact-details .contact-name', select).text();
1739
1740			var dialogWidth = $(window).width();
1741
1742			let opt = {
1743				title: 'Contact ' + agentName,
1744				height: 'auto',
1745				width: dialogWidth,
1746				autoOpen: false,
1747				dialogClass: 'modal-dialog',
1748				resizable:false,
1749				draggable: false,
1750				autoResize: true,
1751
1752				open: function() {
1753					$('body').addClass('modal-open');
1754					// Get values for hidden fields.
1755					sourceID = $('.contact-details .source-id', select).text();
1756					contactID = $('.contact-details .contact-id', select).text();
1757
1758					// Wrap inner content so we can set overflow.
1759					$('.modal-dialog').wrapInner('<div class="modal-content"></div>');
1760
1761					if(document.getElementsByClassName('pre-instructions').length != 1) {
1762						// Reinsert pre-instructions div
1763						$('.modal-dialog form > div').prepend('<div class="pre-instructions"></div>');
1764					}
1765					// Set values for hidden fields.
1766					$(".field-name-field-sw-contact-id input", target).val(contactID);
1767					$(".field-name-field-sw-source-id input", target).val(sourceID);
1768				},
1769
1770				close: function(event, ui) {
1771					// location.reload();
1772					$(this).dialog("destroy");
1773					$('body').removeClass('modal-open');
1774				}
1775			};
1776
1777			let dialogInstance = $(target).dialog(opt).dialog("open");
1778			//console.log(dialogInstance);
1779		}
1780		return {
1781			bindDialog : bindDialog
1782		}
1783	})();
1784
1785	// Function to get the nid from a page for forms.
1786	function get_css_nid(identifier, attribute, filter) {
1787		var node = 0;
1788		var classList = $(identifier).attr(attribute).split(/\s+/);
1789		$.each(classList, function(index, item) {
1790			if (item.includes(filter)) {
1791				item = item.replace(filter, '');
1792				if (item.length > 0) {
1793					node = item;
1794				}
1795			}
1796		});
1797		return node;
1798	}
1799
1800}(jQuery) );
1801;/*})'"*/
1802;/*})'"*/
1803/**
1804 * Common JavaScript functionality for eRenewals
1805 * This file must be loaded last.
1806 */
1807(function ($) {
1808  Drupal.behaviors.swCommon = {
1809	attach: function (context, settings) {
1810
1811		$(document).ready(function($) {
1812
1813			baseURL = Drupal.settings.sw_common.baseUrl;
1814			/*---------- Country and Phone field autocomplete.---------*/
1815			// Landing page
1816			sw_common.form.bindCountryList($("#edit-submitted-sw-countries"), $("#edit-submitted-sw-phone"));
1817			// Contact page
1818			sw_common.form.bindCountryList($("#edit-field-sw-country-und-0-value"), $("#edit-field-sw-contact-ef-phone-und-0-value"));
1819		});
1820
1821		$('.btn-email').click(function() {
1822
1823			sw_common.dialog.bindDialog(this, $("#sw-contact-contact-entityform-edit-form"));
1824
1825			// Hide private fields
1826			$('.field-name-field-sw-contact-id, .field-name-field-sw-source-id').hide();
1827		});
1828
1829		$('#sw-contact-contact-entityform-edit-form').ajaxComplete(function(event, xhr, settings) {
1830
1831			// console.log("Event: ", settings);
1832
1833			if (settings.url == "/system/ajax") {
1834				// Move error messages to modal
1835				let messages = $('.block-entityform-block .messages.error');
1836
1837				if (messages.length >= 0) {
1838					$('.pre-instructions').html('<div class="error messages">' + messages.html() + '</div>');
1839					$('.modal-dialog').animate({scrollTop:$('.modal-content').position().top}, 'slow');
1840				}
1841
1842				// On successful submission display message and hide form.
1843				if (xhr.status == 200 && messages.length != 1) {
1844					messages = 'Thank you. Your enquiry has been submitted.';
1845					$('.pre-instructions').siblings().hide();
1846					$('.pre-instructions').html(messages);
1847				}
1848			}
1849		});
1850
1851    }
1852  };
1853}(jQuery));
1854
1855;/*})'"*/
1856;/*})'"*/
1857/**
1858 * @file
1859 * Handles ajax functionalities for Ajax Links API module.
1860 */
1861(function ($) {
1862  var ajaxLoading = false;
1863  Drupal.behaviors.ajaxLinksApi = {
1864    attach: function () {
1865      var trigger = Drupal.settings.ajax_links_api.trigger,
1866        negativeTrigger = Drupal.settings.ajax_links_api.negative_triggers;
1867
1868      // match the elements from the positive selector
1869      var $elements = $(trigger);
1870
1871      // remove elements if the negative trigger is specified
1872      if (negativeTrigger) {
1873        $elements = $elements.not(negativeTrigger);
1874      }
1875
1876      // add the click handler
1877      $elements.click(function(e) {
1878        e.preventDefault();
1879        var selector;
1880        if(!ajaxLoading) {
1881          ajaxLoading = true;
1882          var url = $(this).attr("href");
1883          var id = $(this).attr("rel");
1884          if(id) {
1885            selector = $(this).attr("rel");
1886          } else {
1887            selector = Drupal.settings.ajax_links_api.selector;
1888          }
1889          ajaxBefore(selector);
1890          ajaxLink(selector, url);          
1891        }
1892      });
1893    }
1894  };
1895  function  ajaxLink(selector, url) {
1896    $.ajax({
1897      url: url,
1898      type: "GET",
1899      data: "ajax=1",
1900      success: function (data) {        
1901        ajaxAfter(selector, url, data, window, document);
1902        Drupal.attachBehaviors(selector);
1903      },
1904      error: function (xhr) {
1905        var data = xhr.response.replace("?ajax=1", "");
1906        ajaxAfter(selector, url, data, window, document);
1907      }
1908    });
1909  }
1910  function ajaxBefore(selector){
1911    // Preserve the height of the current content to avoid the entire page
1912    // collapsing.
1913    $(selector).css('height', $(selector).height() + 'px');
1914
1915    // Replace the content with a throbber.
1916    $(selector).html("<div class='ajax-links-api-loading'></div>");
1917  }
1918  function ajaxAfter(selector, url, data, window, document){    
1919    // Reset the height of the container.
1920    $(selector).css('height', '');
1921
1922    // Replace the contents of the container with the data.
1923    $(selector).html(data);
1924
1925    // Update active class.
1926    $('a.active').removeClass('active').parents('li').removeClass('active-trail');
1927    $('a').filter(function() {
1928      return $(this).attr('href')== url
1929    }).addClass('active').parents('li').addClass('active-trail');
1930
1931    // Change Url if option is selected and for html5 compatible browsers.
1932    var html5 = Drupal.settings.ajax_links_api.html5;
1933    if(html5 == 1 && window.history.replaceState) {
1934      // get title of loaded content.
1935      var matches = data.match("<title>(.*?)</title>");
1936      if (matches) {
1937        // Decode any HTML entities.
1938        var title = $('<div/>').html(matches[1]).text();
1939        // Since title is not changing with window.history.pushState(),
1940        // manually change title. Possible bug with browsers.
1941        document.title = title;
1942      }
1943      // store current url.
1944      window.history.replaceState({page : 0} , document.title, window.location.href);
1945      // Change url.
1946      window.history.pushState({page : 1} , title, url);
1947      window.onpopstate = function (e) {
1948        window.history.go(0);
1949      };
1950    }
1951
1952    // Views Pager.
1953    // Please check http://drupal.org/node/1907376 for details.
1954    var viewsPager = Drupal.settings.ajax_links_api.vpager;
1955    if(viewsPager == 1) {
1956      $(selector + " .view .pager a").each(function(){
1957        var href = $(this).attr('href');
1958        href = href.replace("?ajax=1", "");
1959        href = href.replace("&ajax=1", "");
1960        $(this).attr('href', href);
1961      });
1962    }
1963
1964    // Form Validation.
1965    // Plese check http://drupal.org/node/1760414 for details.
1966    var formAction = $(selector + " form").attr('action');
1967    if (formAction) {
1968      formAction = formAction.replace("?ajax=1", "");
1969      $("form").attr('action', formAction);
1970    }    
1971  }
1972})(jQuery);
1973
1974;/*})'"*/
1975;/*})'"*/
1976jQuery(document).ready(function() {
1977  var groupClasses = new Array();
1978  jQuery('.search-result.solr-grouped').each(function(index, item){
1979    item = jQuery(item)
1980    currentGroupClass = item.attr('class').substr(item.attr('class').lastIndexOf('solr-group-'));
1981    if(jQuery.inArray(currentGroupClass, groupClasses) < 0) {
1982      groupClasses.push(currentGroupClass);
1983    }
1984  });
1985
1986  jQuery.each(groupClasses, function(index, item) {
1987    currentGroup = jQuery('.search-result.solr-grouped.' + item);
1988    currentGroup.wrapAll('<li id="' + item + '-all" />');
1989    currentGroup.wrapAll('<ol class="apachesolr_search-results-grouped 
1989search-results-grouped">');
1990    jQuery('#' + item + '-all').prepend('<span>Group: ' + item.replace('solr-group-', '') +'</span>');
1991  });
1992});
1993
1994;/*})'"*/
1995;/*})'"*/
1996/**
1997 * @file
1998 * Provides responsive menu toggle and dropdown functionality.
1999 */
2000
2001(function ($) {
2002  Drupal.behaviors.responsiveDropdownMenuToggle = {
2003    attach: function(context, settings) {
2004
2005      var responsiveDropdownMenus = Drupal.settings.responsive_dropdown_menus;
2006      var menuToggleHelper = Drupal.t('Menu');
2007
2008      // Cycle through responsive dropdown menu blocks.
2009      $('.responsive-menu', context).each(function(index) {
2010        var menuID = $(this).attr('id');
2011
2012        // Check if delta equals the element's ID.
2013        $.each(responsiveDropdownMenus, function(delta, title) {
2014          if(delta == menuID) {
2015            menuToggleHelper = title;
2016          }
2017        });
2018        if(!$(this).prev().hasClass('menu-toggle')) {
2019          // Drop in our menu toggle.
2020          var title = Drupal.t('Toggle Menu');
2021          $(this).before('<a class="menu-toggle" title="' + title + '"><span class="line first-line first"></span><span class="line"></span><span class="line last-line last"></span><span class="toggle-help">' + menuToggleHelper + '</span></a>');
2022        }
2023      });
2024
2025      // Bind click event to toggle.
2026      $('.menu-toggle').click(function(){
2027        $(this).next().toggleClass('menu-toggled');
2028      });
2029    }
2030  };
2031
2032  Drupal.behaviors.responsiveDropdownMenuDropDown = {
2033    attach: function(context) {
2034      $('.responsive-menu li.menu-parent').hover(
2035        function() {
2036          $(this).find('.sub-menu').addClass('active');
2037        },
2038        function() {
2039          $(this).find('.sub-menu').removeClass('active');
2040        }
2041      );
2042    }
2043  }
2044})(jQuery);
2045
2046;/*})'"*/
2047;/*})'"*/
2048( function ($) {
2049
2050	// Add disclaimer ID for Privacy policy page
2051	$("body.node-type-page #block-system-main H1:contains('disclaimer')").attr('id', 'disclaimer');
2052
2053}(jQuery) );
2054;/*})'"*/
2055;/*})'"*/
2056/**
2057 * @file
2058 * A JavaScript file for the theme.
2059 *
2060 * In order for this JavaScript to be loaded on pages, see the instructions in
2061 * the README.txt next to this file.
2062 */
2063
2064// JavaScript should be made compatible with libraries other than jQuery by
2065// wrapping it with an "anonymous closure". See:
2066// - https://drupal.org/node/1446420
2067// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
2068
2069(function ($, Drupal, window, document, undefined) {
2070
2071  Drupal.behaviors.swHelper = {
2072    attach: function(context, settings) {
2073
2074      jQuery('.field-name-field-sw-listing-link a', context).once('swHelper', function () {
2075        jQuery('.field-name-field-sw-listing-link a').attr('target', '_blank');
2076      });
2077
2078      jQuery('.field.field-name-field-sw-contacts > .field-label', context).once('swHelper', function () {
2079        contact_label = jQuery('.field.field-name-field-sw-contacts > .field-label').html();
2080        jQuery('.field.field-name-field-sw-contacts').before('<div class="field-contact-label">' + contact_label + '</div>');
2081      });
2082
2083      jQuery('.field.field-name-field-sw-contacts', context).once('swHelper', function () {
2084
2085      	jQuery('.btn-phone').click( function() {
2086			   jQuery(this).next(".field.field-name-field-sw-contact-phone-number").toggle();
2087		    });
2088
2089        listing_link = jQuery('.field.field-name-field-sw-listing-link').html();
2090        landing_page_cta = jQuery('.field.field-name-field-sw-ad-entity-reference').html();
2091
2092        jQuery('.field.field-name-field-sw-contacts').each(function() {
2093          jQuery('.field.field-name-field-sw-contacts > .field-items > .field-item').append(listing_link);
2094          jQuery('.field.field-name-field-sw-contacts > .field-items > .field-item').append(landing_page_cta);
2095
2096          jQuery('.field.field-name-field-sw-listing-link').remove();
2097          jQuery('.field.field-name-field-sw-ad-entity-reference').remove();
2098        });
2099
2100      });
2101
2102    }
2103  };
2104})(jQuery, Drupal, this, this.document);
2105;/*})'"*/
2106;/*})'"*/
2107
2108/**
2109 * Adds the custom autocomplete widget behavior.
2110 */
2111 Drupal.apachesolr_autocomplete = {
2112   processOne: function(key, settings, context) {
2113      // Look for items with the data-apachesolr-autocomplete-id attribute.
2114      jQuery(".apachesolr-autocomplete[data-apachesolr-autocomplete-id='"+ ke
2114y +"']", context)
2115      .autocomplete(settings.path, {
2116      // Classnames for the widget.
2117      inputClass: "",
2118      loadingClass: "throbbing",
2119      // Do not select first suggestion by default.
2120      selectFirst: false,
2121      // Specify no matching as it wil be done on server-side.
2122      matchContains: false,
2123      matchSubset: false,
2124      // Maximum number of items to show in widget.
2125      max: 50,
2126      scroll: true,
2127      scrollHeight: 360,
2128      // Data returned from server is JSON-encoded.
2129      dataType: "json",
2130      // Function to parse returned json into elements.
2131      parse: function(data) {
2132        return jQuery.map(data, function(item) {
2133          return {
2134            data: item,          // Echo the input data.
2135            value: item.display, // This will be shown in the options widget.
2136            result: item.key     // The actual value to put into the form element.
2137          }
2138        });
2139      },
2140      // Return the HTML to display in the options widget.
2141      formatItem: function(item) {
2142        return item.display;
2143      }
2144    }).result(function(item, element) {
2145      // Handle selection of an element in the autocomplete widget.
2146      // We should submit the widget's parent form.
2147      jQuery(this).get(0).form.submit();
2148    }).addClass('form-autocomplete'); // Add Drupal autocomplete widget's style.
2149  }
2150}
2151Drupal.behaviors.apachesolr_autocomplete = {
2152    attach: function(context) {
2153      // Check that settings exist.
2154      if (! Drupal.settings.apachesolr_autocomplete) {
2155        return;
2156      }
2157      // Cycle thru the settings array which contains:
2158      //   key => settingsArray
2159      // where
2160      //   key: the data-apachesolr-autocomplete-id HTML attribute to look for
2161      //        (which was added on the form_alter)
2162      //   settings: and
2163      jQuery.each(Drupal.settings.apachesolr_autocomplete, function (key, settings) {
2164        Drupal.apachesolr_autocomplete.processOne(key, settings, context);
2165      });
2166    }
2167};
2168
2169;/*})'"*/
2170;/*})'"*/
2171/*
2172 * jQuery Autocomplete plugin 1.1
2173 *
2174 * Copyright (c) 2009 Jörn Zaefferer
2175 *
2176 * Dual licensed under the MIT and GPL licenses:
2177 *   http://www.opensource.org/licenses/mit-license.php
2178 *   http://www.gnu.org/licenses/gpl.html
2179 *
2180 */
2181
2182;(function($) {
2183	
2184$.fn.extend({
2185	autocomplete: function(urlOrData, options) {
2186		var isUrl = typeof urlOrData == "string";
2187		options = $.extend({}, $.Autocompleter.defaults, {
2188			url: isUrl ? urlOrData : null,
2189			data: isUrl ? null : urlOrData,
2190			delay: isUrl ? $.Autocompleter.defaults.delay : 10,
2191			max: options && !options.scroll ? 10 : 150
2192		}, options);
2193		
2194		// if highlight is set to false, replace it with a do-nothing function
2195		options.highlight = options.highlight || function(value) { return value; };
2196		
2197		// if the formatMatch option is not specified, then use formatItem for backwards compatibility
2198		options.formatMatch = options.formatMatch || options.formatItem;
2199		
2200		return this.each(function() {
2201			new $.Autocompleter(this, options);
2202		});
2203	},
2204	result: function(handler) {
2205		return this.bind("result", handler);
2206	},
2207	search: function(handler) {
2208		return this.trigger("search", [handler]);
2209	},
2210	flushCache: function() {
2211		return this.trigger("flushCache");
2212	},
2213	setOptions: function(options){
2214		return this.trigger("setOptions", [options]);
2215	},
2216	unautocomplete: function() {
2217		return this.trigger("unautocomplete");
2218	}
2219});
2220
2221$.Autocompleter = function(input, options) {
2222
2223	var KEY = {
2224		UP: 38,
2225		DOWN: 40,
2226		DEL: 46,
2227		TAB: 9,
2228		RETURN: 13,
2229		ESC: 27,
2230		COMMA: 188,
2231		PAGEUP: 33,
2232		PAGEDOWN: 34,
2233		BACKSPACE: 8
2234	};
2235
2236	// Create $ object for input element
2237	var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
2238
2239	var timeout;
2240	var previousValue = "";
2241	var cache = $.Autocompleter.Cache(options);
2242	var hasFocus = 0;
2243	var lastKeyPressCode;
2244	var config = {
2245		mouseDownOnSelect: false
2246	};
2247	var select = $.Autocompleter.Select(options, input, selectCurrent, config);
2248	
2249	var blockSubmit;
2250	
2251	// prevent form submit in opera when selecting with return key
2252	$.browser.opera && $(input.form).bind("submit.autocomplete", function() {
2253		if (blockSubmit) {
2254			blockSubmit = false;
2255			return false;
2256		}
2257	});
2258	
2259	// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
2260	$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
2261		// a keypress means the input has focus
2262		// avoids issue where input had focus before the autocomplete was applied
2263		hasFocus = 1;
2264		// track last key pressed
2265		lastKeyPressCode = event.keyCode;
2266		switch(event.keyCode) {
2267		
2268			case KEY.UP:
2269				event.preventDefault();
2270				if ( select.visible() ) {
2271					select.prev();
2272				} else {
2273					onChange(0, true);
2274				}
2275				break;
2276				
2277			case KEY.DOWN:
2278				event.preventDefault();
2279				if ( select.visible() ) {
2280					select.next();
2281				} else {
2282					onChange(0, true);
2283				}
2284				break;
2285				
2286			case KEY.PAGEUP:
2287				event.preventDefault();
2288				if ( select.visible() ) {
2289					select.pageUp();
2290				} else {
2291					onChange(0, true);
2292				}
2293				break;
2294				
2295			case KEY.PAGEDOWN:
2296				event.preventDefault();
2297				if ( select.visible() ) {
2298					select.pageDown();
2299				} else {
2300					onChange(0, true);
2301				}
2302				break;
2303			
2304			// matches also semicolon
2305			case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
2306			case KEY.TAB:
2307			case KEY.RETURN:
2308				if( selectCurrent() ) {
2309					// stop default to prevent a form submit, Opera needs special handling
2310					event.preventDefault();
2311					blockSubmit = true;
2312					return false;
2313				}
2314				break;
2315				
2316			case KEY.ESC:
2317				select.hide();
2318				break;
2319				
2320			default:
2321				clearTimeout(timeout);
2322				timeout = setTimeout(onChange, options.delay);
2323				break;
2324		}
2325	}).focus(function(){
2326		// track whether the field has focus, we shouldn't process any
2327		// results if the field no longer has focus
2328		hasFocus++;
2329	}).blur(function() {
2330		hasFocus = 0;
2331		if (!config.mouseDownOnSelect) {
2332			hideResults();
2333		}
2334	}).click(function() {
2335		// show select when clicking in a focused field
2336		if ( hasFocus++ > 1 && !select.visible() ) {
2337			onChange(0, true);
2338		}
2339	}).bind("search", function() {
2340		// TODO why not just specifying both arguments?
2341		var fn = (arguments.length > 1) ? arguments[1] : null;
2342		function findValueCallback(q, data) {
2343			var result;
2344			if( data && data.length ) {
2345				for (var i=0; i < data.length; i++) {
2346					if( data[i].result.toLowerCase() == q.toLowerCase() ) {
2347						result = data[i];
2348						break;
2349					}
2350				}
2351			}
2352			if( typeof fn == "function" ) fn(result);
2353			else $input.trigger("result", result && [result.data, result.value]);
2354		}
2355		$.each(trimWords($input.val()), function(i, value) {
2356			request(value, findValueCallback, findValueCallback);
2357		});
2358	}).bind("flushCache", function() {
2359		cache.flush();
2360	}).bind("setOptions", function() {
2361		$.extend(options, arguments[1]);
2362		// if we've updated the data, repopulate
2363		if ( "data" in arguments[1] )
2364			cache.populate();
2365	}).bind("unautocomplete", function() {
2366		select.unbind();
2367		$input.unbind();
2368		$(input.form).unbind(".autocomplete");
2369	});
2370	
2371	
2372	function selectCurrent() {
2373		var selected = select.selected();
2374		if( !selected )
2375			return false;
2376		
2377		var v = selected.result;
2378		previousValue = v;
2379		
2380		if ( options.multiple ) {
2381			var words = trimWords($input.val());
2382			if ( words.length > 1 ) {
2383				var seperator = options.multipleSeparator.length;
2384				var cursorAt = $(input).selection().start;
2385				var wordAt, progress = 0;
2386				$.each(words, function(i, word) {
2387					progress += word.length;
2388					if (cursorAt <= progress) {
2389						wordAt = i;
2390						return false;
2391					}
2392					progress += seperator;
2393				});
2394				words[wordAt] = v;
2395				// TODO this should set the cursor to the right position, but it gets overriden somewhere
2396				//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
2397				v = words.join( options.multipleSeparator );
2398			}
2399			v += options.multipleSeparator;
2400		}
2401		
2402		$input.val(v);
2403		hideResultsNow();
2404		$input.trigger("result", [selected.data, selected.value]);
2405		return true;
2406	}
2407	
2408	function onChange(crap, skipPrevCheck) {
2409		if( lastKeyPressCode == KEY.DEL ) {
2410			select.hide();
2411			return;
2412		}
2413		
2414		var currentValue = $input.val();
2415		
2416		if ( !skipPrevCheck && currentValue == previousValue )
2417			return;
2418		
2419		previousValue = currentValue;
2420		
2421		currentValue = lastWord(currentValue);
2422		if ( currentValue.length >= options.minChars) {
2423			$input.addClass(options.loadingClass);
2424			if (!options.matchCase)
2425				currentValue = currentValue.toLowerCase();
2426			request(currentValue, receiveData, hideResultsNow);
2427		} else {
2428			stopLoading();
2429			select.hide();
2430		}
2431	};
2432	
2433	function trimWords(value) {
2434		if (!value)
2435			return [""];
2436		if (!options.multiple)
2437			return [$.trim(value)];
2438		return $.map(value.split(options.multipleSeparator), function(word) {
2439			return $.trim(value).length ? $.trim(word) : null;
2440		});
2441	}
2442	
2443	function lastWord(value) {
2444		if ( !options.multiple )
2445			return value;
2446		var words = trimWords(value);
2447		if (words.length == 1) 
2448			return words[0];
2449		var cursorAt = $(input).selection().start;
2450		if (cursorAt == value.length) {
2451			words = trimWords(value)
2452		} else {
2453			words = trimWords(value.replace(value.substring(cursorAt), ""));
2454		}
2455		return words[words.length - 1];
2456	}
2457	
2458	// fills in the input box w/the first match (assumed to be the best match)
2459	// q: the term entered
2460	// sValue: the first matching result
2461	function autoFill(q, sValue){
2462		// autofill in the complete box w/the first match as long as the user hasn't entered in more data
2463		// if the last user key pressed was backspace, don't autofill
2464		if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
2465			// fill in the value (keep the case the user has typed)
2466			$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
2467			// select the portion of the value not typed by the user (so the next character will erase)
2468			$(input).selection(previousValue.length, previousValue.length + sValue.length);
2469		}
2470	};
2471
2472	function hideResults() {
2473		clearTimeout(timeout);
2474		timeout = setTimeout(hideResultsNow, 200);
2475	};
2476
2477	function hideResultsNow() {
2478		var wasVisible = select.visible();
2479		select.hide();
2480		clearTimeout(timeout);
2481		stopLoading();
2482		if (options.mustMatch) {
2483			// call search and run callback
2484			$input.search(
2485				function (result){
2486					// if no value found, clear the input box
2487					if( !result ) {
2488						if (options.multiple) {
2489							var words = trimWords($input.val()).slice(0, -1);
2490							$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
2491						}
2492						else {
2493							$input.val( "" );
2494							$input.trigger("result", null);
2495						}
2496					}
2497				}
2498			);
2499		}
2500	};
2501
2502	function receiveData(q, data) {
2503		if ( data && data.length && hasFocus ) {
2504			stopLoading();
2505			select.display(data, q);
2506			autoFill(q, data[0].value);
2507			select.show();
2508		} else {
2509			hideResultsNow();
2510		}
2511	};
2512
2513	function request(term, success, failure) {
2514		if (!options.matchCase)
2515			term = term.toLowerCase();
2516		var data = cache.load(term);
2517		// recieve the cached data
2518		if (data && data.length) {
2519			success(term, data);
2520		// if an AJAX url has been supplied, try loading the data now
2521		} else if( (typeof options.url == "string") && (options.url.length > 0) ){
2522			
2523			var extraParams = {
2524				timestamp: +new Date()
2525			};
2526			$.each(options.extraParams, function(key, param) {
2527				extraParams[key] = typeof param == "function" ? param() : param;
2528			});
2529			
2530			$.ajax({
2531				// try to leverage ajaxQueue plugin to abort previous requests
2532				mode: "abort",
2533				// limit abortion to this input
2534				port: "autocomplete" + input.name,
2535				dataType: options.dataType,
2536				url: options.url,
2537				data: $.extend({
2538					query: lastWord(term),
2539					limit: options.max
2540				}, extraParams),
2541				success: function(data) {
2542					var parsed = options.parse && options.parse(data) || parse(data);
2543					cache.add(term, parsed);
2544					success(term, parsed);
2545				}
2546			});
2547		} else {
2548			// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
2549			select.emptyList();
2550			failure(term);
2551		}
2552	};
2553	
2554	function parse(data) {
2555		var parsed = [];
2556		var rows = data.split("\n");
2557		for (var i=0; i < rows.length; i++) {
2558			var row = $.trim(rows[i]);
2559			if (row) {
2560				row = row.split("|");
2561				parsed[parsed.length] = {
2562					data: row,
2563					value: row[0],
2564					result: options.formatResult && options.formatResult(row, row[0]) || row[0]
2565				};
2566			}
2567		}
2568		return parsed;
2569	};
2570
2571	function stopLoading() {
2572		$input.removeClass(options.loadingClass);
2573	};
2574
2575};
2576
2577$.Autocompleter.defaults = {
2578	inputClass: "ac_input",
2579	resultsClass: "ac_results",
2580	loadingClass: "ac_loading",
2581	minChars: 1,
2582	delay: 400,
2583	matchCase: false,
2584	matchSubset: true,
2585	matchContains: false,
2586	cacheLength: 10,
2587	max: 100,
2588	mustMatch: false,
2589	extraParams: {},
2590	selectFirst: true,
2591	formatItem: function(row) { return row[0]; },
2592	formatMatch: null,
2593	autoFill: false,
2594	width: 0,
2595	multiple: false,
2596	multipleSeparator: ", ",
2597	highlight: function(value, term) {
2598		return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
2599	},
2600    scroll: true,
2601    scrollHeight: 180
2602};
2603
2604$.Autocompleter.Cache = function(options) {
2605
2606	var data = {};
2607	var length = 0;
2608	
2609	function matchSubset(s, sub) {
2610		if (!options.matchCase) 
2611			s = s.toLowerCase();
2612		var i = s.indexOf(sub);
2613		if (options.matchContains == "word"){
2614			i = s.toLowerCase().search("\\b" + sub.toLowerCase());
2615		}
2616		if (i == -1) return false;
2617		return i == 0 || options.matchContains;
2618	};
2619	
2620	function add(q, value) {
2621		if (length > options.cacheLength){
2622			flush();
2623		}
2624		if (!data[q]){ 
2625			length++;
2626		}
2627		data[q] = value;
2628	}
2629	
2630	function populate(){
2631		if( !options.data ) return false;
2632		// track the matches
2633		var stMatchSets = {},
2634			nullData = 0;
2635
2636		// no url was specified, we need to adjust the cache length to make sure it fits the local data store
2637		if( !options.url ) options.cacheLength = 1;
2638		
2639		// track all options for minChars = 0
2640		stMatchSets[""] = [];
2641		
2642		// loop through the array and create a lookup structure
2643		for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
2644			var rawValue = options.data[i];
2645			// if rawValue is a string, make an array otherwise just reference the array
2646			rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
2647			
2648			var value = options.formatMatch(rawValue, i+1, options.data.length);
2649			if ( value === false )
2650				continue;
2651				
2652			var firstChar = value.charAt(0).toLowerCase();
2653			// if no lookup array for this character exists, look it up now
2654			if( !stMatchSets[firstChar] ) 
2655				stMatchSets[firstChar] = [];
2656
2657			// if the match is a string
2658			var row = {
2659				value: value,
2660				data: rawValue,
2661				result: options.formatResult && options.formatResult(rawValue) || value
2662			};
2663			
2664			// push the current match into the set list
2665			stMatchSets[firstChar].push(row);
2666
2667			// keep track of minChars zero items
2668			if ( nullData++ < options.max ) {
2669				stMatchSets[""].push(row);
2670			}
2671		};
2672
2673		// add the data items to the cache
2674		$.each(stMatchSets, function(i, value) {
2675			// increase the cache size
2676			options.cacheLength++;
2677			// add to the cache
2678			add(i, value);
2679		});
2680	}
2681	
2682	// populate any existing data
2683	setTimeout(populate, 25);
2684	
2685	function flush(){
2686		data = {};
2687		length = 0;
2688	}
2689	
2690	return {
2691		flush: flush,
2692		add: add,
2693		populate: populate,
2694		load: function(q) {
2695			if (!options.cacheLength || !length)
2696				return null;
2697			/* 
2698			 * if dealing w/local data and matchContains than we must make sure
2699			 * to loop through all the data collections looking for matches
2700			 */
2701			if( !options.url && options.matchContains ){
2702				// track all matches
2703				var csub = [];
2704				// loop through all the data grids for matches
2705				for( var k in data ){
2706					// don't search through the stMatchSets[""] (minChars: 0) cache
2707					// this prevents duplicates
2708					if( k.length > 0 ){
2709						var c = data[k];
2710						$.each(c, function(i, x) {
2711							// if we've got a match, add it to the array
2712							if (matchSubset(x.value, q)) {
2713								csub.push(x);
2714							}
2715						});
2716					}
2717				}				
2718				return csub;
2719			} else 
2720			// if the exact item exists, use it
2721			if (data[q]){
2722				return data[q];
2723			} else
2724			if (options.matchSubset) {
2725				for (var i = q.length - 1; i >= options.minChars; i--) {
2726					var c = data[q.substr(0, i)];
2727					if (c) {
2728						var csub = [];
2729						$.each(c, function(i, x) {
2730							if (matchSubset(x.value, q)) {
2731								csub[csub.length] = x;
2732							}
2733						});
2734						return csub;
2735					}
2736				}
2737			}
2738			return null;
2739		}
2740	};
2741};
2742
2743$.Autocompleter.Select = function (options, input, select, config) {
2744	var CLASSES = {
2745		ACTIVE: "ac_over"
2746	};
2747	
2748	var listItems,
2749		active = -1,
2750		data,
2751		term = "",
2752		needsInit = true,
2753		element,
2754		list;
2755	
2756	// Create results
2757	function init() {
2758		if (!needsInit)
2759			return;
2760		element = $("<div/>")
2761		.hide()
2762		.addClass(options.resultsClass)
2763		.css("position", "absolute")
2764		.appendTo(document.body);
2765	
2766		list = $("<ul/>").appendTo(element).mouseover( function(event) {
2767			if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
2768	            active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
2769			    $(target(event)).addClass(CLASSES.ACTIVE);            
2770	        }
2771		}).click(function(event) {
2772			$(target(event)).addClass(CLASSES.ACTIVE);
2773			select();
2774			// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
2775			input.focus();
2776			return false;
2777		}).mousedown(function() {
2778			config.mouseDownOnSelect = true;
2779		}).mouseup(function() {
2780			config.mouseDownOnSelect = false;
2781		});
2782		
2783		if( options.width > 0 )
2784			element.css("width", options.width);
2785			
2786		needsInit = false;
2787	} 
2788	
2789	function target(event) {
2790		var element = event.target;
2791		while(element && element.tagName != "LI")
2792			element = element.parentNode;
2793		// more fun with IE, sometimes event.target is empty, just ignore it then
2794		if(!element)
2795			return [];
2796		return element;
2797	}
2798
2799	function moveSelect(step) {
2800		listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
2801		movePosition(step);
2802        var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
2803        if(options.scroll) {
2804            var offset = 0;
2805            listItems.slice(0, active).each(function() {
2806				offset += this.offsetHeight;
2807			});
2808            if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
2809                list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
2810            } else if(offset < list.scrollTop()) {
2811                list.scrollTop(offset);
2812            }
2813        }
2814	};
2815	
2816	function movePosition(step) {
2817		active += step;
2818		if (active < 0) {
2819			active = listItems.size() - 1;
2820		} else if (active >= listItems.size()) {
2821			active = 0;
2822		}
2823	}
2824	
2825	function limitNumberOfItems(available) {
2826		return options.max && options.max < available
2827			? options.max
2828			: available;
2829	}
2830	
2831	function fillList() {
2832		list.empty();
2833		var max = limitNumberOfItems(data.length);
2834		for (var i=0; i < max; i++) {
2835			if (!data[i])
2836				continue;
2837			var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
2838			if ( formatted === false )
2839				continue;
2840			var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
2841			$.data(li, "ac_data", data[i]);
2842		}
2843		listItems = list.find("li");
2844		if ( options.selectFirst ) {
2845			listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
2846			active = 0;
2847		}
2848		// apply bgiframe if available
2849		if ( $.fn.bgiframe )
2850			list.bgiframe();
2851	}
2852	
2853	return {
2854		display: function(d, q) {
2855			init();
2856			data = d;
2857			term = q;
2858			fillList();
2859		},
2860		next: function() {
2861			moveSelect(1);
2862		},
2863		prev: function() {
2864			moveSelect(-1);
2865		},
2866		pageUp: function() {
2867			if (active != 0 && active - 8 < 0) {
2868				moveSelect( -active );
2869			} else {
2870				moveSelect(-8);
2871			}
2872		},
2873		pageDown: function() {
2874			if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
2875				moveSelect( listItems.size() - 1 - active );
2876			} else {
2877				moveSelect(8);
2878			}
2879		},
2880		hide: function() {
2881			element && element.hide();
2882			listItems && listItems.removeClass(CLASSES.ACTIVE);
2883			active = -1;
2884		},
2885		visible : function() {
2886			return element && element.is(":visible");
2887		},
2888		current: function() {
2889			return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
2890		},
2891		show: function() {
2892			var offset = $(input).offset();
2893			element.css({
2894				width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
2895				top: offset.top + input.offsetHeight,
2896				left: offset.left
2897			}).show();
2898            if(options.scroll) {
2899                list.scrollTop(0);
2900                list.css({
2901					maxHeight: options.scrollHeight,
2902					overflow: 'auto'
2903				});
2904				
2905                if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
2906					var listHeight = 0;
2907					listItems.each(function() {
2908						listHeight += this.offsetHeight;
2909					});
2910					var scrollbarsVisible = listHeight > options.scrollHeight;
2911                    list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
2912					if (!scrollbarsVisible) {
2913						// IE doesn't recalculate width when scrollbar disappears
2914						listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
2915					}
2916                }
2917                
2918            }
2919		},
2920		selected: function() {
2921			var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
2922			return selected && selected.length && $.data(selected[0], "ac_data");
2923		},
2924		emptyList: function (){
2925			list && list.empty();
2926		},
2927		unbind: function() {
2928			element && element.remove();
2929		}
2930	};
2931};
2932
2933$.fn.selection = function(start, end) {
2934	if (start !== undefined) {
2935		return this.each(function() {
2936			if( this.createTextRange ){
2937				var selRange = this.createTextRange();
2938				if (end === undefined || start == end) {
2939					selRange.move("character", start);
2940					selRange.select();
2941				} else {
2942					selRange.collapse(true);
2943					selRange.moveStart("character", start);
2944					selRange.moveEnd("character", end);
2945					selRange.select();
2946				}
2947			} else if( this.setSelectionRange ){
2948				this.setSelectionRange(start, end);
2949			} else if( this.selectionStart ){
2950				this.selectionStart = start;
2951				this.selectionEnd = end;
2952			}
2953		});
2954	}
2955	var field = this[0];
2956	if ( field.createTextRange ) {
2957		var range = document.selection.createRange(),
2958			orig = field.value,
2959			teststring = "<->",
2960			textLength = range.text.length;
2961		range.text = teststring;
2962		var caretAt = field.value.indexOf(teststring);
2963		field.value = orig;
2964		this.selection(caretAt, caretAt + textLength);
2965		return {
2966			start: caretAt,
2967			end: caretAt + textLength
2968		}
2969	} else if( field.selectionStart !== undefined ){
2970		return {
2971			start: field.selectionStart,
2972			end: field.selectionEnd
2973		}
2974	}
2975};
2976
2977}
2977)(jQuery);
2978
2979;/*})'"*/
2980;/*})'"*/
vendor: 15,833 bytes, lines 2981-2990
2981/*
2982 * easy-autocomplete
2983 * jQuery plugin for autocompletion
2984 * 
2985 * @author Łukasz Pawełczak (http://github.com/pawelczak)
2986 * @version 1.3.5
2987 * Copyright  License: 
2988 */
2989
2990var EasyAutocomplete=function(a){return a.Configuration=function(a){function b(){if("xml"===a.dataType&&(a.getValue||(a.getValue=function(a){return $(a).text()}),a.list||(a.list={}),a.list.sort||(a.list.sort={}),a.list.sort.method=function(b,c){return b=a.getValue(b),c=a.getValue(c),c>b?-1:b>c?1:0},a.list.match||(a.list.match={}),a.list.match.method=function(a,b){return a.search(b)>-1}),void 0!==a.categories&&a.categories instanceof Array){for(var b=[],c=0,d=a.categories.length;d>c;c+=1){var e=a.categories[c];for(var f in h.categories[0])void 0===e[f]&&(e[f]=h.categories[0][f]);b.push(e)}a.categories=b}}function c(){function b(a,c){var d=a||{};for(var e in a)void 0!==c[e]&&null!==c[e]&&("object"!=typeof c[e]||c[e]instanceof Array?d[e]=c[e]:b(a[e],c[e]));return void 0!==c.data&&null!==c.data&&"object"==typeof c.data&&(d.data=c.data),d}h=b(h,a)}function d(){if("list-required"!==h.url&&"function"!=typeof h.url){var b=h.url;h.url=function(){return b}}if(void 0!==h.ajaxSettings.url&&"function"!=typeof h.ajaxSettings.url){var b=h.ajaxSettings.url;h.ajaxSettings.url=function(){return b}}if("string"==typeof h.listLocation){var c=h.listLocation;"XML"===h.dataType.toUpperCase()?h.listLocation=function(a){return $(a).find(c)}:h.listLocation=function(a){return a[c]}}if("string"==typeof h.getValue){var d=h.getValue;h.getValue=function(a){return a[d]}}void 0!==a.categories&&(h.categoriesAssigned=!0)}function e(){void 0!==a.ajaxSettings&&"object"==typeof a.ajaxSettings?h.ajaxSettings=a.ajaxSettings:h.ajaxSettings={}}function f(a){return void 0!==h[a]&&null!==h[a]}function g(a,b){function c(b,d){for(var e in d)void 0===b[e]&&a.log("Property '"+e+"' does not exist in EasyAutocomplete options API."),"object"==typeof b[e]&&-1===$.inArray(e,i)&&c(b[e],d[e])}c(h,b)}var h={data:"list-required",url:"list-required",dataType:"json",listLocation:function(a){return a},xmlElementName:"",getValue:function(a){return a},autocompleteOff:!0,placeholder:!1,ajaxCallback:function(){},matchResponseProperty:!1,list:{sort:{enabled:!1,method:function(a,b){return a=h.getValue(a),b=h.getValue(b),b>a?-1:a>b?1:0}},maxNumberOfElements:6,hideOnEmptyPhrase:!0,match:{enabled:!1,caseSensitive:!1,method:function(a,b){return a.search(b)>-1}},showAnimation:{type:"normal",time:400,callback:function(){}},hideAnimation:{type:"normal",time:400,callback:function(){}},onClickEvent:function(){},onSelectItemEvent:function(){},onLoadEvent:function(){},onChooseEvent:function(){},onKeyEnterEvent:function(){},onMouseOverEvent:function(){},onMouseOutEvent:function(){},onShowListEvent:function(){},onHideListEvent:function(){}},highlightPhrase:!0,theme:"",cssClasses:"",minCharNumber:0,requestDelay:0,adjustWidth:!0,ajaxSettings:{},preparePostData:function(a,b){return a},loggerEnabled:!0,template:"",categoriesAssigned:!1,categories:[{maxNumberOfElements:4}]},i=["ajaxSettings","template"];this.get=function(a){return h[a]},this.equals=function(a,b){return!(!f(a)||h[a]!==b)},this.checkDataUrlProperties=function(){return"list-required"!==h.url||"list-required"!==h.data},this.checkRequiredProperties=function(){for(var a in h)if("required"===h[a])return logger.error("Option "+a+" must be defined"),!1;return!0},this.printPropertiesThatDoesntExist=function(a,b){g(a,b)},b(),c(),h.loggerEnabled===!0&&g(console,a),e(),d()},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Logger=function(){this.error=function(a){console.log("ERROR: "+a)},this.warning=function(a){console.log("WARNING: "+a)}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Constans=function(){var a={CONTAINER_CLASS:"easy-autocomplete-container",CONTAINER_ID:"eac-container-",WRAPPER_CSS_CLASS:"easy-autocomplete"};this.getValue=function(b){return a[b]}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.ListBuilderService=function(a,b){function c(b,c){function d(){var d,e={};return void 0!==b.xmlElementName&&(e.xmlElementName=b.xmlElementName),void 0!==b.listLocation?d=b.listLocation:void 0!==a.get("listLocation")&&(d=a.get("listLocation")),void 0!==d?"string"==typeof d?e.data=$(c).find(d):"function"==typeof d&&(e.data=d(c)):e.data=c,e}function e(){var a={};return void 0!==b.listLocation?"string"==typeof b.listLocation?a.data=c[b.listLocation]:"function"==typeof b.listLocation&&(a.data=b.listLocation(c)):a.data=c,a}var f={};if(f="XML"===a.get("dataType").toUpperCase()?d():e(),void 0!==b.header&&(f.header=b.header),void 0!==b.maxNumberOfElements&&(f.maxNumberOfElements=b.maxNumberOfElements),void 0!==a.get("list").maxNumberOfElements&&(f.maxListSize=a.get("list").maxNumberOfElements),void 0!==b.getValue)if("string"==typeof b.getValue){var g=b.getValue;f.getValue=function(a){return a[g]}}else"function"==typeof b.getValue&&(f.getValue=b.getValue);else f.getValue=a.get("getValue");return f}function d(b){var c=[];return void 0===b.xmlElementName&&(b.xmlElementName=a.get("xmlElementName")),$(b.data).find(b.xmlElementName).each(function(){c.push(this)}),c}this.init=function(b){var c=[],d={};return d.data=a.get("listLocation")(b),d.getValue=a.get("getValue"),d.maxListSize=a.get("list").maxNumberOfElements,c.push(d),c},this.updateCategories=function(b,d){if(a.get("categoriesAssigned")){b=[];for(var e=0;e<a.get("categories").length;e+=1){var f=c(a.get("categories")[e],d);b.push(f)}}return b},this.convertXml=function(b){if("XML"===a.get("dataType").toUpperCase())for(var c=0;c<b.length;c+=1)b[c].data=d(b[c]);return b},this.processData=function(c,d){for(var e=0,f=c.length;f>e;e+=1)c[e].data=b(a,c[e],d);return c},this.checkIfDataExists=function(a){for(var b=0,c=a.length;c>b;b+=1)if(void 0!==a[b].data&&a[b].data instanceof Array&&a[b].data.length>0)return!0;return!1}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.proccess=function(b,c,d){function e(a,c){var d=[],e="";if(b.get("list").match.enabled)for(var g=0,h=a.length;h>g;g+=1)e=b.get("getValue")(a[g]),f(e,c)&&d.push(a[g]);else d=a;return d}function f(a,c){return b.get("list").match.caseSensitive||("string"==typeof a&&(a=a.toLowerCase()),c=c.toLowerCase()),!!b.get("list").match.method(a,c)}function g(a){return void 0!==c.maxNumberOfElements&&a.length>c.maxNumberOfElements&&(a=a.slice(0,c.maxNumberOfElements)),a}function h(a){return b.get("list").sort.enabled&&a.sort(b.get("list").sort.method),a}a.proccess.match=f;var i=c.data,j=d;return i=e(i,j),i=g(i),i=h(i)},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Template=function(a){var b={basic:{type:"basic",method:function(a){return a},cssClass:""},description:{type:"description",fields:{description:"description"},method:function(a){return a+" - description"},cssClass:"eac-description"},iconLeft:{type:"iconLeft",fields:{icon:""},method:function(a){return a},cssClass:"eac-icon-left"},iconRight:{type:"iconRight",fields:{iconSrc:""},method:function(a){return a},cssClass:"eac-icon-right"},links:{type:"links",fields:{link:""},method:function(a){return a},cssClass:""},custom:{type:"custom",method:function(){},cssClass:""}},c=function(a){var c,d=a.fields;return"description"===a.type?(c=b.description.method,"string"==typeof d.description?c=function(a,b){return a+" - <span>"+b[d.description]+"</span>"}:"function"==typeof d.description&&(c=function(a,b){return a+" - <span>"+d.description(b)+"</span>"}),c):"iconRight"===a.type?("string"==typeof d.iconSrc?c=function(a,b){return a+"<img class='eac-icon' src='"+b[d.iconSrc]+"' />"}:"function"==typeof d.iconSrc&&(c=function(a,b){return a+"<img class='eac-icon' src='"+d.iconSrc(b)+"' />"}),c):"iconLeft"===a.type?("string"==typeof d.iconSrc?c=function(a,b){return"<img class='eac-icon' src='"+b[d.iconSrc]+"' />"+a}:"function"==typeof d.iconSrc&&(c=function(a,b){return"<img class='eac-icon' src='"+d.iconSrc(b)+"' />"+a}),c):"links"===a.type?("string"==typeof d.link?c=function(a,b){return"<a href='"+b[d.link]+"' >"+a+"</a>"}:"function"==typeof d.link&&(c=function(a,b){return"<a href='"+d.link(b)+"' >"+a+"</a>"}),c):"custom"===a.type?a.method:b.basic.method},d=function(a){return a&&a.type&&a.type&&b[a.type]?c(a):b.basic.method},e=function(a){var c=function(){return""};return a&&a.type&&a.type&&b[a.type]?function(){var c=b[a.type].cssClass;return function(){return c}}():c};this.getTemplateClass=e(a),this.build=d(a)},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.main=function(b,c){function d(){return 0===t.length?void p.error("Input field doesn't exist."):o.checkDataUrlProperties()?o.checkRequiredProperties()?(e(),void g()):void p.error("Will not work without mentioned properties."):void p.error("One of options variables 'data' or 'url' must be defined.")}function e(){function a(){var a=$("<div>"),c=n.getValue("WRAPPER_CSS_CLASS");o.get("theme")&&""!==o.get("theme")&&(c+=" eac-"+o.get("theme")),o.get("cssClasses")&&""!==o.get("cssClasses")&&(c+=" "+o.get("cssClasses")),""!==q.getTemplateClass()&&(c+=" "+q.getTemplateClass()),a.addClass(c),t.wrap(a),o.get("adjustWidth")===!0&&b()}function b(){var a=t.outerWidth();t.parent().css("width",a)}function c(){t.unwrap()}function d(){var a=$("<div>").addClass(n.getValue("CONTAINER_CLASS"));a.attr("id",f()).prepend($("<ul>")),function(){a.on("show.eac",function(){switch(o.get("list").showAnimation.type){case"slide":var b=o.get("list").showAnimation.time,c=o.get("list").showAnimation.callback;a.find("ul").slideDown(b,c);break;case"fade":var b=o.get("list").showAnimation.time,c=o.get("list").showAnimation.callback;a.find("ul").fadeIn(b),c;break;default:a.find("ul").show()}o.get("list").onShowListEvent()}).on("hide.eac",function(){switch(o.get("list").hideAnimation.type){case"slide":var b=o.get("list").hideAnimation.time,c=o.get("list").hideAnimation.callback;a.find("ul").slideUp(b,c);break;case"fade":var b=o.get("list").hideAnimation.time,c=o.get("list").hideAnimation.callback;a.find("ul").fadeOut(b,c);break;default:a.find("ul").hide()}o.get("list").onHideListEvent()}).on("selectElement.eac",function(){a.find("ul li").removeClass("selected"),a.find("ul li").eq(w).addClass("selected"),o.get("list").onSelectItemEvent()}).on("loadElements.eac",function(b,c,d){var e="",f=a.find("ul");f.empty().detach(),v=[];for(var h=0,i=0,k=c.length;k>i;i+=1){var l=c[i].data;if(0!==l.length){void 0!==c[i].header&&c[i].header.length>0&&f.append("<div class='eac-category' >"+c[i].header+"</div>");for(var m=0,n=l.length;n>m&&h<c[i].maxListSize;m+=1)e=$("<li><div class='eac-item'></div></li>"),function(){var a=m,b=h,f=c[i].getValue(l[a]);e.find(" > div").on("click",function(){t.val(f).trigger("change"),w=b,j(b),o.get("list").onClickEvent(),o.get("list").onChooseEvent()}).mouseover(function(){w=b,j(b),o.get("list").onMouseOverEvent()}).mouseout(function(){o.get("list").onMouseOutEvent()}).html(q.build(g(f,d),l[a]))}(),f.append(e),v.push(l[m]),h+=1}}a.append(f),o.get("list").onLoadEvent()})}(),t.after(a)}function e(){t.next("."+n.getValue("CONTAINER_CLASS")).remove()}function g(a,b){return o.get("highlightPhrase")&&""!==b?i(a,b):a}function h(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function i(a,b){var c=h(b);return(a+"").replace(new RegExp("("+c+")","gi"),"<b>$1</b>")}t.parent().hasClass(n.getValue("WRAPPER_CSS_CLASS"))&&(e(),c()),a(),d(),u=$("#"+f()),o.get("placeholder")&&t.attr("placeholder",o.get("placeholder"))}function f(){var a=t.attr("id");return a=n.getValue("CONTAINER_ID")+a}function g(){function a(){s("autocompleteOff",!0)&&n(),b(),c(),d(),e(),f(),g()}function b(){t.focusout(function(){var a,b=t.val();o.get("list").match.caseSensitive||(b=b.toLowerCase());for(var c=0,d=v.length;d>c;c+=1)if(a=o.get("getValue")(v[c]),o.get("list").match.caseSensitive||(a=a.toLowerCase()),a===b)return w=c,void j(w)})}function c(){t.off("keyup").keyup(function(a){function b(a){function b(){var a={},b=o.get("ajaxSettings")||{};for(var c in b)a[c]=b[c];return a}function c(a,b){return o.get("matchResponseProperty")!==!1?"string"==typeof o.get("matchResponseProperty")?b[o.get("matchResponseProperty")]===a:"function"==typeof o.get("matchResponseProperty")?o.get("matchResponseProperty")(b)===a:!0:!0}if(!(a.length<o.get("minCharNumber"))){if("list-required"!==o.get("data")){var d=o.get("data"),e=r.init(d);e=r.updateCategories(e,d),e=r.processData(e,a),k(e,a),t.parent().find("li").length>0?h():i()}var f=b();void 0!==f.url&&""!==f.url||(f.url=o.get("url")),void 0!==f.dataType&&""!==f.dataType||(f.dataType=o.get("dataType")),void 0!==f.url&&"list-required"!==f.url&&(f.url=f.url(a),f.data=o.get("preparePostData")(f.data,a),$.ajax(f).done(function(b){var d=r.init(b);d=r.updateCategories(d,b),d=r.convertXml(d),c(a,b)&&(d=r.processData(d,a),k(d,a)),r.checkIfDataExists(d)&&t.parent().find("li").length>0?h():i(),o.get("ajaxCallback")()}).fail(function(){p.warning("Fail to load response data")}).always(function(){}))}}switch(a.keyCode){case 27:i(),l();break;case 38:a.preventDefault(),v.length>0&&w>0&&(w-=1,t.val(o.get("getValue")(v[w])),j(w));break;case 40:a.preventDefault(),v.length>0&&w<v.length-1&&(w+=1,t.val(o.get("getValue")(v[w])),j(w));break;default:if(a.keyCode>40||8===a.keyCode){var c=t.val();o.get("list").hideOnEmptyPhrase!==!0||8!==a.keyCode||""!==c?o.get("requestDelay")>0?(void 0!==m&&clearTimeout(m),m=setTimeout(function(){b(c)},o.get("requestDelay"))):b(c):i()}}})}function d(){t.on("keydown",function(a){a=a||window.event;var b=a.keyCode;return 38===b?(suppressKeypress=!0,!1):void 0}).keydown(function(a){13===a.keyCode&&w>-1&&(t.val(o.get("getValue")(v[w])),o.get("list").onKeyEnterEvent(),o.get("list").onChooseEvent(),w=-1,i(),a.preventDefault())})}function e(){t.off("keypress")}function f(){t.focus(function(){""!==t.val()&&v.length>0&&(w=-1,h())})}function g(){t.blur(function(){setTimeout(function(){w=-1,i()},250)})}function n(){t.attr("autocomplete","off")}a()}function h(){u.trigger("show.eac")}function i(){u.trigger("hide.eac")}function j(a){u.trigger("selectElement.eac",a)}function k(a,b){u.trigger("loadElements.eac",[a,b])}function l(){t.trigger("blur")}var m,n=new a.Constans,o=new a.Configuration(c),p=new a.Logger,q=new a.Template(c.template),r=new a.ListBuilderService(o,a.proccess),s=o.equals,t=b,u="",v=[],w=-1;a.consts=n,this.getConstants=function(){return n},this.getConfiguration=function(){return o},this.getContainer=function(){return u},this.getSelectedItemIndex=function(){return w},this.getItems=function(){return v},this.getItemData=function(a){return v.length<a||void 0===v[a]?-1:v[a]},this.getSelectedItemData=function(){return this.getItemData(w)},this.build=function(){e()},this.init=function(){d()}},a.eacHandles=[],a.getHandle=function(b){return a.eacHandles[b]},a.inputHasId=function(a){return void 0!==$(a).attr("id")&&$(a).attr("id").length>0},a.assignRandomId=function(b){var c="";do c="eac-"+Math.floor(1e4*Math.random());while(0!==$("#"+c).length);elementId=a.consts.getValue("CONTAINER_ID")+c,$(b).attr("id",c)},a.setHandle=function(b,c){a.eacHandles[c]=b},a}(EasyAutocomplete||{});!function(a){a.fn.easyAutocomplete=function(b){return this.each(function(){var c=a(this),d=new EasyAutocomplete.main(c,b);EasyAutocomplete.inputHasId(c)||EasyAutocomplete.assignRandomId(c),d.init(),EasyAutocomplete.setHandle(d,c.attr("id"))})},a.fn.getSelectedItemIndex=function(){var b=a(this).attr("id");return void 0!==b?EasyAutocomplete.getHandle(b).getSelectedItemIndex():-1},a.fn.getItems=function(){var b=a(this).attr("id");return void 0!==b?EasyAutocomplete.getHandle(b).getItems():-1},a.fn.getItemData=function(b){var c=a(this).attr("id");return void 0!==c&&b>-1?EasyAutocomplete.getHandle(c).getItemData(b):-1},a.fn.getSelectedItemData=function(){var b=a(this).attr("id");return void 0!==b?EasyAutocomplete.getHandle(b).getSelectedItemData():-1}}(jQuery);
2990
2991;/*})'"*/
2992;/*})'"*/
2993(function ($) {
2994
2995Drupal.behaviors.textarea = {
2996  attach: function (context, settings) {
2997    $('.form-textarea-wrapper.resizable', context).once('textarea', function () {
2998      var staticOffset = null;
2999      var textarea = $(this).addClass('resizable-textarea').find('textarea');
3000      var grippie = $('<div class="grippie"></div>').mousedown(startDrag);
3001
3002      grippie.insertAfter(textarea);
3003
3004      function startDrag(e) {
3005        staticOffset = textarea.height() - e.pageY;
3006        textarea.css('opacity', 0.25);
3007        $(document).mousemove(performDrag).mouseup(endDrag);
3008        return false;
3009      }
3010
3011      function performDrag(e) {
3012        textarea.height(Math.max(32, staticOffset + e.pageY) + 'px');
3013        return false;
3014      }
3015
3016      function endDrag(e) {
3017        $(document).unbind('mousemove', performDrag).unbind('mouseup', endDrag);
3018        textarea.css('opacity', 1);
3019      }
3020    });
3021  }
3022};
3023
3024})(jQuery);
3025
3026;/*})'"*/
3027;/*})'"*/
3028(function ($) {
3029
3030/**
3031 * A progressbar object. Initialized with the given id. Must be inserted into
3032 * the DOM afterwards through progressBar.element.
3033 *
3034 * method is the function which will perform the HTTP request to get the
3035 * progress bar state. Either "GET" or "POST".
3036 *
3037 * e.g. pb = new progressBar('myProgressBar');
3038 *      some_element.appendChild(pb.element);
3039 */
3040Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
3041  var pb = this;
3042  this.id = id;
3043  this.method = method || 'GET';
3044  this.updateCallback = updateCallback;
3045  this.errorCallback = errorCallback;
3046
3047  // The WAI-ARIA setting aria-live="polite" will announce changes after users
3048  // have completed their current activity and not interrupt the screen reader.
3049  this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id);
3050  this.element.html('<div class="bar"><div class="filled"></div></div>' +
3051                    '<div class="percentage"></div>' +
3052                    '<div class="message">&nbsp;</div>');
3053};
3054
3055/**
3056 * Set the percentage and status message for the progressbar.
3057 */
3058Drupal.progressBar.prototype.setProgress = function (percentage, message) {
3059  if (percentage >= 0 && percentage <= 100) {
3060    $('div.filled', this.element).css('width', percentage + '%');
3061    $('div.percentage', this.element).html(percentage + '%');
3062  }
3063  $('div.message', this.element).html(message);
3064  if (this.updateCallback) {
3065    this.updateCallback(percentage, message, this);
3066  }
3067};
3068
3069/**
3070 * Start monitoring progress via Ajax.
3071 */
3072Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
3073  this.delay = delay;
3074  this.uri = uri;
3075  this.sendPing();
3076};
3077
3078/**
3079 * Stop monitoring progress via Ajax.
3080 */
3081Drupal.progressBar.prototype.stopMonitoring = function () {
3082  clearTimeout(this.timer);
3083  // This allows monitoring to be stopped from within the callback.
3084  this.uri = null;
3085};
3086
3087/**
3088 * Request progress data from server.
3089 */
3090Drupal.progressBar.prototype.sendPing = function () {
3091  if (this.timer) {
3092    clearTimeout(this.timer);
3093  }
3094  if (this.uri) {
3095    var pb = this;
3096    // When doing a post request, you need non-null data. Otherwise a
3097    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
3098    $.ajax({
3099      type: this.method,
3100      url: this.uri,
3101      data: '',
3102      dataType: 'json',
3103      success: function (progress) {
3104        // Display errors.
3105        if (progress.status == 0) {
3106          pb.displayError(progress.data);
3107          return;
3108        }
3109        // Update display.
3110        pb.setProgress(progress.percentage, progress.message);
3111        // Schedule next timer.
3112        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
3113      },
3114      error: function (xmlhttp) {
3115        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
3116      }
3117    });
3118  }
3119};
3120
3121/**
3122 * Display errors on the page.
3123 */
3124Drupal.progressBar.prototype.displayError = function (string) {
3125  var error = $('<div class="messages error"></div>').html(string);
3126  $(this.element).before(error).hide();
3127
3128  if (this.errorCallback) {
3129    this.errorCallback(this);
3130  }
3131};
3132
3133})(jQuery);
3134
3135;/*})'"*/
3136;/*})'"*/
3137(function ($) {
3138
3139Drupal.googleanalytics = {};
3140
3141$(document).ready(function() {
3142
3143  // Attach mousedown, keyup, touchstart events to document only and catch
3144  // clicks on all elements.
3145  $(document.body).bind("mousedown keyup touchstart", function(event) {
3146
3147    // Catch the closest surrounding link of a clicked element.
3148    $(event.target).closest("a,area").each(function() {
3149
3150      // Is the clicked URL internal?
3151      if (Drupal.googleanalytics.isInternal(this.href)) {
3152        // Skip 'click' tracking, if custom tracking events are bound.
3153        if ($(this).is('.colorbox') && (Drupal.settings.googleanalytics.trackColorbox)) {
3154          // Do nothing here. The custom event will handle all tracking.
3155          //console.info("Click on .colorbox item has been detected.");
3156        }
3157        // Is download tracking activated and the file extension configured for download tracking?
3158        else if (Drupal.settings.googleanalytics.trackDownload && Drupal.googleanalytics.isDownload(this.href)) {
3159          // Download link clicked.
3160          ga("send", {
3161            "hitType": "event",
3162            "eventCategory": "Downloads",
3163            "eventAction": Drupal.googleanalytics.getDownloadExtension(this.href).toUpperCase(),
3164            "eventLabel": Drupal.googleanalytics.getPageUrl(this.href),
3165            "transport": "beacon"
3166          });
3167        }
3168        else if (Drupal.googleanalytics.isInternalSpecial(this.href)) {
3169          // Keep the internal URL for Google Analytics website overlay intact.
3170          ga("send", {
3171            "hitType": "pageview",
3172            "page": Drupal.googleanalytics.getPageUrl(this.href),
3173            "transport": "beacon"
3174          });
3175        }
3176      }
3177      else {
3178        if (Drupal.settings.googleanalytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) {
3179          // Mailto link clicked.
3180          ga("send", {
3181            "hitType": "event",
3182            "eventCategory": "Mails",
3183            "eventAction": "Click",
3184            "eventLabel": this.href.substring(7),
3185            "transport": "beacon"
3186          });
3187        }
3188        else if (Drupal.settings.googleanalytics.trackOutbound && this.href.match(/^\w+:\/\//i)) {
3189          if (Drupal.settings.googleanalytics.trackDomainMode !== 2 || (Drupal.settings.googleanalytics.trackDomainMode === 2 && !Drupal.googleanalytics.isCrossDomain(this.hostname, Drupal.settings.googleanalytics.trackCrossDomains))) {
3190            // External link clicked / No top-level cross domain clicked.
3191            ga("send", {
3192              "hitType": "event",
3193              "eventCategory": "Outbound links",
3194              "eventAction": "Click",
3195              "eventLabel": this.href,
3196              "transport": "beacon"
3197            });
3198          }
3199        }
3200      }
3201    });
3202  });
3203
3204  // Track hash changes as unique pageviews, if this option has been enabled.
3205  if (Drupal.settings.googleanalytics.trackUrlFragments) {
3206    window.onhashchange = function() {
3207      ga("send", {
3208        "hitType": "pageview",
3209        "page": location.pathname + location.search + location.hash
3210      });
3211    };
3212  }
3213
3214  // Colorbox: This event triggers when the transition has completed and the
3215  // newly loaded content has been revealed.
3216  if (Drupal.settings.googleanalytics.trackColorbox) {
3217    $(document).bind("cbox_complete", function () {
3218      var href = $.colorbox.element().attr("href");
3219      if (href) {
3220        ga("send", {
3221          "hitType": "pageview",
3222          "page": Drupal.googleanalytics.getPageUrl(href)
3223        });
3224      }
3225    });
3226  }
3227
3228});
3229
3230/**
3231 * Check whether the hostname is part of the cross domains or not.
3232 *
3233 * @param string hostname
3234 *   The hostname of the clicked URL.
3235 * @param array crossDomains
3236 *   All cross domain hostnames as JS array.
3237 *
3238 * @return boolean
3239 */
3240Drupal.googleanalytics.isCrossDomain = function (hostname, crossDomains) {
3241  /**
3242   * jQuery < 1.6.3 bug: $.inArray crushes IE6 and Chrome if second argument is
3243   * `null` or `undefined`, http://bugs.jquery.com/ticket/10076,
3244   * https://github.com/jquery/jquery/commit/a839af034db2bd934e4d4fa6758a3fed8de74174
3245   *
3246   * @todo: Remove/Refactor in D8
3247   */
3248  if (!crossDomains) {
3249    return false;
3250  }
3251  else {
3252    return $.inArray(hostname, crossDomains) > -1 ? true : false;
3253  }
3254};
3255
3256/**
3257 * Check whether this is a download URL or not.
3258 *
3259 * @param string url
3260 *   The web url to check.
3261 *
3262 * @return boolean
3263 */
3264Drupal.googleanalytics.isDownload = function (url) {
3265  var isDownload = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i");
3266  return isDownload.test(url);
3267};
3268
3269/**
3270 * Check whether this is an absolute internal URL or not.
3271 *
3272 * @param string url
3273 *   The web url to check.
3274 *
3275 * @return boolean
3276 */
3277Drupal.googleanalytics.isInternal = function (url) {
3278  var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
3279  return isInternal.test(url);
3280};
3281
3282/**
3283 * Check whether this is a special URL or not.
3284 *
3285 * URL types:
3286 *  - gotwo.module /go/* links.
3287 *
3288 * @param string url
3289 *   The web url to check.
3290 *
3291 * @return boolean
3292 */
3293Drupal.googleanalytics.isInternalSpecial = function (url) {
3294  var isInternalSpecial = new RegExp("(\/go\/.*)$", "i");
3295  return isInternalSpecial.test(url);
3296};
3297
3298/**
3299 * Extract the relative internal URL from an absolute internal URL.
3300 *
3301 * Examples:
3302 * - http://mydomain.com/node/1 -> /node/1
3303 * - http://example.com/foo/bar -> http://example.com/foo/bar
3304 *
3305 * @param string url
3306 *   The web url to check.
3307 *
3308 * @return string
3309 *   Internal website URL
3310 */
3311Drupal.googleanalytics.getPageUrl = function (url) {
3312  var extractInternalUrl = new RegExp("^(https?):\/\/" + window.location.host, "i");
3313  return url.replace(extractInternalUrl, '');
3314};
3315
3316/**
3317 * Extract the download file extension from the URL.
3318 *
3319 * @param string url
3320 *   The web url to check.
3321 *
3322 * @return string
3323 *   The file extension of the passed url. e.g. "zip", "txt"
3324 */
3325Drupal.googleanalytics.getDownloadExtension = function (url) {
3326  var extractDownloadextension = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i");
3327  var extension = extractDownloadextension.exec(url);
3328  return (extension === null) ? '' : extension[1];
3329};
3330
3331})(jQuery);
3332
3333;/*})'"*/
3334;/*})'"*/
3335/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
3336 * Build: http://modernizr.com/download/#-shiv-mq-cssclasses-teststyles-load
3337 */
3338;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(prefixes.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},t=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return s("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;
vendor: 8,394 bytes, lines 3338-3347
3338var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e});for(var B in m)v(m,B)&&(r=B.toLowerCase(),e[r]=m[B](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e.mq=t,e.testStyles=s,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+p.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
3339;/*})'"*/
3340;/*})'"*/
3341/*!
3342 * typeahead.js 0.9.3
3343 * https://github.com/twitter/typeahead
3344 * Copyright 2013 Twitter, Inc. and other contributors; Licensed MIT
3345 */
3346
3347!function(a){var b="0.9.3",c={isMsie:function(){var a=/(msie) ([\w.]+)/i.exec(navigator.userAgent);return a?parseInt(a[2],10):!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},bind:a.proxy,bindAll:function(b){var c;for(var d in b)a.isFunction(c=b[d])&&(b[d]=a.proxy(c,b))},indexOf:function(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},each:a.each,map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,getUniqueId:function(){var a=0;return function(){return a++}}(),defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>
3347=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},tokenizeQuery:function(b){return a.trim(b).toLowerCase().split(/[\s]+/)},tokenizeText:function(b){return a.trim(b).toLowerCase().split(/[\s\-_]+/)},getProtocol:function(){return location.protocol},noop:function(){}},d=function(){var a=/\s+/;return{on:function(b,c){var d;if(!c)return this;for(this._callbacks=this._callbacks||{},b=b.split(a);d=b.shift();)this._callbacks[d]=this._callbacks[d]||[],this._callbacks[d].push(c);return this},trigger:function(b,c){var d,e;if(!this._callbacks)return this;for(b=b.split(a);d=b.shift();)if(e=this._callbacks[d])for(var f=0;f<e.length;f+=1)e[f].call(this,{type:d,data:c});return this}}}(),e=function(){function b(b){b&&b.el||a.error("EventBus initialized without el"),this.$el=a(b.el)}var d="typeahead:";return c.mixin(b.prototype,{trigger:function(a){var b=[].slice.call(arguments,1);this.$el.trigger(d+a,b)}}),b}(),f=function(){function a(a){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function b(){return(new Date).getTime()}function d(a){return JSON.stringify(c.isUndefined(a)?null:a)}function e(a){return JSON.parse(a)}var f,g;try{f=window.localStorage,f.setItem("~~~","!"),f.removeItem("~~~")}catch(h){f=null}return g=f&&window.JSON?{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},get:function(a){return this.isExpired(a)&&this.remove(a),e(f.getItem(this._prefix(a)))},set:function(a,e,g){return c.isNumber(g)?f.setItem(this._ttlKey(a),d(b()+g)):f.removeItem(this._ttlKey(a)),f.setItem(this._prefix(a),d(e))},remove:function(a){return f.removeItem(this._ttlKey(a)),f.removeItem(this._prefix(a)),this},clear:function(){var a,b,c=[],d=f.length;for(a=0;d>a;a++)(b=f.key(a)).match(this.keyMatcher)&&c.push(b.replace(this.keyMatcher,""));for(a=c.length;a--;)this.remove(c[a]);return this},isExpired:function(a){var d=e(f.getItem(this._ttlKey(a)));return c.isNumber(d)&&b()>d?!0:!1}}
3347:{get:c.noop,set:c.noop,remove:c.noop,clear:c.noop,isExpired:c.noop},c.mixin(a.prototype,g),a}(),g=function(){function a(a){c.bindAll(this),a=a||{},this.sizeLimit=a.sizeLimit||10,this.cache={},this.cachedKeysByAge=[]}return c.mixin(a.prototype,{get:function(a){return this.cache[a]},set:function(a,b){var c;this.cachedKeysByAge.length===this.sizeLimit&&(c=this.cachedKeysByAge.shift(),delete this.cache[c]),this.cache[a]=b,this.cachedKeysByAge.push(a)}}),a}(),h=function(){function b(a){c.bindAll(this),a=c.isString(a)?{url:a}:a,i=i||new g,h=c.isNumber(a.maxParallelRequests)?a.maxParallelRequests:h||6,this.url=a.url,this.wildcard=a.wildcard||"%QUERY",this.filter=a.filter,this.replace=a.replace,this.ajaxSettings={type:"get",cache:a.cache,timeout:a.timeout,dataType:a.dataType||"json",beforeSend:a.beforeSend},this._get=(/^throttle$/i.test(a.rateLimitFn)?c.throttle:c.debounce)(this._get,a.rateLimitWait||300)}function d(){j++}function e(){j--}function f(){return h>j}var h,i,j=0,k={};return c.mixin(b.prototype,{_get:function(a,b){function c(c){var e=d.filter?d.filter(c):c;b&&b(e),i.set(a,c)}var d=this;f()?this._sendRequest(a).done(c):this.onDeckRequestArgs=[].slice.call(arguments,0)},_sendRequest:function(b){function c(){e(),k[b]=null,f.onDeckRequestArgs&&(f._get.apply(f,f.onDeckRequestArgs),f.onDeckRequestArgs=null)}var f=this,g=k[b];return g||(d(),g=k[b]=a.ajax(b,this.ajaxSettings).always(c)),g},get:function(a,b){var d,e,f=this,g=encodeURIComponent(a||"");return b=b||c.noop,d=this.replace?this.replace(this.url,g):this.url.replace(this.wildcard,g),(e=i.get(d))?c.defer(function(){b(f.filter?f.filter(e):e)}):this._get(d,b),!!e}}),b}(),i=function(){function d(b){c.bindAll(this),c.isString(b.template)&&!b.engine&&a.error("no template engine specified"),b.local||b.prefetch||b.remote||a.error("one of local, prefetch, or remote is required"),this.name=b.name||c.getUniqueId(),this.limit=b.limit||5,this.minLength=b.minLength||1,this.header=b.header,this.footer=b.footer,this.valueKey=b.valueKey||"value",this.template=e(b.template,b.engine,this.valueKey),this.local=b.local,this.prefetch=b.prefetch,this.remote=b.remote,this.itemHash={},this.adjacencyList={},this.storage=b.name?new f(b.name):null}function e(a,b,d){var e,f;return c.isFunction(a)?e=a:c.isString(a)?(f=b.compile(a),e=c.bind(f.render,f)):e=function(a){return"<p>"+a[d]+"</p>"},e}var g={thumbprint:"thumbprint",protocol:"protocol",itemHash:"itemHash",adjacencyList:"adjacencyList"};return c.mixin(d.prototype,{_processLocalData:function(a){this._mergeProcessedData(this._processData(a))},_loadPrefetchData:function(d){function e(a){var b=d.filter?d.filter(a):a,e=m._processData(b),f=e.itemHash,h=e.adjacencyList;m.storage&&(m.storage.set(g.itemHash,f,d.ttl),m.storage.set(g.adjacencyList,h,d.ttl),m.storage.set(g.thumbprint,n,d.ttl),m.storage.set(g.protocol,c.getProtocol(),d.ttl)),m._mergeProcessedData(e)}var f,h,i,j,k,l,m=this,n=b+(d.thumbprint||"");return this.storage&&(f=this.storage.get(g.thumbprint),h=this.storage.get(g.protocol),i=this.storage.get(g.itemHash),j=this.storage.get(g.adjacencyList)),k=f!==n||h!==c.getProtocol(),d=c.isString(d)?{url:d}:d,d.ttl=c.isNumber(d.ttl)?d.ttl:864e5,i&&j&&!k?(this._mergeProcessedData({itemHash:i,adjacencyList:j}),l=a.Deferred().resolve()):l=a.getJSON(d.url).done(e),l},_transformDatum:function(a){var b=c.isString(a)?a:a[this.valueKey],d=a.tokens||c.tokenizeText(b),e={value:b,tokens:d};return c.isString(a)?(e.datum={},e.datum[this.valueKey]=a):e.datum=a,e.tokens=c.filter(e.tokens,function(a){return!c.isBlankString(a)}),e.tokens=c.map(e.tokens,function(a){return a.toLowerCase()}),e},_processData:function(a){var b=this,d={},e={};return c.each(a,function(a,f){var g=b._transformDatum(f),h=c.getUniqueId(g.value);d[h]=g,c.each(g.tokens,function(a,b){var d=b.charAt(0),f=e[d]||(e[d]=[h]);!~c.indexOf(f,h)&&f.push(h)})}),{itemHash:d,adjacencyList:e}},_mergeProcessedData:function(a){var b=this;c.mixin(this.itemHash,a.itemHash),c.each(a.adjacencyList,function(a,c){var d=b.adjacencyList[a];b.adjacencyList[a]=d?d.concat(c):c})},_getLocalSuggestions:function(a){var b,d=this,e=[],f=[],g=[];return c.each(a,function(a,b){var d=b.charAt(0);!~c.indexOf(e,d)&&e.push(d)}),c.each(e,function(a,c){var e=d.adjacencyList[c];return e?(f.push(e),(!b||e.length<b.length)&&(b=e),void 0):!1}),f.length<e.length?[]:(c.each(b,function(b,e){var h,i,j=d.itemHash[e];h=c.every(f,function(a){return~c.indexOf(a,e)}),i=h&&c.every(a,function(a){return c.some(j.tokens,function(b){return 0===b.indexOf(a)})}),i&&g.push(j)}),g)},initialize:function(){var b;return this.local&&this._processLocalData(this.local),this.transport=this.remote?new h(this.remote):null,b=this.prefetch?this._loadPrefetchData(this.prefetch):a.Deferred().resolve(),this.local=this.prefetch=this.remote=null,this.initialize=function(){return b},b}
3347,getSuggestions:function(a,b){function d(a){f=f.slice(0),c.each(a,function(a,b){var d,e=g._transformDatum(b);return d=c.some(f,function(a){return e.value===a.value}),!d&&f.push(e),f.length<g.limit}),b&&b(f)}var e,f,g=this,h=!1;a.length<this.minLength||(e=c.tokenizeQuery(a),f=this._getLocalSuggestions(e).slice(0,this.limit),f.length<this.limit&&this.transport&&(h=this.transport.get(a,d)),!h&&b&&b(f))}}),d}(),j=function(){function b(b){var d=this;c.bindAll(this),this.specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},this.$hint=a(b.hint),this.$input=a(b.input).on("blur.tt",this._handleBlur).on("focus.tt",this._handleFocus).on("keydown.tt",this._handleSpecialKeyEvent),c.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(a){d.specialKeyCodeMap[a.which||a.keyCode]||c.defer(d._compareQueryToInputValue)}):this.$input.on("input.tt",this._compareQueryToInputValue),this.query=this.$input.val(),this.$overflowHelper=e(this.$input)}function e(b){return a("<span></span>").css({position:"absolute",left:"-9999px",visibility:"hidden",whiteSpace:"nowrap",fontFamily:b.css("font-family"),fontSize:b.css("font-size"),fontStyle:b.css("font-style"),fontVariant:b.css("font-variant"),fontWeight:b.css("font-weight"),wordSpacing:b.css("word-spacing"),letterSpacing:b.css("letter-spacing"),textIndent:b.css("text-indent"),textRendering:b.css("text-rendering"),textTransform:b.css("text-transform")}).insertAfter(b)}function f(a,b){return a=(a||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "),b=(b||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "),a===b}return c.mixin(b.prototype,d,{_handleFocus:function(){this.trigger("focused")},_handleBlur:function(){this.trigger("blured")},_handleSpecialKeyEvent:function(a){var b=this.specialKeyCodeMap[a.which||a.keyCode];b&&this.trigger(b+"Keyed",a)},_compareQueryToInputValue:function(){var a=this.getInputValue(),b=f(this.query,a),c=b?this.query.length!==a.length:!1;c?this.trigger("whitespaceChanged",{value:this.query}):b||(this.trigger("queryChanged",{value:this.query=a}),(0==this.query.length||0==a.length)&&this.trigger("queryZeroLength",{value:this.query}))},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(a){this.query=a},getInputValue:function(){return this.$input.val()},setInputValue:function(a,b){this.$input.val(a),!b&&this._compareQueryToInputValue()},getHintValue:function(){return this.$hint.val()},setHintValue:function(a){this.$hint.val(a)},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},isOverflow:function(){return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>this.$input.width()},isCursorAtEnd:function(){var a,b=this.$input.val().length,d=this.$input[0].selectionStart;return c.isNumber(d)?d===b:document.selection?(a=document.selection.createRange(),a.moveStart("character",-b),b===a.text.length):!0}}),b}(),k=function(){function b(b){c.bindAll(this),this.isOpen=!1,this.isEmpty=!0,this.isMouseOverDropdown=!1,this.$menu=a(b.menu).on("mouseenter.tt",this._handleMouseenter).on("mouseleave.tt",this._handleMouseleave).on("click.tt",".tt-suggestion",this._handleSelection).on("mouseover.tt",".tt-suggestion",this._handleMouseover)}function e(a){return a.data("suggestion")}var f={suggestionsList:'<span class="tt-suggestions"></span>'},g={suggestionsList:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"}};return c.mixin(b.prototype,d,{_handleMouseenter:function(){this.isMouseOverDropdown=!0},_handleMouseleave:function(){this.isMouseOverDropdown=!1},_handleMouseover:function(b){var c=a(b.currentTarget);this._getSuggestions().removeClass("tt-is-under-cursor"),c.addClass("tt-is-under-cursor")},_handleSelection:function(b){var c=a(b.currentTarget);this.trigger("suggestionSelected",e(c))},_show:function(){this.$menu.css("display","block")},_hide:function(){this.$menu.hide()},_moveCursor:function(a){var b,c,d,f;if(this.isVisible()){if(b=this._getSuggestions(),c=b.filter(".tt-is-under-cursor"),c.removeClass("tt-is-under-cursor"),d=b.index(c)+a,d=(d+1)%(b.length+1)-1,-1===d)return this.trigger("cursorRemoved"),void 0;-1>d&&(d=b.length-1),f=b.eq(d).addClass("tt-is-under-cursor"),this._ensureVisibility(f),this.trigger("cursorMoved",e(f))}},_getSuggestions:function(){return this.$menu.find(".tt-suggestions > .tt-suggestion")},_ensureVisibility:function(a){var b=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),c=this.$menu.scrollTop(),d=a.position().top,e=d+a.outerHeight(!0);0>d?this.$menu.scrollTop(c+d):e>b&&this.$menu.scrollTop(c+(e-b))},destroy:function(){this.$menu.off(".tt"),this.$menu=null},isVisible:function(){return this.isOpen&&!this.isEmpty},closeUnlessMouseIsOverDropdown:function(){this.isMouseOverDropdown||this.close()},close:function(){this.isOpen&&(this.isOpen=!1,this.isMouseOverDropdown=!1,this._hide(),this.$menu.find(".tt-suggestions > .tt-suggestion").removeClass("tt-is-under-cursor"),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(a){var b={left:"0",right:"auto"},c={left:"auto",right:" 0"};"ltr"===a?this.$menu.css(b):this.$menu.css(c)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getSuggestionUnderCursor:function(){var a=this._getSuggestions().filter(".tt-is-under-cursor").first();return a.length>0?e(a):null},getFirstSuggestion:function(){var a=this._getSuggestions().first();return a.length>0?e(a):null},renderSuggestions:function(b,d){var e,h,i,j,k,l="tt-dataset-"+b.name,m='<div class="tt-suggestion">%body</div>',n=this.$menu.find("."+l);0===n.length&&(h=a(f.suggestionsList).css(g.suggestionsList),n=a("<div></div>").addClass(l).append(b.header).append(h).append(b.footer).appendTo(this.$menu)),d.length>0?(this.isEmpty=!1,this.isOpen&&this._show(),i=document.createElement("div"),j=document.createDocumentFragment(),c.each(d,function(c,d){d.dataset=b.name,e=b.template(d.datum),i.innerHTML=m.replace("%body",e),k=a(i.firstChild).css(g.suggestion).data("suggestion",d),k.children().each(function(){a(this).css(g.suggestionChild)}),j.appendChild(k[0])}),n.show().find(".tt-suggestions").html(j)):this.clearSuggestions(b.name),this.trigger("suggestionsRendered")},clearSuggestions:function(a){var b=a?this.$menu.find(".tt-dataset-"+a):this.$menu.find('[class^="tt-dataset-"]'),c=b.find(".tt-suggestions");b.hide(),c.empty(),0===this._getSuggestions().length&&(this.isEmpty=!0,this._hide())}}),b}(),l=function(){function b(a){var b,d,f;c.bindAll(this),this.$node=e(a.input),this.datasets=a.datasets,this.dir=null,this.eventBus=a.eventBus,b=this.$node.find(".tt-dropdown-menu"),d=this.$node.find(".tt-query"),f=this.$node.find(".tt-hint"),this.dropdownView=new k({menu:b}).on("suggestionSelected",this._handleSelection).on("cursorMoved",this._clearHint).on("cursorMoved",this._setInputValueToSuggestionUnderCursor).on("cursorRemoved",this._setInputValueToQuery).on("cursorRemoved",this._updateHint).on("suggestionsRendered",this._updateHint).on("opened",this._updateHint).on("closed",this._clearHint).on("opened closed",this._propagateEvent),this.inputVie
3347w=new j({input:d,hint:f}).on("focused",this._openDropdown).on("blured",this._closeDropdown).on("blured",this._setInputValueToQuery).on("enterKeyed tabKeyed",this._handleSelection).on("queryChanged",this._clearHint).on("queryZeroLength",this._clearSuggestions).on("queryChanged",this._getSuggestions).on("whitespaceChanged",this._updateHint).on("queryChanged whitespaceChanged",this._openDropdown).on("queryChanged whitespaceChanged",this._setLanguageDirection).on("escKeyed",this._closeDropdown).on("escKeyed",this._setInputValueToQuery).on("tabKeyed upKeyed downKeyed",this._managePreventDefault).on("upKeyed downKeyed",this._moveDropdownCursor).on("upKeyed downKeyed",this._openDropdown).on("tabKeyed leftKeyed rightKeyed",this._autocomplete)}function e(b){var c=a(g.wrapper),d=a(g.dropdown),e=a(b),f=a(g.hint);c=c.css(h.wrapper),d=d.css(h.dropdown),f.css(h.hint).css({backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}),e.data("ttAttrs",{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")}),e.addClass("tt-query").attr({autocomplete:"off",spellcheck:!1}).css(h.query);try{!e.attr("dir")&&e.attr("dir","auto")}catch(i){}return e.wrap(c).parent().prepend(f).append(d)}function f(a){var b=a.find(".tt-query");c.each(b.data("ttAttrs"),function(a,d){c.isUndefined(d)?b.removeAttr(a):b.attr(a,d)}),b.detach().removeData("ttAttrs").removeClass("tt-query").insertAfter(a),a.remove()}var g={wrapper:'<span class="twitter-typeahead"></span>',hint:'<input class="tt-hint" type="text" autocomplete="off" spellcheck="off" disabled>',dropdown:'<span class="tt-dropdown-menu"></span>'},h={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},query:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"}};return c.isMsie()&&c.mixin(h.query,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),c.isMsie()&&c.isMsie()<=7&&(c.mixin(h.wrapper,{display:"inline",zoom:"1"}),c.mixin(h.query,{marginTop:"-1px"})),c.mixin(b.prototype,d,{_managePreventDefault:function(a){var b,c,d=a.data,e=!1;switch(a.type){case"tabKeyed":b=this.inputView.getHintValue(),c=this.inputView.getInputValue(),e=b&&b!==c;break;case"upKeyed":case"downKeyed":e=!d.shiftKey&&!d.ctrlKey&&!d.metaKey}e&&d.preventDefault()},_setLanguageDirection:function(){var a=this.inputView.getLanguageDirection();a!==this.dir&&(this.dir=a,this.$node.css("direction",a),this.dropdownView.setLanguageDirection(a))},_updateHint:function(){var a,b,d,e,f,g=this.dropdownView.getFirstSuggestion(),h=g?g.value:null,i=this.dropdownView.isVisible(),j=this.inputView.isOverflow();h&&i&&!j&&(a=this.inputView.getInputValue(),b=a.replace(/\s{2,}/g," ").replace(/^\s+/g,""),d=c.escapeRegExChars(b),e=new RegExp("^(?:"+d+")(.*$)","i"),f=e.exec(h),this.inputView.setHintValue(a+(f?f[1]:"")))},_clearHint:function(){this.inputView.setHintValue("")},_clearSuggestions:function(){this.dropdownView.clearSuggestions()},_setInputValueToQuery:function(){this.inputView.setInputValue(this.inputView.getQuery())},_setInputValueToSuggestionUnderCursor:function(a){var b=a.data,c=b.value;this.eventBus.trigger("beforeinputchange",b),this.inputView.setInputValue(b.value,!0),b.value=c},_openDropdown:function(){this.dropdownView.open()},_closeDropdown:function(a){this.dropdownView["blured"===a.type?"closeUnlessMouseIsOverDropdown":"close"]()},_moveDropdownCursor:function(a){var b=a.data;b.shiftKey||b.ctrlKey||b.metaKey||this.dropdownView["upKeyed"===a.type?"moveCursorUp":"moveCursorDown"]()},_handleSelection:function(a){var b="suggestionSelected"===a.type,d=b?a.data:this.dropdownView.getSuggestionUnderCursor();if(d){var e=d.value;
3347this.eventBus.trigger("beforeinputchange",d),this.inputView.setInputValue(d.value),d.value=e,b?this.inputView.focus():a.data.preventDefault(),b&&c.isMsie()?c.defer(this.dropdownView.close):this.dropdownView.close(),this.eventBus.trigger("selected",d.datum,d.dataset)}},_getSuggestions:function(){var a=this,b=this.inputView.getQuery();c.isBlankString(b)||c.each(this.datasets,function(c,d){d.getSuggestions(b,function(c){b===a.inputView.getQuery()&&a.dropdownView.renderSuggestions(d,c)})})},_autocomplete:function(a){var b,c,d,e,f;if(("rightKeyed"!==a.type&&"leftKeyed"!==a.type||(b=this.inputView.isCursorAtEnd(),c="ltr"===this.inputView.getLanguageDirection()?"leftKeyed"===a.type:"rightKeyed"===a.type,b&&!c))&&(d=this.inputView.getQuery(),e=this.inputView.getHintValue(),""!==e&&d!==e)){f=this.dropdownView.getFirstSuggestion();var g=f.value;this.eventBus.trigger("beforeinputchange",f),this.inputView.setInputValue(f.value),f.value=g,this.eventBus.trigger("autocompleted",f.datum,f.dataset)}},_propagateEvent:function(a){this.eventBus.trigger(a.type)},destroy:function(){this.inputView.destroy(),this.dropdownView.destroy(),f(this.$node),this.$node=null},setQuery:function(a){this.inputView.setQuery(a),this.inputView.setInputValue(a),this._clearHint(),this._clearSuggestions(),this._getSuggestions()}}),b}();!function(){var b,d={},f="ttView";b={initialize:function(b){function g(){var b,d=a(this),g=new e({el:d});b=c.map(h,function(a){return a.initialize()}),d.data(f,new l({input:d,eventBus:g=new e({el:d}),datasets:h})),a.when.apply(a,b).always(function(){c.defer(function(){g.trigger("initialized")})})}var h;return b=c.isArray(b)?b:[b],0===b.length&&a.error("no datasets provided"),h=c.map(b,function(a){var b=d[a.name]?d[a.name]:new i(a);return a.name&&(d[a.name]=b),b}),this.each(g)},destroy:function(){function b(){var b=a(this),c=b.data(f);c&&(c.destroy(),b.removeData(f))}return this.each(b)},setQuery:function(b){function c(){var c=a(this).data(f);c&&c.setQuery(b)}return this.each(c)}},$.fn.typeahead=function(a){return b[a]?b[a].apply(this,[].slice.call(arguments,1)):b.initialize.apply(this,arguments)}}()}(window.$);
3348;/*})'"*/
3349;/*})'"*/
3350/*
3351 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3352 *
3353 * Uses the built in easing capabilities added In jQuery 1.1
3354 * to offer multiple easing options
3355 *
3356 * TERMS OF USE - jQuery Easing
3357 * 
3358 * Open source under the BSD License. 
3359 * 
3360 * Copyright © 2008 George McGinley Smith
3361 * All rights reserved.
3362 * 
3363 * Redistribution and use in source and binary forms, with or without modification, 
3364 * are permitted provided that the following conditions are met:
3365 * 
3366 * Redistributions of source code must retain the above copyright notice, this list of 
3367 * conditions and the following disclaimer.
3368 * Redistributions in binary form must reproduce the above copyright notice, this list 
3369 * of conditions and the following disclaimer in the documentation and/or other materials 
3370 * provided with the distribution.
3371 * 
3372 * Neither the name of the author nor the names of contributors may be used to endorse 
3373 * or promote products derived from this software without specific prior written permission.
3374 * 
3375 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
3376 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3377 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3378 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
3379 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
3380 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
3381 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3382 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
3383 * OF THE POSSIBILITY OF SUCH DAMAGE. 
3384 *
3385*/
3386
3387// t: current time, b: begInnIng value, c: change In value, d: duration
3388jQuery.easing['jswing'] = jQuery.easing['swing'];
3389
3390jQuery.extend( jQuery.easing,
3391{
3392	def: 'easeOutQuad',
3393	swing: function (x, t, b, c, d) {
3394		//alert(jQuery.easing.default);
3395		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
3396	},
3397	easeInQuad: function (x, t, b, c, d) {
3398		return c*(t/=d)*t + b;
3399	},
3400	easeOutQuad: function (x, t, b, c, d) {
3401		return -c *(t/=d)*(t-2) + b;
3402	},
3403	easeInOutQuad: function (x, t, b, c, d) {
3404		if ((t/=d/2) < 1) return c/2*t*t + b;
3405		return -c/2 * ((--t)*(t-2) - 1) + b;
3406	},
3407	easeInCubic: function (x, t, b, c, d) {
vendor: 5,241 bytes, lines 3408-3547
3408		return c*(t/=d)*t*t + b;
3409	},
3410	easeOutCubic: function (x, t, b, c, d) {
3411		return c*((t=t/d-1)*t*t + 1) + b;
3412	},
3413	easeInOutCubic: function (x, t, b, c, d) {
3414		if ((t/=d/2) < 1) return c/2*t*t*t + b;
3415		return c/2*((t-=2)*t*t + 2) + b;
3416	},
3417	easeInQuart: function (x, t, b, c, d) {
3418		return c*(t/=d)*t*t*t + b;
3419	},
3420	easeOutQuart: function (x, t, b, c, d) {
3421		return -c * ((t=t/d-1)*t*t*t - 1) + b;
3422	},
3423	easeInOutQuart: function (x, t, b, c, d) {
3424		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
3425		return -c/2 * ((t-=2)*t*t*t - 2) + b;
3426	},
3427	easeInQuint: function (x, t, b, c, d) {
3428		return c*(t/=d)*t*t*t*t + b;
3429	},
3430	easeOutQuint: function (x, t, b, c, d) {
3431		return c*((t=t/d-1)*t*t*t*t + 1) + b;
3432	},
3433	easeInOutQuint: function (x, t, b, c, d) {
3434		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
3435		return c/2*((t-=2)*t*t*t*t + 2) + b;
3436	},
3437	easeInSine: function (x, t, b, c, d) {
3438		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
3439	},
3440	easeOutSine: function (x, t, b, c, d) {
3441		return c * Math.sin(t/d * (Math.PI/2)) + b;
3442	},
3443	easeInOutSine: function (x, t, b, c, d) {
3444		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
3445	},
3446	easeInExpo: function (x, t, b, c, d) {
3447		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
3448	},
3449	easeOutExpo: function (x, t, b, c, d) {
3450		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
3451	},
3452	easeInOutExpo: function (x, t, b, c, d) {
3453		if (t==0) return b;
3454		if (t==d) return b+c;
3455		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
3456		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
3457	},
3458	easeInCirc: function (x, t, b, c, d) {
3459		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
3460	},
3461	easeOutCirc: function (x, t, b, c, d) {
3462		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
3463	},
3464	easeInOutCirc: function (x, t, b, c, d) {
3465		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
3466		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
3467	},
3468	easeInElastic: function (x, t, b, c, d) {
3469		var s=1.70158;var p=0;var a=c;
3470		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
3471		if (a < Math.abs(c)) { a=c; var s=p/4; }
3472		else var s = p/(2*Math.PI) * Math.asin (c/a);
3473		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
3474	},
3475	easeOutElastic: function (x, t, b, c, d) {
3476		var s=1.70158;var p=0;var a=c;
3477		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
3478		if (a < Math.abs(c)) { a=c; var s=p/4; }
3479		else var s = p/(2*Math.PI) * Math.asin (c/a);
3480		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
3481	},
3482	easeInOutElastic: function (x, t, b, c, d) {
3483		var s=1.70158;var p=0;var a=c;
3484		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
3485		if (a < Math.abs(c)) { a=c; var s=p/4; }
3486		else var s = p/(2*Math.PI) * Math.asin (c/a);
3487		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
3488		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
3489	},
3490	easeInBack: function (x, t, b, c, d, s) {
3491		if (s == undefined) s = 1.70158;
3492		return c*(t/=d)*t*((s+1)*t - s) + b;
3493	},
3494	easeOutBack: function (x, t, b, c, d, s) {
3495		if (s == undefined) s = 1.70158;
3496		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
3497	},
3498	easeInOutBack: function (x, t, b, c, d, s) {
3499		if (s == undefined) s = 1.70158; 
3500		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
3501		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
3502	},
3503	easeInBounce: function (x, t, b, c, d) {
3504		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
3505	},
3506	easeOutBounce: function (x, t, b, c, d) {
3507		if ((t/=d) < (1/2.75)) {
3508			return c*(7.5625*t*t) + b;
3509		} else if (t < (2/2.75)) {
3510			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
3511		} else if (t < (2.5/2.75)) {
3512			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
3513		} else {
3514			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
3515		}
3516	},
3517	easeInOutBounce: function (x, t, b, c, d) {
3518		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
3519		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
3520	}
3521});
3522
3523/*
3524 *
3525 * TERMS OF USE - EASING EQUATIONS
3526 * 
3527 * Open source under the BSD License. 
3528 * 
3529 * Copyright © 2001 Robert Penner
3530 * All rights reserved.
3531 * 
3532 * Redistribution and use in source and binary forms, with or without modification, 
3533 * are permitted provided that the following conditions are met:
3534 * 
3535 * Redistributions of source code must retain the above copyright notice, this list of 
3536 * conditions and the following disclaimer.
3537 * Redistributions in binary form must reproduce the above copyright notice, this list 
3538 * of conditions and the following disclaimer in the documentation and/or other materials 
3539 * provided with the distribution.
3540 * 
3541 * Neither the name of the author nor the names of contributors may be used to endorse 
3542 * or promote products derived from this software without specific prior written permission.
3543 * 
3544 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
3545 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3546 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3547 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 9,339 bytes, lines 3548-3559
3548 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
3549 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
3550 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3551 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
3552 * OF THE POSSIBILITY OF SUCH DAMAGE. 
3553 *
3554 */
3555;/*})'"*/
3556;/*})'"*/
3557// TouchSwipe v1.6.4
3558// https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
3559(function(e){var o="left",n="right",d="up",v="down",c="in",w="out",l="none",r="auto",k="swipe",s="pinch",x="tap",i="doubletap",b="longtap",A="horizontal",t="vertical",h="all",q=10,f="start",j="move",g="end",p="cancel",a="ontouchstart" in window,y="TouchSwipe";var m={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,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(D){var C=e(this),B=C.data(y);if(B&&typeof D==="string"){if(B[D]){return B[D].apply(this,Array.prototype.slice.call(arguments,1))}else{e.error("Method "+D+" does not exist on jQuery.swipe")}}else{if(!B&&(typeof D==="object"||!D)){return u.apply(this,arguments)}}return C};e.fn.swipe.defaults=m;e.fn.swipe.phases={PHASE_START:f,PHASE_MOVE:j,PHASE_END:g,PHASE_CANCEL:p};e.fn.swipe.directions={LEFT:o,RIGHT:n,UP:d,DOWN:v,IN:c,OUT:w};e.fn.swipe.pageScroll={NONE:l,HORIZONTAL:A,VERTICAL:t,AUTO:r};e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:h};function u(B){if(B&&(B.allowPageScroll===undefined&&(B.swipe!==undefined||B.swipeStatus!==undefined))){B.allowPageScroll=l}if(B.click!==undefined&&B.tap===undefined){B.tap=B.click}if(!B){B={}}B=e.extend({},e.fn.swipe.defaults,B);return this.each(function(){var D=e(this);var C=D.data(y);if(!C){C=new z(this,B);D.data(y,C)}})}function z(a0,aq){var av=(a||!aq.fallbackToMouseEvents),G=av?"touchstart":"mousedown",au=av?"touchmove":"mousemove",R=av?"touchend":"mouseup",P=av?null:"mouseleave",az="touchcancel";var ac=0,aL=null,Y=0,aX=0,aV=0,D=1,am=0,aF=0,J=null;var aN=e(a0);var W="start";var T=0;var aM=null;var Q=0,aY=0,a1=0,aa=0,K=0;var aS=null;try{aN.bind(G,aJ);aN.bind(az,a5)}catch(ag){e.error("events not supported "+G+","+az+" on jQuery.swipe")}this.enable=function(){aN.bind(G,aJ);aN.bind(az,a5);return aN};this.disable=function(){aG();return aN};this.destroy=function(){aG();aN.data(y,null);return aN};this.option=function(a8,a7){if(aq[a8]!==undefined){if(a7===undefined){return aq[a8]}else{aq[a8]=a7}}else{e.error("Option "+a8+" does not exist on jQuery.swipe.options")}};function aJ(a9){if(ax()){return}if(e(a9.target).closest(aq.excludedElements,aN).length>0){return}var ba=a9.originalEvent?a9.originalEvent:a9;var a8,a7=a?ba.touches[0]:ba;W=f;if(a){T=ba.touches.length}else{a9.preventDefault()}ac=0;aL=null;aF=null;Y=0;aX=0;aV=0;D=1;am=0;aM=af();J=X();O();if(!a||(T===aq.fingers||aq.fingers===h)||aT()){ae(0,a7);Q=ao();if(T==2){ae(1,ba.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}if(aq.swipeStatus||aq.pinchStatus){a8=L(ba,W)}}else{a8=false}if(a8===false){W=p;L(ba,W);return a8}else{ak(true)}}function aZ(ba){var bd=ba.originalEvent?ba.originalEvent:ba;if(W===g||W===p||ai()){return}var a9,a8=a?bd.touches[0]:bd;var bb=aD(a8);aY=ao();if(a){T=bd.touches.length}W=j;if(T==2){if(aX==0){ae(1,bd.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}else{aD(bd.touches[1]);aV=ap(aM[0].end,aM[1].end);aF=an(aM[0].end,aM[1].end)}D=a3(aX,aV);am=Math.abs(aX-aV)}if((T===aq.fingers||aq.fingers===h)||!a||aT()){aL=aH(bb.start,bb.end);ah(ba,aL);ac=aO(bb.start,bb.end);Y=aI();aE(aL,ac);if(aq.swipeStatus||aq.pinchStatus){a9=L(bd,W)}if(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave){var a7=true;if(aq.triggerOnTouchLeave){var bc=aU(this);a7=B(bb.end,bc)}if(!aq.triggerOnTouchEnd&&a7){W=ay(j)}else{if(aq.triggerOnTouchLeave&&!a7){W=ay(g)}}if(W==p||W==g){L(bd,W)}}}else{W=p;L(bd,W)}if(a9===false){W=p;L(bd,W)}}function I(a7){var a8=a7.originalEvent;if(a){if(a8.touches.length>0){C();return true}}if(ai()){T=aa}a7.preventDefault();aY=ao();Y=aI();if(a6()){W=p;L(a8,W)}else{if(aq.triggerOnTouchEnd||(aq.triggerOnTouchEnd==false&&W===j)){W=g;L(a8,W)}else{if(!aq.triggerOnTouchEnd&&a2()){W=g;aB(a8,W,x)}else{if(W===j){W=p;L(a8,W)}}}}ak(false)}function a5(){T=0;aY=0;Q=0;aX=0;aV=0;D=1;O();ak(false)}function H(a7){var a8=a7.originalEvent;if(aq.triggerOnTouchLeave){W=ay(g);L(a8,W)}}function aG(){aN.unbind(G,aJ);aN.unbind(az,a5);aN.unbind(au,aZ);aN.unbind(R,I);if(P){aN.unbind(P,H)}ak(false)}function ay(bb){var ba=bb;var a9=aw();var a8=aj();var a7=a6();if(!a9||a7){ba=p}else{if(a8&&bb==j&&(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave)){ba=g}else{if(!a8&&bb==g&&aq.triggerOnTouchLeave){ba=p}}}return ba}function L(a9,a7){var a8=undefined;if(F()||S()){a8=aB(a9,a7,k)}else{if((M()||aT())&&a8!==false){a8=aB(a9,a7,s)}}if(aC()&&a8!==false){a8=aB(a9,a7,i)}else{if(al()&&a8!==false){a8=aB(a9,a7,b)}else{if(ad()&&a8!==false){a8=aB(a9,a7,x)}}}if(a7===p){a5(a9)}if(a7===g){if(a){if(a9.touches.length==0){a5(a9)}}else{a5(a9)}}return a8}function aB(ba,a7,a9){var a8=undefined;if(a9==k){aN.trigger("swipeStatus",[a7,aL||null,ac||0,Y||0,T]);if(aq.swipeStatus){a8=aq.swipeStatus.call(aN,ba,a7,aL||null,ac||0,Y||0,T);if(a8===false){return false}}if(a7==g&&aR()){aN.trigger("swipe",[aL,ac,Y,T]);if(aq.swipe){a8=aq.swipe.call(aN,ba,aL,ac,Y,T);if(a8===false){return false}}switch(aL){case o:aN.trigger("swipeLeft",[aL,ac,Y,T]);if(aq.swipeLeft){a8=aq.swipeLeft.call(aN,ba,aL,ac,Y,T)}break;case n:aN.trigger("swipeRight",[aL,ac,Y,T]);if(aq.swipeRight){a8=aq.swipeRight.call(aN,ba,aL,ac,Y,T)}break;case d:aN.trigger("swipeUp",[aL,ac,Y,T]);if(aq.swipeUp){a8=aq.swipeUp.call(aN,ba,aL,ac,Y,T)}break;case v:aN.trigger("swipeDown",[aL,ac,Y,T]);if(aq.swipeDown){a8=aq.swipeDown.call(aN,ba,aL,ac,Y,T)}break}}}if(a9==s){aN.trigger("pinchStatus",[a7,aF||null,am||0,Y||0,T,D]);if(aq.pinchStatus){a8=aq.pinchStatus.call(aN,ba,a7,aF||null,am||0,Y||0,T,D);if(a8===false){return false}}if(a7==g&&a4()){switch(aF){case c:aN.trigger("pinchIn",[aF||null,am||0,Y||0,T,D]);if(aq.pinchIn){a8=aq.pinchIn.call(aN,ba,aF||null,am||0,Y||0,T,D)}break;case w:aN.trigger("pinchOut",[aF||null,am||0,Y||0,T,D]);if(aq.pinchOut){a8=aq.pinchOut.call(aN,ba,aF||null,am||0,Y||0,T,D)}break}}}if(a9==x){if(a7===p||a7===g){clearTimeout(aS);if(V()&&!E()){K=ao();aS=setTimeout(e.proxy(function(){K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}},this),aq.doubleTapThreshold)}else{K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}}}}else{if(a9==i){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("doubletap",[ba.target]);if(aq.doubleTap){a8=aq.doubleTap.call(aN,ba,ba.target)}}}else{if(a9==b){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("longtap",[ba.target]);if(aq.longTap){a8=aq.longTap.call(aN,ba,ba.target)}}}}}return a8}function aj(){var a7=true;if(aq.threshold!==null){a7=ac>=aq.threshold}return a7}function a6(){var a7=false;if(aq.cancelThreshold!==null&&aL!==null){a7=(aP(aL)-ac)>=aq.cancelThreshold}return a7}function ab(){if(aq.pinchThreshold!==null){return am>=aq.pinchThreshold}return true}function aw(){var a7;if(aq.maxTimeThreshold){if(Y>=aq.maxTimeThreshold){a7=false}else{a7=true}}else{a7=true}return a7}function ah(a7,a8){if(aq.allowPageScroll===l||aT()){a7.preventDefault()}else{var a9=aq.allowPageScroll===r;switch(a8){case o:if((aq.swipeLeft&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case n:if((aq.swipeRight&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case d:if((aq.swipeUp&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break;case v:if((aq.swipeDown&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break}}}function a4(){var a8=aK();var a7=U();var a9=ab();return a8&&a7&&a9}function aT(){return !!(aq.pinchStatus||aq.pinchIn||aq.pinchOut)}function M(){return !!(a4()&&aT())}function aR(){var ba=aw();var bc=aj();var a9=aK();var a7=U();var a8=a6();var bb=!a8&&a7&&a9&&bc&&ba;return bb}function S(){return !!(aq.swipe||aq.swipeStatus||aq.swipeLeft||aq.swipeRight||aq.swipeUp||aq.swipeDown)}function F(){return !!(aR()&&S())}function aK(){return((T===aq.fingers||aq.fingers===h)||!a)}function U(){return aM[0].end.x!==0}function a2(){return !!(aq.tap)}function V(){return !!(aq.doubleTap)}function aQ(){return !!(aq.longTap)}function N(){if(K==null){return false}var a7=ao();return(V()&&((a7-K)<=aq.doubleTapThreshold))}function E(){return N()}function at(){return((T===1||!a)&&(isNaN(ac)||ac===0))}function aW(){return((Y>aq.longTapThreshold)&&(ac<q))}function ad(){return !!(at()&&a2())}function aC(){return !!(N()&&V())}function al(){return !!(aW()&&aQ())}function C(){a1=ao();aa=event.touches.length+1}function O(){a1=0;aa=0}function ai(){var a7=false;if(a1){var a8=ao()-a1;if(a8<=aq.fingerReleaseThreshold){a7=true}}return a7}function ax(){return !!(aN.data(y+"_intouch")===true)}function ak(a7){if(a7===true){aN.bind(au,aZ);aN.bind(R,I);if(P){aN.bind(P,H)}}else{aN.unbind(au,aZ,false);aN.unbind(R,I,false);
3559if(P){aN.unbind(P,H,false)}}aN.data(y+"_intouch",a7===true)}function ae(a8,a7){var a9=a7.identifier!==undefined?a7.identifier:0;aM[a8].identifier=a9;aM[a8].start.x=aM[a8].end.x=a7.pageX||a7.clientX;aM[a8].start.y=aM[a8].end.y=a7.pageY||a7.clientY;return aM[a8]}function aD(a7){var a9=a7.identifier!==undefined?a7.identifier:0;var a8=Z(a9);a8.end.x=a7.pageX||a7.clientX;a8.end.y=a7.pageY||a7.clientY;return a8}function Z(a8){for(var a7=0;a7<aM.length;a7++){if(aM[a7].identifier==a8){return aM[a7]}}}function af(){var a7=[];for(var a8=0;a8<=5;a8++){a7.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0})}return a7}function aE(a7,a8){a8=Math.max(a8,aP(a7));J[a7].distance=a8}function aP(a7){return J[a7].distance}function X(){var a7={};a7[o]=ar(o);a7[n]=ar(n);a7[d]=ar(d);a7[v]=ar(v);return a7}function ar(a7){return{direction:a7,distance:0}}function aI(){return aY-Q}function ap(ba,a9){var a8=Math.abs(ba.x-a9.x);var a7=Math.abs(ba.y-a9.y);return Math.round(Math.sqrt(a8*a8+a7*a7))}function a3(a7,a8){var a9=(a8/a7)*1;return a9.toFixed(2)}function an(){if(D<1){return w}else{return c}}function aO(a8,a7){return Math.round(Math.sqrt(Math.pow(a7.x-a8.x,2)+Math.pow(a7.y-a8.y,2)))}function aA(ba,a8){var a7=ba.x-a8.x;var bc=a8.y-ba.y;var a9=Math.atan2(bc,a7);var bb=Math.round(a9*180/Math.PI);if(bb<0){bb=360-Math.abs(bb)}return bb}function aH(a8,a7){var a9=aA(a8,a7);if((a9<=45)&&(a9>=0)){return o}else{if((a9<=360)&&(a9>=315)){return o}else{if((a9>=135)&&(a9<=225)){return n}else{if((a9>45)&&(a9<135)){return v}else{return d}}}}}function ao(){var a7=new Date();return a7.getTime()}function aU(a7){a7=e(a7);var a9=a7.offset();var a8={left:a9.left,right:a9.left+a7.outerWidth(),top:a9.top,bottom:a9.top+a7.outerHeight()};return a8}function B(a7,a8){return(a7.x>a8.left&&a7.x<a8.right&&a7.y>a8.top&&a7.y<a8.bottom)}}})(jQuery);
3560;/*})'"*/
3561;/*})'"*/
3562/*!
3563 *  Liquid Slider v2.0.9
3564 *  http://liquidslider.com
3565 *  GPL license
3566 */
3567;if(typeof Object.create!=="function"){Object.create=function(b){function a(){}a.prototype=b;return new a()}}(function(d,c,a,e){var b={makeResponsive:function(){var f=this;d(f.sliderId+"-wrapper").addClass("ls-responsive").css({"max-width":d(f.sliderId+" .panel:first-child").width(),width:"100%"});d(f.sliderId+" .panel-container").css("width",100*f.panelCountTotal+f.pSign);d(f.sliderId+" .panel").css("width",100/f.panelCountTotal+f.pSign);if(f.options.hideArrowsWhenMobile){f.leftWrapperPadding=d(f.sliderId+"-wrapper").css("padding-left");f.rightWrapperPadding=(f.$sliderWrap).css("padding-right")}f.responsiveEvents();d(c).bind("resize",function(){f.responsiveEvents();clearTimeout(f.resizingTimeout);f.resizingTimeout=setTimeout(function(){var g=(f.options.autoHeight)?f.getHeight():f.getHeighestPanel(f.nextPanel);f.adjustHeight(false,g)},500)})},responsiveEvents:function(){var g=this,f=(g.options.hideArrowsThreshold||g.options.mobileUIThreshold||(g.totalNavWidth+10));if((g.$sliderId).outerWidth()<f){if(g.options.mobileNavigation){(g.navigation).css("display","none");(g.dropdown).css("display","block");(g.dropdownSelect).css("display","block");d(g.sliderId+"-nav-select").val(g.options.mobileNavDefaultText)}if(g.options.dynamicArrows){if(g.options.hideArrowsWhenMobile){(g.leftArrow).remove().length=0;(g.rightArrow).remove().length=0}else{if(!g.options.dynamicArrowsGraphical){(g.leftArrow).css("margin-"+g.options.dynamicTabsPosition,"0");(g.rightArrow).css("margin-"+g.options.dynamicTabsPosition,"0")}}}}else{if(g.options.mobileNavigation){(g.navigation).css("display","block");(g.dropdown).css("display","none");(g.dropdownSelect).css("display","none")}if(g.options.dynamicArrows){if(g.options.hideArrowsWhenMobile&&(!(g.leftArrow).length||!(g.rightArrow).length)){g.addArrows();g.registerArrows()}}else{if(!g.options.dynamicArrowsGraphical){(g.leftArrow).css("margin-"+g.options.dynamicTabsPosition,(g.navigation).css("height"));(g.rightArrow).css("margin-"+g.options.dynamicTabsPosition,(g.navigation).css("height"))}}}d(g.sliderId+"-wrapper").css("width","100%");if(g.options.mobileNavigation){(g.dropdownSelect).change(function(){g.setNextPanel(parseInt(d(this).val().split("tab")[1],10)-1)})}},addNavigation:function(i){var h=this,f="<"+h.options.navElementTag+' class="ls-nav"><ul id="'+(h.$elem).attr("id")+'-nav-ul"></ul></'+h.options.navElementTag+">";if(h.options.dynamicTabsPosition==="bottom"){(h.$sliderId).after(f)}else{(h.$sliderId).before(f)}if(h.options.mobileNavigation){var j=(h.options.mobileNavDefaultText)?'<option disabled="disabled" selected="selected">'+h.options.mobileNavDefaultText+"</option>":null,g='<div class="ls-select-box"><select id="'+(h.$elem).attr("id")+'-nav-select" name="navigation">'+j+"</select></div>";h.navigation=d(h.sliderId+"-nav-ul").before(g);h.dropdown=d(h.sliderId+"-wrapper .ls-select-box");h.dropdownSelect=d(h.sliderId+"-nav-select");d.each((h.$elem).find(h.options.panelTitleSelector),function(k){d((h.$sliderWrap)).find(".ls-select-box select").append('<option value="tab'+(k+1)+'">'+d(this).text()+"</option>")})}d.each((h.$elem).find(h.options.panelTitleSelector),function(k){d((h.$sliderWrap)).find(".ls-nav ul").append('<li class="tab'+(k+1)+'"><a class="'+(i||"")+'" href="#'+(k+1)+'">'+h.getNavInsides(this)+"</a></li>");if(!h.options.includeTitle){d(this).remove()}})},getNavInsides:function(f){return(this.options.dynamicTabsHtml)?d(f).html():d(f).text()}
3567,alignNavigation:function(){var f=this,g=(f.options.dynamicArrowsGraphical)?"-arrow":"";if(f.options.dynamicTabsAlign!=="center"){if(!f.options.responsive){d((f.$sliderWrap)).find(".ls-nav ul").css("margin-"+f.options.dynamicTabsAlign,d((f.$sliderWrap)).find(".ls-nav-"+f.options.dynamicTabsAlign+g).outerWidth(true)+parseInt((f.$sliderId).css("margin-"+f.options.dynamicTabsAlign),10))}d((f.$sliderWrap)).find(".ls-nav ul").css("float",f.options.dynamicTabsAlign)}f.totalNavWidth=d((f.$sliderWrap)).find(".ls-nav ul").outerWidth(true);if(f.options.dynamicTabsAlign==="center"){f.totalNavWidth=0;d((f.$sliderWrap)).find(".ls-nav li a").each(function(){f.totalNavWidth+=d(this).outerWidth(true)});d((f.$sliderWrap)).find(".ls-nav ul").css("width",f.totalNavWidth+1)}},registerNav:function(){var f=this;(f.$sliderWrap).find("[class^=ls-nav] li").on("click",function(){f.setNextPanel(parseInt(d(this).attr("class").split("tab")[1],10)-1);return false})},addArrows:function(g){var f=this,h=(f.options.dynamicArrowsGraphical)?"-arrow ":" ";(f.$sliderWrap).addClass("arrows");if(f.options.dynamicArrowsGraphical){f.options.dynamicArrowLeftText="";f.options.dynamicArrowRightText=""}(f.$sliderId).before('<div class="ls-nav-left'+h+(g||"")+'"><a href="#">'+f.options.dynamicArrowLeftText+"</a></div>");(f.$sliderId).after('<div class="ls-nav-right'+h+(g||"")+'"><a href="#">'+f.options.dynamicArrowRightText+"</a></div>");f.leftArrow=d(f.sliderId+"-wrapper [class^=ls-nav-left]").css("visibility","hidden").addClass("ls-hidden");f.rightArrow=d(f.sliderId+"-wrapper [class^=ls-nav-right]").css("visibility","hidden").addClass("ls-hidden");if(!f.options.hoverArrows){f.hideShowArrows(e,true,true,false)}},hideShowArrows:function(k,h,m,l){var i=this,j=(typeof k!=="undefined")?k:i.options.fadeOutDuration,f=(typeof k!=="undefined")?k:i.options.fadeInDuration,g=h?"visible":"hidden";if(!m&&(l||(i.sanatizeNumber(i.nextPanel)===1))){i.leftArrow.stop().fadeTo(j,0,function(){d(this).css("visibility",g).addClass("ls-hidden")})}else{if(m||i.leftArrow.hasClass("ls-hidden")){i.leftArrow.stop().css("visibility","visible").fadeTo(f,1).removeClass("ls-hidden")}}if(!m&&(l||(i.sanatizeNumber(i.nextPanel)===i.panelCount))){i.rightArrow.stop().fadeTo(j,0,function(){d(this).css("visibility",g).addClass("ls-hidden")})}else{if(m||i.rightArrow.hasClass("ls-hidden")){i.rightArrow.stop().css("visibility","visible").fadeTo(f,1).removeClass("ls-hidden")}}},registerArrows:function(){var f=this;d((f.$sliderWrap).find("[class^=ls-nav-]")).on("click",function(){f.setNextPanel(d(this).attr("class").split(" ")[0].split("-")[2])})},registerCrossLinks:function(){var f=this;f.crosslinks=d("[data-liquidslider-ref*="+(f.sliderId).split("#")[1]+"]");(f.crosslinks).on("click",function(g){if(f.options.autoSlide===true){f.startAutoSlide(true)}f.setNextPanel(f.getPanelNumber((d(this).attr("href").split("#")[1]),f.options.panelTitleSelector));g.preventDefault()});f.updateClass()},registerTouch:function(){var f=this,g=f.options.swipeArgs||{fallbackToMouseEvents:false,allowPageScroll:"vertical",swipe:function(i,h){if(h==="up"||h==="down"){return false}f.swipeDir=(h==="left")?"right":"left";f.setNextPanel(f.swipeDir)}};d(f.sliderId+" .panel").swipe(g)},registerKeyboard:function(){var f=this;d(a).keydown(function(h){var g=h.keyCode||h.which;if(h.target.type!=="textarea"&&h.target.type!=="textbox"){if(!f.options.forceAutoSlide){d(this).trigger("click")}
3567if(g===f.options.leftKey){f.setNextPanel("right")}if(g===f.options.rightKey){f.setNextPanel("left")}d.each(f.options.panelKeys,function(i,j){if(g===j){f.setNextPanel(i-1)}})}})},autoSlide:function(){var f=this;if(f.options.autoSlideInterval<f.options.slideEaseDuration){f.options.autoSlideInterval=(f.options.slideEaseDuration>f.options.heightEaseDuration)?f.options.slideEaseDuration:f.options.heightEaseDuration}f.autoSlideTimeout=setTimeout(function(){f.setNextPanel(f.options.autoSlideDirection);f.autoSlide()},f.options.autoSlideInterval)},stopAutoSlide:function(){var f=this;f.options.autoSlide=false;clearTimeout(f.autoSlideTimeout)},startAutoSlide:function(g){var f=this;f.options.autoSlide=true;if(!g){f.setNextPanel(f.options.autoSlideDirection)}f.autoSlide(clearTimeout(f.autoSlideTimeout))},updateHashTags:function(){var f=this,g=(f.nextPanel===f.panelCount)?0:f.nextPanel;c.location.hash=f.getFromPanel(f.options.hashTitleSelector,g)},adjustHeight:function(h,f,j,i){var g=this;if(h||g.useCSS){if(h){g.configureCSSTransitions("0","0")}(g.$sliderId).height(f);if(h){g.configureCSSTransitions()}return}(g.$sliderId).animate({height:f+"px"},{easing:j||g.options.heightEaseFunction,duration:i||g.options.heightEaseDuration,queue:false})},getHeight:function(f){var g=this;f=f||g.$panelClass.eq(g.sanatizeNumber(g.nextPanel)-1).outerHeight(true);f=(f<g.options.minHeight)?g.options.minHeight:f;return f},addPreloader:function(){var f=this;d(f.sliderId+"-wrapper").append('<div class="ls-preloader"></div>')},removePreloader:function(){var f=this;d(f.sliderId+"-wrapper .ls-preloader").fadeTo("slow",0,function(){d(this).remove()})},init:function(g,h){var f=this;f.elem=h;f.$elem=d(h);d("body").removeClass("no-js");f.sliderId="#"+(f.$elem).attr("id");f.$sliderId=d(f.sliderId);f.options=d.extend({},d.fn.liquidSlider.options,g);f.pSign=(f.options.responsive)?"%":"px";if(f.options.responsive){f.determineAnimationType()}else{f.options.mobileNavigation=false;f.options.hideArrowsWhenMobile=false}if(f.options.slideEaseFunction==="animate.css"){if(!f.useCSS){f.options.slideEaseFunction="easeInOutExpo"}else{f.options.continuous=false;f.animateCSS=true}}f.build();f.events();if(!f.options.responsive&&f.options.dynamicArrows){f.$sliderWrap.width(f.$sliderId.outerWidth(true)+f.leftArrow.outerWidth(true)+f.rightArrow.outerWidth(true))}f.loaded=true;d(c).bind("load",function(){f.options.preload.call(f)})},build:function(){var f=this,h;if((f.$sliderId).parent().attr("class")!=="ls-wrapper"){(f.$sliderId).wrap('<div id="'+(f.$elem).attr("id")+'-wrapper" class="ls-wrapper"></div>')}f.$sliderWrap=d(f.sliderId+"-wrapper");if(f.options.preloader){f.addPreloader()}d(f.sliderId).children().addClass((f.$elem).attr("id")+"-panel panel");f.panelClass=f.sliderId+" ."+(f.$elem).attr("id")+"-panel:not(.clone)";f.$panelClass=d(f.panelClass);(f.$panelClass).wrapAll('<div class="panel-container"></div>');(f.$panelClass).wrapInner('<div class="panel-wrapper"></div>');f.panelContainer=(f.$panelClass).parent();f.$panelContainer=f.panelContainer;if(f.options.slideEaseFunction==="fade"){(f.$panelClass).addClass("fade");f.options.continuous=false;f.fade=true}if(f.options.dynamicTabs){f.addNavigation()}else{f.options.mobileNavigation=false}if(f.options.dynamicArrows){f.addArrows()}else{f.options.hoverArrows=false;f.options.hideSideArrows=false;f.options.hideArrowsWhenMobile=false}h=((f.$leftArrow)&&(f.$leftArrow).css("position")==="absolute")?0:1;f.totalSliderWidth=(f.$sliderId).outerWidth(true)+(d(f.$leftArrow).outerWidth(true))*h+(d(f.$rightArrow).outerWidth(true))*h;d((f.$sliderWrap)).css("width",f.totalSliderWidth);if(f.options.dynamicTabs){f.alignNavigation()}if(f.options.hideSideArrows){f.options.continuous=false}if(f.options.continuous){(f.$panelContainer).prepend((f.$panelContainer).children().last().clone().addClass("clone"));(f.$panelContainer).append((f.$panelContainer).children().eq(1).clone().addClass("clone"))}var g=(f.options.continuous)?2:0;f.panelCount=d(f.panelClass).length;f.panelCountTotal=(f.fade)?1:f.panelCount+g;f.panelWidth=d(f.panelClass).outerWidth();f.totalWidth=f.panelCountTotal*f.panelWidth;d(f.sliderId+" .panel-container").css("width",f.totalWidth);f.slideDistance=(f.options.responsive)?100:d(f.sliderId).outerWidth();if(f.useCSS){f.totalWidth=100*f.panelCountTotal;f.slideDistance=100/f.panelCountTotal}if(f.options.responsive){f.makeResponsive()}f.prepareTransition(f.getFirstPanel(),true);f.updateClass()},determineAnimationType:function(){var f=this,l="animation",j="",h="Webkit Moz O ms Khtml".split(" "),k="",g=0;f.useCSS=false;if(f.elem.style.animationName){f.useCSS=true}if(f.useCSS===false){for(g=0;g<h.length;g++){if(f.elem.style[h[g]+"AnimationName"]!==e){k=h[g];l=k+"Animation";j="-"+k.toLowerCase()+"-";f.useCSS=true;break}}}if(a.documentElement.clientWidth>f.options.useCSSMaxWidth){f.useCSS=false}},configureCSSTransitions:function(g,f){var h=this,i,j;h.easing={easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1
3567)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175,.885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};if(h.useCSS){i="all "+(g||h.options.slideEaseDuration)+"ms "+h.easing[h.options.slideEaseFunction];j="all "+(f||h.options.heightEaseDuration)+"ms "+h.easing[h.options.heightEaseFunction];d(h.panelContainer).css({"-webkit-transition":i,"-moz-transition":i,"-ms-transition":i,"-o-transition":i,transition:i});if(h.options.autoHeight){(h.$sliderId).css({"-webkit-transition":j,"-moz-transition":j,"-ms-transition":j,"-o-transition":j,transition:j})}}},transitionFade:function(){var f=this;d(f.panelClass).eq(f.nextPanel).fadeTo(f.options.fadeInDuration,1).css("z-index",1);d(f.panelClass).eq(f.prevPanel).fadeTo(f.options.fadeOutDuration,0).css("z-index",0);f.callback(f.options.callback,true)},hover:function(){var f=this;(f.$sliderWrap).hover(function(){if(f.options.hoverArrows){f.hideShowArrows(f.options.fadeInDuration,true,true,false)}if(f.options.pauseOnHover){clearTimeout(f.autoSlideTimeout)}},function(){if(f.options.hoverArrows){f.hideShowArrows(f.options.fadeOutnDuration,true,false,true)}if(f.options.pauseOnHover&&f.options.autoSlide){f.startAutoSlide()}})},events:function(){var f=this;if(f.options.dynamicArrows){f.registerArrows()}if(f.options.crossLinks){f.registerCrossLinks()}if(f.options.dynamicTabs){f.registerNav()}if(f.options.swipe){f.registerTouch()}if(f.options.keyboardNavigation){f.registerKeyboard()}(f.$sliderWrap).find("*").on("click",function(){if(f.options.forceAutoSlide){f.startAutoSlide(true)}else{if(f.options.autoSlide){f.stopAutoSlide()}}});f.hover()},setNextPanel:function(g){var f=this;if(g===f.nextPanel){return}f.prevPanel=f.nextPanel;if(f.loaded){if(typeof g==="number"){f.nextPanel=g}else{f.nextPanel+=(~~(g==="right")||-1);if(!f.options.continuous){f.nextPanel=(f.nextPanel<0)?f.panelCount-1:(f.nextPanel%f.panelCount)}}if(f.fade||f.animateCSS){f.prepareTransition(f.nextPanel)}else{f.verifyPanel()}}},getFirstPanel:function(){var g=this,f;if(g.options.hashLinking){f=g.getPanelNumber(c.location.hash,g.options.hashTitleSelector);if(typeof(f)!=="number"){f=0}}return(f)?f:g.options.firstPanelToLoad-1},getPanelNumber:function(i,h){var g=this,j,f=i.replace("#","").toLowerCase();(g.$panelClass).each(function(k){j=d(this).find(h).text().toLowerCase().replace(/(^\s+|\s+$)/g,"").replace(/(\s)/g,"-");if(j===f){f=k+1}});return(parseInt(f,10)?parseInt(f,10)-1:f)},getFromPanel:function(g,h){var f=this;return f.$panelClass.find(g).eq(h).text().replace(/(^\s+|\s+$)/g,"").replace(/(\s)/g,"-","-").toLowerCase()},updateClass:function(){var f=this;if(f.options.dynamicTabs){d((f.$sliderWrap)).find(".tab"+f.sanatizeNumber(f.nextPanel)+":first a").addClass("current").parent().siblings().children().removeClass("current")}if(f.options.crossLinks&&f.crosslinks){(f.crosslinks).not(f.nextPanel).removeClass("currentCrossLink");(f.crosslinks).each(function(){if(d(this).attr("href")===("#"+f.getFromPanel(f.options.panelTitleSelector,f.sanatizeNumber(f.nextPanel)-1))){d(this).addClass("currentCrossLink")}})}},sanatizeNumber:function(f){var g=this;if(f>=g.panelCount){return 1}else{if(f<=-1){return g.panelCount}else{return f+1}}},finalize:function(){var g=this;var f=(g.options.autoHeight)?g.getHeight():g.getHeighestPanel(g.nextPanel);if(g.options.autoHeight){g.adjustHeight(true,f)}if(g.options.autoSlide){g.autoSlide()}if(g.options.preloader){g.removePreloader()}g.onload()},callback:function(g,h){var f=this;if(g&&f.loaded){if(f.useCSS&&typeof h!=="undefined"){d(".panel-container").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(i){g.call(f)})}else{setTimeout(function(){g.call(f)},f.options.slideEaseDuration+50)}}},onload:function(){var f=this;f.options.onload.call(f)},prepareTransition:function(j,h,g,i){var f=this;f.nextPanel=j||0;if(!g){f.pretransition(f.options.pretransition)}f.noAnimation=h;f.noPosttransition=i;if(!f.loaded){f.transition()}else{f.options.pretransition.call(f)}},pretransition:function(){var f=this,g;if(f.options.hashLinking){f.updateHashTags()}if(f.options.mobileNavigation){f.dropdownSelect.val("tab"+(f.nextPanel+1))}
3567if(f.options.hideSideArrows){f.hideShowArrows()}f.updateClass()},getTransitionMargin:function(){var f=this;return -(f.nextPanel*f.slideDistance)-(f.slideDistance*~~(f.options.continuous))},transition:function(){var f=this,g=f.getTransitionMargin();if(f.animateCSS&&f.loaded){f.transitionOutAnimateCSS();return false}if((g+f.pSign)!==(f.panelContainer).css("margin-left")||(g!==-100)){if(f.options.autoHeight&&!f.animateCSS){f.adjustHeight(true,f.getHeight())}if(f.fade){f.transitionFade()}else{if(f.animateCSS){f.transitionInAnimateCSS(g)}else{if(f.useCSS){f.transitionCSS(g,f.noAnimation)}else{f.transitionjQuery(g,f.noAnimation)}}}}if(!f.noPosttransition){f.callback(f.options.callback)}},transitionOutAnimateCSS:function(){var f=this;d(f.panelClass).removeClass(f.options.animateIn+" animated");d(f.panelClass).eq(f.prevPanel).addClass("animated "+f.options.animateOut);f.callback(f.transitionInAnimateCSS,e)},transitionInAnimateCSS:function(){var f=this;if(f.options.autoHeight){f.adjustHeight(false,f.getHeight())}f.transitionCSS(f.getTransitionMargin(),!f.loaded);d(f.panelClass).removeClass(f.options.animateOut+" animated");d(f.panelClass).eq(f.nextPanel).addClass("animated "+f.options.animateIn);f.callback(f.options.callback,e)},transitionCSS:function(h,g){var f=this;if(g){f.configureCSSTransitions("0","0")}(f.panelContainer).css({"-webkit-transform":"translate3d("+h+f.pSign+", 0, 0)","-moz-transform":"translate3d("+h+f.pSign+", 0, 0)","-ms-transform":"translate3d("+h+f.pSign+", 0, 0)","-o-transform":"translate3d("+h+f.pSign+", 0, 0)",transform:"translate3d("+h+f.pSign+", 0, 0)"});if(g){f.callback(function(){f.configureCSSTransitions()})}else{f.configureCSSTransitions()}},transitionjQuery:function(h,g){var f=this;if(g){(f.panelContainer).css("margin-left",h+f.pSign)}else{(f.panelContainer).animate({"margin-left":h+f.pSign},{easing:f.options.slideEaseFunction,duration:f.options.slideEaseDuration,queue:false})}},getHeighestPanel:function(){var g=this,f,h=0;g.$panelClass.each(function(){f=d(this).outerHeight(true);h=(f>h)?f:h});if(!g.options.autoHeight){return h}},verifyPanel:function(){var g=this,f=false;if(g.options.continuous){if(g.nextPanel>g.panelCount){g.nextPanel=g.panelCount;g.setNextPanel(g.panelCount)}else{if(g.nextPanel<-1){g.nextPanel=-1;g.setNextPanel(-1)}else{if((!f)&&((g.nextPanel===g.panelCount)||(g.nextPanel===-1))){g.prepareTransition(g.nextPanel);g.updateClass();clearTimeout(h);var h=setTimeout(function(){if(g.nextPanel===g.panelCount){g.prepareTransition(0,true,true,true)}else{if(g.nextPanel===-1){g.prepareTransition(g.panelCount-1,true,true,true)}}},g.options.slideEaseDuration+50)}else{f=true;g.prepareTransition(g.nextPanel)}}}}else{if(g.nextPanel===g.panelCount){g.nextPanel=0}else{if(g.nextPanel===-1){g.nextPanel=(g.panelCount-1)}}g.prepareTransition(g.nextPanel)}}};d.fn.liquidSlider=function(f){return this.each(function(){var g=Object.create(b);g.init(f,this);d.data(this,"liquidSlider",g)})};d.fn.liquidSlider.options={autoHeight:true,minHeight:0,heightEaseDuration:1500,heightEaseFunction:"easeInOutExpo",slideEaseDuration:1500,slideEaseFunction:"easeInOutExpo",animateIn:"bounceInRight",animateOut:"bounceOutRight",continuous:true,fadeInDuration:500,fadeOutDuration:500,autoSlide:false,autoSlideDirection:"right",autoSlideInterval:6000,forceAutoSlide:false,pauseOnHover:false,dynamicArrows:true,dynamicArrowsGraphical:true,dynamicArrowLeftText:"&#171; left",dynamicArrowRightText:"right &#187;",hideSideArrows:false,hideSideArrowsDuration:750,hoverArrows:true,hoverArrowDuration:250,dynamicTabs:true,dynamicTabsHtml:true,includeTitle:true,panelTitleSelector:".title",dynamicTabsAlign:"left",dynamicTabsPosition:"top",navElementTag:"div",firstPanelToLoad:1,crossLinks:false,hashLinking:false,hashTitleSelector:".title",keyboardNavigation:false,leftKey:39,rightKey:37,panelKeys:{1:49,2:50,3:51,4:52},responsive:true,mobileNavigation:true,mobileNavDefaultText:"Menu",mobileUIThreshold:0,hideArrowsWhenMobile:true,hideArrowsThreshold:0,useCSSMaxWidth:2200,preload:function(){this.finalize()},onload:function(){},pretransition:function(){this.transition()}
3567,callback:function(){},preloader:false,swipe:true,swipeArgs:e}})(jQuery,window,document);
3568;/*})'"*/
3569;/*})'"*/
3570/**
3571  * Start of jQuery
3572  */
3573(function ($) {
3574	$(document).ready(function() {
3575
3576// agent inline email form
3577    if($('.field-name-field-agent').length > 0) {
3578		$('.field-name-field-agent-email a').text('Email this Contact');
3579		$('.field-name-field-agent-email a').each(function(){
3580			var href = $(this).attr('href');
3581			$(this).attr('href',href+"?subject=Enquiry from retalkasia.com&body=%0D%0A%0D%0A%0D%0A"+window.location.href);
3582		})
3583    }
3584
3585    $('.field-name-field-agent .field-items:empty').parent().parent().hide();
3586
3587// sidebar
3588
3589	$("#block-views-blog-sidebar-block h2").html("<a href='/blogs'>BLOGS</a>");
3590
3591//homepage
3592	$(".views-field-field-display-columnist-image:contains('<div class=\"field-content\"></div>')").addClass("empty-columnist-image");
3593	$(".views-row").has(".empty-columnist-image").addClass("hide-author");
3594
3595  	$('.views-field-field-display-columnist-image').has('img').siblings(".views-field-field-author").hide();
3596
3597
3598// header and navigation
3599	$("#block-views-columnists-columnist-menu").appendTo(".tertiary_menu_wrapper .menu_centering .menu_centering_inner");
3600	var $activePage = $("h1#page-title").text(); // to make the contributor name active
3601
3602// Responsive - two column view
3603/*
3604	var sideBarHeight = 0;
3605	var sideBarHeight = $("body.sidebar-second.sidebar-middle-true.page-taxonomy #sidebar-second").outerHeight();
3606	$("body.sidebar-second #main").minHeight(sideBarHeight);
3607*/
3608
3609// Node pages
3610	$(".node-type-contributor #page-title").text("Contributors");
3611
3612    var path = window.location.href; // Just grabbing a handy reference to it
3613	$('.view-display-id-columnist_menu .views-row a').each(function() {
3614	    if (this.href === path) {
3615	        $(this).addClass('active-trail');
3616	    }
3617	});
3618
3619	// scripts for screen resizing (responsive)
3620	function doneResizing() {
3621
3622        if(Modernizr.mq('screen and (max-width:567px)')) {
3623
3624          // Re-disable body scrolling for mobile menus if active when screen is resized smaller.
3625          if($("#mobile_overlay_area_nav").is(":visible")) {
3626    	    	$('body').addClass("body-mbmenu-visible");
3627    	    }
3628          else if($("#mobile_overlay_area_account").is(":visible")) {
3629    	    	$('body').addClass("body-mbmenu-visible");    	    }
3630    	    else if($("#mobile_overlay_area_info").is(":visible")) {
3631    	    	$('body').addClass("body-mbmenu-visible");
3632    	    }
3633    	    else if($("#mobile_overlay_area_search").is(":visible")) {
3634    	    	$('body').addClass("body-mbmenu-visible");
3635    	    }
3636
3637	  	}
3638
3639
3640        if(Modernizr.mq('screen and (min-width:568px)')) {
3641          // Allow body to scroll if mobile menu enabled when screen is re-sized larger.
3642          $('body').removeClass("body-mbmenu-visible");
3643        }
3644
3645
3646        if(Modernizr.mq('screen and (min-width:800px)')) {
3647            // action for screen widths above 800 pixels
3648            $(".toc-filter").appendTo(".field-name-toc"); // move TOC based on screen width
3649        }
3650
3651        if(Modernizr.mq('screen and (min-width:568px) and (max-width:799px)')) {
3652            // action for screen widths including and above 568 pixels
3653            $(".toc-filter").insertBefore(".field-name-body"); // move TOC based on screen width
3654
3655            // article order on homepage
3656            $(".view-id-nodequeue_2 .views-row-1, .view-id-nodequeue_2 .views-row-2").insertBefore(".view-id-nodequeue_2 .views-row-3");
3657        }
3658
3659        else if(Modernizr.mq('screen and (max-width:850px)')) {
3660            // action for screen widths below 850 pixels
3661
3662            // article order on homepage
3663            $(".view-id-nodequeue_2 .views-row-1, .view-id-nodequeue_2 .views-row-2").insertAfter(".view-id-nodequeue_1 .views-row-3");
3664        }
3665    }
3666    var id;
3667    $(window).resize(function() {
3668        clearTimeout(id);
3669        id = setTimeout(doneResizing, 0);
3670    });
3671    doneResizing();
3672
3673
3674	$('p').has('.toc-filter-top').css({'visibility': 'hidden', 'height': '0', 'line-height': '0', 'margin': '0'});
3675	//$('p').has('.toc-filter-top').next('p').addClass("first-letter");
3676	//$('p').has('.toc-filter-top').siblings().addClass("first-letter");
3677	$('p').has('.toc-filter-top').nextAll('p').first().addClass("first-letter");
3678
3679	$("<a class='headings_toggle'>Hide Subheadings</a>").insertAfter(".toc-filter-content ul, .toc-filter-content ol");
3680	$('.headings_toggle').click(function() {
3681		// .toggle() works partially, but the links no longer scroll to the correct position as they aren't visible
3682		//$('h3.toc-header, .toc-filter-back-to-top').toggle();
3683		if($('h3.toc-header, .toc-filter-back-to-top').css("visibility") == "visible") {
3684		    $('h3.toc-header, .toc-filter-back-to-top').css({ 'visibility': 'hidden', 'height': '0', 'line-height': '0', 'margin': '0'});
3685		}
3686		else {
3687		    $('h3.toc-header, .toc-filter-back-to-top').css({ 'visibility': 'visible', 'height': 'inherit', 'line-height': 'inherit', 'margin': 'inherit'});
3688		}
3689
3690	  	var $toggleLink = $(".headings_toggle");
3691	    if($toggleLink.text() == "Hide Subheadings"){
3692	       $toggleLink.text("Show Subheadings");
3693	    } else {
3694	       $toggleLink.text("Hide Subheadings");
3695	   }
3696	});
3697
3698
3699// taxonomy pages
3700	$('div.field-item').has("[href*='/topic/'], [href*='/letters'], [href*='/editorial']").addClass("topic-slug");
3701
3702// JIRA bug reporting
3703/*
3704jQuery.ajax({
3705    url: "https://themonthly.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e/en_UK-b0lepd-1988229788/6138/51/1.4.0-m5/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?collectorId=2b76fb72",
3706    type: "get",
3707    cache: true,
3708    dataType: "script"
3709});
3710*/
3711
3712// Text Toggle
3713
3714
3715	$(function(){
3716		$('.text_toggle_icon').click(function(){
3717			$('#text-resize').toggleClass('resize-inline');
3718			$('.text_toggle_icon').toggleClass('active');
3719		});
3720	});
3721
3722	$('.text-resize-increase').click(function(){
3723		$('body').removeClass('preference-text-size-small preference-text-size-normal');
3724		$('body').toggleClass('preference-text-size-large');
3725	});
3726
3727	$('.text-resize-decrease').click(function(){
3728		$('body').removeClass('preference-text-size-large preference-text-size-normal');
3729		$('body').toggleClass('preference-text-size-small')
3730	});
3731
3732	$('.text-resize-normal').click(function(){
3733		$('body').removeClass('preference-text-size-small preference-text-size-large');
3734		$('body').toggleClass('preference-text-size-normal')
3735	});
3736
3737	$('.text-restyle').click(function(){
3738		$('body').toggleClass('preference-text-sans')
3739	});
3740
3741
3742// Set main-wrapper height of absolutely positioned sidebar to avoid sidebar overlapping footer
3743
3744	var adInterval = setInterval(function () {
3745		var adHeight = 0;
3746		$("#sidebar-second div[class^='div-gpt-ad']").each(function(){
3747		    adHeight = adHeight + $(this).outerHeight(true);
3748		});
3749
3750		$("#main-wrapper").css("min-height", function(){
3751			// console.log($("#sidebar-second").outerHeight());
3752			// console.log(adHeight);
3753		    return $("#sidebar-second").outerHeight()+adHeight; // +1400 is to allow for the height of the twitter IFrame and some other floated items possibly
3754		});
3755		clearInterval(adInterval);
3756	}, 1000);
3757
3758
3759
3760/*
3761	$("#main-wrapper").css("min-height", function(){
3762
3763	    return $("#sidebar-second").outerHeight()+adHeight; // +1400 is to allow for the height of the twitter IFrame and some other floated items possibly
3764	});
3765*/
3766
3767// Mobile menu
3768
3769	// menu acordion
3770
3771	// var allPanels = $('.menu-block-wrapper.menu-block-2 > .menu > li.expanded > ul').hide();
3772	var allPanels = $('.menu-block-wrapper.menu-block-2 > .main-menu > li.menu-parent > ul').hide();
3773
3774	$("<a class='subcat_accordian' href='#'>&nbsp;</a>").insertAfter('.menu-block-wrapper.menu-block-2  > .main-menu > li.menu-parent > a');
3775
3776	$('.menu-block-wrapper.menu-block-2  > .main-menu > li.menu-parent > a.subcat_accordian').click(function() {
3777		if ($(this).next().is(":visible")){
3778			$(this).next().slideUp();
3779		}else{
3780			allPanels.slideUp();
3781			$(this).next().slideDown();
3782			return false;
3783		}
3784	});
3785
3786
3787
3788	$("#mobile_cat_selector").html( $(".mobile_overlay_area_content #mobile-main-menu li a.active-trail").clone() );
3789	$("#mobile_subcat_selector").html( $(".mobile_overlay_area_content #mobile-secondary-menu li a.active-trail").clone() );
3790
3791	$(".mobile_overlay_area_content #mobile-main-menu li a, .mobile_overlay_area_content #mobile-secondary-menu li a").addClass("ajax-link").attr('rel', '#mobile_overlay_area_nav');
3792
3793	$('#mbNavigation').click(function(){
3794
3795	    if($("#mobile_overlay_area_account").is(":visible")) {
3796	    	$("#mobile_overlay_area_account").slideUp(function(){
3797	      		$('#mobile_overlay_area_nav').slideToggle();
3798	    	});
3799	    }
3800	    else if($("#mobile_overlay_area_info").is(":visible")) {
3801	    	$("#mobile_overlay_area_info").slideUp(function(){
3802	      		$('#mobile_overlay_area_nav').slideToggle();
3803	    	});
3804	    }
3805	    else if($("#mobile_overlay_area_search").is(":visible")) {
3806	    	$("#mobile_overlay_area_search").slideUp(function(){
3807	      		$('#mobile_overlay_area_nav').slideToggle();
3808	    	});
3809
3810	  	}
3811
3812	  	else {
3813	    	$('#mobile_overlay_area_nav').slideToggle();
3814	    	$('body').toggleClass("body-mbmenu-visible");
3815	  	}
3816
3817		if ($('#mbNavigation i').hasClass('fa-bars')) {
3818			$('#mbNavigation i').removeClass('fa-bars');
3819			$('#mbNavigation i').addClass('fa-times');
3820		} else {
3821			$('#mbNavigation i').removeClass('fa-times');
3822			$('#mbNavigation i').addClass('fa-bars');
3823		}
3824
3825
3826
3827	});
3828
3829
3830	$('#mbSiteInfo').click(function(){
3831		if($("#mobile_overlay_area_nav").is(":visible")) {
3832	    	$("#mobile_overlay_area_nav").slideUp(function(){
3833	      		$('#mobile_overlay_area_info').slideToggle();
3834	    	});
3835	    }
3836	    else if($("#mobile_overlay_area_account").is(":visible")) {
3837	    	$("#mobile_overlay_area_account").slideUp(function(){
3838	      		$('#mobile_overlay_area_info').slideToggle();
3839	    	});
3840	    }
3841	    else if($("#mobile_overlay_area_search").is(":visible")) {
3842	    	$("#mobile_overlay_area_search").slideUp(function(){
3843	      		$('#mobile_overlay_area_info').slideToggle();
3844	    	});
3845	  	}
3846	  	else {
3847	    	$('#mobile_overlay_area_info').slideToggle();
3848	    	$('body').toggleClass("body-mbmenu-visible");
3849	  	}
3850	});
3851
3852
3853
3854
3855	$('#mbAccount').click(function(){
3856		if($("#mobile_overlay_area_nav").is(":visible")) {
3857	    	$("#mobile_overlay_area_nav").slideUp(function(){
3858	      		$('#mobile_overlay_area_account').slideToggle();
3859	    	});
3860	    }
3861	    else if($("#mobile_overlay_area_info").is(":visible")) {
3862	    	$("#mobile_overlay_area_info").slideUp(function(){
3863	      		$('#mobile_overlay_area_account').slideToggle();
3864	    	});
3865	    }
3866	    else if($("#mobile_overlay_area_search").is(":visible")) {
3867	    	$("#mobile_overlay_area_search").slideUp(function(){
3868	      		$('#mobile_overlay_area_account').slideToggle();
3869	    	});
3870
3871	  	}
3872	  	else {
3873	    	$('#mobile_overlay_area_account').slideToggle();
3874	    	$('body').toggleClass("body-mbmenu-visible");
3875	  	}
3876	});
3877
3878	$('#mbSearch').click(function(){
3879		if($("#mobile_overlay_area_nav").is(":visible")) {
3880	    	$("#mobile_overlay_area_nav").slideUp(function(){
3881	      		$('#mobile_overlay_area_search').slideToggle();
3882	    	});
3883	    }
3884	    else if($("#mobile_overlay_area_account").is(":visible")) {
3885	    	$("#mobile_overlay_area_account").slideUp(function(){
3886	      		$('#mobile_overlay_area_search').slideToggle();
3887	    	});
3888	    }
3889	    else if($("#mobile_overlay_area_info").is(":visible")) {
3890	    	$("#mobile_overlay_area_info").slideUp(function(){
3891	      		$('#mobile_overlay_area_search').slideToggle();
3892	    	});
3893
3894	  	}
3895	  	else {
3896	    	$('#mobile_overlay_area_search').slideToggle();
3897	    	$('body').toggleClass("body-mbmenu-visible");
3898	  	}
3899	});
3900
3901
3902	$("#account_tab_saved_articles #account_tab_my_sub #account_tab_logout");
3903
3904	$("#account_overlay_bookmarks #account_overlay_my_sub #account_overlay_logout");
3905
3906
3907     $('#slider-id').liquidSlider();
3908
3909
3910// home contextual
3911
3912/* $(".front .section.contextual-links-region .contextual-links-wrapper").prependTo(".view-nodequeue-1"); */
3913
3914
3915/**
3916  * jQuery to Finish here
3917  */
3918
3919
3920
3921
3922	});
3923
3924})(jQuery);
3925        /* The Homepage realestate search */
3926
3927$(document).ready(function() {
3928
3929        	var Search = {};
3930
3931        	Search.callTypeahead = function(inputValue, ajaxType)
3932        	{
3933
3934        		var typeahead = inputValue.typeahead({
3935        			name: ajaxType,
3936        			limit: 10,
3937        			remote: {
3938        				url: 'http://www.' + inputValue.data('remote') + '/ajax/' + ajaxType + '?q=',
3939        				replace: function(url, encodedQuery) {
3940        					return url + encodedQuery.replace(/^.*\%2C(\%20)?/, '') + '&existing=' + inputValue.val();
3941        				}
3942        			}
3943        		});
3944
3945        		var typeaheadChange = function(datum) {
3946        			datum.target.value = datum.target.value + ', ';
3947        		};
3948
3949        		typeahead.on(
3950        			'typeahead:selected',
3951        			typeaheadChange
3952        		);
3953
3954        		typeahead.on(
3955        			'typeahead:autocompleted',
3956        			typeaheadChange
3957        		);
3958
3959        		typeahead.on('typeahead:beforeinputchange', function(e, suggestion) {
3960
3961        			input = e.target.value;
3962
3963        			if(input.indexOf(',') === -1) {
3964        				term = '';
3965        			} else {
3966        				term = input.replace(/[^,]+$/, '') + ' ';
3967        			}
3968
3969        			term = term + suggestion.value;
3970        			suggestion.value = term;
3971
3972        		});
3973
3974        		return typeahead;
3975        	}
3976
3977        	Search.callTypeahead(
3978        	$('#thp-location'),
3979        	 'locality'
3980        	);
3981});
3982
3983;/*})'"*/
3984;/*})'"*/
3985/**
3986 * @file
3987 * A JavaScript file for the theme.
3988 *
3989 * In order for this JavaScript to be loaded on pages, see the instructions in
3990 * the README.txt next to this file.
3991 */
3992
3993// JavaScript should be made compatible with libraries other than jQuery by
3994// wrapping it with an "anonymous closure". See:
3995// - https://drupal.org/node/1446420
3996// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
3997(function ($, Drupal, window, document, undefined) {
3998  // To understand behaviors, see https://drupal.org/node/756722#behaviors
3999  Drupal.behaviors.my_custom_behavior = {
4000    attach: function (context, settings) {
4001      var sessionTermId = "";
4002      var sessionName = "";
4003      var defaultSessionName = "Asia";
4004
4005      // If front page
4006      if ($("body").hasClass("front")) {
4007        // Reset the cookies
4008        Cookies.remove("sessionTermId");
4009        Cookies.remove("sessionName");
4010      } else {
4011        // If region page
4012        if (window.location.href.includes("/regions/")) {
4013          // Find the Region name
4014          var location = window.location.href.split("?")[0];
4015          var sessionName = location.split("/regions/")[1];
4016
4017          // Find the Region ID
4018          var classList = $("body").attr("class").split(/\s+/);
4019          var searchfor = "page-taxonomy-term-";
4020          $.each(classList, function (index, item) {
4021            if (item.includes(searchfor) && item.length > searchfor.length) {
4022              sessionTermId = item.replace(searchfor, "");
4023            }
4024          });
4025
4026          // Create the cookies
4027          if (sessionTermId != "") {
4028            Cookies.set("sessionTermId", sessionTermId);
4029          }
4030          if (sessionName != "") {
4031            Cookies.set("sessionName", sessionName);
4032          }
4033        }
4034
4035        // If any other page
4036        else {
4037          // Check for cookies, load values.
4038          if (typeof Cookies.get("sessionTermId") !== "undefined") {
4039            sessionTermId = Cookies.get("sessionTermId");
4040          }
4041          if (typeof Cookies.get("sessionName") !== "undefined") {
4042            sessionName = Cookies.get("sessionName");
4043          }
4044          // Load masthead title with default
4045          $(".header-location a").text(defaultSessionName);
4046        }
4047
4048        if (sessionTermId != "") {
4049          // Load main menu
4050          $.ajax({
4051            type: "POST",
4052            url: "/api/menu",
4053            dataType: "html",
4054            data: "regionid=" + sessionTermId,
4055            success: function (data) {
4056              $(".main-menu").replaceWith(data);
4057              console.log("Ajax menu loaded.");
4058              init_main_menu();
4059            },
4060          });
4061
4062          // Load Affiliate logo
4063          $.ajax({
4064            type: "POST",
4065            url: "/api/affiliate",
4066            dataType: "html",
4067            data: "regionid=" + sessionTermId,
4068            success: function (data) {
4069              if (data) {
4070                $(".affiliate_logo").html(data);
4071              }
4072            },
4073          });
4074
4075          // Load Header image and name
4076          $(".block-menu-menu-regions .menu li").each(function () {
4077            if ($("a ", this).attr("title") == sessionName) {
4078              $(this).parent().addClass("active-trail");
4079            } else {
4080              $(this).parent().addClass(sessionName);
4081            }
4082          });
4083
4084          // Load Header image and name
4085          $(".header-location a")
4086            .text(sessionName)
4087            .attr("href", "/regions/" + sessionName);
4088        }
4089      }
4090
4091      // APPLY ALL THE MAIN-MENU FUNCTIONS.
4092      function init_main_menu() {
4093        // MAIN MENU FUNCTIONALITY
4094        $(".responsive-menu li.menu-parent").hover(
4095          function () {
4096            $(this).find(".sub-menu").addClass("active");
4097          },
4098          function () {
4099            $(this).find(".sub-menu").removeClass("active");
4100          }
4101        );
4102
4103        // MAIN NAV REGION FILTERING
4104        $("#main-menu .sub-menu.tier-two").each(function () {
4105          // Add class name to each empty li
4106          $(this)
4107            .children("li")
4108            .each(function () {
4109              if ($.trim($(this).children("a").html()) == "") {
4110                $(this).addClass("empty-item");
4111              }
4112            });
4113          // If all children for a submenu are empty, add class name.
4114          var allItems = $(this).children("li").length;
4115          var emptyItems = $(this).children("li.empty-item").length;
4116          if (allItems == emptyItems) {
4117            $(this).addClass("empty-submenu");
4118          }
4119        });
4120
4121        // EXPOSED FILTERS
4122        $(".views-exposed-form .views-exposed-widget").each(function () {
4123          var label = $(this).children("label").text();
4124          $(this).find('option:contains("- Any -")').text(label);
4125          $(this)
4126            .find(".form-type-select")
4127            .prepend("<span class='arrow'></span>");
4128        });
4129
4130        // TOUCH NAV
4131        $("html.touch #navigation ul.main-menu > li.menu-parent > a").each(
4132          function () {
4133            $(this)
4134              .next("ul")
4135              .append(
4136                '<li class="menu-item active active-trail view-all"><a href="' +
4137                  $(this).attr("href") +
4138                  '">View all ' +
4139                  $(this).text() +
4140                  "</a></li>"
4141              );
4142          }
4143        );
4144
4145        $("html.touch #navigation ul.main-menu > li.menu-parent > a").on(
4146          "click",
4147          function (e) {
4148            // ON iPad: Main menu links are links. DO NOT SHOW SUBMENUS
4149            e.preventDefault();
4150            // open menu if closed
4151            if (!$(this).hasClass("touch-open")) {
4152              // close all menus
4153              $("ul.main-menu > li.menu-parent > a").removeClass("touch-open");
4154              $("ul.main-menu > li.menu-parent > ul").removeClass("active");
4155              // open menu
4156              $(this).addClass("touch-open");
4157              $(this).next().addClass("active");
4158            } else {
4159              $(this).removeClass("touch-open");
4160              $(this).next().removeClass("active");
4161            }
4162          }
4163        );
4164
4165        // HIDE EMPTY REGION SUMMARIES
4166        $(".view-region-summaries").each(function () {
4167          if ($(this).children().length == 0) {
4168            $(this).parent(".region-wrapper").hide();
4169          }
4170        });
4171      }
4172
4173      init_main_menu();
4174
4175      // Admin Menu Body Margin
4176      function adminNavBody() {
4177        var adminHeight = $("#admin-menu").height() - 16;
4178        //$('body').css('marginTop', adminHeight + "px");
4179        $("body.admin-menu").css(
4180          "cssText",
4181          "margin-top: " + adminHeight + "px !important"
4182        );
4183      }
4184      $(window).resize(function () {
4185        adminNavBody();
4186      });
4187
4188      $('#email-side-bar input[type="submit"]').click(function (e) {
4189        e.preventDefault();
4190        $("#hidden-email-form").show();
4191        var valstr = $('#email-side-bar input[type="email"]').val();
4192        $('#hidden-email-form>div input[type="email"]').val(valstr);
4193      });
4194
4195      $('#email-footer input[type="submit"]').click(function (e) {
4196        e.preventDefault();
4197        $("#hidden-email-form").show();
4198        var valstr = $('#email-footer input[type="email"]').val();
4199        $('#hidden-email-form>div input[type="email"]').val(valstr);
4200      });
4201
4202      $("#mbClose").click(function () {
4203        $("#mobile_overlay_area_nav").slideToggle();
4204        $("body").toggleClass("body-mbmenu-visible");
4205      });
4206
4207      // Move Subscribe box into content
4208      if ($(window).width() >= "1280") {
4209        // Add Social media to subscribe box
4210        $("#social_media .social-links")
4211          .clone()
4212          .appendTo("#block-sw-cb-sw-cb-block-subscribe .social-links-wrapper");
4213
4214        var anchorElement = "";
4215        // article or listing page
4216        if ($(".not-front").length > 0) {
4217          // listing page
4218          if ($(".page-taxonomy").length > 0) {
4219            anchorElement = ".region-content";
4220
4221            // Found an element. Move the block.
4222            if (anchorElement != "") {
4223              $("#block-sw-cb-sw-cb-block-subscribe")
4224                .clone()
4225                .appendTo(anchorElement);
4226            }
4227          }
4228          // article page
4229          else {
4230            if ($(".field-name-field-tags").length > 0) {
4231              anchorElement = ".field-name-field-tags";
4232            } else if ($(".field-name-popular").length > 0) {
4233              anchorElement = ".field-name-popular";
4234            }
4235            // Found an element. Move the block.
4236            if (anchorElement != "") {
4237              $(".not-front #block-sw-cb-sw-cb-block-subscribe")
4238                .clone()
4239                .prependTo(anchorElement);
4240            }
4241            // Didn't find any elements below, so look above.
4242            else {
4243              // Look for elements above ideal position to attach after.
4244              if ($(".field-name-addthis-secondary").length > 0) {
4245                anchorElement = ".field-name-addthis-secondary";
4246              }
4247              // Found an element. Move the block.
4248              if (anchorElement != "") {
4249                $(".not-front #block-sw-cb-sw-cb-block-subscribe")
4250                  .clone()
4251                  .insertAfter(anchorElement);
4252              }
4253              // Didn't find elements above. Don't move the block.
4254            }
4255          }
4256        }
4257        // front page
4258        else {
4259          anchorElement = ".region-summaries";
4260
4261          // Found an element. Move the block.
4262          if (anchorElement != "") {
4263            $("#block-sw-cb-sw-cb-block-subscribe")
4264              .clone()
4265              .prependTo(anchorElement);
4266          }
4267        }
4268      }
4269
4270      /*********************/
4271      /** REGION SWITCHER **/
4272      /*********************/
4273
4274      $("#block-menu-menu-regions", context).once(function () {
4275        $("<div class='current'></div>").insertBefore(
4276          "#block-menu-menu-regions .content > ul.menu"
4277        );
4278        $("#block-menu-menu-regions .content > ul.menu").wrap(
4279          "<div class='selector-wrap'> </div>"
4280        );
4281
4282        var windowsize = $(window).width();
4283        if (windowsize > "700") {
4284          $(".region-header div > .menu > li.leaf").append(
4285            '<ul class="menu"><li class="expanded first leaf">&nbsp;</li></ul>'
4286          );
4287          $(".region-header div > .menu > li.leaf").addClass("expanded");
4288        }
4289
4290        $(".region-header div > .menu").append(
4291          '<li class="expanded"><a hef="#" style="color: #000"><strong>Visit our partner sites</strong></a>\n\
4292					<ul class="menu partners">\n\
4293						<li class="first expanded partner-header">\n\
4294							<span>Visit our partner sites</span>\n\
4295						</li>\n\
4296					</ul>\n\
4297				</li>'
4298        );
4299        $(".region-header div > .menu .menu.partners").append(
4300          $("#footer .quick-links-wrap .section .content ul").html()
4301        );
4302        $(".region-header div > .menu .menu.partners li a").addClass(
4303          "click end-point partner"
4304        );
4305
4306        $("#block-menu-menu-regions .content .selector-wrap > ul.menu").prepend(
4307          '<li class="first all-asia leaf"><a style="color:#000;" href="/" title="All ' +
4308            defaultSessionName +
4309            '">All ' +
4310            defaultSessionName +
4311            "</a></li>"
4312        );
4313
4314        $("#block-menu-menu-regions .content  ul.menu  li.expanded").each(
4315          function (index, element) {
4316            if ($(this).children("ul").length === 0) {
4317              $(this).removeClass("expanded");
4318            }
4319          }
4320        );
4321
4322        regionName = "";
4323        // Change these variables to use the session not the cookie
4324        regionName = sessionName;
4325        regionId = sessionTermId;
4326
4327        if (regionName !== "" && regionName !== null) {
4328          $("#block-menu-menu-regions .content  ul.menu  li  a").each(function (
4329            index,
4330            element
4331          ) {
4332            if (
4333              $(this).text().toLowerCase() === regionName.replace(/\-/gi, " ")
4334            ) {
4335              $(this)
4336                .addClass("active-trail active")
4337                .parent()
4338                .addClass("active-trail");
4339
4340              if ($(this).parent().parent().parent().children("a")) {
4341                $(this)
4342                  .parent()
4343                  .parent()
4344                  .parent()
4345                  .children("a")
4346                  .addClass("active-trail active");
4347                $(this).parent().parent().parent().addClass("active-trail");
4348                if (
4349                  $(this)
4350                    .parent()
4351                    .parent()
4352                    .parent()
4353                    .parent()
4354                    .parent()
4355                    .children("a")
4356                ) {
4357                  $(this)
4358                    .parent()
4359                    .parent()
4360                    .parent()
4361                    .parent()
4362                    .parent()
4363                    .children("a")
4364                    .addClass("active-trail active");
4365                  $(this)
4366                    .parent()
4367                    .parent()
4368                    .parent()
4369                    .parent()
4370                    .parent()
4371                    .addClass("active-trail");
4372                  if (
4373                    $(this)
4374                      .parent()
4375                      .parent()
4376                      .parent()
4377                      .parent()
4378                      .parent()
4379                      .children("a")
4380                  ) {
4381                    $(this)
4382                      .parent()
4383                      .parent()
4384                      .parent()
4385                      .parent()
4386                      .parent()
4387                      .parent()
4388                      .parent()
4389                      .children("a")
4390                      .addClass("active-trail active");
4391                    $(this)
4392                      .parent()
4393                      .parent()
4394                      .parent()
4395                      .parent()
4396                      .parent()
4397                      .parent()
4398                      .parent()
4399                      .addClass("active-trail");
4400                  }
4401                }
4402              }
4403            }
4404          });
4405        }
4406
4407        $("#block-menu-menu-regions").on("click", ".content", function () {
4408          $(this).toggleClass("open");
4409          $(this).find(".selector-wrap").toggleClass("open");
4410          $(this).find(".selector-wrap > ul.menu").toggleClass("open");
4411          if (
4412            $(
4413              "#block-menu-menu-regions .content .selector-wrap > ul.menu"
4414            ).hasClass("open")
4415          ) {
4416            $(
4417              "#block-menu-menu-regions .content  ul.menu  li  a.active-trail"
4418            ).each(function (index, element) {
4419              $(this).parent().addClass("click");
4420              $("#block-menu-menu-regions .content  ul.menu  li.click").each(
4421                function (index, element) {
4422                  $(this).parent().parent().parent().addClass("qqq2");
4423                  if (
4424                    $(this)
4425                      .parent()
4426                      .parent()
4427                      .parent()
4428                      .parent()
4429                      .parent()
4430                      .is("ul")
4431                  ) {
4432                    $(this)
4433                      .parent()
4434                      .parent()
4435                      .parent()
4436                      .parent()
4437                      .parent()
4438                      .addClass("qqq3");
4439                  }
4440                }
4441              );
4442            });
4443            if ($(window).width() < 740) {
4444              var distance = $("#block-menu-menu-regions").offset().left;
4445              //$('#block-menu-menu-regions .content .selector-wrap > ul.menu').css('left', -distance);
4446              //$('#block-menu-menu-regions .content .selector-wrap > ul.menu').width($(window).width() - 20);
4447              $("#block-menu-menu-regions .content .selector-wrap").css(
4448                "left",
4449                -distance
4450              );
4451              $("#block-menu-menu-regions .content .selector-wrap").width(
4452                $(window).width() - 20
4453              );
4454
4455              $(
4456                "#block-menu-menu-regions .content .selector-wrap > ul.menu> li a"
4457              ).css("padding-left", distance);
4458              $(
4459                "#block-menu-menu-regions .content .selector-wrap > ul.menu> li span"
4460              ).css("padding-left", distance);
4461
4462              $(
4463                "#block-menu-menu-regions .content .selector-wrap > ul.menu .indent2"
4464              ).css("left", distance + 5);
4465              $(
4466                "#block-menu-menu-regions .content .selector-wrap > ul.menu .indent3"
4467              ).css("left", distance + 5);
4468              $(
4469                "#block-menu-menu-regions .content .selector-wrap > ul.menu .indent4"
4470              ).css("left", distance + 5);
4471            }
4472          } else {
4473            $("#block-menu-menu-regions .content")
4474              .find(".qqq")
4475              .removeClass("qqq");
4476            $("#block-menu-menu-regions .content")
4477              .find(".qqq2")
4478              .removeClass("qqq2");
4479            $("#block-menu-menu-regions .content")
4480              .find(".qqq3")
4481              .removeClass("qqq3");
4482            $("#block-menu-menu-regions .content")
4483              .find(".click")
4484              .removeClass("click");
4485          }
4486        });
4487
4488        $("#block-menu-menu-regions .content .selector-wrap > ul.menu")
4489          .has(".active-trail")
4490          .addClass("selected");
4491
4492        $(
4493          "#block-menu-menu-regions .content .selector-wrap > ul.menu > li > a"
4494        ).append('<div class="indent2"></div>');
4495        $(
4496          "#block-menu-menu-regions .content .selector-wrap > ul.menu > li > ul > li > a"
4497        ).append('<div class="indent3"></div>');
4498        $(
4499          "#block-menu-menu-regions .content .selector-wrap > ul.menu > li > ul > li > ul > li > a"
4500        ).append('<div class="indent4"></div>');
4501
4502        $("#block-menu-menu-regions ul:first").prepend(
4503          '<li class="wrap"></li>'
4504        );
4505
4506    
4506    $("#block-menu-menu-regions ul ul li.expanded").hover(
4507          function () {
4508            //over
4509            if ($(window).width() > 740) {
4510              $(this).parent().parent().parent().toggleClass("qqq");
4511            }
4512          },
4513          function () {
4514            //out
4515            if ($(window).width() > 740) {
4516              $(this).parent().parent().parent().toggleClass("qqq");
4517            }
4518          }
4519        );
4520
4521        $("#block-menu-menu-regions ul li a").click(function () {
4522          if ($(window).width() < 740) {
4523            // if an end-point of the nav just follow the link
4524            if ($(this).hasClass("end-point") || !$(this).next().is("ul")) {
4525              return true;
4526            }
4527
4528            if ($(this).parent().hasClass("expanded")) {
4529              if ($(this).parent().hasClass("click")) {
4530                $(this).parent().removeClass("click");
4531                $(this).parent().parent().removeClass("qqq2");
4532                $(this).parent().find(".qqq2").removeClass("qqq2");
4533                $(this)
4534                  .parent()
4535                  .parent()
4536                  .parent()
4537                  .parent()
4538                  .parent()
4539                  .find(".qqq3")
4540                  .removeClass("qqq3");
4541                $(this).parent().find("li").removeClass("click");
4542              } else {
4543                $(this).parent().siblings().removeClass("click");
4544                $(this).parent().siblings().find("li").removeClass("click");
4545                $(this).parent().addClass("click");
4546                $(this).parent().find(".qqq2").removeClass("qqq2");
4547                $(this)
4548                  .parent()
4549                  .parent()
4550                  .parent()
4551                  .parent()
4552                  .parent()
4553                  .find(".qqq3")
4554                  .removeClass("qqq3");
4555                if ($(this).parent().parent().parent().parent().is("ul")) {
4556                  $(this).parent().parent().parent().parent().addClass("qqq3");
4557                }
4558                $(this).parent().parent().addClass("qqq2");
4559
4560                if (
4561                  $(this).parent().parent().parent().hasClass("selector-wrap")
4562                ) {
4563                  $(window).scrollTop($(this).offset().top - 10);
4564                }
4565              }
4566              return false;
4567            }
4568          } else {
4569            /*$('#block-menu-menu-regions .content li.click').hide();
4570						 $('#block-menu-menu-regions .content li.click').attr({
4571						 class: 'expanded',
4572						 });*/
4573            $(this).removeClass("click");
4574          }
4575        });
4576
4577        $("#block-menu-menu-regions").on("hover", "ul li a", function () {
4578          if (
4579            $(window).width() > 740 &&
4580            $("#block-menu-menu-regions ul.menu").hasClass("open")
4581          ) {
4582            if ($(this).parent().hasClass("expanded")) {
4583              if ($(this).hasClass("end-point")) {
4584                $(this).parent().find("ul").hide();
4585                $(this).parent().find('[class^="indent"]').hide();
4586              }
4587              if ($(this).parent().hasClass("click")) {
4588                //$(this).parent().removeClass('click');
4589                $(this).parent().parent().removeClass("qqq2");
4590                $(this).parent().find(".qqq2").removeClass("qqq2");
4591                $(this)
4592                  .parent()
4593                  .parent()
4594                  .parent()
4595                  .parent()
4596                  .parent()
4597                  .find(".qqq3")
4598                  .removeClass("qqq3");
4599                $(this).parent().find("li").removeClass("click");
4600              } else {
4601                $(this).parent().siblings().removeClass("click");
4602                $(this).parent().siblings().find("li").removeClass("click");
4603                $(this).parent().addClass("click");
4604                $(this).parent().find(".qqq2").removeClass("qqq2");
4605                $(this)
4606                  .parent()
4607                  .parent()
4608                  .parent()
4609                  .parent()
4610                  .parent()
4611                  .find(".qqq3")
4612                  .removeClass("qqq3");
4613                if ($(this).parent().parent().parent().parent().is("ul")) {
4614                  $(this).parent().parent().parent().parent().addClass("qqq3");
4615                }
4616                $(this).parent().parent().addClass("qqq2");
4617              }
4618            }
4619          }
4620        });
4621
4622        //$("#block-menu-menu-regions ul li.expanded > a").each(function (i) {
4623        $("#block-menu-menu-regions ul > li > a").each(function (i) {
4624          attr = $(this).attr("href");
4625          text = $(this).text();
4626          if (text !== "Australia") {
4627            if (text == "Myanmar") {
4628              //$(this).attr('href', 'http://www.mingalarrealestateconversation.com');
4629              //$(this).attr('target', '_blank');
4630              //$(this).parent().children('ul').empty();
4631              $(this)
4632                .parent()
4633                .children("ul")
4634                .append(
4635                  '<li class="expanded"><a style="color:#000;" href="' +
4636                    attr +
4637                    '" class="end-point">All ' +
4638                    text +
4639                    "</a></li>"
4640                );
4641              $(this).parent().children("ul").prepend(
4642                '<li class="first expanded">\n\
4643								<span>Visit our partner site</span>\n\
4644							</li>\n\
4645							<li style="margin-bottom: 24px;">\n\
4646								<a href="http://www.mingalarrealestateconversation.com" class="click end-point mingalar-partner" target="_blank"><img src="/sites/all/themes/re_talk_asia/images/logos/mingalar-logo.svg" width="120" alt="Myanmar Real Estate Conversation logo"><div style="line-height:1.5em; font-size:0.875em;">Myanmar Real Estate Conversation</div></a>\n\
4647							</li>\n<li>\n\
4648								<span>Visit by region</span>\n\
4649							</li>'
4650              );
4651            } else if (text == "Bali") {
4652              $(this)
4653                .parent()
4654                .children("ul")
4655                .append(
4656                  '<li class="expanded"><a style="color:#000;" href="' +
4657                    attr +
4658                    '" class="end-point">All ' +
4659                    text +
4660                    "</a></li>"
4661                );
4662              $(this).parent().children("ul").prepend(
4663                '<li class="first expanded">\n\
4664								<span>Visit our partner site</span>\n\
4665							</li>\n\
4666							<li style="margin-bottom: 24px;">\n\
4667								<a href="http://www.gapurabali.com" class="click end-point gapura-partner" target="_blank"><img src="/sites/all/themes/re_talk_asia/images/logos/gapura-logo.svg" width="120" alt="Gapura Bali logo"><div style="line-height:1.5em;">Gapura Bali</div></a>\n\
4668							</li>\n<li>\n\
4669								<span>Visit by region</span>\n\
4670							</li>'
4671              );
4672            } else if (text == "Jakarta") {
4673              $(this).parent().addClass("expanded");
4674              $(this).parent().append('<ul class="menu"></ul>');
4675              $(this)
4676                .parent()
4677                .children("ul")
4678                .append(
4679                  '<li class="expanded"><a style="color:#000;" href="' +
4680                    attr +
4681                    '" class="end-point">All ' +
4682                    text +
4683                    "</a></li>"
4684                );
4685              $(this).parent().children("ul").prepend(
4686                '<li class="first expanded">\n\
4687								<span>Visit our partner site</span>\n\
4688							</li>\n\
4689							<li style="margin-bottom: 24px;">\n\
4690								<a href="http://www.gapurajakarta.com" class="click end-point gapura-partner" target="_blank"><img src="/sites/all/themes/re_talk_asia/images/logos/gapura-logo.svg" width="120" alt="Gapura Jakarta logo"><div style="line-height:1.5em;">Gapura Jakarta</div></a>\n\
4691							</li>'
4692              );
4693            } else if (text == "Tokyo") {
4694              $(this).parent().addClass("expanded");
4695              $(this).parent().append('<ul class="menu"></ul>');
4696              $(this)
4697                .parent()
4698                .children("ul")
4699                .append(
4700                  '<li class="expanded"><a style="color:#000;" href="' +
4701                    attr +
4702                    '" class="end-point">All ' +
4703                    text +
4704                    "</a></li>"
4705                );
4706              $(this).parent().children("ul").prepend(
4707                '<li class="first expanded">\n\
4708								<span>Visit our partner site</span>\n\
4709							</li>\n\
4710							<li style="margin-bottom: 24px;">\n\
4711								<a href="http://www.rethinkjapan.com" class="click end-point rethink-partner" target="_blank"><img src="/sites/all/themes/re_talk_asia/images/logos/rethink-logo.svg" width="200" alt="RETHINK Tokyo logo"></a>\n\
4712							</li>'
4713              );
4714            } else {
4715              if (typeof attr !== "undefined") {
4716                if (
4717                  $(this).hasClass("active-trail") &&
4718                  !$(this)
4719                    .parent()
4720                    .parent()
4721                    .children()
4722                    .children()
4723                    .children()
4724                    .hasClass("active-trail")
4725                ) {
4726                  $(this)
4727                    .parent()
4728                    .children("ul")
4729                    .append(
4730                      '<li class="active-trail expanded"><a style="color:#000;" class="active active-trail" href="' +
4731                        attr +
4732                        '" class="end-point">All ' +
4733                        text +
4734                        "</a></li>"
4735                    );
4736                } else {
4737                  if ($(this).parent().children("ul").length != 0) {
4738                    $(this)
4739                      .parent()
4740                      .children("ul")
4741                      .append(
4742                        '<li class="expanded"><a style="color:#000;" href="' +
4743                          attr +
4744                          '" class="end-point">All ' +
4745                          text +
4746                          "</a></li>"
4747                      );
4748                  } else {
4749                    $(this).parent().addClass("expanded");
4750
4751                    if (text == "RETalk Partners") {
4752                      $(this).parent().append(
4753                        '<ul class="menu">\n\
4754												<li>\n\
4755													<a href="http://www.retalkmena.com" class="end-point" target="_blank">RETalk MENA<a>\n\
4756												</li>\n\
4757											</ul>'
4758                      );
4759                    } else {
4760                      // $(this).parent().append('<ul class="menu"><li class="expanded"><a style="color:#000;" href="' + attr + '" class="end-point">
4760All ' + text + '</a></li></ul>');
4761                    }
4762                  }
4763                }
4764              }
4765            }
4766          }
4767        });
4768
4769        function menu_helper() {
4770          if ($(window).width() > 740) {
4771            menu_item_width = ($("#header").width() - 2) / 4 - 20;
4772            $("ul.menu a").width(menu_item_width);
4773            $("ul.menu li").width(menu_item_width);
4774            $("ul.menu .indent2").css("left", menu_item_width - 11); // +9
4775            $("ul.menu .indent3").css("left", menu_item_width - 11);
4776            $("ul.menu .indent4").css("left", menu_item_width - 11);
4777            $("ul.menu ul.menu").css("left", menu_item_width + 20);
4778            if (
4779              $(
4780                "#block-menu-menu-regions .content .selector-wrap > ul.menu"
4781              ).hasClass("open")
4782            ) {
4783              //$('#block-menu-menu-regions .content .selector-wrap > ul.menu').css('left', 0);
4784              //$('#block-menu-menu-regions .content .selector-wrap > ul.menu').width('auto');
4785              $("#block-menu-menu-regions .content .selector-wrap").css(
4786                "left",
4787                0
4788              );
4789              $("#block-menu-menu-regions .content .selector-wrap").width(
4790                "auto"
4791              );
4792              $(
4793                "#block-menu-menu-regions .content .selector-wrap > ul.menu> li  a"
4794              ).css("padding-left", 0);
4795              $(
4796                "#block-menu-menu-regions .content .selector-wrap > ul.menu> li  span"
4797              ).css("padding-left", 0);
4798            }
4799          } else {
4800            if (
4801              $(
4802                "#block-menu-menu-regions .content .selector-wrap > ul.menu"
4803              ).hasClass("open")
4804            ) {
4805              var distance = $("#block-menu-menu-regions").offset().left;
4806              //$('#block-menu-menu-regions .content .selector-wrap > ul.menu').css('left', -distance);
4807              //$('#block-menu-menu-regions .content .selector-wrap > ul.menu').width($(window).width() - 2);
4808              $("#block-menu-menu-regions .content .selector-wrap").css(
4809                "left",
4810                -distance
4811              );
4812              $("#block-menu-menu-regions .content .selector-wrap").width(
4813                $(window).width() - 2
4814              );
4815
4816              $(
4817                "#block-menu-menu-regions .content .selector-wrap > ul.menu> li  a"
4818              ).css("padding-left", distance);
4819              $(
4820                "#block-menu-menu-regions .content .selector-wrap > ul.menu> li  span"
4821              ).css("padding-left", distance);
4822
4823              $(
4824                "#block-menu-menu-regions .content .selector-wrap > ul.menu .indent2"
4825              ).css("left", distance + 5);
4826              $(
4827                "#block-menu-menu-regions .content .selector-wrap > ul.menu .indent3"
4828              ).css("left", distance + 5);
4829              $(
4830                "#block-menu-menu-regions .content .selector-wrap > ul.menu .indent4"
4831              ).css("left", distance + 5);
4832            }
4833            $("ul.menu ul.menu").css("left", 0);
4834            $("ul.menu li").width("auto");
4835            $("#block-menu-menu-regions .content")
4836              .find(".qqq")
4837              .removeClass("qqq");
4838          }
4839        }
4840
4841        $(window).resize(function () {
4842          menu_helper();
4843        });
4844        menu_helper();
4845
4846        function activeLinkMenu() {
4847          region = "";
4848
4849          $(
4850            "#block-menu-menu-regions .content  ul.menu  li  a.active-trail"
4851          ).each(function (index, element) {
4852            //if (region === '') { region = $(this).text(); }
4853            //else { region = region + ', ' + $(this).text();}
4854            region = $(this).text();
4855          });
4856          if (region === "") {
4857            $(".content .current").html("SELECT LOCATION");
4858          } else if (region !== "") {
4859            $(".content .current").html(region);
4860          } else {
4861            $(".content .current").html("SELECT LOCATION");
4862          }
4863        }
4864
4865        activeLinkMenu();
4866
4867        //$("#block-menu-menu-regions h2").append('<p class="ls-home"> re<span>talk</span> asia <span>></span> </p>');
4868        $("#block-menu-menu-regions").prepend(
4869          '<h2><a href="/" title="Home - All Luxury List" class="ls-home">HOME</a><span> > </span></h2>'
4870        );
4871
4872        // CITY FLY OUT
4873        var menuWidth = $(
4874          "#block-menu-menu-regions .content .selector-wrap > ul.menu"
4875        ).width();
4876
4877        // CLOSE ON BLUR
4878        $(document).mouseup(function (e) {
4879          var container = $("#block-menu-menu-regions");
4880          if (
4881            !container.is(e.target) && // if the target of the click isn't the container...
4882            container.has(e.target).length === 0
4883          ) {
4884            // ... nor a descendant of the container
4885            $("#block-menu-menu-regions .content").removeClass("open");
4886            $("#block-menu-menu-regions .content .selector-wrap").removeClass(
4887              "open"
4888            );
4889            $(
4890              "#block-menu-menu-regions .content .selector-wrap > ul.menu"
4891            ).removeClass("open");
4892            $("#block-menu-menu-regions .content")
4893              .find(".qqq")
4894              .removeClass("qqq");
4895            $("#block-menu-menu-regions .content")
4896              .find(".qqq2")
4897              .removeClass("qqq2");
4898            $("#block-menu-menu-regions .content")
4899              .find(".qqq3")
4900              .removeClass("qqq3");
4901            $("#block-menu-menu-regions .content")
4902              .find(".click")
4903              .removeClass("click");
4904            $(".city").removeClass("open");
4905            $(".city > ul.menu").removeClass("open");
4906          }
4907        });
4908      });
4909
4910      // Subscribe popup
4911
4912      $("#hidden-email-form > div, #hidden-email-response > div").append(
4913        '<img id="popup-hide" src="/sites/all/themes/re_talk_asia/images/popup-hide.png" alt="" />'
4914      );
4915
4916      $("#popup-hide, #hidden-email-response>div a").live(
4917        "click",
4918        function (event) {
4919          $("#hidden-email-form").hide();
4920          $("#hidden-email-response").hide();
4921        }
4922      );
4923
4924      //-- email form
4925
4926      /*
4927			if ($(window).height() < 445) {
4928				$("#hidden-email-form > div").css({
4929					"height": ($(window).height()-5),
4930					"overflow": "scroll"
4931				});
4932				$("#hidden-email-response > div").css({
4933					"height": ($(window).height()-5),
4934					"overflow": "scroll"
4935				});
4936			}
4937*/
4938
4939      function emailFormHeight() {
4940        if ($(window).height() > 477) {
4941          $("#hidden-email-form").css(
4942            "padding-top",
4943            ($(window).height() - 477) / 2
4944          );
4945        }
4946        if ($(window).height() > 469) {
4947          $("#hidden-email-response").css(
4948            "padding-top",
4949            ($(window).height() - 469) / 2
4950          );
4951        }
4952      }
4953      emailFormHeight();
4954      $(window).resize(function () {
4955        emailFormHeight();
4956      });
4957
4958      $(" .all-asia .indent2").css("background-image", "none");
4959
4960      // SUBSCRIBE FORM
4961
4962      function validEmail(v) {
4963        var r = new RegExp(
4964          "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"
4965        );
4966        return v.match(r) == null ? false : true;
4967      }
4968
4969      $("#hidden-email-form .error").hide();
4970      $("#hidden-email-form input[type=submit]").click(function () {
4971        $(this).attr("disabled", "disabled");
4972
4973        $("#hidden-email-form .error").hide();
4974        var email = $("#hidden-email-form input#email").val();
4975        if (email == "" || !validEmail(email)) {
4976          $("label#email_error").show();
4977          $("input#email").focus();
4978          $("#hidden-email-form input[type=submit]").removeAttr("disabled");
4979          return false;
4980        }
4981
4982        var checkbox_value = "";
4983        $("#hidden-email-form .check-box-wrap :checkbox").each(function () {
4984          var ischecked = $(this).is(":checked");
4985          if (ischecked) {
4986            checkbox_value += "&country[]=" + $(this).val();
4987          }
4988        });
4989
4990        if (!$("#hidden-email-form .terms_wrap :checkbox").is(":checked")) {
4991          $("label#terms_error").show();
4992          $("input#terms").focus();
4993          $("#hidden-email-form input[type=submit]").removeAttr("disabled");
4994          return false;
4995        } else {
4996          $("label#terms_error").hide();
4997          $("#hidden-email-form input[type=submit]").removeAttr("disabled");
4998        }
4999
5000        var dataString = "email=" + email + "&country=" + checkbox_value;
5001        //alert (dataString);return false;
5002        $.ajax({
5003          type: "POST",
5004          url: "/sites/all/modules/custom/retalk_newsletter/subscribe.php",
5005          data: dataString,
5006          success: function () {
5007            $("#hidden-email-form").hide();
5008            $("#hidden-email-response").show();
5009            $("#hidden-email-form input[type=submit]").removeAttr("disabled");
5010
5011            var results = "";
5012
5013            $("#hidden-email-form .check-box-wrap :checkbox").each(function () {
5014              var ischecked = $(this).is(":checked");
5015              if (ischecked) {
5016                results +=
5017                  '<div><p><span class="red-brand">RE</span>TALK <span class="region-name">' +
5018                  $(this).val() +
5019                  "</span></p></div>";
5020              }
5021            });
5022
5023            $(".success-list").append(results);
5024            /*
5025			      $('#hidden-email-form').html("<div id='message'></div>");
5026			      $('#hidden-email-response').show();
5027			      $('#message').html("<h2>Contact Form Submitted!</h2>")
5028			      .append("<p>We will be in touch soon.</p>")
5029			      .hide()
5030			      .fadeIn(1500, function() {
5031			        $('#message').append("<img id='checkmark' src='images/check.png' />");
5032			      });
5033*/
5034          },
5035        });
5036        return false;
5037      });
5038    },
5039  };
5040})(jQuery, Drupal, this, this.document);
5041
5042;/*})'"*/
5043;/*})'"*/
5044/*! Backstretch - v2.0.4 - 2013-06-19
5045* http://srobbin.com/jquery-plugins/backstretch/
5046* Copyright (c) 2013 Scott Robbin; Licensed MIT */
5047(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHe
5047ight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);
5048;/*})'"*/
5049;/*})'"*/
5050(function ($) {
5051
5052  /**
5053   * Behavior for backstretch implementations for background images.
5054   */
5055  Drupal.behaviors.backstretch_implemented = {
5056
5057    frontDataDiv: '#main-wrapper',
5058
5059    dataIdentifier: 'backstretch-url',
5060
5061    backstretch: function backstretch(context) {
5062      var _this = Drupal.behaviors.backstretch_implemented;
5063      var $wrappers = $(context).find('[data-' + _this.dataIdentifier + ']');
5064      if (!$wrappers.length) {
5065        return;
5066      }
5067
5068      $wrappers.each(function(i, el) {
5069        var $el = $(el);
5070        var url = $el.data(_this.dataIdentifier);
5071        $(_this.frontDataDiv).backstretch(url);
5072      });
5073
5074    },
5075
5076    /**
5077     * Implements attach().
5078     */
5079    attach: function(context) {
5080      var _this = Drupal.behaviors.backstretch_implemented;
5081        _this.backstretch(context);
5082    }
5083  };
5084})(jQuery);
5085
5086;/*})'"*/
5087;/*})'"*/
5088/*!
5089 * JavaScript Cookie v2.2.0
5090 * https://github.com/js-cookie/js-cookie
5091 *
5092 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
5093 * Released under the MIT license
5094 */
5095;(function (factory) {
5096	var registeredInModuleLoader;
5097	if (typeof define === 'function' && define.amd) {
5098		define(factory);
5099		registeredInModuleLoader = true;
5100	}
5101	if (typeof exports === 'object') {
5102		module.exports = factory();
5103		registeredInModuleLoader = true;
5104	}
5105	if (!registeredInModuleLoader) {
5106		var OldCookies = window.Cookies;
5107		var api = window.Cookies = factory();
5108		api.noConflict = function () {
5109			window.Cookies = OldCookies;
5110			return api;
5111		};
5112	}
5113}(function () {
5114	function extend () {
5115		var i = 0;
5116		var result = {};
5117		for (; i < arguments.length; i++) {
5118			var attributes = arguments[ i ];
5119			for (var key in attributes) {
5120				result[key] = attributes[key];
5121			}
5122		}
5123		return result;
5124	}
5125
5126	function decode (s) {
5127		return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
5128	}
5129
5130	function init (converter) {
5131		function api() {}
5132
5133		function set (key, value, attributes) {
5134			if (typeof document === 'undefined') {
5135				return;
5136			}
5137
5138			attributes = extend({
5139				path: '/'
5140			}, api.defaults, attributes);
5141
5142			if (typeof attributes.expires === 'number') {
5143				attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
5144			}
5145
5146			// We're using "expires" because "max-age" is not supported by IE
5147			attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
5148
5149			try {
5150				var result = JSON.stringify(value);
5151				if (/^[\{\[]/.test(result)) {
5152					value = result;
5153				}
5154			} catch (e) {}
5155
5156			value = converter.write ?
5157				converter.write(value, key) :
5158				encodeURIComponent(String(value))
5159					.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
5160
5161			key = encodeURIComponent(String(key))
5162				.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
5163				.replace(/[\(\)]/g, escape);
5164
5165			var stringifiedAttributes = '';
5166			for (var attributeName in attributes) {
5167				if (!attributes[attributeName]) {
5168					continue;
5169				}
5170				stringifiedAttributes += '; ' + attributeName;
5171				if (attributes[attributeName] === true) {
5172					continue;
5173				}
5174
5175				// Considers RFC 6265 section 5.2:
5176				// ...
5177				// 3.  If the remaining unparsed-attributes contains a %x3B (";")
5178				//     character:
5179				// Consume the characters of the unparsed-attributes up to,
5180				// not including, the first %x3B (";") character.
5181				// ...
vendor: 1,441 bytes, lines 5182-5253
5182				stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
5183			}
5184
5185			return (document.cookie = key + '=' + value + stringifiedAttributes);
5186		}
5187
5188		function get (key, json) {
5189			if (typeof document === 'undefined') {
5190				return;
5191			}
5192
5193			var jar = {};
5194			// To prevent the for loop in the first place assign an empty array
5195			// in case there are no cookies at all.
5196			var cookies = document.cookie ? document.cookie.split('; ') : [];
5197			var i = 0;
5198
5199			for (; i < cookies.length; i++) {
5200				var parts = cookies[i].split('=');
5201				var cookie = parts.slice(1).join('=');
5202
5203				if (!json && cookie.charAt(0) === '"') {
5204					cookie = cookie.slice(1, -1);
5205				}
5206
5207				try {
5208					var name = decode(parts[0]);
5209					cookie = (converter.read || converter)(cookie, name) ||
5210						decode(cookie);
5211
5212					if (json) {
5213						try {
5214							cookie = JSON.parse(cookie);
5215						} catch (e) {}
5216					}
5217
5218					jar[name] = cookie;
5219
5220					if (key === name) {
5221						break;
5222					}
5223				} catch (e) {}
5224			}
5225
5226			return key ? jar[key] : jar;
5227		}
5228
5229		api.set = set;
5230		api.get = function (key) {
5231			return get(key, false /* read as raw */);
5232		};
5233		api.getJSON = function (key) {
5234			return get(key, true /* read as json */);
5235		};
5236		api.remove = function (key, attributes) {
5237			set(key, '', extend(attributes, {
5238				expires: -1
5239			}));
5240		};
5241
5242		api.defaults = {};
5243
5244		api.withConverter = init;
5245
5246		return api;
5247	}
5248
5249	return init(function () {});
5250}));
5251
5252;/*})'"*/
5253;/*})'"*/

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.