(function(e,t){"use strict";function _(e){var t=e.length,n=y.type(e);return y.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||n!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in e)}function P(e){var t=D[e]={};return y.each(e.match(w)||[],function(e,n){t[n]=!0}),t}function j(e,n,r,i){if(!y.acceptData(e))return;var s,o,u=y.expando,a=typeof n=="string",l=e.nodeType,c=l?y.cache:e,h=l?e[u]:e[u]&&u;if((!h||!c[h]||!i&&!c[h].data)&&a&&r===t)return;h||(l?e[u]=h=f.pop()||y.guid++:h=u),c[h]||(c[h]={},l||(c[h].toJSON=y.noop));if(typeof n=="object"||typeof n=="function")i?c[h]=y.extend(c[h],n):c[h].data=y.extend(c[h].data,n);return s=c[h],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[y.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[y.camelCase(n)])):o=s,o}function F(e,t,n){if(!y.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?y.cache:e,a=o?e[y.expando]:y.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){y.isArray(t)?t=t.concat(y.map(t,y.camelCase)):t in r?t=[t]:(t=y.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?q:y.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!q(u[a]))return}o?y.cleanData([e],!0):y.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null}function I(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(B,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:H.test(r)?y.parseJSON(r):r}catch(s){}y.data(e,n,r)}else r=t}return r}function q(e){var t;for(t in e){if(t==="data"&&y.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function nt(){return!0}function rt(){return!1}function ft(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function lt(e,t,n){t=t||0;if(y.isFunction(t))return y.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return y.grep(e,function(e){return e===t===n});if(typeof t=="string"){var r=y.grep(e,function(e){return e.nodeType===1});if(ot.test(t))return y.filter(t,r,!n);t=y.filter(t,r)}return y.grep(e,function(e){return y.inArray(e,t)>=0===n})}function ct(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function At(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ot(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Mt(e){var t=Tt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;(n=e[r])!=null;r++)y._data(n,"globalEval",!t||y._data(t[r],"globalEval"))}function Dt(e,t){if(t.nodeType!==1||!y.hasData(e))return;var n,r,i,s=y._data(e),o=y._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++)y.event.add(t,n,u[n][r])}o.data&&(o.data=y.extend({},o.data))}function Pt(e,t){var n,r,i;if(t.nodeType!==1)return;n=t.nodeName.toLowerCase();if(!y.support.noCloneEvent&&t[y.expando]){r=y._data(t);for(i in r.events)y.removeEvent(t,i,r.handle);t.removeAttribute(y.expando)}if(n==="script"&&t.text!==e.text)Ot(t).text=e.text,Mt(t);else if(n==="object")t.parentNode&&(t.outerHTML=e.outerHTML),y.support.html5Clone&&e.innerHTML&&!y.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML);else if(n==="input"&&Et.test(e.type))t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value);else if(n==="option")t.defaultSelected=t.selected=e.defaultSelected;else if(n==="input"||n==="textarea")t.defaultValue=e.defaultValue}function Ht(e,n){var r,i,s=0,o=typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll(n||"*"):t;if(!o)for(o=[],r=e.childNodes||e;(i=r[s])!=null;s++)!n||y.nodeName(i,n)?o.push(i):y.merge(o,Ht(i,n));return n===t||n&&y.nodeName(e,n)?y.merge([e],o):o}function Bt(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Zt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Yt.length;while(i--){t=Yt[i]+n;if(t in e)return t}return r}function en(e,t){return e=t||e,y.css(e,"display")==="none"||!y.contains(e.ownerDocument,e)}function tn(e,t){var n,r=[],i=0,s=e.length;for(;i<s;i++){n=e[i];if(!n.style)continue;r[i]=y._data(n,"olddisplay"),t?(!r[i]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&en(n)&&(r[i]=y._data(n,"olddisplay",on(n.nodeName)))):!r[i]&&!en(n)&&y._data(n,"olddisplay",y.css(n,"display"))}for(i=0;i<s;i++){n=e[i];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?r[i]||"":"none"}return e}function nn(e,t,n){var r=Xt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function rn(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=y.css(e,n+Gt[s],!0,i)),r?(n==="content"&&(o-=y.css(e,"padding"+Gt[s],!0,i)),n!=="margin"&&(o-=y.css(e,"border"+Gt[s]+"Width",!0,i))):(o+=y.css(e,"padding"+Gt[s],!0,i),n!=="padding"&&(o+=y.css(e,"border"+Gt[s]+"Width",!0,i)));return o}function sn(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=Ft(e),o=y.support.boxSizing&&y.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=jt(e,t,s);if(i<0||i==null)i=e.style[t];if(Vt.test(i))return i;r=o&&(y.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+rn(e,t,n||(o?"border":"content"),r,s)+"px"}function on(e){var t=i,n=Jt[e];if(!n){n=un(e,t);if(n==="none"||!n)It=(It||y("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(It[0].contentWindow||It[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),It.detach();Jt[e]=n}return n}function un(e,t){var n=y(t.createElement(e)).appendTo(t.body),r=y.css(n[0],"display");return n.remove(),r}function pn(e,t,n,r){var i;if(y.isArray(t))y.each(t,function(t,i){n||fn.test(e)?r(e,i):pn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&y.type(t)==="object")for(i in t)pn(e+"["+i+"]",t[i],n,r);else r(e,t)}function On(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(w)||[];if(y.isFunction(n))while(r=s[i++])r[0]==="+"?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Mn(e,t,n,r){function o(u){var a;return i[u]=!0,y.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f=="string"&&!s&&!i[f])return t.dataTypes.unshift(f),o(f),!1;if(s)return!(a=f)}),a}var i={},s=e===kn;return o(t.dataTypes[0])||!i["*"]&&o("*")}function _n(e,n){var r,i,s=y.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);return i&&y.extend(!0,e,i),e}function Dn(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 Pn(e,t){var n,r,i,s,o={},u=0,a=e.dataTypes.slice(),f=a[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(a[1])for(n in e.converters)o[n.toLowerCase()]=e.converters[n];for(;i=a[++u];)if(i!=="*"){if(f!=="*"&&f!==i){n=o[f+" "+i]||o["* "+i];if(!n)for(r in o){s=r.split(" ");if(s[1]===i){n=o[f+" "+s[0]]||o["* "+s[0]];if(n){n===!0?n=o[r]:o[r]!==!0&&(i=s[0],a.splice(u--,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 "+f+" to "+i}}}f=i}return{state:"success",data:t}}function Rn(){try{return new e.XMLHttpRequest}catch(t){}}function Un(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Qn(){return setTimeout(function(){zn=t}),zn=y.now()}function Gn(e,t){y.each(t,function(t,n){var r=(Kn[t]||[]).concat(Kn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Yn(e,t,n){var r,i,s=0,o=Jn.length,u=y.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=zn||Qn(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;o<a;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),s<1&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:y.extend({},t),opts:y.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:zn||Qn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=y.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;i=!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;Zn(l,f.opts.specialEasing);for(;s<o;s++){r=Jn[s].call(f,e,l,f.opts);if(r)return r}return Gn(f,l),y.isFunction(f.opts.start)&&f.opts.start.call(e,f),y.fx.timer(y.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Zn(e,t){var n,r,i,s,o;for(n in e){r=y.camelCase(n),i=t[r],s=e[n],y.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=y.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 er(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},v=[],m=e.nodeType&&en(e);n.queue||(l=y._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--,y.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],y.css(e,"display")==="inline"&&y.css(e,"float")==="none"&&(!y.support.inlineBlockNeedsLayout||on(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",y.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(Xn.exec(s)){delete t[r],a=a||s==="toggle";if(s===(m?"hide":"show"))continue;v.push(r)}}o=v.length;if(o){u=y._data(e,"fxshow")||y._data(e,"fxshow",{}),"hidden"in u&&(m=u.hidden),a&&(u.hidden=!m),m?y(e).show():h.done(function(){y(e).hide()}),h.done(function(){var t;y._removeData(e,"fxshow");for(t in d)y.style(e,t,d[t])});for(r=0;r<o;r++)i=v[r],f=h.createTween(i,m?u[i]:0),d[i]=u[i]||y.style(e,i),i in u||(u[i]=f.start,m&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function tr(e,t,n,r,i){return new tr.prototype.init(e,t,n,r,i)}function nr(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=Gt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function rr(e){return y.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.jQuery,u=e.$,a={},f=[],l="1.9.0",c=f.concat,h=f.push,p=f.slice,d=f.indexOf,v=a.toString,m=a.hasOwnProperty,g=l.trim,y=function(e,t){return new y.fn.init(e,t,n)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,E=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,S=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,x=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,T=/^[\],:{}\s]*$/,N=/(?:^|:|,)(?:\s*\[)+/g,C=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,k=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,L=/^-ms-/,A=/-([\da-z])/gi,O=function(e,t){return t.toUpperCase()},M=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",M,!1),y.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",M),y.ready())};y.fn=y.prototype={jquery:l,constructor:y,init:function(e,n,r){var s,o;if(!e)return this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=S.exec(e);if(s&&(s[1]||!n)){if(s[1]){n=n instanceof y?n[0]:n,y.merge(this,y.parseHTML(s[1],n&&n.nodeType?n.ownerDocument||n:i,!0));if(x.test(s[1])&&y.isPlainObject(n))for(s in n)y.isFunction(this[s])?this[s](n[s]):this.attr(s,n[s]);return this}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 e.nodeType?(this.context=this[0]=e,this.length=1,this):y.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),y.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return p.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=y.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return y.each(this,e,t)},ready:function(e){return y.ready.promise().done(e),this},slice:function(){return this.pushStack(p.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},map:function(e){return this.pushStack(y.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},y.fn.init.prototype=y.fn,y.extend=y.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"&&!y.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&&(y.isPlainObject(i)||(s=y.isArray(i)))?(s?(s=!1,o=r&&y.isArray(r)?r:[]):o=r&&y.isPlainObject(r)?r:{},u[n]=y.extend(l,o,i)):i!==t&&(u[n]=i)}return u},y.extend({noConflict:function(t){return e.$===y&&(e.$=u),t&&e.jQuery===y&&(e.jQuery=o),y},isReady:!1,readyWait:1,holdReady:function(e){e?y.readyWait++:y.ready(!0)},ready:function(e){if(e===!0?--y.readyWait:y.isReady)return;if(!i.body)return setTimeout(y.ready);y.isReady=!0;if(e!==!0&&--y.readyWait>0)return;r.resolveWith(i,[y]),y.fn.trigger&&y(i).trigger("ready").off("ready")},isFunction:function(e){return y.type(e)==="function"},isArray:Array.isArray||function(e){return y.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):typeof e=="object"||typeof e=="function"?a[v.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||y.type(e)!=="object"||e.nodeType||y.isWindow(e))return!1;try{if(e.constructor&&!m.call(e,"constructor")&&!m.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||m.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){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||i;var r=x.exec(e),s=!n&&[];return r?[t.createElement(r[1])]:(r=y.buildFragment([e],t,s),s&&y(s).remove(),y.merge([],r.childNodes))},parseJSON:function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(t===null)return t;if(typeof t=="string"){t=y.trim(t);if(t&&T.test(t.replace(C,"@").replace(k,"]").replace(N,"")))return(new Function("return "+t))()}y.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)&&y.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&y.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(L,"ms-").replace(A,O)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=_(e);if(n)if(o)for(;i<s;i++){r=t.apply(e[i],n);if(r===!1)break}else for(i in e){r=t.apply(e[i],n);if(r===!1)break}else if(o)for(;i<s;i++){r=t.call(e[i],i,e[i]);if(r===!1)break}else for(i in e){r=t.call(e[i],i,e[i]);if(r===!1)break}return e},trim:g&&!g.call("﻿ ")?function(e){return e==null?"":g.call(e)}:function(e){return e==null?"":(e+"").replace(E,"")},makeArray:function(e,t){var n=t||[];return e!=null&&(_(Object(e))?y.merge(n,typeof e=="string"?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(d)return d.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,t,n){var r,i=0,s=e.length,o=_(e),u=[];if(o)for(;i<s;i++)r=t(e[i],i,n),r!=null&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),r!=null&&(u[u.length]=r);return c.apply([],u)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),y.isFunction(e)?(i=p.call(arguments,2),s=function(){return e.apply(n||this,i.concat(p.call(arguments)))},s.guid=e.guid=e.guid||y.guid++,s):t},access:function(e,n,r,i,s,o,u){var a=0,f=e.length,l=r==null;if(y.type(r)==="object"){s=!0;for(a in r)y.access(e,n,a,r[a],!0,o,u)}else if(i!==t){s=!0,y.isFunction(i)||(u=!0),l&&(u?(n.call(e,i),n=null):(l=n,n=function(e,t,n){return l.call(y(e),n)}));if(n)for(;a<f;a++)n(e[a],r,u?i:i.call(e[a],a,n(e[a],r)))}return s?e:l?n.call(e):f?n(e[0],r):o},now:function(){return(new Date).getTime()}}),y.ready.promise=function(t){if(!r){r=y.Deferred();if(i.readyState==="complete")setTimeout(y.ready);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",M,!1),e.addEventListener("load",y.ready,!1);else{i.attachEvent("onreadystatechange",M),e.attachEvent("onload",y.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!y.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}y.ready()}}()}}return r.promise(t)},y.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){a["[object "+t+"]"]=t.toLowerCase()}),n=y(i);var D={};y.Callbacks=function(e){e=typeof e=="string"?D[e]||P(e):y.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){y.each(t,function(t,n){var i=y.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&&y.each(arguments,function(e,t){var n;while((n=y.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return y.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},y.extend({Deferred:function(e){var t=[["resolve","done",y.Callbacks("once memory"),"resolved"],["reject","fail",y.Callbacks("once memory"),"rejected"],["notify","progress",y.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return y.Deferred(function(n){y.each(t,function(t,s){var o=s[0],u=y.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&y.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?y.extend(e,r):r}},i={};return r.pipe=r.then,y.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]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=p.call(arguments),r=n.length,i=r!==1||e&&y.isFunction(e.promise)?r:0,s=i===1?e:y.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?p.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]&&y.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()}}),y.support=function(){var t,n,r,s,o,u,a,f,l,c,h=i.createElement("div");h.setAttribute("className","t"),h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=h.getElementsByTagName("*"),r=h.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=h.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:h.className!=="t",leadingWhitespace:h.firstChild.nodeType===3,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.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,optSelected:o.selected,enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",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 h.test}catch(p){t.deleteExpando=!1}u=i.createElement("input"),u.setAttribute("value",""),t.input=u.getAttribute("value")==="",u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","t"),u.setAttribute("name","t"),a=i.createDocumentFragment(),a.appendChild(u),t.appendChecked=u.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,h.attachEvent&&(h.attachEvent("onclick",function(){t.noCloneEvent=!1}),h.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})h.setAttribute(f="on"+c,"t"),t[c+"Bubbles"]=f in e||h.attributes[f].expando===!1;return h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle=h.style.backgroundClip==="content-box",y(function(){var n,r,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=i.getElementsByTagName("body")[0];if(!u)return;n=i.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(h),h.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=h.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",l=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=l&&s[0].offsetHeight===0,h.innerHTML="",h.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=h.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=u.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(h,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(h,null)||{width:"4px"}).width==="4px",r=h.appendChild(i.createElement("div")),r.style.cssText=h.style.cssText=o,r.style.marginRight=r.style.width="0",h.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof h.style.zoom!="undefined"&&(h.innerHTML="",h.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=h.offsetWidth===3,h.style.display="block",h.innerHTML="<div></div>",h.firstChild.style.width="5px",t.shrinkWrapBlocks=h.offsetWidth!==3,u.style.zoom=1),u.removeChild(n),n=h=s=r=null}),n=s=a=o=r=u=null,t}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;y.extend({cache:{},expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?y.cache[e[y.expando]]:e[y.expando],!!e&&!q(e)},data:function(e,t,n){return j(e,t,n,!1)},removeData:function(e,t){return F(e,t,!1)},_data:function(e,t,n){return j(e,t,n,!0)},_removeData:function(e,t){return F(e,t,!0)},acceptData:function(e){var t=e.nodeName&&y.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),y.fn.extend({data:function(e,n){var r,i,s=this[0],o=0,u=null;if(e===t){if(this.length){u=y.data(s);if(s.nodeType===1&&!y._data(s,"parsedAttrs")){r=s.attributes;for(;o<r.length;o++)i=r[o].name,i.indexOf("data-")||(i=y.camelCase(i.substring(5)),I(s,i,u[i]));y._data(s,"parsedAttrs",!0)}}return u}return typeof e=="object"?this.each(function(){y.data(this,e)}):y.access(this,function(n){if(n===t)return s?I(s,e,y.data(s,e)):null;this.each(function(){y.data(this,e,n)})},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){y.removeData(this,e)})}}),y.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=y._data(e,t),n&&(!r||y.isArray(n)?r=y._data(e,t,y.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=y.queue(e,t),r=n.length,i=n.shift(),s=y._queueHooks(e,t),o=function(){y.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),s.cur=i,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 y._data(e,n)||y._data(e,n,{empty:y.Callbacks("once memory").add(function(){y._removeData(e,t+"queue"),y._removeData(e,n)})})}}),y.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?y.queue(this[0],e):n===t?this:this.each(function(){var t=y.queue(this,e,n);y._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&y.dequeue(this,e)})},dequeue:function(e){return this.each(function(){y.dequeue(this,e)})},delay:function(e,t){return e=y.fx?y.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=y.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=y._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var R,U,z=/[\t\r\n]/g,W=/\r/g,X=/^(?:input|select|textarea|button|object)$/i,V=/^(?:a|area)$/i,$=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,J=/^(?:checked|selected)$/i,K=y.support.getSetAttribute,Q=y.support.input;y.fn.extend({attr:function(e,t){return y.access(this,y.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){y.removeAttr(this,e)})},prop:function(e,t){return y.access(this,y.prop,e,t,arguments.length>1)},removeProp:function(e){return e=y.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=0,u=this.length,a=typeof e=="string"&&e;if(y.isFunction(e))return this.each(function(t){y(this).addClass(e.call(this,t,this.className))});if(a){t=(e||"").match(w)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(z," "):" ");if(r){s=0;while(i=t[s++])r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=y.trim(r)}}}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=arguments.length===0||typeof e=="string"&&e;if(y.isFunction(e))return this.each(function(t){y(this).removeClass(e.call(this,t,this.className))});if(a){t=(e||"").match(w)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(z," "):"");if(r){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?y.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return y.isFunction(e)?this.each(function(n){y(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=y(this),u=t,a=e.match(w)||[];while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&y._data(this,"__className__",this.className),this.className=this.className||e===!1?"":y._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(z," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=y.valHooks[s.type]||y.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(W,""):r==null?"":r);return}return i=y.isFunction(e),this.each(function(r){var s,o=y(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":y.isArray(s)&&(s=y.map(s,function(e){return e==null?"":e+""})),n=y.valHooks[this.type]||y.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),y.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)&&(y.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!y.nodeName(n.parentNode,"optgroup"))){t=y(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=y.makeArray(t);return y(e).find("option").each(function(){this.selected=y.inArray(y(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;if(typeof e.getAttribute=="undefined")return y.prop(e,n,r);o=u!==1||!y.isXMLDoc(e),o&&(n=n.toLowerCase(),s=y.attrHooks[n]||($.test(n)?U:R));if(r===t)return s&&o&&"get"in s&&(i=s.get(e,n))!==null?i:(typeof e.getAttribute!="undefined"&&(i=e.getAttribute(n)),i==null?t:i);if(r!==null)return s&&o&&"set"in s&&(i=s.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r);y.removeAttr(e,n)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(w);if(s&&e.nodeType===1)while(n=s[i++])r=y.propFix[n]||n,$.test(n)?!K&&J.test(n)?e[y.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:y.attr(e,n,""),e.removeAttribute(K?n:r)},attrHooks:{type:{set:function(e,t){if(!y.support.radioValue&&t==="radio"&&y.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),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||!y.isXMLDoc(e),o&&(n=y.propFix[n]||n,s=y.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):X.test(e.nodeName)||V.test(e.nodeName)&&e.href?0:t}}}}),U={get:function(e,n){var r=y.prop(e,n),i=typeof r=="boolean"&&e.getAttribute(n),s=typeof r=="boolean"?Q&&K?i!=null:J.test(n)?e[y.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return s&&s.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?y.removeAttr(e,n):Q&&K||!J.test(n)?e.setAttribute(!K&&y.propFix[n]||n,n):e[y.camelCase("default-"+n)]=e[n]=!0,n}};if(!Q||!K)y.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return y.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,t,n){if(!y.nodeName(e,"input"))return R&&R.set(e,t,n);e.defaultValue=t}};K||(R=y.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&(n==="id"||n==="name"||n==="coords"?r.value!=="":r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="",r==="value"||n===e.getAttribute(r)?n:t}},y.attrHooks.contenteditable={get:R.get,set:function(e,t,n){R.set(e,t===""?!1:t,n)}},y.each(["width","height"],function(e,t){y.attrHooks[t]=y.extend(y.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})})),y.support.hrefNormalized||(y.each(["href","src","width","height"],function(e,n){y.attrHooks[n]=y.extend(y.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r==null?t:r}})}),y.each(["href","src"],function(e,t){y.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),y.support.style||(y.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),y.support.optSelected||(y.propHooks.selected=y.extend(y.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),y.support.enctype||(y.propFix.enctype="encoding"),y.support.checkOn||y.each(["radio","checkbox"],function(){y.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),y.each(["radio","checkbox"],function(){y.valHooks[this]=y.extend(y.valHooks[this],{set:function(e,t){if(y.isArray(t))return e.checked=y.inArray(y(e).val(),t)>=0}})});var G=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,et=/^(?:focusinfocus|focusoutblur)$/,tt=/^([^.]*)(?:\.(.+)|)$/;y.event={global:{},add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=e.nodeType!==3&&e.nodeType!==8&&y._data(e);if(!g)return;r.handler&&(o=r,r=o.handler,s=o.selector),r.guid||(r.guid=y.guid++),(f=g.events)||(f=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof y=="undefined"||!!e&&y.event.triggered===e.type?t:y.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--){a=tt.exec(n[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),h=y.event.special[d]||{},d=(s?h.delegateType:h.bindType)||d,h=y.event.special[d]||{},c=y.extend({type:d,origType:m,data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&y.expr.match.needsContext.test(s),namespace:v.join(".")},o);if(!(p=f[d])){p=f[d]=[],p.delegateCount=0;if(!h.setup||h.setup.call(e,i,v,u)===!1)e.addEventListener?e.addEventListener(d,u,!1):e.attachEvent&&e.attachEvent("on"+d,u)}h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),s?p.splice(p.delegateCount++,0,c):p.push(c),y.event.global[d]=!0}e=null},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=y.hasData(e)&&y._data(e);if(!m||!(a=m.events))return;t=(t||"").match(w)||[""],f=t.length;while(f--){u=tt.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in a)y.event.remove(e,p+t[f],n,r,!0);continue}c=y.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;while(s--)l=h[s],(i||v===l.origType)&&(!n||n.guid===l.guid)&&(!u||u.test(l.namespace))&&(!r||r===l.selector||r==="**"&&l.selector)&&(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&y.removeEvent(e,p,m.handle),delete a[p])}y.isEmptyObject(a)&&(delete m.handle,y._removeData(e,"events"))},trigger:function(n,r,s,o){var u,a,f,l,c,h,p,d=[s||i],v=n.type||n,m=n.namespace?n.namespace.split("."):[];a=f=s=s||i;if(s.nodeType===3||s.nodeType===8)return;if(et.test(v+y.event.triggered))return;v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),c=v.indexOf(":")<0&&"on"+v,n=n[y.expando]?n:new y.Event(v,typeof n=="object"&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=s),r=r==null?[n]:y.makeArray(r,[n]),p=y.event.special[v]||{};if(!o&&p.trigger&&p.trigger.apply(s,r)===!1)return;if(!o&&!p.noBubble&&!y.isWindow(s)){l=p.delegateType||v,et.test(l+v)||(a=a.parentNode);for(;a;a=a.parentNode)d.push(a),f=a;f===(s.ownerDocument||i)&&d.push(f.defaultView||f.parentWindow||e)}u=0;while((a=d[u++])&&!n.isPropagationStopped())n.type=u>1?l:p.bindType||v,h=(y._data(a,"events")||{})[n.type]&&y._data(a,"handle"),h&&h.apply(a,r),h=c&&a[c],h&&y.acceptData(a)&&h.apply&&h.apply(a,r)===!1&&n.preventDefault();n.type=v;if(!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(v!=="click"||!y.nodeName(s,"a"))&&y.acceptData(s)&&c&&s[v]&&!y.isWindow(s)){f=s[c],f&&(s[c]=null),y.event.triggered=v;try{s[v]()}catch(g){}y.event.triggered=t,f&&(s[c]=f)}return n.result},dispatch:function(e){e=y.event.fix(e);var n,r,i,s,o,u=[],a=p.call(arguments),f=(y._data(this,"events")||{})[e.type]||[],l=y.event.special[e.type]||{};a[0]=e,e.delegateTarget=this;if(l.preDispatch&&l.preDispatch.call(this,e)===!1)return;u=y.event.handlers.call(this,e,f),n=0;while((s=u[n++])&&!e.isPropagationStopped()){e.currentTarget=s.elem,r=0;while((o=s.handlers[r++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(o.namespace))e.handleObj=o,e.data=o.data,i=((y.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation())}return l.postDispatch&&l.postDispatch.call(this,e),e.result},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||e.type!=="click"))for(;f!=this;f=f.parentNode||this)if(f.disabled!==!0||e.type!=="click"){i=[];for(r=0;r<a;r++)o=n[r],s=o.selector+" ",i[s]===t&&(i[s]=o.needsContext?y(s,this).index(f)>=0:y.find(s,this,null,[f]).length),i[s]&&i.push(o);i.length&&u.push({elem:f,handlers:i})}return a<n.length&&u.push({elem:this,handlers:n.slice(a)}),u},fix:function(e){if(e[y.expando])return e;var t,n,r=e,s=y.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=new y.Event(r),t=o.length;while(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},props:"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}},special:{load:{noBubble:!0},click:{trigger:function(){if(y.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==i.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===i.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=y.extend(new y.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?y.event.trigger(i,null,t):y.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},y.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))},y.Event=function(e,t){if(!(this instanceof y.Event))return new y.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?nt:rt):this.type=e,t&&y.extend(this,t),this.timeStamp=e&&e.timeStamp||y.now(),this[y.expando]=!0},y.Event.prototype={isDefaultPrevented:rt,isPropagationStopped:rt,isImmediatePropagationStopped:rt,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=nt;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=nt;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=nt,this.stopPropagation()}},y.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){y.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;if(!i||i!==r&&!y.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),y.support.submitBubbles||(y.event.special.submit={setup:function(){if(y.nodeName(this,"form"))return!1;y.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=y.nodeName(n,"input")||y.nodeName(n,"button")?n.form:t;r&&!y._data(r,"submitBubbles")&&(y.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),y._data(r,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&y.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(y.nodeName(this,"form"))return!1;y.event.remove(this,"._submit")}}),y.support.changeBubbles||(y.event.special.change={setup:function(){if(G.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")y.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),y.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),y.event.simulate("change",this,e,!0)});return!1}y.event.add(this,"beforeactivate._change",function(e){var t=e.target;G.test(t.nodeName)&&!y._data(t,"changeBubbles")&&(y.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&y.event.simulate("change",this.parentNode,e,!0)}),y._data(t,"changeBubbles",!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 y.event.remove(this,"._change"),!G.test(this.nodeName)}}),y.support.focusinBubbles||y.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){y.event.simulate(t,e.target,y.event.fix(e),!0)};y.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),y.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=rt;else if(!i)return this;return s===1&&(o=i,i=function(e){return y().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=y.guid++)),this.each(function(){y.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,y(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=rt),this.each(function(){y.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)},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(){y.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return y.event.trigger(e,t,n,!0)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),y.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){y.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Y.test(t)&&(y.event.fixHooks[t]=y.event.keyHooks),Z.test(t)&&(y.event.fixHooks[t]=y.event.mouseHooks)}),function(e,t){function rt(e){return J.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function st(e){return e[w]=!0,e}function ot(e){var t=c.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function ut(e,t,n,r){var i,s,o,u,a,f,h,v,m,y;(t?t.ownerDocument||t:E)!==c&&l(t),t=t||c,n=n||[];if(!e||typeof e!="string")return n;if((u=t.nodeType)!==1&&u!==9)return[];if(!p&&!r){if(i=K.exec(e))if(o=i[1]){if(u===9){s=t.getElementById(o);if(!s||!s.parentNode)return n;if(s.id===o)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(o))&&g(t,s)&&s.id===o)return n.push(s),n}else{if(i[2])return _.apply(n,D.call(t.getElementsByTagName(e),0)),n;if((o=i[3])&&S.getByClassName&&t.getElementsByClassName)return _.apply(n,D.call(t.getElementsByClassName(o),0)),n}if(S.qsa&&!d.test(e)){h=!0,v=w,m=t,y=u===9&&e;if(u===1&&t.nodeName.toLowerCase()!=="object"){f=ht(e),(h=t.getAttribute("id"))?v=h.replace(Y,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",a=f.length;while(a--)f[a]=v+pt(f[a]);m=$.test(e)&&t.parentNode||t,y=f.join(",")}if(y)try{return _.apply(n,D.call(m.querySelectorAll(y),0)),n}catch(b){}finally{h||t.removeAttribute("id")}}}return Et(e.replace(R,"$1"),t,n,r)}function at(e,t){var n=e&&t&&e.nextSibling;for(;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function ct(e){return st(function(t){return t=+t,st(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 ht(e,t){var n,r,s,o,u,a,f,l=C[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=U.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=z.exec(u))n=r.shift(),s.push({value:n,type:r[0].replace(R," ")}),u=u.slice(n.length);for(o in i.filter)(r=V[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(n=r.shift(),s.push({value:n,type:o,matches:r}),u=u.slice(n.length));if(!n)break}return t?u.length:u?ut.error(e):C(e,a).slice(0)}function pt(e){var t=0,n=e.length,r="";for(;t<n;t++)r+=e[t].value;return r}function dt(e,t,n){var i=t.dir,s=n&&t.dir==="parentNode",o=T++;return t.first?function(t,n,r){while(t=t[i])if(t.nodeType===1||s)return e(t,n,r)}:function(t,n,u){var a,f,l,c=x+" "+o;if(u){while(t=t[i])if(t.nodeType===1||s)if(e(t,n,u))return!0}else while(t=t[i])if(t.nodeType===1||s){l=t[w]||(t[w]={});if((f=l[i])&&f[0]===c){if((a=f[1])===!0||a===r)return a===!0}else{f=l[i]=[c],f[1]=e(t,n,u)||r;if(f[1]===!0)return!0}}}}function vt(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 mt(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 gt(e,t,n,r,i,s){return r&&!r[w]&&(r=gt(r)),i&&!i[w]&&(i=gt(i,s)),st(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||wt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?mt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=mt(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?P.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=mt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):_.apply(o,g)})}function yt(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,l=dt(function(e){return e===t},u,!0),c=dt(function(e){return P.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[dt(vt(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[w]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return gt(a>1&&vt(h),a>1&&pt(e.slice(0,a-1)).replace(R,"$1"),n,a<r&&yt(e.slice(a,r)),r<s&&yt(e=e.slice(r)),r<s&&pt(e))}h.push(n)}return vt(h)}function bt(e,t){var n=0,s=t.length>0,o=e.length>0,u=function(u,a,l,h,p){var d,v,m,g=[],y=0,b="0",w=u&&[],E=p!=null,S=f,T=u||o&&i.find.TAG("*",p&&a.parentNode||a),N=x+=S==null?1:Math.E;E&&(f=a!==c&&a,r=n);for(;(d=T[b])!=null;b++){if(o&&d){for(v=0;m=e[v];v++)if(m(d,a,l)){h.push(d);break}E&&(x=N,r=++n)}s&&((d=!m&&d)&&y--,u&&w.push(d))}y+=b;if(s&&b!==y){for(v=0;m=t[v];v++)m(w,g,a,l);if(u){if(y>0)while(b--)!w[b]&&!g[b]&&(g[b]=M.call(h));g=mt(g)}_.apply(h,g),E&&!u&&g.length>0&&y+t.length>1&&ut.uniqueSort(h)}return E&&(x=N,f=S),w};return s?st(u):u}function wt(e,t,n){var r=0,i=t.length;for(;r<i;r++)ut(e,t[r],n);return n}function Et(e,t,n,r){var s,o,a,f,l,c=ht(e);if(!r&&c.length===1){o=c[0]=c[0].slice(0);if(o.length>2&&(a=o[0]).type==="ID"&&t.nodeType===9&&!p&&i.relative[o[1].type]){t=i.find.ID(a.matches[0].replace(et,tt),t)[0];if(!t)return n;e=e.slice(o.shift().value.length)}for(s=V.needsContext.test(e)?-1:o.length-1;s>=0;s--){a=o[s];if(i.relative[f=a.type])break;if(l=i.find[f])if(r=l(a.matches[0].replace(et,tt),$.test(o[0].type)&&t.parentNode||t)){o.splice(s,1),e=r.length&&pt(o);if(!e)return _.apply(n,D.call(r,0)),n;break}}}return u(e,c)(r,t,p,n,$.test(e)),n}function St(){}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,b,w="sizzle"+ -(new Date),E=e.document,S={},x=0,T=0,N=it(),C=it(),k=it(),L=typeof t,A=1<<31,O=[],M=O.pop,_=O.push,D=O.slice,P=O.indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},H="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j=B.replace("w","w#"),F="([*^$|!~]?=)",I="\\["+H+"*("+B+")"+H+"*(?:"+F+H+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+j+")|)|)"+H+"*\\]",q=":("+B+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+I.replace(3,8)+")*)|.*)\\)|)",R=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=new RegExp("^"+H+"*,"+H+"*"),z=new RegExp("^"+H+"*([\\x20\\t\\r\\n\\f>+~])"+H+"*"),W=new RegExp(q),X=new RegExp("^"+j+"$"),V={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),NAME:new RegExp("^\\[name=['\"]?("+B+")['\"]?\\]"),TAG:new RegExp("^("+B.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},$=/[\x20\t\r\n\f]*[+~]/,J=/\{\s*\[native code\]\s*\}/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)};try{D.call(h.childNodes,0)[0].nodeType}catch(nt){D=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}o=ut.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},l=ut.setDocument=function(e){var n=e?e.ownerDocument||e:E;if(n===c||n.nodeType!==9||!n.documentElement)return c;c=n,h=n.documentElement,p=o(n),S.tagNameNoComments=ot(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),S.attributes=ot(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),S.getByClassName=ot(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)}),S.getByName=ot(function(e){e.id=w+0,e.innerHTML="<a name='"+w+"'></a><div name='"+w+"'></div>",h.insertBefore(e,h.firstChild);var t=n.getElementsByName&&n.getElementsByName(w).length===2+n.getElementsByName(w+0).length;return S.getIdNotName=!n.getElementById(w),h.removeChild(e),t}),i.attrHandle=ot(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==L&&e.firstChild.getAttribute("href")==="#"})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},S.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==L&&!p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==L&&!p){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==L&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=S.tagNameNoComments?function(e,t){if(typeof t.getElementsByTagName!==L)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){for(;n=s[i];i++)n.nodeType===1&&r.push(n);return r}return s},i.find.NAME=S.getByName&&function(e,t){if(typeof t.getElementsByName!==L)return t.getElementsByName(name)},i.find.CLASS=S.getByClassName&&function(e,t){if(typeof t.getElementsByClassName!==L&&!p)return t.getElementsByClassName(e)},v=[],d=[":focus"];if(S.qsa=rt(n.querySelectorAll))ot(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+H+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||d.push(":checked")}),ot(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&d.push("[*^$]="+H+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")});return(S.matchesSelector=rt(m=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ot(function(e){S.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),v.push("!=",q)}),d=new RegExp(d.join("|")),v=new RegExp(v.join("|")),g=rt(h.contains)||h.compareDocumentPosition?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):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},b=h.compareDocumentPosition?function(e,t){var r;if(e===t)return a=!0,0;if(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))return r&1||e.parentNode&&e.parentNode.nodeType===11?e===n||g(E,e)?-1:t===n||g(E,t)?1:0:r&4?-1:1;return e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,s=e.parentNode,o=t.parentNode,u=[e],f=[t];if(e===t)return a=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||A)-(g(E,e)&&~e.sourceIndex||A);if(!s||!o)return e===n?-1:t===n?1:s?-1:o?1:0;if(s===o)return at(e,t);r=e;while(r=r.parentNode)u.unshift(r);r=t;while(r=r.parentNode)f.unshift(r);while(u[i]===f[i])i++;return i?at(u[i],f[i]):u[i]===E?-1:f[i]===E?1:0},a=!1,[0,0].sort(b),S.detectDuplicates=a,c},ut.matches=function(e,t){return ut(e,null,null,t)},ut.matchesSelector=function(e,t){(e.ownerDocument||e)!==c&&l(e),t=t.replace(Z,"='$1']");if(S.matchesSelector&&!p&&(!v||!v.test(t))&&!d.test(t))try{var n=m.call(e,t);if(n||S.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch(r){}return ut(t,c,null,[e]).length>0},ut.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),g(e,t)},ut.attr=function(e,t){var n;return(e.ownerDocument||e)!==c&&l(e),p||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):p||S.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},ut.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ut.uniqueSort=function(e){var t,n=[],r=1,i=0;a=!S.detectDuplicates,e.sort(b);if(a){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},s=ut.getText=function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r];r++)n+=s(t);else 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;return n},i=ut.selectors={cacheLength:50,createPseudo:st,match:V,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||ut.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&ut.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return V.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&W.test(n)&&(t=ht(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=N[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&N(e,function(e){return t.test(e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ut.attr(r,e);return i==null?t==="!=":t?(i+="",t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.substr(i.length-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;d=v=e==="only"&&!d&&"nextSibling"}return!0}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===x&&f[1],h=f[0]===x&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(c.nodeType===1&&++h&&c===t){l[e]=[x,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===x)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){y&&((c[w]||(c[w]={}))[e]=[x,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ut.error("unsupported pseudo: "+e);return r[w]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=P.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:st(function(e){var t=[],n=[],r=u(e.replace(R,"$1"));return r[w]?st(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:st(function(e){return function(t){return ut(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),lang:st(function(e){return X.test(e||"")||ut.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=p?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},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},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()===e.type)},first:ct(function(){return[0]}),last:ct(function(e,t){return[t-1]}),eq:ct(function(e,t,n){return[n<0?n+t:n]}),even:ct(function(e,t){var n=0;for(;n<t;n+=2)e.push(n);return e}),odd:ct(function(e,t){var n=1;for(;n<t;n+=2)e.push(n);return e}),lt:ct(function(e,t,n){var r=n<0?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ct(function(e,t,n){var r=n<0?n+t:n;for(;++r<t;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=lt(n);u=ut.compile=function(e,t){var n,r=[],i=[],s=k[e+" "];if(!s){t||(t=ht(e)),n=t.length;while(n--)s=yt(t[n]),s[w]?r.push(s):i.push(s);s=k(e,bt(i,r))}return s},i.pseudos.nth=i.pseudos.eq,i.filters=St.prototype=i.pseudos,i.setFilters=new St,l(),ut.attr=y.attr,y.find=ut,y.expr=ut.selectors,y.expr[":"]=y.expr.pseudos,y.unique=ut.uniqueSort,y.text=ut.getText,y.isXMLDoc=ut.isXML,y.contains=ut.contains}(e);var it=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ot=/^.[^:#\[\.,]*$/,ut=y.expr.match.needsContext,at={children:!0,contents:!0,next:!0,prev:!0};y.fn.extend({find:function(e){var t,n,r;if(typeof e!="string")return r=this,this.pushStack(y(e).filter(function(){for(t=0;t<r.length;t++)if(y.contains(r[t],this))return!0}));n=[];for(t=0;t<this.length;t++)y.find(e,this[t],n);return n=this.pushStack(y.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=y(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(y.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(lt(this,e,!1))},filter:function(e){return this.pushStack(lt(this,e,!0))},is:function(e){return!!e&&(typeof e=="string"?ut.test(e)?y(e,this.context).index(this[0])>=0:y.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=ut.test(e)||typeof e!="string"?y(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:y.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return this.pushStack(s.length>1?y.unique(s):s)},index:function(e){return e?typeof e=="string"?y.inArray(this[0],y(e)):y.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?y(e,t):y.makeArray(e&&e.nodeType?[e]:e),r=y.merge(this.get(),n);return this.pushStack(y.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),y.fn.andSelf=y.fn.addBack,y.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return y.dir(e,"parentNode")},parentsUntil:function(e,t,n){return y.dir(e,"parentNode",n)},next:function(e){return ft(e,"nextSibling")},prev:function(e){return ft(e,"previousSibling")},nextAll:function(e){return y.dir(e,"nextSibling")},prevAll:function(e){return y.dir(e,"previousSibling")},nextUntil:function(e,t,n){return y.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return y.dir(e,"previousSibling",n)},siblings:function(e){return y.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return y.sibling(e.firstChild)},contents:function(e){return y.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:y.merge([],e.childNodes)}},function(e,t){y.fn[e]=function(n,r){var i=y.map(this,t,n);return it.test(e)||(r=n),r&&typeof r=="string"&&(i=y.filter(r,i)),i=this.length>1&&!at[e]?y.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),y.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?y.find.matchesSelector(t[0],e)?[t[0]]:[]:y.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!y(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 ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",pt=/ jQuery\d+="(?:null|\d+)"/g,dt=new RegExp("<(?:"+ht+")[\\s/>]","i"),vt=/^\s+/,mt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,gt=/<([\w:]+)/,yt=/<tbody/i,bt=/<|&#?\w+;/,wt=/<(?:script|style|link)/i,Et=/^(?:checkbox|radio)$/i,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/^$|\/(?:java|ecma)script/i,Tt=/^true\/(.*)/,Nt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ct={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:y.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},kt=ct(i),Lt=kt.appendChild(i.createElement("div"));Ct.optgroup=Ct.option,Ct.tbody=Ct.tfoot=Ct.colgroup=Ct.caption=Ct.thead,Ct.th=Ct.td,y.fn.extend({text:function(e){return y.access(this,function(e){return e===t?y.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(y.isFunction(e))return this.each(function(t){y(this).wrapAll(e.call(this,t))});if(this[0]){var t=y(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 y.isFunction(e)?this.each(function(t){y(this).wrapInner(e.call(this,t))}):this.each(function(){var t=y(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y.isFunction(e);return this.each(function(n){y(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){y.nodeName(this,"body")||y(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||y.filter(e,[n]).length>0)!t&&n.nodeType===1&&y.cleanData(Ht(n)),n.parentNode&&(t&&y.contains(n.ownerDocument,n)&&_t(Ht(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&y.cleanData(Ht(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&y.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return y.clone(this,e,t)})},html:function(e){return y.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(pt,""):t;if(typeof e=="string"&&!wt.test(e)&&(y.support.htmlSerialize||!dt.test(e))&&(y.support.leadingWhitespace||!vt.test(e))&&!Ct[(gt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(mt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(y.cleanData(Ht(n,!1)),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=y.isFunction(e);return!t&&typeof e!="string"&&(e=y(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;if(n&&this.nodeType===1||this.nodeType===11)y(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e)})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=c.apply([],e);var i,s,o,u,a,f,l=0,h=this.length,p=this,d=h-1,v=e[0],m=y.isFunction(v);if(m||!(h<=1||typeof v!="string"||y.support.checkClone||!St.test(v)))return this.each(function(i){var s=p.eq(i);m&&(e[0]=v.call(this,i,n?s.html():t)),s.domManip(e,n,r)});if(h){i=y.buildFragment(e,this[0].ownerDocument,!1,this),s=i.firstChild,i.childNodes.length===1&&(i=s);if(s){n=n&&y.nodeName(s,"tr"),o=y.map(Ht(i,"script"),Ot),u=o.length;for(;l<h;l++)a=i,l!==d&&(a=y.clone(a,!0,!0),u&&y.merge(o,Ht(a,"script"))),r.call(n&&y.nodeName(this[l],"table")?At(this[l],"tbody"):this[l],a,l);if(u){f=o[o.length-1].ownerDocument,y.map(o,Mt);for(l=0;l<u;l++)a=o[l],xt.test(a.type||"")&&!y._data(a,"globalEval")&&y.contains(f,a)&&(a.src?y.ajax({url:a.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):y.globalEval((a.text||a.textContent||a.innerHTML||"").replace(Nt,"")))}i=s=null}}return this}}),y.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){y.fn[e]=function(e){var n,r=0,i=[],s=y(e),o=s.length-1;for(;r<=o;r++)n=r===o?this:this.clone(!0),y(s[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}}),y.extend({clone:function(e,t,n){var r,i,s,o,u,a=y.contains(e.ownerDocument,e);y.support.html5Clone||y.isXMLDoc(e)||!dt.test("<"+e.nodeName+">")?u=e.cloneNode(!0):(Lt.innerHTML=e.outerHTML,Lt.removeChild(u=Lt.firstChild));if((!y.support.noCloneEvent||!y.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!y.isXMLDoc(e)){r=Ht(u),i=Ht(e);for(o=0;(s=i[o])!=null;++o)r[o]&&Pt(s,r[o])}if(t)if(n){i=i||Ht(e),r=r||Ht(u);for(o=0;(s=i[o])!=null;o++)Dt(s,r[o])}else Dt(e,u);return r=Ht(u,"script"),r.length>0&&_t(r,!a&&Ht(e,"script")),r=i=s=null,u},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l,c=e.length,h=ct(t),p=[],d=0;for(;d<c;d++){s=e[d];if(s||s===0)if(y.type(s)==="object")y.merge(p,s.nodeType?[s]:s);else if(!bt.test(s))p.push(t.createTextNode(s));else{u=u||h.appendChild(t.createElement("div")),o=(gt.exec(s)||["",""])[1].toLowerCase(),a=Ct[o]||Ct._default,u.innerHTML=a[1]+s.replace(mt,"<$1></$2>")+a[2],l=a[0];while(l--)u=u.lastChild;!y.support.leadingWhitespace&&vt.test(s)&&p.push(t.createTextNode(vt.exec(s)[0]));if(!y.support.tbody){s=o==="table"&&!yt.test(s)?u.firstChild:a[1]==="<table>"&&!yt.test(s)?u:0,l=s&&s.childNodes.length;while(l--)y.nodeName(f=s.childNodes[l],"tbody")&&!f.childNodes.length&&s.removeChild(f)}y.merge(p,u.childNodes),u.textContent="";while(u.firstChild)u.removeChild(u.firstChild);u=h.lastChild}}u&&h.removeChild(u),y.support.appendChecked||y.grep(Ht(p,"input"),Bt),d=0;while(s=p[d++]){if(r&&y.inArray(s,r)!==-1)continue;i=y.contains(s.ownerDocument,s),u=Ht(h.appendChild(s),"script"),i&&_t(u);if(n){l=0;while(s=u[l++])xt.test(s.type||"")&&n.push(s)}}return u=null,h},cleanData:function(e,t){var n,r,i,s,o=0,u=y.expando,a=y.cache,l=y.support.deleteExpando,c=y.event.special;for(;(i=e[o])!=null;o++)if(t||y.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)c[s]?y.event.remove(i,s):y.removeEvent(i,s,n.handle);a[r]&&(delete a[r],l?delete i[u]:typeof i.removeAttribute!="undefined"?i.removeAttribute(u):i[u]=null,f.push(r))}}}});var jt,Ft,It,qt=/alpha\([^)]*\)/i,Rt=/opacity\s*=\s*([^)]*)/,Ut=/^(top|right|bottom|left)$/,zt=/^(none|table(?!-c[ea]).+)/,Wt=/^margin/,Xt=new RegExp("^("+b+")(.*)$","i"),Vt=new RegExp("^("+b+")(?!px)[a-z%]+$","i"),$t=new RegExp("^([+-])=("+b+")","i"),Jt={BODY:"block"},Kt={position:"absolute",visibility:"hidden",display:"block"},Qt={letterSpacing:0,fontWeight:400},Gt=["Top","Right","Bottom","Left"],Yt=["Webkit","O","Moz","ms"];y.fn.extend({css:function(e,n){return y.access(this,function(e,n,r){var i,s,o={},u=0;if(y.isArray(n)){i=Ft(e),s=n.length;for(;u<s;u++)o[n[u]]=y.css(e,n[u],!1,i);return o}return r!==t?y.style(e,n,r):y.css(e,n)},e,n,arguments.length>1)},show:function(){return tn(this,!0)},hide:function(){return tn(this)},toggle:function(e){var t=typeof e=="boolean";return this.each(function(){(t?e:en(this))?y(this).show():y(this).hide()})}}),y.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=jt(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":y.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=y.camelCase(n),f=e.style;n=y.cssProps[a]||(y.cssProps[a]=Zt(f,a)),u=y.cssHooks[n]||y.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=$t.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(y.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!y.cssNumber[a]&&(r+="px"),!y.support.clearCloneStyle&&r===""&&n.indexOf("background")===0&&(f[n]="inherit");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=y.camelCase(n);return n=y.cssProps[a]||(y.cssProps[a]=Zt(e.style,a)),u=y.cssHooks[n]||y.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,r)),s===t&&(s=jt(e,n,i)),s==="normal"&&n in Qt&&(s=Qt[n]),r?(o=parseFloat(s),r===!0||y.isNumeric(o)?o||0:s):s},swap:function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i}}),e.getComputedStyle?(Ft=function(t){return e.getComputedStyle(t,null)},jt=function(e,n,r){var i,s,o,u=r||Ft(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;return u&&(a===""&&!y.contains(e.ownerDocument,e)&&(a=y.style(e,n)),Vt.test(a)&&Wt.test(n)&&(i=f.width,s=f.minWidth,o=f.maxWidth,f.minWidth=f.maxWidth=f.width=a,a=u.width,f.width=i,f.minWidth=s,f.maxWidth=o)),a}):i.documentElement.currentStyle&&(Ft=function(e){return e.currentStyle},jt=function(e,n,r){var i,s,o,u=r||Ft(e),a=u?u[n]:t,f=e.style;return a==null&&f&&f[n]&&(a=f[n]),Vt.test(a)&&!Ut.test(n)&&(i=f.left,s=e.runtimeStyle,o=s&&s.left,o&&(s.left=e.currentStyle.left),f.left=n==="fontSize"?"1em":a,a=f.pixelLeft+"px",f.left=i,o&&(s.left=o)),a===""?"auto":a}),y.each(["height","width"],function(e,t){y.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&zt.test(y.css(e,"display"))?y.swap(e,Kt,function(){return sn(e,t,r)}):sn(e,t,r)},set:function(e,n,r){var i=r&&Ft(e);return nn(e,n,r?rn(e,t,r,y.support.boxSizing&&y.css(e,"boxSizing",!1,i)==="border-box",i):0)}}}),y.support.opacity||(y.cssHooks.opacity={get:function(e,t){return Rt.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=y.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if((t>=1||t==="")&&y.trim(s.replace(qt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(t===""||r&&!r.filter)return}n.filter=qt.test(s)?s.replace(qt,i):s+" "+i}}),y(function(){y.support.reliableMarginRight||(y.cssHooks.marginRight={get:function(e,t){if(t)return y.swap(e,{display:"inline-block"},jt,[e,"marginRight"])}}),!y.support.pixelPosition&&y.fn.position&&y.each(["top","left"],function(e,t){y.cssHooks[t]={get:function(e,n){if(n)return n=jt(e,t),Vt.test(n)?y(e).position()[t]+"px":n}}})}),y.expr&&y.expr.filters&&(y.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!y.support.reliableHiddenOffsets&&(e.style&&e.style.display||y.css(e,"display"))==="none"},y.expr.filters.visible=function(e){return!y.expr.filters.hidden(e)}),y.each({margin:"",padding:"",border:"Width"},function(e,t){y.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n=="string"?n.split(" "):[n];for(;r<4;r++)i[e+Gt[r]+t]=s[r]||s[r-2]||s[0];return i}},Wt.test(e)||(y.cssHooks[e+t].set=nn)});var an=/%20/g,fn=/\[\]$/,ln=/\r?\n/g,cn=/^(?:submit|button|image|reset)$/i,hn=/^(?:input|select|textarea|keygen)/i;y.fn.extend({serialize:function(){return y.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=y.prop(this,"elements");return e?y.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!y(this).is(":disabled")&&hn.test(this.nodeName)&&!cn.test(e)&&(this.checked||!Et.test(e))}).map(function(e,t){var n=y(this).val();return n==null?null:y.isArray(n)?y.map(n,function(e){return{name:t.name,value:e.replace(ln,"\r\n")}}):{name:t.name,value:n.replace(ln,"\r\n")}}).get()}}),y.param=function(e,n){var r,i=[],s=function(e,t){t=y.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=y.ajaxSettings&&y.ajaxSettings.traditional);if(y.isArray(e)||e.jquery&&!y.isPlainObject(e))y.each(e,function(){s(this.name,this.value)});else for(r in e)pn(r,e[r],n,s);return i.join("&").replace(an,"+")};var dn,vn,mn=y.now(),gn=/\?/,yn=/#.*$/,bn=/([?&])_=[^&]*/,wn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,En=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Sn=/^(?:GET|HEAD)$/,xn=/^\/\//,Tn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Nn=y.fn.load,Cn={},kn={},Ln="*/".concat("*");try{vn=s.href}catch(An){vn=i.createElement("a"),vn.href="",vn=vn.href}dn=Tn.exec(vn.toLowerCase())||[],y.fn.load=function(e,n,r){if(typeof e!="string"&&Nn)return Nn.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),y.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),u.length>0&&y.ajax({url:e,type:s,dataType:"html",data:n}).done(function(e){o=arguments,u.html(i?y("<div>").append(y.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,o||[e.responseText,t,e])}),this},y.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){y.fn[t]=function(e){return this.on(t,e)}}),y.each(["get","post"],function(e,n){y[n]=function(e,r,i,s){return y.isFunction(r)&&(s=s||i,i=r,r=t),y.ajax({url:e,type:n,dataType:s,data:r,success:i})}}),y.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vn,type:"GET",isLocal:En.test(dn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ln,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":y.parseJSON,"text xml":y.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,y.ajaxSettings),t):_n(y.ajaxSettings,e)},ajaxPrefilter:On(Cn),ajaxTransport:On(kn),ajax:function(e,n){function N(e,n,o,a){var l,g,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),r=t,s=a||"",x.readyState=e>0?4:0,o&&(w=Dn(c,x,o));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(y.lastModified[i]=S),S=x.getResponseHeader("etag"),S&&(y.etag[i]=S)),e===304?(l=!0,T="notmodified"):(l=Pn(c,w),T=l.state,g=l.data,b=l.error,l=!b);else{b=T;if(e||!T)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[g,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(m),m=t,f&&p.trigger(l?"ajaxSuccess":"ajaxError",[x,c,l?g:b]),v.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--y.active||y.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=y.ajaxSetup({},n),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?y(h):y.event,d=y.Deferred(),v=y.Callbacks("once memory"),m=c.statusCode||{},g={},b={},E=0,S="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(E===2){if(!o){o={};while(t=wn.exec(s))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return E===2?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return E||(e=b[n]=b[n]||e,g[e]=t),this},overrideMimeType:function(e){return E||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(E<2)for(t in e)m[t]=[m[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||S;return r&&r.abort(t),N(0,t),this}};d.promise(x).complete=v.add,x.success=x.done,x.error=x.fail,c.url=((e||c.url||vn)+"").replace(yn,"").replace(xn,dn[1]+"//"),c.type=n.method||n.type||c.method||c.type,c.dataTypes=y.trim(c.dataType||"*").toLowerCase().match(w)||[""],c.crossDomain==null&&(a=Tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===dn[1]&&a[2]===dn[2]&&(a[3]||(a[1]==="http:"?80:443))==(dn[3]||(dn[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=y.param(c.data,c.traditional)),Mn(Cn,c,n,x);if(E===2)return x;f=c.global,f&&y.active++===0&&y.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Sn.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(gn.test(i)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=bn.test(i)?i.replace(bn,"$1_="+mn++):i+(gn.test(i)?"&":"?")+"_="+mn++)),c.ifModified&&(y.lastModified[i]&&x.setRequestHeader("If-Modified-Since",y.lastModified[i]),y.etag[i]&&x.setRequestHeader("If-None-Match",y.etag[i])),(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Ln+"; 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]);r=Mn(kn,c,n,x);if(!r)N(-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,r.send(g,N)}catch(T){if(!(E<2))throw T;N(-1,T)}}return x}return x.abort()},getScript:function(e,n){return y.get(e,t,n,"script")},getJSON:function(e,t,n){return y.get(e,t,n,"json")}}),y.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return y.globalEval(e),e}}}),y.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),y.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||y("head")[0]||i.documentElement;return{send:function(t,s){n=i.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){if(t||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||s(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Hn=[],Bn=/(=)\?(?=&|$)|\?\?/;y.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Hn.pop()||y.expando+"_"+mn++;return this[e]=!0,e}}),y.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==!1&&(Bn.test(n.url)?"url":typeof n.data=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");if(a||n.dataTypes[0]==="jsonp")return s=n.jsonpCallback=y.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a?n[a]=n[a].replace(Bn,"$1"+s):n.jsonp!==!1&&(n.url+=(gn.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||y.error(s+" was not called"),u[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Hn.push(s)),u&&y.isFunction(o)&&o(u[0]),u=o=t}),"script"});var jn,Fn,In=0,qn=e.ActiveXObject&&function(){var e;for(e in jn)jn[e](t,!0)};y.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Rn()||Un()}:Rn,Fn=y.ajaxSettings.xhr(),y.support.cors=!!Fn&&"withCredentials"in Fn,Fn=y.support.ajax=!!Fn,Fn&&y.ajaxTransport(function(n){if(!n.crossDomain||y.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=y.noop,qn&&delete jn[o]);if(i)a.readyState!==4&&a.abort();else{c={},u=a.status,h=a.responseXML,l=a.getAllResponseHeaders(),h&&h.documentElement&&(c.xml=h),typeof a.responseText=="string"&&(c.text=a.responseText);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):(o=++In,qn&&(jn||(jn={},y(e).unload(qn)),jn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var zn,Wn,Xn=/^(?:toggle|show|hide)$/,Vn=new RegExp("^(?:([+-])=|)("+b+")([a-z%]*)$","i"),$n=/queueHooks$/,Jn=[er],Kn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=Vn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(y.cssNumber[e]?"":"px");if(r!=="px"&&u){u=y.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,y.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}]};y.Animation=y.extend(Yn,{tweener:function(e,t){y.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Kn[n]=Kn[n]||[],Kn[n].unshift(t)},prefilter:function(e,t){t?Jn.unshift(e):Jn.push(e)}}),y.Tween=tr,tr.prototype={constructor:tr,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||(y.cssNumber[n]?"":"px")},cur:function(){var e=tr.propHooks[this.prop];return e&&e.get?e.get(this):tr.propHooks._default.get(this)},run:function(e){var t,n=tr.propHooks[this.prop];return this.options.duration?this.pos=t=y.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):tr.propHooks._default.set(this),this}},tr.prototype.init.prototype=tr.prototype,tr.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=y.css(e.elem,e.prop,"auto"),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){y.fx.step[e.prop]?y.fx.step[e.prop](e):e.elem.style&&(e.elem.style[y.cssProps[e.prop]]!=null||y.cssHooks[e.prop])?y.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},tr.propHooks.scrollTop=tr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},y.each(["toggle","show","hide"],function(e,t){var n=y.fn[t];y.fn[t]=function(e,r,i){return e==null||typeof e=="boolean"?n.apply(this,arguments):this.animate(nr(t,!0),e,r,i)}}),y.fn.extend({fadeTo:function(e,t,n,r){return this.filter(en).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=y.isEmptyObject(e),s=y.speed(t,n,r),o=function(){var t=Yn(this,y.extend({},e),s);o.finish=function(){t.stop(!0)},(i||y._data(this,"finish"))&&t.stop(!0)};return o.finish=o,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=y.timers,o=y._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&$n.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)&&y.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=y._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=y.timers,o=r?r.length:0;n.finish=!0,y.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this);for(t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),y.each({slideDown:nr("show"),slideUp:nr("hide"),slideToggle:nr("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){y.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),y.speed=function(e,t,n){var r=e&&typeof e=="object"?y.extend({},e):{complete:n||!n&&t||y.isFunction(e)&&e,duration:e,easing:n&&t||t&&!y.isFunction(t)&&t};r.duration=y.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in y.fx.speeds?y.fx.speeds[r.duration]:y.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){y.isFunction(r.old)&&r.old.call(this),r.queue&&y.dequeue(this,r.queue)},r},y.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},y.timers=[],y.fx=tr.prototype.init,y.fx.tick=function(){var e,n=y.timers,r=0;zn=y.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||y.fx.stop(),zn=t},y.fx.timer=function(e){e()&&y.timers.push(e)&&y.fx.start()},y.fx.interval=13,y.fx.start=function(){Wn||(Wn=setInterval(y.fx.tick,y.fx.interval))},y.fx.stop=function(){clearInterval(Wn),Wn=null},y.fx.speeds={slow:600,fast:200,_default:400},y.fx.step={},y.expr&&y.expr.filters&&(y.expr.filters.animated=function(e){return y.grep(y.timers,function(t){return e===t.elem}).length}),y.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){y.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},s=this[0],o=s&&s.ownerDocument;if(!o)return;return n=o.documentElement,y.contains(n,s)?(typeof s.getBoundingClientRect!="undefined"&&(i=s.getBoundingClientRect()),r=rr(o),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},y.offset={setOffset:function(e,t,n){var r=y.css(e,"position");r==="static"&&(e.style.position="relative");var i=y(e),s=i.offset(),o=y.css(e,"top"),u=y.css(e,"left"),a=(r==="absolute"||r==="fixed")&&y.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),y.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)}},y.fn.extend({position:function(){if(!this[0])return;var e,t,n={top:0,left:0},r=this[0];return y.css(r,"position")==="fixed"?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),y.nodeName(e[0],"html")||(n=e.offset()),n.top+=y.css(e[0],"borderTopWidth",!0),n.left+=y.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-y.css(r,"marginTop",!0),left:t.left-n.left-y.css(r,"marginLeft",!0)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.documentElement;while(e&&!y.nodeName(e,"html")&&y.css(e,"position")==="static")e=e.offsetParent;return e||i.documentElement})}}),y.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);y.fn[e]=function(i){return y.access(this,function(e,i,s){var o=rr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?y(o).scrollLeft():s,r?s:y(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),y.each({Height:"height",Width:"width"},function(e,n){y.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){y.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return y.access(this,function(n,r,i){var s;return y.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?y.css(n,r,u):y.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=y,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return y})})(window),this.Handlebars={},function(e){e.VERSION="1.0.rc.1",e.helpers={},e.partials={},e.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},e.registerPartial=function(e,t){this.partials[e]=t},e.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var t=Object.prototype.toString,n="[object Function]";e.registerHelper("blockHelperMissing",function(r,i){var s=i.inverse||function(){},o=i.fn,u="",a=t.call(r);return a===n&&(r=r.call(this)),r===!0?o(this):r===!1||r==null?s(this):a==="[object Array]"?r.length>0?e.helpers.each(r,i):s(this):o(r)}),e.K=function(){},e.createFrame=Object.create||function(t){e.K.prototype=t;var n=new e.K;return e.K.prototype=null,n},e.registerHelper("each",function(t,n){var r=n.fn,i=n.inverse,s="",o;n.data&&(o=e.createFrame(n.data));if(t&&t.length>0)for(var u=0,a=t.length;u<a;u++)o&&(o.index=u),s+=r(t[u],{data:o});else s=i(this);return s}),e.registerHelper("if",function(r,i){var s=t.call(r);return s===n&&(r=r.call(this)),!r||e.Utils.isEmpty(r)?i.inverse(this):i.fn(this)}),e.registerHelper("unless",function(t,n){var r=n.fn,i=n.inverse;return n.fn=i,n.inverse=r,e.helpers["if"].call(this,t,n)}),e.registerHelper("with",function(e,t){return t.fn(e)}),e.registerHelper("log",function(t){e.log(t)})}(this.Handlebars);var handlebars=function(){function n(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,DATA:27,param:28,STRING:29,INTEGER:30,BOOLEAN:31,hashSegments:32,hashSegment:33,ID:34,EQUALS:35,pathSegments:36,SEP:37,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",27:"DATA",29:"STRING",30:"INTEGER",31:"BOOLEAN",34:"ID",35:"EQUALS",37:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[17,1],[25,2],[25,1],[28,1],[28,1],[28,1],[28,1],[28,1],[26,1],[32,2],[32,1],[33,3],[33,3],[33,3],[33,3],[33,3],[21,1],[36,3],[36,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 3:this.$=new i.ProgramNode(o[a]);break;case 4:this.$=new i.ProgramNode([]);break;case 5:this.$=[o[a]];break;case 6:o[a-1].push(o[a]),this.$=o[a-1];break;case 7:this.$=new i.BlockNode(o[a-2],o[a-1].inverse,o[a-1],o[a]);break;case 8:this.$=new i.BlockNode(o[a-2],o[a-1],o[a-1].inverse,o[a]);break;case 9:this.$=o[a];break;case 10:this.$=o[a];break;case 11:this.$=new i.ContentNode(o[a]);break;case 12:this.$=new i.CommentNode(o[a]);break;case 13:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 14:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 15:this.$=o[a-1];break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 18:this.$=new i.PartialNode(o[a-1]);break;case 19:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 20:break;case 21:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 22:this.$=[[o[a-1]].concat(o[a]),null];break;case 23:this.$=[[o[a-1]],o[a]];break;case 24:this.$=[[o[a]],null];break;case 25:this.$=[[new i.DataNode(o[a])],null];break;case 26:o[a-1].push(o[a]),this.$=o[a-1];break;case 27:this.$=[o[a]];break;case 28:this.$=o[a];break;case 29:this.$=new i.StringNode(o[a]);break;case 30:this.$=new i.IntegerNode(o[a]);break;case 31:this.$=new i.BooleanNode(o[a]);break;case 32:this.$=new i.DataNode(o[a]);break;case 33:this.$=new i.HashNode(o[a]);break;case 34:o[a-1].push(o[a]),this.$=o[a-1];break;case 35:this.$=[o[a]];break;case 36:this.$=[o[a-2],o[a]];break;case 37:this.$=[o[a-2],new i.StringNode(o[a])];break;case 38:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 39:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 40:this.$=[o[a-2],new i.DataNode(o[a])];break;case 41:this.$=new i.IdNode(o[a]);break;case 42:o[a-2].push(o[a]),this.$=o[a-2];break;case 43:this.$=[o[a]]}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,27:[1,24],34:[1,26],36:25},{17:27,21:23,27:[1,24],34:[1,26],36:25},{17:28,21:23,27:[1,24],34:[1,26],36:25},{17:29,21:23,27:[1,24],34:[1,26],36:25},{21:30,34:[1,26],36:25},{1:[2,1]},{6:31,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,32],21:23,27:[1,24],34:[1,26],36:25},{10:33,20:[1,34]},{10:35,20:[1,34]},{18:[1,36]},{18:[2,24],21:41,25:37,26:38,27:[1,45],28:39,29:[1,42],30:[1,43],31:[1,44],32:40,33:46,34:[1,47],36:25},{18:[2,25]},{18:[2,41],27:[2,41],29:[2,41],30:[2,41],31:[2,41],34:[2,41],37:[1,48]},{18:[2,43],27:[2,43],29:[2,43],30:[2,43],31:[2,43],34:[2,43],37:[2,43]},{18:[1,49]},{18:[1,50]},{18:[1,51]},{18:[1,52],21:53,34:[1,26],36:25},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:54,34:[1,26],36:25},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:41,26:55,27:[1,45],28:56,29:[1,42],30:[1,43],31:[1,44],32:40,33:46,34:[1,47],36:25},{18:[2,23]},{18:[2,27],27:[2,27],29:[2,27],30:[2,27],31:[2,27],34:[2,27]},{18:[2,33],33:57,34:[1,58]},{18:[2,28],27:[2,28],29:[2,28],30:[2,28],31:[2,28],34:[2,28]},{18:[2,29],27:[2,29],29:[2,29],30:[2,29],31:[2,29],34:[2,29]},{18:[2,30],27:[2,30],29:[2,30],30:[2,30],31:[2,30],34:[2,30]},{18:[2,31],27:[2,31],29:[2,31],30:[2,31],31:[2,31],34:[2,31]},{18:[2,32],27:[2,32],29:[2,32],30:[2,32],31:[2,32],34:[2,32]},{18:[2,35],34:[2,35]},{18:[2,43],27:[2,43],29:[2,43],30:[2,43],31:[2,43],34:[2,43],35:[1,59],37:[2,43]},{34:[1,60]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,61]},{18:[1,62]},{18:[2,21]},{18:[2,26],27:[2,26],29:[2,26],30:[2,26],31:[2,26],34:[2,26]},{18:[2,34],34:[2,34]},{35:[1,59]},{21:63,27:[1,67],29:[1,64],30:[1,65],31:[1,66],34:[1,26],36:25},{18:[2,42],27:[2,42],29:[2,42],30:[2,42],31:[2,42],34:[2,42],37:[2,42]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,36],34:[2,36]},{18:[2,37],34:[2,37]},{18:[2,38],34:[2,38]},{18:[2,39],34:[2,39]},{18:[2,40],34:[2,40]}],defaultActions:{16:[2,1],24:[2,25],38:[2,23],55:[2,21]},parseError:function(t,n){throw new Error(t)},parse:function(t){function v(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function m(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var g,y,b,w,E,S,x={},T,N,C,k;for(;;){b=r[r.length-1];if(this.defaultActions[b])w=this.defaultActions[b];else{if(g===null||typeof g=="undefined")g=m();w=o[b]&&o[b][g]}if(typeof w=="undefined"||!w.length||!w[0]){var L="";if(!l){k=[];for(T in o[b])this.terminals_[T]&&T>2&&k.push("'"+this.terminals_[T]+"'");this.lexer.showPosition?L="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[g]||g)+"'":L="Parse error on line "+(a+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(L,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:k})}}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i,s;this._more||(this.yytext="",this.match="");var o=this._currentRules();for(var u=0;u<o.length;u++){n=this._input.match(this.rules[o[u]]);if(n&&(!t||n[0].length>t[0].length)){t=n,r=u;if(!this.options.flex)break}}if(t){s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(e)return e;return}return this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.options={},e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 1:return 14;case 2:return n.yytext.slice(-1)!=="\\"&&this.popState(),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1)),14;case 3:return 24;case 4:return 16;case 5:return 20;case 6:return 19;case 7:return 19;case 8:return 23;case 9:return 23;case 10:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 11:return 22;case 12:return 35;case 13:return 34;case 14:return 34;case 15:return 37;case 16:break;case 17:return this.popState(),18;case 18:return this.popState(),18;case 19:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),29;case 20:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),29;case 21:return n.yytext=n.yytext.substr(1),27;case 22:return 31;case 23:return 31;case 24:return 30;case 25:return 34;case 26:return n.yytext=n.yytext.substr(1,n.yyleng-2),34;case 27:return"INVALID";case 28:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@[a-zA-Z]+)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28],inclusive:!1},emu:{rules:[2],inclusive:!1},INITIAL:{rules:[0,1,28],inclusive:!0}},e}();return e.lexer=t,n.prototype=e,e.Parser=n,new n}();typeof require!="undefined"&&typeof exports!="undefined"&&(exports.parser=handlebars,exports.Parser=handlebars.Parser,exports.parse=function(){return handlebars.parse.apply(handlebars,arguments)},exports.main=function(t){if(!t[1])throw new Error("Usage: "+t[0]+" FILE");var n,r;return typeof process!="undefined"?n=require("fs").readFileSync(require("path").resolve(t[1]),"utf8"):n=require("file").path(require("file").cwd()).join(t[1]).read({charset:"utf-8"}),exports.parser.parse(n)},typeof module!="undefined"&&require.main===module&&exports.main(typeof process!="undefined"?process.argv.slice(1):require("system").args)),Handlebars.Parser=handlebars,Handlebars.parse=function(e){return Handlebars.Parser.yy=Handlebars.AST,Handlebars.Parser.parse(e)},Handlebars.print=function(e){return(new Handlebars.PrintVisitor).accept(e)},Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){}},Handlebars.log=function(e,t){Handlebars.logger.log(e,t)},function(){Handlebars.AST={},Handlebars.AST.ProgramNode=function(e,t){this.type="program",this.statements=e,t&&(this.inverse=new Handlebars.AST.ProgramNode(t))},Handlebars.AST.MustacheNode=function(e,t,n){this.type="mustache",this.escaped=!n,this.hash=t;var r=this.id=e[0],i=this.params=e.slice(1),s=this.eligibleHelper=r.isSimple;this.isHelper=s&&(i.length||t)},Handlebars.AST.PartialNode=function(e,t){this.type="partial",this.id=e,this.context=t};var e=function(e,t){if(e.original!==t.original)throw new Handlebars.Exception(e.original+" doesn't match "+t.original)};Handlebars.AST.BlockNode=function(t,n,r,i){e(t.id,i),this.type="block",this.mustache=t,this.program=n,this.inverse=r,this.inverse&&!this.program&&(this.isInverse=!0)},Handlebars.AST.ContentNode=function(e){this.type="content",this.string=e},Handlebars.AST.HashNode=function(e){this.type="hash",this.pairs=e},Handlebars.AST.IdNode=function(e){this.type="ID",this.original=e.join(".");var t=[],n=0;for(var r=0,i=e.length;r<i;r++){var s=e[r];s===".."?n++:s==="."||s==="this"?this.isScoped=!0:t.push(s)}this.parts=t,this.string=t.join("."),this.depth=n,this.isSimple=e.length===1&&!this.isScoped&&n===0},Handlebars.AST.DataNode=function(e){this.type="DATA",this.id=e},Handlebars.AST.StringNode=function(e){this.type="STRING",this.string=e},Handlebars.AST.IntegerNode=function(e){this.type="INTEGER",this.integer=e},Handlebars.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e},Handlebars.AST.CommentNode=function(e){this.type="comment",this.comment=e}}(),Handlebars.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.message=t.message},Handlebars.Exception.prototype=new Error,Handlebars.SafeString=function(e){this.string=e},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},t=/[&<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&amp;"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.Compiler=function(){},Handlebars.JavaScriptCompiler=function(){},function(e,t){e.prototype={compiler:e,disassemble:function(){var e=this.opcodes,t,n=[],r,i;for(var s=0,o=e.length;s<o;s++){t=e[s];if(t.opcode==="DECLARE")n.push("DECLARE "+t.name+"="+t.value);else{r=[];for(var u=0;u<t.args.length;u++)i=t.args[u],typeof i=="string"&&(i='"'+i.replace("\n","\\n")+'"'),r.push(i);n.push(t.opcode+" "+r.join(" "))}}return n.join("\n")},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++,r;this.usePartial=this.usePartial||t.usePartial,this.children[n]=t;for(var i=0,s=t.depths.list.length;i<s;i++){r=t.depths.list[i];if(r<2)continue;this.addDepth(r-1)}return n},block:function(e){var t=e.mustache,n=e.program,r=e.inverse;n&&(n=this.compileProgram(n)),r&&(r=this.compileProgram(r));var i=this.classifyMustache(t);i==="helper"?this.helperMustache(t,n,r):i==="simple"?(this.simpleMustache(t),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("pushLiteral","{}"),this.opcode("blockValue")):(this.ambiguousMustache(t,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("pushLiteral","{}"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("push","{}");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.accept(r),this.opcode("assignToHash",n[0])},partial:function(e){var t=e.id;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.original),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.options,n=this.classifyMustache(e);n==="simple"?this.simpleMustache(e):n==="helper"?this.helperMustache(e):this.ambiguousMustache(e),e.escaped&&!t.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousMustache:function(e,t,n){var r=e.id,i=r.parts[0];this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("invokeAmbiguous",i)},simpleMustache:function(e,t,n){var r=e.id;r.type==="DATA"?this.DATA(r):r.parts.length?this.ID(r):(this.addDepth(r.depth),this.opcode("getContext",r.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperMustache:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),i=e.id.parts[0];if(this.options.knownHelpers[i])this.opcode("invokeKnownHelper",r.length,i);else{if(this.knownHelpersOnly)throw new Error("You specified knownHelpersOnly, but used the unknown helper "+i);this.opcode("invokeHelper",r.length,i)}},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0];t?this.opcode("lookupOnContext",e.parts[0]):this.opcode("pushContext");for(var n=1,r=e.parts.length;n<r;n++)this.opcode("lookup",e.parts[n])},DATA:function(e){this.options.data=!0,this.opcode("lookupData",e.id)},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("pushLiteral",e.integer)},BOOLEAN:function(e){this.opcode("pushLiteral",e.bool)},comment:function(){},opcode:function(e){this.opcodes.push({opcode:e,args:[].slice.call(arguments,1)})},declare:function(e,t){this.opcodes.push({opcode:"DECLARE",name:e,value:t})},addDepth:function(e){if(isNaN(e))throw new Error("EWOT");if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},classifyMustache:function(e){var t=e.isHelper,n=e.eligibleHelper,r=this.options;if(n&&!t){var i=e.id.parts[0];r.knownHelpers[i]?t=!0:r.knownHelpersOnly&&(n=!1)}return t?"helper":n?"ambiguous":"simple"},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.string)):this[n.type](n)},setupMustacheParams:function(e){var t=e.params;return this.pushParams(t),e.hash?this.hash(e.hash):this.opcode("pushLiteral","{}"),t},setupFullMustacheParams:function(e,t,n){var r=e.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.hash(e.hash):this.opcode("pushLiteral","{}"),r}};var n=function(e){this.value=e};t.prototype={nameLookup:function(e,n,r){return/^[0-9]+$/.test(n)?e+"["+n+"]":t.isValidJavaScriptVariableName(n)?e+"."+n:e+"['"+n+"']"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":"buffer += "+e+";"},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},Handlebars.log(Handlebars.logger.DEBUG,this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.compileStack=[],this.compileChildren(e,t);var i=e.opcodes,s;this.i=0;for(o=i.length;this.i<o;this.i++)s=i[this.i],s.opcode==="DECLARE"?this[s.name]=s.value:this[s.opcode].apply(this,s.args);return this.createFunctionContext(r)},nextOpcode:function(){var e=this.environment.opcodes,t=e[this.i+1];return e[this.i+1]},eat:function(e){this.i=this.i+1},preamble:function(){var e=[];if(!this.isChild){var t=this.namespace,n="helpers = helpers || "+t+".helpers;";this.environment.usePartial&&(n=n+" partials = partials || "+t+".partials;"),this.options.data&&(n+=" data = data || {};"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(e){var t=this.stackVars.concat(this.registers.list);t.length>0&&(this.source[1]=this.source[1]+", "+t.join(", "));if(!this.isChild){var n=[];for(var r in this.context.aliases)this.source[1]=this.source[1]+", "+r+"="+this.context.aliases[r]}this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var i=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var s=0,o=this.environment.depths.list.length;s<o;s++)i.push("depth"+this.environment.depths.list[s]);if(e)return i.push(this.source.join("\n  ")),Function.apply(this,i);var u="function "+(this.name||"")+"("+i.join(",")+") {\n  "+this.source.join("\n  ")+"}";return Handlebars.log(Handlebars.logger.DEBUG,u+"\n\n"),u},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e),this.replaceStack(function(t){return e.splice(1,0,t),t+" = blockHelperMissing.call("+e.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e);var t=this.topStack();e.splice(1,0,t),this.source.push("if (!"+this.lastHelper+") { "+t+" = blockHelperMissing.call("+e.join(", ")+"); }")},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var e=this.nextOpcode(),t="";this.context.aliases.escapeExpression="this.escapeExpression",e&&e.opcode==="appendContent"&&(t=" + "+this.quotedString(e.args[0]),this.eat(e)),this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+t))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupOnContext:function(e){this.pushStack(this.nameLookup("depth"+this.lastContext,e,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(e){return"typeof "+e+" === functionType ? "+e+"() : "+e})},lookup:function(e){this.replaceStack(function(t){return t+" == null || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")})},lookupData:function(e){this.pushStack(this.nameLookup("data",e,"data"))},pushStringParam:function(e){this.pushStackLiteral("depth"+this.lastContext),this.pushString(e)},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},push:function(e){this.pushStack(e)},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},invokeHelper:function(e,t){this.context.aliases.helperMissing="helpers.helperMissing";var n=this.lastHelper=this.setupHelper(e,t);this.register("foundHelper",n.name),this.pushStack("foundHelper ? foundHelper.call("+n.callParams+") "+": helperMissing.call("+n.helperMissingParams+")")},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.pushStack(n.name+".call("+n.callParams+")")},invokeAmbiguous:function(e){this.context.aliases.functionType='"function"',this.pushStackLiteral("{}");var t=this.setupHelper(0,e),n=this.lastHelper=this.nameLookup("helpers",e,"helper");this.register("foundHelper",n);var r=this.nameLookup("depth"+this.lastContext,e,"context"),i=this.nextStack();this.source.push("if (foundHelper) { "+i+" = foundHelper.call("+t.callParams+"); }"),this.source.push("else { "+i+" = "+r+"; "+i+" = typeof "+i+" === functionType ? "+i+"() : "+i+"; }")},invokePartial:function(e){var t=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"];this.options.data&&t.push("data"),this.context.aliases.self="this",this.pushStack("self.invokePartial("+t.join(", ")+");")},assignToHash:function(e){var t=this.popStack(),n=this.topStack();this.source.push(n+"['"+e+"'] = "+t+";")},compiler:t,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler,this.context.programs.push("");var u=this.context.programs.length;r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context)}},programExpression:function(e){this.context.aliases.self="this";if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r,i=[t.index,t.name,"data"];for(var s=0,o=n.length;s<o;s++)r=n[s],r===1?i.push("depth0"):i.push("depth"+(r-1));return n.length===0?"self.program("+i.join(", ")+")":(i.shift(),"self.programWithDepth("+i.join(", ")+")")},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},pushStackLiteral:function(e){return this.compileStack.push(new n(e)),e},pushStack:function(e){return this.source.push(this.incrStack()+" = "+e+";"),this.compileStack.push("stack"+this.stackSlot),"stack"+this.stackSlot},replaceStack:function(e){var t=e.call(this,this.topStack());return this.source.push(this.topStack()+" = "+t+";"),"stack"+this.stackSlot},nextStack:function(e){var t=this.incrStack();return this.compileStack.push("stack"+this.stackSlot),t},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),"stack"+this.stackSlot},popStack:function(){var e=this.compileStack.pop();return e instanceof n?e.value:(this.stackSlot--,e)},topStack:function(){var e=this.compileStack[this.compileStack.length-1];return e instanceof n?e.value:e},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'},setupHelper:function(e,t){var n=[];this.setupParams(e,n);var r=this.nameLookup("helpers",t,"helper");return{params:n,name:r,callParams:["depth0"].concat(n).join(", "),helperMissingParams:["depth0",this.quotedString(t)].concat(n).join(", ")}},setupParams:function(e,t){var n=[],r=[],i,s,o;n.push("hash:"+this.popStack()),s=this.popStack(),o=this.popStack();if(o||s)o||(this.context.aliases.self="this",o="self.noop"),s||(this.context.aliases.self="this",s="self.noop"),n.push("inverse:"+s),n.push("fn:"+o);for(var u=0;u<e;u++)i=this.popStack(),t.push(i),this.options.stringParams&&r.push(this.popStack());return this.options.stringParams&&n.push("contexts:["+r.join(",")+"]"),this.options.data&&n.push("data:data"),t.push("{"+n.join(",")+"}"),t.join(", ")}};var r="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),i=t.RESERVED_WORDS={};for(var s=0,o=r.length;s<o;s++)i[r[s]]=!0;t.isValidJavaScriptVariableName=function(e){return!t.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1}}(Handlebars.Compiler,Handlebars.JavaScriptCompiler),Handlebars.precompile=function(e,t){t=t||{};var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t);return(new Handlebars.JavaScriptCompiler).compile(r,t)},Handlebars.compile=function(e,t){function r(){var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t),i=(new Handlebars.JavaScriptCompiler).compile(r,t,undefined,!0);return Handlebars.template(i)}t=t||{};var n;return function(e,t){return n||(n=r()),n.call(this,e,t)}},Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?(r=Handlebars.VM.program(t,n),r.program=e):r||(r=this.programs[e]=Handlebars.VM.program(t),r.program=e),r},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i,s){var o={helpers:r,partials:i,data:s};if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,o);if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");return i[t]=Handlebars.compile(e,{data:s!==undefined}),i[t](n,o)}},Handlebars.template=Handlebars.VM.template,function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=r.unshift,l=i.toString,c=i.hasOwnProperty,h=r.forEach,p=r.map,d=r.reduce,v=r.reduceRight,m=r.filter,g=r.every,y=r.some,b=r.indexOf,w=r.lastIndexOf,E=Array.isArray,S=Object.keys,x=s.bind,T=function(e){if(e instanceof T)return e;if(!(this instanceof T))return new T(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=T),exports._=T):e._=T,T.VERSION="1.4.2";var N=T.each=T.forEach=function(e,t,r){if(e==null)return;if(h&&e.forEach===h)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(T.has(e,o)&&t.call(r,e[o],o,e)===n)return};T.map=T.collect=function(e,t,n){var r=[];return e==null?r:p&&e.map===p?e.map(t,n):(N(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},T.reduce=T.foldl=T.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduce===d)return r&&(t=T.bind(t,r)),i?e.reduce(t,n):e.reduce(t);N(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.reduceRight=T.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(v&&e.reduceRight===v)return r&&(t=T.bind(t,r)),arguments.length>2?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=T.keys(e);s=o.length}N(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.find=T.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},T.filter=T.select=function(e,t,n){var r=[];return e==null?r:m&&e.filter===m?e.filter(t,n):(N(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},T.reject=function(e,t,n){var r=[];return e==null?r:(N(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},T.every=T.all=function(e,t,r){t||(t=T.identity);var i=!0;return e==null?i:g&&e.every===g?e.every(t,r):(N(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=T.some=T.any=function(e,t,r){t||(t=T.identity);var i=!1;return e==null?i:y&&e.some===y?e.some(t,r):(N(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};T.contains=T.include=function(e,t){var n=!1;return e==null?n:b&&e.indexOf===b?e.indexOf(t)!=-1:(n=C(e,function(e){return e===t}),n)},T.invoke=function(e,t){var n=u.call(arguments,2);return T.map(e,function(e){return(T.isFunction(t)?t:e[t]).apply(e,n)})},T.pluck=function(e,t){return T.map(e,function(e){return e[t]})},T.where=function(e,t){return T.isEmpty(t)?[]:T.filter(e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},T.max=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&T.isEmpty(e))return-Infinity;var r={computed:-Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},T.min=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&T.isEmpty(e))return Infinity;var r={computed:Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},T.shuffle=function(e){var t,n=0,r=[];return N(e,function(e){t=T.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return T.isFunction(e)?e:function(t){return t[e]}};T.sortBy=function(e,t,n){var r=k(t);return T.pluck(T.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t);return N(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};T.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(T.has(e,t)?e[t]:e[t]=[]).push(n)})},T.countBy=function(e,t,n){return L(e,t,n,function(e,t,n){T.has(e,t)||(e[t]=0),e[t]++})},T.sortedIndex=function(e,t,n,r){n=n==null?T.identity:k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},T.toArray=function(e){return e?e.length===+e.length?u.call(e):T.values(e):[]},T.size=function(e){return e.length===+e.length?e.length:T.keys(e).length},T.first=T.head=T.take=function(e,t,n){return t!=null&&!n?u.call(e,0,t):e[0]},T.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},T.last=function(e,t,n){return t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},T.rest=T.tail=T.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},T.compact=function(e){return T.filter(e,function(e){return!!e})};var A=function(e,t,n){return N(e,function(e){T.isArray(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n};T.flatten=function(e,t){return A(e,t,[])},T.without=function(e){return T.difference(e,u.call(arguments,1))},T.uniq=T.unique=function(e,t,n,r){var i=n?T.map(e,n,r):e,s=[],o=[];return N(i,function(n,r){if(t?!r||o[o.length-1]!==n:!T.contains(o,n))o.push(n),s.push(e[r])}),s},T.union=function(){return T.uniq(a.apply(r,arguments))},T.intersection=function(e){var t=u.call(arguments,1);return T.filter(T.uniq(e),function(e){return T.every(t,function(t){return T.indexOf(t,e)>=0})})},T.difference=function(e){var t=a.apply(r,u.call(arguments,1));return T.filter(e,function(e){return!T.contains(t,e)})},T.zip=function(){var e=u.call(arguments),t=T.max(T.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=T.pluck(e,""+r);return n},T.object=function(e,t){var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},T.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=T.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(b&&e.indexOf===b)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},T.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(w&&e.lastIndexOf===w)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},T.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var O=function(){};T.bind=function(t,n){var r,i;if(t.bind===x&&x)return x.apply(t,u.call(arguments,1));if(!T.isFunction(t))throw new TypeError;return i=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=t.prototype;var e=new O,s=t.apply(e,i.concat(u.call(arguments)));return Object(s)===s?s:e}return t.apply(n,i.concat(u.call(arguments)))}},T.bindAll=function(e){var t=u.call(arguments,1);return t.length==0&&(t=T.functions(e)),N(t,function(t){e[t]=T.bind(e[t],e)}),e},T.memoize=function(e,t){var n={};return t||(t=T.identity),function(){var r=t.apply(this,arguments);return T.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},T.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},T.defer=function(e){return T.delay.apply(T,[e,1].concat(u.call(arguments,1)))},T.throttle=function(e,t){var n,r,i,s,o,u,a=T.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&(u=e.apply(n,r)),a()};return i||(i=setTimeout(f,t)),s?o=!0:(s=!0,u=e.apply(n,r)),a(),u}},T.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},T.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},T.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},T.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},T.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},T.keys=S||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)T.has(e,n)&&(t[t.length]=n);return t},T.values=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push(e[n]);return t},T.pairs=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push([n,e[n]]);return t},T.invert=function(e){var t={};for(var n in e)T.has(e,n)&&(t[e[n]]=n);return t},T.functions=T.methods=function(e){var t=[];for(var n in e)T.isFunction(e[n])&&t.push(n);return t.sort()},T.extend=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},T.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return N(n,function(n){n in e&&(t[n]=e[n])}),t},T.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)T.contains(n,i)||(t[i]=e[i]);return t},T.defaults=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},T.clone=function(e){return T.isObject(e)?T.isArray(e)?e.slice():T.extend({},e):e},T.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof T&&(e=e._wrapped),t instanceof T&&(t=t._wrapped);var i=l.call(e);if(i!=l.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=M(e[o],t[o],n,r)))break}else{var a=e.constructor,f=t.constructor;if(a!==f&&!(T.isFunction(a)&&a instanceof a&&T.isFunction(f)&&f instanceof f))return!1;for(var c in e)if(T.has(e,c)){o++;if(!(u=T.has(t,c)&&M(e[c],t[c],n,r)))break}if(u){for(c in t)if(T.has(t,c)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};T.isEqual=function(e,t){return M(e,t,[],[])},T.isEmpty=function(e){if(e==null)return!0;if(T.isArray(e)||T.isString(e))return e.length===0;for(var t in e)if(T.has(e,t))return!1;return!0},T.isElement=function(e){return!!e&&e.nodeType===1},T.isArray=E||function(e){return l.call(e)=="[object Array]"},T.isObject=function(e){return e===Object(e)},N(["Arguments","Function","String","Number","Date","RegExp"],function(e){T["is"+e]=function(t){return l.call(t)=="[object "+e+"]"}}),T.isArguments(arguments)||(T.isArguments=function(e){return!!e&&!!T.has(e,"callee")}),typeof /./!="function"&&(T.isFunction=function(e){return typeof e=="function"}),T.isFinite=function(e){return T.isNumber(e)&&isFinite(e)},T.isNaN=function(e){return T.isNumber(e)&&e!=+e},T.isBoolean=function(e){return e===!0||e===!1||l.call(e)=="[object Boolean]"},T.isNull=function(e){return e===null},T.isUndefined=function(e){return e===void 0},T.has=function(e,t){return c.call(e,t)},T.noConflict=function(){return e._=t,this},T.identity=function(e){return e},T.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)},T.random=function(e,t){return t==null&&(t=e,e=0),e+(0|Math.random()*(t-e+1))};var _={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};_.unescape=T.invert(_.escape);var D={escape:new RegExp("["+T.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+T.keys(_.unescape).join("|")+")","g")};T.each(["escape","unescape"],function(e){T[e]=function(t){return t==null?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),T.result=function(e,t){if(e==null)return null;var n=e[t];return T.isFunction(n)?n.call(e):n},T.mixin=function(e){N(T.functions(e),function(t){var n=T[t]=e[t];T.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(T,e))}})};var P=0;T.uniqueId=function(e){var t=P++;return e?e+t:t},T.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;T.template=function(e,t,n){n=T.defaults({},n,T.templateSettings);var r=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){s+=e.slice(i,u).replace(j,function(e){return"\\"+B[e]}),s+=n?"'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?"'+\n((__t=("+r+"))==null?'':__t)+\n'":o?"';\n"+o+"\n__p+='":"",i=u+t.length}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(n.variable||"obj","_",s)}catch(u){throw u.source=s,u}if(t)return o(t,T);var a=function(e){return o.call(this,e,T)};return a.source="function("+(n.variable||"obj")+"){\n"+s+"}",a},T.chain=function(e){return T(e).chain()};var F=function(e){return this._chain?T(e).chain():e};T.mixin(T),N(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];T.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],F.call(this,n)}}),N(["concat","join","slice"],function(e){var t=r[e];T.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),T.extend(T.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),function(){var e=this,t=e.Backbone,n=[],r=n.push,i=n.slice,s=n.splice,o;typeof exports!="undefined"?o=exports:o=e.Backbone={},o.VERSION="0.9.9";var u=e._;!u&&typeof require!="undefined"&&(u=require("underscore")),o.$=e.jQuery||e.Zepto||e.ender,o.noConflict=function(){return e.Backbone=t,this},o.emulateHTTP=!1,o.emulateJSON=!1;var a=/\s+/,f=function(e,t,n,r){if(!n)return!0;if(typeof n=="object")for(var i in n)e[t].apply(e,[i,n[i]].concat(r));else{if(!a.test(n))return!0;var s=n.split(a);for(var o=0,u=s.length;o<u;o++)e[t].apply(e,[s[o]].concat(r))}},l=function(e,t,n){var r,i=-1,s=t.length;switch(n.length){case 0:while(++i<s)(r=t[i]).callback.call(r.ctx);return;case 1:while(++i<s)(r=t[i]).callback.call(r.ctx,n[0]);return;case 2:while(++i<s)(r=t[i]).callback.call(r.ctx,n[0],n[1]);return;case 3:while(++i<s)(r=t[i]).callback.call(r.ctx,n[0],n[1],n[2]);return;default:while(++i<s)(r=t[i]).callback.apply(r.ctx,n)}},c=o.Events={on:function(e,t,n){if(!f(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,n){if(!f(this,"once",e,[t,n])||!t)return this;var r=this,i=u.once(function(){r.off(e,i),t.apply(this,arguments)});return i._callback=t,this.on(e,i,n),this},off:function(e,t,n){var r,i,s,o,a,l,c,h;if(!this._events||!f(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events={},this;o=e?[e]:u.keys(this._events);for(a=0,l=o.length;a<l;a++){e=o[a];if(r=this._events[e]){s=[];if(t||n)for(c=0,h=r.length;c<h;c++)i=r[c],(t&&t!==(i.callback._callback||i.callback)||n&&n!==i.context)&&s.push(i);this._events[e]=s}}return this},trigger:function(e){if(!this._events)return this;var t=i.call(arguments,1);if(!f(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&l(this,n,t),r&&l(this,r,arguments),this},listenTo:function(e,t,n){var r=this._listeners||(this._listeners={}),i=e._listenerId||(e._listenerId=u.uniqueId("l"));return r[i]=e,e.on(t,n||this,this),this},stopListening:function(e,t,n){var r=this._listeners;if(!r)return;if(e)e.off(t,n,this),!t&&!n&&delete r[e._listenerId];else{for(var i in r)r[i].off(null,null,this);this._listeners={}}return this}};c.bind=c.on,c.unbind=c.off,u.extend(o,c);var h=o.Model=function(e,t){var n,r=e||{};this.cid=u.uniqueId("c"),this.changed={},this.attributes={},this._changes=[],t&&t.collection&&(this.collection=t.collection),t&&t.parse&&(r=this.parse(r)),(n=u.result(this,"defaults"))&&u.defaults(r,n),this.set(r,{silent:!0}),this._currentAttributes=u.clone(this.attributes),this._previousAttributes=u.clone(this.attributes),this.initialize.apply(this,arguments)};u.extend(h.prototype,c,{changed:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return u.clone(this.attributes)},sync:function(){return o.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return u.escape(this.get(e))},has:function(e){return this.get(e)!=null},set:function(e,t,n){var r,i;if(e==null)return this;u.isObject(e)?(i=e,n=t):(i={})[e]=t;var s=n&&n.silent,o=n&&n.unset;if(!this._validate(i,n))return!1;this.idAttribute in i&&(this.id=i[this.idAttribute]);var a=this.attributes;for(r in i)t=i[r],o?delete a[r]:a[r]=t,this._changes.push(r,t);return this._hasComputed=!1,s||this.change(n),this},unset:function(e,t){return this.set(e,void 0,u.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,u.extend({},e,{unset:!0}))},fetch:function(e){e=e?u.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r,i,s){if(!t.set(t.parse(r),e))return!1;n&&n(t,r,e)},this.sync("read",this,e)},save:function(e,t,n){var r,i,s;e==null||u.isObject(e)?(r=e,n=t):e!=null&&((r={})[e]=t),n=n?u.clone(n):{};if(n.wait){if(r&&!this._validate(r,n))return!1;i=u.clone(this.attributes)}var o=u.extend({},n,{silent:!0});if(r&&!this.set(r,n.wait?o:n))return!1;if(!r&&!this._validate(null,n))return!1;var a=this,f=n.success;n.success=function(e,t,i){s=!0;var o=a.parse(e);n.wait&&(o=u.extend(r||{},o));if(!a.set(o,n))return!1;f&&f(a,e,n)};var l=this.isNew()?"create":n.patch?"patch":"update";l=="patch"&&(n.attrs=r);var c=this.sync(l,this,n);return!s&&n.wait&&(this.clear(o),this.set(i,o)),c},destroy:function(e){e=e?u.clone(e):{};var t=this,n=e.success,r=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(i){(e.wait||t.isNew())&&r(),n&&n(t,i,e)};if(this.isNew())return e.success(),!1;var i=this.sync("delete",this,e);return e.wait||r(),i},url:function(){var e=u.result(this,"urlRoot")||u.result(this.collection,"url")||M();return this.isNew()?e:e+(e.charAt(e.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},change:function(e){var t=this._changing;this._changing=!0;var n=this._computeChanges(!0);this._pending=!!n.length;for(var r=n.length-2;r>=0;r-=2)this.trigger("change:"+n[r],this,n[r+1],e);if(t)return this;while(this._pending)this._pending=!1,this.trigger("change",this,e),this._previousAttributes=u.clone(this.attributes);return this._changing=!1,this},hasChanged:function(e){return this._hasComputed||this._computeChanges(),e==null?!u.isEmpty(this.changed):u.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?u.clone(this.changed):!1;var t,n=!1,r=this._previousAttributes;for(var i in e){if(u.isEqual(r[i],t=e[i]))continue;(n||(n={}))[i]=t}return n},_computeChanges:function(e){this.changed={};var t={},n=[],r=this._currentAttributes,i=this._changes;for(var s=i.length-2;s>=0;s-=2){var o=i[s],u=i[s+1];if(t[o])continue;t[o]=!0;if(r[o]!==u){this.changed[o]=u;if(!e)continue;n.push(o,u),r[o]=u}}return e&&(this._changes=[]),this._hasComputed=!0,n},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return u.clone(this._previousAttributes)},_validate:function(e,t){if(!this.validate)return!0;e=u.extend({},this.attributes,e);var n=this.validate(e,t);return n?(t&&t.error&&t.error(this,n,t),this.trigger("error",this,n,t),!1):!0}});var p=o.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),t.comparator!==void 0&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,u.extend({silent:!0},t))};u.extend(p.prototype,c,{model:h,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return o.sync.apply(this,arguments)},add:function(e,t){var n,i,o,a,f,l,c=t&&t.at,h=(t&&t.sort)==null?!0:t.sort;e=u.isArray(e)?e.slice():[e];for(n=e.length-1;n>=0;n--){if(!(a=this._prepareModel(e[n],t))){this.trigger("error",this,e[n],t),e.splice(n,1);continue}e[n]=a,f=a.id!=null&&this._byId[a.id];if(f||this._byCid[a.cid]){t&&t.merge&&f&&(f.set(a.attributes,t),l=h),e.splice(n,1);continue}a.on("all",this._onModelEvent,this),this._byCid[a.cid]=a,a.id!=null&&(this._byId[a.id]=a)}e.length&&(l=h),this.length+=e.length,i=[c!=null?c:this.models.length,0],r.apply(i,e),s.apply(this.models,i),l&&this.comparator&&c==null&&this.sort({silent:!0});if(t&&t.silent)return this;while(a=e.shift())a.trigger("add",a,this,t);return this},remove:function(e,t){var n,r,i,s;t||(t={}),e=u.isArray(e)?e.slice():[e];for(n=0,r=e.length;n<r;n++){s=this.get(e[n]);if(!s)continue;delete this._byId[s.id],delete this._byCid[s.cid],i=this.indexOf(s),this.models.splice(i,1),this.length--,t.silent||(t.index=i,s.trigger("remove",s,this,t)),this._removeReference(s)}return this},push:function(e,t){return e=this._prepareModel(e,t),this.add(e,u.extend({at:this.length},t)),e},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return e=this._prepareModel(e,t),this.add(e,u.extend({at:0},t)),e},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(e,t){return this.models.slice(e,t)},get:function(e){return e==null?void 0:this._byId[e.id!=null?e.id:e]||this._byCid[e.cid||e]},at:function(e){return this.models[e]},where:function(e){return u.isEmpty(e)?[]:this.filter(function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return u.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(u.bind(this.comparator,this)),(!e||!e.silent)&&this.trigger("sort",this,e),this},pluck:function(e){return u.invoke(this.models,"get",e)},update:function(e,t){var n,r,i,s,o=[],a=[],f={},l=this.model.prototype.idAttribute;t=u.extend({add:!0,merge:!0,remove:!0},t),t.parse&&(e=this.parse(e)),u.isArray(e)||(e=e?[e]:[]);if(t.add&&!t.remove)return this.add(e,t);for(r=0,i=e.length;r<i;r++)n=e[r],s=this.get(n.id||n.cid||n[l]),t.remove&&s&&(f[s.cid]=!0),(t.add&&!s||t.merge&&s)&&o.push(n);if(t.remove)for(r=0,i=this.models.length;r<i;r++)n=this.models[r],f[n.cid]||a.push(n);return a.length&&this.remove(a,t),o.length&&this.add(o,t),this},reset:function(e,t){t||(t={}),t.parse&&(e=this.parse(e));for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n]);return t.previousModels=this.models,this._reset(),e&&this.add(e,u.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),this},fetch:function(e){e=e?u.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r,i,s){var o=e.update?"update":"reset";t[o](r,e),n&&n(t,r,e)},this.sync("read",this,e)},create:function(e,t){var n=this;t=t?u.clone(t):{},e=this._prepareModel(e,t);if(!e)return!1;t.wait||n.add(e,t);var r=t.success;return t.success=function(e,t,i){i.wait&&n.add(e,i),r&&r(e,t,i)},e.save(null,t),e},parse:function(e){return e},clone:function(){return new this.constructor(this.models)},chain:function(){return u(this.models).chain()},_reset:function(){this.length=0,this.models=[],this._byId={},this._byCid={}},_prepareModel:function(e,t){if(e instanceof h)return e.collection||(e.collection=this),e;t||(t={}),t.collection=this;var n=new this.model(e,t);return n._validate(e,t)?n:!1},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e==="add"||e==="remove")&&n!==this)return;e==="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var d=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortedIndex","toArray","size","first","head","take","initial","rest","tail","last","without","indexOf","shuffle","lastIndexOf","isEmpty"];u.each(d,function(e){p.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.models),u[e].apply(u,t)}});var v=["groupBy","countBy","sortBy"];u.each(v,function(e){p.prototype[e]=function(t,n){var r=u.isFunction(t)?t:function(e){return e.get(t)};return u[e](this.models,r,n)}});var m=o.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},g=/\((.*?)\)/g,y=/:\w+/g,b=/\*\w+/g,w=/[\-{}\[\]+?.,\\\^$|#\s]/g;u.extend(m.prototype,c,{initialize:function(){},route:function(e,t,n){return u.isRegExp(e)||(e=this._routeToRegExp(e)),n||(n=this[t]),o.history.route(e,u.bind(function(r){var i=this._extractParameters(e,r);n&&n.apply(this,i),this.trigger.apply(this,["route:"+t].concat(i)),o.history.trigger("route",this,t,i)},this)),this},navigate:function(e,t){return o.history.navigate(e,t),this},_bindRoutes:function(){if(!this.routes)return;var e,t=u.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(w,"\\$&").replace(g,"(?:$1)?").replace(y,"([^/]+)").replace(b,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){return e.exec(t).slice(1)}});var E=o.History=function(){this.handlers=[],u.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},S=/^[#\/]|\s+$/g,x=/^\/+|\/+$/g,T=/msie [\w.]+/,N=/\/$/;E.started=!1,u.extend(E.prototype,c,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.root.replace(N,"");e.indexOf(n)||(e=e.substr(n.length))}else e=this.getHash();return e.replace(S,"")},start:function(e){if(E.started)throw new Error("Backbone.history has already been started");E.started=!0,this.options=u.extend({},{root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var t=this.getFragment(),n=document.documentMode,r=T.exec(navigator.userAgent.toLowerCase())&&(!n||n<=7);this.root=("/"+this.root+"/").replace(x,"/"),r&&this._wantsHashChange&&(this.iframe=o.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?o.$(window).bind("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?o.$(window).bind("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=t;var i=this.location,s=i.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&s&&i.hash&&(this.fragment=this.getHash().replace(S,""),this.history.replaceState({},document.title,this.root+this.fragment+i.search));if(!this.options.silent)return this.loadUrl()},stop:function(){o.$(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),E.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(e){var t=this.fragment=this.getFragment(e),n=u.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0});return n},navigate:function(e,t){if(!E.started)return!1;if(!t||t===!0)t={trigger:t};e=this.getFragment(e||"");if(this.fragment===e)return;this.fragment=e;var n=this.root+e;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}t.trigger&&this.loadUrl(e)},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),o.history=new E;var C=o.View=function(e){this.cid=u.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},k=/^(\S+)\s*(.*)$/,L=["model","collection","el","id","attributes","className","tagName","events"];u.extend(C.prototype,c,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},make:function(e,t,n){var r=document.createElement(e);return t&&o.$(r).attr(t),n!=null&&o.$(r).html(n),r},setElement:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=e instanceof o.$?e:o.$(e),this.el=this.$el[0],t!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=u.result(this,"events")))return;this.undelegateEvents();for(var t in e){var n=e[t];u.isFunction(n)||(n=this[e[t]]);if(!n)throw new Error('Method "'+e[t]+'" does not exist');var r=t.match(k),i=r[1],s=r[2];n=u.bind(n,this),i+=".delegateEvents"+this.cid,s===""?this.$el.bind(i,n):this.$el.delegate(s,i,n)}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(e){this.options&&(e=u.extend({},u.result(this,"options"),e)),u.extend(this,u.pick(e,L)),this.options=e},_ensureElement:function(){if(!this.el){var e=u.extend({},u.result(this,"attributes"));this.id&&(e.id=u.result(this,"id")),this.className&&(e["class"]=u.result(this,"className")),this.setElement(this.make(u.result(this,"tagName"),e),!1)}else this.setElement(u.result(this,"el"),!1)}});var A={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};o.sync=function(e,t,n){var r=A[e];u.defaults(n||(n={}),{emulateHTTP:o.emulateHTTP,emulateJSON:o.emulateJSON});var i={type:r,dataType:"json"};n.url||(i.url=u.result(t,"url")||M()),n.data==null&&t&&(e==="create"||e==="update"||e==="patch")&&(i.contentType="application/json",i.data=JSON.stringify(n.attrs||t.toJSON(n))),n.emulateJSON&&(i.contentType="application/x-www-form-urlencoded",i.data=i.data?{model:i.data}:{});if(n.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){i.type="POST",n.emulateJSON&&(i.data._method=r);var s=n.beforeSend;n.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",r);if(s)return s.apply(this,arguments)}}i.type!=="GET"&&!n.emulateJSON&&(i.processData=!1);var a=n.success;n.success=function(e,r,i){a&&a(e,r,i),t.trigger("sync",t,e,n)};var f=n.error;n.error=function(e,r,i){f&&f(t,e,n),t.trigger("error",t,e,n)};var l=o.ajax(u.extend(i,n));return t.trigger("request",t,l,n),l},o.ajax=function(){return o.$.ajax.apply(o.$,arguments)};var O=function(e,t){var n=this,r;e&&u.has(e,"constructor")?r=e.constructor:r=function(){n.apply(this,arguments)},u.extend(r,n,t);var i=function(){this.constructor=r};return i.prototype=n.prototype,r.prototype=new i,e&&u.extend(r.prototype,e),r.__super__=n.prototype,r};h.extend=p.extend=m.extend=C.extend=E.extend=O;var M=function(){throw new Error('A "url" property or function must be specified')}}.call(this),function(){function s(){this.helpers&&_.each(this.helpers,function(e,t){var n=this;this.helpers[t]=function(){var t=_.toArray(arguments),r=_.last(t);return r.context=this,e.apply(n,t)}},this)}function o(e,t){var n=e.extend;e.extend=function(){var e=n.apply(this,arguments);return e.prototype.name&&(t[e.prototype.name]=e),e}}function u(e,t,n,r){var i=e[t],s;if(n.indexOf(".")>=0){var o=n.split(/\./);n=o.pop(),_.each(o,function(e){i=i[e]})}i&&(s=i[n]);if(!s&&!r)throw new Error(t+": "+n+" does not exist.");return s}function a(e,t,n){return!e||!e[t]?null:_.isFunction(e[t])?e[t].call(n||e):e[t]}function l(e){_.each(f,function(t){e[t.name]||(e[t.name]=[])})}function c(e){_.each(f,function(t){e[t.name]=[]})}function h(e,t,n,r){var i=[];_.has(e,t)&&i.push(e);var s=e;if(n)while(s=s.__parent__)_.has(s,t)&&i.push(s);else{s=s.constructor;while(s)s.prototype&&_.has(s.prototype,t)&&i.push(s.prototype),s=s.__super__&&s.__super__.constructor}var o=i.length;while(o--)_.each(a(i[o],t,e),r)}function p(e,t,n,r){if(_.isObject(n)){var i=f[t];if(i&&i.event)return d(e["_"+t+"Events"],n,r),!0}}function d(e,t,n){_.each(t,function(t,r){_.isArray(t)?_.each(t,function(t){e.push([r,t,n])}):e.push([r,t,n])})}function v(e){if(!e||!e.data)throw new Error("Handlebars template compiled without data, use: Handlebars.compile(template, {data: true})");return e.data}function g(e){e.trigger("ready")}function E(e){b.push.apply(b,e),w=new RegExp("^(nested\\s+)?("+b.join("|")+")(?:\\s|$)")}function S(e,t){return function(n){var r=$(n.target).view({helper:!1});r&&r.cid===t&&(n.originalContext=this,e(n))}}function x(e,t){e+=t.originalName;var n=t.handler,r=typeof n=="function"?n:this[n];if(!r)throw new Error('Event "'+n+'" does not exist '+(this.name||this.cid)+":"+e);return _.bind(function(){try{r.apply(this,arguments)}catch(t){i.onException("thorax-exception: "+(this.name||this.cid)+":"+e,t)}},t.context||this)}function T(e,t,n){var r={originalName:e,handler:typeof t=="string"?this[t]:t};if(e.match(w)){var i=y.exec(e);r.nested=!!i[1],r.name=i[2],r.type="DOM",r.selector=i[3]}else r.name=e,r.type="view";return r.context=n,r}function k(e){while(e._helperName)e=e.parent;return e}function L(e){var t=_.pick(e,"fn","inverse","hash","data");return t.data=_.omit(e.data,"cid","view","yield"),t}function A(e,t){function n(e,t){return _.every(e,function(e,n){return t[n]===e})}return e._helperName!==t._helperName?!1:(e=e._helperOptions,t=t._helperOptions,e.args.length===t.args.length&&n(e.args,t.args)&&_.isEqual(_.keys(e.options),_.keys(t.options))&&_.every(e.options,function(r,i){return i==="data"||i==="hash"?n(e.options[i],t.options[i]):i==="fn"||i==="inverse"?t.options[i]===r||r&&_.has(r,"program")&&(t.options[i]||{}).program===r.program:t.options[i]===r}))}function O(e,t){function n(n,r){var i=this[e],s=a(this,t.$el);return n===i?this:(i&&this.unbindDataObject(i),n?(this[e]=n,t.loading&&t.loading.call(this),this.bindDataObject(e,n,_.extend({},this.options,r)),s.attr(t.cidAttrName,n.cid),n.trigger("set",n,i)):(this[e]=!1,t.change&&t.change.call(this,!1),s.removeAttr(t.cidAttrName)),this.trigger("change:data-object",e,n,i),t.setCallback&&t.setCallback.call(this,n,r),this)}t=f[e]=_.defaults({name:"_"+e+"Events",event:!0},t),t.ctor=function(){if(this[e]){var n=this[e];this[e]=null,this[t.set](n)}},i.View.prototype[t.set]=n}function M(e,t,n){var r=this;h(n,"_"+e+"Events",!0,function(e){r.listenTo(t,e[0],_.bind(P(e[1],r),e[2]||r))})}function D(e,t){e.load?e.load(function(){t&&t.success&&t.success(e)},t):e.fetch(t)}function P(e,t){return typeof e=="function"?e:t[e]}function H(e,t){t.cid=t.cid||_.uniqueId(e)}function j(e){var t=e&&this._objectOptionsByCid[e.cid];(!t||t&&t.render)&&this.render()}function X(e){e===this.collection&&this._objectOptionsByCid[this.collection.cid].render&&this.renderCollection()}function V(e){!J.call(this)&&e&&_.each(this._collectionRenderingEvents,function(t,n){this.listenTo(e,n,P(t,this))},this)}function J(){return this.collection&&this.$("["+z+'="'+this.collection.cid+'"]').length}function K(){this.itemFilter&&this.collection.forEach(function(e){Q.call(this,e)},this)}function Q(e){var t=this.getCollectionElement();this.itemFilter&&t.find("["+B+'="'+e.cid+'"]')[G.call(this,e)?"show":"hide"]()}function G(e){return this.itemFilter(e,this.collection.indexOf(e))}function Y(){var e=this.getCollectionElement();this.emptyClass&&e.removeClass(this.emptyClass),e.removeAttr(R),e.empty()}function Z(){var e=this.getCollectionElement();this.emptyClass&&e.addClass(this.emptyClass),e.attr(R,!0),this.appendEmpty()}function tt(e,t,n){var r=0,i=this;this.$("select,input,textarea",e.root||this.el).each(function(){if(!e.children&&i!==$(this).view({helper:!1}))return;this.type!=="button"&&this.type!=="cancel"&&this.type!=="submit"&&this.name&&this.name!==""&&(t.call(n||this,r,this),++r)})}function nt(e,t,n,r){var i,s=e,o=t.split("["),u=n.mode;for(var a=0;a<o.length-1;++a){i=o[a].replace("]","");if(!s[i]){if(u!=="serialize")return r.call(this,!1,i);s[i]={}}s=s[i]}i=o[o.length-1].replace("]",""),r.call(this,s,i)}function rt(){this.$("form").removeAttr("data-submit-wait")}function st(){++this._renderCount,this.$el.attr(it,this.cid)}function ot(){if(!this.$("["+it+'="'+this.cid+'"]')[0])throw new Error("No layout element found in "+(this.name||this.cid))}function ut(){return this.$("["+it+'="'+this.cid+'"]')[0]||this.el[0]||this.el}function at(){Backbone.history||(Backbone.history=new Backbone.History),Backbone.history.on("route",ft,this),this.on("destroyed",function(){Backbone.history.off("route",ft,this)})}function ft(e){this===e&&this.trigger.apply(this,["route"].concat(Array.prototype.slice.call(arguments,1)))}function ct(e){return function(){var t=_.toArray(arguments);t.unshift(e),this.parent.trigger.apply(this.parent,t)}}function pt(e){var t=k(this);if(!this[e]){var n=t[e];n&&(this[e]=n)}}function gt(e){var t=$(e.target),n=t.view({helper:!1}),r=t.attr(dt),i=t.attr(vt),s=!1;r&&(s=n[r].call(n,e)),i&&n.trigger(i,e),t.tagName==="A"&&s===!1&&e.preventDefault()}function bt(){wt(),yt=i._fastClickEventName||"click",$(document).on(yt,mt,gt)}function wt(){yt&&$(document).off(yt,mt,gt)}function Nt(e,t){function i(){if(n===Backbone.history.getFragment())return;r=!0,o.cancel(),t&&t()}function s(){Backbone.history.off("route",i),r||e.apply(this,arguments)}var n=Backbone.history.getFragment(),r=!1;Backbone.history.on("route",i);var o=_.bind(s,this);return o.cancel=function(){Backbone.history.off("route",i)},o}function Ct(e,t,n){if(this.isPopulated())return e(this);arguments.length===2&&typeof t!="function"&&_.isObject(t)&&(n=t,t=!1);var r=this,i=!1,s=Nt(_.bind(e,r),function(){i=!0,r._request&&(r._aborted=!0,r._request.abort()),t&&t.call(r,!1)});this.fetch(_.defaults({success:s,error:t&&function(){i||t.apply(r,[!0].concat(_.toArray(arguments)))},complete:function(){s.cancel()}},n))}function kt(e,t){e.resetQueue&&(this.fetchQueue=undefined),this.fetchQueue?this.fetchQueue.push(e):(this.fetchQueue=[e],e=_.defaults({success:Lt(this,this.fetchQueue,"success"),error:Lt(this,this.fetchQueue,"error"),complete:Lt(this,this.fetchQueue,"complete")},e),t.call(this,e))}function Lt(e,t,n){return function(){var r=arguments;_.each(t,function(e){e[n]&&e[n].apply(this,r)},this),e.fetchQueue===t&&(e.fetchQueue=undefined)}}$.fn.forEach||($.fn.forEach=function(e,t){$.fn.each.call(this,function(n){e.call(t||this,this,n)})});var e="data-view-name",t="data-view-cid",n="data-view-helper",r={},i=this.Thorax={VERSION:"2.0.0b6",templatePathPrefix:"",templates:{},Views:{},onException:function(e,t){throw t}};i.View=Backbone.View.extend({constructor:function(){var e=Backbone.View.apply(this,arguments);return _.each(f,function(t){t.ctor&&t.ctor.call(this,e)},this),e},_configure:function(e){var t=this;this._objectOptionsByCid={},this._boundDataObjectsByCid={},_.each(f,function(e){t[e.name]=[]}),r[this.cid]=this,this.children={},this._renderCount=0,_.extend(this,e||{}),s.call(this),typeof this.template=="string"?this.template=Handlebars.compile(this.template,{data:!0}):this.name&&!this.template&&(this.template=i.Util.getTemplate(this.name,!0)),_.each(f,function(e){e.configure&&e.configure.call(this)},this)},setElement:function(){var n=Backbone.View.prototype.setElement.apply(this,arguments);return this.name&&this.$el.attr(e,this.name),this.$el.attr(t,this.cid),n},_addChild:function(e){return this.children[e.cid]=e,e.parent||(e.parent=this),this.trigger("child",e),e},_removeChild:function(e){return delete this.children[e.cid],e.parent=null,e},destroy:function(e){e=_.defaults(e||{},{children:!0}),this.trigger("destroyed"),delete r[this.cid],_.each(this.children,function(t){this._removeChild(t),e.children&&t.destroy()},this),this.freeze&&this.freeze()},render:function(e){this._previousHelpers=_.filter(this.children,function(e){return e._helperOptions});var t={};_.each(this.children,function(e,n){e._helperOptions||(t[n]=e)}),this.children=t;if(typeof e=="undefined"||!_.isElement(e)&&!i.Util.is$(e)&&(!e||!e.el)&&typeof e!="string"&&typeof e!="function"){if(!this.template){this.name&&(this.template=i.Util.getTemplate(this.name,!0));if(!this.template)throw new Error("View "+(this.name||this.cid)+".render() was called with no content and no template set on the view.")}e=this.renderTemplate(this.template)}else typeof e=="function"&&(e=this.renderTemplate(e));return _.each(this._previousHelpers,function(e){e.destroy(),e.parent=undefined}),this._previousHelpers=undefined,this.html(e&&e.el||e&&e.string||e),++this._renderCount,this.trigger("rendered"),e},context:function(){return this.model&&this.model.attributes||{}},_getContext:function(){return _.extend({},this,a(this,"context")||{})},_getData:function(e){return{view:this,cid:_.uniqueId("t"),yield:function(){return e.fn&&e.fn(e)}}},_getHelpers:function(){return this.helpers?_.extend({},Handlebars.helpers,this.helpers):Handlebars.helpers},renderTemplate:function(e,t,n){var r;t=t||this._getContext(),typeof e=="function"?r=e:r=i.Util.getTemplate(e);if(!r){if(n)return"";throw new Error("Unable to find template "+e)}return r(t,{helpers:this._getHelpers(),data:this._getData(t)})},ensureRendered:function(){!this._renderCount&&this.render()},appendTo:function(e){this.ensureRendered(),$(e).append(this.el),this.trigger("ready")},html:function(e){function t(t){return t.el.innerHTML="",t.$el.append(e)}if(typeof e=="undefined")return this.el.innerHTML;this.trigger("before:append");var n;if(this.collection&&this._objectOptionsByCid[this.collection.cid]&&this._renderCount){var r=this.getCollectionElement();n=t(this),r.attr("data-view-cid")||this.getCollectionElement().replaceWith(r)}else n=t(this);return this.trigger("append"),n},_anchorClick:function(e){var t=$(e.currentTarget),n=t.attr("href");return n&&(n[0]==="#"||n[0]==="/"&&n[1]!=="/")?(Backbone.history.navigate(n,{trigger:!0}),!1):!0}}),i.View.extend=function(){l(this);var e=Backbone.View.extend.apply(this,arguments);return e.__parent__=this,c(e),e},o(i.View,i.Views),$.fn.view=function(e){e=_.defaults(e||{},{helper:!0});var i="["+t+"]";e.helper||(i+=":not(["+n+"])");var s=$(this).closest(i);return s&&r[s.attr(t)]||!1};var f={};i.Util={getViewInstance:function(e,t){t=t||{},t["class"]&&(t.className=t["class"]),t.tag&&(t.tagName=t.tag);if(typeof e=="string"){var n=u(i,"Views",e,!1);return n.cid?_.extend(n,t||{}):new n(t)}return typeof e=="function"?new e(t):e},getTemplate:function(e,t){var n=i.templatePathPrefix,r;n&&e.substr(0,n.length)!==n&&(e=n+e),e=e.replace(/\.handlebars$/,""),r=i.templates[e],r||(e+=".handlebars",r=i.templates[e]);if(r&&typeof r=="string")r=i.templates[e]=Handlebars.compile(r,{data:!0});else if(!r&&!t)throw new Error("templates: "+e+" does not exist.");return r},is$:function(e){return typeof e=="object"&&"length"in e},expandToken:function(e,t){if(e&&e.indexOf&&e.indexOf("{{")>=0){var n=/(?:\{?[^{]+)|(?:\{\{([^}]+)\}\})/g,r,i=[];function s(e,t){if(e.match(/^("|')/)&&e.match(/("|')$/))return e.replace(/(^("|')|('|")$)/g,"");var n=e.split("."),r=n.length;for(var i=0;t&&i<r;i++)n[i]!=="this"&&(t=t[n[i]]);return t}while(r=n.exec(e))if(r[1]){var o=r[1].split(/\s+/);if(o.length>1){var u=o.shift();o=_.map(o,function(e){return s(e,t)}),Handlebars.helpers[u]?i.push(Handlebars.helpers[u].apply(t,o)):i.push(r[0])}else i.push(s(o[0],t))}else i.push(r[0]);e=i.join("")}return e},tag:function(e,t,n){var r=_.omit(e,"tag","tagName"),s=e.tag||e.tagName||"div";return"<"+s+" "+_.map(r,function(e,t){if(typeof e=="undefined"||t==="expand-tokens")return"";var r=e;return n&&(r=i.Util.expandToken(e,n)),t+'="'+Handlebars.Utils.escapeExpression(r)+'"'}).join(" ")+">"+(typeof t=="undefined"?"":t)+"</"+s+">"},htmlAttributesFromOptions:function(e){var t={};return e.tag&&(t.tag=e.tag),e.tagName&&(t.tagName=e.tagName),e["class"]&&(t["class"]=e["class"]),e.id&&(t.id=e.id),t}},i.Mixins={},f.mixins={name:"mixins",configure:function(){_.each(this.constructor.mixins,this.mixin,this),_.each(this.mixins,this.mixin,this)}},_.extend(i.View,{mixin:function(e){l(this),this.mixins.push(e)},registerMixin:function(e,t,n){i.Mixins[e]=[t,n]}}),i.View.prototype.mixin=function(e){this._appliedMixins||(this._appliedMixins=[]);if(this._appliedMixins.indexOf(e)===-1){this._appliedMixins.push(e);if(typeof e=="function")e.call(this);else{var t=i.Mixins[e];_.extend(this,t[1]),_.isArray(t[0])?t[0][0].apply(this,t[0][1]):t[0].apply(this,_.toArray(arguments).slice(1))}}};var m=i.View.prototype.on;f.event={name:"_events",configure:function(){var e=this;h(this.constructor,"_events",!0,function(t){e.on.apply(e,t)}),h(this,"events",!1,function(t,n){e.on(n,t,e)})}},_.extend(i.View,{on:function(e,t){return l(this),p(this,e,t)?this:(typeof e=="object"?_.each(e,function(e,t){this.on(t,e)},this):_.isArray(t)?_.each(t,function(t){this._events.push([e,t])},this):this._events.push([e,t]),this)}}),_.extend(i.View.prototype,{freeze:function(e){_.each(this._boundDataObjectsByCid,this.unbindDataObject,this),e=_.defaults(e||{},{dom:!0,children:!0}),this.off(),e.dom&&this.undelegateEvents(),this.trigger("freeze"),e.children&&_.each(this.children,function(t){t.freeze(e)},this)},on:function(e,t,n){return p(this,e,t,n)?this:(typeof e=="object"&&arguments.length<3?_.each(e,function(e,n){this.on(n,e,t||this)},this):_.each(_.isArray(t)?t:[t],function(t){var r=T.call(this,e,t,n||this);r.type==="DOM"?(this._eventsToDelegate||(this._eventsToDelegate=[]),this._eventsToDelegate.push(r)):this._addEvent(r)},this),this)},delegateEvents:function(e){this.undelegateEvents(),e&&(_.isFunction(e)&&(e=e.call(this)),this._eventsToDelegate=[],this.on(e)),this._eventsToDelegate&&_.each(this._eventsToDelegate,this._addEvent,this)},_addEvent:function(e){if(e.type==="view")_.each(e.name.split(/\s+/),function(t){m.call(this,t,x.call(this,"view-event:",e))},this);else{var t=x.call(this,"dom-event:",e);e.nested||(t=S(t,this.cid));if(e.selector){var n=e.name+".delegateEvents"+this.cid;this.$el.on(n,e.selector,t)}else this.$el.on(e.name,t)}}}),i.View.on("ready",function(){this._isReady||(this._isReady=!0,_.each(this.children,g),this.on("child",g))});var y=/^(nested\s+)?(\S+)(?:\s+(.+))?/,b=[],w;E(["mousedown","mouseup","mousemove","mouseover","mouseout","touchstart","touchend","touchmove","click","dblclick","keyup","keydown","keypress","submit","change","focus","blur"]);var N="data-view-tmp",C={};i.HelperView=i.View.extend({_ensureElement:function(){i.View.prototype._ensureElement.apply(this,arguments),this.$el.attr(n,this._helperName)},_getContext:function(){return this.parent._getContext.apply(this.parent,arguments)}}),Handlebars.registerViewHelper=function(e,t,n){arguments.length===2&&(t.factory?n=t.callback:(n=t,t=i.HelperView)),Handlebars.registerHelper(e,function(){var r=_.toArray(arguments),s=r.pop(),o=v(s).view,u={template:s.fn||Handlebars.VM.noop,inverse:s.inverse,options:s.hash,declaringView:o,parent:k(o),_helperName:e,_helperOptions:{options:L(s),args:_.clone(r)}};s.hash.id&&(u.id=s.hash.id),s.hash["class"]&&(u.className=s.hash["class"]),s.hash.className&&(u.className=s.hash.className),s.hash.tag&&(u.tagName=s.hash.tag),s.hash.tagName&&(u.tagName=s.hash.tagName);var a=_.find(o._previousHelpers,function(e){return A(u,e)});if(!a){if(t.factory){a=t.factory(r,u);if(!a)return"";a._helperName=u._helperName,a._helperOptions=u._helperOptions}else a=new t(u);r.push(a),o._addChild(a),o.trigger.apply(o,["helper",e].concat(r)),o.trigger.apply(o,["helper:"+e].concat(r)),n&&n.apply(this,r)}else o._previousHelpers=_.without(o._previousHelpers,a),o.children[a.cid]=a;var f=i.Util.htmlAttributesFromOptions(s.hash);f[N]=a.cid;var l=s.hash["expand-tokens"];return new Handlebars.SafeString(i.Util.tag(f,"",l?this:null))});var r=Handlebars.helpers[e];return r},i.View.on("append",function(e,t){(e||this.$el).find("["+N+"]").forEach(function(e){var n=e.getAttribute(N),r=this.children[n];r&&(C[n]?(r.render(C[n]),delete C[n]):r.ensureRendered(),$(e).replaceWith(r.el),t&&t(r.el))},this)}),_.extend(i.View.prototype,{bindDataObject:function(e,t,n){if(this._boundDataObjectsByCid[t.cid])return!1;H(e,t),this._boundDataObjectsByCid[t.cid]=t;var n=this._modifyDataObjectOptions(t,_.extend({},f[e].defaultOptions,n));return this._objectOptionsByCid[t.cid]=n,M.call(this,e,t,this.constructor),M.call(this,e,t,this),t.shouldFetch&&(t.shouldFetch(n)?D(t,n):f[e].change&&f[e].change.call(this,t,n)),!0},unbindDataObject:function(e){return this._boundDataObjectsByCid[e.cid]?(delete this._boundDataObjectsByCid[e.cid],e.trigger("freeze"),this.stopListening(e),delete this._objectOptionsByCid[e.cid],!0):!1},_modifyDataObjectOptions:function(e,t){return t}});var B="data-model-cid";i.Model=Backbone.Model.extend({isEmpty:function(){return!this.isPopulated()},isPopulated:function(){var e=_.clone(this.attributes),t=a(this,"defaults")||{};for(var n in t){if(e[n]!=t[n])return!0;delete e[n]}var r=_.keys(e);return r.length>1||r.length===1&&r[0]!==this.idAttribute},shouldFetch:function(e){var t;try{t=a(this,"url")}catch(n){t=!1}return e.fetch&&!!t&&!this.isPopulated()}}),i.Models={},o(i.Model,i.Models),O("model",{set:"setModel",defaultOptions:{render:!0,fetch:!0,success:!1,errors:!0},change:j,$el:"$el",cidAttrName:B}),i.View.on({model:{error:function(e,t){this._objectOptionsByCid[e.cid].errors&&this.trigger("error",t,e)},change:function(e){j.call(this,e)}}}),$.fn.model=function(e){var t=$(this),n=t.closest("["+B+"]"),r=n&&n.attr(B);if(r){var e=e||t.view();if(e&&e.model&&e.model.cid===r)return e.model||!1;var i=t.collection(e);if(i)return i.find(function(e){return e.cid===r})||!1}return!1};var F=Backbone.Collection.prototype.fetch,I=Backbone.Collection.prototype.reset,q="data-collection-cid",R="data-collection-empty",U="data-collection-element",z="data-collection-primary",W=1;i.Collection=Backbone.Collection.extend({model:i.Model||Backbone.Model,isEmpty:function(){return this.length>0?!1:this.length===0&&this.isPopulated()},isPopulated:function(){return this._fetched||this.length>0||!this.length&&!a(this,"url")},shouldFetch:function(e){return e.fetch&&!!a(this,"url")&&!this.isPopulated()},fetch:function(e){e=e||{};var t=e.success;return e.success=function(e,n){e._fetched=!0,t&&t(e,n)},F.apply(this,arguments)},reset:function(e,t){return this._fetched=!!e,I.call(this,e,t)}}),i.Collections={},o(i.Collection,i.Collections),O("collection",{set:"setCollection",setCallback:V,defaultOptions:{render:!0,fetch:!0,success:!1,errors:!0},change:X,$el:"getCollectionElement",cidAttrName:q}),_.extend(i.View.prototype,{_collectionSelector:"["+U+"]",appendItem:function(e,t,n){if(!e)return;var r,i=this.getCollectionElement();n=n||{},t&&t.el&&(t=i.children().indexOf(t.el)+1),e.el||typeof e=="string"?(r=e,e=!1):(t=t||this.collection.indexOf(e)||0,r=this.renderItem(e,t));if(r){r.cid&&this._addChild(r),typeof r=="string"&&!r.match(/^\s*</m)&&(r="<div>"+r+"</div>");var s=r.el?[r.el]:_.filter($(r),function(e){return e.nodeType===W});e&&$(s).attr(B,e.cid);var o=t>0?this.collection.at(t-1):!1;if(!o)i.prepend(s);else{var u=i.find("["+B+'="'+o.cid+'"]').last();u.after(s)}this.trigger("append",null,function(t){t.setAttribute(B,e.cid)}),n.silent||(this.trigger("rendered:item",this,this.collection,e,s,t),Q.call(this,e))}return r},updateItem:function(e){this.removeItem(e),this.appendItem(e)},removeItem:function(e){var n=this.getCollectionElement(),r=n.find("["+B+'="'+e.cid+'"]');if(!r.length)return!1;r.remove();var i=r.attr(t),s=this.children[i];return s&&(this._removeChild(s),s.destroy()),!0},renderCollection:function(){this.ensureRendered();if(J.call(this))return;this.collection?(this.collection.isEmpty()?Z.call(this):(Y.call(this),this.collection.forEach(function(e,t){this.appendItem(e,t)},this)),this.trigger("rendered:collection",this,this.collection),K.call(this)):Z.call(this)},emptyClass:"empty",renderEmpty:function(){if(this.emptyView){var e={};this.emptyTemplate&&(e.template=this.emptyTemplate);var t=i.Util.getViewInstance(this.emptyView,e);return t.ensureRendered(),t}return this.emptyTemplate||(this.emptyTemplate=i.Util.getTemplate(this.name+"-empty",!0)),this.emptyTemplate&&this.renderTemplate(this.emptyTemplate)},renderItem:function(e,t){if(this.itemView){var n={model:e};this.itemTemplate&&(n.template=this.itemTemplate);var r=i.Util.getViewInstance(this.itemView,n);return r.ensureRendered(),r}return this.itemTemplate||(this.itemTemplate=i.Util.getTemplate(this.name+"-item")),this.renderTemplate(this.itemTemplate,this.itemContext(e,t))},itemContext:function(e){return e.attributes},appendEmpty:function(){var e=this.getCollectionElement();e.empty();var t=this.renderEmpty();t&&this.appendItem(t,0,{silent:!0}),this.trigger("rendered:empty",this,this.collection)},getCollectionElement:function(){var e=this.$(this._collectionSelector);return e.length===0?this.$el:e},_collectionRenderingEvents:{reset:X,sort:X,filter:function(){K.call(this)},change:function(e){!this.itemView&&this.updateItem(e),Q.call(this,e)},add:function(e){var t=this.getCollectionElement();this.collection.length===1&&t.length&&Y.call(this);if(t.length){var n=this.collection.indexOf(e);this.appendItem(e,n)}},remove:function(e){var t=this.getCollectionElement();this.removeItem(e),this.collection.length===0&&t.length&&Z.call(this)}}}),i.View.on({collection:{error:function(e,t){this._objectOptionsByCid[e.cid].errors&&this.trigger("error",t,e)}}}),$.fn.collection=function(e){if(e&&e.collection)return e.collection;var t=$(this),n=t.closest("["+q+"]"),r=n&&n.attr(q);if(r){e=t.view();if(e)return e.collection}return!1},f.model.defaultOptions.populate=!0;var et=f.model.change;f.model.change=function(){et.apply(this,arguments);var e=this.model&&this._objectOptionsByCid[this.model.cid];e&&e.populate&&this.populate(this.model.attributes,e.populate===!0?{}:e.populate)},f.model.defaultOptions.populate=!0,_.extend(i.View.prototype,{serialize:function(){var e,t,n;for(var r=0;r<arguments.length;++r)typeof arguments[r]=="function"?e=arguments[r]:typeof arguments[r]=="object"&&("stopPropagation"in arguments[r]&&"preventDefault"in arguments[r]?n=arguments[r]:t=arguments[r]);if(n&&!this._preventDuplicateSubmission(n))return;t=_.extend({set:!0,validate:!0,children:!0,silent:!0},t||{});var i=t.attributes||{},s=this,o=[];tt.call(this,t,function(){var e=s._getInputValue(this,t,o);typeof e!="undefined"&&nt.call(this,i,this.name,{mode:"serialize"},function(t,n){t[n]?_.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]:t[n]=e})}),this.trigger("serialize",i,t);if(t.validate){var u=this.validateInput(i);u&&u.length&&(o=o.concat(u)),this.trigger("validate",i,o,t);if(o.length){this.trigger("error",o);return}}return t.set&&this.model&&!this.model.set(i,{silent:t.silent})?!1:(e&&e.call(this,i,_.bind(rt,this)),i)},_preventDuplicateSubmission:function(e,t){e.preventDefault();var n=$(e.target);return(e.target.tagName||"").toLowerCase()!=="form"&&(n=$(e.target).closest("form")),n.attr("data-submit-wait")?!1:(n.attr("data-submit-wait","true"),t&&t.call(this,e),!0)},populate:function(e,t){t=_.extend({children:!0},t||{});var n,e=e||this._getContext();tt.call(this,t,function(){nt.call(this,e,this.name,{mode:"populate"},function(e,t){e&&typeof (n=e[t])!="undefined"&&(this.type==="checkbox"&&_.isBoolean(n)?this.checked=n:this.type==="checkbox"||this.type==="radio"?this.checked=n==this.value:this.value=n)})}),this.trigger("populate",e)},validateInput:function(){},_getInputValue:function(e){if(e.type!=="checkbox"&&e.type!=="radio"){if(e.multiple===!0){var t=[];return $("option",e).each(function(){this.selected&&t.push(this.value)}),t}return e.value}if(e.checked)return e.value}}),i.View.on({error:function(){rt.call(this),this.model&&this.model.previousAttributes&&this.model.set(this.model.previousAttributes(),{silent:!0})},deactivated:function(){rt.call(this)}});var it="data-layout-cid";i.LayoutView=i.View.extend({render:function(e){var t;this.name&&(t=i.Util.getTemplate(this.name,!0));if(e||this.template||t){var n=i.View.prototype.render.call(this,e||this.template||t);return ot.call(this),n}st.call(this)},setView:function(e,t){t=_.extend({scroll:!0,destroy:!0},t||{}),typeof e=="string"&&(e=new(i.Util.registryGet(i,"Views",e,!1))),this.ensureRendered();var n=this._view;return e===n?!1:(t.destroy&&e&&(e._shouldDestroyOnNextSetView=!0),this.trigger("change:view:start",e,n,t),n&&(this._removeChild(n),n.$el.remove(),n.trigger("deactivated",t),n._shouldDestroyOnNextSetView&&n.destroy()),e?(e.trigger("activated",t),this._addChild(e),this._view=e,this._view.appendTo(ut.call(this))):this._view=undefined,this.trigger("change:view:end",e,n,t),e)},getView:function(){return this._view}}),Handlebars.registerHelper("layout",function(e){return e.hash[it]=v(e).view.cid,new Handlebars.SafeString(i.Util.tag.call(this,e.hash,"",this))}),i.Router=Backbone.Router.extend({constructor:function(){var e=i.Router.__super__.constructor.apply(this,arguments);return at.call(this),e},route:function(e,t,n){return n||(n=this[t]),Backbone.Router.prototype.route.call(this,e,t,function(){return this.trigger.apply(this,["route:before",e,t].concat(Array.prototype.slice.call(arguments))),n.apply(this,arguments)})}}),i.Routers={},o(i.Router,i.Routers),i.CollectionHelperView=i.HelperView.extend({events:{"rendered:item":ct("rendered:item"),"rendered:collection":ct("rendered:collection"),"rendered:empty":ct("rendered:empty")},constructor:function(e){_.each(lt,function(t,n){if(e.options[n]){var r=e.options[n];if(t==="itemTemplate"||t==="emptyTemplate")r=i.Util.getTemplate(r);e[t]=r}}),!e.itemTemplate&&e.template&&e.template!==Handlebars.VM.noop&&(e.itemTemplate=e.template,e.template=Handlebars.VM.noop),!e.emptyTemplate&&e.inverse&&e.inverse!==Handlebars.VM.noop&&(e.emptyTemplate=e.inverse,e.inverse=Handlebars.VM.noop),!e.template&&(e.template=Handlebars.VM.noop);var t=i.HelperView.call(this,e);return this.parent.name&&(this.emptyTemplate||(this.emptyTemplate=i.Util.getTemplate(this.parent.name+"-empty",!0)),this.itemTemplate||(this.itemTemplate=i.Util.getTemplate(this.parent.name+"-item",!0))),t},itemContext:function(){return this.parent.itemContext.apply(this.parent,arguments)},setAsPrimaryCollectionHelper:function(e){this.$el.attr(z,e.cid),_.each(ht,function(e){pt.call(this,e)},this),this.parent.itemFilter&&(this.itemFilter=function(){return this.parent.itemFilter.apply(this.parent,arguments)})}});var lt={"item-template":"itemTemplate","empty-template":"emptyTemplate","item-view":"itemView","empty-view":"emptyView","empty-class":"emptyClass"},ht=["itemTemplate","itemView","emptyTemplate","emptyView"];Handlebars.registerViewHelper("collection",i.CollectionHelperView,function(e,t){arguments.length===1&&(t=e,e=t.declaringView.collection),e&&e===t.declaringView.collection&&(H("collection",e),t.setAsPrimaryCollectionHelper(e)),e===t.declaringView.collection&&t.$el.attr(U,"true"),e&&t.setCollection(e)}),Handlebars.registerHelper("collection-element",function(e){return e.hash.tag=e.hash.tag||e.hash.tagName||"div",e.hash[U]=!0,new Handlebars.SafeString(i.Util.tag.call(this,e.hash,"",this))}),Handlebars.registerViewHelper("empty",function(e,t){var n,r;arguments.length===1&&(t=e,e=!1,r=!0);var i=t.render;t.render=function(){return r?n=!this.parent.model||this.parent.model.isEmpty():n=!e||e.isEmpty(),n?(this.parent.trigger("rendered:empty",this,e),i.call(this,this.template)):i.call(this,this.inverse)};var s=_.bind(t.render,t);r?(t.listenTo(t.parent,"change:data-object",function(e,n,r){e==="model"&&(r&&t.stopListening(r),n&&t.listenTo(n,"change",s),s())}),t.parent.model&&t.listenTo(t.parent.model,"change",s)):e&&(t.listenTo(e,"remove",function(){e.length===0&&s()}),t.listenTo(e,"add",function(){e.length===1&&s()}),t.listenTo(e,"reset",s)),s()}),Handlebars.registerHelper("template",function(e,t){var n=_.extend({fn:t&&t.fn},this,t?t.hash:{}),r=v(t).view.renderTemplate(e,n);return new Handlebars.SafeString(r)}),Handlebars.registerHelper("yield",function(e){return v(e).yield&&e.data.yield()}),Handlebars.registerHelper("url",function(e){var t;if(arguments.length>2)t=_.map(_.head(arguments,arguments.length-1),encodeURIComponent).join("/");else{var n=arguments[1],r=n&&n.hash||n;r&&r["expand-tokens"]?t=i.Util.expandToken(e,this):t=e}return(Backbone.history._hasPushState?Backbone.history.options.root:"#")+t}),Handlebars.registerViewHelper("view",{factory:function(e,t){var n=e.length>=1?e[0]:i.View;return i.Util.getViewInstance(n,t.options)},callback:function(){var e=arguments[arguments.length-1],t=e._helperOptions.options,n=e.cid;t.fn&&(C[n]=t.fn)}});var dt="data-call-method",vt="data-trigger-event";Handlebars.registerHelper("button",function(e,t){arguments.length===1&&(t=e,e=t.hash.method);var n=t.hash,r=n["expand-tokens"];delete n["expand-tokens"];if(!e&&!t.hash.trigger)throw new Error("button helper must have a method name as the first argument or a 'trigger', or a 'method' attribute specified.");return n.tag=n.tag||n.tagName||"button",n.trigger&&(n[vt]=n.trigger),delete n.trigger,e&&(n[dt]=e),new Handlebars.SafeString(i.Util.tag(n,t.fn?t.fn(this):"",r?this:null))}),Handlebars.registerHelper("link",function(){var e=_.toArray(arguments),t=e.pop(),n=t.hash,r=e.length===0?[n.href]:e,s=n["expand-tokens"];delete n["expand-tokens"];if(!r[0])throw new Error("link helper requires an href as the first argument or an 'href' attribute");return r.push(t),n.href=Handlebars.helpers.url.apply(this,r),n.tag=n.tag||n.tagName||"a",n.trigger&&(n[vt]=t.hash.trigger),delete n.trigger,n[dt]="_anchorClick",new Handlebars.SafeString(i.Util.tag(n,t.fn?t.fn(this):"",s?this:null))});var mt="["+dt+"], ["+vt+"]",yt;$(document).ready(function(){i._fastClickEventName||bt()});var Et="data-element-tmp";Handlebars.registerHelper("element",function(e,t){var n=_.uniqueId("element"),r=v(t).view,s=i.Util.htmlAttributesFromOptions(t.hash);return s[Et]=n,r._elementsByCid||(r._elementsByCid={}),r._elementsByCid[n]=e,new Handlebars.SafeString(i.Util.tag(s))}),i.View.on("append",function(e,t){(e||this.$el).find("["+Et+"]").forEach(function(e){var n=$(e),r=n.attr(Et),i=this._elementsByCid[r];_.isFunction(i)&&(i=i.call(this)),n.replaceWith(i),t&&t(i)},this)}),Handlebars.registerHelper("super",function(e){var t=v(e).view,n=t.constructor&&t.constructor.__super__;if(n){var r=n.template;if(!r){if(!n.name)throw new Error("Cannot use super helper when parent has no name or template.");r=i.Util.getTemplate(n.name,!1)}return typeof r=="string"&&(r=Handlebars.compile(r,{data:!0})),new Handlebars.SafeString(r(this,e))}return""});var St="load:start",xt="load:end",Tt;i.setRootObject=function(e){Tt=e},i.loadHandler=function(e,t,n){var r=_.uniqueId();return function(s,o,u){function l(){if(f.timeout&&!f.run)return;var t=a._loadingTimeoutDuration!==undefined?a._loadingTimeoutDuration:i.View.prototype._loadingTimeoutDuration;f.timeout=setTimeout(function(){try{f.run=!0,e.call(a,f.message,f.background,f)}catch(t){i.onException("loadStart",t)}},t*1e3)}var a=n||this;a._loadInfo=a._loadInfo||[];var f=a._loadInfo[r];f?(clearTimeout(f.endTimeout),f.message=s,!o&&f.background&&(f.background=!1,l())):(f=a._loadInfo[r]=_.extend({events:[],timeout:0,message:s,background:!!o},Backbone.Events),l()),f.events.push(u),u.on(xt,function c(){u.off(xt,c);var e=a._loadingTimeoutEndDuration;e===void 0&&(e=i.View.prototype._loadingTimeoutEndDuration);var n=f.events,s=n.indexOf(u);s>=0&&n.splice(s,1),n.length||(f.endTimeout=setTimeout(function(){try{if(!n.length){var e=f.run;e&&(t.call(a,f.background,f),f.trigger(xt,f)),clearTimeout(f.timeout),f=a._loadInfo[r]=undefined}}catch(s){i.onException("loadEnd",s)}},e*1e3))})}},i.forwardLoadEvents=function(e,t,n){function r(i,s,o){n&&e.off(St,r),t.trigger(St,i,s,o)}return e.on(St,r),{off:function(){e.off(St,r)}}},i.mixinLoadable=function(e,t){_.extend(e,{_loadingClassName:"loading",_loadingTimeoutDuration:.33,_loadingTimeoutEndDuration:.1,onLoadStart:function(e,n,r){var i=t?this.parent:this;!i.nonBlockingLoad&&!n&&Tt&&Tt!==this&&Tt.trigger(St,e,n,r),$(i.el).addClass(i._loadingClassName),i._loadingCallbacks&&_.each(i._loadingCallbacks,function(e){e()})},onLoadEnd:function(){var e=t?this.parent:this;$(e.el).removeClass(e._loadingClassName),e._loadingCallbacks&&_.each(e._loadingCallbacks,function(e){e()})}})},i.mixinLoadableEvents=function(e,t){_.extend(e,{loadStart:function(e,n){var r=t?this.parent:this;r.trigger(St,e,n,r)},loadEnd:function(){var e=t?this.parent:this;e.trigger(xt,e)}})},i.mixinLoadable(i.View.prototype),i.mixinLoadableEvents(i.View.prototype),i.sync=function(e,t,n){var r=this,i=n.complete;return n.complete=function(){r._request=undefined,r._aborted=!1,i&&i.apply(this,arguments)},this._request=Backbone.sync.apply(this,arguments),this._request};var At=[];i.Model&&At.push(i.Model),i.Collection&&At.push(i.Collection),_.each(At,function(e){var t=e.prototype.fetch;i.mixinLoadableEvents(e.prototype,!1),_.extend(e.prototype,{sync:i.sync,fetch:function(e){e=e||{};var n=this,r=e.complete;return e.complete=function(){r&&r.apply(this,arguments),n.loadEnd()},n.loadStart(undefined,e.background),kt.call(this,e||{},t)},load:function(e,t,n){arguments.length===2&&typeof t!="function"&&(n=t,t=!1),n=n||{},!n.background&&!this.isPopulated()&&Tt&&i.forwardLoadEvents(this,Tt,!0),Ct.call(this,e,t,n)}})}),i.Util.bindToRoute=Nt,i.Router&&(i.Router.bindToRoute=i.Router.prototype.bindToRoute=Nt),i.View.prototype._modifyDataObjectOptions=function(e,t){return t.ignoreErrors=this.ignoreFetchError,t.background=this.nonBlockingLoad,t},i.HelperView.prototype._modifyDataObjectOptions=function(e,t){return t.ignoreErrors=this.parent.ignoreFetchError,t.background=this.parent.nonBlockingLoad,t},f.collection.loading=function(){var e=this.loadingView,t=this.loadingTemplate,n=this.loadingPlacement;if(e||t){var r=i.loadHandler(_.bind(function(){var r;this.collection.length===0&&this.$el.empty();if(e){var s=i.Util.getViewInstance(e,{collection:this.collection});this._addChild(s),t?s.render(t):s.render(),r=s}else r=this.renderTemplate(t);var o=n?n.call(this):this.collection.length;this.appendItem(r,o),this.$el.children().eq(o).attr("data-loading-element",this.collection.cid)},this),_.bind(function(){this.$el.find('[data-loading-element="'+this.collection.cid+'"]').remove()},this),this.collection);this.listenTo(this.collection,"load:start",r)}},typeof lt!="undefined"&&(lt["loading-template"]="loadingTemplate",lt["loading-view"]="loadingView",lt["loading-placement"]="loadingPlacement"),i.View.on({"load:start":i.loadHandler(function(e,t,n){this.onLoadStart(e,t,n)},function(e,t){this.onLoadEnd(t)}),collection:{"load:start":function(e,t,n){this.trigger(St,e,t,n)}},model:{"load:start":function(e,t,n){this.trigger(St,e,t,n)}}}),Handlebars.registerViewHelper("loading",function(e){var t=e.render;e.render=function(){return e.parent.$el.hasClass(e.parent._loadingClassName)?t.call(this,e.fn):t.call(this,e.inverse)};var n=_.bind(e.render,e);e.parent._loadingCallbacks=e.parent._loadingCallbacks||[],e.parent._loadingCallbacks.push(n),e.on("freeze",function(){e.parent._loadingCallbacks=_.without(e.parent._loadingCallbacks,n)}),e.render()});var Ot=/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());Ot&&i.View.on("before:append",function(){this._renderCount>0&&(_.each(this._elementsByCid,function(e){$(e).remove()}),_.each(this.children,function(e){e.$el.remove()}))})}()