(function(a,d){function b(c){var e=K[c]={},j,r,c=c.split(/\s+/);for(j=0,r=c.length;j<r;j++)e[c[j]]=!0;return e}function h(c,l,j){if(j===d&&c.nodeType===1)if(j="data-"+l.replace(X,"-$1").toLowerCase(),j=c.getAttribute(j),typeof j==="string"){try{j=j==="true"?!0:j==="false"?!1:j==="null"?null:e.isNumeric(j)?parseFloat(j):N.test(j)?e.parseJSON(j):j}catch(r){}e.data(c,l,j)}else j=d;return j}function p(c){for(var l in c)if(!(l==="data"&&e.isEmptyObject(c[l]))&&l!=="toJSON")return!1;return!0}function m(c,
l,j){var r=l+"defer",a=l+"queue",d=l+"mark",b=e._data(c,r);b&&(j==="queue"||!e._data(c,a))&&(j==="mark"||!e._data(c,d))&&setTimeout(function(){!e._data(c,a)&&!e._data(c,d)&&(e.removeData(c,r,!0),b.fire())},0)}function g(){return!1}function o(){return!0}function v(c,l,j){l=l||0;if(e.isFunction(l))return e.grep(c,function(c,e){return!!l.call(c,e,c)===j});else if(l.nodeType)return e.grep(c,function(c){return c===l===j});else if(typeof l==="string"){var r=e.grep(c,function(c){return c.nodeType===1});
if(La.test(l))return e.filter(l,r,!j);else l=e.filter(l,r)}return e.grep(c,function(c){return e.inArray(c,l)>=0===j})}function y(c){var e=oa.split(" "),c=c.createDocumentFragment();if(c.createElement)for(;e.length;)c.createElement(e.pop());return c}function A(c,l){if(l.nodeType===1&&e.hasData(c)){var j,r,a;r=e._data(c);var d=e._data(l,r),b=r.events;if(b)for(j in delete d.handle,d.events={},b)for(r=0,a=b[j].length;r<a;r++)e.event.add(l,j+(b[j][r].namespace?".":"")+b[j][r].namespace,b[j][r],b[j][r].data);
if(d.data)d.data=e.extend({},d.data)}}function w(c,l){var j;if(l.nodeType===1){l.clearAttributes&&l.clearAttributes();l.mergeAttributes&&l.mergeAttributes(c);j=l.nodeName.toLowerCase();if(j==="object")l.outerHTML=c.outerHTML;else if(j==="input"&&(c.type==="checkbox"||c.type==="radio")){if(c.checked)l.defaultChecked=l.checked=c.checked;if(l.value!==c.value)l.value=c.value}else if(j==="option")l.selected=c.defaultSelected;else if(j==="input"||j==="textarea")l.defaultValue=c.defaultValue;l.removeAttribute(e.expando)}}
function n(c){return typeof c.getElementsByTagName!=="undefined"?c.getElementsByTagName("*"):typeof c.querySelectorAll!=="undefined"?c.querySelectorAll("*"):[]}function s(c){if(c.type==="checkbox"||c.type==="radio")c.defaultChecked=c.checked}function x(c){var l=(c.nodeName||"").toLowerCase();l==="input"?s(c):l!=="script"&&typeof c.getElementsByTagName!=="undefined"&&e.grep(c.getElementsByTagName("input"),s)}function f(c,l){l.src?e.ajax({url:l.src,async:!1,dataType:"script"}):e.globalEval((l.text||
l.textContent||l.innerHTML||"").replace(Ma,"/*$0*/"));l.parentNode&&l.parentNode.removeChild(l)}function k(c,l,j){var r=l==="width"?c.offsetWidth:c.offsetHeight,a=l==="width"?Na:Oa;if(r>0)return j!=="border"&&e.each(a,function(){j||(r-=parseFloat(e.css(c,"padding"+this))||0);j==="margin"?r+=parseFloat(e.css(c,j+this))||0:r-=parseFloat(e.css(c,"border"+this+"Width"))||0}),r+"px";r=U(c,l,l);if(r<0||r==null)r=c.style[l]||0;r=parseFloat(r)||0;j&&e.each(a,function(){r+=parseFloat(e.css(c,"padding"+this))||
0;j!=="padding"&&(r+=parseFloat(e.css(c,"border"+this+"Width"))||0);j==="margin"&&(r+=parseFloat(e.css(c,j+this))||0)});return r+"px"}function D(c){return function(l,j){var I;typeof l!=="string"&&(j=l,l="*");if(e.isFunction(j))for(var r=l.toLowerCase().split(pa),a=0,d=r.length,b,f;a<d;a++)b=r[a],(f=/^\+/.test(b))&&(b=b.substr(1)||"*"),I=c[b]=c[b]||[],b=I,b[f?"unshift":"push"](j)}}function B(c,e,j,r,a,b){a=a||e.dataTypes[0];b=b||{};b[a]=!0;for(var a=c[a],f=0,k=a?a.length:0,g=c===ga,n;f<k&&(g||!n);f++)n=
a[f](e,j,r),typeof n==="string"&&(!g||b[n]?n=d:(e.dataTypes.unshift(n),n=B(c,e,j,r,n,b)));if((g||!n)&&!b["*"])n=B(c,e,j,r,"*",b);return n}function z(c,l){var j,r,a=e.ajaxSettings.flatOptions||{};for(j in l)l[j]!==d&&((a[j]?c:r||(r={}))[j]=l[j]);r&&e.extend(!0,c,r)}function C(c,l,j,r){if(e.isArray(l))e.each(l,function(l,a){j||Pa.test(c)?r(c,a):C(c+"["+(typeof a==="object"||e.isArray(a)?l:"")+"]",a,j,r)});else if(!j&&l!=null&&typeof l==="object")for(var a in l)C(c+"["+a+"]",l[a],j,r);else r(c,l)}function q(){try{return new a.XMLHttpRequest}catch(c){}}
function E(){setTimeout(O,0);return Z=e.now()}function O(){Z=d}function L(c,l){var j={};e.each(qa.concat.apply([],qa.slice(0,l)),function(){j[this]=c});return j}function M(c){if(!ha[c]){var l=u.body,j=e("<"+c+">").appendTo(l),r=j.css("display");j.remove();if(r==="none"||r===""){if(!J)J=u.createElement("iframe"),J.frameBorder=J.width=J.height=0;l.appendChild(J);if(!V||!J.createElement)V=(J.contentWindow||J.contentDocument).document,V.write((u.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),
V.close();j=V.createElement(c);V.body.appendChild(j);r=e.css(j,"display");l.removeChild(J)}ha[c]=r}return ha[c]}function F(c){return e.isWindow(c)?c:c.nodeType===9?c.defaultView||c.parentWindow:!1}var u=a.document,Q=a.navigator,t=a.location,e=function(){function c(){if(!e.isReady){try{u.documentElement.doScroll("left")}catch(j){setTimeout(c,1);return}e.ready()}}var e=function(c,j){return new e.fn.init(c,j,b)},j=a.jQuery,r=a.$,b,f=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,k=/\S/,g=/^\s+/,n=/\s+$/,
t=/\d/,h=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,s=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,m=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,w=/(?:^|:|,)(?:\s*\[)+/g,v=/(webkit)[ \/]([\w.]+)/,q=/(opera)(?:.*version)?[ \/]([\w.]+)/,D=/(msie) ([\w.]+)/,p=/(mozilla)(?:.*? rv:([\w.]+))?/,x=/-([a-z]|[0-9])/ig,K=/^-ms-/,B=function(c,e){return(e+"").toUpperCase()},Y=Q.userAgent,ba,y,Qa=Object.prototype.toString,ja=Object.prototype.hasOwnProperty,z=Array.prototype.push,G=Array.prototype.slice,
A=String.prototype.trim,C=Array.prototype.indexOf,N={};e.fn=e.prototype={constructor:e,init:function(c,j,r){var a;if(!c)return this;if(c.nodeType)return this.context=this[0]=c,this.length=1,this;if(c==="body"&&!j&&u.body)return this.context=u,this[0]=u.body,this.selector=c,this.length=1,this;if(typeof c==="string")if((a=c.charAt(0)==="<"&&c.charAt(c.length-1)===">"&&c.length>=3?[null,c,null]:f.exec(c))&&(a[1]||!j))if(a[1])return r=(j=j instanceof e?j[0]:j)?j.ownerDocument||j:u,(c=h.exec(c))?e.isPlainObject(j)?
(c=[u.createElement(c[1])],e.fn.attr.call(c,j,!0)):c=[r.createElement(c[1])]:(c=e.buildFragment([a[1]],[r]),c=(c.cacheable?e.clone(c.fragment):c.fragment).childNodes),e.merge(this,c);else{if((j=u.getElementById(a[2]))&&j.parentNode){if(j.id!==a[2])return r.find(c);this.length=1;this[0]=j}this.context=u;this.selector=c;return this}else return!j||j.jquery?(j||r).find(c):this.constructor(j).find(c);else if(e.isFunction(c))return r.ready(c);if(c.selector!==d)this.selector=c.selector,this.context=c.context;
return e.makeArray(c,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(c){return c==null?this.toArray():c<0?this[this.length+c]:this[c]},pushStack:function(c,j,r){var a=this.constructor();e.isArray(c)?z.apply(a,c):e.merge(a,c);a.prevObject=this;a.context=this.context;if(j==="find")a.selector=this.selector+(this.selector?" ":"")+r;else if(j)a.selector=this.selector+"."+j+"("+r+")";return a},each:function(c,j){return e.each(this,
c,j)},ready:function(c){e.bindReady();ba.add(c);return this},eq:function(c){return c===-1?this.slice(c):this.slice(c,+c+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(c){return this.pushStack(e.map(this,function(e,l){return c.call(e,l,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:z,sort:[].sort,splice:[].splice};e.fn.init.prototype=
e.fn;e.extend=e.fn.extend=function(){var c,j,a,r,b,f=arguments[0]||{},k=1,I=arguments.length,g=!1;typeof f==="boolean"&&(g=f,f=arguments[1]||{},k=2);typeof f!=="object"&&!e.isFunction(f)&&(f={});I===k&&(f=this,--k);for(;k<I;k++)if((c=arguments[k])!=null)for(j in c)a=f[j],r=c[j],f!==r&&(g&&r&&(e.isPlainObject(r)||(b=e.isArray(r)))?(b?(b=!1,a=a&&e.isArray(a)?a:[]):a=a&&e.isPlainObject(a)?a:{},f[j]=e.extend(g,a,r)):r!==d&&(f[j]=r));return f};e.extend({noConflict:function(c){if(a.$===e)a.$=r;if(c&&a.jQuery===
e)a.jQuery=j;return e},isReady:!1,readyWait:1,holdReady:function(c){c?e.readyWait++:e.ready(!0)},ready:function(c){if(c===!0&&!--e.readyWait||c!==!0&&!e.isReady){if(!u.body)return setTimeout(e.ready,1);e.isReady=!0;c!==!0&&--e.readyWait>0||(ba.fireWith(u,[e]),e.fn.trigger&&e(u).trigger("ready").unbind("ready"))}},bindReady:function(){if(!ba){ba=e.Callbacks("once memory");if(u.readyState==="complete")return setTimeout(e.ready,1);if(u.addEventListener)u.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",
e.ready,!1);else if(u.attachEvent){u.attachEvent("onreadystatechange",y);a.attachEvent("onload",e.ready);var j=!1;try{j=a.frameElement==null}catch(r){}u.documentElement.doScroll&&j&&c()}}},isFunction:function(c){return e.type(c)==="function"},isArray:Array.isArray||function(c){return e.type(c)==="array"},isWindow:function(c){return c&&typeof c==="object"&&"setInterval"in c},isNumeric:function(c){return c!=null&&t.test(c)&&!isNaN(c)},type:function(c){return c==null?String(c):N[Qa.call(c)]||"object"},
isPlainObject:function(c){if(!c||e.type(c)!=="object"||c.nodeType||e.isWindow(c))return!1;try{if(c.constructor&&!ja.call(c,"constructor")&&!ja.call(c.constructor.prototype,"isPrototypeOf"))return!1}catch(j){return!1}for(var a in c);return a===d||ja.call(c,a)},isEmptyObject:function(c){for(var e in c)return!1;return!0},error:function(c){throw c;},parseJSON:function(c){if(typeof c!=="string"||!c)return null;c=e.trim(c);if(a.JSON&&a.JSON.parse)return a.JSON.parse(c);if(o.test(c.replace(s,"@").replace(m,
"]").replace(w,"")))return(new Function("return "+c))();e.error("Invalid JSON: "+c)},parseXML:function(c){var j,r;try{a.DOMParser?(r=new DOMParser,j=r.parseFromString(c,"text/xml")):(j=new ActiveXObject("Microsoft.XMLDOM"),j.async="false",j.loadXML(c))}catch(b){j=d}(!j||!j.documentElement||j.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return j},noop:function(){},globalEval:function(c){c&&k.test(c)&&(a.execScript||function(c){a.eval.call(a,c)})(c)},camelCase:function(c){return c.replace(K,
"ms-").replace(x,B)},nodeName:function(c,e){return c.nodeName&&c.nodeName.toUpperCase()===e.toUpperCase()},each:function(c,j,a){var r,b=0,f=c.length,k=f===d||e.isFunction(c);if(a)if(k)for(r in c){if(j.apply(c[r],a)===!1)break}else for(;b<f;){if(j.apply(c[b++],a)===!1)break}else if(k)for(r in c){if(j.call(c[r],r,c[r])===!1)break}else for(;b<f;)if(j.call(c[b],b,c[b++])===!1)break;return c},trim:A?function(c){return c==null?"":A.call(c)}:function(c){return c==null?"":c.toString().replace(g,"").replace(n,
"")},makeArray:function(c,j){var r=j||[];if(c!=null){var a=e.type(c);c.length==null||a==="string"||a==="function"||a==="regexp"||e.isWindow(c)?z.call(r,c):e.merge(r,c)}return r},inArray:function(c,e,l){var j;if(e){if(C)return C.call(e,c,l);j=e.length;for(l=l?l<0?Math.max(0,j+l):l:0;l<j;l++)if(l in e&&e[l]===c)return l}return-1},merge:function(c,e){var l=c.length,j=0;if(typeof e.length==="number")for(var r=e.length;j<r;j++)c[l++]=e[j];else for(;e[j]!==d;)c[l++]=e[j++];c.length=l;return c},grep:function(c,
e,l){for(var j=[],r,l=!!l,a=0,b=c.length;a<b;a++)r=!!e(c[a],a),l!==r&&j.push(c[a]);return j},map:function(c,j,a){var r,b,f=[],k=0,I=c.length;if(c instanceof e||I!==d&&typeof I==="number"&&(I>0&&c[0]&&c[I-1]||I===0||e.isArray(c)))for(;k<I;k++)r=j(c[k],k,a),r!=null&&(f[f.length]=r);else for(b in c)r=j(c[b],b,a),r!=null&&(f[f.length]=r);return f.concat.apply([],f)},guid:1,proxy:function(c,j){if(typeof j==="string")var r=c[j],j=c,c=r;if(!e.isFunction(c))return d;var a=G.call(arguments,2),r=function(){return c.apply(j,
a.concat(G.call(arguments)))};r.guid=c.guid=c.guid||r.guid||e.guid++;return r},access:function(c,j,r,a,b,f){var k=c.length;if(typeof j==="object"){for(var I in j)e.access(c,I,j[I],a,b,r);return c}if(r!==d){a=!f&&a&&e.isFunction(r);for(I=0;I<k;I++)b(c[I],j,a?r.call(c[I],I,b(c[I],j)):r,f);return c}return k?b(c[0],j):d},now:function(){return(new Date).getTime()},uaMatch:function(c){c=c.toLowerCase();c=v.exec(c)||q.exec(c)||D.exec(c)||c.indexOf("compatible")<0&&p.exec(c)||[];return{browser:c[1]||"",version:c[2]||
"0"}},sub:function(){function c(e,l){return new c.fn.init(e,l)}e.extend(!0,c,this);c.superclass=this;c.fn=c.prototype=this();c.fn.constructor=c;c.sub=this.sub;c.fn.init=function(r,a){a&&a instanceof e&&!(a instanceof c)&&(a=c(a));return e.fn.init.call(this,r,a,j)};c.fn.init.prototype=c.fn;var j=c(u);return c},browser:{}});e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(c,e){N["[object "+e+"]"]=e.toLowerCase()});Y=e.uaMatch(Y);if(Y.browser)e.browser[Y.browser]=
!0,e.browser.version=Y.version;if(e.browser.webkit)e.browser.safari=!0;k.test(" ")&&(g=/^[\s\xA0]+/,n=/[\s\xA0]+$/);b=e(u);u.addEventListener?y=function(){u.removeEventListener("DOMContentLoaded",y,!1);e.ready()}:u.attachEvent&&(y=function(){u.readyState==="complete"&&(u.detachEvent("onreadystatechange",y),e.ready())});typeof define==="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e});return e}(),K={};e.Callbacks=function(c){var c=c?K[c]||b(c):{},l=[],j=[],r,a,f,k,
g,n=function(j){var a,r,b,d;for(a=0,r=j.length;a<r;a++)b=j[a],d=e.type(b),d==="array"?n(b):d==="function"&&(!c.unique||!h.has(b))&&l.push(b)},t=function(e,b){b=b||[];r=!c.memory||[e,b];a=!0;g=f||0;f=0;for(k=l.length;l&&g<k;g++)if(l[g].apply(e,b)===!1&&c.stopOnFalse){r=!0;break}a=!1;l&&(c.once?r===!0?h.disable():l=[]:j&&j.length&&(r=j.shift(),h.fireWith(r[0],r[1])))},h={add:function(){if(l){var c=l.length;n(arguments);a?k=l.length:r&&r!==!0&&(f=c,t(r[0],r[1]))}return this},remove:function(){if(l)for(var e=
arguments,j=0,r=e.length;j<r;j++)for(var b=0;b<l.length;b++)if(e[j]===l[b]&&(a&&b<=k&&(k--,b<=g&&g--),l.splice(b--,1),c.unique))break;return this},has:function(c){if(l)for(var e=0,j=l.length;e<j;e++)if(c===l[e])return!0;return!1},empty:function(){l=[];return this},disable:function(){l=j=r=d;return this},disabled:function(){return!l},lock:function(){j=d;(!r||r===!0)&&h.disable();return this},locked:function(){return!j},fireWith:function(e,l){j&&(a?c.once||j.push([e,l]):(!c.once||!r)&&t(e,l));return this},
fire:function(){h.fireWith(this,arguments);return this},fired:function(){return!!r}};return h};var G=[].slice;e.extend({Deferred:function(c){var l=e.Callbacks("once memory"),j=e.Callbacks("once memory"),a=e.Callbacks("memory"),b="pending",d={resolve:l,reject:j,notify:a},f={done:l.add,fail:j.add,progress:a.add,state:function(){return b},isResolved:l.fired,isRejected:j.fired,then:function(c,e,l){k.done(c).fail(e).progress(l);return this},always:function(){return k.done.apply(k,arguments).fail.apply(k,
arguments)},pipe:function(c,l,j){return e.Deferred(function(a){e.each({done:[c,"resolve"],fail:[l,"reject"],progress:[j,"notify"]},function(c,l){var j=l[0],r=l[1],b;if(e.isFunction(j))k[c](function(){if((b=j.apply(this,arguments))&&e.isFunction(b.promise))b.promise().then(a.resolve,a.reject,a.notify);else a[r+"With"](this===k?a:this,[b])});else k[c](a[r])})}).promise()},promise:function(c){if(c==null)c=f;else for(var e in f)c[e]=f[e];return c}},k=f.promise({}),g;for(g in d)k[g]=d[g].fire,k[g+"With"]=
d[g].fireWith;k.done(function(){b="resolved"},j.disable,a.lock).fail(function(){b="rejected"},l.disable,a.lock);c&&c.call(k,k);return k},when:function(c){function l(c){return function(e){a[c]=arguments.length>1?G.call(arguments,0):e;--k||g.resolveWith(g,a)}}function j(c){return function(e){f[c]=arguments.length>1?G.call(arguments,0):e;g.notifyWith(n,f)}}var a=G.call(arguments,0),b=0,d=a.length,f=Array(d),k=d,g=d<=1&&c&&e.isFunction(c.promise)?c:e.Deferred(),n=g.promise();if(d>1){for(;b<d;b++)a[b]&&
a[b].promise&&e.isFunction(a[b].promise)?a[b].promise().then(l(b),g.reject,j(b)):--k;k||g.resolveWith(g,a)}else g!==c&&g.resolveWith(g,d?[c]:[]);return n}});e.support=function(){var c=u.createElement("div"),l=u.documentElement,j,a,b,d,f,k,g,n;c.setAttribute("className","t");c.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";j=c.getElementsByTagName("*");a=c.getElementsByTagName("a")[0];if(!j||!j.length||!a)return{};
b=u.createElement("select");d=b.appendChild(u.createElement("option"));j=c.getElementsByTagName("input")[0];f={leadingWhitespace:c.firstChild.nodeType===3,tbody:!c.getElementsByTagName("tbody").length,htmlSerialize:!!c.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,unknownElems:!!c.getElementsByTagName("nav").length,checkOn:j.value==="on",optSelected:d.selected,
getSetAttribute:c.className!=="t",enctype:!!u.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};j.checked=!0;f.noCloneChecked=j.cloneNode(!0).checked;b.disabled=!0;f.optDisabled=!d.disabled;try{delete c.test}catch(t){f.deleteExpando=!1}!c.addEventListener&&c.attachEvent&&c.fireEvent&&(c.attachEvent("onclick",function(){f.noCloneEvent=!1}),c.cloneNode(!0).fireEvent("onclick"));
j=u.createElement("input");j.value="t";j.setAttribute("type","radio");f.radioValue=j.value==="t";j.setAttribute("checked","checked");c.appendChild(j);a=u.createDocumentFragment();a.appendChild(c.lastChild);f.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked;c.innerHTML="";c.style.width=c.style.paddingLeft="1px";k=u.getElementsByTagName("body")[0];g=u.createElement(k?"div":"body");a={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};k&&e.extend(a,{position:"absolute",
left:"-999px",top:"-999px"});for(n in a)g.style[n]=a[n];g.appendChild(c);l=k||l;l.insertBefore(g,l.firstChild);f.appendChecked=j.checked;f.boxModel=c.offsetWidth===2;if("zoom"in c.style)c.style.display="inline",c.style.zoom=1,f.inlineBlockNeedsLayout=c.offsetWidth===2,c.style.display="",c.innerHTML="<div style='width:4px;'></div>",f.shrinkWrapBlocks=c.offsetWidth!==2;c.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";a=c.getElementsByTagName("td");j=
a[0].offsetHeight===0;a[0].style.display="";a[1].style.display="none";f.reliableHiddenOffsets=j&&a[0].offsetHeight===0;c.innerHTML="";if(u.defaultView&&u.defaultView.getComputedStyle)j=u.createElement("div"),j.style.width="0",j.style.marginRight="0",c.appendChild(j),f.reliableMarginRight=(parseInt((u.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0;if(c.attachEvent)for(n in{submit:1,change:1,focusin:1})a="on"+n,j=a in c,j||(c.setAttribute(a,"return;"),j=typeof c[a]===
"function"),f[n+"Bubbles"]=j;e(function(){var c,l,j,a;if(k=u.getElementsByTagName("body")[0])c=u.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",k.insertBefore(c,k.firstChild),g=u.createElement("div"),g.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;",g.innerHTML="<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",
c.appendChild(g),l=g.firstChild,j=l.firstChild,a={doesNotAddBorder:j.offsetTop!==5,doesAddBorderForTableAndCells:l.nextSibling.firstChild.firstChild.offsetTop===5},j.style.position="fixed",j.style.top="20px",a.fixedPosition=j.offsetTop===20||j.offsetTop===15,j.style.position=j.style.top="",l.style.overflow="hidden",l.style.position="relative",a.subtractsBorderForOverflowNotVisible=j.offsetTop===-5,a.doesNotIncludeMarginInBodyOffset=k.offsetTop!==1,k.removeChild(c),g=null,e.extend(f,a)});g.innerHTML=
"";l.removeChild(g);g=a=b=d=k=j=c=j=null;return f}();e.boxModel=e.support.boxModel;var N=/^(?:\{.*\}|\[.*\])$/,X=/([A-Z])/g;e.extend({cache:{},uuid:0,expando:"jQuery"+(e.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(c){c=c.nodeType?e.cache[c[e.expando]]:c[e.expando];return!!c&&!p(c)},data:function(c,l,j,a){if(e.acceptData(c)){var b,f=typeof l==="string",k=(b=c.nodeType)?e.cache:c,g=b?c[e.expando]:c[e.expando]&&
e.expando,n=l==="events";if(g&&k[g]&&(n||a||k[g].data)||!(f&&j===d)){if(!g)b?c[e.expando]=g=++e.uuid:g=e.expando;if(!k[g]&&(k[g]={},!b))k[g].toJSON=e.noop;if(typeof l==="object"||typeof l==="function")a?k[g]=e.extend(k[g],l):k[g].data=e.extend(k[g].data,l);b=c=k[g];if(!a){if(!c.data)c.data={};c=c.data}j!==d&&(c[e.camelCase(l)]=j);if(n&&!c[l])return b.events;f?(j=c[l],j==null&&(j=c[e.camelCase(l)])):j=c;return j}}},removeData:function(c,l,j){if(e.acceptData(c)){var a,b,f,d=c.nodeType,k=d?e.cache:c,
g=d?c[e.expando]:e.expando;if(k[g]){if(l&&(a=j?k[g]:k[g].data)){e.isArray(l)||(l in a?l=[l]:(l=e.camelCase(l),l=l in a?[l]:l.split(" ")));for(b=0,f=l.length;b<f;b++)delete a[l[b]];if(!(j?p:e.isEmptyObject)(a))return}if(!j&&(delete k[g].data,!p(k[g])))return;e.support.deleteExpando||!k.setInterval?delete k[g]:k[g]=null;d&&(e.support.deleteExpando?delete c[e.expando]:c.removeAttribute?c.removeAttribute(e.expando):c[e.expando]=null)}}},_data:function(c,l,j){return e.data(c,l,j,!0)},acceptData:function(c){if(c.nodeName){var l=
e.noData[c.nodeName.toLowerCase()];if(l)return!(l===!0||c.getAttribute("classid")!==l)}return!0}});e.fn.extend({data:function(c,l){var j,a,b,f=null;if(typeof c==="undefined"){if(this.length&&(f=e.data(this[0]),this[0].nodeType===1&&!e._data(this[0],"parsedAttrs"))){a=this[0].attributes;for(var k=0,g=a.length;k<g;k++)b=a[k].name,b.indexOf("data-")===0&&(b=e.camelCase(b.substring(5)),h(this[0],b,f[b]));e._data(this[0],"parsedAttrs",!0)}return f}else if(typeof c==="object")return this.each(function(){e.data(this,
c)});j=c.split(".");j[1]=j[1]?"."+j[1]:"";return l===d?(f=this.triggerHandler("getData"+j[1]+"!",[j[0]]),f===d&&this.length&&(f=e.data(this[0],c),f=h(this[0],c,f)),f===d&&j[1]?this.data(j[0]):f):this.each(function(){var a=e(this),r=[j[0],l];a.triggerHandler("setData"+j[1]+"!",r);e.data(this,c,l);a.triggerHandler("changeData"+j[1]+"!",r)})},removeData:function(c){return this.each(function(){e.removeData(this,c)})}});e.extend({_mark:function(c,l){c&&(l=(l||"fx")+"mark",e._data(c,l,(e._data(c,l)||0)+
1))},_unmark:function(c,l,j){c!==!0&&(j=l,l=c,c=!1);if(l){var j=j||"fx",a=j+"mark";(c=c?0:(e._data(l,a)||1)-1)?e._data(l,a,c):(e.removeData(l,a,!0),m(l,j,"mark"))}},queue:function(c,l,j){var a;if(c)return l=(l||"fx")+"queue",a=e._data(c,l),j&&(!a||e.isArray(j)?a=e._data(c,l,e.makeArray(j)):a.push(j)),a||[]},dequeue:function(c,l){var l=l||"fx",j=e.queue(c,l),a=j.shift(),b={};a==="inprogress"&&(a=j.shift());a&&(l==="fx"&&j.unshift("inprogress"),e._data(c,l+".run",b),a.call(c,function(){e.dequeue(c,
l)},b));j.length||(e.removeData(c,l+"queue "+l+".run",!0),m(c,l,"queue"))}});e.fn.extend({queue:function(c,l){typeof c!=="string"&&(l=c,c="fx");return l===d?e.queue(this[0],c):this.each(function(){var j=e.queue(this,c,l);c==="fx"&&j[0]!=="inprogress"&&e.dequeue(this,c)})},dequeue:function(c){return this.each(function(){e.dequeue(this,c)})},delay:function(c,l){c=e.fx?e.fx.speeds[c]||c:c;return this.queue(l||"fx",function(e,l){var a=setTimeout(e,c);l.stop=function(){clearTimeout(a)}})},clearQueue:function(c){return this.queue(c||
"fx",[])},promise:function(c){function l(){--f||j.resolveWith(a,[a])}typeof c!=="string"&&(c=d);var c=c||"fx",j=e.Deferred(),a=this,b=a.length,f=1,k=c+"defer",g=c+"queue";c+="mark";for(var n;b--;)if(n=e.data(a[b],k,d,!0)||(e.data(a[b],g,d,!0)||e.data(a[b],c,d,!0))&&e.data(a[b],k,e.Callbacks("once memory"),!0))f++,n.add(l);l();return j.promise()}});var ca=/[\n\t\r]/g,da=/\s+/,Ra=/\r/g,Sa=/^(?:button|input)$/i,Ta=/^(?:button|input|object|select|textarea)$/i,Ua=/^a(?:rea)?$/i,ra=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
sa=e.support.getSetAttribute,P,ta,ua;e.fn.extend({attr:function(c,l){return e.access(this,c,l,!0,e.attr)},removeAttr:function(c){return this.each(function(){e.removeAttr(this,c)})},prop:function(c,l){return e.access(this,c,l,!0,e.prop)},removeProp:function(c){c=e.propFix[c]||c;return this.each(function(){try{this[c]=d,delete this[c]}catch(e){}})},addClass:function(c){var l,j,a,b,f,d,k;if(e.isFunction(c))return this.each(function(l){e(this).addClass(c.call(this,l,this.className))});if(c&&typeof c===
"string"){l=c.split(da);for(j=0,a=this.length;j<a;j++)if(b=this[j],b.nodeType===1)if(!b.className&&l.length===1)b.className=c;else{f=" "+b.className+" ";for(d=0,k=l.length;d<k;d++)~f.indexOf(" "+l[d]+" ")||(f+=l[d]+" ");b.className=e.trim(f)}}return this},removeClass:function(c){var l,j,a,b,f,k,g;if(e.isFunction(c))return this.each(function(l){e(this).removeClass(c.call(this,l,this.className))});if(c&&typeof c==="string"||c===d){l=(c||"").split(da);for(j=0,a=this.length;j<a;j++)if(b=this[j],b.nodeType===
1&&b.className)if(c){f=(" "+b.className+" ").replace(ca," ");for(k=0,g=l.length;k<g;k++)f=f.replace(" "+l[k]+" "," ");b.className=e.trim(f)}else b.className=""}return this},toggleClass:function(c,l){var j=typeof c,a=typeof l==="boolean";return e.isFunction(c)?this.each(function(j){e(this).toggleClass(c.call(this,j,this.className,l),l)}):this.each(function(){if(j==="string")for(var b,f=0,d=e(this),k=l,g=c.split(da);b=g[f++];)k=a?k:!d.hasClass(b),d[k?"addClass":"removeClass"](b);else if(j==="undefined"||
j==="boolean")this.className&&e._data(this,"__className__",this.className),this.className=this.className||c===!1?"":e._data(this,"__className__")||""})},hasClass:function(c){for(var c=" "+c+" ",e=0,j=this.length;e<j;e++)if(this[e].nodeType===1&&(" "+this[e].className+" ").replace(ca," ").indexOf(c)>-1)return!0;return!1},val:function(c){var l,j,a,b=this[0];if(!arguments.length){if(b){if((l=e.valHooks[b.nodeName.toLowerCase()]||e.valHooks[b.type])&&"get"in l&&(j=l.get(b,"value"))!==d)return j;j=b.value;
return typeof j==="string"?j.replace(Ra,""):j==null?"":j}return d}a=e.isFunction(c);return this.each(function(j){var b=e(this);if(this.nodeType===1&&(j=a?c.call(this,j,b.val()):c,j==null?j="":typeof j==="number"?j+="":e.isArray(j)&&(j=e.map(j,function(c){return c==null?"":c+""})),l=e.valHooks[this.nodeName.toLowerCase()]||e.valHooks[this.type],!l||!("set"in l)||l.set(this,j,"value")===d))this.value=j})}});e.extend({valHooks:{option:{get:function(c){var e=c.attributes.value;return!e||e.specified?c.value:
c.text}},select:{get:function(c){var l,j,a=c.selectedIndex,b=[],f=c.options,d=c.type==="select-one";if(a<0)return null;c=d?a:0;for(j=d?a+1:f.length;c<j;c++)if(l=f[c],l.selected&&(e.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!e.nodeName(l.parentNode,"optgroup"))){l=e(l).val();if(d)return l;b.push(l)}return d&&!b.length&&f.length?e(f[a]).val():b},set:function(c,l){var j=e.makeArray(l);e(c).find("option").each(function(){this.selected=e.inArray(e(this).val(),
j)>=0});if(!j.length)c.selectedIndex=-1;return j}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(c,l,j,a){var b,f,k=c.nodeType;if(!c||k===3||k===8||k===2)return d;if(a&&l in e.attrFn)return e(c)[l](j);if(!("getAttribute"in c))return e.prop(c,l,j);if(a=k!==1||!e.isXMLDoc(c))l=l.toLowerCase(),f=e.attrHooks[l]||(ra.test(l)?ta:P);return j!==d?j===null?(e.removeAttr(c,l),d):f&&"set"in f&&a&&(b=f.set(c,j,l))!==d?b:(c.setAttribute(l,""+j),j):f&&"get"in f&&a&&
(b=f.get(c,l))!==null?b:(b=c.getAttribute(l),b===null?d:b)},removeAttr:function(c,l){var j,a,b,f,d=0;if(c.nodeType===1){a=(l||"").split(da);for(f=a.length;d<f;d++)b=a[d].toLowerCase(),j=e.propFix[b]||b,e.attr(c,b,""),c.removeAttribute(sa?b:j),ra.test(b)&&j in c&&(c[j]=!1)}},attrHooks:{type:{set:function(c,l){if(Sa.test(c.nodeName)&&c.parentNode)e.error("type property can't be changed");else if(!e.support.radioValue&&l==="radio"&&e.nodeName(c,"input")){var j=c.value;c.setAttribute("type",l);if(j)c.value=
j;return l}}},value:{get:function(c,l){return P&&e.nodeName(c,"button")?P.get(c,l):l in c?c.value:null},set:function(c,l,j){if(P&&e.nodeName(c,"button"))return P.set(c,l,j);c.value=l}}},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(c,l,j){var a,b,f=c.nodeType;if(!c||
f===3||f===8||f===2)return d;if(f!==1||!e.isXMLDoc(c))l=e.propFix[l]||l,b=e.propHooks[l];return j!==d?b&&"set"in b&&(a=b.set(c,j,l))!==d?a:c[l]=j:b&&"get"in b&&(a=b.get(c,l))!==null?a:c[l]},propHooks:{tabIndex:{get:function(c){var e=c.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):Ta.test(c.nodeName)||Ua.test(c.nodeName)&&c.href?0:d}}}});e.attrHooks.tabindex=e.propHooks.tabIndex;ta={get:function(c,l){var j,a=e.prop(c,l);return a===!0||typeof a!=="boolean"&&(j=c.getAttributeNode(l))&&
j.nodeValue!==!1?l.toLowerCase():d},set:function(c,l,j){l===!1?e.removeAttr(c,j):(l=e.propFix[j]||j,l in c&&(c[l]=!0),c.setAttribute(j,j.toLowerCase()));return j}};if(!sa)ua={name:!0,id:!0},P=e.valHooks.button={get:function(c,e){var j;return(j=c.getAttributeNode(e))&&(ua[e]?j.nodeValue!=="":j.specified)?j.nodeValue:d},set:function(c,e,j){var a=c.getAttributeNode(j);a||(a=u.createAttribute(j),c.setAttributeNode(a));return a.nodeValue=e+""}},e.attrHooks.tabindex.set=P.set,e.each(["width","height"],
function(c,l){e.attrHooks[l]=e.extend(e.attrHooks[l],{set:function(c,e){if(e==="")return c.setAttribute(l,"auto"),e}})}),e.attrHooks.contenteditable={get:P.get,set:function(c,e,a){e===""&&(e="false");P.set(c,e,a)}};e.support.hrefNormalized||e.each(["href","src","width","height"],function(c,l){e.attrHooks[l]=e.extend(e.attrHooks[l],{get:function(c){c=c.getAttribute(l,2);return c===null?d:c}})});if(!e.support.style)e.attrHooks.style={get:function(c){return c.style.cssText.toLowerCase()||d},set:function(c,
e){return c.style.cssText=""+e}};if(!e.support.optSelected)e.propHooks.selected=e.extend(e.propHooks.selected,{get:function(){return null}});if(!e.support.enctype)e.propFix.enctype="encoding";e.support.checkOn||e.each(["radio","checkbox"],function(){e.valHooks[this]={get:function(c){return c.getAttribute("value")===null?"on":c.value}}});e.each(["radio","checkbox"],function(){e.valHooks[this]=e.extend(e.valHooks[this],{set:function(c,l){if(e.isArray(l))return c.checked=e.inArray(e(c).val(),l)>=0}})});
var ka=/^(?:textarea|input|select)$/i,va=/^([^\.]*)?(?:\.(.+))?$/,Va=/\bhover(\.\S+)?/,Wa=/^key/,Xa=/^(?:mouse|contextmenu)|click/,Ya=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Za=function(c){if(c=Ya.exec(c))c[1]=(c[1]||"").toLowerCase(),c[3]=c[3]&&RegExp("(?:^|\\s)"+c[3]+"(?:\\s|$)");return c},wa=function(c){return e.event.special.hover?c:c.replace(Va,"mouseenter$1 mouseleave$1")};e.event={add:function(c,l,a,b,f){var k,g,n,t,h,o,s,m,w;if(!(c.nodeType===3||c.nodeType===8||!l||!a||!(k=e._data(c)))){if(a.handler)s=
a,a=s.handler;if(!a.guid)a.guid=e.guid++;n=k.events;if(!n)k.events=n={};g=k.handle;if(!g)k.handle=g=function(c){return typeof e!=="undefined"&&(!c||e.event.triggered!==c.type)?e.event.dispatch.apply(g.elem,arguments):d},g.elem=c;l=wa(l).split(" ");for(k=0;k<l.length;k++){t=va.exec(l[k])||[];h=t[1];o=(t[2]||"").split(".").sort();w=e.event.special[h]||{};h=(f?w.delegateType:w.bindType)||h;w=e.event.special[h]||{};t=e.extend({type:h,origType:t[1],data:b,handler:a,guid:a.guid,selector:f,namespace:o.join(".")},
s);if(f&&(t.quick=Za(f),!t.quick&&e.expr.match.POS.test(f)))t.isPositional=!0;m=n[h];if(!m&&(m=n[h]=[],m.delegateCount=0,!w.setup||w.setup.call(c,b,o,g)===!1))c.addEventListener?c.addEventListener(h,g,!1):c.attachEvent&&c.attachEvent("on"+h,g);if(w.add&&(w.add.call(c,t),!t.handler.guid))t.handler.guid=a.guid;f?m.splice(m.delegateCount++,0,t):m.push(t);e.event.global[h]=!0}c=null}},global:{},remove:function(c,l,a,b){var f=e.hasData(c)&&e._data(c),d,k,g,n,t,h,o,s,m;if(f&&(h=f.events)){l=wa(l||"").split(" ");
for(d=0;d<l.length;d++){k=va.exec(l[d])||[];g=k[1];k=k[2];if(!g){k=k?"."+k:"";for(t in h)e.event.remove(c,t+k,a,b);return}o=e.event.special[g]||{};g=(b?o.delegateType:o.bindType)||g;s=h[g]||[];n=s.length;k=k?RegExp("(^|\\.)"+k.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(a||k||b||o.remove)for(t=0;t<s.length;t++){if(m=s[t],!a||a.guid===m.guid)if(!k||k.test(m.namespace))if(!b||b===m.selector||b==="**"&&m.selector)s.splice(t--,1),m.selector&&s.delegateCount--,o.remove&&o.remove.call(c,
m)}else s.length=0;s.length===0&&n!==s.length&&((!o.teardown||o.teardown.call(c,k)===!1)&&e.removeEvent(c,g,f.handle),delete h[g])}if(e.isEmptyObject(h)){if(l=f.handle)l.elem=null;e.removeData(c,["events","handle"],!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,l,j,b){if(!j||!(j.nodeType===3||j.nodeType===8)){var f=c.type||c,k=[],g,n,t,h;f.indexOf("!")>=0&&(f=f.slice(0,-1),g=!0);f.indexOf(".")>=0&&(k=f.split("."),f=k.shift(),k.sort());if(j&&!e.event.customEvent[f]||e.event.global[f])if(c=
typeof c==="object"?c[e.expando]?c:new e.Event(f,c):new e.Event(f),c.type=f,c.isTrigger=!0,c.exclusive=g,c.namespace=k.join("."),c.namespace_re=c.namespace?RegExp("(^|\\.)"+k.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,k=f.indexOf(":")<0?"on"+f:"",(b||!j)&&c.preventDefault(),j){c.result=d;if(!c.target)c.target=j;l=l!=null?e.makeArray(l):[];l.unshift(c);g=e.event.special[f]||{};if(!(g.trigger&&g.trigger.apply(j,l)===!1)){h=[[j,g.bindType||f]];if(!b&&!g.noBubble&&!e.isWindow(j)){t=g.delegateType||f;n=null;
for(b=j.parentNode;b;b=b.parentNode)h.push([b,t]),n=b;n&&n===j.ownerDocument&&h.push([n.defaultView||n.parentWindow||a,t])}for(n=0;n<h.length;n++)if(b=h[n][0],c.type=h[n][1],(t=(e._data(b,"events")||{})[c.type]&&e._data(b,"handle"))&&t.apply(b,l),(t=k&&b[k])&&e.acceptData(b)&&t.apply(b,l),c.isPropagationStopped())break;c.type=f;if(!c.isDefaultPrevented()&&(!g._default||g._default.apply(j.ownerDocument,l)===!1)&&!(f==="click"&&e.nodeName(j,"a"))&&e.acceptData(j))if(k&&j[f]&&(f!=="focus"&&f!=="blur"||
c.target.offsetWidth!==0)&&!e.isWindow(j))(n=j[k])&&(j[k]=null),e.event.triggered=f,j[f](),e.event.triggered=d,n&&(j[k]=n);return c.result}}else for(n in j=e.cache,j)j[n].events&&j[n].events[f]&&e.event.trigger(c,l,j[n].handle.elem,!0)}},dispatch:function(c){var c=e.event.fix(c||a.event),l=(e._data(this,"events")||{})[c.type]||[],j=l.delegateCount,b=[].slice.call(arguments,0),f=!c.exclusive&&!c.namespace,k=(e.event.special[c.type]||{}).handle,g=[],n,t,h,o,s,m,w;b[0]=c;c.delegateTarget=this;if(j&&
!c.target.disabled&&!(c.button&&c.type==="click"))for(t=c.target;t!=this;t=t.parentNode||this){o={};s=[];for(n=0;n<j;n++)h=l[n],m=h.selector,w=o[m],h.isPositional?w=(w||(o[m]=e(m))).index(t)>=0:w===d&&(w=o[m]=h.quick?(!h.quick[1]||t.nodeName.toLowerCase()===h.quick[1])&&(!h.quick[2]||t.id===h.quick[2])&&(!h.quick[3]||h.quick[3].test(t.className)):e(t).is(m)),w&&s.push(h);s.length&&g.push({elem:t,matches:s})}l.length>j&&g.push({elem:this,matches:l.slice(j)});for(n=0;n<g.length&&!c.isPropagationStopped();n++){j=
g[n];c.currentTarget=j.elem;for(l=0;l<j.matches.length&&!c.isImmediatePropagationStopped();l++)if(h=j.matches[l],f||!c.namespace&&!h.namespace||c.namespace_re&&c.namespace_re.test(h.namespace))if(c.data=h.data,c.handleObj=h,h=(k||h.handler).apply(j.elem,b),h!==d)c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation())}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(c,e){if(c.which==null)c.which=e.charCode!=null?e.charCode:e.keyCode;return c}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(c,e){var a,b,f=e.button,k=e.fromElement;if(c.pageX==null&&e.clientX!=null)a=c.target.ownerDocument||u,b=a.documentElement,a=a.body,c.pageX=e.clientX+(b&&b.scrollLeft||a&&a.scrollLeft||
0)-(b&&b.clientLeft||a&&a.clientLeft||0),c.pageY=e.clientY+(b&&b.scrollTop||a&&a.scrollTop||0)-(b&&b.clientTop||a&&a.clientTop||0);if(!c.relatedTarget&&k)c.relatedTarget=k===c.target?e.toElement:k;if(!c.which&&f!==d)c.which=f&1?1:f&2?3:f&4?2:0;return c}},fix:function(c){if(c[e.expando])return c;var a,j,b=c,f=e.event.fixHooks[c.type]||{},k=f.props?this.props.concat(f.props):this.props,c=e.Event(b);for(a=k.length;a;)j=k[--a],c[j]=b[j];if(!c.target)c.target=b.srcElement||u;if(c.target.nodeType===3)c.target=
c.target.parentNode;if(c.metaKey===d)c.metaKey=c.ctrlKey;return f.filter?f.filter(c,b):c},special:{ready:{setup:e.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(c,a,j){if(e.isWindow(this))this.onbeforeunload=j},teardown:function(c,e){if(this.onbeforeunload===e)this.onbeforeunload=null}}},simulate:function(c,a,j,b){c=e.extend(new e.Event,j,{type:c,isSimulated:!0,originalEvent:{}});b?e.event.trigger(c,null,a):e.event.dispatch.call(a,
c);c.isDefaultPrevented()&&j.preventDefault()}};e.event.handle=e.event.dispatch;e.removeEvent=u.removeEventListener?function(c,e,a){c.removeEventListener&&c.removeEventListener(e,a,!1)}:function(c,e,a){c.detachEvent&&c.detachEvent("on"+e,a)};e.Event=function(c,a){if(!(this instanceof e.Event))return new e.Event(c,a);c&&c.type?(this.originalEvent=c,this.type=c.type,this.isDefaultPrevented=c.defaultPrevented||c.returnValue===!1||c.getPreventDefault&&c.getPreventDefault()?o:g):this.type=c;a&&e.extend(this,
a);this.timeStamp=c&&c.timeStamp||e.now();this[e.expando]=!0};e.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var c=this.originalEvent;if(c)c.preventDefault?c.preventDefault():c.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=o;var c=this.originalEvent;if(c)c.stopPropagation&&c.stopPropagation(),c.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o;this.stopPropagation()},isDefaultPrevented:g,isPropagationStopped:g,
isImmediatePropagationStopped:g};e.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(c,a){e.event.special[c]=e.event.special[a]={delegateType:a,bindType:a,handle:function(c){var a=c.relatedTarget,l=c.handleObj,b;if(!a||l.origType===c.type||a!==this&&!e.contains(this,a))a=c.type,c.type=l.origType,b=l.handler.apply(this,arguments),c.type=a;return b}}});if(!e.support.submitBubbles)e.event.special.submit={setup:function(){if(e.nodeName(this,"form"))return!1;e.event.add(this,"click._submit keypress._submit",
function(c){c=c.target;if((c=e.nodeName(c,"input")||e.nodeName(c,"button")?c.form:d)&&!c._submit_attached)e.event.add(c,"submit._submit",function(c){this.parentNode&&e.event.simulate("submit",this.parentNode,c,!0)}),c._submit_attached=!0})},teardown:function(){if(e.nodeName(this,"form"))return!1;e.event.remove(this,"._submit")}};if(!e.support.changeBubbles)e.event.special.change={setup:function(){if(ka.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")e.event.add(this,"propertychange._change",
function(c){if(c.originalEvent.propertyName==="checked")this._just_changed=!0}),e.event.add(this,"click._change",function(c){if(this._just_changed)this._just_changed=!1,e.event.simulate("change",this,c,!0)});return!1}e.event.add(this,"beforeactivate._change",function(c){c=c.target;if(ka.test(c.nodeName)&&!c._change_attached)e.event.add(c,"change._change",function(c){this.parentNode&&!c.isSimulated&&e.event.simulate("change",this.parentNode,c,!0)}),c._change_attached=!0})},handle:function(c){var e=
c.target;if(this!==e||c.isSimulated||c.isTrigger||e.type!=="radio"&&e.type!=="checkbox")return c.handleObj.handler.apply(this,arguments)},teardown:function(){e.event.remove(this,"._change");return ka.test(this.nodeName)}};e.support.focusinBubbles||e.each({focus:"focusin",blur:"focusout"},function(c,a){var j=0,b=function(c){e.event.simulate(a,c.target,e.event.fix(c),!0)};e.event.special[a]={setup:function(){j++===0&&u.addEventListener(c,b,!0)},teardown:function(){--j===0&&u.removeEventListener(c,b,
!0)}}});e.fn.extend({on:function(c,a,j,b,f){var k,n;if(typeof c==="object"){typeof a!=="string"&&(j=a,a=d);for(n in c)this.on(n,a,j,c[n],f);return this}j==null&&b==null?(b=a,j=a=d):b==null&&(typeof a==="string"?(b=j,j=d):(b=j,j=a,a=d));if(b===!1)b=g;else if(!b)return this;if(f===1)k=b,b=function(c){e().off(c);return k.apply(this,arguments)},b.guid=k.guid||(k.guid=e.guid++);return this.each(function(){e.event.add(this,c,b,j,a)})},one:function(c,e,a,b){return this.on.call(this,c,e,a,b,1)},off:function(c,
a,j){if(c&&c.preventDefault&&c.handleObj){var b=c.handleObj;e(c.delegateTarget).off(b.namespace?b.type+"."+b.namespace:b.type,b.selector,b.handler);return this}if(typeof c==="object"){for(b in c)this.off(b,a,c[b]);return this}if(a===!1||typeof a==="function")j=a,a=d;j===!1&&(j=g);return this.each(function(){e.event.remove(this,c,j,a)})},bind:function(c,e,a){return this.on(c,null,e,a)},unbind:function(c,e){return this.off(c,null,e)},live:function(c,a,j){e(this.context).on(c,this.selector,a,j);return this},
die:function(c,a){e(this.context).off(c,this.selector||"**",a);return this},delegate:function(c,e,a,b){return this.on(e,c,a,b)},undelegate:function(c,e,a){return arguments.length==1?this.off(c,"**"):this.off(e,c,a)},trigger:function(c,a){return this.each(function(){e.event.trigger(c,a,this)})},triggerHandler:function(c,a){if(this[0])return e.event.trigger(c,a,this[0],!0)},toggle:function(c){var a=arguments,j=c.guid||e.guid++,b=0,f=function(j){var f=(e._data(this,"lastToggle"+c.guid)||0)%b;e._data(this,
"lastToggle"+c.guid,f+1);j.preventDefault();return a[f].apply(this,arguments)||!1};for(f.guid=j;b<a.length;)a[b++].guid=j;return this.click(f)},hover:function(c,e){return this.mouseenter(c).mouseleave(e||c)}});e.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(c,a){e.fn[a]=function(c,e){e==null&&(e=c,c=null);return arguments.length>
0?this.bind(a,c,e):this.trigger(a)};e.attrFn&&(e.attrFn[a]=!0);if(Wa.test(a))e.event.fixHooks[a]=e.event.keyHooks;if(Xa.test(a))e.event.fixHooks[a]=e.event.mouseHooks});(function(){function c(c,e,a,b,l,j){for(var l=0,k=b.length;l<k;l++){var d=b[l];if(d){for(var g=!1,d=d[c];d;){if(d[f]===a){g=b[d.sizset];break}if(d.nodeType===1&&!j)d[f]=a,d.sizset=l;if(d.nodeName.toLowerCase()===e){g=d;break}d=d[c]}b[l]=g}}}function a(c,e,b,l,j,k){for(var j=0,d=l.length;j<d;j++){var g=l[j];if(g){for(var n=!1,g=g[c];g;){if(g[f]===
b){n=l[g.sizset];break}if(g.nodeType===1){if(!k)g[f]=b,g.sizset=j;if(typeof e!=="string"){if(g===e){n=!0;break}}else if(m.filter(e,[g]).length>0){n=g;break}}g=g[c]}l[j]=n}}}var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,f="sizcache"+(Math.random()+"").replace(".",""),k=0,g=Object.prototype.toString,n=!1,t=!0,h=/\\/g,o=/\r\n/g,s=/\W/;[0,0].sort(function(){t=!1;return 0});var m=function(c,e,a,l){var a=a||[],
f=e=e||u;if(e.nodeType!==1&&e.nodeType!==9)return[];if(!c||typeof c!=="string")return a;var k,d,n,r,t,h=!0,o=m.isXML(e),s=[],w=c;do if(b.exec(""),k=b.exec(w))if(w=k[3],s.push(k[1]),k[2]){r=k[3];break}while(k);if(s.length>1&&q.exec(c))if(s.length===2&&v.relative[s[0]])d=z(s[0]+s[1],e,l);else for(d=v.relative[s[0]]?[e]:m(s.shift(),e);s.length;)c=s.shift(),v.relative[c]&&(c+=s.shift()),d=z(c,d,l);else if(!l&&s.length>1&&e.nodeType===9&&!o&&v.match.ID.test(s[0])&&!v.match.ID.test(s[s.length-1])&&(k=m.find(s.shift(),
e,o),e=k.expr?m.filter(k.expr,k.set)[0]:k.set[0]),e){k=l?{expr:s.pop(),set:x(l)}:m.find(s.pop(),s.length===1&&(s[0]==="~"||s[0]==="+")&&e.parentNode?e.parentNode:e,o);d=k.expr?m.filter(k.expr,k.set):k.set;for(s.length>0?n=x(d):h=!1;s.length;)k=t=s.pop(),v.relative[t]?k=s.pop():t="",k==null&&(k=e),v.relative[t](n,k,o)}else n=[];n||(n=d);n||m.error(t||c);if(g.call(n)==="[object Array]")if(h)if(e&&e.nodeType===1)for(c=0;n[c]!=null;c++)n[c]&&(n[c]===!0||n[c].nodeType===1&&m.contains(e,n[c]))&&a.push(d[c]);
else for(c=0;n[c]!=null;c++)n[c]&&n[c].nodeType===1&&a.push(d[c]);else a.push.apply(a,n);else x(n,a);r&&(m(r,f,a,l),m.uniqueSort(a));return a};m.uniqueSort=function(c){if(y&&(n=t,c.sort(y),n))for(var e=1;e<c.length;e++)c[e]===c[e-1]&&c.splice(e--,1);return c};m.matches=function(c,e){return m(c,null,null,e)};m.matchesSelector=function(c,e){return m(e,null,null,[c]).length>0};m.find=function(c,e,a){var l,b,j,f,k,d;if(!c)return[];for(b=0,j=v.order.length;b<j;b++)if(k=v.order[b],f=v.leftMatch[k].exec(c))if(d=
f[1],f.splice(1,1),d.substr(d.length-1)!=="\\"&&(f[1]=(f[1]||"").replace(h,""),l=v.find[k](f,e,a),l!=null)){c=c.replace(v.match[k],"");break}l||(l=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]);return{set:l,expr:c}};m.filter=function(c,e,a,l){for(var b,j,f,k,g,n,r,t,h=c,s=[],o=e,w=e&&e[0]&&m.isXML(e[0]);c&&e.length;){for(f in v.filter)if((b=v.leftMatch[f].exec(c))!=null&&b[2])if(n=v.filter[f],g=b[1],j=!1,b.splice(1,1),g.substr(g.length-1)!=="\\"){o===s&&(s=[]);if(v.preFilter[f])if(b=
v.preFilter[f](b,o,a,s,l,w)){if(b===!0)continue}else j=k=!0;if(b)for(r=0;(g=o[r])!=null;r++)g&&(k=n(g,b,r,o),t=l^k,a&&k!=null?t?j=!0:o[r]=!1:t&&(s.push(g),j=!0));if(k!==d){a||(o=s);c=c.replace(v.match[f],"");if(!j)return[];break}}if(c===h)if(j==null)m.error(c);else break;h=c}return o};m.error=function(c){throw"Syntax error, unrecognized expression: "+c;};var w=m.getText=function(c){var e,a;e=c.nodeType;var l="";if(e)if(e===1)if(typeof c.textContent==="string")return c.textContent;else if(typeof c.innerText===
"string")return c.innerText.replace(o,"");else for(c=c.firstChild;c;c=c.nextSibling)l+=w(c);else{if(e===3||e===4)return c.nodeValue}else for(e=0;a=c[e];e++)a.nodeType!==8&&(l+=w(a));return l},v=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(c){return c.getAttribute("href")},type:function(c){return c.getAttribute("type")}},relative:{"+":function(c,e){var a=typeof e==="string",l=a&&!s.test(e),
a=a&&!l;l&&(e=e.toLowerCase());for(var l=0,b=c.length,j;l<b;l++)if(j=c[l]){for(;(j=j.previousSibling)&&j.nodeType!==1;);c[l]=a||j&&j.nodeName.toLowerCase()===e?j||!1:j===e}a&&m.filter(e,c,!0)},">":function(c,e){var a,l=typeof e==="string",b=0,j=c.length;if(l&&!s.test(e))for(e=e.toLowerCase();b<j;b++){if(a=c[b])a=a.parentNode,c[b]=a.nodeName.toLowerCase()===e?a:!1}else{for(;b<j;b++)(a=c[b])&&(c[b]=l?a.parentNode:a.parentNode===e);l&&m.filter(e,c,!0)}},"":function(e,b,j){var f,d=k++,g=a;typeof b===
"string"&&!s.test(b)&&(f=b=b.toLowerCase(),g=c);g("parentNode",b,d,e,f,j)},"~":function(e,b,j){var f,d=k++,g=a;typeof b==="string"&&!s.test(b)&&(f=b=b.toLowerCase(),g=c);g("previousSibling",b,d,e,f,j)}},find:{ID:function(c,e,a){if(typeof e.getElementById!=="undefined"&&!a)return(c=e.getElementById(c[1]))&&c.parentNode?[c]:[]},NAME:function(c,e){if(typeof e.getElementsByName!=="undefined"){for(var a=[],b=e.getElementsByName(c[1]),l=0,j=b.length;l<j;l++)b[l].getAttribute("name")===c[1]&&a.push(b[l]);
return a.length===0?null:a}},TAG:function(c,e){if(typeof e.getElementsByTagName!=="undefined")return e.getElementsByTagName(c[1])}},preFilter:{CLASS:function(c,e,a,b,l,j){c=" "+c[1].replace(h,"")+" ";if(j)return c;for(var j=0,f;(f=e[j])!=null;j++)f&&(l^(f.className&&(" "+f.className+" ").replace(/[\t\n\r]/g," ").indexOf(c)>=0)?a||b.push(f):a&&(e[j]=!1));return!1},ID:function(c){return c[1].replace(h,"")},TAG:function(c){return c[1].replace(h,"").toLowerCase()},CHILD:function(c){if(c[1]==="nth"){c[2]||
m.error(c[0]);c[2]=c[2].replace(/^\+|\s*/g,"");var e=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(c[2]==="even"&&"2n"||c[2]==="odd"&&"2n+1"||!/\D/.test(c[2])&&"0n+"+c[2]||c[2]);c[2]=e[1]+(e[2]||1)-0;c[3]=e[3]-0}else c[2]&&m.error(c[0]);c[0]=k++;return c},ATTR:function(c,e,a,b,l,j){e=c[1]=c[1].replace(h,"");!j&&v.attrMap[e]&&(c[1]=v.attrMap[e]);c[4]=(c[4]||c[5]||"").replace(h,"");c[2]==="~="&&(c[4]=" "+c[4]+" ");return c},PSEUDO:function(c,e,a,l,f){if(c[1]==="not")if((b.exec(c[3])||"").length>1||/^\w/.test(c[3]))c[3]=
m(c[3],null,null,e);else return c=m.filter(c[3],e,a,1^f),a||l.push.apply(l,c),!1;else if(v.match.POS.test(c[0])||v.match.CHILD.test(c[0]))return!0;return c},POS:function(c){c.unshift(!0);return c}},filters:{enabled:function(c){return c.disabled===!1&&c.type!=="hidden"},disabled:function(c){return c.disabled===!0},checked:function(c){return c.checked===!0},selected:function(c){return c.selected===!0},parent:function(c){return!!c.firstChild},empty:function(c){return!c.firstChild},has:function(c,e,a){return!!m(a[3],
c).length},header:function(c){return/h\d/i.test(c.nodeName)},text:function(c){var e=c.getAttribute("type"),a=c.type;return c.nodeName.toLowerCase()==="input"&&"text"===a&&(e===a||e===null)},radio:function(c){return c.nodeName.toLowerCase()==="input"&&"radio"===c.type},checkbox:function(c){return c.nodeName.toLowerCase()==="input"&&"checkbox"===c.type},file:function(c){return c.nodeName.toLowerCase()==="input"&&"file"===c.type},password:function(c){return c.nodeName.toLowerCase()==="input"&&"password"===
c.type},submit:function(c){var e=c.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===c.type},image:function(c){return c.nodeName.toLowerCase()==="input"&&"image"===c.type},reset:function(c){var e=c.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===c.type},button:function(c){var e=c.nodeName.toLowerCase();return e==="input"&&"button"===c.type||e==="button"},input:function(c){return/input|select|textarea|button/i.test(c.nodeName)},focus:function(c){return c===c.ownerDocument.activeElement}},
setFilters:{first:function(c,e){return e===0},last:function(c,e,a,b){return e===b.length-1},even:function(c,e){return e%2===0},odd:function(c,e){return e%2===1},lt:function(c,e,a){return e<a[3]-0},gt:function(c,e,a){return e>a[3]-0},nth:function(c,e,a){return a[3]-0===e},eq:function(c,e,a){return a[3]-0===e}},filter:{PSEUDO:function(c,e,a,b){var l=e[1],j=v.filters[l];if(j)return j(c,a,e,b);else if(l==="contains")return(c.textContent||c.innerText||w([c])||"").indexOf(e[3])>=0;else if(l==="not"){e=
e[3];a=0;for(b=e.length;a<b;a++)if(e[a]===c)return!1;return!0}else m.error(l)},CHILD:function(c,e){var a,b,l,j,k,d;a=e[1];d=c;switch(a){case "only":case "first":for(;d=d.previousSibling;)if(d.nodeType===1)return!1;if(a==="first")return!0;d=c;case "last":for(;d=d.nextSibling;)if(d.nodeType===1)return!1;return!0;case "nth":a=e[2];b=e[3];if(a===1&&b===0)return!0;l=e[0];if((j=c.parentNode)&&(j[f]!==l||!c.nodeIndex)){k=0;for(d=j.firstChild;d;d=d.nextSibling)if(d.nodeType===1)d.nodeIndex=++k;j[f]=l}d=c.nodeIndex-
b;return a===0?d===0:d%a===0&&d/a>=0}},ID:function(c,e){return c.nodeType===1&&c.getAttribute("id")===e},TAG:function(c,e){return e==="*"&&c.nodeType===1||!!c.nodeName&&c.nodeName.toLowerCase()===e},CLASS:function(c,e){return(" "+(c.className||c.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(c,e){var a=e[1],a=m.attr?m.attr(c,a):v.attrHandle[a]?v.attrHandle[a](c):c[a]!=null?c[a]:c.getAttribute(a),b=a+"",l=e[2],j=e[4];return a==null?l==="!=":!l&&m.attr?a!=null:l==="="?b===j:l==="*="?b.indexOf(j)>=
0:l==="~="?(" "+b+" ").indexOf(j)>=0:!j?b&&a!==!1:l==="!="?b!==j:l==="^="?b.indexOf(j)===0:l==="$="?b.substr(b.length-j.length)===j:l==="|="?b===j||b.substr(0,j.length+1)===j+"-":!1},POS:function(c,e,a,b){var l=v.setFilters[e[2]];if(l)return l(c,a,e,b)}}},q=v.match.POS,D=function(c,e){return"\\"+(e-0+1)},p;for(p in v.match)v.match[p]=RegExp(v.match[p].source+/(?![^\[]*\])(?![^\(]*\))/.source),v.leftMatch[p]=RegExp(/(^(?:.|\r|\n)*?)/.source+v.match[p].source.replace(/\\(\d+)/g,D));var x=function(c,
e){c=Array.prototype.slice.call(c,0);return e?(e.push.apply(e,c),e):c};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(K){x=function(c,e){var a=0,b=e||[];if(g.call(c)==="[object Array]")Array.prototype.push.apply(b,c);else if(typeof c.length==="number")for(var l=c.length;a<l;a++)b.push(c[a]);else for(;c[a];a++)b.push(c[a]);return b}}var y,B;u.documentElement.compareDocumentPosition?y=function(c,e){return c===e?(n=!0,0):!c.compareDocumentPosition||!e.compareDocumentPosition?c.compareDocumentPosition?
-1:1:c.compareDocumentPosition(e)&4?-1:1}:(y=function(c,e){if(c===e)return n=!0,0;else if(c.sourceIndex&&e.sourceIndex)return c.sourceIndex-e.sourceIndex;var a,b,l=[],j=[];a=c.parentNode;b=e.parentNode;var f=a;if(a===b)return B(c,e);else if(a){if(!b)return 1}else return-1;for(;f;)l.unshift(f),f=f.parentNode;for(f=b;f;)j.unshift(f),f=f.parentNode;a=l.length;b=j.length;for(f=0;f<a&&f<b;f++)if(l[f]!==j[f])return B(l[f],j[f]);return f===a?B(c,j[f],-1):B(l[f],e,1)},B=function(c,e,a){if(c===e)return a;
for(c=c.nextSibling;c;){if(c===e)return-1;c=c.nextSibling}return 1});(function(){var c=u.createElement("div"),e="script"+(new Date).getTime(),a=u.documentElement;c.innerHTML="<a name='"+e+"'/>";a.insertBefore(c,a.firstChild);if(u.getElementById(e))v.find.ID=function(c,e,a){if(typeof e.getElementById!=="undefined"&&!a)return(e=e.getElementById(c[1]))?e.id===c[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===c[1]?[e]:d:[]},v.filter.ID=function(c,e){var a=typeof c.getAttributeNode!==
"undefined"&&c.getAttributeNode("id");return c.nodeType===1&&a&&a.nodeValue===e};a.removeChild(c);a=c=null})();(function(){var c=u.createElement("div");c.appendChild(u.createComment(""));if(c.getElementsByTagName("*").length>0)v.find.TAG=function(c,e){var a=e.getElementsByTagName(c[1]);if(c[1]==="*"){for(var b=[],l=0;a[l];l++)a[l].nodeType===1&&b.push(a[l]);a=b}return a};c.innerHTML="<a href='#'></a>";if(c.firstChild&&typeof c.firstChild.getAttribute!=="undefined"&&c.firstChild.getAttribute("href")!==
"#")v.attrHandle.href=function(c){return c.getAttribute("href",2)};c=null})();u.querySelectorAll&&function(){var c=m,e=u.createElement("div");e.innerHTML="<p class='TEST'></p>";if(!(e.querySelectorAll&&e.querySelectorAll(".TEST").length===0)){m=function(e,a,b,l){a=a||u;if(!l&&!m.isXML(a)){var j=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);if(j&&(a.nodeType===1||a.nodeType===9))if(j[1])return x(a.getElementsByTagName(e),b);else if(j[2]&&v.find.CLASS&&a.getElementsByClassName)return x(a.getElementsByClassName(j[2]),
b);if(a.nodeType===9){if(e==="body"&&a.body)return x([a.body],b);else if(j&&j[3]){var f=a.getElementById(j[3]);if(f&&f.parentNode){if(f.id===j[3])return x([f],b)}else return x([],b)}try{return x(a.querySelectorAll(e),b)}catch(k){}}else if(a.nodeType===1&&a.nodeName.toLowerCase()!=="object"){var j=a,d=(f=a.getAttribute("id"))||"__sizzle__",g=a.parentNode,n=/^\s*[+~]/.test(e);f?d=d.replace(/'/g,"\\$&"):a.setAttribute("id",d);if(n&&g)a=a.parentNode;try{if(!n||g)return x(a.querySelectorAll("[id='"+d+
"'] "+e),b)}catch(r){}finally{f||j.removeAttribute("id")}}}return c(e,a,b,l)};for(var a in c)m[a]=c[a];e=null}}();(function(){var c=u.documentElement,e=c.matchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.msMatchesSelector;if(e){var a=!e.call(u.createElement("div"),"div"),b=!1;try{e.call(u.documentElement,"[test!='']:sizzle")}catch(l){b=!0}m.matchesSelector=function(c,l){l=l.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(c))try{if(b||!v.match.PSEUDO.test(l)&&!/!=/.test(l)){var j=
e.call(c,l);if(j||!a||c.document&&c.document.nodeType!==11)return j}}catch(f){}return m(l,null,null,[c]).length>0}}})();(function(){var c=u.createElement("div");c.innerHTML="<div class='test e'></div><div class='test'></div>";if(c.getElementsByClassName&&c.getElementsByClassName("e").length!==0&&(c.lastChild.className="e",c.getElementsByClassName("e").length!==1))v.order.splice(1,0,"CLASS"),v.find.CLASS=function(c,e,a){if(typeof e.getElementsByClassName!=="undefined"&&!a)return e.getElementsByClassName(c[1])},
c=null})();m.contains=u.documentElement.contains?function(c,e){return c!==e&&(c.contains?c.contains(e):!0)}:u.documentElement.compareDocumentPosition?function(c,e){return!!(c.compareDocumentPosition(e)&16)}:function(){return!1};m.isXML=function(c){return(c=(c?c.ownerDocument||c:0).documentElement)?c.nodeName!=="HTML":!1};var z=function(c,e,a){for(var b,l=[],j="",e=e.nodeType?[e]:e;b=v.match.PSEUDO.exec(c);)j+=b[0],c=c.replace(v.match.PSEUDO,"");c=v.relative[c]?c+"*":c;b=0;for(var f=e.length;b<f;b++)m(c,
e[b],l,a);return m.filter(j,l)};m.attr=e.attr;m.selectors.attrMap={};e.find=m;e.expr=m.selectors;e.expr[":"]=e.expr.filters;e.unique=m.uniqueSort;e.text=m.getText;e.isXMLDoc=m.isXML;e.contains=m.contains})();var $a=/Until$/,ab=/^(?:parents|prevUntil|prevAll)/,bb=/,/,La=/^.[^:#\[\.,]*$/,cb=Array.prototype.slice,xa=e.expr.match.POS,db={children:!0,contents:!0,next:!0,prev:!0};e.fn.extend({find:function(c){var a=this,b,f;if(typeof c!=="string")return e(c).filter(function(){for(b=0,f=a.length;b<f;b++)if(e.contains(a[b],
this))return!0});var k=this.pushStack("","find",c),d,g,n;for(b=0,f=this.length;b<f;b++)if(d=k.length,e.find(c,this[b],k),b>0)for(g=d;g<k.length;g++)for(n=0;n<d;n++)if(k[n]===k[g]){k.splice(g--,1);break}return k},has:function(c){var a=e(c);return this.filter(function(){for(var c=0,b=a.length;c<b;c++)if(e.contains(this,a[c]))return!0})},not:function(c){return this.pushStack(v(this,c,!1),"not",c)},filter:function(c){return this.pushStack(v(this,c,!0),"filter",c)},is:function(c){return!!c&&(typeof c===
"string"?xa.test(c)?e(c,this.context).index(this[0])>=0:e.filter(c,this).length>0:this.filter(c).length>0)},closest:function(c,a){var b=[],f,k,d=this[0];if(e.isArray(c)){for(k=1;d&&d.ownerDocument&&d!==a;){for(f=0;f<c.length;f++)e(d).is(c[f])&&b.push({selector:c[f],elem:d,level:k});d=d.parentNode;k++}return b}var g=xa.test(c)||typeof c!=="string"?e(c,a||this.context):0;for(f=0,k=this.length;f<k;f++)for(d=this[f];d;)if(g?g.index(d)>-1:e.find.matchesSelector(d,c)){b.push(d);break}else if(d=d.parentNode,
!d||!d.ownerDocument||d===a||d.nodeType===11)break;b=b.length>1?e.unique(b):b;return this.pushStack(b,"closest",c)},index:function(c){return!c?this[0]&&this[0].parentNode?this.prevAll().length:-1:typeof c==="string"?e.inArray(this[0],e(c)):e.inArray(c.jquery?c[0]:c,this)},add:function(c,a){var b=typeof c==="string"?e(c,a):e.makeArray(c&&c.nodeType?[c]:c),f=e.merge(this.get(),b);return this.pushStack(!b[0]||!b[0].parentNode||b[0].parentNode.nodeType===11||!f[0]||!f[0].parentNode||f[0].parentNode.nodeType===
11?f:e.unique(f))},andSelf:function(){return this.add(this.prevObject)}});e.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return e.dir(c,"parentNode")},parentsUntil:function(c,a,b){return e.dir(c,"parentNode",b)},next:function(c){return e.nth(c,2,"nextSibling")},prev:function(c){return e.nth(c,2,"previousSibling")},nextAll:function(c){return e.dir(c,"nextSibling")},prevAll:function(c){return e.dir(c,"previousSibling")},nextUntil:function(c,a,b){return e.dir(c,
"nextSibling",b)},prevUntil:function(c,a,b){return e.dir(c,"previousSibling",b)},siblings:function(c){return e.sibling(c.parentNode.firstChild,c)},children:function(c){return e.sibling(c.firstChild)},contents:function(c){return e.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:e.makeArray(c.childNodes)}},function(c,a){e.fn[c]=function(b,f){var k=e.map(this,a,b),d=cb.call(arguments);$a.test(c)||(f=b);f&&typeof f==="string"&&(k=e.filter(f,k));k=this.length>1&&!db[c]?e.unique(k):k;if((this.length>
1||bb.test(f))&&ab.test(c))k=k.reverse();return this.pushStack(k,c,d.join(","))}});e.extend({filter:function(c,a,b){b&&(c=":not("+c+")");return a.length===1?e.find.matchesSelector(a[0],c)?[a[0]]:[]:e.find.matches(c,a)},dir:function(c,a,b){for(var f=[],c=c[a];c&&c.nodeType!==9&&(b===d||c.nodeType!==1||!e(c).is(b));)c.nodeType===1&&f.push(c),c=c[a];return f},nth:function(c,e,a){for(var e=e||1,b=0;c;c=c[a])if(c.nodeType===1&&++b===e)break;return c},sibling:function(c,e){for(var a=[];c;c=c.nextSibling)c.nodeType===
1&&c!==e&&a.push(c);return a}});var oa="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",eb=/ jQuery\d+="(?:\d+|null)"/g,la=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&#?\w+;/,hb=/<(?:script|style)/i,ib=/<(?:script|object|embed|option|style)/i,jb=RegExp("<(?:"+oa.replace(" ","|")+")","i"),Aa=/checked\s*(?:[^=]|=\s*.checked.)/i,
kb=/\/(java|ecma)script/i,Ma=/^\s*<!(?:\[CDATA\[|\-\-)/,H={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},lb=y(u);H.optgroup=H.option;H.tbody=H.tfoot=H.colgroup=H.caption=H.thead;H.th=H.td;if(!e.support.htmlSerialize)H._default=
[1,"div<div>","</div>"];e.fn.extend({text:function(c){return e.isFunction(c)?this.each(function(a){var b=e(this);b.text(c.call(this,a,b.text()))}):typeof c!=="object"&&c!==d?this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(c)):e.text(this)},wrapAll:function(c){if(e.isFunction(c))return this.each(function(a){e(this).wrapAll(c.call(this,a))});if(this[0]){var a=e(c,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&a.insertBefore(this[0]);a.map(function(){for(var c=this;c.firstChild&&
c.firstChild.nodeType===1;)c=c.firstChild;return c}).append(this)}return this},wrapInner:function(c){return e.isFunction(c)?this.each(function(a){e(this).wrapInner(c.call(this,a))}):this.each(function(){var a=e(this),b=a.contents();b.length?b.wrapAll(c):a.append(c)})},wrap:function(c){return this.each(function(){e(this).wrapAll(c)})},unwrap:function(){return this.parent().each(function(){e.nodeName(this,"body")||e(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,
!0,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,!0,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this)});else if(arguments.length){var c=e(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
!1,function(c){this.parentNode.insertBefore(c,this.nextSibling)});else if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,e(arguments[0]).toArray());return c}},remove:function(c,a){for(var b=0,f;(f=this[b])!=null;b++)if(!c||e.filter(c,[f]).length)!a&&f.nodeType===1&&(e.cleanData(f.getElementsByTagName("*")),e.cleanData([f])),f.parentNode&&f.parentNode.removeChild(f);return this},empty:function(){for(var c=0,a;(a=this[c])!=null;c++)for(a.nodeType===1&&e.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);
return this},clone:function(c,a){c=c==null?!1:c;a=a==null?c:a;return this.map(function(){return e.clone(this,c,a)})},html:function(c){if(c===d)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(eb,""):null;else if(typeof c==="string"&&!hb.test(c)&&(e.support.leadingWhitespace||!la.test(c))&&!H[(za.exec(c)||["",""])[1].toLowerCase()]){c=c.replace(ya,"<$1></$2>");try{for(var a=0,b=this.length;a<b;a++)if(this[a].nodeType===1)e.cleanData(this[a].getElementsByTagName("*")),this[a].innerHTML=
c}catch(f){this.empty().append(c)}}else e.isFunction(c)?this.each(function(a){var b=e(this);b.html(c.call(this,a,b.html()))}):this.empty().append(c);return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(e.isFunction(c))return this.each(function(a){var b=e(this),f=b.html();b.replaceWith(c.call(this,a,f))});typeof c!=="string"&&(c=e(c).detach());return this.each(function(){var a=this.nextSibling,b=this.parentNode;e(this).remove();a?e(a).before(c):e(b).append(c)})}else return this.length?
this.pushStack(e(e.isFunction(c)?c():c),"replaceWith",c):this},detach:function(c){return this.remove(c,!0)},domManip:function(c,a,b){var k,g,n,t=c[0],h=[];if(!e.support.checkClone&&arguments.length===3&&typeof t==="string"&&Aa.test(t))return this.each(function(){e(this).domManip(c,a,b,!0)});if(e.isFunction(t))return this.each(function(f){var k=e(this);c[0]=t.call(this,f,a?k.html():d);k.domManip(c,a,b)});if(this[0]){k=t&&t.parentNode;k=e.support.parentNode&&k&&k.nodeType===11&&k.childNodes.length===
this.length?{fragment:k}:e.buildFragment(c,this,h);n=k.fragment;if(g=n.childNodes.length===1?n=n.firstChild:n.firstChild){a=a&&e.nodeName(g,"tr");g=0;for(var m=this.length,s=m-1;g<m;g++)b.call(a?e.nodeName(this[g],"table")?this[g].getElementsByTagName("tbody")[0]||this[g].appendChild(this[g].ownerDocument.createElement("tbody")):this[g]:this[g],k.cacheable||m>1&&g<s?e.clone(n,!0,!0):n)}h.length&&e.each(h,f)}return this}});e.buildFragment=function(c,a,b){var f,k,d,g,n=c[0];a&&a[0]&&(g=a[0].ownerDocument||
a[0]);g.createDocumentFragment||(g=u);if(c.length===1&&typeof n==="string"&&n.length<512&&g===u&&n.charAt(0)==="<"&&!ib.test(n)&&(e.support.checkClone||!Aa.test(n))&&!e.support.unknownElems&&jb.test(n))k=!0,(d=e.fragments[n])&&d!==1&&(f=d);f||(f=g.createDocumentFragment(),e.clean(c,g,f,b));k&&(e.fragments[n]=d?f:1);return{fragment:f,cacheable:k}};e.fragments={};e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,a){e.fn[c]=function(b){var f=
[],b=e(b),k=this.length===1&&this[0].parentNode;if(k&&k.nodeType===11&&k.childNodes.length===1&&b.length===1)return b[a](this[0]),this;else{for(var k=0,d=b.length;k<d;k++){var g=(k>0?this.clone(!0):this).get();e(b[k])[a](g);f=f.concat(g)}return this.pushStack(f,c,b.selector)}}});e.extend({clone:function(c,a,b){var f=c.cloneNode(!0),k,d,g;if((!e.support.noCloneEvent||!e.support.noCloneChecked)&&(c.nodeType===1||c.nodeType===11)&&!e.isXMLDoc(c)){w(c,f);k=n(c);d=n(f);for(g=0;k[g];++g)d[g]&&w(k[g],d[g])}if(a&&
(A(c,f),b)){k=n(c);d=n(f);for(g=0;k[g];++g)A(k[g],d[g])}return f},clean:function(c,a,b,f){a=a||u;typeof a.createElement==="undefined"&&(a=a.ownerDocument||a[0]&&a[0].ownerDocument||u);for(var k=[],d,g=0,n;(n=c[g])!=null;g++)if(typeof n==="number"&&(n+=""),n){if(typeof n==="string")if(gb.test(n)){n=n.replace(ya,"<$1></$2>");d=(za.exec(n)||["",""])[1].toLowerCase();var t=H[d]||H._default,h=t[0],m=a.createElement("div");a===u?lb.appendChild(m):y(a).appendChild(m);for(m.innerHTML=t[1]+n+t[2];h--;)m=m.lastChild;
if(!e.support.tbody){h=fb.test(n);t=d==="table"&&!h?m.firstChild&&m.firstChild.childNodes:t[1]==="<table>"&&!h?m.childNodes:[];for(d=t.length-1;d>=0;--d)e.nodeName(t[d],"tbody")&&!t[d].childNodes.length&&t[d].parentNode.removeChild(t[d])}!e.support.leadingWhitespace&&la.test(n)&&m.insertBefore(a.createTextNode(la.exec(n)[0]),m.firstChild);n=m.childNodes}else n=a.createTextNode(n);var s;if(!e.support.appendChecked)if(n[0]&&typeof(s=n.length)==="number")for(d=0;d<s;d++)x(n[d]);else x(n);n.nodeType?
k.push(n):k=e.merge(k,n)}if(b){c=function(c){return!c.type||kb.test(c.type)};for(g=0;k[g];g++)f&&e.nodeName(k[g],"script")&&(!k[g].type||k[g].type.toLowerCase()==="text/javascript")?f.push(k[g].parentNode?k[g].parentNode.removeChild(k[g]):k[g]):(k[g].nodeType===1&&(a=e.grep(k[g].getElementsByTagName("script"),c),k.splice.apply(k,[g+1,0].concat(a))),b.appendChild(k[g]))}return k},cleanData:function(c){for(var a,b,f=e.cache,k=e.event.special,d=e.support.deleteExpando,g=0,n;(n=c[g])!=null;g++)if(!n.nodeName||
!e.noData[n.nodeName.toLowerCase()])if(b=n[e.expando]){if((a=f[b])&&a.events){for(var t in a.events)k[t]?e.event.remove(n,t):e.removeEvent(n,t,a.handle);if(a.handle)a.handle.elem=null}d?delete n[e.expando]:n.removeAttribute&&n.removeAttribute(e.expando);delete f[b]}}});var ma=/alpha\([^)]*\)/i,mb=/opacity=([^)]*)/,nb=/([A-Z]|^ms)/g,Ba=/^-?\d+(?:px)?$/i,ob=/^-?\d/,pb=/^([\-+])=([\-+.\de]+)/,qb={position:"absolute",visibility:"hidden",display:"block"},Na=["Left","Right"],Oa=["Top","Bottom"],U,Ca,Da;
e.fn.css=function(c,a){return arguments.length===2&&a===d?this:e.access(this,c,a,!0,function(c,a,b){return b!==d?e.style(c,a,b):e.css(c,a)})};e.extend({cssHooks:{opacity:{get:function(c,e){if(e){var a=U(c,"opacity","opacity");return a===""?"1":a}else return c.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":e.support.cssFloat?"cssFloat":"styleFloat"},style:function(c,a,b,f){if(c&&!(c.nodeType===3||c.nodeType===
8||!c.style)){var k,g=e.camelCase(a),n=c.style,t=e.cssHooks[g],a=e.cssProps[g]||g;if(b!==d){f=typeof b;if(f==="string"&&(k=pb.exec(b)))b=+(k[1]+1)*+k[2]+parseFloat(e.css(c,a)),f="number";if(!(b==null||f==="number"&&isNaN(b)))if(f==="number"&&!e.cssNumber[g]&&(b+="px"),!t||!("set"in t)||(b=t.set(c,b))!==d)try{n[a]=b}catch(h){}}else return t&&"get"in t&&(k=t.get(c,!1,f))!==d?k:n[a]}},css:function(c,a,b){var f,k,a=e.camelCase(a);k=e.cssHooks[a];a=e.cssProps[a]||a;a==="cssFloat"&&(a="float");if(k&&"get"in
k&&(f=k.get(c,!0,b))!==d)return f;else if(U)return U(c,a)},swap:function(c,e,a){var b={},f;for(f in e)b[f]=c.style[f],c.style[f]=e[f];a.call(c);for(f in e)c.style[f]=b[f]}});e.curCSS=e.css;e.each(["height","width"],function(c,a){e.cssHooks[a]={get:function(c,b,f){var d;if(b){if(c.offsetWidth!==0)return k(c,a,f);else e.swap(c,qb,function(){d=k(c,a,f)});return d}},set:function(c,e){if(Ba.test(e)){if(e=parseFloat(e),e>=0)return e+"px"}else return e}}});if(!e.support.opacity)e.cssHooks.opacity={get:function(c,
e){return mb.test((e&&c.currentStyle?c.currentStyle.filter:c.style.filter)||"")?parseFloat(RegExp.$1)/100+"":e?"1":""},set:function(c,a){var b=c.style,f=c.currentStyle,k=e.isNumeric(a)?"alpha(opacity="+a*100+")":"",d=f&&f.filter||b.filter||"";b.zoom=1;if(a>=1&&e.trim(d.replace(ma,""))===""&&(b.removeAttribute("filter"),f&&!f.filter))return;b.filter=ma.test(d)?d.replace(ma,k):d+" "+k}};e(function(){if(!e.support.reliableMarginRight)e.cssHooks.marginRight={get:function(c,a){var b;e.swap(c,{display:"inline-block"},
function(){b=a?U(c,"margin-right","marginRight"):c.style.marginRight});return b}}});u.defaultView&&u.defaultView.getComputedStyle&&(Ca=function(c,a){var b,f,a=a.replace(nb,"-$1").toLowerCase();if(!(f=c.ownerDocument.defaultView))return d;if(f=f.getComputedStyle(c,null))b=f.getPropertyValue(a),b===""&&!e.contains(c.ownerDocument.documentElement,c)&&(b=e.style(c,a));return b});u.documentElement.currentStyle&&(Da=function(c,e){var a,b,f=c.currentStyle&&c.currentStyle[e],k=c.style;if(f===null&&k&&(a=
k[e]))f=a;if(!Ba.test(f)&&ob.test(f)){a=k.left;if(b=c.runtimeStyle&&c.runtimeStyle.left)c.runtimeStyle.left=c.currentStyle.left;k.left=e==="fontSize"?"1em":f||0;f=k.pixelLeft+"px";k.left=a;if(b)c.runtimeStyle.left=b}return f===""?"auto":f});U=Ca||Da;if(e.expr&&e.expr.filters)e.expr.filters.hidden=function(c){var a=c.offsetHeight;return c.offsetWidth===0&&a===0||!e.support.reliableHiddenOffsets&&(c.style&&c.style.display||e.css(c,"display"))==="none"},e.expr.filters.visible=function(c){return!e.expr.filters.hidden(c)};
var rb=/%20/g,Pa=/\[\]$/,Ea=/\r?\n/g,sb=/#.*$/,tb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,ub=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,vb=/^(?:GET|HEAD)$/,wb=/^\/\//,Fa=/\?/,xb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,yb=/^(?:select|textarea)/i,pa=/\s+/,zb=/([?&])_=[^&]*/,Ga=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Ha=e.fn.load,ga={},Ia={},S,T,Ja=["*/"]+["*"];try{S=t.href}catch(Fb){S=u.createElement("a"),S.href=
"",S=S.href}T=Ga.exec(S.toLowerCase())||[];e.fn.extend({load:function(c,a,b){if(typeof c!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var f=c.indexOf(" ");if(f>=0)var k=c.slice(f,c.length),c=c.slice(0,f);f="GET";a&&(e.isFunction(a)?(b=a,a=d):typeof a==="object"&&(a=e.param(a,e.ajaxSettings.traditional),f="POST"));var g=this;e.ajax({url:c,type:f,dataType:"html",data:a,complete:function(c,a,f){f=c.responseText;c.isResolved()&&(c.done(function(c){f=c}),g.html(k?e("<div>").append(f.replace(xb,
"")).find(k):f));b&&g.each(b,[f,a,c])}});return this},serialize:function(){return e.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?e.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||yb.test(this.nodeName)||ub.test(this.type))}).map(function(c,a){var b=e(this).val();return b==null?null:e.isArray(b)?e.map(b,function(c){return{name:a.name,value:c.replace(Ea,"\r\n")}}):{name:a.name,value:b.replace(Ea,
"\r\n")}}).get()}});e.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(c,a){e.fn[a]=function(c){return this.bind(a,c)}});e.each(["get","post"],function(c,a){e[a]=function(c,b,f,k){e.isFunction(b)&&(k=k||f,f=b,b=d);return e.ajax({type:a,url:c,data:b,success:f,dataType:k})}});e.extend({getScript:function(c,a){return e.get(c,d,a,"script")},getJSON:function(c,a,b){return e.get(c,a,b,"json")},ajaxSetup:function(c,a){a?z(c,e.ajaxSettings):(a=c,c=e.ajaxSettings);
z(c,a);return c},ajaxSettings:{url:S,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(T[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ja},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":e.parseJSON,
"text xml":e.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:D(ga),ajaxTransport:D(Ia),ajax:function(c,a){function b(c,a,j,l){if(x!==2){x=2;D&&clearTimeout(D);q=d;v=l||"";z.readyState=c>0?4:0;var s,o,w,l=a;if(j){var p=f,K=z,B=p.contents,G=p.dataTypes,A=p.responseFields,C,u,N,E;for(u in A)u in j&&(K[A[u]]=j[u]);for(;G[0]==="*";)G.shift(),C===d&&(C=p.mimeType||K.getResponseHeader("content-type"));if(C)for(u in B)if(B[u]&&B[u].test(C)){G.unshift(u);break}if(G[0]in j)N=G[0];else{for(u in j){if(!G[0]||
p.converters[u+" "+G[0]]){N=u;break}E||(E=u)}N=N||E}N?(N!==G[0]&&G.unshift(N),j=j[N]):j=void 0}else j=d;if(c>=200&&c<300||c===304){if(f.ifModified){if(C=z.getResponseHeader("Last-Modified"))e.lastModified[m]=C;if(C=z.getResponseHeader("Etag"))e.etag[m]=C}if(c===304)l="notmodified",s=!0;else try{C=f;C.dataFilter&&(j=C.dataFilter(j,C.dataType));var X=C.dataTypes;u={};var O,L,ca=X.length,aa,F=X[0],M,ia,H,R,J;for(O=1;O<ca;O++){if(O===1)for(L in C.converters)typeof L==="string"&&(u[L.toLowerCase()]=C.converters[L]);
M=F;F=X[O];if(F==="*")F=M;else if(M!=="*"&&M!==F){ia=M+" "+F;H=u[ia]||u["* "+F];if(!H)for(R in J=d,u)if(aa=R.split(" "),aa[0]===M||aa[0]==="*")if(J=u[aa[1]+" "+F]){R=u[R];R===!0?H=J:J===!0&&(H=R);break}!H&&!J&&e.error("No conversion from "+ia.replace(" "," to "));H!==!0&&(j=H?H(j):J(R(j)))}}o=j;l="success";s=!0}catch(Q){l="parsererror",w=Q}}else if(w=l,!l||c)l="error",c<0&&(c=0);z.status=c;z.statusText=""+(a||l);s?n.resolveWith(k,[o,l,z]):n.rejectWith(k,[z,l,w]);z.statusCode(h);h=d;y&&g.trigger("ajax"+
(s?"Success":"Error"),[z,f,s?o:w]);t.fireWith(k,[z,l]);y&&(g.trigger("ajaxComplete",[z,f]),--e.active||e.event.trigger("ajaxStop"))}}typeof c==="object"&&(a=c,c=d);var a=a||{},f=e.ajaxSetup({},a),k=f.context||f,g=k!==f&&(k.nodeType||k instanceof e)?e(k):e.event,n=e.Deferred(),t=e.Callbacks("once memory"),h=f.statusCode||{},m,s={},o={},v,w,q,D,p,x=0,y,K,z={readyState:0,setRequestHeader:function(c,e){if(!x){var a=c.toLowerCase(),c=o[a]=o[a]||c;s[c]=e}return this},getAllResponseHeaders:function(){return x===
2?v:null},getResponseHeader:function(c){var e;if(x===2){if(!w)for(w={};e=tb.exec(v);)w[e[1].toLowerCase()]=e[2];e=w[c.toLowerCase()]}return e===d?null:e},overrideMimeType:function(c){if(!x)f.mimeType=c;return this},abort:function(c){c=c||"abort";q&&q.abort(c);b(0,c);return this}};n.promise(z);z.success=z.done;z.error=z.fail;z.complete=t.add;z.statusCode=function(c){if(c){var e;if(x<2)for(e in c)h[e]=[h[e],c[e]];else e=c[z.status],z.then(e,e)}return this};f.url=((c||f.url)+"").replace(sb,"").replace(wb,
T[1]+"//");f.dataTypes=e.trim(f.dataType||"*").toLowerCase().split(pa);if(f.crossDomain==null)p=Ga.exec(f.url.toLowerCase()),f.crossDomain=!(!p||!(p[1]!=T[1]||p[2]!=T[2]||(p[3]||(p[1]==="http:"?80:443))!=(T[3]||(T[1]==="http:"?80:443))));if(f.data&&f.processData&&typeof f.data!=="string")f.data=e.param(f.data,f.traditional);B(ga,f,a,z);if(x===2)return!1;y=f.global;f.type=f.type.toUpperCase();f.hasContent=!vb.test(f.type);y&&e.active++===0&&e.event.trigger("ajaxStart");if(!f.hasContent&&(f.data&&(f.url+=
(Fa.test(f.url)?"&":"?")+f.data,delete f.data),m=f.url,f.cache===!1)){p=e.now();var G=f.url.replace(zb,"$1_="+p);f.url=G+(G===f.url?(Fa.test(f.url)?"&":"?")+"_="+p:"")}(f.data&&f.hasContent&&f.contentType!==!1||a.contentType)&&z.setRequestHeader("Content-Type",f.contentType);f.ifModified&&(m=m||f.url,e.lastModified[m]&&z.setRequestHeader("If-Modified-Since",e.lastModified[m]),e.etag[m]&&z.setRequestHeader("If-None-Match",e.etag[m]));z.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?
f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", "+Ja+"; q=0.01":""):f.accepts["*"]);for(K in f.headers)z.setRequestHeader(K,f.headers[K]);if(f.beforeSend&&(f.beforeSend.call(k,z,f)===!1||x===2))return z.abort(),!1;for(K in{success:1,error:1,complete:1})z[K](f[K]);if(q=B(Ia,f,a,z)){z.readyState=1;y&&g.trigger("ajaxSend",[z,f]);f.async&&f.timeout>0&&(D=setTimeout(function(){z.abort("timeout")},f.timeout));try{x=1,q.send(s,b)}catch(A){x<2?b(-1,A):e.error(A)}}else b(-1,"No Transport");return z},param:function(c,
a){var b=[],f=function(c,a){a=e.isFunction(a)?a():a;b[b.length]=encodeURIComponent(c)+"="+encodeURIComponent(a)};if(a===d)a=e.ajaxSettings.traditional;if(e.isArray(c)||c.jquery&&!e.isPlainObject(c))e.each(c,function(){f(this.name,this.value)});else for(var k in c)C(k,c[k],a,f);return b.join("&").replace(rb,"+")}});e.extend({active:0,lastModified:{},etag:{}});var Ab=e.now(),ea=/(\=)\?(&|$)|\?\?/i;e.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return e.expando+"_"+Ab++}});e.ajaxPrefilter("json jsonp",
function(c,b,f){b=c.contentType==="application/x-www-form-urlencoded"&&typeof c.data==="string";if(c.dataTypes[0]==="jsonp"||c.jsonp!==!1&&(ea.test(c.url)||b&&ea.test(c.data))){var k,d=c.jsonpCallback=e.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[d],n=c.url,t=c.data,h="$1"+d+"$2";c.jsonp!==!1&&(n=n.replace(ea,h),c.url===n&&(b&&(t=t.replace(ea,h)),c.data===t&&(n+=(/\?/.test(n)?"&":"?")+c.jsonp+"="+d)));c.url=n;c.data=t;a[d]=function(c){k=[c]};f.always(function(){a[d]=g;if(k&&
e.isFunction(g))a[d](k[0])});c.converters["script json"]=function(){k||e.error(d+" was not called");return k[0]};c.dataTypes[0]="json";return"script"}});e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(c){e.globalEval(c);return c}}});e.ajaxPrefilter("script",function(c){if(c.cache===d)c.cache=!1;if(c.crossDomain)c.type="GET",c.global=!1});e.ajaxTransport("script",
function(c){if(c.crossDomain){var e,a=u.head||u.getElementsByTagName("head")[0]||u.documentElement;return{send:function(b,f){e=u.createElement("script");e.async="async";if(c.scriptCharset)e.charset=c.scriptCharset;e.src=c.url;e.onload=e.onreadystatechange=function(c,b){if(b||!e.readyState||/loaded|complete/.test(e.readyState))e.onload=e.onreadystatechange=null,a&&e.parentNode&&a.removeChild(e),e=d,b||f(200,"success")};a.insertBefore(e,a.firstChild)},abort:function(){if(e)e.onload(0,1)}}}});var na=
a.ActiveXObject?function(){for(var c in W)W[c](0,1)}:!1,Bb=0,W;e.ajaxSettings.xhr=a.ActiveXObject?function(){var c;if(!(c=!this.isLocal&&q()))a:{try{c=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(e){}c=void 0}return c}:q;(function(c){e.extend(e.support,{ajax:!!c,cors:!!c&&"withCredentials"in c})})(e.ajaxSettings.xhr());e.support.ajax&&e.ajaxTransport(function(c){if(!c.crossDomain||e.support.cors){var b;return{send:function(f,k){var g=c.xhr(),n,t;c.username?g.open(c.type,c.url,c.async,c.username,
c.password):g.open(c.type,c.url,c.async);if(c.xhrFields)for(t in c.xhrFields)g[t]=c.xhrFields[t];c.mimeType&&g.overrideMimeType&&g.overrideMimeType(c.mimeType);!c.crossDomain&&!f["X-Requested-With"]&&(f["X-Requested-With"]="XMLHttpRequest");try{for(t in f)g.setRequestHeader(t,f[t])}catch(h){}g.send(c.hasContent&&c.data||null);b=function(a,f){var j,t,h,m,s;try{if(b&&(f||g.readyState===4)){b=d;if(n)g.onreadystatechange=e.noop,na&&delete W[n];if(f)g.readyState!==4&&g.abort();else{j=g.status;h=g.getAllResponseHeaders();
m={};if((s=g.responseXML)&&s.documentElement)m.xml=s;m.text=g.responseText;try{t=g.statusText}catch(o){t=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(v){f||k(-1,v)}m&&k(j,t,m,h)};!c.async||g.readyState===4?b():(n=++Bb,na&&(W||(W={},e(a).unload(na)),W[n]=b),g.onreadystatechange=b)},abort:function(){b&&b(0,1)}}}});var ha={},J,V,Cb=/^(?:toggle|show|hide)$/,Db=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,fa,qa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width",
"marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Z;e.fn.extend({show:function(c,a,b){if(c||c===0)return this.animate(L("show",3),c,a,b);else{for(var b=0,f=this.length;b<f;b++)if(c=this[b],c.style){a=c.style.display;if(!e._data(c,"olddisplay")&&a==="none")a=c.style.display="";a===""&&e.css(c,"display")==="none"&&e._data(c,"olddisplay",M(c.nodeName))}for(b=0;b<f;b++)if(c=this[b],c.style&&(a=c.style.display,a===""||a==="none"))c.style.display=e._data(c,"olddisplay")||"";return this}},
hide:function(c,a,b){if(c||c===0)return this.animate(L("hide",3),c,a,b);else{for(var b=0,f=this.length;b<f;b++)c=this[b],c.style&&(a=e.css(c,"display"),a!=="none"&&!e._data(c,"olddisplay")&&e._data(c,"olddisplay",a));for(b=0;b<f;b++)if(this[b].style)this[b].style.display="none";return this}},_toggle:e.fn.toggle,toggle:function(c,a,b){var f=typeof c==="boolean";e.isFunction(c)&&e.isFunction(a)?this._toggle.apply(this,arguments):c==null||f?this.each(function(){var a=f?c:e(this).is(":hidden");e(this)[a?
"show":"hide"]()}):this.animate(L("toggle",3),c,a,b);return this},fadeTo:function(c,e,a,b){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},c,a,b)},animate:function(c,a,b,f){function k(){var r;d.queue===!1&&e._mark(this);var a=e.extend({},d),b=this.nodeType===1,f=b&&e(this).is(":hidden"),j,g,l,n,t;a.animatedProperties={};for(l in c){j=e.camelCase(l);l!==j&&(c[j]=c[l],delete c[l]);g=c[j];e.isArray(g)?(a.animatedProperties[j]=g[1],r=c[j]=g[0],g=r):a.animatedProperties[j]=
a.specialEasing&&a.specialEasing[j]||a.easing||"swing";if(g==="hide"&&f||g==="show"&&!f)return a.complete.call(this);if(b&&(j==="height"||j==="width"))if(a.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],e.css(this,"display")==="inline"&&e.css(this,"float")==="none")!e.support.inlineBlockNeedsLayout||M(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1}if(a.overflow!=null)this.style.overflow="hidden";for(l in c)if(b=new e.fx(this,a,l),g=c[l],Cb.test(g))if(j=
e._data(this,"toggle"+l)||(g==="toggle"?f?"show":"hide":0))e._data(this,"toggle"+l,j==="show"?"hide":"show"),b[j]();else b[g]();else j=Db.exec(g),n=b.cur(),j?(g=parseFloat(j[2]),t=j[3]||(e.cssNumber[l]?"":"px"),t!=="px"&&(e.style(this,l,(g||1)+t),n*=(g||1)/b.cur(),e.style(this,l,n+t)),j[1]&&(g=(j[1]==="-="?-1:1)*g+n),b.custom(n,g,t)):b.custom(n,g,"");return!0}var d=e.speed(a,b,f);if(e.isEmptyObject(c))return this.each(d.complete,[!1]);c=e.extend({},c);return d.queue===!1?this.each(k):this.queue(d.queue,
k)},stop:function(c,a,b){typeof c!=="string"&&(b=a,a=c,c=d);a&&c!==!1&&this.queue(c||"fx",[]);return this.each(function(){function a(c,f,k){f=f[k];e.removeData(c,k,!0);f.stop(b)}var f,k=!1,d=e.timers,g=e._data(this);b||e._unmark(!0,this);if(c==null)for(f in g)g[f].stop&&f.indexOf(".run")===f.length-4&&a(this,g,f);else g[f=c+".run"]&&g[f].stop&&a(this,g,f);for(f=d.length;f--;)if(d[f].elem===this&&(c==null||d[f].queue===c)){if(b)d[f](!0);else d[f].saveState();k=!0;d.splice(f,1)}(!b||!k)&&e.dequeue(this,
c)})}});e.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(c,a){e.fn[c]=function(c,e,b){return this.animate(a,c,e,b)}});e.extend({speed:function(c,a,b){var f=c&&typeof c==="object"?e.extend({},c):{complete:b||!b&&a||e.isFunction(c)&&c,duration:c,easing:b&&a||a&&!e.isFunction(a)&&a};f.duration=e.fx.off?0:typeof f.duration==="number"?f.duration:f.duration in e.fx.speeds?e.fx.speeds[f.duration]:
e.fx.speeds._default;if(f.queue==null||f.queue===!0)f.queue="fx";f.old=f.complete;f.complete=function(c){e.isFunction(f.old)&&f.old.call(this);f.queue?e.dequeue(this,f.queue):c!==!1&&e._unmark(this)};return f},easing:{linear:function(c,e,a,b){return a+b*c},swing:function(c,e,a,b){return(-Math.cos(c*Math.PI)/2+0.5)*b+a}},timers:[],fx:function(c,e,a){this.options=e;this.elem=c;this.prop=a;e.orig=e.orig||{}}});e.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,
this);(e.fx.step[this.prop]||e.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var c,a=e.css(this.elem,this.prop);return isNaN(c=parseFloat(a))?!a||a==="auto"?0:a:c},custom:function(c,a,b){function f(c){return k.step(c)}var k=this,g=e.fx;this.startTime=Z||E();this.end=a;this.now=this.start=c;this.pos=this.state=0;this.unit=b||this.unit||(e.cssNumber[this.prop]?"":"px");f.queue=this.options.queue;
f.elem=this.elem;f.saveState=function(){k.options.hide&&e._data(k.elem,"fxshow"+k.prop)===d&&e._data(k.elem,"fxshow"+k.prop,k.start)};f()&&e.timers.push(f)&&!fa&&(fa=setInterval(g.tick,g.interval))},show:function(){var c=e._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=c||e.style(this.elem,this.prop);this.options.show=!0;c!==d?this.custom(this.cur(),c):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());e(this.elem).show()},hide:function(){this.options.orig[this.prop]=
e._data(this.elem,"fxshow"+this.prop)||e.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(c){var a,b=Z||E(),f=!0,k=this.elem,d=this.options;if(c||b>=d.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();d.animatedProperties[this.prop]=!0;for(a in d.animatedProperties)d.animatedProperties[a]!==!0&&(f=!1);if(f){d.overflow!=null&&!e.support.shrinkWrapBlocks&&e.each(["","X","Y"],function(c,e){k.style["overflow"+e]=d.overflow[c]});d.hide&&
e(k).hide();if(d.hide||d.show)for(a in d.animatedProperties)e.style(k,a,d.orig[a]),e.removeData(k,"fxshow"+a,!0),e.removeData(k,"toggle"+a,!0);if(c=d.complete)d.complete=!1,c.call(k)}return!1}else d.duration==Infinity?this.now=b:(c=b-this.startTime,this.state=c/d.duration,this.pos=e.easing[d.animatedProperties[this.prop]](this.state,c,0,1,d.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}};e.extend(e.fx,{tick:function(){for(var c,a=e.timers,b=0;b<a.length;b++)c=
a[b],!c()&&a[b]===c&&a.splice(b--,1);a.length||e.fx.stop()},interval:13,stop:function(){clearInterval(fa);fa=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){e.style(c.elem,"opacity",c.now)},_default:function(c){c.elem.style&&c.elem.style[c.prop]!=null?c.elem.style[c.prop]=c.now+c.unit:c.elem[c.prop]=c.now}}});e.each(["width","height"],function(c,a){e.fx.step[a]=function(c){e.style(c.elem,a,Math.max(0,c.now))}});if(e.expr&&e.expr.filters)e.expr.filters.animated=function(c){return e.grep(e.timers,
function(e){return c===e.elem}).length};var Eb=/^t(?:able|d|h)$/i,Ka=/^(?:body|html)$/i;e.fn.offset="getBoundingClientRect"in u.documentElement?function(c){var a=this[0],b;if(c)return this.each(function(a){e.offset.setOffset(this,c,a)});if(!a||!a.ownerDocument)return null;if(a===a.ownerDocument.body)return e.offset.bodyOffset(a);try{b=a.getBoundingClientRect()}catch(f){}var k=a.ownerDocument,d=k.documentElement;if(!b||!e.contains(d,a))return b?{top:b.top,left:b.left}:{top:0,left:0};a=k.body;k=F(k);
return{top:b.top+(k.pageYOffset||e.support.boxModel&&d.scrollTop||a.scrollTop)-(d.clientTop||a.clientTop||0),left:b.left+(k.pageXOffset||e.support.boxModel&&d.scrollLeft||a.scrollLeft)-(d.clientLeft||a.clientLeft||0)}}:function(c){var a=this[0];if(c)return this.each(function(a){e.offset.setOffset(this,c,a)});if(!a||!a.ownerDocument)return null;if(a===a.ownerDocument.body)return e.offset.bodyOffset(a);var b,f=a.offsetParent,k=a.ownerDocument,d=k.documentElement,g=k.body;b=(k=k.defaultView)?k.getComputedStyle(a,
null):a.currentStyle;for(var n=a.offsetTop,t=a.offsetLeft;(a=a.parentNode)&&a!==g&&a!==d;){if(e.support.fixedPosition&&b.position==="fixed")break;b=k?k.getComputedStyle(a,null):a.currentStyle;n-=a.scrollTop;t-=a.scrollLeft;if(a===f){n+=a.offsetTop;t+=a.offsetLeft;if(e.support.doesNotAddBorder&&(!e.support.doesAddBorderForTableAndCells||!Eb.test(a.nodeName)))n+=parseFloat(b.borderTopWidth)||0,t+=parseFloat(b.borderLeftWidth)||0;f=a.offsetParent}e.support.subtractsBorderForOverflowNotVisible&&b.overflow!==
"visible"&&(n+=parseFloat(b.borderTopWidth)||0,t+=parseFloat(b.borderLeftWidth)||0)}if(b.position==="relative"||b.position==="static")n+=g.offsetTop,t+=g.offsetLeft;e.support.fixedPosition&&b.position==="fixed"&&(n+=Math.max(d.scrollTop,g.scrollTop),t+=Math.max(d.scrollLeft,g.scrollLeft));return{top:n,left:t}};e.offset={bodyOffset:function(c){var a=c.offsetTop,b=c.offsetLeft;e.support.doesNotIncludeMarginInBodyOffset&&(a+=parseFloat(e.css(c,"marginTop"))||0,b+=parseFloat(e.css(c,"marginLeft"))||0);
return{top:a,left:b}},setOffset:function(c,a,b){var f=e.css(c,"position");if(f==="static")c.style.position="relative";var k=e(c),d=k.offset(),g=e.css(c,"top"),n=e.css(c,"left"),t={},h={};(f==="absolute"||f==="fixed")&&e.inArray("auto",[g,n])>-1?(h=k.position(),f=h.top,n=h.left):(f=parseFloat(g)||0,n=parseFloat(n)||0);e.isFunction(a)&&(a=a.call(c,b,d));if(a.top!=null)t.top=a.top-d.top+f;if(a.left!=null)t.left=a.left-d.left+n;"using"in a?a.using.call(c,t):k.css(t)}};e.fn.extend({position:function(){if(!this[0])return null;
var c=this[0],a=this.offsetParent(),b=this.offset(),f=Ka.test(a[0].nodeName)?{top:0,left:0}:a.offset();b.top-=parseFloat(e.css(c,"marginTop"))||0;b.left-=parseFloat(e.css(c,"marginLeft"))||0;f.top+=parseFloat(e.css(a[0],"borderTopWidth"))||0;f.left+=parseFloat(e.css(a[0],"borderLeftWidth"))||0;return{top:b.top-f.top,left:b.left-f.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||u.body;c&&!Ka.test(c.nodeName)&&e.css(c,"position")==="static";)c=c.offsetParent;return c})}});
e.each(["Left","Top"],function(c,a){var b="scroll"+a;e.fn[b]=function(a){var f,k;if(a===d){f=this[0];return!f?null:(k=F(f))?"pageXOffset"in k?k[c?"pageYOffset":"pageXOffset"]:e.support.boxModel&&k.document.documentElement[b]||k.document.body[b]:f[b]}return this.each(function(){(k=F(this))?k.scrollTo(!c?a:e(k).scrollLeft(),c?a:e(k).scrollTop()):this[b]=a})}});e.each(["Height","Width"],function(c,a){var b=a.toLowerCase();e.fn["inner"+a]=function(){var c=this[0];return c?c.style?parseFloat(e.css(c,b,
"padding")):this[b]():null};e.fn["outer"+a]=function(c){var a=this[0];return a?a.style?parseFloat(e.css(a,b,c?"margin":"border")):this[b]():null};e.fn[b]=function(c){var f=this[0];if(!f)return c==null?null:this;if(e.isFunction(c))return this.each(function(a){var f=e(this);f[b](c.call(this,a,f[b]()))});if(e.isWindow(f)){var k=f.document.documentElement["client"+a],g=f.document.body;return f.document.compatMode==="CSS1Compat"&&k||g&&g["client"+a]||k}else return f.nodeType===9?Math.max(f.documentElement["client"+
a],f.body["scroll"+a],f.documentElement["scroll"+a],f.body["offset"+a],f.documentElement["offset"+a]):c===d?(f=e.css(f,b),k=parseFloat(f),e.isNumeric(k)?k:f):this.css(b,typeof c==="string"?c:c+"px")}});a.jQuery=a.$=e})(window);
jQuery.effects||function(a,d){function b(b){var d;return b&&b.constructor==Array&&b.length==3?b:(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10)]:(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55]:(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(d[1],16),parseInt(d[2],
16),parseInt(d[3],16)]:(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(b)?v.transparent:v[a.trim(b).toLowerCase()]}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},d,g;if(a&&a.length&&a[0]&&a[a[0]])for(var f=a.length;f--;)d=a[f],typeof a[d]=="string"&&(g=d.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[g]=a[d]);else for(d in a)typeof a[d]===
"string"&&(b[d]=a[d]);return b}function p(b){var d,g;for(d in b)g=b[d],(g==null||a.isFunction(g)||d in A||/scrollbar/.test(d)||!/color/i.test(d)&&isNaN(parseFloat(g)))&&delete b[d];return b}function m(a,b){var d={_:0},g;for(g in b)a[g]!=b[g]&&(d[g]=b[g]);return d}function g(b,d,g,h){if(typeof b=="object")h=d,g=null,d=b,b=d.effect;a.isFunction(d)&&(h=d,g=null,d={});if(typeof d=="number"||a.fx.speeds[d])h=g,g=d,d={};a.isFunction(g)&&(h=g,g=null);d=d||{};g=g||d.duration;g=a.fx.off?0:typeof g=="number"?
g:g in a.fx.speeds?a.fx.speeds[g]:a.fx.speeds._default;h=h||d.complete;return[b,d,g,h]}function o(b){return!b||typeof b==="number"||a.fx.speeds[b]?!0:typeof b==="string"&&!a.effects[b]?!0:!1}a.effects={};a.each("backgroundColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor,borderColor,color,outlineColor".split(","),function(d,g){a.fx.step[g]=function(d){if(!d.colorInit){var h;h=d.elem;var f=g,k;do{k=a.curCSS(h,f);if(k!=""&&k!="transparent"||a.nodeName(h,"body"))break;f="backgroundColor"}while(h=
h.parentNode);h=b(k);d.start=h;d.end=b(d.end);d.colorInit=!0}d.elem.style[g]="rgb("+Math.max(Math.min(parseInt(d.pos*(d.end[0]-d.start[0])+d.start[0],10),255),0)+","+Math.max(Math.min(parseInt(d.pos*(d.end[1]-d.start[1])+d.start[1],10),255),0)+","+Math.max(Math.min(parseInt(d.pos*(d.end[2]-d.start[2])+d.start[2],10),255),0)+")"}});var v={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],
darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],
maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},y=["add","remove","toggle"],A={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,d,g,o){a.isFunction(g)&&(o=g,g=null);return this.queue(function(){var f=a(this),k=f.attr("style")||
" ",v=p(h.call(this)),B,z=f.attr("class");a.each(y,function(a,k){if(b[k])f[k+"Class"](b[k])});B=p(h.call(this));f.attr("class",z);f.animate(m(v,B),{queue:!1,duration:d,easing:g,complete:function(){a.each(y,function(a,k){if(b[k])f[k+"Class"](b[k])});typeof f.attr("style")=="object"?(f.attr("style").cssText="",f.attr("style").cssText=k):f.attr("style",k);o&&o.apply(this,arguments);a.dequeue(this)}})})};a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,d,g,h){return d?a.effects.animateClass.apply(this,
[{add:b},d,g,h]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,d,g,h){return d?a.effects.animateClass.apply(this,[{remove:b},d,g,h]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(b,g,h,m,f){return typeof g=="boolean"||g===d?h?a.effects.animateClass.apply(this,[g?{add:b}:{remove:b},h,m,f]):this._toggleClass(b,g):a.effects.animateClass.apply(this,[{toggle:b},g,h,m])},switchClass:function(b,d,g,h,f){return a.effects.animateClass.apply(this,[{add:d,
remove:b},g,h,f])}});a.extend(a.effects,{version:"1.8.16",save:function(a,b){for(var d=0;d<b.length;d++)b[d]!==null&&a.data("ec.storage."+b[d],a[0].style[b[d]])},restore:function(a,b){for(var d=0;d<b.length;d++)b[d]!==null&&a.css(b[d],a.data("ec.storage."+b[d]))},setMode:function(a,b){b=="toggle"&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var d,g;switch(a[0]){case "top":d=0;break;case "middle":d=0.5;break;case "bottom":d=1;break;default:d=a[0]/b.height}switch(a[1]){case "left":g=
0;break;case "center":g=0.5;break;case "right":g=1;break;default:g=a[1]/b.width}return{x:g,y:d}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var d={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},g=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),h=document.activeElement;b.wrap(g);(b[0]===h||a.contains(b[0],h))&&a(h).focus();g=b.parent();b.css("position")==
"static"?(g.css({position:"relative"}),b.css({position:"relative"})):(a.extend(d,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,k){d[k]=b.css(k);isNaN(parseInt(d[k],10))&&(d[k]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return g.css(d).show()},removeWrapper:function(b){var d,g=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(d=b.parent().replaceWith(b),(b[0]===g||a.contains(b[0],g))&&a(g).focus(),
d):b},setTransition:function(b,d,g,h){h=h||{};a.each(d,function(a,d){unit=b.cssUnit(d);unit[0]>0&&(h[d]=unit[0]*g+unit[1])});return h}});a.fn.extend({effect:function(b,d,h,m){var f=g.apply(this,arguments),k={options:f[1],duration:f[2],callback:f[3]},f=k.options.mode,o=a.effects[b];return a.fx.off||!o?f?this[f](k.duration,k.callback):this.each(function(){k.callback&&k.callback.call(this)}):o.call(this,k)},_show:a.fn.show,show:function(a){if(o(a))return this._show.apply(this,arguments);else{var b=g.apply(this,
arguments);b[1].mode="show";return this.effect.apply(this,b)}},_hide:a.fn.hide,hide:function(a){if(o(a))return this._hide.apply(this,arguments);else{var b=g.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)}},__toggle:a.fn.toggle,toggle:function(b){if(o(b)||typeof b==="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);else{var d=g.apply(this,arguments);d[1].mode="toggle";return this.effect.apply(this,d)}},cssUnit:function(b){var d=this.css(b),g=[];a.each(["em",
"px","%","pt"],function(a,b){d.indexOf(b)>0&&(g=[parseFloat(d),b])});return g}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(b,d,g,h,f){return a.easing[a.easing.def](b,d,g,h,f)},easeInQuad:function(a,b,d,g,f){return g*(b/=f)*b+d},easeOutQuad:function(a,b,d,g,f){return-g*(b/=f)*(b-2)+d},easeInOutQuad:function(a,b,d,g,f){return(b/=f/2)<1?g/2*b*b+d:-g/2*(--b*(b-2)-1)+d},easeInCubic:function(a,b,d,g,f){return g*(b/=f)*b*b+d},easeOutCubic:function(a,b,d,g,f){return g*
((b=b/f-1)*b*b+1)+d},easeInOutCubic:function(a,b,d,g,f){return(b/=f/2)<1?g/2*b*b*b+d:g/2*((b-=2)*b*b+2)+d},easeInQuart:function(a,b,d,g,f){return g*(b/=f)*b*b*b+d},easeOutQuart:function(a,b,d,g,f){return-g*((b=b/f-1)*b*b*b-1)+d},easeInOutQuart:function(a,b,d,g,f){return(b/=f/2)<1?g/2*b*b*b*b+d:-g/2*((b-=2)*b*b*b-2)+d},easeInQuint:function(a,b,d,g,f){return g*(b/=f)*b*b*b*b+d},easeOutQuint:function(a,b,d,g,f){return g*((b=b/f-1)*b*b*b*b+1)+d},easeInOutQuint:function(a,b,d,g,f){return(b/=f/2)<1?g/2*
b*b*b*b*b+d:g/2*((b-=2)*b*b*b*b+2)+d},easeInSine:function(a,b,d,g,f){return-g*Math.cos(b/f*(Math.PI/2))+g+d},easeOutSine:function(a,b,d,g,f){return g*Math.sin(b/f*(Math.PI/2))+d},easeInOutSine:function(a,b,d,g,f){return-g/2*(Math.cos(Math.PI*b/f)-1)+d},easeInExpo:function(a,b,d,g,f){return b==0?d:g*Math.pow(2,10*(b/f-1))+d},easeOutExpo:function(a,b,d,g,f){return b==f?d+g:g*(-Math.pow(2,-10*b/f)+1)+d},easeInOutExpo:function(a,b,d,g,f){return b==0?d:b==f?d+g:(b/=f/2)<1?g/2*Math.pow(2,10*(b-1))+d:g/
2*(-Math.pow(2,-10*--b)+2)+d},easeInCirc:function(a,b,d,g,f){return-g*(Math.sqrt(1-(b/=f)*b)-1)+d},easeOutCirc:function(a,b,d,g,f){return g*Math.sqrt(1-(b=b/f-1)*b)+d},easeInOutCirc:function(a,b,d,g,f){return(b/=f/2)<1?-g/2*(Math.sqrt(1-b*b)-1)+d:g/2*(Math.sqrt(1-(b-=2)*b)+1)+d},easeInElastic:function(a,b,d,g,f){var a=1.70158,k=0,h=g;if(b==0)return d;if((b/=f)==1)return d+g;k||(k=f*0.3);h<Math.abs(g)?(h=g,a=k/4):a=k/(2*Math.PI)*Math.asin(g/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/
k))+d},easeOutElastic:function(a,b,d,g,f){var a=1.70158,k=0,h=g;if(b==0)return d;if((b/=f)==1)return d+g;k||(k=f*0.3);h<Math.abs(g)?(h=g,a=k/4):a=k/(2*Math.PI)*Math.asin(g/h);return h*Math.pow(2,-10*b)*Math.sin((b*f-a)*2*Math.PI/k)+g+d},easeInOutElastic:function(a,b,d,g,f){var a=1.70158,k=0,h=g;if(b==0)return d;if((b/=f/2)==2)return d+g;k||(k=f*0.3*1.5);h<Math.abs(g)?(h=g,a=k/4):a=k/(2*Math.PI)*Math.asin(g/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/k)+d:h*Math.pow(2,-10*
(b-=1))*Math.sin((b*f-a)*2*Math.PI/k)*0.5+g+d},easeInBack:function(a,b,g,h,f,k){k==d&&(k=1.70158);return h*(b/=f)*b*((k+1)*b-k)+g},easeOutBack:function(a,b,g,h,f,k){k==d&&(k=1.70158);return h*((b=b/f-1)*b*((k+1)*b+k)+1)+g},easeInOutBack:function(a,b,g,h,f,k){k==d&&(k=1.70158);return(b/=f/2)<1?h/2*b*b*(((k*=1.525)+1)*b-k)+g:h/2*((b-=2)*b*(((k*=1.525)+1)*b+k)+2)+g},easeInBounce:function(b,d,g,h,f){return h-a.easing.easeOutBounce(b,f-d,0,h,f)+g},easeOutBounce:function(a,b,d,g,f){return(b/=f)<1/2.75?
g*7.5625*b*b+d:b<2/2.75?g*(7.5625*(b-=1.5/2.75)*b+0.75)+d:b<2.5/2.75?g*(7.5625*(b-=2.25/2.75)*b+0.9375)+d:g*(7.5625*(b-=2.625/2.75)*b+0.984375)+d},easeInOutBounce:function(b,d,g,h,f){return d<f/2?a.easing.easeInBounce(b,d*2,0,h,f)*0.5+g:a.easing.easeOutBounce(b,d*2-f,0,h,f)*0.5+h*0.5+g}})}(jQuery);if(window.Storage)Storage.prototype.setObject=function(a,d){this.setItem(a,JSON.stringify(d))},Storage.prototype.getObject=function(a){return this.getItem(a)&&JSON.parse(this.getItem(a))};
if(!("reduce"in Array.prototype))Array.prototype.reduce=function(a){var d=this.length>>>0;if(typeof a!="function")throw new TypeError;if(d===0&&arguments.length==1)throw new TypeError;var b=0,h;if(arguments.length>=2)h=arguments[1];else{do{if(b in this){h=this[b++];break}if(++b>=d)throw new TypeError;}while(1)}for(;b<d;b++)b in this&&(h=a.call(null,h,this[b],b,this));return h};
if(!("forEach"in Array.prototype))Array.prototype.forEach=function(a,d){for(var b=0,h=this.length;b<h;b++)b in this&&a.call(d,this[b],b,this)};Array.prototype.contains=function(a){for(var d=this.length;d--;)if(this[d]===a)return!0;return!1};Array.prototype.joinObjects=function(a,d){var b=this.length;if(b===0)return"";for(var h="",p=0;p<b;p++)h+=this[p][a]+d;return h.slice(0,-1)};String.prototype.trim=function(){return this.replace(" & ","")};
(function(){function a(){}a.MONTH_NAMES="Januar,Februar,Mars,April,Mai,Juni,Juli,August,September,Oktober,November,Desember".split(",");a.MONTH_SHORTNAMES="Jan,Feb,Mar,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Des".split(",");a.DAYS="Søndag,Mandag,Tirsdag,Onsdag,Torsdag,Fredag,Lørdag".split(",");a.DAYS_SHORTNAMES="Søn,Man,Tir,Ons,Tor,Fre,Lør".split(",");a.DAY_IN_MS=864E5;a.HOUR_IN_MS=36E5;a.MINUTE_IN_MS=6E4;a.getNow=function(){return new Date};a.getNowDate=function(){return a.normalizeDate(a.getNow())};a.formatTime=
function(d,b){return a.lPad(d)+":"+a.lPad(b)};a.formatDate=function(d){return d.getDate()+". "+a.MONTH_NAMES[d.getMonth()].toLowerCase()};a.hoursBetweenDates=function(a,b){return a/1E3/60/60-b/1E3/60/60};a.isoDate=function(d){return d.getFullYear()+"-"+a.lPad(d.getMonth()+1)+"-"+a.lPad(d.getDate())};a.formatDay=function(d,b){var h=a.getNow(),h=a.daysBetweenDates(d,h);if(h===0)return b?"I dag":"i dag";else if(h==-1)return b?"I går":"i går";else if(h==1)return b?"I morgen":"i morgen";else{var h=b?a.DAYS[d.getDay()]:
a.DAYS[d.getDay()].toLowerCase(),p=a.MONTH_NAMES[d.getMonth()].toLowerCase();return h+" "+d.getDate()+". "+p}};a.daysBetweenDates=function(d,b){var h=a.normalizeDate(d).getTime(),p=a.normalizeDate(b).getTime();return Math.round((h-p)/a.DAY_IN_MS)};a.minutesBetweenDates=function(d,b){var h=d.getTime(),p=b.getTime();return Math.round((h-p)/a.MINUTE_IN_MS)};a.addDaysToDate=function(d,b){var h=null;d&&(h=d.getTime()+parseInt(b*a.DAY_IN_MS,10),h=new Date(h));return h};a.addMinutesToDate=function(d,b){var h=
null;d&&(h=d.getTime()+parseInt(b*a.MINUTE_IN_MS,10),h=new Date(h));return h};a.normalizeDate=function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())};a.parseDate=function(a){var b=a.split(" "),a=b[0].split(/-|\//);a[1]-=1;for(var b=b.length>1?b[1].split(":"):[],h=0;h<3;h++)b[h]=b[h]||0;return new Date(a[0],a[1],a[2],b[0],b[1],b[2])};a.getTimeRangeForDate=function(a){var a=new Date(a.getFullYear(),a.getMonth(),a.getDate()),b=GET.SCHEDULE_HOURS_OFFSET*36E5,h=864E5+b;return{start:new Date(a.getTime()+
b),end:new Date(a.getTime()+h)}};a.lPad=function(a){return a<10?"0"+a:a};a.formatDateForServer=function(d){return d.getFullYear()+"-"+a.lPad(d.getMonth()+1)+"-"+a.lPad(d.getDate())+"T"+a.lPad(d.getHours())+":"+a.lPad(d.getMinutes())};window.DateUtils=a})();
(function(){function a(){}a.REST_URL="/rest/";a.LOGO_CMS_URL=a.REST_URL+"open/image/cms/resize?key=";a.COVER_IMAGE_URL=a.REST_URL+"open/image/web/resize?path=";a.prepareRestUrl=function(d){return a.REST_URL+d};a.getChannelLogoUrl=function(d,b,h){if(d){d=h&&d.logoWhiteBgKey?a.LOGO_CMS_URL+d.logoWhiteBgKey:d.logoBlackBgKey?a.LOGO_CMS_URL+d.logoBlackBgKey:a.LOGO_CMS_URL+d.logoWhiteBgKey;if(b===void 0)b=ImageUtils.LOGO_MEDIUM;b=ImageUtils.getLogoDimensions(b);d+="&width="+b.width+"&height="+b.height;
return d}};a.getMovieImageUrl=function(d,b){var h=a.COVER_IMAGE_URL+d;b.width&&(h+="&width="+b.width);return h};window.UrlUtils=a})();(function(){function a(){}a.LOGO_SMALL=1;a.LOGO_MEDIUM=2;a.LOGO_LARGE=3;a.getLogoDimensions=function(d){var b=80,h=60;if(d==a.LOGO_MEDIUM)b=130,h=90;else if(d==a.LOGO_LARGE)b=200,h=100;else if(d.width!==void 0&&d.height!==void 0)b=d.width,h=d.height;return{width:b,height:h}};window.ImageUtils=a})();
(function(){function a(a,d){this.width=a;this.height=d}function d(){}window.Viewport=a;d.getViewport=function(){return typeof window.innerWidth!="undefined"?new a(window.innerWidth,window.innerHeight):typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!==0?new a(document.documentElement.clientWidth,document.documentElement.clientHeight):new a(document.getElementsByTagName("body")[0].clientWidth,document.getElementsByTagName("body")[0].clientHeight)};
d.extend=function(a,d){if(typeof d=="object")for(i in d)a[i]=d[i];return a};window.Utils=d})();function Package(a,d,b){this.id=a;this.name=d;this.channels=b}
function Channel(a,d,b,h){this.id=a;this.name=d;this.logoWhiteBgKey=b;this.logoBlackBgKey=h;this.bigBlackImage=UrlUtils.getChannelLogoUrl(this,ImageUtils.LOGO_LARGE);this.smallBlackImage=UrlUtils.getChannelLogoUrl(this,ImageUtils.LOGO_SMALL);this.mediumBlackImage=UrlUtils.getChannelLogoUrl(this,ImageUtils.LOGO_MEDIUM);this.bigWhiteImage=UrlUtils.getChannelLogoUrl(this,ImageUtils.LOGO_LARGE,!0);this.smallWhiteImage=UrlUtils.getChannelLogoUrl(this,ImageUtils.LOGO_SMALL,!0);this.mediumWhiteImage=UrlUtils.getChannelLogoUrl(this,
ImageUtils.LOGO_MEDIUM,!0);this.programs=[];this.hasPrograms=!1;this.addProgram=function(a){this.programs.push(a);this.hasPrograms=!0};this.getProgramById=function(a){for(var b=this.programs.length,d=0;d<b;d++)if(this.programs[d].id==a)return this.programs[d];return null}}
function Program(a,d,b,h,p,m,g,o,v){this.id=a;this.title=d;this.startsAt=b;this.duration=h;this.channelId=p;this.description=m;this.status=g;this.genre=o;this.channelName=v;var y,A=this,w;this.getEndsAt=function(){w||(w=new Date(this.startsAt.getTime()+this.getDurationInMinutes()*6E4));return w};this.getDurationInMinutes=function(){return this.duration.getDurationInMinutes()};this.getProgressInMinutes=function(a){return(a.getTime()-this.startsAt.getTime())/1E3/60};this.getStartInMinutes=function(){y||
(y=parseInt(this.startsAt.getHours(),10)*60+parseInt(this.startsAt.getMinutes(),10));return y};this.getTimeInfo=function(){return DateUtils.formatTime(b.getHours(),b.getMinutes())};this.getProgramDate=function(){return DateUtils.isoDate(this.startsAt)};this.formatDay=function(){return DateUtils.formatDay(this.startsAt,!0)};this.getTimeInfoWithDuration=function(){var a=A.getEndsAt();return DateUtils.formatTime(b.getHours(),b.getMinutes())+" - "+DateUtils.formatTime(a.getHours(),a.getMinutes())};this.getTimeInfoWithDate=
function(){var a=A.getEndsAt(),d='<span class="time">';d+=DateUtils.formatTime(b.getHours(),b.getMinutes());d+=" - "+DateUtils.formatTime(a.getHours(),a.getMinutes());d+='</span> <span class="date">'+DateUtils.formatDay(b)+"</span>";return d};this.inProgress=function(a){return a>b&&a<A.getEndsAt()};this.getProgramStatusClass=function(a){var b="";this.status==-1?b="completed":this.status===0&&(b="inProgress");b!==""&&a&&(b=' class="'+b+'"');return b}}
function Duration(a,d){this.hours=a;this.minutes=d;var b,h;this.getDurationInMinutes=function(){b||(b=parseInt(this.hours,10)*60+parseInt(this.minutes,10));return b};this.getDurationString=function(){h||(h=DateUtils.formatTime(this.hours,this.minutes));return h}}function ProgramGenre(a,d){this.id=a;this.name=d}function User(a,d,b,h,p,m){this.customerId=a;this.organizationId=d;this.partner=b;this.subscriptionChannels=h;this.recordingEnabled=p;this.equipmentList=m}
(function(){function a(){}a.isSupported=function(){return typeof localStorage!="undefined"&&localStorage!==null&&localStorage.getObject};a.clearAppCache=function(d){if(!a.isSupported())return!1;d?confirm("Ønsker du å slette all lagret informasjon?")&&localStorage.clear():localStorage.clear()};a.clearUserCache=function(){if(!a.isSupported())return!1;localStorage.removeItem("userChannels");localStorage.removeItem("appUser")};a.createCacheName=function(a){return"GET.APPCACHE."+a};a.createCacheDateString=
function(a){a=DateUtils.normalizeDate(a);return"d"+a.getFullYear()+"."+a.getMonth()+"."+a.getDay()};a.removeObject=function(d){if(!a.isSupported())return!1;localStorage.removeItem(d)};a.cleanup=function(){if(!a.isSupported())return!1;if(localStorage.length===0)return"Ok";for(var d=0,b=localStorage.key(d),h=DateUtils.getNow().getTime();b;){var p=localStorage.getObject(b);p&&p.expiresTimestamp&&(p=parseInt(p.expiresTimestamp,10),h>p&&localStorage.removeItem(b));b=localStorage.key(++d)}return"Ok"};a.setObject=
function(d,b,h){if(!a.isSupported())return!1;if(b===null)localStorage.removeItem(d);else{var p=DateUtils.getNow(),h=DateUtils.addMinutesToDate(p,h),b={data:b,timestamp:p.getTime(),expiresTimestamp:h.getTime()};try{localStorage.setObject(a.createCacheName(d),b)}catch(m){console.log("Storing failed!")}}};a.getObject=function(d){if(!a.isSupported())return null;d=localStorage.getObject(a.createCacheName(d));if(!d)return null;var b=DateUtils.getNow().getTime();return d.expiresTimestamp&&b>d.expiresTimestamp?
null:d};a.setItemWithoutWrappedObject=function(d,b){if(!a.isSupported())return!1;try{localStorage.setObject(d,b)}catch(h){console.log("Storing failed!")}};a.getItemWithoutWrappedObject=function(d){return!a.isSupported()?null:(d=localStorage.getObject(d))?d:null};window.AppStorageManager=a})();var get=function(){return{namespace:function(a){for(var d=this,a=a.split("."),b=0,h=a.length;b<h;b++)typeof d[a[b]]=="undefined"&&(d[a[b]]={}),d=d[a[b]];return d}}}();
(function(){window.dao=window.dao||{};window.dao.TvGuideDao=function(){function a(a,b,f){f||AppStorageManager.setObject(n,a,1440);var f=p(a.tvguideBatchResponse.channelQueryResponse.channels),d=[],g;for(g in f)d["ch"+f[g].id]=f[g];y=d;var d=a.tvguideBatchResponse.channelGroupQueryResponse.groups,h=y;g=[];for(var m=d.length,s=0;s<m;s++){for(var x=d[s],M=[],F=x.channels.length,u=0;u<F;u++){var Q=h["ch"+x.channels[u]];Q&&M.push(Q)}g.push(new Package(x.id,x.name,M))}var d=[],t;for(t in g)d["pk"+g[t].id]=
g[t];A=d;d=a.tvguideBatchResponse.eventGenreQueryResponse.eventGenres;t=[];if(d){h=d.length;for(m=0;m<h;m++)t.push(new ProgramGenre(d[m].id,d[m].name))}var d=[],e;for(e in t)d["g"+t[e].id]=t[e];w=d;a=a.tvguideBatchResponse.eventGenreQueryResponse.eventGenres;e=[];try{e=A["pk"+v].channels}catch(K){e=g[0].channels}b&&b({channels:f,channelMap:y,packages:g,defaultChannels:o(e),genres:a,allChannelIds:o(f)})}function d(a,b,f){f||AppStorageManager.setObject(s,a,30);f=[];a=a.programEventsQueryResponse.channels;
a.length||(a=[a]);for(var d=a.length,h=0;h<d;h++){var m=new Channel(a[h].id,a[h].name,a[h].logoWhiteBgKey,a[h].logoBlackBgKey),o=a[h].events;if(o)for(var v=o.length,n=0;n<v;n++){var p=g(o[n],m.id,m.name,DateUtils.getNow().getTime());p.channelId=m.id;m.addProgram(p)}f.push(m)}b&&b({channels:f})}function b(a,b,d,g,h){if(d.programEventsQueryResponse)h||AppStorageManager.setObject(f+a+AppStorageManager.createCacheDateString(b),d,60),b=y["ch"+a],b.programs=m(d.programEventsQueryResponse.channels.events,
a,b.name),g&&g({channel:b})}function h(a,b,f,d,g){d||AppStorageManager.setObject(x+DateUtils.formatDate(f),a,1440);a=p(a.programEventsQueryResponse.channels);b&&b({channels:a},f,d,g)}function p(a){for(var b=[],f=a.length,d=0;d<f;d++){var g=new Channel(a[d].id,a[d].name,a[d].logoWhiteBgKey,a[d].logoBlackBgKey);if(a[d].events)g.programs=m(a[d].events,g.id,g.name);b.push(g)}return b}function m(a,b,f){var d=[];if(a)for(var h=a.length,m=0;m<h;m++)d.push(g(a[m],b,f,DateUtils.getNow().getTime()));return d}
function g(a,b,f,d){var g,h,m,o,v,n=parseInt(a.id,10),p=a.title,y;(y=a.duration)?(y=parseInt(y,10),y=new Duration(Math.floor(y/60),y%60)):y=null;var s=a.description;g=a.start.substr(0,10).split("-");m=g[0];o=g[1]-1;v=g[2];var t=a.start.substr(11).split(":");g=parseInt(t[0],10);h=parseInt(t[1],10);parseInt(t[2],10);m=new Date(m,o,v,g,h,0,0);a:{g=a.duration;o=m.getTime();g=o+parseInt(g*6E4,10);if(!(g<d))if(o>d){d=1;break a}else if(d>o&&d<g){d=0;break a}d=-1}return new Program(n,p,m,y,b,s,d,w&&a.genreid?
w["g"+a.genreid].name:null,f)}function o(a){for(var b=[],f=a.length,d=0;d<f;d++)b.push(a[d].id);return b}var v=7503,y,A,w,n="CACHE_CHANNELSANDPACKAGES_1",s="CACHE_CURRENTPROGRAMS_1",x="CACHE_SCHEDULE_1",f="CACHE_CHANNELPROGRAMS_1";this.getChannelsAndPackages=function(b,f,d){(f=AppStorageManager.getObject(n))?a(f.data,b,!0):(f=UrlUtils.prepareRestUrl("open/tvguide/batch.json"),$.ajax({url:f,dataType:"json",timeout:2E4,success:function(f){a(f,b,!1)},error:function(a,b,f){get.defaultHandlers.backendSystemError(a,
b,f,d)}}))};this.getCurrentPrograms=function(a,b,f,g,h,m){b=null;f?AppStorageManager.removeObject(s):b=AppStorageManager.getObject(s);if(b)d(b.data,g,!0);else{if(a.length===0)throw Error("Channel length is zero in method getCurrentPrograms");a=a.joinObjects("id",",");DateUtils.getTimeRangeForDate(DateUtils.getNow());f=DateUtils.formatDateForServer(DateUtils.getNow());a=UrlUtils.prepareRestUrl("open/tvguide/events.json?channels="+a+"&start="+f+"&duration="+GET.SCHEDULE_HOURS_OFFSET*60);$.ajax({url:a,
dataType:"json",timeout:2E4,success:function(a){d(a,g)},error:function(a,b,f){get.defaultHandlers.backendSystemError(a,b,f,m)}})}};this.getSchedule=function(a,b,f,d,g,m,v){(m=AppStorageManager.getObject(x+DateUtils.formatDate(b)))&&d&&!g?h(m.data,f,b,!0,g):(a=o(a),a.length===0&&(a=11),a=UrlUtils.prepareRestUrl("open/tvguide/events.json?channels="+a),d=DateUtils.getTimeRangeForDate(b),d=DateUtils.formatDateForServer(d.start),a+="&start="+d+"&duration=1440",$.ajax({url:a,dataType:"json",timeout:2E4,
success:function(a){h(a,f,b,!1,g)},error:function(a,b,f){get.defaultHandlers.backendSystemError(a,b,f,v)}}))};this.getChannelProgramsForOneDay=function(a,d,g,h,m){(h=AppStorageManager.getObject(f+a+AppStorageManager.createCacheDateString(d)))?b(a,d,h.data,g,!0):(h=DateUtils.getTimeRangeForDate(d),h=DateUtils.formatDateForServer(h.start),h=UrlUtils.prepareRestUrl("open/tvguide/events.json?channels="+a+"&start="+h+"&duration=1440"),$.ajax({url:h,dataType:"json",timeout:2E4,success:function(f){b(a,d,
f,g)},error:function(a,b,f){get.defaultHandlers.backendSystemError(a,b,f,m)}}))};this.startRecording=function(a,b,f,d,g){var h="",h=b?UrlUtils.prepareRestUrl("authenticated/tvguide/record/"+a.id+"?unitaddress="+b):UrlUtils.prepareRestUrl("authenticated/tvguide/record/"+a.id);$.ajax({type:"post",url:h,dataType:"json",timeout:2E4,success:f,error:function(a,b,f){b==="timeout"?d():get.defaultHandlers.backendSystemError(a,b,f,g)}})};this.getChannel=function(a){if(y)try{return y["ch"+a]}catch(b){return null}};
this.getChannelsById=function(a){for(var b=[],f=a.length,d=0;d<f;d++){var g=this.getChannel(a[d]);g&&b.push(g)}return b};this.clearChannelAndPackagesCache=function(){AppStorageManager.getObject(n)&&AppStorageManager.removeObject(n)}}})();
(function(){window.dao=window.dao||{};window.dao.UserDao=function(a){function d(a,b,d){var g=UrlUtils.prepareRestUrl(p);$.ajax({type:"get",url:g,dataType:"json",timeout:2E4,cache:!1,success:function(d){h(d,a,b)},error:function(a,g,h){a.status==401?b():get.defaultHandlers.backendSystemError(a,g,h,d)}})}function b(){var a=UrlUtils.prepareRestUrl(p),a=$.ajax({type:"get",url:a,async:!1,cache:!1});a.status>=200&&a.status<300?(a=window.JSON&&window.JSON.parse?JSON.parse(a.responseText):$.parseJSON(a.responseText),
h(a,function(){},function(){})):m=void 0;return m}function h(b,d,h){try{var p=b.tvguideSubscriptionQueryResponse,n=p.status.customerid,b=!1;p.remoteBookingEquipmentQueryResponse&&(b=!0);if(n){var s=new User(n,p.status.organization,p.partner,p.channelSubscription.channels,b,p.remoteBookingEquipmentQueryResponse.equipmentList),x=a.appStorageManager.getItemWithoutWrappedObject(o);if(!x||x.customerId!=s.customerId)g.clearLocalUser(),g.saveUserFavouriteChannels(s.subscriptionChannels);g.saveLocalUser(s);
m=s;d(s)}else h()}catch(f){g.saveLocalUser(null),h()}}var p="authenticated/tvguide/subscriptions.json",m,g=this,a=$.extend({appStorageManager:AppStorageManager,localUser:!0},a);this.loginUser=function(b,d,g,m,o){var s=UrlUtils.prepareRestUrl(p);s+="?rememberme=true&ttl=157680000";$.ajax({type:"post",url:s,data:"auth_tvguide_username="+b+"&auth_tvguide_password="+d,dataType:"json",timeout:2E4,success:function(b){a.appStorageManager.clearAppCache(!1);h(b,g,m)},error:function(a,b,d){a.status==401?m(a):
get.defaultHandlers.backendSystemError(a,b,d,o)}})};this.logoutUser=function(b,d,g){a.appStorageManager.clearAppCache(!1);d=UrlUtils.prepareRestUrl("logout/");$.ajax({type:"post",url:d,timeout:2E4,cache:!1,success:function(){m=void 0;b()},error:function(a,b,d){get.defaultHandlers.backendSystemError(a,b,d,g)}})};this.resetLoginCode=function(a,b,d,g){a="phone="+a;d=UrlUtils.prepareRestUrl("open/tvguide/pin/reset/");$.ajax({type:"post",url:d,dataType:"json",timeout:2E4,data:a,success:function(a){var a=
a.resetPinResponse,d;a.success?(a="Din nye kode ble sendt på SMS",d=!1):(d=!0,a=a.reason=="UnknownPhonenumber"?"Ditt nummer ble ikke funnet":"Det skjedde en ukjent feil.");b(a,d)},error:function(a,b,d){get.defaultHandlers.backendSystemError(a,b,d,g)}})};this.checkServerLogin=function(b,d,h){var b=b||function(){},d=d||function(){},o=UrlUtils.prepareRestUrl("authenticated/tvguide/loginstatus");$.ajax({type:"get",url:o,dataType:"json",data:null,timeout:2E4,cache:!1,success:b,error:function(b,o,v){a.appStorageManager.clearUserCache();
m=void 0;b.status==401&&!g.isLoggedIn()?d():get.defaultHandlers.backendSystemError(b,o,v,h)}})};this.getCurrentUser=function(b,h,p){(m=m||a.appStorageManager.getItemWithoutWrappedObject(o))?g.isLoggedIn()?b(m):h():d(b,h,p)};this.getCurrentUserSync=function(){(m=m||a.appStorageManager.getItemWithoutWrappedObject(o))||(m=b());return m};this.getRecordingState=function(){var a=g.getCurrentUserSync();return a?a.recordingEnabled:!1};this.getEquipment=function(){var a=g.getCurrentUserSync();if(a&&a.equipmentList){var b=
[];if(a.equipmentList.length>1)for(var d=0;d<a.equipmentList.length;d++)b.push(a.equipmentList[d]);else b.push(a.equipmentList);return b}else return!1};this.userHasChannel=function(a,b){var d=g.getCurrentUserSync(),h=!1;channelId=b?a:a.id;if(d.subscriptionChannels)for(var m=d.subscriptionChannels.length,h=!1,o=0;o<m;o++){if(d.subscriptionChannels[o]==channelId){h=!0;break}}else h=!0;return h};this.addAlert=function(a,b){if(a){var d=a.startsAt,d=d.getTime()/1E3;d-=900;window.location="get://Notification/"+
a.title+"/"+a.channelName+"/"+d;b(!0)}else b(!1)};this.saveLocalUser=function(b){b?a.appStorageManager.setItemWithoutWrappedObject(o,b):g.clearLocalUser()};this.clearLocalUser=function(){a.appStorageManager.removeObject(o)};this.saveUserFavouriteChannels=function(b){b?a.appStorageManager.setItemWithoutWrappedObject("userChannels",b):a.appStorageManager.removeObject("userChannels")};this.getUserFavouriteChannels=function(b){var d=g.getCurrentUserSync(),h=a.appStorageManager.getItemWithoutWrappedObject("userChannels");
if(h&&h.length>0)return h;else g.isLoggedIn()&&d.subscriptionChannels?(h=d.subscriptionChannels,g.saveUserFavouriteChannels(h)):b&&(g.saveUserFavouriteChannels(b),h=b);return h||[]};this.isLoggedIn=function(){return!!m};var o="appUser"}})();
(function(){window.dao=window.dao||{};window.dao.ProgramSearchDao=function(){function a(a,b){var d={};a.forEach(function(a){var b=a.getProgramDate();d[b]=d[b]||[];d[b].push(a)});d=p(d);b&&b(d)}function d(a,b){b instanceof Array?b.forEach(a):a(b)}function b(a){var b=[];a.length==void 0&&(a=[a]);a.forEach(function(a){a.events&&d(function(d){var h,m,p,n,s,x;x=a.id;var f=DateUtils.getNow(),k=parseInt(d.id,10),D=d.title,B;(B=d.duration)?(B=parseInt(B,10),B=new Duration(Math.floor(B/60),B%60)):B=null;var z=
d.description;h=d.start;s=h.substr(0,10).split("-");p=s[0];n=s[1]-1;s=s[2];var C=h.substr(11).split(":");h=parseInt(C[0],10);m=parseInt(C[1],10);parseInt(C[2],10);p=new Date(p,n,s,h,m,0,0);a:{n=d.duration;d=p.getTime();n=d+parseInt(n*6E4,10);if(!(n<f))if(d>f){f=1;break a}else if(f>d&&f<n){f=0;break a}f=-1}x=new Program(k,D,p,B,x,z,f,"Søkeresultat",a);b.push(x)},a.events)});return b}var h=!1;this.getSearch=function(a,d,o,p){h||(h=!0,$.ajax({url:"https://www.googleapis.com/customsearch/v1?key=AIzaSyASJCSuYHrip9lhMWuSDsm3tFAridtdsK8&cx=011009588629157708837:ayemosushfc&callback=?&alt=json&q="+
a,dataType:"json",timeout:2E4,success:function(a){h=!1;d(b(a.items))},error:function(a,b,d){h=!1;get.defaultHandlers.backendSystemError(a,b,d,p)}}))};this.search=function(d,g,h,p,y){var p=DateUtils.getNow(),A=new Date(p.getFullYear(),p.getMonth(),p.getDate(),23,59,59,999),A=DateUtils.minutesBetweenDates(A,p),p=DateUtils.formatDateForServer(p),d="/rest/open/tvguide/events.json?search="+d+"&Start="+p+"&duration="+(8640+A);g.length>0&&(g=g.join(","),d+="&channels="+g);$.ajax({type:"get",url:d,dataType:"json",
timeout:2E4,success:function(d){d=d.programEventsQueryResponse.channels;a(b(d),h)},error:function(a,b,d){get.defaultHandlers.backendSystemError(a,b,d,y)}})};var p=function(a){var b=[],d={},h;for(h in a)b.push(h);b.sort();for(h=0;h<b.length;h++)d[b[h]]=a[b[h]];return d}}})();
(function(){window.dao=window.dao||{};window.dao.RemoteBookingDao=function(){this.saveMobileAndPin=function(a,d,b,h){a=$.extend({number:void 0,pin:void 0},a);$.ajax({url:"/rest/authenticated/tvguide/admin/numbers/"+a.number,data:{pin:a.pin},type:"POST",dataType:"json",cache:!1,timeout:2E4,success:function(){d()},error:function(d,m,g){d.status===409?b(a.number+" er allerede registrert."):d.status===406?b("Feil med nummer eller kode."):d.status===401&&b?b():get.defaultHandlers.backendSystemError(d,
m,g,h)}})};this.changeMobileAndPin=function(a,d,b,h){a=$.extend({number:void 0,pin:void 0},a);$.ajax("/rest/authenticated/tvguide/admin/numbers/"+a.number+"/update",{data:{pin:a.pin},type:"POST",dataType:"json",cache:!1,timeout:2E4,success:function(){d()},error:function(a,d,g){a.status===401&&b?b():get.defaultHandlers.backendSystemError(a,d,g,h)}})};this.removeMobileAndPin=function(a,d,b,h){a=$.extend({number:void 0},a);$.ajax("/rest/authenticated/tvguide/admin/numbers/"+a.number+"/delete",{data:a,
type:"POST",dataType:"json",timeout:2E4,cache:!1,success:function(){d()},error:function(a,d,g){a.status===401&&b?b():get.defaultHandlers.backendSystemError(a,d,g,h)}})};this.getMobileAndPin=function(a,d,b){$.ajax({url:"/rest/authenticated/tvguide/admin/numbers/",dataType:"json",timeout:2E4,cache:!1,success:function(b){b=b.tvGuideAdminResponse.numberandpins.numberandpin;a(b===void 0?[]:b instanceof Array?b:[b])},error:function(a,p,m){a.status===401&&d?d():get.defaultHandlers.backendSystemError(a,p,
m,b)}})}}})();window.$=window.Zepto||window.jQuery;if(window.console===void 0)window.console={},console.log=function(){};window.GET=function(){};GET.SCHEDULE_HOURS_OFFSET=5;GET.FAVORITE_LIST_ID=9999;
(function(){window.get=window.get||{};window.get.LoadIndicator=function(a,d){function b(){var b=m.inlineViewport?new Viewport(a.width(),a.height()):Utils.getViewport(),d=o.innerWidth?o.innerWidth():o.width(),g=o.innerHeight?o.innerHeight():o.height(),d=Math.round(b.width/2-d/2),b=Math.round(b.height/2-g/2-g/5);o.css("left",d);o.css("top",b)}function h(a){a.preventDefault()}var p=0,m={defaultText:"Laster ...",className:null,larger:!1,inlineViewport:!1};Utils.extend(m,d);if(!a||a.size()===0)console.log("LoadIndicator - init error: Container missing!");
else{a.append('<div id="loadIndicator_wrapper"><div class="loadIndicator'+(m.larger?" larger":"")+(m.className?" "+m.className:"")+'"><div id="LoadIndicator_infoView" class="info"><div class="spinner"></div><span>'+m.defaultText+"</span></div></div></div>");var g=a.find("#loadIndicator_wrapper"),o=g.find("#LoadIndicator_infoView"),v=o.find("span");this.setLoading=function(d,o){p=d?p+1:Math.max(0,p-1);p>1||(p==1&&d?($(document.body).bind("touchmove",h),$(document.body).bind("click",h),a.height()>0&&
g.height(a.height()),g.show(),o?v.text(o):v.text(m.defaultText),b(),g.addClass("active")):p===0&&!d&&($(document.body).unbind("touchmove",h),$(document.body).unbind("click",h),g.removeClass("active"),setTimeout(function(){g.hide()},300)))}}}})();
(function(){window.get=window.get||{};window.get.DefaultHandlers=function(a){a=$.extend({userDao:void 0,resetStateUrl:void 0},a);this.backendSystemError=function(d,b,h,p){d.status===401&&a.userDao.isLoggedIn()?(a.userDao.clearLocalUser(),window.location=a.resetStateUrl):p?p(d,b,h):(get.loader(!1),b=="timeout"||d.status===0?alert(get.errorMessages.noInternetConnection):alert(get.errorMessages.fatalServerFail))}}})();
(function(){function a(){}function d(){}a.prototype={fatalServerFail:"En feil oppstod under lasting av informasjon, vennligst lukk app'en og prøv på nytt.",noInternetConnection:"Vi får ikke kontakt med innholdstjeneren, vennligst sjekk din Internett-tilkobling eller prøv igjen."};d.prototype={};window.get=window.get||{};window.get.messages=new d;window.get.errorMessages=new a})();(function(){get.errorMessages.fatalServerFail="En feil oppstod under lasting av informasjon, vennligst prøv på nytt."})();
(function(){get.namespace("dao").tvguide=new dao.TvGuideDao;get.namespace("dao").user=new dao.UserDao;get.namespace("dao").remoteBooking=new dao.RemoteBookingDao;get.namespace("dao").search=new dao.ProgramSearchDao;window.get.defaultHandlers=new get.DefaultHandlers({userDao:dao.user,resetStateUrl:""});var a=null;get.namespace("component").loader=function(d,b){a||(a=new get.LoadIndicator($("body")));a.setLoading(d,b)}})();
(function(){function a(b,e,d){if(b===e)return b!==0||1/b==1/e;if(b==null||e==null)return b===e;if(b._chain)b=b._wrapped;if(e._chain)e=e._wrapped;if(q.isFunction(b.isEqual))return b.isEqual(e);if(q.isFunction(e.isEqual))return e.isEqual(b);var f=v.call(b);if(f!=v.call(e))return!1;switch(f){case "[object String]":return String(b)==String(e);case "[object Number]":return b=+b,e=+e,b!=b?e!=e:b==0?1/b==1/e:b==e;case "[object Date]":case "[object Boolean]":return+b==+e;case "[object RegExp]":return b.source==
e.source&&b.global==e.global&&b.multiline==e.multiline&&b.ignoreCase==e.ignoreCase}if(typeof b!="object"||typeof e!="object")return!1;for(var g=d.length;g--;)if(d[g]==b)return!0;d.push(b);var g=0,k=!0;if(f=="[object Array]"){if(g=b.length,k=g==e.length)for(;g--;)if(!(k=g in b==g in e&&a(b[g],e[g],d)))break}else{if("constructor"in b!="constructor"in e||b.constructor!=e.constructor)return!1;for(var h in b)if(y.call(b,h)&&(g++,!(k=y.call(e,h)&&a(b[h],e[h],d))))break;if(k){for(h in e)if(y.call(e,h)&&
!g--)break;k=!g}}d.pop();return k}var d=this,b=d._,h={},p=Array.prototype,m=Object.prototype,g=p.slice,o=p.unshift,v=m.toString,y=m.hasOwnProperty,A=p.forEach,w=p.map,n=p.reduce,s=p.reduceRight,x=p.filter,f=p.every,k=p.some,D=p.indexOf,B=p.lastIndexOf,m=Array.isArray,z=Object.keys,C=Function.prototype.bind,q=function(a){return new F(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=q;exports._=q}else typeof define==="function"&&define.amd?define("underscore",
function(){return q}):d._=q;q.VERSION="1.2.2";var E=q.each=q.forEach=function(a,b,d){if(a!=null)if(A&&a.forEach===A)a.forEach(b,d);else if(a.length===+a.length)for(var f=0,g=a.length;f<g;f++){if(f in a&&b.call(d,a[f],f,a)===h)break}else for(f in a)if(y.call(a,f)&&b.call(d,a[f],f,a)===h)break};q.map=function(a,b,d){var f=[];if(a==null)return f;if(w&&a.map===w)return a.map(b,d);E(a,function(a,g,k){f[f.length]=b.call(d,a,g,k)});return f};q.reduce=q.foldl=q.inject=function(a,b,d,f){var g=d!==void 0;a==
null&&(a=[]);if(n&&a.reduce===n)return f&&(b=q.bind(b,f)),g?a.reduce(b,d):a.reduce(b);E(a,function(a,k,h){g?d=b.call(f,d,a,k,h):(d=a,g=!0)});if(!g)throw new TypeError("Reduce of empty array with no initial value");return d};q.reduceRight=q.foldr=function(a,b,d,f){a==null&&(a=[]);if(s&&a.reduceRight===s)return f&&(b=q.bind(b,f)),d!==void 0?a.reduceRight(b,d):a.reduceRight(b);a=(q.isArray(a)?a.slice():q.toArray(a)).reverse();return q.reduce(a,b,d,f)};q.find=q.detect=function(a,b,d){var f;O(a,function(a,
g,k){if(b.call(d,a,g,k))return f=a,!0});return f};q.filter=q.select=function(a,b,d){var f=[];if(a==null)return f;if(x&&a.filter===x)return a.filter(b,d);E(a,function(a,g,k){b.call(d,a,g,k)&&(f[f.length]=a)});return f};q.reject=function(a,b,d){var f=[];if(a==null)return f;E(a,function(a,g,k){b.call(d,a,g,k)||(f[f.length]=a)});return f};q.every=q.all=function(a,b,d){var g=!0;if(a==null)return g;if(f&&a.every===f)return a.every(b,d);E(a,function(a,f,k){if(!(g=g&&b.call(d,a,f,k)))return h});return g};
var O=q.some=q.any=function(a,b,d){var b=b||q.identity,f=!1;if(a==null)return f;if(k&&a.some===k)return a.some(b,d);E(a,function(a,g,k){if(f||(f=b.call(d,a,g,k)))return h});return!!f};q.include=q.contains=function(a,b){var d=!1;if(a==null)return d;return D&&a.indexOf===D?a.indexOf(b)!=-1:d=O(a,function(a){return a===b})};q.invoke=function(a,b){var d=g.call(arguments,2);return q.map(a,function(a){return(b.call?b||a:a[b]).apply(a,d)})};q.pluck=function(a,b){return q.map(a,function(a){return a[b]})};
q.max=function(a,b,d){if(!b&&q.isArray(a))return Math.max.apply(Math,a);if(!b&&q.isEmpty(a))return-Infinity;var f={computed:-Infinity};E(a,function(a,g,k){g=b?b.call(d,a,g,k):a;g>=f.computed&&(f={value:a,computed:g})});return f.value};q.min=function(a,b,d){if(!b&&q.isArray(a))return Math.min.apply(Math,a);if(!b&&q.isEmpty(a))return Infinity;var f={computed:Infinity};E(a,function(a,g,k){g=b?b.call(d,a,g,k):a;g<f.computed&&(f={value:a,computed:g})});return f.value};q.shuffle=function(a){var b=[],d;
E(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};q.sortBy=function(a,b,d){return q.pluck(q.map(a,function(a,f,g){return{value:a,criteria:b.call(d,a,f,g)}}).sort(function(a,b){var e=a.criteria,d=b.criteria;return e<d?-1:e>d?1:0}),"value")};q.groupBy=function(a,b){var d={},f=q.isFunction(b)?b:function(a){return a[b]};E(a,function(a,b){var e=f(a,b);(d[e]||(d[e]=[])).push(a)});return d};q.sortedIndex=function(a,b,d){d||(d=q.identity);for(var f=0,g=a.length;f<
g;){var k=f+g>>1;d(a[k])<d(b)?f=k+1:g=k}return f};q.toArray=function(a){return!a?[]:a.toArray?a.toArray():q.isArray(a)?g.call(a):q.isArguments(a)?g.call(a):q.values(a)};q.size=function(a){return q.toArray(a).length};q.first=q.head=function(a,b,d){return b!=null&&!d?g.call(a,0,b):a[0]};q.initial=function(a,b,d){return g.call(a,0,a.length-(b==null||d?1:b))};q.last=function(a,b,d){return b!=null&&!d?g.call(a,Math.max(a.length-b,0)):a[a.length-1]};q.rest=q.tail=function(a,b,d){return g.call(a,b==null||
d?1:b)};q.compact=function(a){return q.filter(a,function(a){return!!a})};q.flatten=function(a,b){return q.reduce(a,function(a,d){if(q.isArray(d))return a.concat(b?d:q.flatten(d));a[a.length]=d;return a},[])};q.without=function(a){return q.difference(a,g.call(arguments,1))};q.uniq=q.unique=function(a,b,d){var d=d?q.map(a,d):a,f=[];q.reduce(d,function(d,g,k){if(0==k||(b===!0?q.last(d)!=g:!q.include(d,g)))d[d.length]=g,f[f.length]=a[k];return d},[]);return f};q.union=function(){return q.uniq(q.flatten(arguments,
!0))};q.intersection=q.intersect=function(a){var b=g.call(arguments,1);return q.filter(q.uniq(a),function(a){return q.every(b,function(b){return q.indexOf(b,a)>=0})})};q.difference=function(a,b){return q.filter(a,function(a){return!q.include(b,a)})};q.zip=function(){for(var a=g.call(arguments),b=q.max(q.pluck(a,"length")),d=Array(b),f=0;f<b;f++)d[f]=q.pluck(a,""+f);return d};q.indexOf=function(a,b,d){if(a==null)return-1;var f;if(d)return d=q.sortedIndex(a,b),a[d]===b?d:-1;if(D&&a.indexOf===D)return a.indexOf(b);
for(d=0,f=a.length;d<f;d++)if(a[d]===b)return d;return-1};q.lastIndexOf=function(a,b){if(a==null)return-1;if(B&&a.lastIndexOf===B)return a.lastIndexOf(b);for(var d=a.length;d--;)if(a[d]===b)return d;return-1};q.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,f=Math.max(Math.ceil((b-a)/d),0),g=0,k=Array(f);g<f;)k[g++]=a,a+=d;return k};var L=function(){};q.bind=function(a,b){var d,f;if(a.bind===C&&C)return C.apply(a,g.call(arguments,1));if(!q.isFunction(a))throw new TypeError;
f=g.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(b,f.concat(g.call(arguments)));L.prototype=a.prototype;var k=new L,h=a.apply(k,f.concat(g.call(arguments)));return Object(h)===h?h:k}};q.bindAll=function(a){var b=g.call(arguments,1);b.length==0&&(b=q.functions(a));E(b,function(b){a[b]=q.bind(a[b],a)});return a};q.memoize=function(a,b){var d={};b||(b=q.identity);return function(){var f=b.apply(this,arguments);return y.call(d,f)?d[f]:d[f]=a.apply(this,arguments)}};q.delay=
function(a,b){var d=g.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};q.defer=function(a){return q.delay.apply(q,[a,1].concat(g.call(arguments,1)))};q.throttle=function(a,b){var d,f,g,k,h,m=q.debounce(function(){h=k=!1},b);return function(){d=this;f=arguments;var o;g||(g=setTimeout(function(){g=null;h&&a.apply(d,f);m()},b));k?h=!0:a.apply(d,f);m();k=!0}};q.debounce=function(a,b){var d;return function(){var f=this,g=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(f,
g)},b)}};q.once=function(a){var b=!1,d;return function(){if(b)return d;b=!0;return d=a.apply(this,arguments)}};q.wrap=function(a,b){return function(){var d=[a].concat(g.call(arguments));return b.apply(this,d)}};q.compose=function(){var a=g.call(arguments);return function(){for(var b=g.call(arguments),d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};q.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};q.keys=z||function(a){if(a!==Object(a))throw new TypeError("Invalid object");
var b=[],d;for(d in a)y.call(a,d)&&(b[b.length]=d);return b};q.values=function(a){return q.map(a,q.identity)};q.functions=q.methods=function(a){var b=[],d;for(d in a)q.isFunction(a[d])&&b.push(d);return b.sort()};q.extend=function(a){E(g.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};q.defaults=function(a){E(g.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};q.clone=function(a){return!q.isObject(a)?a:q.isArray(a)?a.slice():q.extend({},
a)};q.tap=function(a,b){b(a);return a};q.isEqual=function(b,e){return a(b,e,[])};q.isEmpty=function(a){if(q.isArray(a)||q.isString(a))return a.length===0;for(var b in a)if(y.call(a,b))return!1;return!0};q.isElement=function(a){return!!(a&&a.nodeType==1)};q.isArray=m||function(a){return v.call(a)=="[object Array]"};q.isObject=function(a){return a===Object(a)};q.isArguments=v.call(arguments)=="[object Arguments]"?function(a){return v.call(a)=="[object Arguments]"}:function(a){return!(!a||!y.call(a,
"callee"))};q.isFunction=function(a){return v.call(a)=="[object Function]"};q.isString=function(a){return v.call(a)=="[object String]"};q.isNumber=function(a){return v.call(a)=="[object Number]"};q.isNaN=function(a){return a!==a};q.isBoolean=function(a){return a===!0||a===!1||v.call(a)=="[object Boolean]"};q.isDate=function(a){return v.call(a)=="[object Date]"};q.isRegExp=function(a){return v.call(a)=="[object RegExp]"};q.isNull=function(a){return a===null};q.isUndefined=function(a){return a===void 0};
q.noConflict=function(){d._=b;return this};q.identity=function(a){return a};q.times=function(a,b,d){for(var f=0;f<a;f++)b.call(d,f)};q.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};q.mixin=function(a){E(q.functions(a),function(b){Q(b,q[b]=a[b])})};var M=0;q.uniqueId=function(a){var b=M++;return a?a+b:b};q.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,
escape:/<%-([\s\S]+?)%>/g};q.template=function(a,b){var d=q.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,
"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",f=new Function("obj","_",d);return b?f(b,q):function(a){return f(a,q)}};var F=function(a){this._wrapped=a};q.prototype=F.prototype;var u=function(a,b){return b?q(a).chain():a},Q=function(a,b){F.prototype[a]=function(){var a=g.call(arguments);o.call(a,this._wrapped);return u(b.apply(q,a),this._chain)}};q.mixin(q);E("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=p[a];F.prototype[a]=function(){b.apply(this._wrapped,arguments);
return u(this._wrapped,this._chain)}});E(["concat","join","slice"],function(a){var b=p[a];F.prototype[a]=function(){return u(b.apply(this._wrapped,arguments),this._chain)}});F.prototype.chain=function(){this._chain=!0;return this};F.prototype.value=function(){return this._wrapped}}).call(this);
(function(a,d){var b,h=/:([\w\d]+)/g,p=/\?([^#]*)?$/,m=function(a){return Array.prototype.slice.call(a)},g=function(a){return Object.prototype.toString.call(a)==="[object Function]"},o=function(a){return Object.prototype.toString.call(a)==="[object Array]"},v=function(a){return decodeURIComponent((a||"").replace(/\+/g," "))},y=encodeURIComponent,A=function(a){return String(a).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},w=function(a){return function(b,
d){return this.route.apply(this,[a,b,d])}},n={},s=!(!d.history||!history.pushState),x=[];b=function(){var d=m(arguments),k,h;b.apps=b.apps||{};if(d.length===0||d[0]&&g(d[0]))return b.apply(b,["body"].concat(d));else if(typeof(h=d.shift())=="string")return k=b.apps[h]||new b.Application,k.element_selector=h,d.length>0&&a.each(d,function(a,b){k.use(b)}),k.element_selector!=h&&delete b.apps[h],b.apps[k.element_selector]=k};b.VERSION="0.7.0";b.addLogger=function(a){x.push(a)};b.log=function(){var d=m(arguments);
d.unshift("["+Date()+"]");a.each(x,function(a,g){g.apply(b,d)})};typeof d.console!="undefined"?g(d.console.log.apply)?b.addLogger(function(){d.console.log.apply(d.console,arguments)}):b.addLogger(function(){d.console.log(arguments)}):typeof console!="undefined"&&b.addLogger(function(){console.log.apply(console,arguments)});a.extend(b,{makeArray:m,isFunction:g,isArray:o});b.Object=function(b){return a.extend(this,b||{})};a.extend(b.Object.prototype,{escapeHTML:A,h:A,toHash:function(){var b={};a.each(this,
function(a,d){g(d)||(b[a]=d)});return b},toHTML:function(){var b="";a.each(this,function(a,d){g(d)||(b+="<strong>"+a+"</strong> "+d+"<br />")});return b},keys:function(a){var b=[],d;for(d in this)(!g(this[d])||!a)&&b.push(d);return b},has:function(b){return this[b]&&a.trim(this[b].toString())!==""},join:function(){var a=m(arguments),b=a.shift();return a.join(b)},log:function(){b.log.apply(b,arguments)},toString:function(b){var d=[];a.each(this,function(a,h){(!g(h)||b)&&d.push('"'+a+'": '+h.toString())});
return"Sammy.Object: {"+d.join(",")+"}"}});b.DefaultLocationProxy=function(a,b){this.app=a;this.is_native=!1;this.has_history=s;this._startPolling(b)};b.DefaultLocationProxy.fullPath=function(a){var b=a.toString().match(/^[^#]*(#.+)$/);return[a.pathname,a.search,b?b[1]:""].join("")};b.DefaultLocationProxy.prototype={bind:function(){var f=this,g=this.app,h=b.DefaultLocationProxy;a(d).bind("hashchange."+this.app.eventNamespace(),function(a,b){if(f.is_native===!1&&!b)f.is_native=!0,d.clearInterval(h._interval);
g.trigger("location-changed")});s&&!g.disable_push_state&&(a(d).bind("popstate."+this.app.eventNamespace(),function(){g.trigger("location-changed")}),a("a").live("click.history-"+this.app.eventNamespace(),function(a){var b=h.fullPath(this);if(this.hostname==d.location.hostname&&g.lookupRoute("get",b))return a.preventDefault(),f.setLocation(b),!1}));if(!h._bindings)h._bindings=0;h._bindings++},unbind:function(){a(d).unbind("hashchange."+this.app.eventNamespace());a(d).unbind("popstate."+this.app.eventNamespace());
a("a").die("click.history-"+this.app.eventNamespace());b.DefaultLocationProxy._bindings--;b.DefaultLocationProxy._bindings<=0&&d.clearInterval(b.DefaultLocationProxy._interval)},getLocation:function(){return b.DefaultLocationProxy.fullPath(d.location)},setLocation:function(a){/^([^#\/]|$)/.test(a)&&(a=s?"/"+a:"#!/"+a);if(a!=this.getLocation())if(s&&/^\//.test(a))history.pushState({path:a},d.title,a),this.app.trigger("location-changed");else return d.location=a},_startPolling:function(f){var g=this;
if(!b.DefaultLocationProxy._interval){f||(f=10);var h=function(){var f=g.getLocation();(typeof b.DefaultLocationProxy._last_location=="undefined"||f!=b.DefaultLocationProxy._last_location)&&d.setTimeout(function(){a(d).trigger("hashchange",[!0])},0);b.DefaultLocationProxy._last_location=f};h();b.DefaultLocationProxy._interval=d.setInterval(h,f)}}};b.Application=function(a){var d=this;this.routes={};this.listeners=new b.Object({});this.arounds=[];this.befores=[];this.namespace=(new Date).getTime()+
"-"+parseInt(Math.random()*1E3,10);this.context_prototype=function(){b.EventContext.apply(this,arguments)};this.context_prototype.prototype=new b.EventContext;g(a)&&a.apply(this,[this]);this._location_proxy||this.setLocationProxy(new b.DefaultLocationProxy(this,this.run_interval_every));this.debug&&this.bindToAllEvents(function(a,b){d.log(d.toString(),a.cleaned_type,b||{})})};b.Application.prototype=a.extend({},b.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:"run,unload,lookup-route,run-route,route-found,event-context-before,event-context-after,changed,error,check-form-submission,redirect,location-changed".split(","),
_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(b){return b?a(this.element_selector).find(b):a(this.element_selector)},use:function(){var a=m(arguments),d=a.shift(),h=d||"";try{a.unshift(this),typeof d=="string"&&(h="Sammy."+d,d=b[d]),d.apply(this,a)}catch(o){typeof d==="undefined"?this.error("Plugin Error: called use() but plugin ("+
h.toString()+") is not defined",o):g(d)?this.error("Plugin Error",o):this.error("Plugin Error: called use() but '"+h.toString()+"' is not a function",o)}return this},setLocationProxy:function(a){var b=this._location_proxy;this._location_proxy=a;this.isRunning()&&(b&&b.unbind(),this._location_proxy.bind())},log:function(){b.log.apply(b,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(b,d,m){var o=this,n=[],p,v;!m&&g(d)&&(m=d=b,b="any");b=b.toLowerCase();if(d.constructor==
String){for(h.lastIndex=0;(v=h.exec(d))!==null;)n.push(v[1]);d=RegExp(d.replace(h,"([^/]+)")+"$")}typeof m=="string"&&(m=o[m]);p=function(a){var b={verb:a,path:d,callback:m,param_names:n};o.routes[a]=o.routes[a]||[];o.routes[a].push(b)};b==="any"?a.each(this.ROUTE_VERBS,function(a,b){p(b)}):p(b);return this},get:w("get"),post:w("post"),put:w("put"),del:w("delete"),any:w("any"),mapRoutes:function(b){var d=this;a.each(b,function(a,b){d.route.apply(d,b)});return this},eventNamespace:function(){return["sammy-app",
this.namespace].join("-")},bind:function(a,b,d){var g=this;typeof d=="undefined"&&(d=b);b=function(a,b){var f;b&&b.context?(f=b.context,delete b.context):f=new g.context_prototype(g,"bind",a.type,b,a.target);a.cleaned_type=a.type.replace(g.eventNamespace(),"");d.apply(f,[a,b])};this.listeners[a]||(this.listeners[a]=[]);this.listeners[a].push(b);this.isRunning()&&this._listen(a,b);return this},trigger:function(a,b){this.$element().trigger([a,this.eventNamespace()].join("."),[b]);return this},refresh:function(){this.last_location=
null;this.trigger("location-changed");return this},before:function(a,b){g(a)&&(b=a,a={});this.befores.push([a,b]);return this},after:function(a){return this.bind("event-context-after",a)},around:function(a){this.arounds.push(a);return this},isRunning:function(){return this._running},helpers:function(b){a.extend(this.context_prototype.prototype,b);return this},helper:function(a,b){this.context_prototype.prototype[a]=b;return this},run:function(b){if(this.isRunning())return!1;var g=this;a.each(this.listeners.toHash(),
function(b,d){a.each(d,function(a,d){g._listen(b,d)})});this.trigger("run",{start_url:b});this._running=!0;this.last_location=null;!/\#(.+)/.test(this.getLocation())&&typeof b!="undefined"&&this.setLocation(b);this._checkLocation();this._location_proxy.bind();this.bind("location-changed",function(){g._checkLocation()});this.bind("submit",function(b){return g._checkFormSubmission(a(b.target).closest("form"))===!1?b.preventDefault():!1});a(d).bind("beforeunload",function(){g.unload()});return this.trigger("changed")},
unload:function(){if(!this.isRunning())return!1;var b=this;this.trigger("unload");this._location_proxy.unbind();this.$element().unbind("submit").removeClass(b.eventNamespace());a.each(this.listeners.toHash(),function(d,g){a.each(g,function(a,g){b._unlisten(d,g)})});this._running=!1;return this},bindToAllEvents:function(b){var d=this;a.each(this.APP_EVENTS,function(a,g){d.bind(g,b)});a.each(this.listeners.keys(!0),function(g,h){a.inArray(h,d.APP_EVENTS)==-1&&d.bind(h,b)});return this},routablePath:function(a){return a.replace(p,
"")},lookupRoute:function(a,b){var d=!1,g=0,h,m;if(typeof this.routes[a]!="undefined")for(h=this.routes[a].length;g<h;g++)if(m=this.routes[a][g],this.routablePath(b).match(m.path)){d=m;break}return d},runRoute:function(b,d,g,h){var m=this,o=this.lookupRoute(b,d),n,p,s,y,w,A,u;this.log("runRoute",[b,d].join(" "));this.trigger("run-route",{verb:b,path:d,params:g});typeof g=="undefined"&&(g={});a.extend(g,this._parseQueryString(d));if(o){this.trigger("route-found",{route:o});if((A=o.path.exec(this.routablePath(d)))!==
null)A.shift(),a.each(A,function(a,b){if(o.param_names[a])g[o.param_names[a]]=v(b);else{if(!g.splat)g.splat=[];g.splat.push(v(b))}});n=new this.context_prototype(this,b,d,g,h);h=this.arounds.slice(0);s=this.befores.slice(0);w=[n].concat(g.splat);p=function(){for(var a;s.length>0;)if(y=s.shift(),m.contextMatchesOptions(n,y[0])&&(a=y[1].apply(n,[n]),a===!1))return!1;m.last_route=o;n.trigger("event-context-before",{context:n});a=o.callback.apply(n,w);n.trigger("event-context-after",{context:n});return a};
a.each(h.reverse(),function(a,b){var d=p;p=function(){return b.apply(n,[d])}});try{u=p()}catch(x){this.error(["500 Error",b,d].join(" "),x)}return u}else return this.notFound(b,d)},contextMatchesOptions:function(a,b,d){if(typeof b==="undefined"||b=={})return!0;typeof d==="undefined"&&(d=!0);if(typeof b==="string"||g(b.test))b={path:b};if(b.only)return this.contextMatchesOptions(a,b.only,!0);else if(b.except)return this.contextMatchesOptions(a,b.except,!1);var h=!0,m=!0;if(b.path){if(!g(b.path.test))b.path=
RegExp(b.path.toString()+"$");h=b.path.test(a.path)}b.verb&&(m=typeof b.verb==="string"?b.verb===a.verb:b.verb.indexOf(a.verb)>-1);return d?m&&h:!(m&&h)},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(a){return this._location_proxy.setLocation(a)},swap:function(a){return this.$element().html(a)},templateCache:function(a,b){return typeof b!="undefined"?n[a]=b:n[a]},clearTemplateCache:function(){return n={}},notFound:function(a,b){var d=this.error(["404 Not Found",
a,b].join(" "));return a==="get"?d:!0},error:function(a,b){b||(b=Error());b.message=[a,b.message].join(" ");this.trigger("error",{message:b.message,error:b});if(this.raise_errors)throw b;else this.log(b.message,b)},_checkLocation:function(){var a,b;a=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=a)this.last_location=["get",a],b=this.runRoute("get",a);return b},_getFormVerb:function(b){var b=a(b),d,g;g=b.find('input[name="_method"]');g.length>0&&(d=
g.val());d||(d=b[0].getAttribute("method"));if(!d||d=="")d="get";return a.trim(d.toString().toLowerCase())},_checkFormSubmission:function(b){var d,g,h;this.trigger("check-form-submission",{form:b});d=a(b);g=d.attr("action")||"";h=this._getFormVerb(d);this.log("_checkFormSubmission",d,g,h);h==="get"?(d=this._serializeFormParams(d),d!==""&&(g+="?"+d),this.setLocation(g),b=!1):(d=a.extend({},this._parseFormParams(d)),b=this.runRoute(h,g,d,b.get(0)));return typeof b=="undefined"?!1:b},_serializeFormParams:function(a){var b=
"",a=a.serializeArray(),d;if(a.length>0){b=this._encodeFormPair(a[0].name,a[0].value);for(d=1;d<a.length;d++)b=b+"&"+this._encodeFormPair(a[d].name,a[d].value)}return b},_encodeFormPair:function(a,b){return y(a)+"="+y(b)},_parseFormParams:function(a){var b={},a=a.serializeArray(),d;for(d=0;d<a.length;d++)b=this._parseParamPair(b,a[d].name,a[d].value);return b},_parseQueryString:function(a){var b={},d,g;if(a=a.match(p)){a=a[1].split("&");for(g=0;g<a.length;g++)d=a[g].split("="),b=this._parseParamPair(b,
v(d[0]),v(d[1]||""))}return b},_parseParamPair:function(a,b,d){typeof a[b]!=="undefined"?o(a[b])?a[b].push(d):a[b]=[a[b],d]:a[b]=d;return a},_listen:function(a,b){return this.$element().bind([a,this.eventNamespace()].join("."),b)},_unlisten:function(a,b){return this.$element().unbind([a,this.eventNamespace()].join("."),b)}});b.RenderContext=function(a){this.event_context=a;this.callbacks=[];this.content=this.previous_content=null;this.waiting=this.next_engine=!1};b.RenderContext.prototype=a.extend({},
b.Object.prototype,{then:function(a){if(!g(a))if(typeof a==="string"&&a in this.event_context)var b=this.event_context[a],a=function(a){return b.apply(this.event_context,[a])};else return this;var h=this;this.waiting?this.callbacks.push(a):(this.wait(),d.setTimeout(function(){var b=a.apply(h,[h.content,h.previous_content]);b!==!1&&h.next(b)},0));return this},wait:function(){this.waiting=!0},next:function(a){this.waiting=!1;if(typeof a!=="undefined")this.previous_content=this.content,this.content=
a;this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(b,d,h){var m=this;return this.then(function(){var o,n,p;g(d)?(h=d,d={}):d=a.extend({},d);h&&this.then(h);if(typeof b==="string"){o=(p=b.match(/\.json$/)||d.json)&&d.cache===!0||d.cache!==!1;m.next_engine=m.event_context.engineFor(b);delete d.cache;delete d.json;if(d.engine)m.next_engine=d.engine,delete d.engine;if(o&&(n=this.event_context.app.templateCache(b)))return n;this.wait();a.ajax(a.extend({url:b,data:{},dataType:p?
"json":"text",type:"get",success:function(a){o&&m.event_context.app.templateCache(b,a);m.next(a)}},d));return!1}else{if(b.nodeType)return b.innerHTML;if(b.selector)return m.next_engine=b.attr("data-engine"),d.clone===!1?b.remove()[0].innerHTML.toString():b[0].innerHTML.toString()}})},loadPartials:function(a){if(a)for(name in this.partials=this.partials||{},a)(function(b,d){b.load(a[d]).then(function(a){this.partials[d]=a})})(this,name);return this},render:function(a,b,d,h){return g(a)&&!b?this.then(a):
this.loadPartials(h).load(a).interpolate(b,a).then(d)},partial:function(a,b){return this.render(a,b).swap()},send:function(){var a=this,b=m(arguments),d=b.shift();o(b[0])&&(b=b[0]);return this.then(function(){b.push(function(b){a.next(b)});a.wait();d.apply(d,b);return!1})},collect:function(b,d,h){var m=this,o=function(){if(g(b))d=b,b=this.content;var h=[],o=!1;a.each(b,function(a,b){var g=d.apply(m,[a,b]);g.jquery&&g.length==1&&(g=g[0],o=!0);h.push(g);return g});return o?h:h.join("")};return h?o():
this.then(o)},renderEach:function(b,d,g,h){o(d)&&(h=g,g=d,d=null);return this.load(b).then(function(m){var n=this;g||(g=o(this.previous_content)?this.previous_content:[]);if(h)a.each(g,function(a,g){var o={},p=this.next_engine||b;d?o[d]=g:o=g;h(g,n.event_context.interpolate(m,o,p))});else return this.collect(g,function(a,g){var h={},o=this.next_engine||b;d?h[d]=g:h=g;return this.event_context.interpolate(m,h,o)},!0)})},interpolate:function(a,b,d){var g=this;return this.then(function(h,m){!a&&m&&(a=
m);if(this.next_engine)b=this.next_engine,this.next_engine=!1;var o=g.event_context.interpolate(h,a,b,this.partials);return d?m+o:o})},swap:function(){return this.then(function(a){this.event_context.swap(a)}).trigger("changed",{})},appendTo:function(b){return this.then(function(d){a(b).append(d)}).trigger("changed",{})},prependTo:function(b){return this.then(function(d){a(b).prepend(d)}).trigger("changed",{})},replace:function(b){return this.then(function(d){a(b).html(d)}).trigger("changed",{})},
trigger:function(a,b){return this.then(function(d){typeof b=="undefined"&&(b={content:d});this.event_context.trigger(a,b)})}});b.EventContext=function(a,d,g,h,m){this.app=a;this.verb=d;this.path=g;this.params=new b.Object(h);this.target=m};b.EventContext.prototype=a.extend({},b.Object.prototype,{$element:function(){return this.app.$element(m(arguments).shift())},engineFor:function(a){var b;if(g(a))return a;a=(a||this.app.template_engine).toString();if(b=a.match(/\.([^\.\?\#]+)$/))a=b[1];return a&&
g(this[a])?this[a]:this.app.template_engine?this.engineFor(this.app.template_engine):function(a){return a}},interpolate:function(a,b,d,g){return this.engineFor(d).apply(this,[a,b,g])},render:function(a,d,g,h){return(new b.RenderContext(this)).render(a,d,g,h)},renderEach:function(a,d,g,h){return(new b.RenderContext(this)).renderEach(a,d,g,h)},load:function(a,d,g){return(new b.RenderContext(this)).load(a,d,g)},partial:function(a,d){return(new b.RenderContext(this)).partial(a,d)},send:function(){var a=
new b.RenderContext(this);return a.send.apply(a,arguments)},redirect:function(){var b;b=m(arguments);var d=this.app.getLocation(),g=b.length;if(g>1){for(var h=0,o=[],n=[],p={},v=!1;h<g;h++)typeof b[h]=="string"?o.push(b[h]):(a.extend(p,b[h]),v=!0);b=o.join("/");if(v){for(var s in p)n.push(this.app._encodeFormPair(s,p[s]));b+="?"+n.join("&")}}else b=b[0];this.trigger("redirect",{to:b});this.app.last_location=[this.verb,this.path];this.app.setLocation(b);RegExp(b).test(d)&&this.app.trigger("location-changed")},
trigger:function(a,b){typeof b=="undefined"&&(b={});if(!b.context)b.context=this;return this.app.trigger(a,b)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(a){return this.app.swap(a)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(b){return a.parseJSON(b)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}});a.sammy=d.Sammy=b})(jQuery,window);
var Handlebars={VERSION:"1.0.beta.2",helpers:{},partials:{},registerHelper:function(a,d,b){if(b)d.not=b;this.helpers[a]=d},registerPartial:function(a,d){this.partials[a]=d}};Handlebars.registerHelper("helperMissing",function(a){if(arguments.length!==2)throw Error("Could not find property '"+a+"'");});
Handlebars.registerHelper("blockHelperMissing",function(a,d){var b=d.inverse||function(){},h=d.fn,p="",m=Object.prototype.toString.call(a);m==="[object Function]"&&(a=a());if(a===!0)return h(this);else if(a===!1||a==null)return b(this);else if(m==="[object Array]"){if(a.length>0){b=0;for(m=a.length;b<m;b++)p+=h(a[b])}else p=b(this);return p}else return h(a)});
Handlebars.registerHelper("each",function(a,d){var b=d.fn,h=d.inverse,p="";if(a&&a.length>0)for(var h=0,m=a.length;h<m;h++)p+=b(a[h]);else p=h(this);return p});Handlebars.registerHelper("if",function(a,d){return!a||Handlebars.Utils.isEmpty(a)?d.inverse(this):d.fn(this)});Handlebars.registerHelper("unless",function(a,d){var b=d.fn;d.fn=d.inverse;d.inverse=b;return Handlebars.helpers["if"].call(this,a,d)});Handlebars.registerHelper("with",function(a,d){return d.fn(a)});
Handlebars.registerHelper("log",function(a){Handlebars.log(a)});
var handlebars=function(){var a={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,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$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",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"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],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function(a,
d,p,m,g,o){a=o.length-1;switch(g){case 1:return o[a-1];case 2:this.$=new m.ProgramNode(o[a-2],o[a]);break;case 3:this.$=new m.ProgramNode(o[a]);break;case 4:this.$=new m.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 m.InverseNode(o[a-2],o[a-1],o[a]);break;case 8:this.$=new m.BlockNode(o[a-2],o[a-1],o[a]);break;case 9:this.$=o[a];break;case 10:this.$=o[a];break;case 11:this.$=new m.ContentNode(o[a]);break;case 12:this.$=new m.CommentNode(o[a]);
break;case 13:this.$=new m.MustacheNode(o[a-1][0],o[a-1][1]);break;case 14:this.$=new m.MustacheNode(o[a-1][0],o[a-1][1]);break;case 15:this.$=o[a-1];break;case 16:this.$=new m.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new m.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 18:this.$=new m.PartialNode(o[a-1]);break;case 19:this.$=new m.PartialNode(o[a-2],o[a-1]);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:o[a-1].push(o[a]);this.$=o[a-1];break;case 26:this.$=[o[a]];break;case 27:this.$=o[a];break;case 28:this.$=new m.StringNode(o[a]);break;case 29:this.$=new m.IntegerNode(o[a]);break;case 30:this.$=new m.BooleanNode(o[a]);break;case 31:this.$=new m.HashNode(o[a]);break;case 32:o[a-1].push(o[a]);this.$=o[a-1];break;case 33:this.$=[o[a]];break;case 34:this.$=[o[a-2],o[a]];break;case 35:this.$=[o[a-2],new m.StringNode(o[a])];break;case 36:this.$=
[o[a-2],new m.IntegerNode(o[a])];break;case 37:this.$=[o[a-2],new m.BooleanNode(o[a])];break;case 38:this.$=new m.IdNode(o[a]);break;case 39:o[a-2].push(o[a]);this.$=o[a-2];break;case 40: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,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,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,31],21:23,33:[1,25],35:24},{10:32,20:[1,
33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{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:52,33:[1,25],35:24},{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:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,
27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{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,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{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,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function(a){throw Error(a);},parse:function(a){function d(){var a;a=p.lexer.lex()||1;typeof a!=="number"&&(a=p.symbols_[a]||a);return a}var p=this,m=[0],g=[null],o=[],v=this.table,y="",A=0,w=0,n=0;this.lexer.setInput(a);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc=
{};a=this.lexer.yylloc;o.push(a);if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;for(var s,x,f,k,D={},B,z;;){f=m[m.length-1];this.defaultActions[f]?k=this.defaultActions[f]:(s==null&&(s=d()),k=v[f]&&v[f][s]);if(typeof k==="undefined"||!k.length||!k[0]){if(!n){x=[];for(B in v[f])this.terminals_[B]&&B>2&&x.push("'"+this.terminals_[B]+"'");var C="",C=this.lexer.showPosition?"Parse error on line "+(A+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", "):"Parse error on line "+
(A+1)+": Unexpected "+(s==1?"end of input":"'"+(this.terminals_[s]||s)+"'");this.parseError(C,{text:this.lexer.match,token:this.terminals_[s]||s,line:this.lexer.yylineno,loc:a,expected:x})}if(n==3){if(s==1)throw Error(C||"Parsing halted.");w=this.lexer.yyleng;y=this.lexer.yytext;A=this.lexer.yylineno;a=this.lexer.yylloc;s=d()}for(;;){if((2).toString()in v[f])break;if(f==0)throw Error(C||"Parsing halted.");m.length-=2;g.length-=1;o.length-=1;f=m[m.length-1]}x=s;s=2;f=m[m.length-1];k=v[f]&&v[f][2];
n=3}if(k[0]instanceof Array&&k.length>1)throw Error("Parse Error: multiple actions possible at state: "+f+", token: "+s);switch(k[0]){case 1:m.push(s);g.push(this.lexer.yytext);o.push(this.lexer.yylloc);m.push(k[1]);s=null;x?(s=x,x=null):(w=this.lexer.yyleng,y=this.lexer.yytext,A=this.lexer.yylineno,a=this.lexer.yylloc,n>0&&n--);break;case 2:z=this.productions_[k[1]][1];D.$=g[g.length-z];D._$={first_line:o[o.length-(z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(z||1)].first_column,
last_column:o[o.length-1].last_column};f=this.performAction.call(D,y,w,A,this.yy,k[1],g,o);if(typeof f!=="undefined")return f;z&&(m=m.slice(0,z*-2),g=g.slice(0,-1*z),o=o.slice(0,-1*z));m.push(this.productions_[k[1]][0]);g.push(D.$);o.push(D._$);k=v[m[m.length-2]][m[m.length-1]];m.push(k);break;case 3:return!0}}return!0}},d=function(){return{EOF:1,parseError:function(a,d){if(this.yy.parseError)this.yy.parseError(a,d);else throw Error(a);},setInput:function(a){this._input=a;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};return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.match+=a;this.matched+=a;a.match(/\n/)&&this.yylineno++;this._input=this._input.slice(1);return a},unput:function(a){this._input=a+this._input;return this},more:function(){this._more=!0;return this},pastInput:function(){var a=this.matched.substr(0,
this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;a.length<20&&(a+=this._input.substr(0,20-a.length));return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),d=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+d+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var a,d;if(!this._more)this.match=this.yytext="";
for(var p=this._currentRules(),m=0;m<p.length;m++)if(a=this._input.match(this.rules[p[m]]))if((d=a[0].match(/\n.*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-1:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],a=this.performAction.call(this,
this.yy,this,p[m],this.conditionStack[this.conditionStack.length-1]))return a;else return;if(this._input==="")return this.EOF;else this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return typeof a!=="undefined"?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-
1]].rules},performAction:function(a,d,p){switch(p){case 0:this.begin("mu");if(d.yytext)return 14;break;case 1:return 14;case 2:return 24;case 3:return 16;case 4:return 20;case 5:return 19;case 6:return 19;case 7:return 23;case 8:return 23;case 9:return d.yytext=d.yytext.substr(3,d.yyleng-5),this.begin("INITIAL"),15;case 10:return 22;case 11:return 34;case 12:return 33;case 13:return 33;case 14:return 36;case 16:return this.begin("INITIAL"),18;case 17:return this.begin("INITIAL"),18;case 18:return d.yytext=
d.yytext.substr(1,d.yyleng-2).replace(/\\"/g,'"'),28;case 19:return 30;case 20:return 30;case 21:return 29;case 22:return 33;case 23:return d.yytext=d.yytext.substr(1,d.yyleng-2),33;case 24:return"INVALID";case 25:return 5}},rules:[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,
/^[a-zA-Z0-9_$-]+(?=[=}\s/.])/,/^\[.*\]/,/^./,/^$/],conditions:{mu:{rules:[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!1},INITIAL:{rules:[0,1,25],inclusive:!0}}}}();a.lexer=d;return a}();
if(typeof require!=="undefined"&&typeof exports!=="undefined")exports.parser=handlebars,exports.parse=function(){return handlebars.parse.apply(handlebars,arguments)},exports.main=function(a){if(!a[1])throw Error("Usage: "+a[0]+" FILE");a=typeof process!=="undefined"?require("fs").readFileSync(require("path").join(process.cwd(),a[1]),"utf8"):require("file").path(require("file").cwd()).join(a[1]).read({charset:"utf-8"});return exports.parser.parse(a)},typeof module!=="undefined"&&require.main===module&&
exports.main(typeof process!=="undefined"?process.argv.slice(1):require("system").args);Handlebars.Parser=handlebars;Handlebars.parse=function(a){Handlebars.Parser.yy=Handlebars.AST;return Handlebars.Parser.parse(a)};Handlebars.print=function(a){return(new Handlebars.PrintVisitor).accept(a)};Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(){}};Handlebars.log=function(a,d){Handlebars.logger.log(a,d)};
(function(){Handlebars.AST={};Handlebars.AST.ProgramNode=function(a,b){this.type="program";this.statements=a;if(b)this.inverse=new Handlebars.AST.ProgramNode(b)};Handlebars.AST.MustacheNode=function(a,b,h){this.type="mustache";this.id=a[0];this.params=a.slice(1);this.hash=b;this.escaped=!h};Handlebars.AST.PartialNode=function(a,b){this.type="partial";this.id=a;this.context=b};var a=function(a,b){if(a.original!==b.original)throw new Handlebars.Exception(a.original+" doesn't match "+b.original);};Handlebars.AST.BlockNode=
function(d,b,h){a(d.id,h);this.type="block";this.mustache=d;this.program=b};Handlebars.AST.InverseNode=function(d,b,h){a(d.id,h);this.type="inverse";this.mustache=d;this.program=b};Handlebars.AST.ContentNode=function(a){this.type="content";this.string=a};Handlebars.AST.HashNode=function(a){this.type="hash";this.pairs=a};Handlebars.AST.IdNode=function(a){this.type="ID";this.original=a.join(".");for(var b=[],h=0,p=0,m=a.length;p<m;p++){var g=a[p];g===".."?h++:g==="."||g==="this"?this.isScoped=!0:b.push(g)}this.parts=
b;this.string=b.join(".");this.depth=h;this.isSimple=b.length===1&&h===0};Handlebars.AST.StringNode=function(a){this.type="STRING";this.string=a};Handlebars.AST.IntegerNode=function(a){this.type="INTEGER";this.integer=a};Handlebars.AST.BooleanNode=function(a){this.type="BOOLEAN";this.bool=a};Handlebars.AST.CommentNode=function(a){this.type="comment";this.comment=a}})();
Handlebars.Exception=function(a){var d=Error.prototype.constructor.apply(this,arguments),b;for(b in d)d.hasOwnProperty(b)&&(this[b]=d[b])};Handlebars.Exception.prototype=Error();Handlebars.SafeString=function(a){this.string=a};Handlebars.SafeString.prototype.toString=function(){return this.string.toString()};
(function(){var a={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},d=/&(?!\w+;)|[<>"'`]/g,b=/[&<>"'`]/,h=function(b){return a[b]||"&amp;"};Handlebars.Utils={escapeExpression:function(a){if(a instanceof Handlebars.SafeString)return a.toString();else if(a==null||a===!1)return"";return!b.test(a)?a:a.replace(d,h)},isEmpty:function(a){return typeof a==="undefined"?!0:a===null?!0:a===!1?!0:Object.prototype.toString.call(a)==="[object Array]"&&a.length===0?!0:!1}}})();Handlebars.Compiler=function(){};
Handlebars.JavaScriptCompiler=function(){};
(function(a,d){a.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16};a.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1};a.DISASSEMBLE_MAP=
{};for(var b in a.OPCODE_MAP)a.DISASSEMBLE_MAP[a.OPCODE_MAP[b]]=b;a.multiParamSize=function(b){return a.MULTI_PARAM_OPCODES[a.DISASSEMBLE_MAP[b]]};a.prototype={compiler:a,disassemble:function(){for(var b=this.opcodes,d,h=[],m,p=0,w=b.length;p<w;p++)if(d=b[p],d==="DECLARE")m=b[++p],d=b[++p],h.push("DECLARE "+m+" = "+d);else{m=a.DISASSEMBLE_MAP[d];for(var n=a.multiParamSize(d),s=[],x=0;x<n;x++)d=b[++p],typeof d==="string"&&(d='"'+d.replace("\n","\\n")+'"'),s.push(d);m=m+" "+s.join(" ");h.push(m)}return h.join("\n")},
guid:0,compile:function(a,b){this.children=[];this.depths={list:[]};this.options=b;var d=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(d)for(var h in d)this.options.knownHelpers[h]=d[h];return this.program(a)},accept:function(a){return this[a.type](a)},program:function(a){var a=a.statements,b;this.opcodes=[];for(var d=0,h=a.length;d<h;d++)b=a[d],this[b.type](b);this.isSimple=h===1;this.depths.list=this.depths.list.sort(function(a,
b){return a-b});return this},compileProgram:function(a){var a=(new this.compiler).compile(a,this.options),b=this.guid++;this.usePartial=this.usePartial||a.usePartial;this.children[b]=a;for(var d=0,h=a.depths.list.length;d<h;d++)depth=a.depths.list[d],depth<2||this.addDepth(depth-1);return b},block:function(a){var b=a.mustache,d=this.setupStackForMustache(b),h=this.compileProgram(a.program);a.program.inverse&&(a=this.compileProgram(a.program.inverse),this.declare("inverse",a));this.opcode("invokeProgram",
h,d.length,!!b.hash);this.declare("inverse",null);this.opcode("append")},inverse:function(a){var b=this.setupStackForMustache(a.mustache);this.declare("inverse",this.compileProgram(a.program));this.opcode("invokeProgram",null,b.length,!!a.mustache.hash);this.opcode("append")},hash:function(a){var a=a.pairs,b,d;this.opcode("push","{}");for(var h=0,m=a.length;h<m;h++)b=a[h],d=b[1],this.accept(d),this.opcode("assignToHash",b[0])},partial:function(a){var b=a.id;this.usePartial=!0;a.context?this.ID(a.context):
this.opcode("push","depth0");this.opcode("invokePartial",b.original);this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){this.opcode("invokeMustache",this.setupStackForMustache(a).length,a.id.original,!!a.hash);a.escaped?this.opcode("appendEscaped"):this.opcode("append")},ID:function(a){this.addDepth(a.depth);this.opcode("getContext",a.depth);this.opcode("lookupWithHelpers",a.parts[0]||null,a.isScoped||!1);for(var b=1,d=a.parts.length;b<d;b++)this.opcode("lookup",
a.parts[b])},STRING:function(a){this.opcode("pushString",a.string)},INTEGER:function(a){this.opcode("push",a.integer)},BOOLEAN:function(a){this.opcode("push",a.bool)},comment:function(){},pushParams:function(a){for(var b=a.length,d;b--;)if(d=a[b],this.options.stringParams)d.depth&&this.addDepth(d.depth),this.opcode("getContext",d.depth||0),this.opcode("pushStringParam",d.string);else this[d.type](d)},opcode:function(b,d,h,m){this.opcodes.push(a.OPCODE_MAP[b]);d!==void 0&&this.opcodes.push(d);h!==
void 0&&this.opcodes.push(h);m!==void 0&&this.opcodes.push(m)},declare:function(a,b){this.opcodes.push("DECLARE");this.opcodes.push(a);this.opcodes.push(b)},addDepth:function(a){a!==0&&!this.depths[a]&&(this.depths[a]=!0,this.depths.list.push(a))},setupStackForMustache:function(a){var b=a.params;this.pushParams(b);a.hash&&this.hash(a.hash);this.ID(a.id);return b}};d.prototype={nameLookup:function(a,b){return/^[0-9]+$/.test(b)?a+"["+b+"]":d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},appendToBuffer:function(a){return this.environment.isSimple?
"return "+a+";":"buffer += "+a+";"},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,d,h){this.environment=a;this.options=b||{};this.name=this.environment.name;this.isChild=!!d;this.context=d||{programs:[],aliases:{self:"this"},registers:{list:[]}};this.preamble();this.stackSlot=0;this.stackVars=[];this.compileChildren(a,b);a=a.opcodes;this.i=0;for(m=a.length;this.i<m;this.i++)a=this.nextOpcode(0),a[0]==="DECLARE"?(this.i+=2,this[a[1]]=a[2]):(this.i+=
a[1].length,this[a[0]].apply(this,a[1]));return this.createFunctionContext(h)},nextOpcode:function(b){var d=this.environment.opcodes,h=d[this.i+b],m,p;if(h==="DECLARE")return m=d[this.i+1],b=d[this.i+2],["DECLARE",m,b];else{m=a.DISASSEMBLE_MAP[h];h=a.multiParamSize(h);p=[];for(var w=0;w<h;w++)p.push(d[this.i+w+1+b]);return[m,p]}},eat:function(a){this.i+=a.length},preamble:function(){var a=[];if(this.isChild)a.push("");else{var b=this.namespace,d="helpers = helpers || "+b+".helpers;";this.environment.usePartial&&
(d=d+" partials = partials || "+b+".partials;");a.push(d)}this.environment.isSimple?a.push(""):a.push(", buffer = "+this.initializeBuffer());this.lastContext=0;this.source=a},createFunctionContext:function(a){var b=this.stackVars;this.isChild||(b=b.concat(this.context.registers.list));b.length>0&&(this.source[1]=this.source[1]+", "+b.join(", "));if(!this.isChild)for(var d in this.context.aliases)this.source[1]=this.source[1]+", "+d+"="+this.context.aliases[d];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;");b=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];d=0;for(var h=this.environment.depths.list.length;d<h;d++)b.push("depth"+this.environment.depths.list[d]);return a?(b.push(this.source.join("\n  ")),Function.apply(this,b)):(a="function "+(this.name||"")+"("+b.join(",")+") {\n  "+this.source.join("\n  ")+
"}",Handlebars.log(Handlebars.logger.DEBUG,a+"\n\n"),a)},appendContent:function(a){this.source.push(this.appendToBuffer(this.quotedString(a)))},append:function(){var a=this.popStack();this.source.push("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }");this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var a=this.nextOpcode(1),b="";this.context.aliases.escapeExpression="this.escapeExpression";a[0]==="appendContent"&&(b=" + "+this.quotedString(a[1][0]),
this.eat(a));this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+b))},getContext:function(a){if(this.lastContext!==a)this.lastContext=a},lookupWithHelpers:function(a,b){if(a){var d=this.nextStack();this.usingKnownHelper=!1;!b&&this.options.knownHelpers[a]?(d=d+" = "+this.nameLookup("helpers",a,"helper"),this.usingKnownHelper=!0):d=b||this.options.knownHelpersOnly?d+" = "+this.nameLookup("depth"+this.lastContext,a,"context"):d+" = "+this.nameLookup("helpers",a,"helper")+" || "+
this.nameLookup("depth"+this.lastContext,a,"context");d+=";";this.source.push(d)}else this.pushStack("depth"+this.lastContext)},lookup:function(a){var b=this.topStack();this.source.push(b+" = ("+b+" === null || "+b+" === undefined || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")+");")},pushStringParam:function(a){this.pushStack("depth"+this.lastContext);this.pushString(a)},pushString:function(a){this.pushStack(this.quotedString(a))},push:function(a){this.pushStack(a)},invokeMustache:function(a,
b,d){this.populateParams(a,this.quotedString(b),"{}",null,d,function(a,b,d){if(!this.usingKnownHelper)this.context.aliases.helperMissing="helpers.helperMissing",this.context.aliases.undef="void 0",this.source.push("else if("+d+"=== undef) { "+a+" = helperMissing.call("+b+"); }"),a!==d&&this.source.push("else { "+a+" = "+d+"; }")})},invokeProgram:function(a,b,d){var h=this.programExpression(this.inverse),a=this.programExpression(a);this.populateParams(b,null,a,h,d,function(a,b){if(!this.usingKnownHelper)this.context.aliases.blockHelperMissing=
"helpers.blockHelperMissing",this.source.push("else { "+a+" = blockHelperMissing.call("+b+"); }")})},populateParams:function(a,b,d,h,m,p){var n=m||this.options.stringParams||h||this.options.data,s=this.popStack(),x=[];n?(this.register("tmp1",d),d="tmp1"):d="{ hash: {} }";n&&this.source.push("tmp1.hash = "+(m?this.popStack():"{}")+";");this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(n=0;n<a;n++)m=this.popStack(),x.push(m),this.options.stringParams&&this.source.push("tmp1.contexts.push("+
this.popStack()+");");h&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+h+";"));this.options.data&&this.source.push("tmp1.data = data;");x.push(d);this.populateCall(x,s,b||s,p)},populateCall:function(a,b,d,h){var m=["depth0"].concat(a).join(", "),a=["depth0"].concat(d).concat(a).join(", "),d=this.nextStack();this.usingKnownHelper?this.source.push(d+" = "+b+".call("+m+");"):(this.context.aliases.functionType='"function"',this.source.push("if(typeof "+b+" === functionType) { "+
d+" = "+b+".call("+m+"); }"));h.call(this,d,a,b);this.usingKnownHelper=!1},invokePartial:function(a){this.pushStack("self.invokePartial("+this.nameLookup("partials",a,"partial")+", '"+a+"', "+this.popStack()+", helpers, partials);")},assignToHash:function(a){var b=this.popStack();this.source.push(this.topStack()+"['"+a+"'] = "+b+";")},compiler:d,compileChildren:function(a,b){for(var d=a.children,h,m,p=0,n=d.length;p<n;p++){h=d[p];m=new this.compiler;this.context.programs.push("");var s=this.context.programs.length;
h.index=s;h.name="program"+s;this.context.programs[s]=m.compile(h,b,this.context)}},programExpression:function(a){if(a==null)return"self.noop";for(var b=this.environment.children[a],a=b.depths.list,b=[b.index,b.name,"data"],d=0,h=a.length;d<h;d++)depth=a[d],depth===1?b.push("depth0"):b.push("depth"+(depth-1));return a.length===0?"self.program("+b.join(", ")+")":(b.shift(),"self.programWithDepth("+b.join(", ")+")")},register:function(a,b){this.useRegister(a);this.source.push(a+" = "+b+";")},useRegister:function(a){this.context.registers[a]||
(this.context.registers[a]=!0,this.context.registers.list.push(a))},pushStack:function(a){this.source.push(this.nextStack()+" = "+a+";");return"stack"+this.stackSlot},nextStack:function(){this.stackSlot++;this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot);return"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,
"\\n").replace(/\r/g,"\\r")+'"'}};b="break case catch continue default delete do else finally for function if in instanceof new return switch this throw try typeof var void while with null true false".split(" ");for(var h=d.RESERVED_WORDS={},p=0,m=b.length;p<m;p++)h[b[p]]=!0;d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(a)?!0:!1}})(Handlebars.Compiler,Handlebars.JavaScriptCompiler);
Handlebars.precompile=function(a,d){var d=d||{},b=Handlebars.parse(a),b=(new Handlebars.Compiler).compile(b,d);return(new Handlebars.JavaScriptCompiler).compile(b,d)};Handlebars.compile=function(a,d){var d=d||{},b;return function(h,p){if(!b){var m=Handlebars.parse(a),m=(new Handlebars.Compiler).compile(m,d),m=(new Handlebars.JavaScriptCompiler).compile(m,d,void 0,!0);b=Handlebars.template(m)}return b.call(this,h,p)}};
Handlebars.VM={template:function(a){var d={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(a,d,p){var m=this.programs[a];return p?Handlebars.VM.program(d,p):(m||(m=this.programs[a]=Handlebars.VM.program(d)),m)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(b,h){h=h||{};return a.call(d,Handlebars,b,h.helpers,h.partials,h.data)}},programWithDepth:function(a,d,b){var h=Array.prototype.slice.call(arguments,
2);return function(b,m){m=m||{};return a.apply(this,[b,m.data||d].concat(h))}},program:function(a,d){return function(b,h){h=h||{};return a(b,h.data||d)}},noop:function(){return""},invokePartial:function(a,d,b,h,p){if(a===void 0)throw new Handlebars.Exception("The partial "+d+" could not be found");else if(a instanceof Function)return a(b,{helpers:h,partials:p});else if(Handlebars.compile)return p[d]=Handlebars.compile(a),p[d](b,{helpers:h,partials:p});else throw new Handlebars.Exception("The partial "+
d+" could not be compiled when running in vm mode");}};Handlebars.template=Handlebars.VM.template;(function(a){Sammy=Sammy||{};Sammy.Handlebars=function(d,b){var h={};b||(b="handlebars");d.helper(b,function(b,d,g,o){typeof o=="undefined"&&(o=b);var v=h[o];v||(v=h[o]=Handlebars.compile(b));d=a.extend({},this,d);g=a.extend({},d.partials,g);return v(d,{partials:g})})}})(jQuery);
(function(){Sammy=Sammy||{};Sammy.GoogleAnalytics=function(a,d){var b=d||window.pageTracker,h=!0;this.helpers({noTrack:function(){h=!1},track:function(a){if((typeof b!="undefined"||typeof _gaq!="undefined")&&h)this.log("tracking",a),typeof b!="undefined"?b._trackPageview(a):typeof _gaq!="undefined"&&_gaq.push(["_trackPageview",a])}});this.bind("event-context-after",function(){this.track(this.path);h=!0})}})(jQuery);
(function(){get.namespace("view").notFound=function(a){a=$.extend({verb:void 0,path:void 0},a);this.verb=a.verb;this.path=a.path;this.headerTitle="404 - Ugyldig adresse"}})();(function(){get.namespace("view").error=function(a){a=$.extend({message:void 0,error:void 0},a);this.message=a.message;this.error=a.error;this.headerTitle="En feil oppstod"}})();
(function(){get.namespace("view").channelList=function(a){a=$.extend({channels:void 0,headerTitle:"På TV nå"},a);this.channels=a.channels;this.headerTitle=a.headerTitle}})();
(function(){get.namespace("view").program=function(a){var a=$.extend({program:void 0,channel:void 0,equipment:void 0,selectedEquipment:void 0},a),d=this;d.channel=a.channel;d.program=a.program;d.equipment=a.equipment;d.initializeSelectedEquipment=function(){if(d.equipment&&d.equipment.length==1)return _.first(d.equipment)};d.selectedEquipment=d.initializeSelectedEquipment();d.headerTitle="Program";d.multipleEquipment=d.equipment.length>1;d.programDate=d.program.getTimeInfoWithDate();d.rendered=function(){var a=
$("#show-equipment");if(a.length==1)a.on("click",function(){d.showEquipment()})};d.showEquipment=function(){var a=$("#equipment-list");a&&(a.on("click","li",function(h){var p=h.target.id;d.selectedEquipment=_.find(d.equipment,function(a){return a.unitaddress==p});a.find(".selected").removeClass("selected");$(h.target).addClass("selected");d.hideEquipment()}),$("#equipment-chooser").show("fast"),$("html, body").animate({scrollTop:$(document).height()},500))};d.hideEquipment=function(){var a=$("#equipment-list");
a&&(a.off("click","li"),$("#equipment-chooser").hide("fast"))}}})();
(function(){get.namespace("view").channel=function(a){for(var a=$.extend({channel:void 0,date:void 0,headerTitle:"Kanal"},a),d=this,b,h=[],p=DateUtils.getNowDate(),m,g=0;g<7;g++){m=DateUtils.addDaysToDate(p,g);var o={key:DateUtils.isoDate(m),value:DateUtils.formatDay(m,!0)};if(a.date-m==0)o.selected="selected",b=g+1;h.push(o)}this.channel=a.channel;this.date=a.date;this.formatedDate=DateUtils.formatDate(a.date)+" "+a.date.getFullYear();this.isodate=DateUtils.isoDate(a.date);this.programDateList=h;
this.headerTitle=this.channel.name;d.nextDay=d.programDateList[b];this.dateChange=function(a){$("#program-date").change(function(){var b=$(this).val();a(b)});$("#load-next-day").on("click",function(b){a(b.currentTarget.className);b.currentTarget.className=d.nextDay.key;b.currentTarget.innerHTML="Laster...";$("html, body").animate({scrollTop:0},250)})};this.rendered=function(){var a=$(".inProgress");a.length==1&&$("html, body").animate({scrollTop:a.offset().top-60},250)}}})();
(function(){get.namespace("view").favourite=function(a){var a=$.extend({channels:void 0,favouriteChannels:void 0,subscribedChannels:void 0,headerTitle:"Velg kanaler"},a),d=this;this.favouriteChannels=a.favouriteChannels;this.subscribedChannels=a.subscribedChannels;this.headerTitle=a.headerTitle;this.canChooseChannels=AppStorageManager.isSupported();this.channels=[];_.each(a.channels,function(a){var h={channel:a};if(_.find(d.favouriteChannels,function(d){return d==a.id}))h.checked=!0;d.channels.push(h)});
this.bindEvents=function(a){$(".checkbox").click(function(){$(this).toggleClass("checked");var a=$(this).children('input[type="checkbox"]');a[0].checked=!a[0].checked;a.trigger("change")});$('.checkbox input[type="checkbox"]').change(function(){var h=[];$('.checkbox input[type="checkbox"]').each(function(){$(this).attr("checked")&&h.push(parseInt($(this).val()))});d.favouriteChannels=h;a(d.favouriteChannels)})}}})();
(function(){get.namespace("view").programSearch=function(a){var a=$.extend({query:void 0,result:void 0,headerTitle:"Søkeresultat"},a),d=[];for(day in a.result){var b=a.result.hasOwnProperty(day)?a.result[day]:[];if(b.length>0){for(var h=0;h<b.length;h++)b[h].channelIcon=UrlUtils.getChannelLogoUrl(b[h].channelName,ImageUtils.LOGO_MEDIUM,!1);d.push({day:b[0].formatDay(),items:b})}}this.query=a.query;this.result=d;this.headerTitle=a.headerTitle}})();
(function(){get.namespace("view").login=function(a){a=$.extend({headerTitle:"Logg inn",nextPath:void 0,number:void 0},a);this.headerTitle=a.headerTitle;this.nextPath=a.nextPath;this.number=a.number;var d;this.getUsernameInput=function(){return $("#username").val()};this.rendered=function(){d=$("#loginError")};this.showError=function(a){d.html(a);d.show()};this.hideError=function(){d.hide()}}})();
(function(){get.namespace("view").menu=function(a){var a=$.extend({channel:void 0,hidden:!0,loggedIn:!1},a),d=this;this.hidden=a.hidden;this.loggedIn=a.loggedIn;this.canChooseChannels=AppStorageManager.isSupported();this.placementSelector=function(){return $("#top")};this.menuSelector=function(){return $("#menu")};this.bindEvents=function(){var a=$("#menu-content");a.css("top","-"+a.height()+"px");a.hide();$("#show-menu").on("click",function(){if(d.hidden){d.hidden=!1;var a=$("#menu-content");$("#content-wrapper input, #content-wrapper select").attr("disabled",
"disabled");$("a").addClass("disabled");a.show();var h=a.height()+55;a.animate({top:"+="+h+"px"},400,"easeOutCirc")}else b()});$("#menu-content a").on("click",function(){var a=$(this).attr("href");(a!="#"?a:"")==window.location.hash&&b()})};var b=function(){d.hidden=!0;var a=$("#menu-content");$("#content-wrapper input, #content-wrapper select").removeAttr("disabled");$("a").removeClass("disabled");var b=a.height()+55;a.animate({top:"-="+b+"px"},300,"easeOutCirc",function(){a.hide()})}}})();
(function(){get.namespace("view").missingPassword=function(a){a=$.extend({headerTitle:"Ny bruker / glemt kode",nextPath:void 0,number:void 0},a);this.headerTitle=a.headerTitle;this.number=a.number;var d;this.rendered=function(){d=$(".error")};this.showError=function(a){d.html(a);d.show()};this.hideError=function(){d.hide()}}})();
(function(){get.namespace("view").remoteAdmin=function(a){a=$.extend({mobileAndPins:[],headerTitle:"Brukere"},a);this.headerTitle=a.headerTitle;this.mobileAndPins=a.mobileAndPins;var d,b=$.Callbacks();this.rendered=function(){d=$(".error");$(".password").on("blur",function(a){var d=$(a.currentTarget.parentElement.firstElementChild).val(),a=$(a.currentTarget).val();b.fire(d,a)})};this.showError=function(a){d.html(a);d.show()};this.hideError=function(){d.hide()};this.subscribeToUsernameAndPasswordChange=
function(a){b.add(a)}}})();(function(){get.namespace("view").newRemoteAdmin=function(a){a=$.extend({headerTitle:"Nytt mobilnummer"},a);this.headerTitle=a.headerTitle;var d;this.rendered=function(){d=$(".error")};this.showError=function(a){d.html(a);d.show()};this.hideError=function(){d.hide()}}})();(function(){get.namespace("view").searchView=function(){}})();
(function(){get.namespace("controller").error=function(a){a.error=function(d,b){Sammy.Application.prototype.error.call(this,d,b);var h=new get.view.error({message:b.message,error:b}),p=new a.context_prototype(a,"error");p.startLoader();p.render("template/error.hb",h,function(a){p.swap(a);p.showMenu();p.stopLoader()},{header:"template/shared/header.hb"})};a.notFound=function(d,b){var h=new get.view.notFound({verb:d,path:b}),p=new a.context_prototype(a,"notfound");p.startLoader();p.render("template/404.hb",
h,function(a){p.swap(a);p.showMenu();p.stopLoader()},{header:"template/shared/header.hb"})}}})();
(function(){get.namespace("controller").menu=function(a){function d(a,d){d.render("template/menuView.hb",a).then(function(d){var h=a.menuSelector();h&&h.remove();a.placementSelector().append(d);a.bindEvents()})}a.bind("showMenu",function(){var a=this;get.dao.user.getCurrentUser(function(){var h=new get.view.menu({loggedIn:!0});d(h,a)},function(){var h=new get.view.menu({loggedIn:!1});d(h,a)})});a.post("#/post/logout",function(a){a.startLoader();get.dao.user.logoutUser(function(){a.stopLoader();var d=
a.params.next||"";d==window.location.pathname+window.location.search+window.location.hash?window.location.reload():window.location.href=d})})}})();
(function(){get.namespace("controller").login=function(a){var d,b;a.get(/#\/login\/?(\$next=[^\$]*)?\/?(\$number=.*)?\/?/,function(a,b,m){a.startLoader();b=b?b.replace(/^\$next=/,""):"";m=m?m.replace(/^\$number=/,""):"";d=new get.view.login({nextPath:b,number:m});a.render("template/loginView.hb",d,function(b){a.swap(b);d.rendered();a.stopLoader()},{header:"template/shared/header.hb"})});a.get("#/missing-password",function(a){a.startLoader();b=new get.view.missingPassword({number:d.getUsernameInput()});
a.render("template/missingPasswordView.hb",b,function(d){a.swap(d);b.rendered();a.stopLoader()},{header:"template/shared/header.hb"})});a.post("#/post/login",function(a){d.hideError();var b=_.isEmpty(a.params.username),m=_.isEmpty(a.params.password);b&&m?d.showError("Du må spesifisere mobilnummer og kode"):b?d.showError("Du må spesifisere mobilnummer"):m?d.showError("Du må spesifisere kode"):(a.startLoader(),get.dao.user.loginUser(a.params.username,a.params.password,function(){a.stopLoader();window.location.href=
a.params.next||""},function(){a.stopLoader();d.showError("Ditt brukernavn eller passord er feil")}));return!1});a.post("#/post/missing-password",function(a){b.hideError();_.isEmpty(a.params.username)?b.showError("Du må spesifisere mobilnummer"):get.dao.user.resetLoginCode(a.params.username,function(p,m){m?b.showError(p):(alert(p),a.redirect("#/login$next="+d.nextPath+"$number="+b.number));a.stopLoader()});return!1})}})();
(function(){get.namespace("controller").tvguide=function(a){var d,b,h,p=!0;a.around(function(a){var d="";this.path&&(d=this.path.split("#/"),d=d.length>1?"#/"+d[1]:"");d.match(/(^$)|(^#\/tvguide)/)?(this.startLoader(),get.dao.tvguide.getChannelsAndPackages(function(d){h=get.dao.user.getUserFavouriteChannels(d.allChannelIds);d=get.dao.tvguide.getChannelsById(h);get.dao.tvguide.getCurrentPrograms(d,6,p,function(d){b=d.channels;p=!1;a()})},function(){a()},function(){a()})):a()});a.get(/^[^#]*(#\/)?$/,
function(a){var d=new get.view.channelList({channels:b});a.render("template/channelListView.hb",d,function(b){a.swap(b);a.showMenu();a.stopLoader();a.scrollToLastPosition();get.view.searchView()},{header:"template/shared/header.hb",search:"template/shared/search.hb"})});a.get(/#\/tvguide\/(\d+)\/?(\d{4,}-\d{2}-\d{2})?\/?$/,function(b,d,h){var p=h?DateUtils.parseDate(h):DateUtils.getNowDate();get.dao.tvguide.getChannelProgramsForOneDay(d,p,function(a){var h=new get.view.channel({channel:a.channel,
date:p});b.render("template/channelView.hb",h,function(a){b.swap(a);b.showMenu();h.rendered();h.dateChange(function(a){b.redirect("#/tvguide/"+d+"/"+a+"/")});b.stopLoader()},{header:"template/shared/header.hb"})},function(){a.error("Feil i innhenting av program")})});a.get(/#\/tvguide\/(\d+)\/?(\d{4,}-\d{2}-\d{2})\/(\d*)\/?$/,function(b,g,h,p){h=DateUtils.parseDate(h);get.dao.tvguide.getChannelProgramsForOneDay(g,h,function(a){var a=a.channel,g=_.find(a.programs,function(a){return a.id==p});g?(d=
new get.view.program({program:g,channel:a,equipment:get.dao.user.getEquipment()}),b.render("template/programView.hb",d,function(a){b.swap(a);b.showMenu();d.rendered();b.stopLoader()},{header:"template/shared/header.hb"})):b.notFound()},function(){a.error("Feil i innhenting av program")})});a.get("#/tvguide/favoritter",function(a){get.dao.tvguide.getChannelsAndPackages(function(b){var d=new get.view.favourite({channels:b.channels,favouriteChannels:h});a.render("template/favouriteChannelsView.hb",d,
function(b){a.swap(b);a.showMenu();d.bindEvents(function(a){p=!0;get.dao.user.saveUserFavouriteChannels(a)});a.stopLoader()},{header:"template/shared/header.hb"})})});a.get("#/search",function(a){function b(d,g){var h=new get.view.programSearch({query:d,result:g});a.render("template/programSearchView.hb",h,function(b){a.swap(b);a.showMenu();a.stopLoader();get.view.searchView()},{header:"template/shared/header.hb",search:"template/shared/search.hb"})}var d=a.params.q||"";a.startLoader("Søker...");
d?get.dao.search.search(d,get.dao.user.getUserFavouriteChannels(),function(a){b(d,a)}):b(d,[])});a.post("#/post/record",function(a){a.startLoader("Sender opptak...");var b=d.program,h=d.channel;b.status>=0&&get.dao.user.isLoggedIn()&&get.dao.user.getRecordingState()&&get.dao.user.userHasChannel(h)?(h=d.selectedEquipment)?get.dao.tvguide.startRecording(b,h.unitaddress,function(){d.hideEquipment();a.stopLoader();alert("Opptaksmelding sendt til dekoder")},function(){d.selectedEquipment=d.initializeSelectedEquipment();
d.hideEquipment();a.stopLoader();alert("Opptaksmelding kunne ikke sendes til dekoder")}):(a.stopLoader(),d.showEquipment()):(a.stopLoader(),get.dao.user.isLoggedIn()&&!get.dao.user.getRecordingState()?alert("Du må ha en Get Box HD PVR for å kunne gjøre opptak. Kontakt Get for informasjon og bestilling."):get.dao.user.isLoggedIn()&&!get.dao.user.userHasChannel(h)?alert("Du har ikke denne kanalen i din kanalpakke."):b.status<0?alert("Dette programmet har allerede gått."):confirm("Du må være innlogget Get-kunde for å kunne gjøre opptak. Vil du gå til innloggingsiden?")===
!0&&a.redirect("#/login$next="+window.location.hash));return!1})}})();
(function(){get.namespace("controller").remoteAdmin=function(a){function d(a,d){h.hideError();var o=_.find(h.mobileAndPins,function(b){return b.mobile==a});b(a,d,function(){if(o.pin!==d)o.pin=d,get.dao.remoteBooking.changeMobileAndPin({number:a,pin:d},function(){alert("Passord ble oppdatert for "+a)})},function(a){h.showError(a)})}function b(b,d,h,p){get.dao.remoteBooking.getMobileAndPin(function(a){var A=_.isEmpty(b),w=_.isEmpty(d),n=!isNaN(b),s=!isNaN(d);a.length>=4?p("Fire mobilnummer er registrert og du kan ikke registere flere. Slett en av de allerede registerte og prøv igjen."):
A&&w?p("Du må spesifisere mobilnummer og kode."):A?p("Du må spesifisere mobilnummer."):w?p("Du må spesifisere kode."):d.length>4||d.length<4?p("Kode må være akkurat fire tegn."):n?s?h():p("Kode må bare være tall."):p("Mobilnummeret må bare være tall.")},function(){a.error("Ikke logget inn","Du må være logget inn for å kunne se denne siden")})}var h,p;a.get("#/user/admin",function(b){b.startLoader();get.dao.remoteBooking.getMobileAndPin(function(a){h=new get.view.remoteAdmin({mobileAndPins:a});b.render("template/remoteAdminView.hb",
h,function(a){b.swap(a);b.showMenu();b.stopLoader();b.scrollToLastPosition();h.rendered();h.subscribeToUsernameAndPasswordChange(function(a,b){d(a,b)})},{header:"template/shared/header.hb"})},function(){b.stopLoader();a.error("Ikke logget inn","Du må være logget inn for å kunne se denne siden")})});a.get("#/user/add-new",function(a){a.startLoader();p=new get.view.newRemoteAdmin;a.render("template/newRemoteAdminView.hb",p,function(b){a.swap(b);a.showMenu();a.stopLoader();a.scrollToLastPosition();p.rendered()},
{header:"template/shared/header.hb"})});a.post("#/post/new-remote-admin",function(a){p.hideError();a.startLoader();b(a.params.username,a.params.password,function(){get.dao.remoteBooking.saveMobileAndPin({number:a.params.username,pin:a.params.password},function(){a.stopLoader();a.redirect("#/user/admin");a.stopLoader()},function(){a.stopLoader();p.showError("Mobilnummeret er allerede registert på deg eller noen andre.");a.stopLoader()})},function(b){p.showError(b);a.stopLoader()});return!1});a.post("#/post/delete-remote-admin",
function(a){h.mobileAndPins.length>1?get.dao.remoteBooking.removeMobileAndPin({number:a.params.username},function(){a.stopLoader();a.redirect("#/user/admin")}):h.showError("Du kan ikke slette den siste brukeren.")})}})();
(function(){get.namespace("helper").handlebar=function(){Handlebars.registerHelper("debug",function(a){console.log("");console.log("---- Handlebar debug ----");console.log("Context: ");console.log(this);console.log("");a&&(console.log("Object: "),console.log(a));console.log("---- Handlebar debug end ----");console.log("")});Handlebars.registerHelper("until",function(a,d){for(var b=d.hash.max,h="",p=0,m=a.length;p<m;p++){if(p>=b)break;h+=d(a[p])}return h});Handlebars.registerHelper("programStatus",
function(a){if(a==-1)return"completed";else if(this.status===0)return"inProgress";return"coming"});Handlebars.registerHelper("forIn",function(a,d){var b="",h;for(h in a)a.hasOwnProperty(h)&&(b+=d({key:h,value:a[h]}));return b})}})();
(function(){var a=function(a){var b={},h;a.before("",function(){b[h]=$(window).scrollTop();h=a.getLocation()});this.scrollToLastPosition=function(){var a=b[h];$(window).scrollTop(a)}};get.namespace("helper").sammy=function(d){var b=new a(d);d.helpers({scrollToLastPosition:b.scrollToLastPosition,showMenu:function(a){this.trigger("showMenu",a)},stopLoader:function(){get.component.loader(!1)},startLoader:function(a){get.component.loader(!0,a)}})}})();
(function(a){var d=a.sammy("#app-container",function(){this.use("Handlebars","hb");this.use("GoogleAnalytics");this.disable_push_state=!0;get.helper.sammy(this);get.helper.handlebar();get.controller.error(this);get.controller.menu(this);get.controller.login(this);get.controller.tvguide(this);get.controller.remoteAdmin(this)});a(function(){d.run()})})(jQuery);
