/*!
 * jQuery JavaScript Library v1.4.4
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu Nov 11 19:04:53 2010 -0500
 */
(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
c.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".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={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,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.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 a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
/* Create file on the fly... */
var Nx=Nx||{};Nx.$=jQuery.noConflict(false);
Nx.Config={dependencyPath:{library:'/js/libraries/dynamic/',plugin:'/js/plugins/dynamic/',util:'/js/utils/dynamic/'}};
var SBB=SBB||{};var Nx=Nx||{};if(typeof(console)==='undefined'){console={'info':function(){},'log':function(){},'dir':function(){},'assert':function(){}};}
(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];}
function Class(){if(!initializing&&this.init){this.init.apply(this,arguments);}}
Class.prototype=prototype;Class.constructor=Class;Class.extend=arguments.callee;return Class;};})();
(function($){$.log={toggle:function(){},resize:function(){},clear:function(){},move:function(){},debug:function(){},warn:function(){},info:function(){},error:function(){},time:function(){}};})(Nx.$);
(function($){Nx.Application=Class.extend({init:function($ctx,config){this.config=$.extend(Nx.Config,config);this.$ctx=$ctx||$('body');this.modules=[];this.connectors={};this.wildcardComponents=[];this.sandbox=new Nx.Sandbox(this,this.config);},registerModules:function($ctx){var that=this;var modules=[];$ctx=$ctx||this.$ctx;$('.mod:not([data-lazyinit=true]):not(.mod[data-lazyinit=true] .mod)',$ctx).each(function(){var $this=$(this);var classes=$this.attr('class').split(' ');if(classes.length>1){var modName,skins=[],connectors=[];for(var i=0,len=classes.length;i<len;i++){var part=$.trim(classes[i]);if(part.indexOf('mod')===0&&part.length>3){modName=part.substr(3);}
else if(part.indexOf('skin')===0){skins.push(part.substr(4).replace(modName,''));}
else if(part.indexOf('conn')===0){connectors.push(part.substr(4));}}
if(modName&&Nx.Module[modName]){modules.push(that.registerModule($this,modName,skins,connectors));}}});return modules;},unregisterModules:function(modules){var connectors=this.connectors;var wildcardComponents=this.wildcardComponents;modules=modules||this.modules;if(modules===this.modules){this.wildcardComponents=[];this.connectors=[];this.modules=[];}
else{for(var i=0,len=modules.length;i<len;i++){var module=modules[i];var index;for(var connId in connectors){connectors[connId].unregisterComponent(module);}
index=$.inArray(module,wildcardComponents);delete wildcardComponents[index];index=$.inArray(module,this.modules);delete this.modules[index];}}},start:function(modules){var wildcardComponents=this.wildcardComponents;var connectors=this.connectors;modules=modules||this.modules;for(var i=0,len=modules.length;i<len;i++){modules[i].start();}
for(var i=0,len=wildcardComponents.length;i<len;i++){var component=wildcardComponents[i];if($.inArray(component,modules)>-1){for(var connectorId in connectors){component.attachConnector(connectors[connectorId]);connectors[connectorId].registerComponent(component,'*');}}}},stop:function(modules){modules=modules||this.modules;for(var i=0,len=modules.length;i<len;i++){modules[i].stop();}},registerModule:function($node,modName,skins,connectors){var modules=this.modules;modName=modName||null;skins=skins||[];connectors=connectors||[];if(modName&&Nx.Module[modName]){var modId=modules.length;$node.data('id',modId);$.log.debug('instantiate Nx.Module.'+modName);modules[modId]=new Nx.Module[modName]($node,this.sandbox,modId);for(var i=0,len=skins.length;i<len;i++){var skinName=skins[i];if(Nx.Module[modName][skinName]){$.log.debug('decorate it with the skin Nx.Module.'+modName+'.'+skinName);modules[modId]=modules[modId].getDecoratedModule(modName,skinName);}}
this.applyErrorHandler(modName,modules[modId]);for(var i=0,len=connectors.length;i<len;i++){this.registerConnection(connectors[i],modules[modId]);}
return modules[modId];}
else{$.log.info('the module Nx.Module.'+modName+' does not exist');return null;}},registerConnection:function(connector,component){var connectorType=connector.replace(/[0-9]+[a-zA-Z]*$/,'');var connectorId=connector.replace(/[a-zA-Z]*$/,'').replace(/^[a-zA-Z]*/,'');var connectorRole=connector.replace(/^[a-zA-Z]*[0-9]*/,'');if(connectorId==='*'&&connectorRole==='*'){this.wildcardComponents.push(component);}
else{var connectors=this.connectors;if(!connectors[connectorId]){if(connectorType===''){connectors[connectorId]=new Nx.Connector(connectorId);}
else if(Nx.Connector[connectorType]){connectors[connectorId]=new Nx.Connector[connectorType](connectorId);}}
if(connectors[connectorId]){$.log.debug('attach the connector: '+connectorId);component.attachConnector(connectors[connectorId]);connectors[connectorId].registerComponent(component,connectorRole);}}},applyErrorHandler:function(componentName,component){var config=this.config;for(var methodName in component){var method=component[methodName];if($.isFunction(method)){component[methodName]=function(componentName,methodName,method){return function(){try{return method.apply(this,arguments);}
catch(ex){$.log.error(componentName+'.'+methodName+'(): '+ex.message);if(config.debug){throw ex;}}};}(componentName,methodName,method);}}}});})(Nx.$);
(function($){Nx.Module=Class.extend({init:function($ctx,sandbox,modId){this.$ctx=$ctx;this.modId=modId;this.connectors=[];this.dependencyCounter={beforeBinding:0,onBinding:1,afterBinding:0};this.sandbox=sandbox;},start:function(){var that=this;if(this.dependencies){this.dependencyCounter.beforeBinding++;this.dependencies();this.dependencyCounter.beforeBinding--;}
this.checkDependencies('beforeBinding',function(){that.initBeforeBinding();});},stop:function(){$('*',this.$ctx).unbind().removeData();this.$ctx.unbind().removeData();},initBeforeBinding:function(){var that=this;if(this.beforeBinding){this.beforeBinding(function(){that.beforeBindingCallback();});}
else{this.beforeBindingCallback();}},beforeBindingCallback:function(){var that=this;that.dependencyCounter.onBinding--;var callback=function(){that.initOnBinding();};that.checkDependencies('onBinding',callback);},initOnBinding:function(){var that=this;if(this.onBinding){this.onBinding();}
this.checkDependencies('afterBinding',function(){that.sandbox.readyForAfterBinding(function(){that.initAfterBinding();});});},initAfterBinding:function(){if(this.afterBinding){this.afterBinding();}},checkDependencies:function(phase,callback){if(this.dependencyCounter[phase]===0){callback();}},require:function(dependency,type,phase,executeCallback){var that=this;phase=phase||'onBinding';type=type||'plugin';executeCallback=executeCallback===false?false:true;this.dependencyCounter[phase]++;var callback=$.proxy(function(){if(executeCallback){var that=this;this.dependencyCounter[phase]--;this.checkDependencies(phase,function(){that['init'+Nx.Utils.String.capitalize(phase)]();});}},this.sandbox.getModuleById(this.modId));this.sandbox.loadDependency(dependency,type,callback,phase);},fire:function(state,data,defaultAction){var that=this;var connectors=this.connectors;data=data||{};state=Nx.Utils.String.capitalize(state);$.each(connectors,function(){var connector=this;var callback=function(){if(typeof defaultAction=='function'){defaultAction();}
connector.notify(that,'after'+state,data);};if(connector.notify(that,'on'+state,data,callback)){callback();}});if(connectors.length<1){if(typeof defaultAction=='function'){defaultAction();}}},attachConnector:function(connector){this.connectors.push(connector);},getDecoratedModule:function(module,skin){if(Nx.Module[module][skin]){var decorator=Nx.Module[module][skin];decorator.prototype=this;decorator.prototype.constructor=Nx.Module[module][skin];return new decorator(this);}
else{$.log.info('the skin '+skin+' does not exists for this module');return null;}}});})(Nx.$);
(function($){Nx.Connector=Class.extend({init:function(connectorId){this.connectorId=connectorId;this.components=[];},registerComponent:function(component,role){role=role||'standard';this.components.push({'component':component,'role':role});},unregisterComponent:function(component){var index;var components=this.components;for(var id in components){if(components[id].component===component){delete components[id];}}},notify:function(component,state,data,callback){var proceed=true;var components=this.components;for(var id in components){if(components[id].component!==component&&components[id].component[state]){if(components[id].component[state](data,callback)===false){proceed=false;}}}
return proceed;}});})(Nx.$);
(function($){Nx.Connector.MasterSlave=Nx.Connector.extend({init:function(connectorId){this._super(connectorId);},notify:function(component,state,data,callback){var proceed=true,id;for(id in this.components){if(this.components[id].component.modId===component.modId&&this.components[id].role==='Master'){for(id in this.components){if(this.components[id].component.modId!==component.modId&&this.components[id].component[state]){if(this.components[id].component[state](data,callback)===false){proceed=false;}}}}}
return proceed;}});})(Nx.$);
(function($){Nx.Sandbox=Class.extend({init:function(application,config){this.application=application;this.config=config;this.dependencies=[];this.afterBindingCallbacks=[];},addModules:function($ctx){var modules=[];if($ctx){$('.mod[data-lazyinit=true]',$ctx).removeAttr('data-lazyinit');modules=this.application.registerModules($ctx);this.application.start(modules);}
return modules;},removeModules:function(modules){if(modules){this.application.stop(modules);this.application.unregisterModules(modules);}},loadDependency:function(dependency,type,callback,phase){var that=this;phase=phase||'none';type=type||'plugin';if(that.dependencies[dependency]&&that.dependencies[dependency].state==='requested'){$.log.info('dependency '+dependency+' already requested');that.dependencies[dependency].callbacks.push(function(){callback(phase);});}
else if(that.dependencies[dependency]&&that.dependencies[dependency].state==='loaded'){$.log.info('dependency '+dependency+' already loaded');callback(phase);}
else{$.log.time('load dependency '+dependency);that.dependencies[dependency]={state:'requested',callbacks:[]};var path;switch(type){case'library':case'plugin':case'util':path=this.config.dependencyPath[type];break;case'url':path='';break;case'default':$.log.error('the type '+type+' is not known');break;}
$.ajax({url:''+path+dependency,dataType:'script',cache:true,success:function(){$.log.time('load dependency '+dependency);that.dependencies[dependency].state='loaded';callback(phase);var callbacks=that.dependencies[dependency].callbacks;for(var i=0;i<callbacks.length;i++){callbacks[i]();}},error:function(){$.log.error('an error occured during loading the dependency '+path+dependency);}});}},readyForAfterBinding:function(callback){this.afterBindingCallbacks.push(callback);if(this.application.modules.length==this.afterBindingCallbacks.length){for(var i=0;i<this.afterBindingCallbacks.length;i++){this.afterBindingCallbacks[i]();}}},getConfig:function(){return this.config;},getConfigParam:function(name){if(this.config.name!==undefined){return this.config.name;}
else{throw new Error('the config param '+name+' does not exist');}},getModuleById:function(id){if(this.application.modules[id]!==undefined){return this.application.modules[id];}
else{throw new Error('the module with the id '+id+' does not exist');}}});})(Nx.$);
Nx.Utils={};
(function($){Nx.Utils.String={capitalize:function(str){return str.substr(0,1).toUpperCase().concat(str.substr(1));}};})(Nx.$);;(function($){var tmp,loading,overlay,wrap,outer,content,close,title,nav_left,nav_right,selectedIndex=0,selectedOpts={},selectedArray=[],currentIndex=0,currentOpts={},currentArray=[],ajaxLoader=null,imgPreloader=new Image(),imgRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,swfRegExp=/[^\.]\.(swf)\s*$/i,loadingTimer,loadingFrame=1,titleHeight=0,titleStr='',start_pos,final_pos,busy=false,fx=$.extend($('<div/>')[0],{prop:0}),isIE6=$.browser.msie&&$.browser.version<7&&!window.XMLHttpRequest,_abort=function(){loading.hide();imgPreloader.onerror=imgPreloader.onload=null;if(ajaxLoader){ajaxLoader.abort()}tmp.empty()},_error=function(){if(false===selectedOpts.onError(selectedArray,selectedIndex,selectedOpts)){loading.hide();busy=false;return}selectedOpts.titleShow=false;selectedOpts.width='auto';selectedOpts.height='auto';tmp.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');_process_inline()},_start=function(){var obj=selectedArray[selectedIndex],href,type,title,str,emb,ret;_abort();selectedOpts=$.extend({},$.fn.fancybox.defaults,(typeof $(obj).data('fancybox')=='undefined'?selectedOpts:$(obj).data('fancybox')));ret=selectedOpts.onStart(selectedArray,selectedIndex,selectedOpts);if(ret===false){busy=false;return}else if(typeof ret=='object'){selectedOpts=$.extend(selectedOpts,ret)}title=selectedOpts.title||(obj.nodeName?$(obj).attr('title'):obj.title)||'';if(obj.nodeName&&!selectedOpts.orig){selectedOpts.orig=$(obj).children("img:first").length?$(obj).children("img:first"):$(obj)}if(title===''&&selectedOpts.orig&&selectedOpts.titleFromAlt){title=selectedOpts.orig.attr('alt')}href=selectedOpts.href||(obj.nodeName?$(obj).attr('href'):obj.href)||null;if((/^(?:javascript)/i).test(href)||href=='#'){href=null}if(selectedOpts.type){type=selectedOpts.type;if(!href){href=selectedOpts.content}}else if(selectedOpts.content){type='html'}else if(href){if(href.match(imgRegExp)){type='image'}else if(href.match(swfRegExp)){type='swf'}else if($(obj).hasClass("iframe")){type='iframe'}else if(href.indexOf("#")===0){type='inline'}else{type='ajax'}}if(!type){_error();return}if(type=='inline'){obj=href.substr(href.indexOf("#"));type=$(obj).length>0?'inline':'ajax'}selectedOpts.type=type;selectedOpts.href=href;selectedOpts.title=title;if(selectedOpts.autoDimensions){if(selectedOpts.type=='html'||selectedOpts.type=='inline'||selectedOpts.type=='ajax'){selectedOpts.width='auto';selectedOpts.height='auto'}else{selectedOpts.autoDimensions=false}}if(selectedOpts.modal){selectedOpts.overlayShow=true;selectedOpts.hideOnOverlayClick=false;selectedOpts.hideOnContentClick=false;selectedOpts.enableEscapeButton=false;selectedOpts.showCloseButton=false}selectedOpts.padding=parseInt(selectedOpts.padding,10);selectedOpts.margin=parseInt(selectedOpts.margin,10);tmp.css('padding',(selectedOpts.padding+selectedOpts.margin));$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change',function(){$(this).replaceWith(content.children())});switch(type){case'html':tmp.html(selectedOpts.content);_process_inline();break;case'inline':if($(obj).parent().is('#fancybox-content')===true){busy=false;return}$('<div class="fancybox-inline-tmp" />').hide().insertBefore($(obj)).bind('fancybox-cleanup',function(){$(this).replaceWith(content.children())}).bind('fancybox-cancel',function(){$(this).replaceWith(tmp.children())});$(obj).appendTo(tmp);_process_inline();break;case'image':busy=false;$.fancybox.showActivity();imgPreloader=new Image();imgPreloader.onerror=function(){_error()};imgPreloader.onload=function(){busy=true;imgPreloader.onerror=imgPreloader.onload=null;_process_image()};imgPreloader.src=href;break;case'swf':selectedOpts.scrolling='no';str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"><param name="movie" value="'+href+'"></param>';emb='';$.each(selectedOpts.swf,function(name,val){str+='<param name="'+name+'" value="'+val+'"></param>';emb+=' '+name+'="'+val+'"'});str+='<embed src="'+href+'" type="application/x-shockwave-flash" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"'+emb+'></embed></object>';tmp.html(str);_process_inline();break;case'ajax':busy=false;$.fancybox.showActivity();selectedOpts.ajax.win=selectedOpts.ajax.success;ajaxLoader=$.ajax($.extend({},selectedOpts.ajax,{url:href,data:selectedOpts.ajax.data||{},error:function(XMLHttpRequest,textStatus,errorThrown){if(XMLHttpRequest.status>0){_error()}},success:function(data,textStatus,XMLHttpRequest){var o=typeof XMLHttpRequest=='object'?XMLHttpRequest:ajaxLoader;if(o.status==200){if(typeof selectedOpts.ajax.win=='function'){ret=selectedOpts.ajax.win(href,data,textStatus,XMLHttpRequest);if(ret===false){loading.hide();return}else if(typeof ret=='string'||typeof ret=='object'){data=ret}}tmp.html(data);_process_inline()}}}));break;case'iframe':_show();break}},_process_inline=function(){var w=selectedOpts.width,h=selectedOpts.height;if(w.toString().indexOf('%')>-1){w=parseInt(($(window).width()-(selectedOpts.margin*2))*parseFloat(w)/100,10)+'px'}else{w=w=='auto'?'auto':w+'px'}if(h.toString().indexOf('%')>-1){h=parseInt(($(window).height()-(selectedOpts.margin*2))*parseFloat(h)/100,10)+'px'}else{h=h=='auto'?'auto':h+'px'}tmp.wrapInner('<div style="width:'+w+';height:'+h+';overflow: '+(selectedOpts.scrolling=='auto'?'auto':(selectedOpts.scrolling=='yes'?'scroll':'hidden'))+';position:relative;"></div>');selectedOpts.width=tmp.width();selectedOpts.height=tmp.height();_show()},_process_image=function(){selectedOpts.width=imgPreloader.width;selectedOpts.height=imgPreloader.height;if(selectedOpts.contentWrapper&&selectedOpts.contentWrapper.length>0){$('<div />').attr({'class':selectedOpts.contentWrapper}).appendTo(tmp);if(tmp.width()>imgPreloader.width){selectedOpts.width=tmp.width()}if(tmp.height()>imgPreloader.height){selectedOpts.height=tmp.height()}$("<img />").attr({'id':'fancybox-img','src':imgPreloader.src,'alt':selectedOpts.title}).appendTo(tmp.children(':first'))}else{$("<img />").attr({'id':'fancybox-img','src':imgPreloader.src,'alt':selectedOpts.title}).appendTo(tmp)}_show()},_show=function(){var pos,equal;loading.hide();if(wrap.is(":visible")&&false===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){$.event.trigger('fancybox-cancel');busy=false;return}busy=true;$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');if(wrap.is(":visible")&&currentOpts.titlePosition!=='outside'){wrap.css('height',wrap.height())}currentArray=selectedArray;currentIndex=selectedIndex;currentOpts=selectedOpts;if(currentOpts.overlayShow){overlay.css({'background-color':currentOpts.overlayColor,'opacity':currentOpts.overlayOpacity,'cursor':currentOpts.hideOnOverlayClick?'pointer':'auto','height':$(document).height()});if(!overlay.is(':visible')){if(isIE6){$('select:not(#fancybox-tmp select)').filter(function(){return this.style.visibility!=='hidden'}).css({'visibility':'hidden'}).one('fancybox-cleanup',function(){this.style.visibility='inherit'})}overlay.show()}}else{overlay.hide()}final_pos=_get_zoom_to();_process_title();if(wrap.is(":visible")){$(close.add(nav_left).add(nav_right)).hide();pos=wrap.position(),start_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};equal=(start_pos.width==final_pos.width&&start_pos.height==final_pos.height);content.fadeTo(currentOpts.changeFade,0.3,function(){var finish_resizing=function(){content.html(tmp.contents()).fadeTo(currentOpts.changeFade,1,_finish)};$.event.trigger('fancybox-change');content.empty().removeAttr('filter').css({'border-width':currentOpts.padding,'width':final_pos.width-currentOpts.padding*2,'height':selectedOpts.autoDimensions?'auto':final_pos.height-titleHeight-currentOpts.padding*2});if(equal){finish_resizing()}else{fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.changeSpeed,easing:currentOpts.easingChange,step:_draw,complete:finish_resizing})}});return}wrap.removeAttr("style");content.css('border-width',currentOpts.padding);if(currentOpts.transitionIn=='elastic'){start_pos=_get_zoom_from();content.html(tmp.contents());wrap.show();if(currentOpts.opacity){final_pos.opacity=0}fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.speedIn,easing:currentOpts.easingIn,step:_draw,complete:_finish});return}if(currentOpts.titlePosition=='inside'&&titleHeight>0){title.show()}content.css({'width':final_pos.width-currentOpts.padding*2,'height':selectedOpts.autoDimensions?'auto':final_pos.height-titleHeight-currentOpts.padding*2}).html(tmp.contents());wrap.css(final_pos).fadeIn(currentOpts.transitionIn=='none'?0:currentOpts.speedIn,_finish)},_format_title=function(title){if(title&&title.length){if(currentOpts.titlePosition=='float'){return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+title+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+currentOpts.titlePosition+'">'+title+'</div>'}return false},_process_title=function(){titleStr=currentOpts.title||'';titleHeight=0;title.empty().removeAttr('style').removeClass();if(currentOpts.titleShow===false){title.hide();return}titleStr=$.isFunction(currentOpts.titleFormat)?currentOpts.titleFormat(titleStr,currentArray,currentIndex,currentOpts):_format_title(titleStr);if(!titleStr||titleStr===''){title.hide();return}title.addClass('fancybox-title-'+currentOpts.titlePosition).html(titleStr).appendTo('body').show();switch(currentOpts.titlePosition){case'inside':title.css({'width':final_pos.width-(currentOpts.padding*2),'marginLeft':currentOpts.padding,'marginRight':currentOpts.padding});titleHeight=title.outerHeight(true);title.appendTo(outer);final_pos.height+=titleHeight;break;case'over':title.css({'marginLeft':currentOpts.padding,'width':final_pos.width-(currentOpts.padding*2),'bottom':currentOpts.padding}).appendTo(outer);break;case'float':title.css('left',parseInt((title.width()-final_pos.width-40)/2,10)*-1).appendTo(wrap);break;default:title.css({'width':final_pos.width-(currentOpts.padding*2),'paddingLeft':currentOpts.padding,'paddingRight':currentOpts.padding}).appendTo(wrap);break}title.hide()},_set_navigation=function(){if(currentOpts.enableEscapeButton||currentOpts.enableKeyboardNav){$(document).bind('keydown.fb',function(e){if(e.keyCode==27&&currentOpts.enableEscapeButton){e.preventDefault();$.fancybox.close()}else if((e.keyCode==37||e.keyCode==39)&&currentOpts.enableKeyboardNav&&e.target.tagName!=='INPUT'&&e.target.tagName!=='TEXTAREA'&&e.target.tagName!=='SELECT'){e.preventDefault();$.fancybox[e.keyCode==37?'prev':'next']()}})}if(!currentOpts.showNavArrows){nav_left.hide();nav_right.hide();return}if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!==0){nav_left.show()}if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!=(currentArray.length-1)){nav_right.show()}},_finish=function(){if(!$.support.opacity){content.get(0).style.removeAttribute('filter');wrap.get(0).style.removeAttribute('filter')}if(selectedOpts.autoDimensions){content.css('height','auto')}wrap.css('height','auto');if(titleStr&&titleStr.length){title.show()}if(currentOpts.showCloseButton){close.show()}_set_navigation();if(currentOpts.hideOnContentClick){content.bind('click',$.fancybox.close)}if(currentOpts.hideOnOverlayClick){overlay.bind('click',$.fancybox.close)}$(window).bind("resize.fb",$.fancybox.resize);if(currentOpts.centerOnScroll){$(window).bind("scroll.fb",$.fancybox.center)}if(currentOpts.type=='iframe'){$('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" '+($.browser.msie?'allowtransparency="true""':'')+' scrolling="'+selectedOpts.scrolling+'" src="'+currentOpts.href+'"></iframe>').appendTo(content)}wrap.show();busy=false;$.fancybox.center();currentOpts.onComplete(currentArray,currentIndex,currentOpts);_preload_images()},_preload_images=function(){var href,objNext;if((currentArray.length-1)>currentIndex){href=currentArray[currentIndex+1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href}}if(currentIndex>0){href=currentArray[currentIndex-1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href}}},_draw=function(pos){var dim={width:parseInt(start_pos.width+(final_pos.width-start_pos.width)*pos,10),height:parseInt(start_pos.height+(final_pos.height-start_pos.height)*pos,10),top:parseInt(start_pos.top+(final_pos.top-start_pos.top)*pos,10),left:parseInt(start_pos.left+(final_pos.left-start_pos.left)*pos,10)};if(typeof final_pos.opacity!=='undefined'){dim.opacity=pos<0.5?0.5:pos}wrap.css(dim);content.css({'width':dim.width-currentOpts.padding*2,'height':dim.height-(titleHeight*pos)-currentOpts.padding*2})},_get_viewport=function(){return[$(window).width()-(currentOpts.margin*2),$(window).height()-(currentOpts.margin*2),$(document).scrollLeft()+currentOpts.margin,$(document).scrollTop()+currentOpts.margin]},_get_zoom_to=function(){var view=_get_viewport(),to={},resize=currentOpts.autoScale,double_padding=currentOpts.padding*2,ratio;if(currentOpts.width.toString().indexOf('%')>-1){to.width=parseInt((view[0]*parseFloat(currentOpts.width))/100,10)}else{to.width=currentOpts.width+double_padding}if(currentOpts.height.toString().indexOf('%')>-1){to.height=parseInt((view[1]*parseFloat(currentOpts.height))/100,10)}else{to.height=currentOpts.height+double_padding}if(resize&&(to.width>view[0]||to.height>view[1])){if(selectedOpts.type=='image'||selectedOpts.type=='swf'){ratio=(currentOpts.width)/(currentOpts.height);if((to.width)>view[0]){to.width=view[0];to.height=parseInt(((to.width-double_padding)/ratio)+double_padding,10)}if((to.height)>view[1]){to.height=view[1];to.width=parseInt(((to.height-double_padding)*ratio)+double_padding,10)}}else{to.width=Math.min(to.width,view[0]);to.height=Math.min(to.height,view[1])}}to.top=parseInt(Math.max(view[3]-20,view[3]+((view[1]-to.height-40)*0.5)),10);to.left=parseInt(Math.max(view[2]-20,view[2]+((view[0]-to.width-40)*0.5)),10);return to},_get_obj_pos=function(obj){var pos=obj.offset();pos.top+=parseInt(obj.css('paddingTop'),10)||0;pos.left+=parseInt(obj.css('paddingLeft'),10)||0;pos.top+=parseInt(obj.css('border-top-width'),10)||0;pos.left+=parseInt(obj.css('border-left-width'),10)||0;pos.width=obj.width();pos.height=obj.height();return pos},_get_zoom_from=function(){var orig=selectedOpts.orig?$(selectedOpts.orig):false,from={},pos,view;if(orig&&orig.length){pos=_get_obj_pos(orig);from={width:pos.width+(currentOpts.padding*2),height:pos.height+(currentOpts.padding*2),top:pos.top-currentOpts.padding-20,left:pos.left-currentOpts.padding-20}}else{view=_get_viewport();from={width:currentOpts.padding*2,height:currentOpts.padding*2,top:parseInt(view[3]+view[1]*0.5,10),left:parseInt(view[2]+view[0]*0.5,10)}}return from},_animate_loading=function(){if(!loading.is(':visible')){clearInterval(loadingTimer);return}$('div',loading).css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12};$.fn.fancybox=function(options){if(!$(this).length){return this}$(this).data('fancybox',$.extend({},options,($.metadata?$(this).metadata():{}))).unbind('click.fb').bind('click.fb',function(e){e.preventDefault();$.fancybox.init();if(busy){return}busy=true;$(this).blur();selectedArray=[];selectedIndex=0;var rel=$(this).attr('rel')||'';if(!rel||rel==''||rel==='nofollow'){selectedArray.push(this)}else{selectedArray=$("a[rel="+rel+"], area[rel="+rel+"]");selectedIndex=selectedArray.index(this)}_start();return});return this};$.fancybox=function(obj){$.fancybox.init();var opts;if(busy){return}busy=true;opts=typeof arguments[1]!=='undefined'?arguments[1]:{};selectedArray=[];selectedIndex=parseInt(opts.index,10)||0;if($.isArray(obj)){for(var i=0,j=obj.length;i<j;i++){if(typeof obj[i]=='object'){$(obj[i]).data('fancybox',$.extend({},opts,obj[i]))}else{obj[i]=$({}).data('fancybox',$.extend({content:obj[i]},opts))}}selectedArray=jQuery.merge(selectedArray,obj)}else{if(typeof obj=='object'){$(obj).data('fancybox',$.extend({},opts,obj))}else{obj=$({}).data('fancybox',$.extend({content:obj},opts))}selectedArray.push(obj)}if(selectedIndex>selectedArray.length||selectedIndex<0){selectedIndex=0}_start()};$.fancybox.showActivity=function(){$.fancybox.init();clearInterval(loadingTimer);loading.show();loadingTimer=setInterval(_animate_loading,66)};$.fancybox.hideActivity=function(){$.fancybox.init();loading.hide()};$.fancybox.next=function(){$.fancybox.init();return $.fancybox.pos(currentIndex+1)};$.fancybox.prev=function(){$.fancybox.init();return $.fancybox.pos(currentIndex-1)};$.fancybox.pos=function(pos){$.fancybox.init();if(busy){return}pos=parseInt(pos);selectedArray=currentArray;if(pos>-1&&pos<currentArray.length){selectedIndex=pos;_start()}else if(currentOpts.cyclic&&currentArray.length>1){selectedIndex=pos>=currentArray.length?0:currentArray.length-1;_start()}return};$.fancybox.cancel=function(){$.fancybox.init();if(busy){return}busy=true;$.event.trigger('fancybox-cancel');_abort();selectedOpts.onCancel(selectedArray,selectedIndex,selectedOpts);busy=false};$.fancybox.close=function(){$.fancybox.init();if(busy||wrap.is(':hidden')){return}busy=true;if(currentOpts&&false===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){busy=false;return}_abort();$(close.add(nav_left).add(nav_right)).hide();$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');content.find('iframe').attr('src',isIE6&&/^https/i.test(window.location.href||'')?'javascript:void(false)':'about:blank');if(currentOpts.titlePosition!=='inside'){title.empty()}wrap.stop();function _cleanup(){overlay.fadeOut('fast');title.empty().hide();wrap.hide();$.event.trigger('fancybox-cleanup');content.empty();currentOpts.onClosed(currentArray,currentIndex,currentOpts);currentArray=selectedOpts=[];currentIndex=selectedIndex=0;currentOpts=selectedOpts={};busy=false}if(currentOpts.transitionOut=='elastic'){start_pos=_get_zoom_from();var pos=wrap.position();final_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};if(currentOpts.opacity){final_pos.opacity=1}title.empty().hide();fx.prop=1;$(fx).animate({prop:0},{duration:currentOpts.speedOut,easing:currentOpts.easingOut,step:_draw,complete:_cleanup})}else{wrap.fadeOut(currentOpts.transitionOut=='none'?0:currentOpts.speedOut,_cleanup)}};$.fancybox.resize=function(){$.fancybox.init();if(overlay.is(':visible')){overlay.css('height',$(document).height())}$.fancybox.center(true)};$.fancybox.center=function(){$.fancybox.init();var view,align;if(busy){return}align=arguments[0]===true?1:0;view=_get_viewport();if(!align&&(wrap.width()>view[0]||wrap.height()>view[1])){return}wrap.stop().animate({'top':parseInt(Math.max(view[3]-20,view[3]+((view[1]-content.height()-40)*0.5)-currentOpts.padding)),'left':parseInt(Math.max(view[2]-20,view[2]+((view[0]-content.width()-40)*0.5)-currentOpts.padding))},typeof arguments[0]=='number'?arguments[0]:200)};$.fancybox.init=function(){if(wrap){return}$('body').append(tmp=$('<div id="fancybox-tmp"></div>'),loading=$('<div id="fancybox-loading"><div></div></div>'),overlay=$('<div id="fancybox-overlay"></div>'),wrap=$('<div id="fancybox-wrap"></div>'));outer=$('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(wrap);outer.append(content=$('<div id="fancybox-content"></div>'),close=$('<a id="fancybox-close"></a>'),title=$('<div id="fancybox-title"></div>'),nav_left=$('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),nav_right=$('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));close.click($.fancybox.close);loading.click($.fancybox.cancel);nav_left.click(function(e){e.preventDefault();$.fancybox.prev()});nav_right.click(function(e){e.preventDefault();$.fancybox.next()});if($.fn.mousewheel){wrap.bind('mousewheel.fb',function(e,delta){if(busy){e.preventDefault()}else if($(e.target).get(0).clientHeight==0||$(e.target).get(0).scrollHeight===$(e.target).get(0).clientHeight){e.preventDefault();$.fancybox[delta>0?'prev':'next']()}})}if(!$.support.opacity){wrap.addClass('fancybox-ie')}if(isIE6){loading.addClass('fancybox-ie6');wrap.addClass('fancybox-ie6');$('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||'')?'javascript:void(false)':'about:blank')+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer)}};$.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:'auto',width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:'transparent'},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:'#777',titleShow:true,titlePosition:'float',titleFormat:null,titleFromAlt:false,transitionIn:'fade',transitionOut:'fade',speedIn:300,speedOut:300,changeSpeed:300,changeFade:'fast',easingIn:'swing',easingOut:'swing',showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){},contentWrapper:''}})(jQuery);
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(Nx.$);
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
if(window.jQuery&&!window.jQuery.createTemplate){(function(jQuery){var Template=function(s,includes,settings){this._tree=[];this._param={};this._includes=null;this._templates={};this._templates_code={};this.settings=jQuery.extend({disallow_functions:false,filter_data:true,filter_params:false,runnable_functions:false,clone_data:true,clone_params:true},settings);this.f_cloneData=(this.settings.f_cloneData!==undefined)?(this.settings.f_cloneData):(TemplateUtils.cloneData);this.f_escapeString=(this.settings.f_escapeString!==undefined)?(this.settings.f_escapeString):(TemplateUtils.escapeHTML);this.splitTemplates(s,includes);if(s){this.setTemplate(this._templates_code.MAIN,includes,this.settings)}this._templates_code=null};Template.prototype.version="0.7.8";Template.DEBUG_MODE=true;Template.prototype.splitTemplates=function(s,includes){var reg=/\{#template *(\w*?)( .*)*\}/g;var iter,tname,se;var lastIndex=null;var _template_settings=[];while((iter=reg.exec(s))!=null){lastIndex=reg.lastIndex;tname=iter[1];se=s.indexOf("{#/template "+tname+"}",lastIndex);if(se==-1){throw new Error('jTemplates: Template "'+tname+'" is not closed.')}this._templates_code[tname]=s.substring(lastIndex,se);_template_settings[tname]=TemplateUtils.optionToObject(iter[2])}if(lastIndex===null){this._templates_code.MAIN=s;return}for(var i in this._templates_code){if(i!="MAIN"){this._templates[i]=new Template()}}for(var i in this._templates_code){if(i!="MAIN"){this._templates[i].setTemplate(this._templates_code[i],jQuery.extend({},includes||{},this._templates||{}),jQuery.extend({},this.settings,_template_settings[i]));this._templates_code[i]=null}}};Template.prototype.setTemplate=function(s,includes,settings){if(s==undefined){this._tree.push(new TextNode("",1,this));return}s=s.replace(/[\n\r]/g,"");s=s.replace(/\{\*.*?\*\}/g,"");this._includes=jQuery.extend({},this._templates||{},includes||{});this.settings=new Object(settings);var node=this._tree;var op=s.match(/\{#.*?\}/g);var ss=0,se=0;var e;var literalMode=0;var elseif_level=0;for(var i=0,l=(op)?(op.length):(0);i<l;++i){var this_op=op[i];if(literalMode){se=s.indexOf("{#/literal}");if(se==-1){throw new Error("jTemplates: No end of literal.")}if(se>ss){node.push(new TextNode(s.substring(ss,se),1,this))}ss=se+11;literalMode=0;i=jQuery.inArray("{#/literal}",op);continue}se=s.indexOf(this_op,ss);if(se>ss){node.push(new TextNode(s.substring(ss,se),literalMode,this))}var ppp=this_op.match(/\{#([\w\/]+).*?\}/);var op_=RegExp.$1;switch(op_){case"elseif":++elseif_level;node.switchToElse();case"if":e=new opIF(this_op,node);node.push(e);node=e;break;case"else":node.switchToElse();break;case"/if":while(elseif_level){node=node.getParent();--elseif_level}case"/for":case"/foreach":node=node.getParent();break;case"foreach":e=new opFOREACH(this_op,node,this);node.push(e);node=e;break;case"for":e=opFORFactory(this_op,node,this);node.push(e);node=e;break;case"continue":case"break":node.push(new JTException(op_));break;case"include":node.push(new Include(this_op,this._includes));break;case"param":node.push(new UserParam(this_op));break;case"cycle":node.push(new Cycle(this_op));break;case"ldelim":node.push(new TextNode("{",1,this));break;case"rdelim":node.push(new TextNode("}",1,this));break;case"literal":literalMode=1;break;case"/literal":if(Template.DEBUG_MODE){throw new Error("jTemplates: Missing begin of literal.")}break;default:if(Template.DEBUG_MODE){throw new Error("jTemplates: unknown tag: "+op_+".")}}ss=se+this_op.length}if(s.length>ss){node.push(new TextNode(s.substr(ss),literalMode,this))}};Template.prototype.get=function(d,param,element,deep){++deep;var $T=d,_param1,_param2;if(this.settings.clone_data){$T=this.f_cloneData(d,{escapeData:(this.settings.filter_data&&deep==1),noFunc:this.settings.disallow_functions},this.f_escapeString)}if(!this.settings.clone_params){_param1=this._param;_param2=param}else{_param1=this.f_cloneData(this._param,{escapeData:(this.settings.filter_params),noFunc:false},this.f_escapeString);_param2=this.f_cloneData(param,{escapeData:(this.settings.filter_params&&deep==1),noFunc:false},this.f_escapeString)}var $P=jQuery.extend({},_param1,_param2);var $Q=(element!=undefined)?(element):({});$Q.version=this.version;var ret="";for(var i=0,l=this._tree.length;i<l;++i){ret+=this._tree[i].get($T,$P,$Q,deep)}--deep;return ret};Template.prototype.setParam=function(name,value){this._param[name]=value};TemplateUtils=function(){};TemplateUtils.escapeHTML=function(txt){return txt.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};TemplateUtils.cloneData=function(d,filter,f_escapeString){if(d==null){return d}switch(d.constructor){case Object:var o={};for(var i in d){o[i]=TemplateUtils.cloneData(d[i],filter,f_escapeString)}if(!filter.noFunc){if(d.hasOwnProperty("toString")){o.toString=d.toString}}return o;case Array:var o=[];for(var i=0,l=d.length;i<l;++i){o[i]=TemplateUtils.cloneData(d[i],filter,f_escapeString)}return o;case String:return(filter.escapeData)?(f_escapeString(d)):(d);case Function:if(filter.noFunc){if(Template.DEBUG_MODE){throw new Error("jTemplates: Functions are not allowed.")}else{return undefined}}default:return d}};TemplateUtils.optionToObject=function(optionText){if(optionText===null||optionText===undefined){return{}}var o=optionText.split(/[= ]/);if(o[0]===""){o.shift()}var obj={};for(var i=0,l=o.length;i<l;i+=2){obj[o[i]]=o[i+1]}return obj};var TextNode=function(val,literalMode,template){this._value=val;this._literalMode=literalMode;this._template=template};TextNode.prototype.get=function(d,param,element,deep){var __t=this._value;if(!this._literalMode){var __template=this._template;var $T=d;var $P=param;var $Q=element;__t=__t.replace(/\{(.*?)\}/g,function(__0,__1){try{var __tmp=eval(__1);if(typeof __tmp=="function"){if(__template.settings.disallow_functions||!__template.settings.runnable_functions){return""}else{__tmp=__tmp($T,$P,$Q)}}return(__tmp===undefined)?(""):(String(__tmp))}catch(e){if(Template.DEBUG_MODE){if(e instanceof JTException){e.type="subtemplate"}throw e}return""}})}return __t};var opIF=function(oper,par){this._parent=par;oper.match(/\{#(?:else)*if (.*?)\}/);this._cond=RegExp.$1;this._onTrue=[];this._onFalse=[];this._currentState=this._onTrue};opIF.prototype.push=function(e){this._currentState.push(e)};opIF.prototype.getParent=function(){return this._parent};opIF.prototype.switchToElse=function(){this._currentState=this._onFalse};opIF.prototype.get=function(d,param,element,deep){var $T=d;var $P=param;var $Q=element;var ret="";try{var tab=(eval(this._cond))?(this._onTrue):(this._onFalse);for(var i=0,l=tab.length;i<l;++i){ret+=tab[i].get(d,param,element,deep)}}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e}}return ret};opFORFactory=function(oper,par,template){if(oper.match(/\{#for (\w+?) *= *(\S+?) +to +(\S+?) *(?:step=(\S+?))*\}/)){oper="{#foreach opFORFactory.funcIterator as "+RegExp.$1+" begin="+(RegExp.$2||0)+" end="+(RegExp.$3||-1)+" step="+(RegExp.$4||1)+" extData=$T}";return new opFOREACH(oper,par,template)}else{throw new Error('jTemplates: Operator failed "find": '+oper)}};opFORFactory.funcIterator=function(i){return i};var opFOREACH=function(oper,par,template){this._parent=par;this._template=template;oper.match(/\{#foreach (.+?) as (\w+?)( .+)*\}/);this._arg=RegExp.$1;this._name=RegExp.$2;this._option=RegExp.$3||null;this._option=TemplateUtils.optionToObject(this._option);this._onTrue=[];this._onFalse=[];this._currentState=this._onTrue};opFOREACH.prototype.push=function(e){this._currentState.push(e)};opFOREACH.prototype.getParent=function(){return this._parent};opFOREACH.prototype.switchToElse=function(){this._currentState=this._onFalse};opFOREACH.prototype.get=function(d,param,element,deep){try{var $T=d;var $P=param;var $Q=element;var fcount=eval(this._arg);var key=[];var mode=typeof fcount;if(mode=="object"){var arr=[];jQuery.each(fcount,function(k,v){key.push(k);arr.push(v)});fcount=arr}var extData=(this._option.extData!==undefined)?(eval(this._option.extData)):(($T!=null)?($T):({}));var s=Number(eval(this._option.begin)||0),e;var step=Number(eval(this._option.step)||1);if(mode!="function"){e=fcount.length}else{if(this._option.end===undefined||this._option.end===null){e=Number.MAX_VALUE}else{e=Number(eval(this._option.end))+((step>0)?(1):(-1))}}var ret="";var i,l;if(this._option.count){var tmp=s+Number(eval(this._option.count));e=(tmp>e)?(e):(tmp)}if((e>s&&step>0)||(e<s&&step<0)){var iteration=0;var _total=(mode!="function")?(Math.ceil((e-s)/step)):undefined;var ckey,cval;for(;((step>0)?(s<e):(s>e));s+=step,++iteration){ckey=key[s];if(mode!="function"){cval=fcount[s]}else{cval=fcount(s);if(cval===undefined||cval===null){break}}if((typeof cval=="function")&&(this._template.settings.disallow_functions||!this._template.settings.runnable_functions)){continue}if((mode=="object")&&(ckey in Object)){continue}var prevValue=extData[this._name];extData[this._name]=cval;extData[this._name+"$index"]=s;extData[this._name+"$iteration"]=iteration;extData[this._name+"$first"]=(iteration==0);extData[this._name+"$last"]=(s+step>=e);extData[this._name+"$total"]=_total;extData[this._name+"$key"]=(ckey!==undefined&&ckey.constructor==String)?(this._template.f_escapeString(ckey)):(ckey);extData[this._name+"$typeof"]=typeof cval;for(i=0,l=this._onTrue.length;i<l;++i){try{ret+=this._onTrue[i].get(extData,param,element,deep)}catch(ex){if(ex instanceof JTException){switch(ex.type){case"continue":i=l;break;case"break":i=l;s=e;break;default:throw e}}else{throw e}}}delete extData[this._name+"$index"];delete extData[this._name+"$iteration"];delete extData[this._name+"$first"];delete extData[this._name+"$last"];delete extData[this._name+"$total"];delete extData[this._name+"$key"];delete extData[this._name+"$typeof"];delete extData[this._name];extData[this._name]=prevValue}}else{for(i=0,l=this._onFalse.length;i<l;++i){ret+=this._onFalse[i].get($T,param,element,deep)}}return ret}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e}return""}};var JTException=function(type){this.type=type};JTException.prototype=Error;JTException.prototype.get=function(d){throw this};var Include=function(oper,includes){oper.match(/\{#include (.*?)(?: root=(.*?))?\}/);this._template=includes[RegExp.$1];if(this._template==undefined){if(Template.DEBUG_MODE){throw new Error("jTemplates: Cannot find include: "+RegExp.$1)}}this._root=RegExp.$2};Include.prototype.get=function(d,param,element,deep){var $T=d;var $P=param;try{return this._template.get(eval(this._root),param,element,deep)}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e}}return""};var UserParam=function(oper){oper.match(/\{#param name=(\w*?) value=(.*?)\}/);this._name=RegExp.$1;this._value=RegExp.$2};UserParam.prototype.get=function(d,param,element,deep){var $T=d;var $P=param;var $Q=element;try{param[this._name]=eval(this._value)}catch(e){if(Template.DEBUG_MODE||(e instanceof JTException)){throw e}param[this._name]=undefined}return""};var Cycle=function(oper){oper.match(/\{#cycle values=(.*?)\}/);this._values=eval(RegExp.$1);this._length=this._values.length;if(this._length<=0){throw new Error("jTemplates: cycle has no elements")}this._index=0;this._lastSessionID=-1};Cycle.prototype.get=function(d,param,element,deep){var sid=jQuery.data(element,"jTemplateSID");if(sid!=this._lastSessionID){this._lastSessionID=sid;this._index=0}var i=this._index++%this._length;return this._values[i]};jQuery.fn.setTemplate=function(s,includes,settings){if(s.constructor===Template){return jQuery(this).each(function(){jQuery.data(this,"jTemplate",s);jQuery.data(this,"jTemplateSID",0)})}else{return jQuery(this).each(function(){jQuery.data(this,"jTemplate",new Template(s,includes,settings));jQuery.data(this,"jTemplateSID",0)})}};jQuery.fn.setTemplateURL=function(url_,includes,settings){var s=jQuery.ajax({url:url_,async:false}).responseText;return jQuery(this).setTemplate(s,includes,settings)};jQuery.fn.setTemplateElement=function(elementName,includes,settings){var s=jQuery("#"+elementName).val();if(s==null){s=jQuery("#"+elementName).html();s=s.replace(/&lt;/g,"<").replace(/&gt;/g,">")}s=jQuery.trim(s);s=s.replace(/^<\!\[CDATA\[([\s\S]*)\]\]>$/im,"$1");s=s.replace(/^<\!--([\s\S]*)-->$/im,"$1");return jQuery(this).setTemplate(s,includes,settings)};jQuery.fn.hasTemplate=function(){var count=0;jQuery(this).each(function(){if(jQuery.getTemplate(this)){++count}});return count};jQuery.fn.removeTemplate=function(){jQuery(this).processTemplateStop();return jQuery(this).each(function(){jQuery.removeData(this,"jTemplate")})};jQuery.fn.setParam=function(name,value){return jQuery(this).each(function(){var t=jQuery.getTemplate(this);if(t===undefined){if(Template.DEBUG_MODE){throw new Error("jTemplates: Template is not defined.")}else{return}}t.setParam(name,value)})};jQuery.fn.processTemplate=function(d,param){return jQuery(this).each(function(){var t=jQuery.getTemplate(this);if(t===undefined){if(Template.DEBUG_MODE){throw new Error("jTemplates: Template is not defined.")}else{return}}jQuery.data(this,"jTemplateSID",jQuery.data(this,"jTemplateSID")+1);jQuery(this).html(t.get(d,param,this,0))})};jQuery.fn.processTemplateURL=function(url_,param,options){var that=this;options=jQuery.extend({type:"GET",async:true,cache:false},options);jQuery.ajax({url:url_,type:options.type,data:options.data,dataFilter:options.dataFilter,async:options.async,cache:options.cache,timeout:options.timeout,dataType:"json",success:function(d){var r=jQuery(that).processTemplate(d,param);if(options.on_success){options.on_success(r)}},error:options.on_error,complete:options.on_complete});return this};var Updater=function(url,param,interval,args,objs,options){this._url=url;this._param=param;this._interval=interval;this._args=args;this.objs=objs;this.timer=null;this._options=options||{};var that=this;jQuery(objs).each(function(){jQuery.data(this,"jTemplateUpdater",that)});this.run()};Updater.prototype.run=function(){this.detectDeletedNodes();if(this.objs.length==0){return}var that=this;jQuery.getJSON(this._url,this._args,function(d){var r=jQuery(that.objs).processTemplate(d,that._param);if(that._options.on_success){that._options.on_success(r)}});this.timer=setTimeout(function(){that.run()},this._interval)};Updater.prototype.detectDeletedNodes=function(){this.objs=jQuery.grep(this.objs,function(o){if(jQuery.browser.msie){var n=o.parentNode;while(n&&n!=document){n=n.parentNode}return n!=null}else{return o.parentNode!=null}})};jQuery.fn.processTemplateStart=function(url,param,interval,args,options){return new Updater(url,param,interval,args,this,options)};jQuery.fn.processTemplateStop=function(){return jQuery(this).each(function(){var updater=jQuery.data(this,"jTemplateUpdater");if(updater==null){return}var that=this;updater.objs=jQuery.grep(updater.objs,function(o){return o!=that});jQuery.removeData(this,"jTemplateUpdater")})};jQuery.extend({createTemplate:function(s,includes,settings){return new Template(s,includes,settings)},createTemplateURL:function(url_,includes,settings){var s=jQuery.ajax({url:url_,async:false}).responseText;return new Template(s,includes,settings)},getTemplate:function(element){return jQuery.data(element,"jTemplate")},processTemplateToText:function(template,data,parameter){return template.get(data,parameter,undefined,0)},jTemplatesDebugMode:function(value){Template.DEBUG_MODE=value}})})(jQuery)};
var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};jaaulde.utils.cookies=(function(){var resolveOptions,assembleOptionsString,parseCookies,constructor,defaultOptions={expiresAt:null,path:'/',domain:null,secure:false};resolveOptions=function(options){var returnValue,expireDate;if(typeof options!=='object'||options===null){returnValue=defaultOptions;}else
{returnValue={expiresAt:defaultOptions.expiresAt,path:defaultOptions.path,domain:defaultOptions.domain,secure:defaultOptions.secure};if(typeof options.expiresAt==='object'&&options.expiresAt instanceof Date){returnValue.expiresAt=options.expiresAt;}else if(typeof options.hoursToLive==='number'&&options.hoursToLive!==0){expireDate=new Date();expireDate.setTime(expireDate.getTime()+(options.hoursToLive*60*60*1000));returnValue.expiresAt=expireDate;}if(typeof options.path==='string'&&options.path!==''){returnValue.path=options.path;}if(typeof options.domain==='string'&&options.domain!==''){returnValue.domain=options.domain;}if(options.secure===true){returnValue.secure=options.secure;}}return returnValue;};assembleOptionsString=function(options){options=resolveOptions(options);return((typeof options.expiresAt==='object'&&options.expiresAt instanceof Date?'; expires='+options.expiresAt.toGMTString():'')+'; path='+options.path+(typeof options.domain==='string'?'; domain='+options.domain:'')+(options.secure===true?'; secure':''));};parseCookies=function(){var cookies={},i,pair,name,value,separated=document.cookie.split(';'),unparsedValue;for(i=0;i<separated.length;i=i+1){pair=separated[i].split('=');name=pair[0].replace(/^\s*/,'').replace(/\s*$/,'');try
{value=decodeURIComponent(pair[1]);}catch(e1){value=pair[1];}if(typeof JSON==='object'&&JSON!==null&&typeof JSON.parse==='function'){try
{unparsedValue=value;value=JSON.parse(value);}catch(e2){value=unparsedValue;}}cookies[name]=value;}return cookies;};constructor=function(){};constructor.prototype.get=function(cookieName){var returnValue,item,cookies=parseCookies();if(typeof cookieName==='string'){returnValue=(typeof cookies[cookieName]!=='undefined')?cookies[cookieName]:null;}else if(typeof cookieName==='object'&&cookieName!==null){returnValue={};for(item in cookieName){if(typeof cookies[cookieName[item]]!=='undefined'){returnValue[cookieName[item]]=cookies[cookieName[item]];}else
{returnValue[cookieName[item]]=null;}}}else
{returnValue=cookies;}return returnValue;};constructor.prototype.filter=function(cookieNameRegExp){var cookieName,returnValue={},cookies=parseCookies();if(typeof cookieNameRegExp==='string'){cookieNameRegExp=new RegExp(cookieNameRegExp);}for(cookieName in cookies){if(cookieName.match(cookieNameRegExp)){returnValue[cookieName]=cookies[cookieName];}}return returnValue;};constructor.prototype.set=function(cookieName,value,options){if(typeof options!=='object'||options===null){options={};}if(typeof value==='undefined'||value===null){value='';options.hoursToLive=-8760;}else if(typeof value!=='string'){if(typeof JSON==='object'&&JSON!==null&&typeof JSON.stringify==='function'){value=JSON.stringify(value);}else
{throw new Error('cookies.set() received non-string value and could not serialize.');}}var optionsString=assembleOptionsString(options);document.cookie=cookieName+'='+encodeURIComponent(value)+optionsString;};constructor.prototype.del=function(cookieName,options){var allCookies={},name;if(typeof options!=='object'||options===null){options={};}if(typeof cookieName==='boolean'&&cookieName===true){allCookies=this.get();}else if(typeof cookieName==='string'){allCookies[cookieName]=true;}for(name in allCookies){if(typeof name==='string'&&name!==''){this.set(name,null,options);}}};constructor.prototype.test=function(){var returnValue=false,testName='cT',testValue='data';this.set(testName,testValue);if(this.get(testName)===testValue){this.del(testName);returnValue=true;}return returnValue;};constructor.prototype.setOptions=function(options){if(typeof options!=='object'){options=null;}defaultOptions=resolveOptions(options);};return new constructor();})();(function(){if(window.jQuery){(function($){$.cookies=jaaulde.utils.cookies;var extensions={cookify:function(options){return this.each(function(){var i,nameAttrs=['name','id'],name,$this=$(this),value;for(i in nameAttrs){if(!isNaN(i)){name=$this.attr(nameAttrs[i]);if(typeof name==='string'&&name!==''){if($this.is(':checkbox, :radio')){if($this.attr('checked')){value=$this.val();}}else if($this.is(':input')){value=$this.val();}else
{value=$this.html();}if(typeof value!=='string'||value===''){value=null;}$.cookies.set(name,value,options);break;}}}});},cookieFill:function(){return this.each(function(){var n,getN,nameAttrs=['name','id'],name,$this=$(this),value;getN=function(){n=nameAttrs.pop();return!!n;};while(getN()){name=$this.attr(n);if(typeof name==='string'&&name!==''){value=$.cookies.get(name);if(value!==null){if($this.is(':checkbox, :radio')){if($this.val()===value){$this.attr('checked','checked');}else
{$this.removeAttr('checked');}}else if($this.is(':input')){$this.val(value);}else
{$this.html(value);}}break;}}});},cookieBind:function(options){return this.each(function(){var $this=$(this);$this.cookieFill().change(function(){$this.cookify(options);});});}};$.each(extensions,function(i){$.fn[i]=this;});})(window.jQuery);}})();
if(!this.JSON){this.JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());
(function(a,b){a.tools=a.tools||{version:"v1.2.6"};var c=[],d,e=[75,76,38,39,74,72,40,37],f={};d=a.tools.dateinput={conf:{format:"mm/dd/yy",selectors:!1,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:b,max:b,trigger:0,toggle:0,editable:0,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(b,c){a.each(c,function(a,b){c[a]=b.split(",")}),f[b]=c}},d.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});function g(a,b){return(new Date(a,b+1,0)).getDate()}function h(a,b){a=""+a,b=b||2;while(a.length<b)a="0"+a;return a}var i=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,j=a("<a/>");function k(a,b,c){var d=a.getDate(),e=a.getDay(),g=a.getMonth(),k=a.getFullYear(),l={d:d,dd:h(d),ddd:f[c].shortDays[e],dddd:f[c].days[e],m:g+1,mm:h(g+1),mmm:f[c].shortMonths[g],mmmm:f[c].months[g],yy:String(k).slice(2),yyyy:k},m=b.replace(i,function(a){return a in l?l[a]:a.slice(1,a.length-1)});return j.html(m).html()}function l(a){return parseInt(a,10)}function m(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()==b.getMonth()&&a.getDate()==b.getDate()}function n(a){if(a!==b){if(a.constructor==Date)return a;if(typeof a=="string"){var c=a.split("-");if(c.length==3)return new Date(l(c[0]),l(c[1])-1,l(c[2]));if(!/^-?\d+$/.test(a))return;a=l(a)}var d=new Date;d.setDate(d.getDate()+a);return d}}function o(d,h){var i=this,j=new Date,o=j.getFullYear(),p=h.css,q=f[h.lang],r=a("#"+p.root),s=r.find("#"+p.title),t,u,v,w,x,y,z=d.attr("data-value")||h.value||d.val(),A=d.attr("min")||h.min,B=d.attr("max")||h.max,C,D;A===0&&(A="0"),z=n(z)||j,A=n(A||new Date(o+h.yearRange[0],1,1)),B=n(B||new Date(o+h.yearRange[1]+1,1,-1));if(!q)throw"Dateinput: invalid language: "+h.lang;if(d.attr("type")=="date"){var D=d.clone(),E=D.wrap("<div/>").parent().html(),F=a(E.replace(/type/i,"type=text data-orig-type"));h.value&&F.val(h.value),d.replaceWith(F),d=F}d.addClass(p.input);var G=d.add(i);if(!r.length){r=a("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",p.root),r.children().eq(0).attr("id",p.head).end().eq(1).attr("id",p.body).children().eq(0).attr("id",p.days).end().eq(1).attr("id",p.weeks).end().end().end().find("a").eq(0).attr("id",p.prev).end().eq(1).attr("id",p.next),s=r.find("#"+p.head).find("div").attr("id",p.title);if(h.selectors){var H=a("<select/>").attr("id",p.month),I=a("<select/>").attr("id",p.year);s.html(H.add(I))}var J=r.find("#"+p.days);for(var K=0;K<7;K++)J.append(a("<span/>").text(q.shortDays[(K+h.firstDay)%7]));a("body").append(r)}h.trigger&&(t=a("<a/>").attr("href","#").addClass(p.trigger).click(function(a){h.toggle?i.toggle():i.show();return a.preventDefault()}).insertAfter(d));var L=r.find("#"+p.weeks);I=r.find("#"+p.year),H=r.find("#"+p.month);function M(b,c,e){z=b,w=b.getFullYear(),x=b.getMonth(),y=b.getDate(),e=e||a.Event("api"),e.type="beforeChange",G.trigger(e,[b]);e.isDefaultPrevented()||(d.val(k(b,c.format,c.lang)),e.type="change",G.trigger(e),d.data("date",b),i.hide(e))}function N(b){b.type="onShow",G.trigger(b),a(document).bind("keydown.d",function(b){if(b.ctrlKey)return!0;var c=b.keyCode;if(c==8){d.val("");return i.hide(b)}if(c==27||c==9)return i.hide(b);if(a(e).index(c)>=0){if(!C){i.show(b);return b.preventDefault()}var f=a("#"+p.weeks+" a"),g=a("."+p.focus),h=f.index(g);g.removeClass(p.focus);if(c==74||c==40)h+=7;else if(c==75||c==38)h-=7;else if(c==76||c==39)h+=1;else if(c==72||c==37)h-=1;h>41?(i.addMonth(),g=a("#"+p.weeks+" a:eq("+(h-42)+")")):h<0?(i.addMonth(-1),g=a("#"+p.weeks+" a:eq("+(h+42)+")")):g=f.eq(h),g.addClass(p.focus);return b.preventDefault()}if(c==34)return i.addMonth();if(c==33)return i.addMonth(-1);if(c==36)return i.today();c==13&&(a(b.target).is("select")||a("."+p.focus).click());return a([16,17,18,9]).index(c)>=0}),a(document).bind("click.d",function(b){var c=b.target;!a(c).parents("#"+p.root).length&&c!=d[0]&&(!t||c!=t[0])&&i.hide(b)})}a.extend(i,{show:function(b){if(!(d.attr("readonly")||d.attr("disabled")||C)){b=b||a.Event(),b.type="onBeforeShow",G.trigger(b);if(b.isDefaultPrevented())return;a.each(c,function(){this.hide()}),C=!0,H.unbind("change").change(function(){i.setValue(I.val(),a(this).val())}),I.unbind("change").change(function(){i.setValue(a(this).val(),H.val())}),u=r.find("#"+p.prev).unbind("click").click(function(a){u.hasClass(p.disabled)||i.addMonth(-1);return!1}),v=r.find("#"+p.next).unbind("click").click(function(a){v.hasClass(p.disabled)||i.addMonth();return!1}),i.setValue(z);var e=d.offset();/iPad/i.test(navigator.userAgent)&&(e.top-=a(window).scrollTop()),r.css({top:e.top+d.outerHeight({margins:!0})+h.offset[0],left:e.left+h.offset[1]}),h.speed?r.show(h.speed,function(){N(b)}):(r.show(),N(b));return i}},setValue:function(c,d,e){var f=l(d)>=-1?new Date(l(c),l(d),l(e==b||isNaN(e)?1:e)):c||z;f<A?f=A:f>B&&(f=B),typeof c=="string"&&(f=n(c)),c=f.getFullYear(),d=f.getMonth(),e=f.getDate(),d==-1?(d=11,c--):d==12&&(d=0,c++);if(!C){M(f,h);return i}x=d,w=c,y=e;var k=new Date(c,d,1-h.firstDay),o=k.getDay(),r=g(c,d),t=g(c,d-1),D;if(h.selectors){H.empty(),a.each(q.months,function(b,d){A<new Date(c,b+1,1)&&B>new Date(c,b,0)&&H.append(a("<option/>").html(d).attr("value",b))}),I.empty();var E=j.getFullYear();for(var F=E+h.yearRange[0];F<E+h.yearRange[1];F++)A<new Date(F+1,0,1)&&B>new Date(F,0,0)&&I.append(a("<option/>").text(F));H.val(d),I.val(c)}else s.html(q.months[d]+" "+c);L.empty(),u.add(v).removeClass(p.disabled);for(var G=o?0:-7,J,K;G<(o?42:35);G++)J=a("<a/>"),G%7===0&&(D=a("<div/>").addClass(p.week),L.append(D)),G<o?(J.addClass(p.off),K=t-o+G+1,f=new Date(c,d-1,K)):G<o+r?(K=G-o+1,f=new Date(c,d,K),m(z,f)?J.attr("id",p.current).addClass(p.focus):m(j,f)&&J.attr("id",p.today)):(J.addClass(p.off),K=G-r-o+1,f=new Date(c,d+1,K)),A&&f<A&&J.add(u).addClass(p.disabled),B&&f>B&&J.add(v).addClass(p.disabled),J.attr("href","#"+K).text(K).data("date",f),D.append(J);L.find("a").click(function(b){var c=a(this);c.hasClass(p.disabled)||(a("#"+p.current).removeAttr("id"),c.attr("id",p.current),M(c.data("date"),h,b));return!1}),p.sunday&&L.find(p.week).each(function(){var b=h.firstDay?7-h.firstDay:0;a(this).children().slice(b,b+1).addClass(p.sunday)});return i},setMin:function(a,b){A=n(a),b&&z<A&&i.setValue(A);return i},setMax:function(a,b){B=n(a),b&&z>B&&i.setValue(B);return i},today:function(){return i.setValue(j)},addDay:function(a){return this.setValue(w,x,y+(a||1))},addMonth:function(a){var b=x+(a||1),c=g(w,b),d=y<=c?y:c;return this.setValue(w,b,d)},addYear:function(a){return this.setValue(w+(a||1),x,y)},destroy:function(){d.add(document).unbind("click.d").unbind("keydown.d"),r.add(t).remove(),d.removeData("dateinput").removeClass(p.input),D&&d.replaceWith(D)},hide:function(b){if(C){b=a.Event(),b.type="onHide",G.trigger(b),a(document).unbind("click.d").unbind("keydown.d");if(b.isDefaultPrevented())return;r.hide(),C=!1}return i},toggle:function(){return i.isOpen()?i.hide():i.show()},getConf:function(){return h},getInput:function(){return d},getCalendar:function(){return r},getValue:function(a){return a?k(z,a,h.lang):z},isOpen:function(){return C}}),a.each(["onBeforeShow","onShow","change","onHide"],function(b,c){a.isFunction(h[c])&&a(i).bind(c,h[c]),i[c]=function(b){b&&a(i).bind(c,b);return i}}),h.editable||d.bind("focus.d click.d",i.show).keydown(function(b){var c=b.keyCode;if(!C&&a(e).index(c)>=0){i.show(b);return b.preventDefault()}return b.shiftKey||b.ctrlKey||b.altKey||c==9?!0:b.preventDefault()}),n(d.val())&&M(z,h)}a.expr[":"].date=function(b){var c=b.getAttribute("type");return c&&c=="date"||a(b).data("dateinput")},a.fn.dateinput=function(b){if(this.data("dateinput"))return this;b=a.extend(!0,{},d.conf,b),a.each(b.css,function(a,c){!c&&a!="prefix"&&(b.css[a]=(b.css.prefix||"")+(c||a))});var e;this.each(function(){var d=new o(a(this),b);c.push(d);var f=d.getInput().data("dateinput",d);e=e?e.add(f):f});return e?e:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.overlay={addEffect:function(a,b,d){c[a]=[b,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var b=[],c={};a.tools.overlay.addEffect("default",function(b,c){var d=this.getConf(),e=a(window);d.fixed||(b.top+=e.scrollTop(),b.left+=e.scrollLeft()),b.position=d.fixed?"fixed":"absolute",this.getOverlay().css(b).fadeIn(d.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});function d(d,e){var f=this,g=d.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=Math.random().toString().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeOnClick=l.closeOnEsc=!1);var n=e.target||d.attr("rel");j=n?a(n):null||d;if(!j.length)throw"Could not find Overlay: "+n;d&&d.index(j)==-1&&d.click(function(a){f.load(a);return a.preventDefault()}),a.extend(f,{load:function(d){if(f.isOpened())return f;var i=c[e.effect];if(!i)throw"Overlay: cannot find effect : \""+e.effect+"\"";e.oneInstance&&a.each(b,function(){this.close(d)}),d=d||a.Event(),d.type="onBeforeLoad",g.trigger(d);if(d.isDefaultPrevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,o=e.left,p=j.outerWidth({margin:!0}),q=j.outerHeight({margin:!0});typeof n=="string"&&(n=n=="center"?Math.max((h.height()-q)/2,0):parseInt(n,10)/100*h.height()),o=="center"&&(o=Math.max((h.width()-p)/2,0)),i[0].call(f,{top:n,left:o},function(){k&&(d.type="onLoad",g.trigger(d))}),l&&e.closeOnClick&&a.mask.getMask().one("click",f.close),e.closeOnClick&&a(document).bind("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeOnEsc&&a(document).bind("keydown."+m,function(a){a.keyCode==27&&f.close(a)});return f},close:function(b){if(!f.isOpened())return f;b=b||a.Event(),b.type="onBeforeClose",g.trigger(b);if(!b.isDefaultPrevented()){k=!1,c[e.effect][1].call(f,function(){b.type="onClose",g.trigger(b)}),a(document).unbind("click."+m).unbind("keydown."+m),l&&a.mask.close();return f}},getOverlay:function(){return j},getTrigger:function(){return d},getClosers:function(){return i},isOpened:function(){return k},getConf:function(){return e}}),a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a("<a class=\"close\"></a>"),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.fn.overlay=function(c){var e=this.data("overlay");if(e)return e;a.isFunction(c)&&(c={onBeforeLoad:c}),c=a.extend(!0,{},a.tools.overlay.conf,c),this.each(function(){e=new d(a(this),c),b.push(e),a(this).data("overlay",e)});return c.api?e:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,wheelSpeed:0}};function b(a,b){var c=parseInt(a.css(b),10);if(c)return c;var d=a[0].currentStyle;return d&&d.width&&parseInt(d.width,10)}function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}var d;function e(b,e){var f=this,g=b.add(f),h=b.children(),i=0,j=e.vertical;d||(d=f),h.length>1&&(h=a(e.items,b)),e.size>1&&(e.circular=!1),a.extend(f,{getConf:function(){return e},getIndex:function(){return i},getSize:function(){return f.getItems().size()},getNaviButtons:function(){return n.add(o)},getRoot:function(){return b},getItemWrap:function(){return h},getItems:function(){return h.find(e.item).not("."+e.clonedClass)},move:function(a,b){return f.seekTo(i+a,b)},next:function(a){return f.move(e.size,a)},prev:function(a){return f.move(-e.size,a)},begin:function(a){return f.seekTo(0,a)},end:function(a){return f.seekTo(f.getSize()-1,a)},focus:function(){d=f;return f},addItem:function(b){b=a(b),e.circular?(h.children().last().before(b),h.children().first().replaceWith(b.clone().addClass(e.clonedClass))):(h.append(b),o.removeClass("disabled")),g.trigger("onAddItem",[b]);return f},seekTo:function(b,c,k){b.jquery||(b*=1);if(e.circular&&b===0&&i==-1&&c!==0)return f;if(!e.circular&&b<0||b>f.getSize()||b<-1)return f;var l=b;b.jquery?b=f.getItems().index(b):l=f.getItems().eq(b);var m=a.Event("onBeforeSeek");if(!k){g.trigger(m,[b,c]);if(m.isDefaultPrevented()||!l.length)return f}var n=j?{top:-l.position().top}:{left:-l.position().left};i=b,d=f,c===undefined&&(c=e.speed),h.animate(n,c,e.easing,k||function(){g.trigger("onSeek",[b])});return f}}),a.each(["onBeforeSeek","onSeek","onAddItem"],function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}});if(e.circular){var k=f.getItems().slice(-1).clone().prependTo(h),l=f.getItems().eq(1).clone().appendTo(h);k.add(l).addClass(e.clonedClass),f.onBeforeSeek(function(a,b,c){if(!a.isDefaultPrevented()){if(b==-1){f.seekTo(k,c,function(){f.end(0)});return a.preventDefault()}b==f.getSize()&&f.seekTo(l,c,function(){f.begin(0)})}});var m=b.parents().add(b).filter(function(){if(a(this).css("display")==="none")return!0});m.length?(m.show(),f.seekTo(0,0,function(){}),m.hide()):f.seekTo(0,0,function(){})}var n=c(b,e.prev).click(function(a){a.stopPropagation(),f.prev()}),o=c(b,e.next).click(function(a){a.stopPropagation(),f.next()});e.circular||(f.onBeforeSeek(function(a,b){setTimeout(function(){a.isDefaultPrevented()||(n.toggleClass(e.disabledClass,b<=0),o.toggleClass(e.disabledClass,b>=f.getSize()-1))},1)}),e.initialIndex||n.addClass(e.disabledClass)),f.getSize()<2&&n.add(o).addClass(e.disabledClass),e.mousewheel&&a.fn.mousewheel&&b.mousewheel(function(a,b){if(e.mousewheel){f.move(b<0?1:-1,e.wheelSpeed||50);return!1}});if(e.touch){var p={};h[0].ontouchstart=function(a){var b=a.touches[0];p.x=b.clientX,p.y=b.clientY},h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var b=a.touches[0],c=p.x-b.clientX,d=p.y-b.clientY;f[j&&d>0||!j&&c>0?"next":"prev"](),a.preventDefault()}}}e.keyboard&&a(document).bind("keydown.scrollable",function(b){if(!(!e.keyboard||b.altKey||b.ctrlKey||b.metaKey||a(b.target).is(":input"))){if(e.keyboard!="static"&&d!=f)return;var c=b.keyCode;if(j&&(c==38||c==40)){f.move(c==38?-1:1);return b.preventDefault()}if(!j&&(c==37||c==39)){f.move(c==37?-1:1);return b.preventDefault()}}}),e.initialIndex&&f.seekTo(e.initialIndex,0,function(){})}a.fn.scrollable=function(b){var c=this.data("scrollable");if(c)return c;b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){c=new e(a(this),b),a(this).data("scrollable",c)});return b.api?c:this}})(jQuery);(function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable"),c=b.getRoot(),f,g=!1;function h(){f=setTimeout(function(){b.next()},d.interval)}b&&(e=b),b.play=function(){f||(g=!1,c.bind("onSeek",h),h())},b.pause=function(){f=clearTimeout(f),c.unbind("onSeek",h)},b.resume=function(){g||b.play()},b.stop=function(){g=!0,b.pause()},d.autopause&&c.add(b.getNaviButtons()).hover(b.pause,b.resume),d.autoplay&&b.play()});return d.api?e:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getConf(),d=c.fadeOutSpeed,e=this.getPanes();d?e.fadeOut(d):e.hide(),e.eq(a).fadeIn(c.fadeInSpeed,b)},slide:function(a,b){var c=this.getConf();this.getPanes().slideUp(c.slideUpSpeed),this.getPanes().eq(a).slideDown(c.slideDownSpeed,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},c,d;a.tools.tabs.addEffect("horizontal",function(b,e){if(!c){var f=this.getPanes().eq(b),g=this.getCurrentPane();d||(d=this.getPanes().eq(0).width()),c=!0,f.show(),g.animate({width:0},{step:function(a){f.css("width",d-a)},complete:function(){a(this).hide(),e.call(),c=!1}}),g.length||(e.call(),c=!1)}});function e(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(c,d){var i=h.eq(c);typeof c=="string"&&c.replace("#","")&&(i=h.filter("[href*="+c.replace("#","")+"]"),c=Math.max(h.index(i),0));if(e.rotate){var k=h.length-1;if(c<0)return f.click(k,d);if(c>k)return f.click(0,d)}if(!i.length){if(j>=0)return f;c=e.initialIndex,i=h.eq(c)}if(c===j)return f;d=d||a.Event(),d.type="onBeforeClick",g.trigger(d,[c]);if(!d.isDefaultPrevented()){b[e.effect].call(f,c,function(){j=c,d.type="onClick",g.trigger(d,[c])}),h.removeClass(e.current),i.addClass(e.current);return f}},getConf:function(){return e},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.unbind(e.event).removeClass(e.current),i.find("a[href^=#]").unbind("click.T");return f}}),a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).bind(e.event,function(a){f.click(b,a);return a.preventDefault()})}),i.find("a[href^=#]").bind("click.T",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href="+location.hash+"]").length?f.click(location.hash):(e.initialIndex===0||e.initialIndex>0)&&f.click(e.initialIndex)}a.fn.tabs=function(b,c){var d=this.data("tabs");d&&(d.destroy(),this.removeData("tabs")),a.isFunction(c)&&(c={onBeforeClick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){d=new e(a(this),b,c),a(this).data("tabs",d)});return c.api?d:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"};var b;b=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};function c(){if(a.browser.msie){var b=a(document).height(),c=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b-c<20?c:b]}return[a(document).width(),a(document).height()]}function d(b){if(b)return b.call(a.mask)}var e,f,g,h,i;a.mask={load:function(j,k){if(g)return this;typeof j=="string"&&(j={color:j}),j=j||h,h=j=a.extend(a.extend({},b.conf),j),e=a("#"+j.maskId),e.length||(e=a("<div/>").attr("id",j.maskId),a("body").append(e));var l=c();e.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:j.startOpacity,zIndex:j.zIndex}),j.color&&e.css("backgroundColor",j.color);if(d(j.onBeforeLoad)===!1)return this;j.closeOnEsc&&a(document).bind("keydown.mask",function(b){b.keyCode==27&&a.mask.close(b)}),j.closeOnClick&&e.bind("click.mask",function(b){a.mask.close(b)}),a(window).bind("resize.mask",function(){a.mask.fit()}),k&&k.length&&(i=k.eq(0).css("zIndex"),a.each(k,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),f=k.css({zIndex:Math.max(j.zIndex+1,i=="auto"?0:i)})),e.css({display:"block"}).fadeTo(j.loadSpeed,j.opacity,function(){a.mask.fit(),d(j.onLoad),g="full"}),g=!0;return this},close:function(){if(g){if(d(h.onBeforeClose)===!1)return this;e.fadeOut(h.closeSpeed,function(){d(h.onClose),f&&f.css({zIndex:i}),g=!1}),a(document).unbind("keydown.mask"),e.unbind("click.mask"),a(window).unbind("resize.mask")}return this},fit:function(){if(g){var a=c();e.css({width:a[0],height:a[1]})}},getMask:function(){return e},isLoaded:function(a){return a?g=="full":g},getConf:function(){return h},getExposed:function(){return f}},a.fn.mask=function(b){a.mask.load(b);return this},a.fn.expose=function(b){a.mask.load(b,this);return this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery);(function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);if(!d(l)){l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3]));if(l[0]||l[2])j.offset[0]*=-1;if(l[1]||l[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery);
(function($){SBB.inputValReplace=function($ctx){if(typeof $ctx=='undefined'||$ctx===null||!$ctx.length)return false;$('.inputValReplace input',$ctx).unbind('focusout.sbb.inputvalreplace').bind('focusout.sbb.inputvalreplace',function(){$(this).siblings('label').css({display:$(this).val()===''?'block':'none'});}).unbind('focusin.sbb.inputvalreplace').bind('focusin.sbb.inputvalreplace',function(e){$(this).siblings('label').hide();}).trigger('focusout.sbb.inputvalreplace').blur().filter('[type=password]').siblings('label').text('••••••••');};}(Nx.$));
(function($){SBB.Widgets={cache:{"module_html":''},calculateModuleDimensions:function($ctx){$('<div class="widget-tmp" id="widget-module-tmp"></div>').css({"position":"absolute","left":"-5000px","top":"-5000px"}).append($ctx).appendTo('body');return $('div.modSbbWidget','#widget-module-tmp');},open:function(content,callback){if(!content){throw new Error('SBB.Widgets.open: No content was specified');}
$.fancybox({'content':content,'scrolling':'no','autoScale':false,onStart:function(){$('#fancybox-wrap').addClass('fancybox-wrap-sbbwidget');SBB.overlay.addAriaAttributes();if(SBB.utils.is_ie6()){$('#fancybox-wrap').css('visibility','hidden');}},onComplete:function(){$.fancybox.resize();$('#fancybox-content input:visible:first').focus();if(SBB.utils.is_ie6()){setTimeout(function(){if($.isFunction(callback)){callback();}
$('#fancybox-wrap').css('visibility','visible');},0);}else{if($.isFunction(callback)){callback();}}},onClosed:function(){$('#fancybox-wrap').removeClass('fancybox-wrap-sbbwidget');}});},open_module:function(widget_data,module_name,module_url,module_data,caller_that,beforeOpen){var that=this;if(arguments.length!==5){that.errorFactory('SBB.Widgets.open_module: Wrong number of arguments.');}
if(typeof(widget_data)!=='object'){that.errorFactory('SBB.Widgets.open_module: widget_data invalid.');}
if(typeof(module_name)!=='string'){that.errorFactory('SBB.Widgets.open_module: module_name invalid.');}
if(typeof(module_url)!=='string'){that.errorFactory('SBB.Widgets.open_module: module_url invalid.');}
if(typeof(module_data)!=='object'){that.errorFactory('SBB.Widgets.open_module: module_data invalid.');}
if(typeof(caller_that)!=='object'){that.errorFactory('SBB.Widgets.open_module: caller_that invalid.');}
$.fancybox.showActivity();if(that.cache.module_html.length===0){$.get(module_url,'',function(module_html){that.cache.module_html=module_html;SBB.Widgets.prepareModuleHtml(widget_data,module_name,that.cache.module_html,module_data,caller_that,beforeOpen);},'html');}else{SBB.Widgets.prepareModuleHtml(widget_data,module_name,that.cache.module_html,module_data,caller_that,beforeOpen);}},prepareModuleHtml:function(widget_data,module_name,module_html,module_data,caller_that,beforeOpen){var $tmp=null,$sbbwidget=null,module_api=null;$('<div id="widget-module-tmp">'+module_html+'</div>').css({'position':'absolute','left':'-5000px','top':'-5000px','z-index':9999}).appendTo('body');$tmp=$('#widget-module-tmp');caller_that.sandbox.addModules($tmp);$sbbwidget=$('div.modSbbWidget',$tmp);$('div.widget-icon',$sbbwidget).text(widget_data.icon);if(widget_data.name!==''){$('div.widget-name',$sbbwidget).text(widget_data.name);}
module_api=$('div.mod'+module_name,$sbbwidget).data('terrific');module_api.prepareWidget(module_data,$sbbwidget,function(){if($.isFunction(beforeOpen)){beforeOpen($sbbwidget,$('div.mod'+module_name,$sbbwidget),module_api);}
SBB.Widgets.open($sbbwidget,function(){if($.isFunction(module_api.widgetLoaded)){module_api.widgetLoaded(module_data);}
$tmp.remove();});});},resize_footer:function(){var $listing_sbbWidgets=$('ul.listing-sbbWidgets'),$listing_sbbWidgets_items=$('li',$listing_sbbWidgets),sbbWidgets_width=$listing_sbbWidgets.width(),sbbWidgets_items_width=$listing_sbbWidgets_items.length*($($listing_sbbWidgets_items[0]).outerWidth(true));if(sbbWidgets_width<sbbWidgets_items_width){$listing_sbbWidgets.width(sbbWidgets_items_width);}},fancyboxResizeWidth:function(referenceElement){var new_fancybox_width=0,additional_width=0;if(arguments.length===2&&!isNaN(arguments[1])){additional_width=arguments[1];}
new_fancybox_width=referenceElement.outerWidth()+additional_width;$('#fancybox-wrap').width(new_fancybox_width);$('#fancybox-content').width(new_fancybox_width);$.fancybox.center();return new_fancybox_width;},fancyboxResizeHeight:function(referenceElement){var new_fancybox_height=referenceElement.closest('div.modSbbWidget').outerHeight();$('#fancybox-wrap').height(new_fancybox_height);$('#fancybox-content').height(new_fancybox_height);$.fancybox.center();return new_fancybox_height;},get_param_by_name:function(param_name){var that=this;return $('input[name="'+param_name+'"]',that.config.params_selector).val();},errorFactory:function(message){throw new Error(message);}};}(Nx.$));
(function($){(SBB.dateinput=function(){var deLocals={months:'Januar,Februar,M&auml;rz,April,Mai,Juni,Juli,August,'+'September,Oktober,November,Dezember',shortMonths:'Jan,Feb,Mar,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez',days:'Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag',shortDays:'So,Mo,Di,Mi,Do,Fr,Sa'},frLocals={months:'janvier,f&eacute;vrier,mars,avril,mai,juin,juillet,ao&ucirc;t,'+'septembre,octobre,novembre,d&eacute;cembre',shortMonths:'jan,f&eacute;v,mar,avr,mai,jun,jul,ao&ucirc;,sep,oct,nov,d&eacute;c',days:'dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi',shortDays:'di,lu,ma,me,je,ve,sa'},itLocals={months:'gennaio,ebbraio,marzo,aprile,maggio,giugno,luglio,agosto,'+'settembre,ottobre,novembre,dicembre',shortMonths:'gen,feb,mar,apr,mag,giu,lug,ago,sett,ott,nov,dic',days:'domenica,lunedi,martedi,mercoledi,giovedi,venerdi,sabato',shortDays:'do,lu,ma,me,gi,ve,sa'},enLocals={months:'January,February,March,April,May,June,July,August,September,October,November,December',shortMonths:'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec',days:'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday',shortDays:'Su,Mo,Tu,We,Th,Fr,Sa'},currLang=$('meta[name=language]').attr('content');currLang=currLang.indexOf('-')<0?currLang:currLang.split('-')[0];$.tools.dateinput.localize("en",enLocals);$.tools.dateinput.localize("de",deLocals);$.tools.dateinput.localize("fr",frLocals);$.tools.dateinput.localize("it",itLocals);$.tools.dateinput.conf=$.extend({},$.tools.dateinput.conf,{format:'ddd, dd.mm.yy',lang:currLang,firstDay:1,min:'2004-01-01'});SBB.dateinput.locals={'en':enLocals,'de':deLocals,'fr':frLocals,'it':itLocals};});}(Nx.$));
(function($){(SBB.overlay=function($ctx){var that=this,transition='fade',speed=300;if(arguments.length>0&&typeof(arguments[0])==='object'){that.$ctx=$ctx;}else{that.$ctx=$('body');}
if($.browser.msie&&$.browser.version<9){transition='none';speed=0;}
$.fn.fancybox.defaults=$.extend({},$.fn.fancybox.defaults,{overlayOpacity:0.3,overlayColor:'#000',padding:0,titlePosition:'inside',centerOnScroll:false,transitionIn:transition,transitionOut:transition,speedIn:speed,speedOut:speed,onStart:function(){$('body').addClass('overlayVisible');that.overlay.addAriaAttributes();},onClosed:function(){$('#fancybox-overlay').hide();$('body').removeClass('overlayVisible');}});this.overlay.anchorHandling().formHandling();});$.extend(SBB.overlay,{anchorHandling:function(){var that=this,is_href_attribute_url=null;is_href_attribute_url=function($anchor){var href=$anchor.attr('href');return!(href.length<1||href[0]==='#');};$('a.openTargetInOverlay',that.$ctx).each(function(){var $this=$(this);if(!is_href_attribute_url($this)){$this.unbind('click.sbb.overlay.anchorHandling').bind('click.sbb.overlay.anchorHandling',function(){var $content=$($(this).attr('href')).clone().show();if($content.length<1){return true;}
$.fancybox({'content':$content,'autoDimensions':true});return true;});}else{$this.unbind('click.sbb.overlay.anchorHandling').bind('click.sbb.overlay.anchorHandling',function(){$.fancybox({'href':$this.attr('href'),'ajax':{'cache':false},'titleShow':false,'onComplete':that.overlayBinding});return false;});}});return this;},formHandling:function(){var that=this,$forms=$('.overlayAjaxForm form',that.$ctx);$('button[type="submit"], input[type="submit"]',$forms).unbind('click.sbb.overlayajaxform').bind('click.sbb.overlayajaxform',function(){var $this=$(this);if($this.is('[name]')){$this.parents('form').append('<input type="hidden" name="'+$this.attr('name')+'" value="'+$this.val()+'" />');}});$forms.unbind('submit.sbb.overlayajaxform').bind('submit.sbb.overlayajaxform',function(e){e.preventDefault();$.fancybox.showActivity();SBB.ajax.ajaxFormPost($(this),{success:function(response){var $response=$(response);$.fancybox({'content':$response,'scrolling':'no','autoScale':false,'onComplete':that.overlayBinding});}});});return this;},overlayBinding:function(){$.fancybox.resize();SBB.formValidation.init();SBB.inputValReplace($('#fancybox-content'));SBB.overlay();},setDynamicHeight:function(){$('#fancybox-wrap').css({height:'auto'});$('#fancybox-content').css({height:'auto',position:'relative'});if(SBB.utils.is_ie6()){$('#fancybox-content').css({background:'white',paddingLeft:14,paddingRight:14,marginLeft:-14,marginRight:-14});}},addAriaAttributes:function(){$('#fancybox-wrap').attr({"aria-live":"assertive","aria-relevant":"additions","aria-atomic":"true"});}});}(Nx.$));
(function($){SBB.Widgets.MyConnections={config:{"caller_that":null,"cookie_available":true,"cookie_name":'my_saved_connections',"cookie_options":{expiresAt:new Date(2099,1,1)},"maximum_connections":5,"params_selector":'#paramsMyConnections',"module_name":'MyConnections',"additional_width":16},cache:{"cannot_add_anymore_connections_warning":'',"module_html":''},eventHandlerAddConnectionButton:function($ctx){var that=this;if($ctx.length!==1){throw new Error('SBB.Widgets.MyConnections.eventHandlerAddConnectionButton: The Add Connection button is missing.');}
$ctx.parent().click(function(){if(that.get_cookie_information().connections_length===that.config.maximum_connections){that.open_module({icon:"",name:""},that.config.module_name,that.get_param_by_name('module_url'),{"message":true},that.config.caller_that);}else{that.open_module({icon:"",name:""},that.config.module_name,that.get_param_by_name('module_url'),null,that.config.caller_that);}
return false;});},get_param_by_name:function(param_name){return SBB.Widgets.get_param_by_name.apply(this,arguments);},open_module:function(widget_data,module_name,module_url,module_data,caller_that,beforeOpen){SBB.Widgets.open_module.apply(this,arguments);},create_connection_items:function(connection_data,$clone_me,caller_that){var $clone=$clone_me.clone().insertAfter($clone_me),connection_index=0,module_html_url='',that=this,title_attribute='';if(connection_data.via&&connection_data.via.value.length>0){title_attribute=connection_data.from.value+' - '+connection_data.to.value+' via '+connection_data.via;}else{title_attribute=connection_data.from.value+' - '+connection_data.to.value;}
$('a',$clone).text(connection_data.name).addClass('myconnection-sbbWidgetItem').data('myconnection',connection_data).attr('title',title_attribute).click(function(){connection_index=$(this).index('a.myconnection-sbbWidgetItem',$(this).closest('ul.listing-sbbWidgets'));module_html_url=that.get_param_by_name('module_url');that.open_module({icon:"",name:"Verbindung hinzufügen"},that.config.module_name,module_html_url,{"myconnection":$(this).data('myconnection'),"connection_index":connection_index},caller_that);return false;});SBB.Widgets.resize_footer();},get_cookie_information:function(){var that=this,cookie_value=null,connections_length=0;if(that.is_cookie_available()&&(cookie_value=$.cookies.get(that.config.cookie_name))){connections_length=cookie_value.connections.length;}
return{cookie_value:cookie_value,connections_length:connections_length};},get_cookie_information_by_index:function(index){var cookie_information=this.get_cookie_information();return cookie_information.cookie_value.connections[index];},initialize:function($ctx,caller_that){var that=this,cookie_value=null,connections_length=0;that.config.cookie_available=$.cookies.test();that.config.caller_that=caller_that;if(that.is_cookie_available()&&(cookie_value=$.cookies.get(that.config.cookie_name))){connections_length=cookie_value.connections.length;}
that.eventHandlerAddConnectionButton($ctx);if(cookie_value){(function(){for(var i=connections_length-1;i>=0;i=i-1){that.create_connection_items(cookie_value.connections[i],$ctx.parent(),caller_that);}}());}},is_cookie_available:function(){return this.config.cookie_available;},update_connection_item:function(connection_data,$element){$('a',$element).text(connection_data.name).data('myconnection',connection_data).attr('title',connection_data.from+' - '+connection_data.to+' via '+connection_data.via);},show_no_cookies_warning:function(){SBB.Widgets.open('You need cookies to be activated');},fetchConnectionTimetableData:function(request_data,callback){if(!(request_data instanceof Object)){throw new Error('SBB.Widgets.MyConnections.fetchConnectionTimetableData: Invalid request_data');}
$.fancybox.showActivity();var url=this.get_param_by_name('timetable_request_url');$.ajax({data:request_data,url:url,success:function(response){$.fancybox.hideActivity();if($.isFunction(callback)){callback(response);}},dataType:'json',type:'POST'});},fetchFirstConnectionTimetableData:function(request_data,callback){if(!("from"in request_data)||!("to"in request_data)||!("via"in request_data)){throw new Error('SBB.Widgets.MyConnections.fetchFirstConnectionTimetableData: Missing items in request_data');}
return this.fetchConnectionTimetableData(request_data,callback);},fetchMoreConnectionTimetableData:function(request_data,callback){if(!("conresctxt"in request_data)||!("navigation"in request_data)){throw new Error('SBB.Widgets.MyConnections.fetchMoreConnectionTimetableData: Missing items in request_data');}
return this.fetchConnectionTimetableData(request_data,callback);},struct_connection_data:function(from,to,via,name){name=name||'';if(!(from&&to&&via)){throw new Error('Invalid or incomplete connection data');}
return{"from":{"id":from.id,"value":from.value},"to":{"id":to.id,"value":to.value},"via":{"id":via.id,"value":via.value},"name":name};}};}(Nx.$));
(function($){SBB.datepicker=function($ctx){$ctx=$($ctx);var that=this,$this=null,$dateInputs=$('input.dateInputField:first',$ctx);$dateInputs.attr('autocomplete','off');that.datepicker.setUpTriggerer($ctx);that.datepicker.locals=that.dateinput.locals[$.tools.dateinput.conf.lang];that.datepicker.weekDayRegex=$.makeArray(that.datepicker.locals.shortDays).join('|');$this=$dateInputs;that.datepicker.formatInputValue($this);that.datepicker.key_down_eventhandler($this);return that.datepicker;};SBB.datepicker.helper={formatInputValue:function($input){if(typeof($input)==='undefined'){return false;}
var that=this,day,month,year,v=null,dateObj=null;v=that.extract_iso_date_from_sbb_date($input.val());day=v.dd;month=v.mm;year=v.yyyy;dateObj=new Date(year,(month-1),day);$input.removeData('dateinput').unbind('click focus');$input.dateinput({onHide:function(){that.formatInputValue($input);},onShow:function(){that.key_down_eventhandler($input);if(SBB.utils.is_ie6()){$('#calroot').bgiframe();}},change:function(){that.saveDate($input);}});if(!$input.hasClass('allowEmptyValue')&&$input.val()!==''){$input.data('dateinput').setValue(dateObj);}
that.add_min_max($input);$input.unbind('click focus');$input.bind('click focus',function(){var $this=$(this);if($this.data('dateinput')){if($this.data('dateinput').isOpen()){$this.data('dateinput').hide();}}
that.key_down_eventhandler($this);});$input.unbind('focusout.sbb.datepicker').bind('focusout.sbb.datepicker',function(){var $this=$(this),dateinput=$this.data('dateinput');dateinput.hide();that.rollbackDate($this);that.key_down_eventhandler($this);});that.formSubmitHandler($input);return $input;},setUpTriggerer:function($ctx){if(typeof($ctx)==='undefined'){return false;}
var that=this,$input=$('input.dateInputField',$ctx),$prevDay=$('.previous_day',$ctx),$nextDay=$('.next_day',$ctx),$toggleCal=$('.toggle_calendar',$ctx);$toggleCal.unbind('click.sbb.datepicker.toggle').bind('click.sbb.datepicker.toggle',function(){that.triggerAction($input);var dateinput=$input.data('dateinput');if(dateinput.isOpen()){dateinput.hide();}else{dateinput.show();}
return false;});$prevDay.unbind('click.sbb.datepicker.prev').bind('click.sbb.datepicker.prev',function(){that.triggerAction($input);that.add_day($input,true);return false;});$nextDay.unbind('click.sbb.datepicker.next').bind('click.sbb.datepicker.next',function(){that.triggerAction($input);that.add_day($input);return false;});return true;},triggerAction:function($input){var that=this;if(!that.is_valid_sbb_date($input.val())){that.rollbackDate($input);}else{that.saveDate($input);}},formSubmitHandler:function($input){},addLeadingZero:function(value){var int_value=parseInt(value,10);return(int_value<10?'0'+int_value:int_value).toString();},check_key_input:function($input){if(typeof($input)==='undefined'){return false;}
var that=this;},saveDate:function($input){var that=this,input_value=$input.val();if(!that.is_valid_sbb_date(input_value)){return false;}
$input.data('lastdate',that.extract_dateobject_from_sbb_date($input.val()));return true;},rollbackDate:function($input){if(!($input.hasClass('allowEmptyValue')&&$input.val()==='')){$input.data('dateinput').setValue($input.data('lastdate'));}
return true;},key_down_eventhandler:function($input){var that=this;$input.unbind('keydown');$input.unbind('keyup.dateinput.sbb');$input.unbind('blur.dateinput.sbb');$input.bind('keyup.dateinput.sbb',function(e){var $this=$(this);if(that.is_valid_sbb_date($this.val())){that.saveDate($this);}});$input.bind('blur.dateinput.sbb',function(){var $this=$(this),dateparts=that.extract_iso_date_from_sbb_date($this.val());if(!that.is_valid_sbb_date($this.val())||!that.is_valid_date(new Date(dateparts.yyyy,dateparts.mm-1,dateparts.dd))){that.rollbackDate($this);}
return true;});},is_valid_euro_date:function(ds){return(/(\b(\d\d\.){2}(\d){4}\b){1}/).test($.trim(ds));},is_valid_sbb_date:function(ds){var sbbDateRegex=new RegExp('(\\b(\\d{1,2}\.){2}(\\d{2}|\\d{4})\\b){1}|(\\b(\\d{1,2}\\.)(\\d{1,2})|(\\d{4})\\b){1}|^('+this.weekDayRegex+')$','i');return sbbDateRegex.test($.trim(ds));},is_valid_date:function(d){if(Object.prototype.toString.call(d)==="[object Date]"){return!isNaN(d.getTime());}else{return false;}},extract_iso_date_from_euro_date:function(euro_date){var that=this,currDate=new Date(),day=0,month=0,year=0,v=euro_date.split('.');day=v[0]!==''?that.addLeadingZero(v[0]):that.addLeadingZero(currDate.getDate());month=typeof(v[1])!=='undefined'?that.addLeadingZero(v[1]):that.addLeadingZero(currDate.getMonth()+1);year=typeof(v[2])!=='undefined'?that.addLeadingZero(v[2]):currDate.getFullYear();return{"dd":day,"mm":month,"yyyy":year};},extract_iso_date_from_sbb_date:function(sbb_date){var that=this,currDate=new Date(),data_fragments=null,day=0,month=0,year=0,dateRegEx=null,weekDayFound=false;if(!that.is_valid_sbb_date(sbb_date)){return-1;}
dateRegEx=/\b(\d{1,2})\.(\d{1,2})\.(\d{2}|\d{4})\b|\b(\d{1,2})\.(\d{1,2})\b|\b(\d{2})(\d{2})\b|^([a-zA-Z]{2})$/;data_fragments=dateRegEx.exec($.trim(sbb_date));if(data_fragments!==null){if(typeof data_fragments[8]!=='undefined'&&data_fragments[8]!==''){var dayRegex=new RegExp(data_fragments[8],'i'),dayDiff=0;for(var i in that.locals.shortDays){if(dayRegex.test(that.locals.shortDays[i])){var newWeekDayDate=new Date();dayDiff=i-currDate.getDay();if(dayDiff<=0)dayDiff+=7;newWeekDayDate.setDate(currDate.getDate()+dayDiff);day=that.addLeadingZero(newWeekDayDate.getDate());month=that.addLeadingZero(newWeekDayDate.getMonth()+1);year=newWeekDayDate.getFullYear();weekDayFound=true;break;}}}
if(weekDayFound===false){if(typeof data_fragments[6]!=='undefined'&&data_fragments[6]!==''&&typeof data_fragments[7]!=='undefined'&&data_fragments[7]!==''){day=data_fragments[6];month=data_fragments[7];year=currDate.getFullYear().toString();}else{if(typeof data_fragments[1]!=='undefined'&&data_fragments[1]!==''){day=that.addLeadingZero(data_fragments[1]);}else if(typeof data_fragments[4]!=='undefined'&&data_fragments[4]!==''){day=that.addLeadingZero(data_fragments[4]);}else{day=that.addLeadingZero(currDate.getDate());}
if(typeof data_fragments[2]!=='undefined'&&data_fragments[2]!==''){month=that.addLeadingZero(data_fragments[2]);}else if(typeof data_fragments[5]!=='undefined'&&data_fragments[5]!==''){month=that.addLeadingZero(data_fragments[5]);}else{month=that.addLeadingZero(currDate.getMonth()+1);}
if(typeof data_fragments[3]!=='undefined'&&data_fragments[3]!==''){year=data_fragments[3];}else{year=currDate.getFullYear().toString();var currMonth=currDate.getMonth()+1;if((month<currMonth)||((month==currMonth)&&(day<currDate.getDate()))){year++;}}}}}
if(year.length===2){year=currDate.getFullYear().toString().substring(0,2)+year.toString();}
return{"dd":day,"mm":month,"yyyy":year};},extract_dateobject_from_sbb_date:function(sbb_date){var that=this,v=that.extract_iso_date_from_sbb_date(sbb_date);return new Date(v.yyyy,(v.mm-1),v.dd);},add_day:function($input,subtract){var that=this,add=1,dateinput=$input.data('dateinput'),date_value=dateinput.getValue();if(subtract&&subtract===true){add=-1;}
date_value.setDate(date_value.getDate()+add);dateinput.setValue(date_value);that.saveDate($input);that.add_min_max($input);},add_min_max:function($input,min,max){var dateinput=$input.data('dateinput');min=min||$input.data('minDate');max=max||$input.data('maxDate');if(typeof(dateinput)==='object'){if(typeof(min)!=="undefined"){$input.data('minDate',min);dateinput.setMin(min,true);}
if(typeof(max)!=="undefined"){$input.data('maxDate',max);dateinput.setMax(max,true);}}}};$.extend(SBB.datepicker,SBB.datepicker.helper);}(Nx.$));
(function($){(SBB.tooltip=function(){$.tools.tooltip.conf=$.extend({},$.tools.tooltip.conf,{layout:'<div><span class="lft">&nbsp;</span><span class="rgt">&nbsp;</span></div>',tipClass:'tooltipBox',onShow:function(){var $trigger=this.getTrigger();$trigger.parent().addClass('active');if($trigger.is('#fancybox-wrap *')){this.getTip().css('z-index','15000')}},onHide:function(){this.getTrigger().parent().removeClass('active');}});});}(Nx.$));
SBB.utils={randomInt:function(max,start){if(arguments.length<1){max=1;}
if(arguments.length<2){start=0;}
max-=start;return Math.round(Math.random()*max+start);}};(function($){SBB.utils.is_ie6=function(){return($.browser.msie&&$.browser.version==='6.0');};SBB.utils.is_ie7=function(){return($.browser.msie&&$.browser.version==='7.0');};SBB.utils.is_ie8=function(){return($.browser.msie&&$.browser.version==='8.0');};SBB.utils.is_older_ie9=function(){return($.browser.msie&&$.browser.version<'9');};}(Nx.$));
(function($){SBB.pagefooter=(function(){var is_ie6=($.browser.msie&&$.browser.version==='6.0'),is_i=(navigator.platform=='iPad'||navigator.platform=='iPhone'||navigator.platform=='iPod'),reposition_footer_ie6=null,reposition_footer_i=null,reposition=null,$window=$(window),fadeintime=400;reposition_footer_ie6=function($ctx){$ctx.css({'position':'absolute','top':$window.height()+$window.scrollTop()-$ctx.height()+'px'}).fadeIn(fadeintime);};reposition_footer_i=function($ctx){$ctx.css({'top':window.pageYOffset+window.innerHeight-$ctx.height()+'px'}).fadeIn(fadeintime);};reposition=function($ctx){if(is_ie6){$window.unbind('.sbb.pagefooter').bind('scroll.sbb.pagefooter resize.sbb.pagefooter',$.debounce(100,false,function(){reposition_footer_ie6($ctx);})).triggerHandler('scroll.sbb.pagefooter');}
else if(is_i){$window.unbind('.sbb.pagefooter').bind('scroll.sbb.pagefooter orientationchange.sbb.pagefooter',$.debounce(100,false,function(){reposition_footer_i($ctx);})).trigger('scroll.sbb.pagefooter');}
else{$ctx.fadeIn(fadeintime);}};return{'reposition':reposition};}());}(Nx.$));
(function($){SBB.ajax=function(opts){if(typeof(opts)==='undefined'){return false;}
this.ajax.ajaxCall(opts);return this.ajax;};$.extend(SBB.ajax,{modalWindow:function(message,opts){var o={},defaults={closeAuto:false,closeDelay:2000};opts=opts||{};if(typeof(message)==='undefined'){return false;}
o=$.extend({},defaults,opts);$.fancybox(message,{"scrolling":'no',"titleShow":false,"onComplete":function(){if(o.closeAuto){window.setTimeout($.fancybox.close,o.closeDelay);}}});},ajaxSuccess:function(data,status,xhr){var msg='<h2 class="base">Success</h2>'+data;SBB.ajax.modalWindow(msg,{closeAuto:true});},ajaxError:function(xhr,status,errorThrown){var msg='<h2 class="base">Error</h2>'+xhr.responseText;SBB.ajax.modalWindow(msg);},ajaxCall:function(options){var ajaxOpts={type:"GET",url:"",data:null,cache:false,async:true,timeout:50000,error:SBB.ajax.ajaxError,success:SBB.ajax.ajaxSuccess},ajaxEtxOpts=$.extend({},ajaxOpts,options);if(ajaxEtxOpts.url===""){return false;}
$.ajax(ajaxEtxOpts);},ajaxFormPost:function($form,options){if(typeof($form)!=="object"||!$form.length||!$form.is('form')){return false;}
var that=this,o={},method=$form.attr('method')||'post',ajaxFormPostOpts={url:$form.attr('action'),type:method,data:$form.serialize(),context:$form};options=options||{};o=$.extend({},ajaxFormPostOpts,options);that.ajaxCall(o);}});}(Nx.$));
(function($){SBB.formValidation={props:{classRequired:'errorItem',classConstraint:'errorItemConstraint',classFieldOverlay:'errorFieldOverlay',itemsForm:'input, select, textarea',itemsOverlayExcluded:'select, [type=radio], [type=checkbox], [type=file]',overlayOpacity:'0.2',overlayCursor:'text',prefixFieldWrapper:'wrapper_'},init:function(){var that=this;that.showOverlay($('.errorItem, .errorItemConstraint','form'));},fieldError:function(fieldName,constraint){var fName=fieldName||false,opts=this.props,constr=constraint||false;if(!fName||fName===''){return false;}
this.showOverlay($('#'+opts.prefixFieldWrapper+fName)[constr?'removeClass':'addClass'](opts.classRequired)[constr?'addClass':'removeClass'](opts.classConstraint));return $(fName);},showOverlay:function($fields){var $flds=$fields||false,opts=this.props,$formFields=null;if(!$flds||!$flds.length){return false;}
$formFields=$('*',$flds).filter(opts.itemsForm);$formFields.unbind('focusin.sbb.formvalidation').bind('focusin.sbb.formvalidation',function(){$(this).parents('.'+opts.classRequired+', .'+opts.classConstraint).removeClass(opts.classRequired+' '+opts.classConstraint);}).not(opts.itemsOverlayExcluded).each(function(){var $errField=$(this),$fieldOverlay=$('<div class="'+opts.classFieldOverlay+'"></div>');$fieldOverlay.css({opacity:opts.overlayOpacity,cursor:opts.overlayCursor,width:$errField.outerWidth(),height:$errField.outerHeight(),marginBottom:$errField.outerHeight()*(-1)});if($errField.parent().parent().hasClass('labelLeft')){$fieldOverlay.insertAfter($errField).css('marginBottom',0);}else{$fieldOverlay.insertBefore($errField);}
$fieldOverlay.unbind('mousedown.sbb.formvalidation').bind('mousedown.sbb.formvalidation',function(e){$errField.trigger('focusin').focus();}).siblings('.'+opts.classFieldOverlay).remove();});},resetForm:function(form){if(arguments.length===0||(typeof(form)!=='string')||form.length===0){return false;}
var opts=this.props;$('#'+form).find('.'+opts.classRequired+', .'+opts.classConstraint).removeClass(opts.classRequired+' '+opts.classConstraint);return $('#'+form);},showFormErrors:function(form){if(arguments.length===0||(typeof(form)!=='string')||form.length===0){return false;}
$('#'+form).trigger('showError');return $('#'+form);}};}(Nx.$));
(function($){SBB.Widgets.SbbClock={config:{"caller_that":null,"params_selector":'#paramsSbbClock',"module_name":'SbbClock',"additional_width":0},cache:{"module_html":''},initialize:function($ctx,caller_that){var that=this;that.config.caller_that=caller_that;$ctx.parent().click(function(){that.open_module({icon:"",name:""},that.config.module_name,that.get_param_by_name('module_url'),null,caller_that);return false;});},get_param_by_name:function(param_name){return SBB.Widgets.get_param_by_name.apply(this,arguments);},open_module:function(widget_data,module_name,module_url,module_data,caller_that,beforeOpen){SBB.Widgets.open_module.apply(this,arguments);}};}(Nx.$));
(function($){SBB.autoSuggest=function($input,$target,opts){if(typeof($.createTemplate)==="undefined"||typeof($input)!=="object"||!$input.length){return false;}
this.autoSuggest.init($input,$target,opts);return this.autoSuggest;};$.extend(SBB.autoSuggest,{defaults:{url:'',minLength:3,returnIfFirstCharIsNumber:false,inputNameUrl:'autoSuggestUrl',inputNameTemplateUrl:'autoSuggestTemplateUrl',navigateTag:'a',activeClass:'active',targetClass:'autoSuggest',enableKeys:{escape:true,enter:true,arrows:true,tab:true},enableHover:true,hideWhenNoRequest:true,keepClosedOnEscape:{keydown:true,focus:false},onShow:$.noop,onHide:$.noop,templateUrl:'',template:'{#if $T && $T.secondlevel}\n'+'<div class="modMegadropdownItem">\n'+'<div class="megadd_inner">\n'+'<div class="bd">\n'+'<div class="bordertop">\n'+'<div class="cornerlft"></div>\n'+'<div class="cornerrgt"></div>\n'+'</div>\n'+'{#foreach $T.secondlevel as scndlvl}\n'+'<ul class="submenu">\n'+'<li>\n'+'<strong class="secondlevel">{$T.scndlvl$key}</strong>\n'+'<ul>\n'+'{#foreach $T.scndlvl.thirdlevel.fourthlevel as thirdlvl}\n'+'<li>\n'+'<a href="{$T.thirdlvl}" title="{$T.thirdlvl$key}"><strong>{$T.thirdlvl$key}</strong></a>\n'+'</li>\n'+'{#/for}\n'+'</ul>\n'+'</li>\n'+'</ul>\n'+'{#/for}\n'+'{#if $T.allresults}\n'+'<a class="iconlink" href="{$T.allresults.href}" title="{$T.allresults.title}">\n'+'{$T.allresults.title}\n'+'</a>\n'+'{#/if}\n'+'</div>\n'+'</div>\n'+'</div>\n'+'{#/if}'},init:function($input,$target,opts){var that=this,$form=$input.parents('form');opts=opts||{};this.defaults=$.extend(true,this.defaults,opts);this.defaults.url=this.defaults.url===''?$('input[name='+this.defaults.inputNameUrl+']',$form).val():this.defaults.url;this.defaults.templateUrl=this.defaults.templateUrl===''?$('input[name='+this.defaults.inputNameTemplateUrl+']',$form).val():this.defaults.templateUrl;console.log(this.defaults.templateUrl);$target=typeof($target)!=='object'||!$target.length?$('<div class="'+this.defaults.targetClass+'"></div>"').insertAfter($input):$target;if(this.defaults.templateUrl!==''){$target.setTemplateURL(this.defaults.templateUrl);}else{$target.setTemplate(this.defaults.template);}
that.bindEvents($input,$target);},bindEvents:function($input,$target){var that=this,o=that.defaults,enableKeys=o.enableKeys;$input.attr('autocomplete','off').unbind('.sbb.autoSuggest').bind('keyup.sbb.autoSuggest',function(e){var $this=$(this),thisVal=$this.val(),escaped=($target.data('SBB.autoSuggest.escaped')&&o.keepClosedOnEscape.keydown)?true:false,firstCharNumber=(o.returnIfFirstCharIsNumber&&!isNaN(thisVal.substr(0,1)));if(e.keyCode===16){$target.data('SBB.autoSuggest.shiftKey',false);}
if(thisVal===''||thisVal.length<o.minLength||firstCharNumber||escaped){if(o.hideWhenNoRequest){that.hideTarget($target);}}else if(thisVal!==$this.data('curVal')){that.ajaxCall($input,$target);}
$this.data('curVal',thisVal);}).bind('keydown.sbb.autoSuggest',function(e){var $activeAnchor=null,key=e.keyCode,isOpen=$target.data('SBB.autoSuggest.isOpen');if(isOpen){if(key===27&&enableKeys.escape){that.hideTarget($target);$target.data('SBB.autoSuggest.escaped',true);return false;}
else if(key===13&&enableKeys.enter){$activeAnchor=$(o.navigateTag+'.'+o.activeClass,$target);if($activeAnchor.length){$activeAnchor.click();return false;}}
else if(key===38&&enableKeys.arrows){that.targetAnchorHover($target,-1);return false;}
else if(key===40&&enableKeys.arrows){that.targetAnchorHover($target);return false;}
else if(key===16){$target.data('SBB.autoSuggest.shiftKey',true);}
else if(key===9&&enableKeys.tab){if($target.data('SBB.autoSuggest.shiftKey')){that.targetAnchorHover($target,-1);}else{that.targetAnchorHover($target);}
return false;}}}).bind('focusin.sbb.autoSuggest',function(){var escaped=($target.data('SBB.autoSuggest.escaped')&&o.keepClosedOnEscape.focus)?true:false;if(!escaped){that.showTarget($input,$target);}}).bind('focusout.sbb.autoSuggest',function(){window.setTimeout(function(){that.hideTarget($target);},200);});},targetAnchorHover:function($target,dir){var that=this,anchors=$(that.defaults.navigateTag,$target),index=$target.data('SBB.autoSuggest.index');dir=typeof(dir)==='undefined'?index+1:dir;index=dir<0?index+dir:dir;if(index<0){index=anchors.length-1;}else if(index>=anchors.length){index=0;}
$target.data('SBB.autoSuggest.index',index);anchors.removeClass(that.defaults.activeClass).eq(index).addClass(that.defaults.activeClass);},bindAnchors:function($input,$target){var that=this,o=that.defaults,$anchors=$(o.navigateTag,$target);$target.data('SBB.autoSuggest.index',-1);$anchors.removeClass(o.activeClass).unbind('.sbb.autoSuggest').bind('click.sbb.autosuggest',function(){var $this=$(this);if(!$this.is('a[href]')||$this.is('a[href="#"]')||$this.is('a[href="'+window.location.href+'#"]')){$input.val($this.text()).parents('form').submit();}else{window.location.href=$this.attr('href');}
return false;});if(o.enableHover){$anchors.each(function(i){$(this).bind('mouseenter.sbb.autoSuggest',function(){that.targetAnchorHover($target,i);});});}},ajaxCall:function($input,$target){var that=this,o=that.defaults,ajaxIndex=$target.data('SBB.autoSuggest.ajaxIndex')+1||1;$target.data('SBB.autoSuggest.ajaxIndex',ajaxIndex);SBB.ajax({url:o.url,data:$input.parents('form').serialize(),type:'post',dataType:'json',context:$target,success:function(data){if($target.data('SBB.autoSuggest.ajaxIndex')===ajaxIndex){$target.processTemplate(data);that.showTarget($input,$target);}},error:$.noop});},showTarget:function($input,$target){var that=this,o=that.defaults;$target.data('SBB.autoSuggest.isOpen',true).data('SBB.autoSuggest.escaped',false).show();that.bindAnchors($input,$target);that.defaults.onShow();},hideTarget:function($target){var that=this;$target.data('SBB.autoSuggest.isOpen',false).unbind('.sbb.autoSuggest').hide();that.defaults.onShow();}});}(Nx.$));
(function($){Nx.Module.Sbb=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this,$page=$('body > div.page'),$ctx=that.$ctx,$window=$(window),winWidth=$window.width(),winHeight=$window.height(),resizeTimeout=null,largeScreenWidth=this.$ctx.data('largescreen')||1200;this.storedSelectors={$window:$window,$body:$('> div body',$page),$head:$('> div.head',$page),$foot:$('> div.foot',$page),$contentWrap:$('#Contents')};this.$ctx.data('largescreen',largeScreenWidth);SBB.pagefooter.reposition(this.storedSelectors.$foot);SBB.dateinput();SBB.formValidation.init();SBB.overlay();SBB.tooltip();if(!$ctx.hasClass('cq-wcm-edit')){that.vertical_align_home($ctx);$window.unbind('resize.sbb.verticalalign').bind('resize.sbb.verticalalign',$.debounce(100,false,function(){var winNewWidth=$window.width(),winNewHeight=$window.height();if(winWidth!==winNewWidth||winHeight!==winNewHeight){window.clearTimeout(resizeTimeout);resizeTimeout=window.setTimeout(function(){that.vertical_align_home($ctx);},10);that.min_width_content();}
winWidth=winNewWidth;winHeight=winNewHeight;}));that.min_width_content();if(!SBB.utils.is_ie7()&&!SBB.utils.is_ie6()){$window.trigger('resize.sbb.verticalalign');}}
if(SBB.utils.is_ie6()){$('#SBBWidgetContainer, div.modInteractionItem, a.interactionAnchor, div.modInteractionItem div.inner',this.storedSelectors.$foot).bgiframe();}},min_width_content:function(){this.$ctx[this.storedSelectors.$window.width()>this.$ctx.data('largescreen')?'addClass':'removeClass']('largeScreen');},vertical_align_home:function($ctx,callback){if(!$ctx.hasClass('layout-index')){return false;}
var storedSel=this.storedSelectors;$ctx.removeClass('contentMeasured');var viewable_max_height=storedSel.$window.height()-storedSel.$head.height()-storedSel.$foot.height(),$content_wrapper=storedSel.$contentWrap,content_height=$content_wrapper.height(),calculate_margin_top=null;storedSel.$body.css('min-height',content_height+'px');calculate_margin_top=function(){if(viewable_max_height<=content_height){return'0';}else{var margin_top=(Math.floor((viewable_max_height-content_height)/2));return margin_top>0?margin_top+'px':0;}};$content_wrapper.css('margin-top',calculate_margin_top());$ctx.addClass('contentMeasured');if(arguments.length>1&&$.isFunction(callback)){callback();}}});}(Nx.$));
(function($){Nx.Module.FooterInteraction=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this;$('li.footInteraction',this.$ctx).mouseover(function(){$(this).addClass('footInteractionHover');return false;});$('li.footInteraction',this.$ctx).mouseout(function(){$(this).removeClass('footInteractionHover');return false;});$('.lineFootInteraction',this.$ctx).delegate('.hd','click',function(e){var $mod=$(this).closest('.mod'),module=null;if(!$mod.data('initialized')){$mod.data('initialized',true);var $wrapper=$mod.closest('.footInteraction');var modules=that.sandbox.addModules($wrapper);module=modules[0];}
else{module=that.sandbox.getModuleById($mod.data('id'));}
module.toggleExpanded();return false;});}});}(Nx.$));
(function($){Nx.Module.SocialMedia=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this;$('.sendtofriend',this.$ctx).unbind('click.sbb.sendtofriend').bind('click.sbb.sendtofriend',function(){$.fancybox({'href':$(this).attr('href'),'ajax':{'cache':false},'titleShow':false,'scrolling':'no','autoScale':false,'onComplete':function(links,index){var clicked_element=$(links[index]);if(SBB.utils.is_ie6()){document.body.className=document.body.className;}
SBB.overlay.overlayBinding();}});return false;});$('a',this.$ctx).not('.sharingList a').tooltip({onBeforeShow:function(){var $anchor=this.getTrigger();if($anchor.is('.share')){this.getTip().addClass('tooltipBoxBig').append($anchor.siblings());}}});},afterBinding:function(){var that=this;if(location.href.indexOf('?mail')!==-1){$('a.sendtofriend',that.$ctx).trigger('click');}}});}(Nx.$));
(function($){Nx.Module.Survey=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this,cookiesAvailable=$.cookies.test();if(cookiesAvailable&&$('#modSurveyForm',that.$ctx).length){that.openSurveyOverlay();}
if($('#modSurveyUserActions',that.$ctx).length){that.bindSurveyUserActions();}},openSurveyOverlay:function(){var that=this,$surveyForm=$('#modSurveyForm',that.$ctx),surveyAction=$surveyForm.attr('action'),cookieNameSurveyNo=$('input[name=cookieNameSurveyNo]',$surveyForm).val(),cookieSurveyNo=function(){return $.cookies.get(cookieNameSurveyNo);},cookieSurveyNever=function(){return $.cookies.get($('input[name=cookieNameSurveyNever]',$surveyForm).val());},cookieSurveyDone=function(){return $.cookies.get($('input[name=cookieNameSurveyDone]',$surveyForm).val());};if(!cookieSurveyNo()&&!cookieSurveyNever()&&!cookieSurveyDone()){SBB.ajax({url:surveyAction,data:$surveyForm.serialize(),type:$surveyForm.attr('method'),success:function($data){$.fancybox({'content':$data,'onComplete':function(){that.sandbox.addModules($('#fancybox-content'));if(SBB.utils.is_ie6()){document.body.className=document.body.className;}},'onClosed':function(){if(!cookieSurveyNo()&&!cookieSurveyNever()&&!cookieSurveyDone()){$.cookies.set(cookieNameSurveyNo,'true');}}});},error:function(){}});}},bindSurveyUserActions:function(){var that=this,$surveyForm=$('#modSurveyUserActions',that.$ctx),cookieSurveyNo=$('input[name=cookieNameSurveyNo]',$surveyForm).val(),cookieSurveyNever=$('input[name=cookieNameSurveyNever]',$surveyForm).val(),cookieSurveyDone=$('input[name=cookieNameSurveyDone]',$surveyForm).val();$('button',$surveyForm).unbind('click.sbb.surveyform').bind('click.sbb.surveyform',function(e){var $this=$(this);e.preventDefault();switch($this.attr('name')){case'surveyNo':$.cookies.set(cookieSurveyNo,'true');break;case'surveyNever':$.cookies.set(cookieSurveyNever,'true',{expiresAt:new Date(2099,1,1)});break;case'surveyYes':$.cookies.set(cookieSurveyDone,'true',{expiresAt:new Date(2099,1,1)});if($surveyForm.data('popup')==true){var formGetUrl=$surveyForm.attr('action')+'?'+$surveyForm.serialize(),popupName=$surveyForm.data('popupname')||'sbb_survey',popupStyle=$surveyForm.data('popupstyle')||'';window.open(formGetUrl,popupName,popupStyle);}
break;}
$.fancybox.close();}).filter(':last').focus();}});})(Nx.$);
(function($){Nx.Module.DateInput=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this;SBB.datepicker(that.$ctx.find('div.bd'));}});})(Nx.$);
(function($){Nx.Module.InteractionItem=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},toggleExpanded:function(){var that=this,$siblings=null,$parent=null,i=0,len=0;if(that.$ctx.hasClass('interactionItemExpanded')===true){that.$ctx.removeClass('interactionItemExpanded').parent().removeClass('footInteractionExpanded');that.closeInteractionItem();}
else{$parent=that.$ctx.parent();$siblings=$parent.siblings('li.footInteractionExpanded').find('div.modInteractionItem');$siblings.each(function(){that.closeInteractionItem($(this));});$parent.siblings('.footInteraction').removeClass('footInteractionExpanded').find('.modInteractionItem').removeClass('interactionItemExpanded');that.$ctx.addClass('interactionItemExpanded').parent().addClass('footInteractionExpanded');if(SBB.utils.is_ie6()){var height=that.$ctx.addClass('outerHeight').outerHeight();that.$ctx.removeClass('outerHeight');that.$ctx.css('top','-'+(height-28)+'px');}
that.openInteractionItem();}},openInteractionItem:function(){var that=this,$ctx=that.$ctx;if(arguments.length===1){$ctx=arguments[0];}
$ctx.data('isExpanded',true);$('.hd',$ctx).trigger('openItemSkin');},closeInteractionItem:function(){var that=this,$ctx=that.$ctx;if(arguments.length===1){$ctx=arguments[0];}
$ctx.data('isExpanded',false);$('.hd',$ctx).trigger('closeItemSkin');}});})(Nx.$);
(function($){Nx.Module.Dsds=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Dsds.prototype=new Nx.Module();Nx.Module.Dsds.prototype.constructor=Nx.Module.Dsds;$.extend(Nx.Module.Dsds.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.ImageTextRight=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this,$overlayObjs=$('a.img',that.$ctx);$overlayObjs.unbind('click.sbb.imagetextright').bind('click.sbb.imagetextright',function(){$.fancybox({'href':$(this).attr('href'),'titleFormat':function(title,currentArray,currentIndex){return $('<div class="media"></div>').append($overlayObjs.eq(currentIndex).siblings('.bd').clone());}});return false;});}});})(Nx.$);
(function($){Nx.Module.Accordion=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this;$('.expandableHead',that.$ctx).live('mouseenter',function(){$('h2',this).not('.expanded').addClass('hover');}).live('mouseleave',function(){$('h2',this).not('.expanded').removeClass('hover');});that.initAccordion();},initAccordion:function(){var that=this;that.$ctx.tabs($(".expandableElmt div.expandableBody",that.$ctx),{tabs:'.expandableHead h2',current:'expanded',initialIndex:(function(){var index=0;$('.expandableHead h2',that.$ctx).each(function(i){if($(this).is('.expanded'))index=i;});return that.$ctx.hasClass('tabsInitialIndexNull')?null:index;}()),effect:'slide',onBeforeClick:function(obj,index){var accordion=this;this.getTabs().removeClass('hover');this.getPanes().eq(index).removeClass('inactiveAccordion');$('.includeInAccordion',that.$ctx).each(function(){if($(this).is(':visible')&&$(this).is('.hideOnPageLoad')){$('a[href=#'+$(this).attr('id')+']').has('.expanded').trigger('click.sbb');$(this).hide();}});$('.triggerInAccordion',that.$ctx).removeClass('expanded').unbind('click.sbb.accordion').bind('click.sbb.accordion',function(){accordion.destroy();$(this).addClass('expanded');that.initAccordion();});},onClick:function(obj,index){this.getPanes().removeClass('inactiveAccordion').not(':eq('+index+')').addClass('inactiveAccordion');$('.includeInAccordion',that.$ctx).each(function(){if(!$(this).is('.hideOnPageLoad')){$(this).css('display','block').addClass('hideOnPageLoad');}});}});$('.expandableHead h2',that.$ctx).not('.expanded').parent().siblings('.expandableBody').hide();}});})(Nx.$);
(function($){Nx.Module.Table=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this;$('a.helpicon',that.$ctx).tooltip();}});})(Nx.$);
(function($){Nx.Module.MyConnections=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this,$addconnection=null,$addconnection_form=null,connection_validation_url='';that.$ctx.data('terrific',that);$addconnection=$('div.bdAddConnection',that.$ctx);$addconnection_form=$('form',$addconnection);connection_validation_url=SBB.Widgets.MyConnections.get_param_by_name('connection_validation_url');that.$ctx.parents('div.modSbbWidget').removeClass('skinSbbWidgetTimetable');$('button',$addconnection_form).click(function(){dcsMultiTrack('wt_fp_request','sbb_widget','WT.i_event_cat','fpl_abfrage','WT.i_event_act','verbindung_suchenmult');var form_data=null,form_data_object=null,connection_data=null;form_data=$addconnection_form.serializeArray();form_data_object={from:form_data[0].value,to:form_data[1].value,via:form_data[2].value,name:form_data[3].value};that.validate_connection_data(form_data_object,connection_validation_url,function(response,validates,connection_data){var item=null,dropdown_html='',$temporary_container=null,connection_name=$.trim(connection_data.name),connection_name_input_name='widgettitle',$this_line=null;if(connection_name.length===0){$temporary_container=$("<div/>");$temporary_container.setTemplateElement("template_refine_label");$temporary_container.processTemplate({"refine_label_for":'RefineConnection_'+connection_name_input_name});$this_line=$('input[name="'+connection_name_input_name+'"]').closest('div.line');if($this_line.prev('div.lineRefine').length>0){$this_line.prev('div.lineRefine').replaceWith($temporary_container.html());}else{$this_line.before($temporary_container.html());}}else{$('input[name="'+connection_name_input_name+'"]').closest('div.line').prev('div.lineRefine').remove();}
for(item in response){if(response[item].alternative&&response[item].alternative instanceof Array){dropdown_html=that.buildRefineDropdown(response[item].alternative,item);if($('select[name="'+item+'"]').length>0){$('select[name="'+item+'"]').replaceWith(dropdown_html);}else{$('input[name="'+item+'"]').before(dropdown_html);}
$('input[name="'+item+'"]').attr('disabled','true').hide();$temporary_container=$("<div/>");$temporary_container.setTemplateElement("template_refine_label");$temporary_container.processTemplate({"refine_label_for":'RefineConnection_'+item});$this_line=$('select[name="'+item+'"]').closest('div.line');if($this_line.prev('div.lineRefine').length>0){$this_line.prev('div.lineRefine').replaceWith($temporary_container.html());}else{$this_line.before($temporary_container.html());}}else if(response[item].value&&response[item].value.length>0){if($('select[name="'+item+'"]').length>0){$('select[name="'+item+'"]').remove();}
$('input[name="'+item+'"]').attr('disabled',null).attr('readonly','readonly').addClass('refineInputAsLabel').val(response[item].value).show().closest('div.line').prev('div.lineRefine').remove();}else if(item==='to'||item==='from'){$temporary_container=$("<div/>");$temporary_container.setTemplateElement("template_refine_label");$temporary_container.processTemplate({"refine_label_for":'RefineConnection_'+item});$this_line=$('input[name="'+item+'"]').closest('div.line');if($this_line.prev('div.lineRefine').length>0){$this_line.prev('div.lineRefine').replaceWith($temporary_container.html());}else{$this_line.before($temporary_container.html());}}}
if(validates){that.resetAddConnectionForm();connection_data=SBB.Widgets.MyConnections.struct_connection_data(response.from,response.to,response.via,form_data_object.name);if(SBB.Widgets.MyConnections.is_cookie_available()){if(that.issetConnectionData()){that.updateConnection(connection_data,that.getCurrentConnectionIndex());}else{that.addConnection(connection_data);}}
that.showConnectionTimetable(connection_data);}});return false;});$('div.inner',that.$ctx).delegate('#removeMyConnectionConnection','click',function(e){var index=that.getCurrentConnectionIndex();that.removeConnection(index,function(){$.fancybox.close();that.removeConnectionItemByIndex(index);});return false;});$('div.inner',that.$ctx).delegate('#updateMyConnectionConnection','click',function(e){that.showConnectionAddConnection(that.$ctx.data('myconnection'));return false;});},resetAddConnectionForm:function(callback){var that=this,$addconnection=$('div.bdAddConnection',that.$ctx),$addconnection_form=$('form',$addconnection);$addconnection_form.find('input').each(function(){$(this).removeClass('refineInputAsLabel').removeAttr('readonly').removeAttr('disabled').val('').show().closest('div.line').prev('div.lineRefine').remove();});if($.isFunction(callback)){callback();}},getCurrentConnectionIndex:function(){return this.$ctx.data('connection_index');},removeConnectionItemByIndex:function(index){$('a.myconnection-sbbWidgetItem:eq('+index+')','#SBBWidgetContainer').parent().remove();},issetConnectionData:function(){var that=this;return(typeof(that.$ctx.data('myconnection'))!=='undefined');},updateConnectionMessage:function(connection_data){var $temporary_container=$("<div/>"),temp_html='';$temporary_container.setTemplateElement("template_Myconnection");$temporary_container.processTemplate({"connection_data":connection_data});temp_html=$temporary_container.html();$('#Myconnection_connection_message').html(temp_html);$.fancybox.center();},prepareConnectionAddConnection:function(callback){var that=this,$bd=$('div.bdAddConnection',that.$ctx),$sbbwidget=that.$ctx.closest('div.modSbbWidget');that.$ctx.children().children('div.bd:not(.bdAddConnection)').addClass('bdHidden');$bd.removeClass('bdHidden');if($.isFunction(callback)){callback();}},prepareConnectionTimetable:function(connection_data,callback){var that=this,$bd=$('div.bdTimetable',that.$ctx),$sbbwidget=that.$ctx.closest('div.modSbbWidget');$sbbwidget.addClass('skinSbbWidgetTimetable');that.$ctx.children().children('div.bd:not(.bdTimetable)').addClass('bdHidden');$bd.removeClass('bdHidden');$('div.widget-name',$sbbwidget).text(connection_data.name);if($.isFunction(callback)){callback();}},showConnectionTimetable:function(connection_data){var that=this,$bd=$('div.bdTimetable',that.$ctx),$sbbwidget=that.$ctx.closest('div.modSbbWidget');$sbbwidget.addClass('skinSbbWidgetTimetable');that.$ctx.children().children('div.bd:not(.bdTimetable)').addClass('bdHidden');$bd.removeClass('bdHidden');$.fancybox.resize();$.fancybox.center();SBB.Widgets.fancyboxResizeWidth($('div.bdTimetable',that.$ctx),SBB.Widgets.MyConnections.config.additional_width);$('div.widget-name',$sbbwidget).text(connection_data.name);try{that.updateConnectionMessage(connection_data);}catch(e){}
SBB.Widgets.MyConnections.fetchFirstConnectionTimetableData({"from":connection_data.from.id,"to":connection_data.to.id,"via":connection_data.via.id},function(response){that.fetchConnectionTimetableDataResponse(response);});},set_conresctxt:function(conresctxt){var that=this;$('div.bdTimetable',that.$ctx).data('conresctxt',conresctxt);},get_conresctxt:function(){var that=this;return $('div.bdTimetable',that.$ctx).data('conresctxt');},showConnectionAddConnection:function(connection_data,callback){var that=this,$addconnection=null,$addconnection_form=null;that.$ctx.parents('div.modSbbWidget').removeClass('skinSbbWidgetTimetable');that.$ctx.children().children('div.bd:not(.bdAddConnection)').addClass('bdHidden');$('div.bdAddConnection',that.$ctx).removeClass('bdHidden');SBB.Widgets.fancyboxResizeWidth($('div.bdAddConnection',that.$ctx),SBB.Widgets.MyConnections.config.additional_width);SBB.Widgets.fancyboxResizeHeight($('div.bdAddConnection',that.$ctx));if(connection_data){$addconnection=$('div.bdAddConnection',that.$ctx);$addconnection_form=$('form',$addconnection);$('input[name="from"]',$addconnection_form).val(connection_data.from.value);$('input[name="to"]',$addconnection_form).val(connection_data.to.value);$('input[name="via"]',$addconnection_form).val(connection_data.via.value);$('input[name="widgettitle"]',$addconnection_form).val(connection_data.name);}
if($.isFunction(callback)){callback();}},showConnectionMessage:function(message,callback){var that=this;that.$ctx.children().children('div.bd:not(.bdMessage)').addClass('bdHidden');$('div.bdMessage',that.$ctx).removeClass('bdHidden').find('p.message').html(message);if(SBB.utils.is_ie7()){SBB.Widgets.fancyboxResizeWidth($('div.bdMessage',that.$ctx),SBB.Widgets.MyConnections.config.additional_width);}
if($.isFunction(callback)){callback();}},addConnection:function(connection_data,callback){var that=this,cookie_val={"connections":[]},connections_length=0,$element_to_clone=null,cookie_name=SBB.Widgets.MyConnections.config.cookie_name,setCookieOptions=SBB.Widgets.MyConnections.config.cookie_options,max_connections_length=SBB.Widgets.MyConnections.config.maximum_connections;if($.cookies.get(cookie_name)){cookie_val=$.cookies.get(cookie_name);connections_length=cookie_val.connections.length;}
if(connections_length===max_connections_length){SBB.Widgets.MyConnections.show_cannot_add_anymore_connections_warning();return false;}
cookie_val.connections.push(connection_data);$.cookies.set(cookie_name,cookie_val,setCookieOptions);that.updateConnectionData(connection_data);that.$ctx.data('connection_index',connections_length);$element_to_clone=$('a.myconnection-sbbWidgetItem:last','#SBBWidgetContainer').parent();if($element_to_clone.length===0){$element_to_clone=$('a.addconnection-sbbWidgetItem:first','#SBBWidgetContainer').parent();}
SBB.Widgets.MyConnections.create_connection_items(connection_data,$element_to_clone,that);if($.isFunction(callback)){callback();}},removeConnection:function(index,callback){var cookie_name=SBB.Widgets.MyConnections.config.cookie_name,setCookieOptions=SBB.Widgets.MyConnections.config.cookie_options,cookie_val=null;if($.cookies.get(cookie_name)){cookie_val=$.cookies.get(cookie_name);}
if(cookie_val.connections[index]){cookie_val.connections.splice(index,1);$.cookies.set(cookie_name,cookie_val,setCookieOptions);}
if($.isFunction(callback)){callback();}},validate_connection_data:function(connection_data,url,callback){$.fancybox.showActivity();$.ajax({url:url,data:$.param(connection_data),success:function(response){$.fancybox.hideActivity();var validates=true,item=null;for(item in response){if(response.hasOwnProperty(item)){if(response[item].alternative&&(response[item].alternative instanceof Array)){validates=false;}
if((item==='to'||item==='from')&&response[item].value.length===0){validates=false;}}}
if($.trim(connection_data.name).length===0){validates=false;}
if($.isFunction(callback)){callback(response,validates,connection_data);}},dataType:'json',type:'POST'});},buildRefineDropdown:function(data,name){var html='',i=0,len=0;html+='<select class="base" name="'+name+'" id="RefineConnection_'+name+'">';for(i=0,len=data.length;i<len;i++){html+='<option>'+data[i].value+'</option>';}
html+='</select>';return html;},buildConnectionTimetable:function(data,callback){var that=this,$container=$('div.bd:first','#Myconnection_timetable'),new_height='';$container.setTemplateElement("template_Myconnection_timetable");$container.processTemplate({"table_rows":data});new_height=that.$ctx.closest('div.modSbbWidget').height();$('#fancybox-wrap').height(new_height);$('#fancybox-content').height(new_height);if($.isFunction(callback)){callback();}},buildAttentionItems:function(data,callback){var that=this,transfer_data=[],i=0,len=0,temp_html='';for(i=0,len=data.length;i<len;i++){if(data[i].transfer&&data[i].transfer.infotext&&data[i].transfer.infotext.length>0){transfer_data.push($.trim(data[i].transfer.infotext));}}
if(transfer_data.length>0){$('div.lineAttention',that.$ctx).addClass('showAttentionContents');var $container=$('div.AttentionItems',that.$ctx);$container.setTemplateElement('template_Myconnection_AttentionItems');$container.processTemplate({"transfer_data":transfer_data});$container.removeTemplate();var new_height=that.$ctx.closest('div.modSbbWidget').height();$('#fancybox-wrap').height(new_height);$('#fancybox-content').height(new_height);}
if($.isFunction(callback)){callback();}
return true;},bindTimetableControls:function(){var that=this;$('div.inner',that.$ctx).undelegate('#MyConnectionEarlier','click');$('div.inner',that.$ctx).delegate('#MyConnectionEarlier','click',function(e){SBB.Widgets.MyConnections.fetchMoreConnectionTimetableData({"conresctxt":that.get_conresctxt(),"navigation":"previous"},function(response){that.fetchConnectionTimetableDataResponse(response);});return false;});$('div.inner',that.$ctx).undelegate('#MyConnectionLater','click');$('div.inner',that.$ctx).delegate('#MyConnectionLater','click',function(e){SBB.Widgets.MyConnections.fetchMoreConnectionTimetableData({"conresctxt":that.get_conresctxt(),"navigation":"next"},function(response){that.fetchConnectionTimetableDataResponse(response);});return false;});},fetchConnectionTimetableDataResponse:function(response){var that=this,conresctxt=response.conresctxt,detail_url=response.detail_url,result=response.result;$('#MyConnectionDetails').attr('href',detail_url);that.set_conresctxt(conresctxt);that.buildConnectionTimetable(result);that.buildAttentionItems(result);that.bindTimetableControls();setTimeout(function(){$.fancybox.resize();$.fancybox.center();},0);},prepareWidget:function(module_data,$sbbWidget,callback){var that=this,run_once_callback=null;if(!$.isFunction(callback)){run_once_callback=function(){};}else{run_once_callback=function(){callback();run_once_callback=function(){};};}
if(module_data!==null){if(module_data.message&&module_data.message===true){that.showConnectionMessage(SBB.Widgets.MyConnections.get_param_by_name('cannot_add_anymore_connections_warning'),function(){run_once_callback();});}else if(module_data.connection_index!==null){that.$ctx.data('connection_index',module_data.connection_index);that.updateConnectionData(module_data.myconnection);that.prepareConnectionTimetable(module_data.myconnection,function(){run_once_callback();});}}
run_once_callback();},updateConnection:function(connection_data,index,callback){var that=this,cookie_val={"connections":[]},connections_length=0,$element=null,cookie_name=SBB.Widgets.MyConnections.config.cookie_name,setCookieOptions=SBB.Widgets.MyConnections.config.cookie_options;if($.cookies.get(cookie_name)){cookie_val=$.cookies.get(cookie_name);connections_length=cookie_val.connections.length;}
cookie_val.connections[that.$ctx.data('connection_index')]=connection_data;$.cookies.set(cookie_name,cookie_val,setCookieOptions);that.updateConnectionData(connection_data);$element=$('a.myconnection-sbbWidgetItem:eq('+index+')','#SBBWidgetContainer').parent();SBB.Widgets.MyConnections.update_connection_item(connection_data,$element,that);if($.isFunction(callback)){callback();}},updateConnectionData:function(connection_data){var that=this;that.$ctx.data('myconnection',connection_data);},widgetLoaded:function(){var that=this;if(!SBB.Widgets.MyConnections.is_cookie_available()){$('#updateMyConnectionConnection').hide();$('#removeMyConnectionConnection').hide();}
if(that.$ctx.data('myconnection')){that.updateConnectionMessage(that.$ctx.data('myconnection'));SBB.Widgets.MyConnections.fetchFirstConnectionTimetableData({"from":that.$ctx.data('myconnection').from.id,"to":that.$ctx.data('myconnection').to.id,"via":that.$ctx.data('myconnection').via.id},function(response){that.fetchConnectionTimetableDataResponse(response);});if(SBB.utils.is_ie6()){SBB.Widgets.fancyboxResizeWidth($('div.bdTimetable',that.$ctx),SBB.Widgets.MyConnections.config.additional_width);}}else{if(SBB.utils.is_ie6()){SBB.Widgets.fancyboxResizeWidth($('div.bdAddConnection',that.$ctx),SBB.Widgets.MyConnections.config.additional_width);}}
$.fancybox.resize();}});}(Nx.$));
(function($){Nx.Module.MainNavigation=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this,config=null,focus=0,$topLevelItems=null,$topLevelItemsLink=null,$submenu_item=null,clearTimer=null,hide_navigation=null,hide_on_page_click=null,is_hovered=null,margin_right=null,margin_left=null,last_topLevelItemsLink_keydown=null,megadropdown_inner_mouseout=null,megadropdown_inner_mouseout_action=null,megadropdown_mouseout=null,megadropdown_width=null,remove_focus_from_other_inputs=null,topLevelItems_timer=null,submenu_item_width=null,myParseInt=null,myRound=null,set_megadropdown_width=null,timer=null,topLevelItems_mouseover=null,topLevelItems_focus=null,topLevelItems_blur=null,topLevelItemsLink_keydown=null,topLevelItems_mouseout=null,topLevelItems_mouseover_action=null,triggerHide=null,triggerShow=null,$fahrplan_input=$('input[type="text"]','#fahrplanSuche').add('#from, #to, #via1, #home_date, #hfs_time');config={'disableHover':false};if(navigator.platform=='iPad'||navigator.platform=='iPhone'||navigator.platform=='iPod')return false;myParseInt=function(value){return parseInt(value,10);};myRound=function(value){return Math.round(value);};is_hovered=function(){if(arguments.length===1){return(arguments[0].filter('.hover').length>0);}else{return($('ul.rootmenu > li.hover',that.$ctx).length>0);}};hide_navigation=function(){if(arguments.length===1){arguments[0].filter('.hover').removeClass('hover');}else{$('ul.rootmenu > li.hover',that.$ctx).removeClass('hover');}
return true;};triggerHide=function(){};triggerShow=function(){remove_focus_from_other_inputs();};if(SBB.utils.is_ie6()){$('div.megadropdown div.megadd_inner div.bd',that.$ctx).bgiframe();}
remove_focus_from_other_inputs=function(){if($fahrplan_input.length>0){$fahrplan_input.blur();}};$('div.lineMetaNavLogo').mouseover(function(){hide_navigation();triggerHide();});$topLevelItems=$('ul.rootmenu > li',that.$ctx).not('.skinMainNavigationSitemap li');$topLevelItemsLink=$('a.toplevel',that.$ctx);$submenu_item=$('ul.submenu:first > li:first',that.$ctx).not('.skinMainNavigationSitemap li');margin_right=myParseInt($submenu_item.css('margin-right'));margin_left=myParseInt($submenu_item.css('margin-left'));submenu_item_width=margin_left+margin_right+myParseInt($submenu_item.outerWidth());megadropdown_width=function(n){return n*submenu_item_width-margin_right;};set_megadropdown_width=function(){var children=$(this).children('li').length;$(this).closest('.megadropdown').width(megadropdown_width(children)+'px');};$('ul.submenu',that.$ctx).each(function(){set_megadropdown_width.apply(this);});if(config.disableHover!==true){timer=null;clearTimer=function(){if(timer){clearTimeout(timer);timer=null;}};topLevelItems_mouseover_action=function($this){$this.addClass('hover');triggerShow();};topLevelItems_mouseover=function(){var $this=$(this);clearTimer();timer=setTimeout(function(){topLevelItems_mouseover_action($this);},200);hide_navigation($topLevelItems.not($this));};topLevelItems_mouseout=function(e){var $this=$(this);if(!is_hovered($this)){clearTimer();return true;}
if(!(e.pageY>(myRound($this.offset().top+$this.outerHeight())))||e.pageX<$topLevelItems.filter(':first').offset().left){hide_navigation($this);triggerHide();}};$topLevelItems.hover(function(){topLevelItems_mouseover.apply(this);},function(e){topLevelItems_mouseout.call(this,e);});topLevelItems_focus=function(){var $this=$(this).closest('li');$topLevelItems.not($this).removeClass('hover');$this.addClass('hover');triggerShow();};$('a.toplevel',$topLevelItems).focus(function(){topLevelItems_focus.apply(this);});topLevelItems_blur=function(){var $this=$(this).closest('li');$this.removeClass('hover');triggerHide();};$('a.toplevel',$topLevelItems).blur(function(){topLevelItems_blur.apply(this);});megadropdown_inner_mouseout_action=function($this){if(!is_hovered($this.parents('li'))){return true;}
hide_navigation($this.parents('li'));triggerHide();};megadropdown_inner_mouseout=function(e){var $this=$(this);if(!(e.pageY<myRound($this.offset().top))){setTimeout(function(){megadropdown_inner_mouseout_action.call(this,$this);},200);}
return false;};megadropdown_mouseout=function(e){this.$ctx=$(this).parents('li');if(!is_hovered(this.$ctx)){return true;}
var this_x=$(this).offset().left;if(e.pageX<this_x||e.pageX>(this_x+$(this).outerWidth())){hide_navigation(this.$ctx);triggerHide();}};$('.megadd_inner>.bd',that.$ctx).hover(function(){topLevelItems_timer=null;},function(e){megadropdown_inner_mouseout.apply(this,arguments);});$('div.megadropdown',that.$ctx).mouseout(function(e){megadropdown_mouseout.apply(this,arguments);});}
hide_on_page_click=function(e){if(!is_hovered($topLevelItems)){return true;}
if(!($(e.target).is('.megadd_inner>.bd',that.$ctx)||$(e.target).closest('.megadd_inner>.bd').length===1||$(e.target).is('a.toplevel'))){hide_navigation($topLevelItems);triggerHide();}};$('div.page').delegate('*','click',function(e){hide_on_page_click.apply(this,arguments);});}});}(Nx.$));
(function($){Nx.Module.SbbClock=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this;that.$ctx.data('terrific',that);},prepareWidget:function(module_data,$sbbWidget,callback){var that=this;if($.isFunction(callback)){callback();}},widgetLoaded:function(module_data){var that=this;SBB.Widgets.fancyboxResizeWidth($('div.bd',that.$ctx),SBB.Widgets.SbbClock.config.additional_width);}});}(Nx.$));
(function($){Nx.Module.CampaignCarousselItem=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);}});}(Nx.$));
(function($){Nx.Module.CampaignCaroussel=Nx.Module.extend({init:function($ctx,sandbox,modId){this._super($ctx,sandbox,modId);},onBinding:function(){var that=this,$ctx=$('div.carousel',this.$ctx),$document=$(document);if($('body.cq-wcm-edit').length===0){that.buildCarousel();$document.bind('activeElement.campaigncarousel',function(e,$currentElement,$oldElement){var $mod=$('.modCampaignCarousselItem',$currentElement);if(!$mod.data('initialized')){$mod.data('initialized',true);var modules=that.sandbox.addModules($currentElement);module=modules[0];}
else{module=that.sandbox.getModuleById($mod.data('id'));}
module.activate();var oldModule=that.sandbox.getModuleById($('.modCampaignCarousselItem',$oldElement).data('id'));oldModule.deactivate();if(SBB.utils.is_older_ie9()){$('div.container',$ctx).css({'filter':'','z-index':''});}}).bind('carouselItemHeightChanged.campaigncarousel',function(e,data){$ctx.height(data.height);}).bind('animationBefore.campaigncarousel',function(e){$ctx.css('height','');$('div.container',$ctx).addClass('mod-c-no-background');}).bind('animationComplete.campaigncarousel',function(e){$('div.container',$ctx).css('filter','');$('div.container',$ctx).removeClass('mod-c-no-background');});}},buildCarousel:function(){var that=this,$carousel=null,$carousel_items=null,fireActiveElement=null,is_animation_in_progress=false,CONST=null,carousselItemClickAction=null,carousselLeftItemAction=null,carousselLoadedAction=null,carousselRightItemAction=null,carousel_items_selector='',changePerspective=null,getAnimationProgress=null,init=null,initW=0,initH=0,initWS=0,initHS=0
setAnimationProgress=null,settings=null,transit=null,triggerRepaintAndReflow=null;$carousel=$('div.carousel',that.$ctx);that.carouselItems=[];CONST={"NUMBER_OF_ELEMENTS":3};settings={container_width:$carousel.parent().width(),speed:350,easing:'swing',perspectiveZoom:75,sideOffset:231,topOffset:58,emClass:'container',secondaryOpacity:0.8,states:[],'afterload':function($carouselCtx){},'animationChange':function(){},'animationBefore':function(){},'order':[1,0,2]};carousel_items_selector='.'+settings.emClass;$carousel_items=$carousel.find(carousel_items_selector);if($carousel_items.length!==CONST.NUMBER_OF_ELEMENTS){throw new Error('There should be three carousel items.');}
if(settings.order.length===CONST.NUMBER_OF_ELEMENTS){(function(){for(var i=0,len=settings.order.length;i<len;i+=1){that.carouselItems[i]=$carousel_items[settings.order[i]];}}());}else{that.carouselItems=$carousel_items;}
initW=$(that.carouselItems[1]).width();initH=$(that.carouselItems[1]).height();changePerspective=function(value){return Math.round(value*settings.perspectiveZoom/100);};getAnimationProgress=function(){return is_animation_in_progress;};setAnimationProgress=function(state){is_animation_in_progress=state;};initWS=changePerspective(initW);initHS=changePerspective(initH);$carousel.animationComplete=function(callback){if($.isFunction(callback)){$(document).bind('animationComplete.campaigncarousel',function(e){callback(e);});}};$carousel.animationBefore=function(callback){if($.isFunction(callback)){$(document).bind('animationBefore.campaigncarousel',function(e){callback(e);});}};$carousel.animationBefore(function(){setAnimationProgress(true);});$carousel.animationComplete(function(){setAnimationProgress(false);});triggerRepaintAndReflow=function(){if(SBB.utils.is_ie6()){document.body.className=document.body.className;}};fireActiveElement=function($currentElement,$oldElement){$(document).trigger('activeElement.campaigncarousel',[$currentElement,$oldElement]);};settings.states=[{top:settings.topOffset,left:0,opacity:settings.secondaryOpacity},{top:0,left:settings.sideOffset,opacity:1},{top:settings.topOffset,left:settings.container_width-initW,opacity:settings.secondaryOpacity}];transit=function(direction){var animation_steps=3,current_animation_step=animation_steps,index_last_element=0,is_left_animation=direction===false,progressAnimationStep=null,removeAnimationStyles=null,$thatCarouselItems=$(that.carouselItems);index_last_element=CONST.NUMBER_OF_ELEMENTS-1;$(document).trigger('animationBefore.campaigncarousel');progressAnimationStep=function(){current_animation_step-=1;if(current_animation_step===0){$(document).trigger('animationComplete.campaigncarousel');current_animation_step=animation_steps;}};removeAnimationStyles=function($carousel_item){$carousel_item.removeAttr('style');};if(is_left_animation){$thatCarouselItems.filter('.mod-l').animate({'left':'231px','height':'400px','top':0,'opacity':1},settings.speed,settings.easing,function(){var $this=$(this),$old=$('.mod-c',$carousel);$this.removeClass('mod-l').addClass('mod-c');removeAnimationStyles($(this));progressAnimationStep();triggerRepaintAndReflow();fireActiveElement($this,$old);});$thatCarouselItems.filter('.mod-c').animate({'left':'462px','height':'267px','top':'58px','opacity':0.8,'paddingLeft':0,'marginLeft':0},settings.speed,settings.easing,function(){$(this).removeClass('mod-c').addClass('mod-r');removeAnimationStyles($(this));progressAnimationStep();});$thatCarouselItems.filter('.mod-r').animate({'left':0},settings.speed,settings.easing,function(){$(this).removeClass('mod-r').addClass('mod-l');removeAnimationStyles($(this));progressAnimationStep();});}else{$thatCarouselItems.filter('.mod-r').animate({'left':'231px','height':'400px','top':0,'opacity':1},settings.speed,settings.easing,function(){var $this=$(this),$old=$('.mod-c',$carousel);$this.removeClass('mod-r').addClass('mod-c');removeAnimationStyles($(this));progressAnimationStep();triggerRepaintAndReflow();fireActiveElement($this,$old);});$thatCarouselItems.filter('.mod-c').animate({'left':0,'height':'267px','top':'58px','opacity':0.8,'paddingLeft':0,'marginLeft':0},settings.speed,settings.easing,function(){$(this).removeClass('mod-c').addClass('mod-l');removeAnimationStyles($(this));progressAnimationStep();});$thatCarouselItems.filter('.mod-l').animate({'left':'462px'},settings.speed,settings.easing,function(){$(this).removeClass('mod-l').addClass('mod-r');removeAnimationStyles($(this));progressAnimationStep();});}};carousselLeftItemAction=function(){transit(false);};carousselRightItemAction=function(){transit(true);};carousselItemClickAction=function(){var $this=$(this);if(getAnimationProgress()===true||$this.hasClass('mod-c')){return true;}
if($this.hasClass('mod-l')===true){carousselLeftItemAction();}else{carousselRightItemAction();}};carousselLoadedAction=function($ctx){if(SBB.utils.is_ie6()||SBB.utils.is_ie7()||SBB.utils.is_ie8()){$(carousel_items_selector,$carousel).css('filter','');}
settings.afterload($(this));};init=function($ctx){$ctx.parents('.bdCampaignCaroussel').addClass('bdCampaignCarousselWithShadow');var $imgOverlays=$ctx.find('img.overlay');$imgOverlays.click(function(e){if($(this).hasClass('overlay-mod-l')){carousselItemClickAction.apply($ctx.find('div.mod-l')[0]);}else if($(this).hasClass('overlay-mod-r')){carousselItemClickAction.apply($ctx.find('div.mod-r')[0]);}});if(SBB.utils.is_ie6()){$imgOverlays.attr('galleryimg','false');}
$(document).bind('loaded.campaigncarousel',function(){carousselLoadedAction.call(this,$ctx);});$(document).trigger('loaded.campaigncarousel');$carousel.animationBefore(settings.animationBefore);};init($carousel);}});}(Nx.$));
(function($){Nx.Module.InteractionItem.SBBWidgets=function(parent){this.onBinding=function(){var that=this,$widgets=$('#SBBWidgetContainer');$widgets.appendTo('.foot');var $sbbWidgets_listItems=$widgets.find('ul.listing-sbbWidgets li');$sbbWidgets_listItems.each(function(){var $this=$(this);var module_name=$.trim($('a:first',$this).attr('href').substring(1));if(SBB.Widgets[module_name]){SBB.Widgets[module_name].initialize($('a:first',$this),that);}});$('.hd',that.$ctx).bind('openItemSkin',function(){$widgets.toggleClass('expanded');return false;}).bind('closeItemSkin',function(){$widgets.toggleClass('expanded');return false;});};};}(Nx.$));
(function($){Nx.Module.InteractionItem.QuickSearch=function(parent){this.fancyboxcache={'opacity':'','z-index':''};this.onBinding=function(){var that=this,$autoSuggest=$('.autoSuggest',that.$ctx),$inner=$('div.inner',that.$ctx);SBB.inputValReplace(that.$ctx);SBB.autoSuggest($('input[type=text]:first',$inner),$autoSuggest,{returnIfFirstCharIsNumber:true,onShow:function(){$inner.addClass('focus');},onHide:function(){$inner.removeClass('focus');}});$('.hd',that.$ctx).bind('openItemSkin',function(){if(!SBB.utils.is_ie6()){$.fancybox.init();var $fancy=$('#fancybox-overlay'),c=that.fancyboxcache;c['opacity']=$fancy.css('opacity');c['z-index']=$fancy.css('z-index');$fancy.css({'opacity':.3,'z-index':8949,'height':$(document).height()}).fadeIn(300,function(){$('body').addClass('overlayVisible');});}
return false;}).bind('closeItemSkin',function(){if(!SBB.utils.is_ie6()){var $fancy=$('#fancybox-overlay'),c=that.fancyboxcache;$('body').removeClass('overlayVisible');$fancy.fadeOut(200,function(){$fancy.css({'opacity':c['opacity'],'z-index':c['z-index']});});}
return false;});};};}(Nx.$));
(function($){Nx.Module.CampaignCarousselItem.Ticketshop=function(parent){this.activate=function(){$('.list-item:first',this.$ctx).addClass('expanded');dcsMultiTrack('DCS.dcsuri','/campaigncarousselItemticketshop.html','WT.ti','Ticketshop Item','WT.si_n','Carousel');};this.deactivate=function(){$('.expanded',this.$ctx).removeClass('expanded');var tabs=$('.modAccordion',this.$ctx).data('tabs');tabs.getCurrentPane().hide();};};}(Nx.$));
(function($){Nx.Module.CampaignCarousselItem.Fahrplan=function(parent){this.onBinding=function(){var that=this,$ctx=this.$ctx,$focusElmts=null,focus=0,isHafasAutoCompleteOn=null;$ctx.data('initialized',true);SBB.datepicker($ctx);$('a.formpost',$ctx).click(function(){$('form',$ctx).attr('action',$(this).attr('href')).submit();return false;});isHafasAutoCompleteOn=function(){var active=false,$param=$('#hafas_autocomplete_src'),param_value='';if($param.length!==1||$param.val().length<1){return active;}else{param_value=$('#hafas_autocomplete_src').val();active=true;return active;}};if(isHafasAutoCompleteOn()&&(typeof(Hafas)==='undefined'||typeof(Hafas.Suggest)==='undefined')){$.log.info('Loading Hafas Suggest');$.getScript($('#hafas_autocomplete_src').val());}
that.activate();};this.activate=function(){var $focusElm=$('input:visible, button:visible',this.$ctx)[0];if(typeof $focusElm!=='undefined'&&$('body').hasClass('layout-index')){$focusElm.focus();}
dcsMultiTrack('DCS.dcsuri','/campaigncarousselItemfahrplan.html','WT.ti','Fahrplan Item','WT.si_n','Carousel');};this.deactivate=function(){};};}(Nx.$));
(function($){Nx.Module.CampaignCarousselItem.Aktuelles=function(parent){this.onBinding=function(){var that=this;$('ul.article-list>li:gt(2)',that.$ctx).addClass('collapsible');$('.skinPagingShowMore',that.$ctx).click(function(){var $this=$(this);that.toggleCollapsible($this.hasClass('showingMore'));that.setHeight(that.$ctx.outerHeight());return false;});that.$ctx.delegate('.article-list>li:not(.expanded)','click',function(e){$('.article-list li.expanded',that.$ctx).removeClass('expanded');$(this).addClass('expanded');var itemTitle=$('.shortDesc h2',this).text();if(!itemTitle){itemTitle=$('h2',this).text();}
itemTitle=$.trim(itemTitle);itemTitle=encodeURIComponent(itemTitle);dcsMultiTrack('DCS.dcsuri','/campaigncarousselItemaktuelles.html','WT.ti',itemTitle,'WT.si_n','Aktuelles');});};this.activate=function(){this.toggleCollapsible(true);$('.list-item:first',this.$ctx).addClass('expanded');dcsMultiTrack('DCS.dcsuri','/campaigncarousselItemaktuelles.html','WT.ti','Aktuelles Item','WT.si_n','Carousel');};this.deactivate=function(){$('.expanded',this.$ctx).removeClass('expanded');};this.toggleCollapsible=function(hide){var $paging=$('.skinPagingShowMore',this.$ctx);if(hide){$('ul.article-list li.showCollapsible',this.$ctx).removeClass('showCollapsible');this.setHeight(this.$ctx.outerHeight());$paging.removeClass('showingMore');$('a.showmore',$paging).text($('fieldset.labels input[name="lbl_weitere"]',this.$ctx).val());$('a.showmore',$paging).attr('title',$('fieldset.labels input[name="lbl_title_weitere"]',this.$ctx).val());if($('.article-list li.expanded',this.$ctx).index()>=3){$('.article-list li:first',this.$ctx).trigger('click');}}else{$('ul.article-list li.collapsible',this.$ctx).addClass('showCollapsible');this.setHeight('auto');$paging.addClass('showingMore');$('a.showmore',$paging).text($('fieldset.labels input[name="lbl_schliessen"]',this.$ctx).val());$('a.showmore',$paging).attr('title',$('fieldset.labels input[name="lbl_title_schliessen"]',this.$ctx).val());}};this.setHeight=function(height){$(document).trigger('carouselItemHeightChanged.campaigncarousel',{'height':height})};};}(Nx.$));
