/*
 * s2.js
 * Unitymedia.de
 *
 * Created on 2009-01-14
 * Copyright 2008 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6
 *
 * Documentation with YUIDoc [http://developer.yahoo.com/yui/yuidoc/]
 */
(function(){var Namespace=function(){};window.S2=new Namespace();window.S2.namespace=function(name,func){var parts=name.split(".");var ns=window;for(var i=0;i<parts.length;i++){var part=parts[i];if(ns[part]==null){ns[part]=new Namespace()}ns=ns[part]}func.call(ns,ns)}})();var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return}}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();S2.namespace("S2.Ume.Util",function(){this.Query=function(queryString){this.queryString=queryString?queryString:window.location.hash;this.query=this.parse();this.QueryData=null};this.Query.prototype={asHash:function(){return this.query},normalize:function(value){if(value==null){value=""}value=""+value;return value.toLowerCase()},param:function(name,value){if(value!=null&&name!=""&&name!=null){this.query[this.normalize(name)]=value}return this.query[this.normalize(name)]},parse:function(){if(this.QueryData!=null){return this.QueryData}var search=this.queryString;search=search.substr(1);if(search==null){search=""}parts=search.split(",");var query={};for(var i=0;i<parts.length;i++){var pair=parts[i].split("_");if(pair[0]!=""){query[this.normalize(unescape(pair[0]))]=unescape(pair[1])}}this.QueryData=query;return query},toString:function(){var parts=[];for(var i in this.query){var key=i;if(key!=null&&key!=""){key=this.normalize(key);parts.push(encodeURIComponent(key)+"_"+encodeURIComponent(this.query[i]))}}return parts.join(",")}}});
/*
 * stage_before_jquery.js
 * Unitymedia.de
 *
 * Created on 2009-07-30.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires swfobject, s2
 *
 */
/* 
 * Initialize Flash Stage for Home Page -- phase a, as early as
 * possible (before jquery is loaded)
 *
 * Parameter: #startid_<teaserid>,autorun_[0|1]
 * Excample: /#startid_teaser3,autorun_0
 */
S2.namespace("S2.Ume.StageBeforeJquery",function(){this.initialize=function(){var query=new S2.Ume.Util.Query();var flashvars={configFile:stage_config_path,startID:query.param("startid"),autoRun:query.param("autorun")||1};var params={allowscriptaccess:"always",allownetworking:"all",wmode:"transparent"};var attributes={id:"stage"};var width="940";var heigth="400";var id="stage";swfobject.embedSWF(stage_path,id,width,heigth,"9.0.28",express_install_path,flashvars,params,attributes)};if(document.getElementById("stage")){this.initialize()}});
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return}var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return}if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return}jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return}if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.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\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return}div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return}Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return}if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return}if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return}if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return}readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return}try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return}jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window["eval"]("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement.getBoundingClientRect){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return}var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<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>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();var joosetop=this;Joose=function(){this.cc=null;this.currentModule=null;this.top=joosetop;this.globalObjects=[];this.anonymouseClassCounter=0};Joose.A={};Joose.A.each=function(array,func){for(var i=0;i<array.length;i++){func(array[i],i)}};Joose.A.exists=function(array,value){for(var i=0;i<array.length;i++){if(array[i]==value){return true}}return false};Joose.A.concat=function(source,array){source.push.apply(source,array);return source};Joose.A.grep=function(array,func){var a=[];Joose.A.each(array,function(t){if(func(t)){a.push(t)}});return a};Joose.A.remove=function(array,removeEle){var a=[];Joose.A.each(array,function(t){if(t!==removeEle){a.push(t)}});return a};Joose.S={};Joose.S.uppercaseFirst=function(string){var first=string.substr(0,1);var rest=string.substr(1,string.length-1);first=first.toUpperCase();return first+rest};Joose.S.isString=function(thing){if(typeof thing=="string"){return true}return false};Joose.O={};Joose.O.each=function(object,func){for(var i in object){func(object[i],i)}};Joose.O.eachSafe=function(object,func){for(var i in object){if(object.hasOwnProperty(i)){func(object[i],i)}}};Joose.O.extend=function(target,newObject){for(var i in newObject){var thing=newObject[i];target[i]=thing}};Joose.prototype={addToString:function(object,func){object.toString=func},isInstance:function(obj){if(!obj.meta){throw"isInstance only works with Joose objects and classes."}if(obj.constructor===obj.meta.c){return true}return false},init:function(){this.builder=new Joose.Builder();this.builder.globalize()},components:function(){return["Joose.Builder","Joose.Class","Joose.Method","Joose.ClassMethod","Joose.Attribute","Joose.Role","Joose.Singleton","Joose.SimpleRequest","Joose.Gears","Joose.Storage","Joose.Storage.Unpacker","Joose.Decorator","Joose.Module","Joose.TypeChecker","Joose.TypeConstraint","Joose.TypeCoercion","Joose.Types","Joose.Prototype","Joose.TypedMethod","Joose.MultiMethod"]},loadComponents:function(basePath){var html="";Joose.A.each(this.components(),function(name){var url=""+basePath+"/"+name.split(".").join("/")+".js";html+='<script type="text/javascript" src="'+url+'"><\/script>'});document.write(html)}};Joose.copyObject=function(source,target){var keys="";Joose.O.each(source,function(value,name){keys+=", "+name;target[name]=value});return target};Joose.emptyFunction=function(){};this.joose=new Joose();(function(){if(typeof this["load"]=="function"&&(typeof this["Packages"]=="function"||typeof this["Packages"]=="object")){joose.CHAOTIC_TRAVERSION_ORDER=true}})();Joose.bootstrap=function(){var BOOT=new Joose.MetaClassBootstrap();BOOT.builder=Joose.MetaClassBootstrap;Joose.MetaClass=BOOT.createClass("Joose.MetaClass");Joose.MetaClass.meta.addNonJooseSuperClass("Joose.MetaClassBootstrap",BOOT);Joose.MetaClass.meta.addMethod("initialize",function(){this._name="Joose.MetaClass"});var META=new Joose.MetaClass();META.builder=Joose.MetaClass;Joose.Class=META.createClass("Joose.Class");Joose.Class.meta.addSuperClass(Joose.MetaClass);Joose.MetaClass.meta.addMethod("initialize",function(){this._name="Joose.Class"});Joose.Class.create=function(name,optionalConstructor,optionalModule){var aClass=new this();aClass.builder=this;var c=aClass.createClass(name,optionalConstructor,optionalModule);c.meta.builder=this;return c}};Joose.bootstrapCompletedBuilder=function(){Joose.Builder.Globals.joosify("Joose.Method",Joose.Method);Joose.Builder.Globals.joosify("Joose.Attribute",Joose.Attribute)};Joose.bootstrapCompletedClassMethod=function(){Joose.Class.meta.addClassMethod("create",Joose.Class.create)};Joose.bootstrap3=function(){};Joose.MetaClassBootstrap=function(){this._name="Joose.MetaClassBootstrap";this.methodNames=[];this.attributeNames=["_name","isAbstract","isDetached","methodNames","attributeNames","methods","parentClasses","roles","c"];this.attributes={},this.methods={};this.classMethods={};this.parentClasses=[];this.roles=[];this.myRoles=[];this.isAbstract=false;this.isDetached=false};Joose.MetaClassBootstrap.prototype={toString:function(){if(this.meta){return"a "+this.meta.className()}return"NoMeta"},className:function(){return this._name},getName:function(){return this.className()},newMetaClass:function(){var me=this;var metaClassClass=this.builder;var c=new metaClassClass();c.builder=metaClassClass;c._name=this._name;c.methodNames=[];c.attributeNames=[];c.methods={};c.classMethods={};c.parentClasses=[];c.roles=[];c.myRoles=[];c.attributes={};var myMeta=this.meta;if(!myMeta){myMeta=this}c.meta=myMeta;return c},createClass:function(name,optionalConstructor,optionalModuleObject){var meta=this.newMetaClass();var c;if(optionalConstructor){c=optionalConstructor}else{c=this.defaultClassFunctionBody();if(optionalModuleObject){optionalModuleObject.addElement(c)}}c.prototype.meta=meta;c.meta=meta;if(name==null){meta._name="__anonymous__"}else{var className=name;if(optionalModuleObject){className=optionalModuleObject.getName()+"."+name}meta._name=className}meta.c=c;if(!optionalModuleObject){joose.globalObjects.push(c)}meta.addInitializer();meta.addToString();meta.addDetacher();return c},buildComplete:function(){},initializeFromProps:function(props){this._initializeFromProps(props)},_initializeFromProps:function(props){var me=this;if(props){if(joose.CHAOTIC_TRAVERSION_ORDER){Joose.A.each(["isa","does","has","method","methods"],function(name){if(name in props){var value=props[name];me._initializeFromProp(name,value,props);delete props[name]}})}Joose.O.eachSafe(props,function(value,name){me._initializeFromProp(name,value,props)});for(var i=0;i<this.roles.length;i++){var role=this.roles[i];role.meta.applyMethodModifiers(this.c)}me.buildComplete();me.validateClass()}},_initializeFromProp:function(propName,value,props){var paras=value;var customBuilderName="handleProp"+propName;if(this.meta.can(customBuilderName)){this[customBuilderName](paras,props)}else{throw new Error("Called invalid builder "+propName+" while creating class "+this.className())}},instantiate:function(){var f=function(){};f.prototype=this.c.prototype;f.prototype.constructor=this.c;var obj=new f();this.c.apply(obj,arguments);return obj},defaultClassFunctionBody:function(){var f=function(){this.initialize.apply(this,arguments)};joose.addToString(f,function(){return this.meta.className()});return f},addToString:function(){this.addMethod("toString",function(){if(this.stringify){return this.stringify()}return"a "+this.meta.className()})},addInitializer:function(){if(!this.c.prototype.initialize){this.addMethod("initialize",this.initializer())}},initializer:function(){return function initialize(paras){var me=this;if(this.meta.isAbstract){var name=this.meta.className();throw""+name+" is an abstract class and may not instantiated."}var attributes=this.meta.getAttributes();for(var i in attributes){if(attributes.hasOwnProperty(i)){var attr=attributes[i];attr.doInitialization(me,paras)}}}},dieIfString:function(thing){if(Joose.S.isString(thing)){throw new TypeError("Parameter must not be a string.")}},addRole:function(roleClass){this.dieIfString(roleClass);var c=this.getClassObject();if(roleClass.meta.apply(c)){this.roles.push(roleClass);this.myRoles.push(roleClass)}},getClassObject:function(){return this.c},classNameToClassObject:function(className){var top=joose.top;var parts=className.split(".");var object=top;for(var i=0;i<parts.length;i++){var part=parts[i];object=object[part];if(!object){throw"Unable to find class "+className}}return object},addNonJooseSuperClass:function(name,object){var pseudoMeta=new Joose.MetaClassBootstrap();pseudoMeta.builder=Joose.MetaClassBootstrap;var pseudoClass=pseudoMeta.createClass(name);Joose.O.each(object,function(value,name){if(typeof(value)=="function"){pseudoClass.meta.addMethod(name,value)}else{pseudoClass.meta.addAttribute(name,{init:value})}});this.addSuperClass(pseudoClass)},addSuperClass:function(classObject){this.dieIfString(classObject);var me=this;var names=classObject.meta.getMethodNames();for(var i=0;i<names.length;i++){var name=names[i];var m=classObject.meta.getMethodObject(name);if(m){var method=m.copy();method.setIsFromSuperClass(true);me.addMethodObject(method)}m=classObject.meta.getClassMethodObject(name);if(m){var method=m.copy();method.setIsFromSuperClass(true);me.addMethodObject(method)}}Joose.O.eachSafe(classObject.meta.attributes,function(attr,name){me.addAttribute(name,attr.getProps())});var roles=classObject.meta.roles;for(var i=0;i<roles.length;i++){var role=roles[i];me.roles.push(role)}this.parentClasses.unshift(classObject)},_fixMetaclassIncompatability:function(superClass){var superMeta=superClass.meta;var superMetaName=superMeta.meta.className();if(superMetaName=="Joose.Class"||superMetaName=="Joose.MetaClass"||superMetaName=="Joose.MetaClassBootstrap"){return}if(this.meta.meta.isa(superMeta)){return}var patched=superMeta.meta.instantiate(this);for(var i in patched){this[i]=patched[i]}},isa:function(classObject){this.dieIfString(classObject);var name=classObject.meta.className();if(this.className()==name){return true}for(var i=0;i<this.parentClasses.length;i++){var parent=this.parentClasses[i].meta;if(parent.className()==name){return true}if(parent.isa(classObject)){return true}}return false},wrapMethod:function(name,wrappingStyle,func,notPresentCB){var orig=this.getMethodObject(name);if(orig){this.addMethodObject(orig[wrappingStyle](func))}else{if(notPresentCB){notPresentCB()}else{throw new Error("Unable to apply "+wrappingStyle+" method modifier because method "+name+" does not exist")}}},dispatch:function(name){return this.getMethodObject(name).asFunction()},hasMethod:function(name){return this.methods[name]!=null||this.classMethods[name]!=null},addMethod:function(name,func,props){var m=new Joose.Method(name,func,props);this.addMethodObject(m)},addClassMethod:function(name,func,props){var m=new Joose.ClassMethod(name,func,props);this.addMethodObject(m)},addMethodObject:function(method){var m=method;var name=m.getName();if(!this.methods[name]&&!this.classMethods[name]){this.methodNames.push(name)}if(m.isClassMethod()){this.classMethods[name]=m}else{this.methods[name]=m}method.addToClass(this.c)},attributeMetaclass:function(){return Joose.Attribute},addAttribute:function(name,props){var metaclass=this.attributeMetaclass();if(props&&props.metaclass){metaclass=props.metaclass}var at=new metaclass(name,props);at.apply(this.c)},getAttributes:function(){return this.attributes},getAttribute:function(name){return this.attributes[name]},setAttribute:function(name,attributeObject){return this.attributes[name]=attributeObject},getMethodObject:function(name){return this.methods[name]},getClassMethodObject:function(name){return this.classMethods[name]},getAttributeNames:function(){return this.attributeNames},getInstanceMethods:function(){var a=[];Joose.O.eachSafe(this.methods,function(m){a.push(m)});return a},getClassMethods:function(){var a=[];Joose.O.eachSafe(this.classMethods,function(m){a.push(m)});return a},getSuperClasses:function(){return this.parentClasses},getSuperClass:function(){return this.parentClasses[0]},getRoles:function(){return this.roles},getMethodNames:function(){return this.methodNames},makeAnonSubclass:function(){var c=this.createClass(this.className()+"__anon__"+joose.anonymouseClassCounter++);c.meta.addSuperClass(this.getClassObject());return c},addDetacher:function(){this.addMethod("detach",function detach(){var meta=this.meta;if(meta.isDetached){return}var c=meta.makeAnonSubclass();c.meta.isDetached=true;this.meta=c.meta;this.constructor=c;var proto;if(!this.__proto__){proto=this}else{proto={};Joose.copyObject(this,proto)}c.prototype=proto;this.__proto__=c.prototype;return})},validateClass:function(){var c=this.getClassObject();var me=this;var throwException=true;Joose.A.each(this.roles,function(role){role.meta.isImplementedBy(c,throwException)})},can:function(methodName){var method=this.methods[methodName];if(!method){return false}return true},classCan:function(methodName){var method=this.classMethods[methodName];if(!method){return false}return true},does:function(roleObject){for(var i=0;i<this.roles.length;i++){if(roleObject===this.roles[i]){return true}}for(var i=0;i<this.roles.length;i++){if(this.roles[i].meta.does(roleObject)){return true}}return false},implementsMyMethods:function(classObject){var complete=true;Joose.A.each(this.getMethodNames(),function(value){var found=classObject.meta.can(value);if(!found){complete=false}});return complete},handleProprequires:function(methodName){var me=this;if(!this.meta.isa(Joose.Role)){throw ("Keyword 'requires' only available classes with a meta class of type Joose.Role")}if(methodName instanceof Array){Joose.A.each(methodName,function(name){me.addRequirement(name)})}else{me.addRequirement(methodName)}},handlePropisAbstract:function(bool){this.isAbstract=bool},handlePropisa:function(classObject){if(classObject==null){throw new Error("Super class is null")}this.addSuperClass(classObject)},handlePropdoes:function(role){var me=this;if(role instanceof Array){Joose.A.each(role,function(aRole){me.addRole(aRole)})}else{me.addRole(role)}},handleProphas:function(map){var me=this;if(typeof map=="string"){var name=arguments[0];var props=arguments[1];me.addAttribute(name,props)}else{Joose.O.eachSafe(map,function(props,name){me.addAttribute(name,props)})}},handlePropmethod:function(name,func,props){this.addMethod(name,func,props)},handlePropmethods:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){if(typeof func!=="function"){var props=func;var method;if(props instanceof Array){var patterns=props;method=new Joose.MultiMethod.newFromPatterns(name,patterns)}else{method=Joose.TypedMethod.newFromProps(name,props)}me.addMethodObject(method)}else{me.addMethod(name,func)}})},handlePropclassMethods:function(map){var me=this;Joose.O.eachSafe(map,function(func,name2){me.addMethodObject(new Joose.ClassMethod(name2,func))})},handlePropworkers:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){me.addWorker(name,func)})},handlePropbefore:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){me.wrapMethod(name,"before",func)})},handlePropafter:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){me.wrapMethod(name,"after",func)})},handleProparound:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){me.wrapMethod(name,"around",func)})},handlePropoverride:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){me.wrapMethod(name,"override",func)})},handlePropaugment:function(map){var me=this;Joose.O.eachSafe(map,function(func,name){me.wrapMethod(name,"augment",func,function(){me.addMethod(name,func)})})},handlePropdecorates:function(map){var me=this;Joose.O.eachSafe(map,function(classObject,attributeName){me.decorate(classObject,attributeName)})}};Joose.Attribute=function(name,props){this.initialize(name,props)};Joose.Attribute.prototype={_name:null,_props:null,getName:function(){return this._name},getProps:function(){return this._props},initialize:function(name,props){this._name=name;this.setProps(props)},setProps:function(props){if(props){this._props=props}else{this._props={}}},getIsa:function(){var props=this.getProps();if("isa" in props&&props.isa==null){throw new Error("You declared an isa property but the property is null.")}if(props.isa){if(!props.isa.meta){return props.isa()}return props.isa}return},addSetter:function(classObject){var meta=classObject.meta;var name=this.getName();var props=this.getProps();var setterName=this.setterName();if(meta.can(setterName)){return}var isa=this.getIsa();var func;if(isa){var checkerFunc=Joose.TypeChecker.makeTypeChecker(isa,props,"attribute",name);func=function setterWithIsaCheck(value,errorHandler){value=checkerFunc(value,errorHandler);this[name]=value;return this}}else{func=function setter(value){this[name]=value;return this}}meta.addMethod(setterName,func)},addGetter:function(classObject){var meta=classObject.meta;var name=this.getName();var props=this.getProps();var getterName=this.getterName();if(meta.can(getterName)){return}var func=function getter(){return this[name]};var init=props.init;if(props.lazy){func=function lazyGetter(){var val=this[name];if(typeof val=="function"&&val===init){this[name]=val.apply(this)}return this[name]}}meta.addMethod(getterName,func)},initializerName:function(){return this.toPublicName()},getterName:function(){if(this.__getterNameCache){return this.__getterNameCache}this.__getterNameCache="get"+Joose.S.uppercaseFirst(this.toPublicName());return this.__getterNameCache},setterName:function(){if(this.__setterNameCache){return this.__setterNameCache}this.__setterNameCache="set"+Joose.S.uppercaseFirst(this.toPublicName());return this.__setterNameCache},isPrivate:function(){return this.getName().charAt(0)=="_"},toPublicName:function(){if(this.__publicNameCache){return this.__publicNameCache}var name=this.getName();if(this.isPrivate()){this.__publicNameCache=name.substr(1);return this.__publicNameCache}this.__publicNameCache=name;return this.__publicNameCache},handleIs:function(classObject){var meta=classObject.meta;var name=this.getName();var props=this.getProps();var is=props.is;if(is=="rw"||is=="ro"){this.addGetter(classObject)}if(is=="rw"){this.addSetter(classObject)}},handleInit:function(classObject){var props=this.getProps();var name=this.getName();classObject.prototype[name]=null;if(typeof props.init!="undefined"){var val=props.init;var type=typeof val;classObject.prototype[name]=val}},handleProps:function(classObject){this.handleIs(classObject);this.handleInit(classObject)},apply:function(classObject){var meta=classObject.meta;var name=this.getName();this.handleProps(classObject);meta.attributeNames.push(name);meta.setAttribute(name,this);meta.attributes[name]=this}};Joose.Method=function(name,func,props){this.initialize(name,func,props)};Joose.Method.prototype={_name:null,_body:null,_props:null,_isFromSuperClass:false,getName:function(){return this._name},getBody:function(){return this._body},getProps:function(){return this._props},isFromSuperClass:function(){return this._isFromSuperClass},setIsFromSuperClass:function(bool){this._isFromSuperClass=bool},copy:function(){return new Joose.Method(this.getName(),this.getBody(),this.getProps())},initialize:function(name,func,props){this._name=name;this._body=func;this._props=props;func.name=name;func.meta=this},isClassMethod:function(){return false},apply:function(thisObject,args){return this._body.apply(thisObject,args)},addToClass:function(c){c.prototype[this.getName()]=this.asFunction()},asFunction:function(){return this._body}};Joose.bootstrap();Joose.Builder=function(){this.globalize=function(){Joose.O.each(Joose.Builder.Globals,function(func,name){var globalName="Joose"+name;if(typeof joose.top[name]=="undefined"){joose.top[name]=func}joose.top[globalName]=func})}};Joose.Builder.Globals={Module:function(name,functionThatCreatesClassesAndRoles){return Joose.Module.setup(name,functionThatCreatesClassesAndRoles)},Role:function(name,props){if(!props.meta){props.meta=Joose.Role}return JooseClass(name,props)},Prototype:function(name,props){if(!props.meta){props.meta=Joose.Prototype}return JooseClass(name,props)},Class:function(name,props){var c=null;if(name){var className=name;if(joose.currentModule){className=joose.currentModule.getName()+"."+name}var root=joose.top;var parts=className.split(".");for(var i=0;i<parts.length;i++){root=root[parts[i]]}c=root}if(c==null){var metaClass;if(props&&props.meta){metaClass=props.meta;delete props.meta}else{if(props&&props.isa&&props.isa!=Joose.Class){metaClass=props.isa.meta.builder}else{metaClass=Joose.Class}}var c=metaClass.create(name,null,joose.currentModule);var className=c.meta.className();if(name&&className){var root=joose.top;var n=new String(className);var parts=n.split(".");for(var i=0;i<parts.length-1;i++){if(root[parts[i]]==null){root[parts[i]]={}}root=root[parts[i]]}root[parts[parts.length-1]]=c}}c.meta.initializeFromProps(props);return c},Type:function(name,props){var isAnon=false;if(arguments.length==1&&name instanceof Object){props=name;isAnon=true}if(props instanceof RegExp||props instanceof Function){props={where:props}}if(isAnon){name="AnonType: "+(props.where?props.where.toString():"")}var t=Joose.TypeConstraint.newFromTypeBuilder(name,props);if(!isAnon){var m=joose.currentModule;if(!m){JooseModule("Joose.Type");if(typeof joose.top.TYPE=="undefined"){joose.top.TYPE=Joose.Type}m=Joose.Type.meta}m.addElement(t);m.getContainer()[name]=t}return t},joosify:function(standardClassName,standardClassObject){var c=standardClassObject;var metaClass=new Joose.Class();metaClass.builder=Joose.Class;c.toString=function(){return this.meta.className()};c=metaClass.createClass(standardClassName,c);var meta=c.meta;for(var name in standardClassObject.prototype){if(name=="meta"){continue}var value=standardClassObject.prototype[name];if(typeof(value)=="function"){meta.addMethod(name,value)}else{var props={};if(typeof(value)!="undefined"){props.init=value}meta.addAttribute(name,props)}}return c},rw:"rw",ro:"ro"};joose.init();Joose.bootstrapCompletedBuilder();(function(Class){Class("Joose.Method",{methods:{copy:function(){return this.meta.instantiate(this.getName(),this.getBody(),this.getProps())},_makeWrapped:function(func){return this.meta.instantiate(this.getName(),func)},around:function(func){var orig=this.getBody();return this._makeWrapped(function aroundWrapper(){var me=this;var bound=function(){return orig.apply(me,arguments)};return func.apply(this,Joose.A.concat([bound],arguments))})},before:function(func){var orig=this.getBody();return this._makeWrapped(function beforeWrapper(){func.apply(this,arguments);return orig.apply(this,arguments)})},after:function(func){var orig=this.getBody();return this._makeWrapped(function afterWrapper(){var ret=orig.apply(this,arguments);func.apply(this,arguments);return ret})},override:function(func){var orig=this.getBody();return this._makeWrapped(function overrideWrapper(){var me=this;var bound=function(){return orig.apply(me,arguments)};var before=this.SUPER;this.SUPER=bound;var ret=func.apply(this,arguments);this.SUPER=before;return ret})},augment:function(func){var orig=this.getBody();orig.source=orig.toString();return this._makeWrapped(function augmentWrapper(){var exe=orig;var me=this;var inner=func;inner.source=inner.toString();if(!this.__INNER_STACK__){this.__INNER_STACK__=[]}this.__INNER_STACK__.push(inner);var before=this.INNER;this.INNER=function(){return me.__INNER_STACK__.pop().apply(me,arguments)};var ret=orig.apply(this,arguments);this.INNER=before;return ret})}}})})(JooseClass);(function(Class){Class("Joose.ClassMethod",{isa:Joose.Method,methods:{isClassMethod:function(){return true},addToClass:function(c){c[this.getName()]=this.asFunction()},copy:function(){return new Joose.ClassMethod(this.getName(),this.getBody(),this.getProps())}}});Joose.bootstrapCompletedClassMethod()})(JooseClass);(function(Class){Class("Joose.Attribute",{after:{handleProps:function(classObject){this.handleHandles(classObject);this.handlePredicate(classObject)}},methods:{isPersistent:function(){var props=this.getProps();if(props.persistent==false){return false}return true},doInitialization:function(object,paras){var name=this.initializerName();var _name=this.getName();var value;var isSet=false;if(typeof paras!="undefined"&&typeof paras[name]!="undefined"){value=paras[name];isSet=true}else{var props=this.getProps();var init=props.init;if(typeof init=="function"&&!props.lazy){value=init.call(object);isSet=true}else{if(props.required){throw"Required initialization parameter missing: "+name+"(While initializing "+object+")"}}}if(isSet){var setterName=this.setterName();if(object.meta.can(setterName)){object[setterName](value)}else{object[_name]=value}}},handleHandles:function(classObject){var meta=classObject.meta;var name=this.getName();var props=this.getProps();var handles=props.handles;var isa=props.isa;if(handles){if(handles=="*"){if(!isa){throw"I need an isa property in order to handle a class"}var optionalHandlerMaker=props.handleWith;meta.decorate(isa,name,optionalHandlerMaker)}else{throw"Unsupported value for handles: "+handles}}},handlePredicate:function(classObject){var meta=classObject.meta;var name=this.getName();var props=this.getProps();var predicate=props.predicate;var getter=this.getterName();if(predicate){meta.addMethod(predicate,function(){var val=this[getter]();return val?true:false})}}}})})(JooseClass);(function(Class){Class("Joose.Role",{isa:Joose.Class,has:["requiresMethodNames","methodModifiers","metaRoles"],methods:{wrapMethod:function(name,wrappingStyle,func,notPresentCB){this.methodModifiers.push(arguments);var test=this.methodModifiers},requiresMethod:function(methodName){var bool=false;Joose.A.each(this.requiresMethodNames,function(name){if(methodName==name){bool=true}});return bool},addInitializer:Joose.emptyFunction,defaultClassFunctionBody:function(){var f=function(){throw new Error("Roles may not be instantiated.")};joose.addToString(f,function(){return this.meta.className()});return f},addSuperClass:function(){throw new Error("Roles may not inherit from a super class.")},initialize:function(){this._name="Joose.Role";this.requiresMethodNames=[];this.methodModifiers=[]},addRequirement:function(methodName){this.requiresMethodNames.push(methodName)},unapply:function(object){if(!joose.isInstance(object)){throw new Error("You way only remove roles from instances.")}if(!object.meta.isDetached){throw new Error("You may only remove roles that were applied at runtime")}var role=this.getClassObject();var roles=object.meta.myRoles;var found=false;var otherRoles=[];for(var i=0;i<roles.length;i++){if(roles[i]===role){found=true}else{otherRoles.push(roles[i])}}if(!found){throw new Error("The role "+this.className()+" was not applied to the object at runtime")}var superClass=object.meta.getSuperClass();var c=superClass.meta.makeAnonSubclass();var test=new c();for(var i=0;i<otherRoles.length;i++){var role=otherRoles[i];c.meta.addRole(role)}c.prototype=test;object.meta=c.meta;object.constructor=c;object.__proto__=test},addMethodToClass:function(method,classObject){var name=method.getName();var cur;if(method.isClassMethod()){cur=classObject.meta.getClassMethodObject(name)}else{cur=classObject.meta.getMethodObject(name)}if(!cur||cur.isFromSuperClass()){classObject.meta.addMethodObject(method)}},addAttributeToClass:function(attr,classObject){var name=attr.getName();if(!classObject.meta.getAttribute(name)){this.getAttribute(name).apply(classObject)}},apply:function(object){if(object.meta.does(this.getClassObject())){return false}if(joose.isInstance(object)){object.detach();object.meta.addRole(this.getClassObject());this.applyMethodModifiers(object);var throwException=true;this.isImplementedBy(object,throwException)}else{var me=this;var names=me.getMethodNames();var attrs=me.getAttributes();Joose.O.each(attrs,function applyAttrs(attr){me.addAttributeToClass(attr,object)});Joose.A.each(names,function applyMethod(name){var m=me.getMethodObject(name);if(m){me.addMethodToClass(m,object)}m=me.getClassMethodObject(name);if(m){me.addMethodToClass(m,object)}});if(this.metaRoles){Joose.A.each(this.metaRoles,function applyMetaRole(role){role.meta.apply(object.meta)})}}return true},applyMethodModifiers:function(object){Joose.A.each(this.methodModifiers,function applyMethodModifier(paras){object.meta.wrapMethod.apply(object.meta,paras)})},hasRequiredMethods:function(classObject,throwException){var me=this;var complete=true;Joose.A.each(this.requiresMethodNames,function(value){var found=classObject.meta.can(value);if(!found){if(throwException){throw ("Class "+classObject.meta.className()+" does not fully implement the role "+me.className()+". The method is "+value+" missing.")}complete=false;return}});return complete},isImplementedBy:function(classObject,throwException){var complete=this.hasRequiredMethods(classObject,throwException);if(complete){complete=this.implementsMyMethods(classObject)}return complete},handlePropmetaRoles:function(arrayOfRoles){this.metaRoles=arrayOfRoles}}});Joose.Role.anonymousClassCounter=0})(JooseClass);(function(Role){var registry={};var locked=true;Role("Joose.Singleton",{before:{initialize:function(){if(locked){var name=this.meta.className();throw new Error("The class "+name+" is a singleton. Please use the class method getInstance().")}}},methods:{singletonInitialize:function(){}},classMethods:{getInstance:function(){var name=this.meta.className();var instance=registry[name];if(instance){return instance}locked=false;instance=this.meta.instantiate();locked=true;instance.singletonInitialize();registry[name]=instance;return instance}}})})(JooseRole);(function(Class){Class("Joose.SimpleRequest",{has:{_req:{}},methods:{initialize:function(){if(window.XMLHttpRequest){this._req=new XMLHttpRequest()}else{this._req=new ActiveXObject("Microsoft.XMLHTTP")}},getText:function(url){this._req.open("GET",url,false);try{this._req.send(null);if(this._req.status==200||this._req.status==0){return this._req.responseText}}catch(e){throw ("File not found: "+url);return null}throw ("File not found: "+url);return null}}})})(JooseClass);(function(Class){Class("Joose.Gears",{isa:Joose.Class,has:{wp:{},calls:{init:{}},callIndex:{init:0}},methods:{initialize:function(){JooseGearsInitializeGears();if(this.canGears()){this.wp=google.gears.factory.create("beta.workerpool");var me=this;this.wp.onmessage=function(a,b,message){me.handleGearsMessage(message)}}},handleGearsMessage:function(message){var paras=message.body;var cbName=paras.to;var ret=paras.ret;var object=this.calls[paras.index];if(object.meta.can(cbName)){object[cbName].call(object,ret)}},canGears:function(){return window.google&&window.google.gears&&window.google.gears.factory},addWorker:function(name,func,props){var cbName="on"+Joose.S.uppercaseFirst(name);var ajaxRequestFunc=this.meta.getClassObject().ajaxRequest;if(!this.canGears()){var wrapped=function(){var me=this;var object={sendReturn:function(ret,cbName){if(me.meta.can(cbName)){me[cbName].call(me,ret)}},clientHasGears:function(){return false},ajaxRequest:ajaxRequestFunc};var ret=func.apply(object,arguments);object.sendReturn(ret,cbName)};this.addMethod(name,wrapped,props);return}var jsonUrl=this.can("jsonURL")?this.c.jsonURL():"json2.js";var json=new Joose.SimpleRequest().getText(jsonUrl);var source="var timer = google.gears.factory.create('beta.timer');\nfunction aClass () {}; aClass.prototype."+name+" = "+func.toString()+"\n\naClass.prototype.clientHasGears = function () { return true }\naClass.prototype.ajaxRequest = "+ajaxRequestFunc.toString()+"\n\nvar wp = google.gears.workerPool;\nwp.onmessage = function (a,b,message) {\nvar paras = message.body;\nvar o = new aClass();\no.sendReturn = function (ret, cbName) { wp.sendMessage({ ret: ret, to: cbName, index: paras.index }, message.sender) } \nvar ret = o."+name+".apply(o, paras.args); if(!ret) ret = null; \no.sendReturn(ret, paras.cbName);\n}\n\n";source+=json;var wp=this.wp;var childId=wp.createWorker(source);var me=this;var wrapped=function(){var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i])}var message={args:args,cbName:cbName,index:me.callIndex};wp.sendMessage(message,childId);me.calls[me.callIndex]=this;me.callIndex++};this.addMethod(name,wrapped,props)}},classMethods:{setupGearsCompat:function(){window.timer={setTimeout:function(func,time){return window.setTimeout(func,time)},setInterval:function(func,time){return window.setInterval(func,time)},clearTimeout:function(timer){return window.clearTimeout(timer)},clearInterval:function(timer){return window.clearInterval(timer)}}},clientHasGears:function(){return window.google&&window.google.gears&&window.google.gears.factory},ajaxRequest:function(method,url,data,callback,errorCallback){var request;if(this.clientHasGears()){request=google.gears.factory.create("beta.httprequest")}else{request=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()}var dataString="";if(data){for(var i in data){dataString+=encodeURIComponent(i)+"="+encodeURIComponent(data[i])+"&"}}var theUrl=url;if(data&&method=="GET"){theUrl+="?"+dataString}request.open(method,theUrl,true);request.onreadystatechange=function onreadystatechange(){if(request.readyState==4){if(request.status>=200&&request.status<400){var res=request.responseText;callback(res)}else{if(errorCallback){return errorCallback(request)}else{throw new Error("Error fetching url "+theUrl+". Response code: "+request.status+" Response text: "+request.responseText)}}}};if(data&&method=="POST"){request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");request.send(dataString)}else{dataString="";request.send(dataString)}}}})})(JooseClass);function JooseGearsInitializeGears(){if(window.google&&google.gears){return}var factory=null;if(typeof GearsFactory!="undefined"){factory=new GearsFactory()}else{try{factory=new ActiveXObject("Gears.Factory");if(factory.getBuildInfo().indexOf("ie_mobile")!=-1){factory.privateSetGlobalObject(this)}}catch(e){if(navigator.mimeTypes["application/x-googlegears"]){factory=document.createElement("object");factory.style.display="none";factory.width=0;factory.height=0;factory.type="application/x-googlegears";document.documentElement.appendChild(factory)}}}if(!factory){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:factory}}}(function(Class,Role){Role("Joose.Storage",{methods:{toJSON:function(){var packed=this.pack(Joose.Storage.TEMP_SEEN);return packed},identity:function(){if(this.__ID__){return this.__ID__}else{return this.__ID__=Joose.Storage.OBJECT_COUNTER++}},pack:function(seen){return this.meta.c.storageEngine().pack(this,seen)}},classMethods:{storageEngine:function(){return Joose.Storage.Engine},unpack:function(data){return this.storageEngine().unpack(this,data)}}});Role("Joose.Storage.jsonpickle",{does:Joose.Storage,classMethods:{storageEngine:function(){return Joose.Storage.Engine.jsonpickle}}});Joose.Storage.OBJECT_COUNTER=1;Class("Joose.Storage.Engine",{classMethods:{pack:function(object,seen){if(seen){var id=object.identity();var obj=seen[id];if(obj){return{__ID__:id}}}if(object.meta.can("prepareStorage")){object.prepareStorage()}if(seen){seen[object.identity()]=true}var o={__CLASS__:this.packedClassName(object),__ID__:object.identity()};var attrs=object.meta.getAttributes();Joose.O.eachSafe(attrs,function packAttr(attr,name){if(attr.isPersistent()){o[name]=object[name]}});return o},unpack:function(classObject,data){var meta=classObject.meta;var me=meta.instantiate();var seenClass=false;Joose.O.eachSafe(data,function unpack(value,name){if(name=="__CLASS__"){var className=Joose.Storage.Unpacker.packedClassNameToJSClassName(value);if(className!=me.meta.className()){throw new Error("Storage data is of wrong type "+className+". I am "+me.meta.className()+".")}seenClass=true;return}me[name]=value});if(!seenClass){throw new Error("Serialized data needs to include a __CLASS__ attribute.: "+data)}delete me.__ID__;if(me.meta.can("finishUnpack")){me.finishUnpack()}return me},packedClassName:function(object){if(object.meta.can("packedClassName")){return object.packedClassName()}var name=object.meta.className();var parts=name.split(".");return parts.join("::")}}});Class("Joose.Storage.Engine.jsonpickle",{classMethods:{pack:function(object,seen){if(seen){var id=object.identity();var obj=seen[id];if(obj){return{objectid__:id}}}if(object.meta.can("prepareStorage")){object.prepareStorage()}if(seen){seen[object.identity()]=true}var o={classname__:this.packedClassName(object),classmodule__:this.packedModuleName(object),objectid__:object.identity()};var attrs=object.meta.getAttributes();Joose.O.eachSafe(attrs,function packAttr(attr,name){if(attr.isPersistent()){o[name]=object[name]}});return o},unpack:function(classObject,data){var meta=classObject.meta;var me=meta.instantiate();var seenClass=false;Joose.O.eachSafe(data,function unpack(value,name){if(name=="classname__"){var className=value;var module=data.classmodule__;if(module){className=""+module+"."+value}if(className!=me.meta.className()){throw new Error("Storage data is of wrong type "+className+". I am "+me.meta.className()+".")}seenClass=true;return}if(name=="classmodule__"){return}me[name]=value});if(!seenClass){throw new Error("Serialized data needs to include a __CLASS__ attribute.: "+data)}if(me.meta.can("finishUnpack")){me.finishUnpack()}return me},packedClassName:function(object){var name=object.meta.className();var parts=name.split(".");return parts.pop()},packedModuleName:function(object){var name=object.meta.className();var parts=name.split(".");parts.pop();return parts.join(".")}}});Joose.Storage.storageEngine=Joose.Storage.Engine;Joose.Storage.jsonpickle.storageEngine=Joose.Storage.Engine.jsonpickle})(JooseClass,JooseRole);(function(Class){Class("Joose.Storage.Unpacker",{classMethods:{unpack:function(data){var name=data.__CLASS__;if(!name){throw ("Serialized data needs to include a __CLASS__ attribute.")}var jsName=this.packedClassNameToJSClassName(name);var co=this.meta.classNameToClassObject(jsName);var obj=co.unpack(data);var id;if(Joose.Storage.CACHE&&(id=data.__ID__)){Joose.Storage.CACHE[id]=obj}return obj},packedClassNameToJSClassName:function(packed){var parts=packed.split("-");parts=parts[0].split("::");return parts.join(".")},jsonParseFilter:function(key,value){if(value!=null&&typeof value=="object"){if(value.__CLASS__){return Joose.Storage.Unpacker.unpack(value)}if(value.__ID__){return Joose.Storage.CACHE[value.__ID__]}}return value},patchJSON:function(){var orig=JSON.parse;var storageFilter=this.jsonParseFilter;JSON.parse=function(s,filter){Joose.Storage.CACHE={};return orig(s,function JooseJSONParseFilter(key,value){var val=value;if(filter){val=filter(key,value)}return storageFilter(key,val)})};var stringify=JSON.stringify;JSON.stringify=function(){Joose.Storage.TEMP_SEEN={};return stringify.apply(JSON,arguments)}}}});Class("Joose.Storage.Unpacker.jsonpickle",{isa:Joose.Storage.Unpacker,classMethods:{unpack:function(data){var name=data.classname__;if(!name){throw ("Serialized data needs to include a classname__ attribute.")}var jsName=this.packedClassNameToJSClassName(name,data.classmodule__);var co=this.meta.classNameToClassObject(jsName);var obj=co.unpack(data);var id;if(Joose.Storage.CACHE&&(id=data.objectid__)){Joose.Storage.CACHE[id]=obj}return obj},packedClassNameToJSClassName:function(className,moduleName){var name="";if(moduleName){name+=moduleName+"."}name+=className;return name},jsonParseFilter:function(key,value){if(value!=null&&typeof value=="object"){if(value.classname__){return Joose.Storage.Unpacker.jsonpickle.unpack(value)}if(value.objectid__){return Joose.Storage.CACHE[value.objectid__]}}return value}}})})(JooseClass);(function(Class){Class("Joose.Decorator",{meta:Joose.Role,methods:{decorate:function(classObject,attributeName,optionalDelegatorFuncMaker){var me=this;var methods=classObject.meta.getInstanceMethods();Joose.A.each(methods,function(m){var name=m.getName();var argName=attributeName;if(!me.can(name)){var func=function(){var d=this[argName];return d[name].apply(d,arguments)};if(optionalDelegatorFuncMaker){func=optionalDelegatorFuncMaker(name)}me.addMethod(name,func)}})}}});Joose.Decorator.meta.apply(Joose.Class)})(JooseClass);(function(Class){Joose.NameSpace=function(){};Class("Joose.Module",{has:{_name:{is:"rw"},_elements:{is:"rw"},_container:{is:"rw"}},classMethods:{setup:function(name,functionThatCreatesClassesAndRoles){var me=this;var parts=name.split(".");var object=joose.top;var soFar=[];var module;for(var i=0,len=parts.length;i<len;++i){var part=parts[i];if(part=="meta"){throw"Module names may not include a part called 'meta'."}var cur=object[part];soFar.push(part);var subName=soFar.join(".");if(typeof cur=="undefined"){object[part]=new Joose.NameSpace();module=new Joose.Module(subName);module.setContainer(object[part]);object[part].meta=module;Joose.Module._allModules.push(object[part])}else{module=cur.meta;if(i===(len-1)&&!(module&&module.meta&&(module.meta.isa(Joose.Module)))){throw"Trying to setup module "+name+" failed. There is already something else: "+cur}}object=object[part]}var before=joose.currentModule;joose.currentModule=module;if(functionThatCreatesClassesAndRoles){functionThatCreatesClassesAndRoles(object)}joose.currentModule=before;return object},getAllModules:function(){return this._allModules}},methods:{alias:function(destination){var me=this;if(arguments.length==0){return this}Joose.A.each(this.getElements(),function(thing){var global=me.globalName(thing.meta.className());if(destination[global]===thing){return}if(typeof destination[global]!="undefined"){throw"There is already something else in the spot "+global}destination[global]=thing})},globalName:function(name){var moduleName=this.getName();if(name.indexOf(moduleName)!=0){throw"All things inside me should have a name that starts with "+moduleName+". Name is "+name}var rest=name.substr(moduleName.length+1);if(rest.indexOf(".")!=-1){throw"The things inside me should have no more dots in there name. Name is "+rest}return rest},removeGlobalSymbols:function(){Joose.A.each(this.getElements(),function(thing){var global=this.globalName(thing.getName());delete joose.top[global]})},initialize:function(name){this.setElements([]);this.setName(name)},isEmpty:function(){return this.getElements().length==0},addElement:function(ele){if(!(ele||ele.meta)){throw"You may only add things that are Joose objects"}this._elements.push(ele)},getNames:function(){var names=[];Joose.A.each(this.getElements(),function(ele){names.push(ele.meta.getName())});return names}}})})(JooseClass);__global__={};__global__.meta=new Joose.Module();__global__.meta.setName("__global__");__global__.meta.setContainer(__global__);Joose.Module._allModules=[__global__];JooseModule("__global__.nomodule",function(){});__global__.nomodule.meta._elements=joose.globalObjects;(function(Class,Type){Class("Joose.TypeChecker",{classMethods:{makeTypeChecker:function(isa,props,thing,name){if(!isa.meta){throw new Error("Isa declarations in attribute declarations must be Joose classes, roles or type constraints")}var isRole=false;var isType=false;if(Joose.Role&&isa.meta.meta.isa(Joose.Role)){isRole=true}else{if(Joose.TypeConstraint&&isa.meta.isa(Joose.TypeConstraint)){isType=true}}func=function doTypeCheck(value,errorHandler){try{if(props.nullable===true&&value==undefined){}else{if(isType){var newvalue=null;if(props.coerce){newvalue=isa.coerce(value)}if(newvalue==null&&props.nullable!==true){isa.validate(value)}else{value=newvalue}}else{if(!value||!value.meta){throw new ReferenceError("The "+thing+" "+name+" only accepts values that have a meta object.")}var typeCheck=isRole?value.meta.does(isa):value.meta.isa(isa);if(!typeCheck){throw new ReferenceError("The "+thing+" "+name+" only accepts values that are objects of type "+isa.meta.className()+".")}}}}catch(e){if(errorHandler){errorHandler.call(this,e,isa)}else{throw e}}return value};return func}}})})(JooseClass,JooseType);(function(Class){Class("Joose.TypeConstraint",{has:{_constraints:{is:"ro",init:function(){return[]}},_coercions:{is:"ro",init:function(){return[]}},_messages:{is:"ro",init:function(){return[]}},_callback:{is:"ro",init:function(){return function(msg){throw new ReferenceError(msg)}}},_name:{is:"ro"},_uses:{is:"ro"},props:{is:"rw"}},classMethods:{newFromTypeBuilder:function(name,props){var t=new Joose.TypeConstraint({name:name});if(props.uses&&typeof props.uses.meta!="undefined"&&props.uses.meta.isa(Joose.TypeConstraint)){t._uses=props.uses}if(props.where){t.addConstraint(props.where,props.message)}t.setProps(props);if(props.coerce){for(var i=0;i<props.coerce.length;i++){var coercionProps=props.coerce[i];t.addCoercion(new Joose.TypeCoercion({from:coercionProps.from,via:coercionProps.via}))}}return t}},methods:{stringify:function(){return this._name},makeSubType:function(name){var t=new Joose.TypeConstraint({name:name});Joose.A.each(this._constraints,function(con){t.addConstraint(con)});return t},addCoercion:function(coercion){this._coercions.push(coercion)},addConstraint:function(func,message){this._constraints.push(func);this._messages.push(message)},getConstraintList:function(){var cons=this._constraints;if(this._uses){var parentcons=this._uses.getConstraintList();return parentcons.concat(cons)}return cons},getMessageList:function(){var msg=this._messages;if(this._uses){var parentmsg=this._uses.getMessageList();return parentmsg.concat(msg)}return msg},validateBool:function(value){var i=this._validate(value);if(i==-1){return true}return false},validate:function(value){var i=this._validate(value);if(i==-1){return true}var messages=this.getMessageList();var message=messages[i]?messages[i].call(this,value):"The passed value ["+value+"] is not a "+this;this._callback(message)},_validate:function(value){var con=this.getConstraintList();var i,len;for(i=0,len=con.length;i<len;i++){var func=con[i];var result=false;if(func instanceof RegExp){result=func.test(value)}else{result=func.call(this,value)}if(!result){return i}}return -1},coerce:function(value){if(this.validateBool(value)){return value}var coercions=this._coercions;for(var i=0,len=coercions.length;i<len;i++){var coercion=coercions[i];var result=coercion.coerce(value);if(result!==null){return result}}return null}}})})(JooseClass);(function(Class,Type){Type("CoercionFrom",{where:function(o){if(o.meta&&o.meta.isa(Joose.TypeConstraint)){return true}return false}});Class("Joose.TypeCoercion",{has:{_from:{isa:TYPE.CoercionFrom,is:"rw"},_via:{is:"rw"}},methods:{coerce:function(value){if(this._from.validateBool(value)){return this._via(value)}return null}}})})(JooseClass,JooseType);(function(Type){Type("Any",{where:function(o){return true}});Type("Null",{uses:Joose.Type.Any,where:function(o){if(o===null){return true}return false}});Type("NotNull",{uses:Joose.Type.Any,where:function(o){if(o===null){return false}return true}});Type("Enum",{uses:Joose.Type.NotNull,message:function(v){return"The passed value ["+v+"] is not "+(this.getProps().strictMatch?"*strictly* ":"")+"one of ["+this.getProps().values.join(",")+"]"},where:function(v){var self=this;var props=self.getProps();if(!props||props.values===undefined||!(props.values instanceof Array)){throw"Enum Type needs Array of values in 'values' property of Type declaration"}var eq=function(vv){if(props.strictMatch===true){return(vv===v)}return(vv==v)};if(Joose.A.grep(props.values,eq).length!=0){return true}return false}});Type("Obj",{uses:Joose.Type.NotNull,where:function(o){if(o instanceof Object){return true}return false}});Type("Str",{uses:Joose.Type.NotNull,where:function(S){if(typeof S=="string"||S instanceof String){return true}return false},coerce:[{from:Joose.Type.Any,via:function(value){if(value==null){return""}else{return""+value}}}]});Type("Num",{uses:Joose.Type.NotNull,where:function(N){if(typeof N=="number"||N instanceof Number){return true}return false},coerce:[{from:Joose.Type.Str,via:function(value){if(value==null||value==""){return undefined}return parseFloat(value,10)}}]});Type("Bool",{uses:Joose.Type.NotNull,where:function(B){if(B===true||B===false){return true}return false},coerce:[{from:Joose.Type.Any,via:function(value){if(value==null||value===""){return false}if(value==1||value=="1"||value=="true"){return true}if(value==0||value=="0"||value=="false"){return false}return null}}]});Type("Int",{uses:Joose.Type.Num,where:function(n){var sn=String(n);if(sn.match(/^\d*\.\d$/)){return false}return true},coerce:[{from:Joose.Type.Str,via:function(value){if(value==null||value==""){return undefined}if(value.match(/^-{0,1}\d+$/)){return parseInt(value,10)}return}}]});Type("Float",{uses:Joose.Type.Num,where:function(n){return true}});Type("Func",{uses:Joose.Type.Obj,where:function(f){if(typeof f=="function"){return true}return false}});Type("Array",{uses:Joose.Type.Obj,where:function(A){if(Object.prototype.toString.call(A)==="[object Array]"){return true}return false}});Type("Date",{uses:Joose.Type.Obj,where:function(D){if(D instanceof Date){return true}return false},coerce:[{from:Joose.Type.Str,via:function(value){var match;if(value==undefined||value==""){return undefined}else{if(match=value.match(/\s*(\d+)-(\d+)-(\d+)/)){return new Date(match[1],match[2]-1,[match[3]])}}return null}}]});Type("Joose",{uses:Joose.Type.Obj,where:function(o){if(o.meta&&o.meta.meta.isa(Joose.Class)){return true}return false}})})(JooseType);(function(Class){Class("Joose.Prototype",{isa:Joose.Class,override:{initializer:function(){var init=this.SUPER();return function(){init.apply(this,arguments);var meta=this.meta;this.meta=new Joose.PrototypeLazyMetaObjectProxy();this.meta.metaObject=meta;this.meta.object=this}}}});Class("Joose.PrototypeLazyMetaObjectProxy",{has:{metaObject:{is:"rw",isa:Joose.Class,handles:"*",handleWith:function(name){return function(){var o=this.object;o.meta=this.metaObject;o.detach();o.meta[name].apply(o.meta,arguments)}}},object:{is:"rw"}}});Joose.bootstrap3()})(JooseClass);(function(Class,Type){Class("Joose.TypedMethod",{isa:Joose.Method,has:{types:{isa:Joose.Type.Array,is:"rw",init:function(){return[]}},typeCheckers:{init:function(){return[]}}},after:{setTypes:function(){var self=this;var typeCheckers=[];var props=this.getProps();Joose.A.each(this.getTypes(),function(type,index){if(type===null){typeCheckers.push(null)}else{typeCheckers.push(Joose.TypeChecker.makeTypeChecker(type,props,"parameter",index))}});this.typeCheckers=typeCheckers}},override:{copy:function(){var self=this.SUPER();var copy=[].concat(this.types);self.setTypes(copy);return self}},methods:{wrapTypeChecker:function(body){var self=this;return function typeCheckWrapper(){var checkers=self.typeCheckers;var args=[];for(var i=0,len=checkers.length;i<len;++i){var checker=checkers[i];if(checker!==null){var argument=arguments[i];args[i]=checker(argument)}else{args[i]=arguments[i]}}return body.apply(this,args)}},asFunction:function(){return this.wrapTypeChecker(this._body)}},classMethods:{newFromProps:function(name,props){var method=props.method;if(typeof method!=="function"){throw new Error("Property method in method declaration ["+name+"] must be a function.")}var self=this.meta.instantiate(name,method,props);self.setTypes(props.signature);return self}}})})(JooseClass,JooseType);Module("Joose.Type",function(){Type("MethodPatternList",{uses:Joose.Type.Array,where:function(p){var ok=0;for(var i in p){var pattern=p[i];if(pattern.signature instanceof Array&&typeof pattern.method=="function"){ok++}}return p.length==ok}})});Class("Joose.MultiMethod",{isa:Joose.Method,has:{patterns:{is:"rw",isa:Joose.Type.MethodPatternList,init:function(){return[]}}},override:{copy:function(){var self=this.SUPER();var patternCopy=[].concat(this.getPatterns());self.setPatterns(patternCopy);return self}},methods:{getFunForSignature:function(){var args=arguments;var self=this;var patterns=self.getPatterns();for(var item in patterns){if(patterns.hasOwnProperty(item)){var method=patterns[item];var sig=method.signature;var matches=0;if(sig.length==args.length){if(sig.length>0){for(var i=0;i<sig.length;i++){if(sig[i] instanceof Joose.TypeConstraint&&sig[i].validateBool(args[i])){matches++}else{if(sig[i] instanceof Object&&args[i] instanceof sig[i]){matches++}else{if(args[i]==sig[i]){matches++}}}}}if(matches==sig.length){return method.method}}}}return function(){throw new ReferenceError("multi-method type method call with no matching signature")}},asFunction:function(){var self=this;return function(){var myself=this;var args=arguments;var fun=self.getFunForSignature.apply(self,args);return fun.apply(myself,args)}}},classMethods:{newFromPatterns:function(name,patterns){method=new Joose.MultiMethod(name,function(){},{});method.setPatterns(patterns);return method}}});(function(){var timeout;var init=false;jQuery.fn.typingEnded=function(handler,options){var self=this;options=jQuery.extend({delay:300},options);var typingStoppedForMillis=options.delay;self.keydown(function(){var eventThis=this;var args=arguments;if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){handler.apply(eventThis,args)},typingStoppedForMillis)});return self}})();(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var validator=$.data(this[0],"validator");if(validator){return validator}validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true});this.submit(function(event){if(validator.settings.debug){event.preventDefault()}function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false}return true}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle()}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false}return handle()}else{validator.focusInvalid();return false}})}return validator},valid:function(){if($(this[0]).is("form")){return this.validate().form()}else{var valid=false;var validator=$(this[0].form).validate();this.each(function(){valid|=validator.element(this)});return valid}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value)});return result},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,"validator").settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages)}break;case"remove":if(!argument){delete staticRules[element.name];return existingRules}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method]});return filtered}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data)}return data}});$.extend($.expr[":"],{blank:function(a){return !$.trim(a.value)},filled:function(a){return !!$.trim(a.value)},unchecked:function(a){return !a.checked}});$.format=function(source,params){if(arguments.length==1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.format.apply(this,args)}}if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1)}if(params.constructor!=Array){params=[params]}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n)});return source};$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init()};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide()}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element)}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element)}},onclick:function(element){if(element.name in this.submitted){this.element(element)}},highlight:function(element,errorClass){$(element).addClass(errorClass)},unhighlight:function(element,errorClass){$(element).removeClass(errorClass)}},setDefaults:function(settings){$.extend($.validator.defaults,settings)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gÃ¼ltiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.format("Please enter no more than {0} characters."),minlength:$.format("Please enter at least {0} characters."),rangelength:$.format("Please enter a value between {0} and {1} characters long."),range:$.format("Please enter a value between {0} and {1}."),max:$.format("Please enter a value less than or equal to {0}."),min:$.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key})});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value)});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0])}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i])}return this.valid()},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name]}else{this.invalid[element.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return result},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]})}this.successList=$.grep(this.successList,function(element){return !(element.name in errors)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(obj){var count=0;for(var i in obj){count++}return count},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name}).length==1&&lastActive},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false}rulesCache[this.name]=true;return true})},clean:function(selector){return $(selector)[0]},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element)},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0]}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return}if(!result){this.formatAndAdd(element,rule);return false}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id+", check the '"+rule.method+"' method");throw e}}if(dependencyMismatch){return}if(this.objectLength(rules)){this.successList.push(element)}return true},customMetaMessage:function(element,method){if(!$.metadata){return}var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method]},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method])},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined){return arguments[i]}}return undefined},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>")},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function"){message=message.call(this,rule.parameters,element)}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parents(this.settings.wrapper))}return toToggle},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i])}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return $(this.errorList).map(function(){return this.element})},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message)}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(label).length){this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element)}}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label)}this.toShow=this.toShow.add(label)},errorsFor:function(element){return this.errors().filter("[for='"+this.idOrName(element)+"']")},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name)},checkable:function(element){return/radio|checkbox/i.test(element.type)},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null})},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length}}return value.length},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true},dependTypes:{"boolean":function(param,element){return param},string:function(param,element){return !!$(param,element.form).length},"function":function(param,element){return param(element)}},optional:function(element){return !$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch"},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit()}else{if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this])}}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className)},classRules:function(element){var rules={};var classes=$(element).attr("class");classes&&$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this])}});return rules},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength}return rules},metadataRules:function(element){if(!$.metadata){return{}}var meta=$.data(element.form,"validator").settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata()},staticRules:function(element){var rules={};var validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{}}return rules},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break}if(keepRule){rules[prop]=val.param!==undefined?val.param:true}else{delete rules[prop]}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter});$.each(["minlength","maxlength","min","max"],function(){if(rules[this]){rules[this]=Number(rules[this])}});$.each(["rangelength","range"],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])]}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength}}if(rules.messages){delete rules.messages}return rules},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true});data=transformed}return data},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message;if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name))}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch"}switch(element.nodeName.toLowerCase()){case"select":var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes.value.specified)?options[0].text:options[0].value).length>0);case"input":if(this.checkable(element)){return this.getLength(value,element)>0}default:return $.trim(value).length>0}},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch"}var previous=this.previousValue(element);if(!this.settings.messages[element.name]){this.settings.messages[element.name]={}}this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(response){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors()}else{var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors)}previous.valid=response;validator.stopRequest(element,response)}},param));return"pending"}else{if(this.pending[element.name]){return"pending"}}return previous.valid},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1])},min:function(value,element,param){return this.optional(element)||value>=param},max:function(value,element,param){return this.optional(element)||value<=param},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1])},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value)},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value))},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value)},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value)},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value)},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value)},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value)},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch"}if(/[^0-9-]+/.test(value)){return false}var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9}}nCheck+=nDigit;bEven=!bEven}return(nCheck%10)==0},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"))},equalTo:function(value,element,param){return value==$(param).val()}}})})(jQuery);(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}return(pendingRequests[port]=ajax.apply(this,arguments))}return ajax.apply(this,arguments)}})(jQuery);(function($){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie){return false}this.addEventListener(original,$.event.special[fix].handler,true)},teardown:function(){if($.browser.msie){return false}this.removeEventListener(original,$.event.special[fix].handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}}});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})])}})})(jQuery);jQuery.fn.extend({selectbox:function(options){return this.each(function(){new jQuery.SelectBox(this,options)})}});if(!window.console){var console={log:function(msg){}}}jQuery.SelectBox=function(selectobj,options){var opt=options||{};opt.inputClass=opt.inputClass||"selectbox";opt.containerClass=opt.containerClass||"selectbox-wrapper";opt.hoverClass=opt.hoverClass||"current";opt.currentClass=opt.selectedClass||"selected";opt.debug=opt.debug||false;opt.maxlength=opt.maxlength||20;var elm_id=selectobj.id;var active=-1;var inFocus=false;var hasfocus=0;var $select=$(selectobj);var $container=setupContainer(opt);var $input=setupInput(opt);if(opt.maxlength){var val=$input.val;$input.val=function(value){if(arguments.length>0){value=(""+value).replace(/[\s\t\n]/g,"");return val.call(this,value.substring(0,parseInt(opt.maxlength)))}return val.call(this)}}$select.hide().before($input).before($container);init();$input.click(function(){if(!inFocus){$container.toggle()}}).focus(function(){if($container.not(":visible")){inFocus=true;$container.show()}}).keydown(function(event){switch(event.keyCode){case 38:event.preventDefault();moveSelect(-1);break;case 40:event.preventDefault();moveSelect(1);break;case 13:event.preventDefault();$("li."+opt.hoverClass).trigger("click");break;case 27:hideMe();break}}).blur(function(){if($container.is(":visible")&&hasfocus>0){if(opt.debug){console.log("container visible and has focus")}}else{hideMe()}});function hideMe(){hasfocus=0;$container.hide()}function init(){$container.append(getSelectOptions($input.attr("id"))).hide();var width=$input.css("width");$container.width(width)}function setupContainer(options){var container=document.createElement("div");$container=$(container);$container.attr("id",elm_id+"_container");$container.addClass(options.containerClass);return $container}function setupInput(options){var input=document.createElement("input");var $input=$(input);$input.attr("id",elm_id+"_input");$input.attr("type","text");$input.addClass(options.inputClass);$input.attr("autocomplete","off");$input.attr("readonly","readonly");$input.attr("tabIndex",$select.attr("tabindex"));return $input}function moveSelect(step){var lis=$("li",$container);if(!lis){return}active+=step;if(active<0){active=0}else{if(active>=lis.size()){active=lis.size()-1}}lis.removeClass(opt.hoverClass);$(lis[active]).addClass(opt.hoverClass)}function setCurrent(){var li=$("li."+opt.currentClass,$container).get(0);var ar=(""+li.id).split("_");var el=ar[ar.length-1];$select.val(el);$input.val($(li).html());return true}function getCurrentSelected(){return $select.val()}function getCurrentValue(){return $input.val()}function getSelectOptions(parentid){var select_options=new Array();var ul=document.createElement("ul");$select.children("option").each(function(){var li=document.createElement("li");li.setAttribute("id",parentid+"_"+$(this).val());li.innerHTML=$(this).html();if($(this).is(":selected")){$input.val($(this).html());$(li).addClass(opt.currentClass)}ul.appendChild(li);$(li).mouseover(function(event){hasfocus=1;if(opt.debug){console.log("over on : "+this.id)}jQuery(event.target,$container).addClass(opt.hoverClass)}).mouseout(function(event){hasfocus=-1;if(opt.debug){console.log("out on : "+this.id)}jQuery(event.target,$container).removeClass(opt.hoverClass)}).click(function(event){var fl=$("li."+opt.hoverClass,$container).get(0);if(opt.debug){console.log("click on :"+this.id)}$("li."+opt.currentClass).removeClass(opt.currentClass);$(this).addClass(opt.currentClass);setCurrent();hideMe()})});return ul}};jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires="; expires="+date.toUTCString()}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};var sIFR=new function(){var self=this;var ClassNames={ACTIVE:"sIFR-active",REPLACED:"sIFR-replaced",IGNORE:"sIFR-ignore",ALTERNATE:"sIFR-alternate",CLASS:"sIFR-class",LAYOUT:"sIFR-layout",FLASH:"sIFR-flash",FIX_FOCUS:"sIFR-fixfocus",DUMMY:"sIFR-dummy"};ClassNames.IGNORE_CLASSES=[ClassNames.REPLACED,ClassNames.IGNORE,ClassNames.ALTERNATE];this.MIN_FONT_SIZE=6;this.MAX_FONT_SIZE=126;this.FLASH_PADDING_BOTTOM=5;this.VERSION="436";this.isActive=false;this.isEnabled=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.replacements=[];var elementCount=0;var isInitialized=false;function Errors(){this.fire=function(id){if(this[id+"Alert"]){alert(this[id+"Alert"])}throw new Error(this[id])};this.isFile="sIFR: Did not activate because the page is being loaded from the filesystem.";this.isFileAlert="Hi!\n\nThanks for using sIFR on your page. Unfortunately sIFR couldn't activate, because it was loaded directly from your computer.\nDue to Flash security restrictions, you need to load sIFR through a web server.\n\nWe apologize for the inconvenience."}function Util(sIFR){function capitalize($){return $.toLocaleUpperCase()}this.normalize=function(str){return str.replace(/\n|\r|\xA0/g,Util.SINGLE_WHITESPACE).replace(/\s+/g,Util.SINGLE_WHITESPACE)};this.textTransform=function(type,str){switch(type){case"uppercase":return str.toLocaleUpperCase();case"lowercase":return str.toLocaleLowerCase();case"capitalize":return str.replace(/^\w|\s\w/g,capitalize)}return str};this.toHexString=function(str){if(str.charAt(0)!="#"||str.length!=4&&str.length!=7){return str}str=str.substring(1);return"0x"+(str.length==3?str.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):str)};this.toJson=function(obj,strFunc){var json="";switch(typeof(obj)){case"string":json='"'+strFunc(obj)+'"';break;case"number":case"boolean":json=obj.toString();break;case"object":json=[];for(var prop in obj){if(obj[prop]==Object.prototype[prop]){continue}json.push('"'+prop+'":'+this.toJson(obj[prop]))}json="{"+json.join(",")+"}";break}return json};this.convertCssArg=function(arg){if(!arg){return{}}if(typeof(arg)=="object"){if(arg.constructor==Array){arg=arg.join("")}else{return arg}}var obj={};var rules=arg.split("}");for(var i=0;i<rules.length;i++){var $=rules[i].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!$||$.length!=3){continue}if(!obj[$[1]]){obj[$[1]]={}}var properties=$[2].split(";");for(var j=0;j<properties.length;j++){var $2=properties[j].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!$2||$2.length!=3){continue}obj[$[1]][$2[1]]=$2[2].replace(/\s+$/,"")}}return obj};this.extractFromCss=function(css,selector,property,remove){var value=null;if(css&&css[selector]&&css[selector][property]){value=css[selector][property];if(remove){delete css[selector][property]}}return value};this.cssToString=function(arg){var css=[];for(var selector in arg){var rule=arg[selector];if(rule==Object.prototype[selector]){continue}css.push(selector,"{");for(var property in rule){if(rule[property]==Object.prototype[property]){continue}var value=rule[property];if(Util.UNIT_REMOVAL_PROPERTIES[property]){value=parseInt(value,10)}css.push(property,":",value,";")}css.push("}")}return css.join("")};this.escape=function(str){return escape(str).replace(/\+/g,"%2B")};this.encodeVars=function(vars){return vars.join("&").replace(/%/g,"%25")};this.copyProperties=function(from,to){for(var property in from){if(to[property]===undefined){to[property]=from[property]}}return to};this.domain=function(){var domain="";try{domain=document.domain}catch(e){}return domain};this.domainMatches=function(domain,match){if(match=="*"||match==domain){return true}var wildcard=match.lastIndexOf("*");if(wildcard>-1){match=match.substr(wildcard+1);var matchPosition=domain.lastIndexOf(match);if(matchPosition>-1&&(matchPosition+match.length)==domain.length){return true}}return false};this.uriEncode=function(s){return encodeURI(decodeURIComponent(s))};this.delay=function(ms,func,scope){var args=Array.prototype.slice.call(arguments,3);setTimeout(function(){func.apply(scope,args)},ms)}}Util.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};Util.SINGLE_WHITESPACE=" ";function DomUtil(sIFR){var self=this;function getDimensionFromStyle(node,property,offsetProperty){var dimension=self.getStyleAsInt(node,property,sIFR.ua.ie);if(dimension==0){dimension=node[offsetProperty];for(var i=3;i<arguments.length;i++){dimension-=self.getStyleAsInt(node,arguments[i],true)}}return dimension}this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(selector){return window.parseSelector(selector)};this.addClass=function(name,node){if(node){node.className=((node.className||"")==""?"":node.className+" ")+name}};this.removeClass=function(name,node){if(node){node.className=node.className.replace(new RegExp("(^|\\s)"+name+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(name,node){return new RegExp("(^|\\s)"+name+"(\\s|$)").test(node.className)};this.hasOneOfClassses=function(names,node){for(var i=0;i<names.length;i++){if(this.hasClass(names[i],node)){return true}}return false};this.ancestorHasClass=function(node,name){node=node.parentNode;while(node&&node.nodeType==1){if(this.hasClass(name,node)){return true}node=node.parentNode}return false};this.create=function(name,className){var node=document.createElementNS?document.createElementNS(DomUtil.XHTML_NS,name):document.createElement(name);if(className){node.className=className}return node};this.getComputedStyle=function(node,property){var result;if(document.defaultView&&document.defaultView.getComputedStyle){var style=document.defaultView.getComputedStyle(node,null);result=style?style[property]:null}else{if(node.currentStyle){result=node.currentStyle[property]}}return result||""};this.getStyleAsInt=function(node,property,requirePx){var value=this.getComputedStyle(node,property);if(requirePx&&!/px$/.test(value)){return 0}return parseInt(value)||0};this.getWidthFromStyle=function(node){return getDimensionFromStyle(node,"width","offsetWidth","paddingRight","paddingLeft","borderRightWidth","borderLeftWidth")};this.getHeightFromStyle=function(node){return getDimensionFromStyle(node,"height","offsetHeight","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth")};this.getDimensions=function(node){var width=node.offsetWidth;var height=node.offsetHeight;if(width==0||height==0){for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];if(child.nodeType!=1){continue}width=Math.max(width,child.offsetWidth);height=Math.max(height,child.offsetHeight)}}return{width:width,height:height}};this.getViewport=function(){return{width:window.innerWidth||document.documentElement.clientWidth||this.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||this.getBody().clientHeight}};this.blurElement=function(element){try{element.blur();return}catch(e){}var input=this.create("input");input.style.width="0px";input.style.height="0px";element.parentNode.appendChild(input);input.focus();input.blur();input.parentNode.removeChild(input)}}DomUtil.XHTML_NS="http://www.w3.org/1999/xhtml";function UserAgentDetection(sIFR){var ua=navigator.userAgent.toLowerCase();var product=(navigator.product||"").toLowerCase();var platform=navigator.platform.toLowerCase();this.parseVersion=UserAgentDetection.parseVersion;this.macintosh=/^mac/.test(platform);this.windows=/^win/.test(platform);this.linux=/^linux/.test(platform);this.quicktime=false;this.opera=/opera/.test(ua);this.konqueror=/konqueror/.test(ua);this.ie=false
/*@cc_on || true @*/
;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(ua)
/*@cc_on && @_jscript_version >= 5.5 @*/
;this.ieWin=this.windows&&this.ie
/*@cc_on && @_jscript_version >= 5.1 @*/
;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.macintosh&&this.ie
/*@cc_on && @_jscript_version < 5.1 @*/
;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=/safari/.test(ua);this.webkit=!this.konqueror&&/applewebkit/.test(ua);this.khtml=this.webkit||this.konqueror;this.gecko=!this.khtml&&product=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(ua)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var axo;var stop=false;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=this.parseVersion("6");axo.AllowScriptAccess="always"}catch(e){stop=this.flashVersion==this.parseVersion("6")}if(!stop){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}}if(!stop&&axo){this.flashVersion=this.parseVersion((axo.GetVariable("$version")||"").replace(/^\D+(\d+)\D+(\d+)\D+(\d+).*/g,"$1.$2.$3"))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var d=navigator.plugins["Shockwave Flash"].description.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var v=d.replace(/^\D*(\d+\.\d+).*$/,"$1");if(/r/.test(d)){v+=d.replace(/^.*r(\d*).*$/,".$1")}else{if(/d/.test(d)){v+=".0"}}this.flashVersion=this.parseVersion(v);var foundEnabled=false;for(var i=0,valid=this.flashVersion>=UserAgentDetection.MIN_FLASH_VERSION;valid&&i<navigator.mimeTypes.length;i++){var mime=navigator.mimeTypes[i];if(mime.type!="application/x-shockwave-flash"){continue}if(mime.enabledPlugin){foundEnabled=true;if(mime.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){valid=false;this.quicktime=true}}}if(this.quicktime||!foundEnabled){this.flashVersion=this.parseVersion("0")}}}this.flash=this.flashVersion>=UserAgentDetection.MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows||this.linux&&(this.flashVersion>=this.parseVersion("10")&&(this.gecko&&this.geckoVersion>=this.parseVersion("1.9")||this.opera));this.computedStyleSupport=this.ie||!!document.defaultView.getComputedStyle;this.fixFocus=this.gecko&&this.windows;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=this.parseVersion("525")||this.konqueror&&this.konquerorMajor>this.parseVersion("03")||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkitVersion<this.parseVersion("523");this.properDocument=typeof(document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&this.computedStyleSupport&&(!this.opera||this.operaVersion>=this.parseVersion("9.61"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}UserAgentDetection.parseVersion=function(s){return s.replace(/(^|\D)(\d+)(?=\D|$)/g,function(s,nonDigit,digits){s=nonDigit;for(var i=4-digits.length;i>=0;i--){s+="0"}return s+digits})};UserAgentDetection.MIN_FLASH_VERSION=UserAgentDetection.parseVersion("8");function FragmentIdentifier(sIFR){this.fix=sIFR.ua.ieWin&&window.location.hash!="";var cachedTitle;this.cache=function(){cachedTitle=document.title};function doFix(){document.title=cachedTitle}this.restore=function(){if(this.fix){setTimeout(doFix,0)}}}function PageLoad(sIFR){var dummy=null;function pollLoad(){try{if(sIFR.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(e){return setTimeout(pollLoad,10)}afterDomLoad()}function afterDomLoad(){if(sIFR.useStyleCheck){checkStyle()}else{if(!sIFR.ua.mustCheckStyle){fire(null,true)}}}function checkStyle(){dummy=sIFR.dom.create("div",ClassNames.DUMMY);sIFR.dom.getBody().appendChild(dummy);pollStyle()}function pollStyle(){if(sIFR.dom.getComputedStyle(dummy,"marginLeft")=="42px"){afterStyle()}else{setTimeout(pollStyle,10)}}function afterStyle(){if(dummy&&dummy.parentNode){dummy.parentNode.removeChild(dummy)}dummy=null;fire(null,true)}function fire(evt,preserveReplacements){sIFR.initialize(preserveReplacements);if(evt&&evt.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",fire,false)}if(window.removeEventListener){window.removeEventListener("load",fire,false)}}}function verifyUnload(){sIFR.prepareClearReferences();if(document.readyState=="interactive"){document.attachEvent("onstop",unloadByStop);setTimeout(function(){document.detachEvent("onstop",unloadByStop)},0)}}function unloadByStop(){document.detachEvent("onstop",unloadByStop);fireUnload()}function fireUnload(){sIFR.clearReferences()}this.attach=function(){if(window.addEventListener){window.addEventListener("load",fire,false)}else{window.attachEvent("onload",fire)}if(!sIFR.useDomLoaded||sIFR.ua.forcePageLoad||sIFR.ua.ie&&window.top!=window){return}if(sIFR.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",afterDomLoad,false)}else{if(sIFR.ua.ie||sIFR.ua.khtml){pollLoad()}}};this.attachUnload=function(){if(!sIFR.ua.ie){return}window.attachEvent("onbeforeunload",verifyUnload);window.attachEvent("onunload",fireUnload)}}var PREFETCH_COOKIE="sifrFetch";function Prefetch(sIFR){var hasPrefetched=false;this.fetchMovies=function(movies){if(sIFR.setPrefetchCookie&&new RegExp(";?"+PREFETCH_COOKIE+"=true;?").test(document.cookie)){return}try{hasPrefetched=true;prefetch(movies)}catch(e){}if(sIFR.setPrefetchCookie){document.cookie=PREFETCH_COOKIE+"=true;path="+sIFR.cookiePath}};this.clear=function(){if(!hasPrefetched){return}try{var nodes=document.getElementsByTagName("script");for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.type=="sifr/prefetch"){node.parentNode.removeChild(node)}}}catch(e){}};function prefetch(args){for(var i=0;i<args.length;i++){document.write('<script defer type="sifr/prefetch" src="'+args[i].src+'"><\/script>')}}}function BrokenFlashIE(sIFR){var active=sIFR.ua.ie;var fixFlash=active&&sIFR.ua.flashVersion<sIFR.ua.parseVersion("9.0.115");var resetMovies={};var registry={};this.fixFlash=fixFlash;this.register=function(flashNode){if(!active){return}var id=flashNode.getAttribute("id");this.cleanup(id,false);registry[id]=flashNode;delete resetMovies[id];if(fixFlash){window[id]=flashNode}};this.reset=function(){if(!active){return false}for(var i=0;i<sIFR.replacements.length;i++){var flash=sIFR.replacements[i];var flashNode=registry[flash.id];if(!resetMovies[flash.id]&&(!flashNode.parentNode||flashNode.parentNode.nodeType==11)){flash.resetMovie();resetMovies[flash.id]=true}}return true};this.cleanup=function(id,usePlaceholder){var node=registry[id];if(!node){return}for(var expando in node){if(typeof(node[expando])=="function"){node[expando]=null}}registry[id]=null;if(fixFlash){window[id]=null}if(node.parentNode){if(usePlaceholder&&node.parentNode.nodeType==1){var placeholder=document.createElement("div");placeholder.style.width=node.offsetWidth+"px";placeholder.style.height=node.offsetHeight+"px";node.parentNode.replaceChild(placeholder,node)}else{node.parentNode.removeChild(node)}}};this.prepareClearReferences=function(){if(!fixFlash){return}__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}};this.clearReferences=function(){if(fixFlash){var objects=document.getElementsByTagName("object");for(var i=objects.length-1;i>=0;i--){registry[objects[i].getAttribute("id")]=objects[i]}}for(var id in registry){if(Object.prototype[id]!=registry[id]){this.cleanup(id,true)}}}}function FlashInteractor(sIFR,id,vars,forceWidth,events){this.sIFR=sIFR;this.id=id;this.vars=vars;this.movie=null;this.__forceWidth=forceWidth;this.__events=events;this.__resizing=0}FlashInteractor.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var ancestor=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(ClassNames.FIX_FOCUS,ancestor)?ancestor:ancestor.parentNode},available:function(){var flashNode=this.getFlashElement();return flashNode&&flashNode.parentNode},call:function(type){var flashNode=this.getFlashElement();if(!flashNode[type]){return false}return Function.prototype.apply.call(flashNode[type],flashNode,Array.prototype.slice.call(arguments,1))},attempt:function(){if(!this.available()){return false}try{this.call.apply(this,arguments)}catch(e){if(this.sIFR.debug){throw e}return false}return true},updateVars:function(name,value){for(var i=0;i<this.vars.length;i++){if(this.vars[i].split("=")[0]==name){this.vars[i]=name+"="+value;break}}var vars=this.sIFR.util.encodeVars(this.vars);this.movie.injectVars(this.getFlashElement(),vars);this.movie.injectVars(this.movie.html,vars)},storeSize:function(type,value){this.movie.setSize(type,value);this.updateVars(type,value)},fireEvent:function(name){if(this.available()&&this.__events[name]){this.sIFR.util.delay(0,this.__events[name],this,this)}},resizeFlashElement:function(height,width,firstResize){if(!this.available()){return}this.__resizing++;var flashNode=this.getFlashElement();flashNode.setAttribute("height",height);this.getAncestor().style.minHeight="";this.updateVars("renderheight",height);this.storeSize("height",height);if(width!==null){flashNode.setAttribute("width",width);this.movie.setSize("width",width)}if(this.__events.onReplacement){this.sIFR.util.delay(0,this.__events.onReplacement,this,this);delete this.__events.onReplacement}if(firstResize){this.sIFR.util.delay(0,function(){this.attempt("scaleMovie");this.__resizing--},this)}else{this.__resizing--}},blurFlashElement:function(){if(this.available()){this.sIFR.dom.blurElement(this.getFlashElement())}},resetMovie:function(){this.sIFR.util.delay(0,this.movie.reset,this.movie,this.getFlashElement(),this.getAlternate())},resizeAfterScale:function(){if(this.available()&&this.__resizing==0){this.sIFR.util.delay(0,this.resize,this)}},resize:function(){if(!this.available()){return}this.__resizing++;var flashNode=this.getFlashElement();var currentWidth=flashNode.offsetWidth;if(currentWidth==0){return}var originalWidth=flashNode.getAttribute("width");var originalHeight=flashNode.getAttribute("height");var ancestor=this.getAncestor();var minHeight=this.sIFR.dom.getHeightFromStyle(ancestor);flashNode.style.width="1px";flashNode.style.height="1px";ancestor.style.minHeight=minHeight+"px";var nodes=this.getAlternate().childNodes;var clones=[];for(var i=0;i<nodes.length;i++){var node=nodes[i].cloneNode(true);clones.push(node);ancestor.appendChild(node)}var width=this.sIFR.dom.getWidthFromStyle(ancestor);for(var i=0;i<clones.length;i++){ancestor.removeChild(clones[i])}flashNode.style.width=flashNode.style.height=ancestor.style.minHeight="";flashNode.setAttribute("width",this.__forceWidth?width:originalWidth);flashNode.setAttribute("height",originalHeight);if(sIFR.ua.ie){flashNode.style.display="none";var repaint=flashNode.offsetHeight;flashNode.style.display=""}if(width!=currentWidth){if(this.__forceWidth){this.storeSize("width",width)}this.attempt("resize",width)}this.__resizing--},replaceText:function(content,alternate){var escapedContent=this.sIFR.util.escape(content);if(!this.attempt("replaceText",escapedContent)){return false}this.updateVars("content",escapedContent);var node=this.getAlternate();if(alternate){while(node.firstChild){node.removeChild(node.firstChild)}for(var i=0;i<alternate.length;i++){node.appendChild(alternate[i])}}else{try{node.innerHTML=content}catch(e){}}return true},changeCSS:function(css){css=this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(css)));this.updateVars("css",css);return this.attempt("changeCSS",css)},remove:function(){if(this.movie&&this.available()){this.movie.remove(this.getFlashElement(),this.id)}}};var MovieCreator=new function(){this.create=function(sIFR,brokenFlash,node,fixFocus,id,src,width,height,vars,wmode,backgroundColor){var klass=sIFR.ua.ie?IEFlashMovie:FlashMovie;return new klass(sIFR,brokenFlash,node,fixFocus,id,src,width,height,["flashvars",vars,"wmode",wmode,"bgcolor",backgroundColor,"allowScriptAccess","always","quality","best"])};function FlashMovie(sIFR,brokenFlash,node,fixFocus,id,src,width,height,params){var object=sIFR.dom.create("object",ClassNames.FLASH);var attrs=["type","application/x-shockwave-flash","id",id,"name",id,"data",src,"width",width,"height",height];for(var i=0;i<attrs.length;i+=2){object.setAttribute(attrs[i],attrs[i+1])}var insertion=object;if(fixFocus){insertion=dom.create("div",ClassNames.FIX_FOCUS);insertion.appendChild(object)}for(var i=0;i<params.length;i+=2){if(params[i]=="name"){continue}var param=dom.create("param");param.setAttribute("name",params[i]);param.setAttribute("value",params[i+1]);object.appendChild(param)}node.style.minHeight=height+"px";while(node.firstChild){node.removeChild(node.firstChild)}node.appendChild(insertion);this.html=insertion.cloneNode(true)}FlashMovie.prototype={reset:function(flashNode,alternate){flashNode.parentNode.replaceChild(this.html.cloneNode(true),flashNode)},remove:function(flashNode,id){flashNode.parentNode.removeChild(flashNode)},setSize:function(type,value){this.html.setAttribute(type,value)},injectVars:function(flash,encodedVars){var params=flash.getElementsByTagName("param");for(var i=0;i<params.length;i++){if(params[i].getAttribute("name")=="flashvars"){params[i].setAttribute("value",encodedVars);break}}}};function IEFlashMovie(sIFR,brokenFlash,node,fixFocus,id,src,width,height,params){this.dom=sIFR.dom;this.broken=brokenFlash;this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" width="'+width+'" height="'+height+'" class="'+ClassNames.FLASH+'"><param name="movie" value="'+src+'"></param></object>';var paramsHtml="";for(var i=0;i<params.length;i+=2){paramsHtml+='<param name="'+params[i]+'" value="'+params[i+1]+'"></param>'}this.html=this.html.replace(/(<\/object>)/,paramsHtml+"$1");node.style.minHeight=height+"px";node.innerHTML=this.html;this.broken.register(node.firstChild)}IEFlashMovie.prototype={reset:function(flashNode,alternate){alternate=alternate.cloneNode(true);var parent=flashNode.parentNode;parent.innerHTML=this.html;this.broken.register(parent.firstChild);parent.appendChild(alternate)},remove:function(flashNode,id){this.broken.cleanup(id)},setSize:function(type,value){this.html=this.html.replace(type=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+value+'"')},injectVars:function(flash,encodedVars){if(flash!=this.html){return}this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+encodedVars)}}};this.errors=new Errors(self);var util=this.util=new Util(self);var dom=this.dom=new DomUtil(self);var ua=this.ua=new UserAgentDetection(self);var hacks={fragmentIdentifier:new FragmentIdentifier(self),pageLoad:new PageLoad(self),prefetch:new Prefetch(self),brokenFlashIE:new BrokenFlashIE(self)};this.__resetBrokenMovies=hacks.brokenFlashIE.reset;var replaceKwargsStore={kwargs:[],replaceAll:function(preserve){for(var i=0;i<this.kwargs.length;i++){self.replace(this.kwargs[i])}if(!preserve){this.kwargs=[]}}};this.activate=function(){if(!ua.supported||!this.isEnabled||this.isActive||!isValidDomain()||isFile()){return}hacks.prefetch.fetchMovies(arguments);this.isActive=true;this.setFlashClass();hacks.fragmentIdentifier.cache();hacks.pageLoad.attachUnload();if(!this.autoInitialize){return}hacks.pageLoad.attach()};this.setFlashClass=function(){if(this.hasFlashClassSet){return}dom.addClass(ClassNames.ACTIVE,dom.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return}dom.removeClass(ClassNames.ACTIVE,dom.getBody());dom.removeClass(ClassNames.ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(preserveReplacements){if(!this.isActive||!this.isEnabled){return}if(isInitialized){if(!preserveReplacements){replaceKwargsStore.replaceAll(false)}return}isInitialized=true;replaceKwargsStore.replaceAll(preserveReplacements);if(self.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",resize,false)}else{window.attachEvent("onresize",resize)}}hacks.prefetch.clear()};this.replace=function(kwargs,mergeKwargs){if(!ua.supported){return}if(mergeKwargs){kwargs=util.copyProperties(kwargs,mergeKwargs)}if(!isInitialized){return replaceKwargsStore.kwargs.push(kwargs)}if(this.onReplacementStart){this.onReplacementStart(kwargs)}var nodes=kwargs.elements||dom.querySelectorAll(kwargs.selector);if(nodes.length==0){return}var src=getSource(kwargs.src);var css=util.convertCssArg(kwargs.css);var filters=getFilters(kwargs.filters);var forceSingleLine=kwargs.forceSingleLine===true;var preventWrap=kwargs.preventWrap===true&&!forceSingleLine;var fitExactly=forceSingleLine||(kwargs.fitExactly==null?this.fitExactly:kwargs.fitExactly)===true;var forceWidth=fitExactly||(kwargs.forceWidth==null?this.forceWidth:kwargs.forceWidth)===true;var ratios=kwargs.ratios||[];var pixelFont=kwargs.pixelFont===true;var tuneHeight=parseInt(kwargs.tuneHeight)||0;var events=!!kwargs.onRelease||!!kwargs.onRollOver||!!kwargs.onRollOut;if(fitExactly){util.extractFromCss(css,".sIFR-root","text-align",true)}var fontSize=util.extractFromCss(css,".sIFR-root","font-size",true)||"0";var backgroundColor=util.extractFromCss(css,".sIFR-root","background-color",true)||"#FFFFFF";var kerning=util.extractFromCss(css,".sIFR-root","kerning",true)||"";var opacity=util.extractFromCss(css,".sIFR-root","opacity",true)||"100";var cursor=util.extractFromCss(css,".sIFR-root","cursor",true)||"default";var leading=parseInt(util.extractFromCss(css,".sIFR-root","leading"))||0;var gridFitType=kwargs.gridFitType||(util.extractFromCss(css,".sIFR-root","text-align")=="right")?"subpixel":"pixel";var textTransform=this.forceTextTransform===false?"none":util.extractFromCss(css,".sIFR-root","text-transform",true)||"none";fontSize=/^\d+(px)?$/.test(fontSize)?parseInt(fontSize):0;opacity=parseFloat(opacity)<1?100*parseFloat(opacity):opacity;var cssText=kwargs.modifyCss?"":util.cssToString(css);var wmode=kwargs.wmode||"";if(!wmode){if(kwargs.transparent){wmode="transparent"}else{if(kwargs.opaque){wmode="opaque"}}}if(wmode=="transparent"){if(!ua.transparencySupport){wmode="opaque"}else{backgroundColor="transparent"}}else{if(backgroundColor=="transparent"){backgroundColor="#FFFFFF"}}for(var i=0;i<nodes.length;i++){var node=nodes[i];if(dom.hasOneOfClassses(ClassNames.IGNORE_CLASSES,node)||dom.ancestorHasClass(node,ClassNames.ALTERNATE)){continue}var dimensions=dom.getDimensions(node);var height=dimensions.height;var width=dimensions.width;var display=dom.getComputedStyle(node,"display");if(!height||!width||!display||display=="none"){continue}width=dom.getWidthFromStyle(node);var size,lines;if(!fontSize){var calculation=calculate(node);size=Math.min(this.MAX_FONT_SIZE,Math.max(this.MIN_FONT_SIZE,calculation.fontSize));if(pixelFont){size=Math.max(8,8*Math.round(size/8))}lines=calculation.lines}else{size=fontSize;lines=1}var alternate=dom.create("span",ClassNames.ALTERNATE);var contentNode=node.cloneNode(true);node.parentNode.appendChild(contentNode);for(var j=0,l=contentNode.childNodes.length;j<l;j++){var child=contentNode.childNodes[j];if(!/^(style|script)$/i.test(child.nodeName)){alternate.appendChild(child.cloneNode(true))}}if(kwargs.modifyContent){kwargs.modifyContent(contentNode,kwargs.selector)}if(kwargs.modifyCss){cssText=kwargs.modifyCss(css,contentNode,kwargs.selector)}var content=parseContent(contentNode,textTransform,kwargs.uriEncode);contentNode.parentNode.removeChild(contentNode);if(kwargs.modifyContentString){content.text=kwargs.modifyContentString(content.text,kwargs.selector)}if(content.text==""){continue}var renderHeight=Math.round(lines*getRatio(size,ratios)*size)+this.FLASH_PADDING_BOTTOM+tuneHeight;if(lines>1&&leading){renderHeight+=Math.round((lines-1)*leading)}var forcedWidth=forceWidth?width:"100%";var id="sIFR_replacement_"+elementCount++;var vars=["id="+id,"content="+util.escape(content.text),"width="+width,"renderheight="+renderHeight,"link="+util.escape(content.primaryLink.href||""),"target="+util.escape(content.primaryLink.target||""),"size="+size,"css="+util.escape(cssText),"cursor="+cursor,"tunewidth="+(kwargs.tuneWidth||0),"tuneheight="+tuneHeight,"offsetleft="+(kwargs.offsetLeft||""),"offsettop="+(kwargs.offsetTop||""),"fitexactly="+fitExactly,"preventwrap="+preventWrap,"forcesingleline="+forceSingleLine,"antialiastype="+(kwargs.antiAliasType||""),"thickness="+(kwargs.thickness||""),"sharpness="+(kwargs.sharpness||""),"kerning="+kerning,"gridfittype="+gridFitType,"flashfilters="+filters,"opacity="+opacity,"blendmode="+(kwargs.blendMode||""),"selectable="+(kwargs.selectable==null||wmode!=""&&!sIFR.ua.macintosh&&sIFR.ua.gecko&&sIFR.ua.geckoVersion>=sIFR.ua.parseVersion("1.9")?"true":kwargs.selectable===true),"fixhover="+(this.fixHover===true),"events="+events,"delayrun="+hacks.brokenFlashIE.fixFlash,"version="+this.VERSION];var encodedVars=util.encodeVars(vars);var interactor=new FlashInteractor(self,id,vars,forceWidth,{onReplacement:kwargs.onReplacement,onRollOver:kwargs.onRollOver,onRollOut:kwargs.onRollOut,onRelease:kwargs.onRelease});interactor.movie=MovieCreator.create(sIFR,hacks.brokenFlashIE,node,ua.fixFocus&&kwargs.fixFocus,id,src,forcedWidth,renderHeight,encodedVars,wmode,backgroundColor);this.replacements.push(interactor);this.replacements[id]=interactor;if(kwargs.selector){if(!this.replacements[kwargs.selector]){this.replacements[kwargs.selector]=[interactor]}else{this.replacements[kwargs.selector].push(interactor)}}alternate.setAttribute("id",id+"_alternate");node.appendChild(alternate);dom.addClass(ClassNames.REPLACED,node)}hacks.fragmentIdentifier.restore()};this.getReplacementByFlashElement=function(node){for(var i=0;i<self.replacements.length;i++){if(self.replacements[i].id==node.getAttribute("id")){return self.replacements[i]}}};this.redraw=function(){for(var i=0;i<self.replacements.length;i++){self.replacements[i].resetMovie()}};this.prepareClearReferences=function(){hacks.brokenFlashIE.prepareClearReferences()};this.clearReferences=function(){hacks.brokenFlashIE.clearReferences();hacks=null;replaceKwargsStore=null;delete self.replacements};function isValidDomain(){if(self.domains.length==0){return true}var domain=util.domain();for(var i=0;i<self.domains.length;i++){if(util.domainMatches(domain,self.domains[i])){return true}}return false}function isFile(){if(document.location.protocol=="file:"){if(self.debug){self.errors.fire("isFile")}return true}return false}function getSource(src){if(ua.ie&&src.charAt(0)=="/"){src=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+src}return src}function getRatio(size,ratios){for(var i=0;i<ratios.length;i+=2){if(size<=ratios[i]){return ratios[i+1]}}return ratios[ratios.length-1]||1}function getFilters(obj){var filters=[];for(var filter in obj){if(obj[filter]==Object.prototype[filter]){continue}var properties=obj[filter];filter=[filter.replace(/filter/i,"")+"Filter"];for(var property in properties){if(properties[property]==Object.prototype[property]){continue}filter.push(property+":"+util.escape(util.toJson(properties[property],util.toHexString)))}filters.push(filter.join(","))}return util.escape(filters.join(";"))}function resize(evt){var current=resize.viewport;var viewport=dom.getViewport();if(current&&viewport.width==current.width&&viewport.height==current.height){return}resize.viewport=viewport;if(self.replacements.length==0){return}if(resize.timer){clearTimeout(resize.timer)}resize.timer=setTimeout(function(){delete resize.timer;for(var i=0;i<self.replacements.length;i++){self.replacements[i].resize()}},200)}function calculate(node){var fontSize=dom.getComputedStyle(node,"fontSize");var deduce=fontSize.indexOf("px")==-1;var html=node.innerHTML;if(deduce){node.innerHTML="X"}node.style.paddingTop=node.style.paddingBottom=node.style.borderTopWidth=node.style.borderBottomWidth="0px";node.style.lineHeight="2em";node.style.display="block";fontSize=deduce?node.offsetHeight/2:parseInt(fontSize,10);if(deduce){node.innerHTML=html}var lines=Math.round(node.offsetHeight/(2*fontSize));node.style.paddingTop=node.style.paddingBottom=node.style.borderTopWidth=node.style.borderBottomWidth=node.style.lineHeight=node.style.display="";if(isNaN(lines)||!isFinite(lines)||lines==0){lines=1}return{fontSize:fontSize,lines:lines}}function parseContent(source,textTransform,uriEncode){uriEncode=uriEncode||util.uriEncode;var stack=[],content=[];var primaryLink=null;var nodes=source.childNodes;var whiteSpaceEnd=false,firstText=false;var i=0;while(i<nodes.length){var node=nodes[i];if(node.nodeType==3){var text=util.textTransform(textTransform,util.normalize(node.nodeValue)).replace(/</g,"&lt;");if(whiteSpaceEnd&&firstText){text=text.replace(/^\s+/,"")}content.push(text);whiteSpaceEnd=/\s$/.test(text);firstText=false}if(node.nodeType==1&&!/^(style|script)$/i.test(node.nodeName)){var attributes=[];var nodeName=node.nodeName.toLowerCase();var className=node.className||"";if(/\s+/.test(className)){if(className.indexOf(ClassNames.CLASS)>-1){className=className.match("(\\s|^)"+ClassNames.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{className=className.match(/^([^\s]+)/)[1]}}if(className!=""){attributes.push('class="'+className+'"')}if(nodeName=="a"){var href=uriEncode(node.getAttribute("href")||"");var target=node.getAttribute("target")||"";attributes.push('href="'+href+'"','target="'+target+'"');if(!primaryLink){primaryLink={href:href,target:target}}}content.push("<"+nodeName+(attributes.length>0?" ":"")+attributes.join(" ")+">");firstText=true;if(node.hasChildNodes()){stack.push(i);i=0;nodes=node.childNodes;continue}else{if(!/^(br|img)$/i.test(node.nodeName)){content.push("</",node.nodeName.toLowerCase(),">")}}}if(stack.length>0&&!node.nextSibling){do{i=stack.pop();nodes=node.parentNode.parentNode.childNodes;node=nodes[i];if(node){content.push("</",node.nodeName.toLowerCase(),">")}}while(i==nodes.length-1&&stack.length>0)}i++}return{text:content.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g,"$1"),primaryLink:primaryLink||{}}}};var parseSelector=(function(){var SEPERATOR=/\s*,\s*/;var WHITESPACE=/\s*([\s>+~(),]|^|$)\s*/g;var IMPLIED_ALL=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var STANDARD_SELECT=/(^|\))[^\s>+~]/g;var INSERT_SPACE=/(\)|^)/;var STREAM=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function parseSelector(selector,node){node=node||document.documentElement;var argSelectors=selector.split(SEPERATOR),result=[];for(var i=0;i<argSelectors.length;i++){var nodes=[node],stream=toStream(argSelectors[i]);for(var j=0;j<stream.length;){var token=stream[j++],filter=stream[j++],args="";if(stream[j]=="("){while(stream[j++]!=")"&&j<stream.length){args+=stream[j]}args=args.slice(0,-1)}nodes=select(nodes,token,filter,args)}result=result.concat(nodes)}return result}function toStream(selector){var stream=selector.replace(WHITESPACE,"$1").replace(IMPLIED_ALL,"$1*$2").replace(STANDARD_SELECT,insertSpaces);return stream.match(STREAM)||[]}function insertSpaces(str){return str.replace(INSERT_SPACE,"$1 ")}function select(nodes,token,filter,args){return(parseSelector.selectors[token])?parseSelector.selectors[token](nodes,filter,args):[]}var util={toArray:function(enumerable){var a=[];for(var i=0;i<enumerable.length;i++){a.push(enumerable[i])}return a}};var dom={isTag:function(node,tag){return(tag=="*")||(tag.toLowerCase()==node.nodeName.toLowerCase())},previousSiblingElement:function(node){do{node=node.previousSibling}while(node&&node.nodeType!=1);return node},nextSiblingElement:function(node){do{node=node.nextSibling}while(node&&node.nodeType!=1);return node},hasClass:function(name,node){return(node.className||"").match("(^|\\s)"+name+"(\\s|$)")},getByTag:function(tag,node){return node.getElementsByTagName(tag)}};var selectors={"#":function(nodes,filter){for(var i=0;i<nodes.length;i++){if(nodes[i].getAttribute("id")==filter){return[nodes[i]]}}return[]}," ":function(nodes,filter){var result=[];for(var i=0;i<nodes.length;i++){result=result.concat(util.toArray(dom.getByTag(filter,nodes[i])))}return result},">":function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];for(var j=0,child;j<node.childNodes.length;j++){child=node.childNodes[j];if(child.nodeType==1&&dom.isTag(child,filter)){result.push(child)}}}return result},".":function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];if(dom.hasClass([filter],node)){result.push(node)}}return result},":":function(nodes,filter,args){return(parseSelector.pseudoClasses[filter])?parseSelector.pseudoClasses[filter](nodes,args):[]}};parseSelector.selectors=selectors;parseSelector.pseudoClasses={};parseSelector.util=util;parseSelector.dom=dom;return parseSelector})();
/*
 * sifr_activation.js
 * Unitymedia.de
 *
 * Created on 2009-01-29.
 * Copyright 2008 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
S2.namespace("S2.Ume.SifrActivation",function(){this.initialize=function(){S2.Ume.SifrActivation.helvetica={src:sifr_path,ratios:[9,1.16,16,1.09,24,1.06,37,1.04,74,1.02,1.01]};sIFR.activate(S2.Ume.SifrActivation.helvetica);S2.Ume.SifrActivation.main();S2.Ume.SifrActivation.teasers()};this.color_from_css=function(selector){var rgb=$(selector).css("color");if(rgb=="rgb(0, 160, 224)"){return"#00a0e0"}else{if(rgb=="rgb(81, 151, 34)"){return"#519722"}else{if(rgb=="rgb(230, 15, 70)"){return"#e60f46"}else{if(rgb=="rgb(0, 1, 66)"){return"#000142"}else{return rgb}}}}};this.main=function(){sIFR.replace(S2.Ume.SifrActivation.helvetica,{selector:"#main h2 span",wmode:"transparent",offsetTop:3,css:".sIFR-root { color: "+S2.Ume.SifrActivation.color_from_css("#main h2")+"; }"})};this.teasers=function(){sIFR.replace(S2.Ume.SifrActivation.helvetica,{selector:"#main div.wrapper > h3 span, #main div.collection h3 span, #main div.case h3 span, #main div.wrapper > h4, #main div.wrapper div.case h4, #main ul.teasers h4, #main div.packages h3 span, #main #disclaimer h3 span",wmode:"transparent",tuneHeight:-6,css:".sIFR-root { color: #000142; }"})};this.infobox=function(){sIFR.replace(S2.Ume.SifrActivation.helvetica,{selector:"#main div.infobox h3 span",wmode:"transparent",tuneHeight:-6,css:".sIFR-root { color: #000142; }"})};S2.Ume.SifrActivation.initialize()});
/*
 * offer_package.js
 * Unitymedia.de
 *
 * Created on 2009-08-27.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires swfobject, s2
 *
 */
/* 
 * Initialize Flash Offer Package
 */
S2.namespace("S2.Ume.OfferPackage",function(){if($("#offer_package").length==0){return}this.initialize=function(){var flashvars={xmlFile:offer_package_config_path};var params={allowscriptaccess:"always",allownetworking:"all",wmode:"transparent"};var attributes={id:"offer_package"};var width="505";var heigth="860";var id="offer_package";swfobject.embedSWF(offer_package_path,id,width,heigth,"9.0.0",express_install_path,flashvars,params,attributes)};if(document.getElementById("offer_package")){this.initialize()}});
/*
 * stage_with_jquery.js
 * Unitymedia.de
 *
 * Created on 2009-06-19.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Initialize Flash Stage for Home Page -- phase b, with jquery loaded
 */
S2.namespace("S2.StageAfterJquery",function(){this.initialize=function(){$("body.home #header a").click(S2.StageAfterJquery.link_clicked);$("body.home #main div.teaser a").click(S2.StageAfterJquery.link_clicked);$("#stage_container").addClass("hidden");window.closeTeasers=function(url,target){S2.StageAfterJquery.draw_curtain_an_load_url(url,target)}};this.link_clicked=function(){var url=$(this).attr("href");S2.StageAfterJquery.draw_curtain_an_load_url(url);return false};this.draw_curtain_an_load_url=function(url,target){this.stage_movie().closeTeasers();$("#main div.teaser").fadeOut("slow");$("#footnotes").fadeOut("slow");$("#footernav").fadeOut("slow");setTimeout(S2.StageAfterJquery.load_url(url),1000)};this.load_url=function(url){window.location=url};this.stage_movie=function(){var movie_name="stage";if(navigator.appName.indexOf("Microsoft")!=-1){return window[movie_name]}else{return document[movie_name]}};$(document).ready(S2.StageAfterJquery.initialize)});
/*
 * sized_iframe.js
 * Unitymedia.de
 *
 * Created on 2009-07-10.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.3.2, s2
 *
 */
/* 
 * Resize height of iFrame
 *
 */
S2.namespace("S2.Ume.sizedIFrame",function(){var module=this;module.initialize=function(){$(window).load(function(){module.resize()})};module.resize=function(){try{var myName=window.name;if(window!==parent&&parent.frames&&parent.frames[myName]){var height=$(document).height();var iframe=parent.jQuery("#"+myName+".autoSize");iframe.height(height);window.scrollTo(0,0);return true}return false}catch(e){s2.Logger.debug(e)}};$(document).ready(this.initialize)});
/*
 * forms.js
 * Unitymedia.de
 *
 * Created on 2008-12-15.
 * Copyright 2008 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Formulare
 *
 */
S2.namespace("S2.Ume.Forms",function(){var module=this;module.initialize=function(){var field=$("form .input[disabled!='disabled']").add($("form select"));module.required_fields();module.field_focus_handler(field);module.field_blur_handler(field)};module.required_fields=function(){$("form div.required > label:not('.set')").append("<span>*</span>")};module.field_focus_handler=function(field){field.focus(function(){$(this).parent().addClass("focus");if($(this).hasClass("input")){this.select()}})};module.field_blur_handler=function(field){field.blur(function(){$(this).parent().removeClass("focus");if($.trim(this.value)==""){this.value=""}})};$(document).ready(this.initialize)});
/*
 * changer_campaign_form.js
 * Unitymedia.de
 *
 * Created on 2009-09-21.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.3.2, jquery.validate.js, s2
 *
 */
/* 
 * Allow provider changers to get campaign product if remaining runtime
 * is more the 90 days (we allow at least 88)
 */
S2.namespace("S2.Ume.widget.ChangerCampaignForm",function(){var module=this;module.initialize=function(){$("form#campaign_availability").validate({errorPlacement:function(error){$("div.error_container").append(error)},errorLabelContainer:"div.error_container",messages:{provider:"Geben Sie den Namen Ihres derzeitigen Vertragsanbieters an.",expiration_date:"Geben Sie ein korrektes Datum im Format TT.MM.JJJJ an."},submitHandler:function(form){module.check_expiration_date()}})};module.order_identifier_from_location=function(){var md=/\?order_identifier=([^&]+)/.exec(location.search);return md?md[1]:""};module.check_expiration_date=function(){var order_identifier=module.order_identifier_from_location();if(order_identifier==""){return false}var date_str=$("form#campaign_availability #expiration_date").val();var date_parts=date_str.split(".");if(date_parts.length==3){var expiration_date=new Date(date_parts[2],parseInt(date_parts[1])-1,date_parts[0]);var now=new Date();var min_remaining_runtime=88*86400000;var remaining_runtime=(expiration_date-now);if(remaining_runtime>=min_remaining_runtime){var campaign_product={"2PLAY20":"2PLAY206","3PLAY20":"3PLAY206"}[order_identifier];if(campaign_product){order_identifier=campaign_product}}}var url=$("form#campaign_availability").attr("action");location.href=url+"/"+order_identifier;return false};jQuery.validator.addClassRules({provider:{minlength:2},german_date:{dateDE:true}});if($("form#campaign_availability").length!=0){$(document).ready(module.initialize)}});
/*
 * selectbox.js
 * Unitymedia.de
 *
 * Created on 2008-12-15.
 * Copyright 2008 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Custom Select Boxes
 *
 */
S2.namespace("S2.Ume.SelectBox",function(){var module=this;module.initialize=function(){module.initialize_selectbox();module.selectbox_event_handler()};module.initialize_selectbox=function(){$("form select.selectbox").selectbox({containerClass:"selectbox_options",maxlength:35})};module.selectbox_event_handler=function(){var selectbox=$("form input.selectbox");selectbox.focus(function(){$(this).parents("div.formRow").addClass("focus")});selectbox.blur(function(){$(this).parents("div.formRow").removeClass("focus")})};$(document).ready(this.initialize)});
/*
 * selectbox_list.js
 * Unitymedia.de
 *
 * Created on 2009-07-30.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Linkliste mit Aussehen/Verhalten einer Selektbox
 *
 */
S2.namespace("S2.Ume.SelectboxList",function(){var module=this;var container=$("div.selectbox_list_container");var field=$("div.selectbox_list");var list=$("div.selectbox_list ul");var links=$("div.selectbox_list ul li a");var active=0;module.initialize=function(){module.initalize_selected_item();module.initalize_event_handler()};module.initalize_event_handler=function(){field.click(function(){var active=0;$(this).children("div.selectbox_list ul").toggleClass("hidden");$(this).parent().addClass("focus")});field.focus(function(){$(this).parent().addClass("focus")});links.blur(function(){$(this).parent().removeClass("focus")});list.keydown(function(event){switch(event.keyCode){case 38:event.preventDefault();module.move_select(-1);break;case 40:event.preventDefault();module.move_select(1);break;case 13:return true}});list.bind("mouseleave",function(){module.hide_selector()})};module.move_select=function(step){active+=step;if(active<0){active=0}else{if(active>=$(links).size()){active=$(links).size()-1}}links.parent().removeClass("focus");$(links[active]).focus().parent().addClass("focus")};module.hide_selector=function(){container.removeClass("focus");setTimeout(function(){list.addClass("hidden")},250)};module.initalize_selected_item=function(){$("div.selectbox_list span.selected_item").each(function(){if($(this).text()=="-"){var first_link=$(this).next().children("li:first").text();$(this).text(first_link)}})};$(document).ready(this.initialize)});
/*
 * tab_nav4.js
 * Unitymedia.de
 *
 * Created on 2008-12-15.
 * Copyright 2008 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
S2.namespace("S2.Ume.TabNav4",function(){var module=this;this.initialize=function(){module.initialize_from_location();module.initalize_event_handler()};this.initialize_from_location=function(){if(location.hash!=""&&$(module.convert_hash_to_tab_nav_id(location.hash)+"_content").length>0){module.handle_tab_nav_click(location)}};this.initalize_event_handler=function(){$("#main ul.tabnav li a").click(function(){return module.handle_tab_nav_click(this)});$("#extra ul.tabnav li a").click(function(){return module.handle_teaser_tab_nav_click(this)});$("ul.tabnav li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})};this.convert_hash_to_tab_nav_id=function(h){return(h)?h.replace(/\//g,"_"):null};this.handle_tab_nav_click=function(element){id=module.convert_hash_to_tab_nav_id(element.hash);$("#main ul.tabnav li").removeClass("active");$("#main "+id+"_tab").addClass("active");$("#main div.tabcontent").removeClass("active");$("#main "+id+"_content").addClass("active");S2.Ume.SifrActivation.infobox();return false};this.handle_teaser_tab_nav_click=function(element){id=element.hash;$("#extra ul.tabnav li").removeClass("active");$("#extra "+id+"_tab").addClass("active");$("#extra div.tabcontent").removeClass("active");$("#extra "+id+"_content").addClass("active");return false};$(document).ready(module.initialize)});
/*
 * topics.js
 * Unitymedia.de
 *
 * Created on 2009-03-17.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 */
/* 
 * Select Fields with Topics
 */
S2.namespace("S2.Ume.Topics",function(){this.initialize=function(){S2.Ume.Topics.initalize_event_handler()};this.initalize_event_handler=function(){$("#topics select").change(function(){$("#topics .focus").removeClass("focus");var next_select=$(this).parent().next().children(".topic_selector");return S2.Ume.Topics.handle_initialize_topic_select($(next_select),"--",$(this).val())})};this.handle_initialize_topic_select=function(select_element,prompt,master_id,value){if(select_element.length==0){return}if(master_id==""){select_element.attr("disabled","disabled").html("")}else{select_element.html("");var cut=select_element.get(0).cut;var list=cut[master_id];if(list!=undefined){if(list.length>0){select_element.append('<option value="">'+prompt+"</option>");$.each(list,function(){var selected="";if(this.id==master_id){selected="selected "}select_element.append("<option "+selected+'value="'+this.id+'">'+this.title+"</option>")});select_element.removeAttr("disabled").addClass("active").focus();if(value!=undefined){select_element.val(value)}}}}select_element.parent().nextAll().children(".topic_selector").attr("disabled","disabled").html("")};$(document).ready(this.initialize)});
/*
 * footnote_toggle.js
 * Unitymedia.de
 *
 * Created on 2008-12-15.
 * Copyright 2008 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Ein- und Ausblenden der Fussnoten
 *
 */
S2.namespace("S2.Ume.FootnoteToggle",function(){this.initialize=function(){S2.Ume.FootnoteToggle.initalize_event_handler()};this.initalize_event_handler=function(){$("#footnotes a:first").click(function(){return S2.Ume.FootnoteToggle.handle_footnote_click(this)})};this.handle_footnote_click=function(element){$("#footnotes").toggleClass("hidden");return false};$(document).ready(this.initialize)});
/*
 * programs.js
 * Unitymedia.de
 *
 * Created on 2009-04-16
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Handle Display of TV Programs...
 */
S2.namespace("S2.Ume.Pograms",function(){if($("#programs #program_list").length==0){return}var module=this;var rows,top;var row_height=54;var viewport_rows=4;var viewport_cols=6;module.initialize=function(){module.initalize_event_handler();module.initalize_categories();module.select_program($("#programs #program_list li:first"))};module.initalize_event_handler=function(){$("#programs #program_list li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$("#programs #program_list li").click(function(){$("html, body").animate({scrollTop:$("#programs").offset().top},500);return module.select_program(this)});$("#programs #program_categories form :checkbox").click(function(){return module.change_categories(this)})};module.initalize_categories=function(){$("#program_categories form :checkbox").attr("checked","checked")};module.select_program=function(selected){var details=$(selected).children(".details").clone();$("#programs #program_details .details").replaceWith(details);$(selected).addClass("selected").siblings().removeClass("selected");var flash=$(selected).children("img:first").attr("flash");var image=$(selected).find("div.details img").attr("src");if(flash!=null){$("#programs #program_details .details img").replaceWith('<div id="movie"></div>');var flashvars={};flashvars.videoFile=flash;flashvars.startImage=image;flashvars.endImage=image;flashvars.autoStart="1";var params={};params.allowscriptaccess="always";params.allownetworking="all";params.wmode="transparent";var attributes={};attributes.id="movie";swfobject.embedSWF("/flash/player_programs.swf","movie","233","176","9.0.28","swfobject/expressInstall.swf",flashvars,params,attributes)}};module.change_categories=function(checkbox){var category=$(checkbox).attr("value");var checked=$(checkbox).attr("checked");var list=$("#programs #program_list li img");$.each(list,function(){var pr_category=$(this).attr("category");if(pr_category==category&&checked==false){$(this).parent().addClass("hidden")}else{if(pr_category==category&&checked==true){$(this).parent().removeClass("hidden")}}})};$(document).ready(this.initialize)});
/*
 * jobs.js
 * Unitymedia.de
 *
 * Created on 2009-05-11.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Filterung der angezeigten Stellenangebote
 */
S2.namespace("S2.Ume.Jobs",function(){if($("form#search_jobs").length==0){return}var module=this;module.initialize=function(){module.initalize_event_handler();module.initalize_from_location()};module.initalize_from_location=function(){var query=new S2.Ume.Util.Query();module.search_jobs(query)};module.initalize_event_handler=function(){$("form#search_jobs").submit(function(e){var query=new S2.Ume.Util.Query("?"+$(this).serialize().replace(/=/g,"_").replace(/&/g,","));module.search_jobs(query);window.location.hash=query;e.preventDefault()})};module.search_jobs=function(query){$("#message").html("");var result=false;var category=query.param("category")||"all";var city=query.param("city")||"all";var list=$("table#jobs tr:not(:first)");$.each(list,function(){var show=false;if(category=="all"){if(city=="all"){show=true}else{if($(this).attr("city")==city){show=true}}}else{if($(this).attr("category")==category){if(city=="all"){show=true}else{if($(this).attr("city")==city){show=true}}}}if(city=="all"){if(category=="all"){show=true}else{if($(this).attr("category")==category){show=true}}}else{if($(this).attr("city")==city){if(category=="all"){show=true}else{if($(this).attr("category")==category){show=true}}}}if(!show){$(this).addClass("hidden")}else{$(this).removeClass("hidden");result=true}});if(!result){$("#message").html("FÃ¼r den gewÃ¤hlten Bereich und Einsatzort liegen keine aktuellen Stellenangebote vor.")}$("form#search_jobs select[name='category']").attr("value",category);$("form#search_jobs select[name='city']").attr("value",city)};$(document).ready(this.initialize)});
/*
 * combi_products_configurator.js
 * Unitymedia.de
 *
 * Created on 2009-07-21.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Configurator for Combi Product Packages
 *
 */
S2.namespace("S2.Ume.CombiProductsConfigurator",function(){if($("form#combi_configuration").length==0){return}var module=this;var start_order_urls={internet:"/bestellung/start/1PLAY2",internet_telefon_10:"/bestellung/start/2PLAY10",internet_telefon_20:"/produkte/wechsler_check.html?order_identifier=2PLAY20",internet_telefon_32:"/bestellung/start/2PLAY32",internet_telefon_fernsehen_10:"/bestellung/start/3PLAY10",internet_telefon_fernsehen_20:"/produkte/wechsler_check.html?order_identifier=3PLAY20",internet_telefon_fernsehen_32:"/bestellung/start/3PLAY32",internet_fernsehen:"/produkte/fernsehen/kombipakete-bestellen.html",telefon:"/bestellung/start/1PLAYT",telefon_fernsehen:"/produkte/fernsehen/kombipakete-bestellen.html",fernsehen:"/bestellung/start/BASIC"};module.initialize=function(){var state_hash=(location.hash).replace(/#/,"");if(state_hash==""){state_hash="internet_telefon_fernsehen_10"}module.initialize_configuration_form_from_hash(state_hash);module.configuration_form_state_changed();module.initialize_configuration_form_change_handler();module.initialize_order_form_submit_handler();module.initialize_teaser_change_handler();module.initalize_overlay_handler();module.initialized_start_order_click_handler()};module.initialize_configuration_form_from_hash=function(state_hash){var state=module.state_from_state_hash(state_hash);$("#combi_configuration input").each(function(i){$(this).removeAttr("checked").attr("checked",state[$(this).attr("name")])});$("#combi_configuration #bandwidth_selector").attr("value",state.bandwith)};module.initialize_configuration_form_change_handler=function(){$("#combi_configuration input").click(module.configuration_form_state_changed);$("#combi_configuration #bandwidth_selector").change(module.configuration_form_state_changed)};module.initialize_teaser_change_handler=function(){$("#combi_order div.product_info a").click(function(){var state_hash=$(this).attr("hash").replace(/#/,"");return module.teaser_state_changed(state_hash)})};module.initialize_order_form_submit_handler=function(){$("#combi_order").submit(module.order_form_submit)};module.initialized_start_order_click_handler=function(){$("#start_order_link").click(module.start_order_clicked)};module.state_from_state_hash=function(state_hash){if(state_hash==""){return{}}var state={};var md=/(\d+)$/.exec(state_hash);if(md){state.bandwith=md[0];state_hash=state_hash.replace(/_\d+$/,"")}var elements=state_hash.split("_");for(var i=0;i<elements.length;i++){state[elements[i]]="checked"}return state};module.state_hash_from_form=function(){var state_hash=[];$("#combi_configuration input").each(function(i){if($(this).attr("checked")){state_hash.push(($(this).attr("value")))}});if($("#combi_configuration #internet").attr("checked")&&$("#combi_configuration #telefon").attr("checked")){state_hash.push(($("#combi_configuration #bandwidth_selector")).attr("value"))}return state_hash.join("_")};module.order_form_submit=function(){return $("#order_identifier").val()!=""};module.configuration_form_state_changed=function(){var state_hash=module.state_hash_from_form();var state=module.state_from_state_hash(state_hash);$("#combi_configuration input").each(function(i){if(state[this.name]=="checked"){$(this).parent().addClass("active")}else{$(this).parent().removeClass("active")}});if($("#combi_configuration #telefon").attr("checked")){$("#combi_configuration #bandwidth_selector").show();$("#combi_configuration #bandwidth_2000").hide();if($("#combi_configuration #internet").attr("checked")){$("#combi_configuration #bandwidth_selector").removeAttr("disabled").removeClass("disabled")}else{$("#combi_configuration #bandwidth_selector").attr("disabled","disabled").addClass("disabled")}}else{$("#combi_configuration #bandwidth_selector").attr("disabled","disabled").addClass("disabled");$("#combi_configuration #bandwidth_selector").hide();$("#combi_configuration #bandwidth_2000").show()}module.set_start_order_url(state_hash);module.update_content(state_hash)};module.teaser_state_changed=function(state_hash){module.initialize_configuration_form_from_hash(state_hash);module.configuration_form_state_changed()};module.start_order_clicked=function(){if($(this).attr("href")==""){return false}else{return true}};module.set_start_order_url=function(state_hash){var start_order_url=start_order_urls[state_hash];if(start_order_url){$("#start_order_link").attr("href",start_order_url);$("#start_order_link").show()}else{$("#start_order_link").attr("href","");$("#start_order_link").hide()}};module.update_content=function(state_hash){var state=module.state_from_state_hash(state_hash);$("#configurator_categories li").each(function(i){if(state[this.title]=="checked"){$(this).addClass("active").removeClass("inactive")}else{$(this).addClass("inactive").removeClass("active")}});$("#configurator_wrapper").removeClass().addClass("show_"+state_hash);if(state_hash==""){$("#configurator_wrapper").removeClass().addClass("show_default")}};module.initalize_overlay_handler=function(){var popup=$("#configurator_info");$("#configurator_info a.hide").click(function(){return module.handle_close_overlay(popup)});$("#combi_configuration input").click(function(){return module.handle_close_overlay(popup)})};module.handle_close_overlay=function(element){$(element).addClass("hidden")};$(document).ready(this.initialize)});
/*
 * popup.js
 * Unitymedia.de
 *
 * Created on 2009-07-22.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Open and close windows
 *
 */
S2.namespace("S2.Ume.Popup",function(){var module=this;module.initialize=function(){module.initalize_event_handler()};module.initalize_event_handler=function(){$("a.close_window").click(function(){window.close();return false});$("a.open_window").click(function(){popup=window.open(this.href,"Popup","width=670,height=400,toolbar=yes,location=no,scrollbars=yes,menubar=1");popup.focus();return false})};$(document).ready(this.initialize)});
/*
 * print.js
 * Unitymedia.de
 *
 * Created on 2009-07-14.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
/* 
 * Print page
 *
 */
S2.namespace("S2.Ume.Print",function(){var module=this;module.initialize=function(){module.initalize_event_handler()};module.initalize_event_handler=function(){$("a.print_page").click(function(){window.print();return false})};$(document).ready(this.initialize)});
/*
 * disclaimer.js
 * Unitymedia.de
 *
 * Created on 2009-09-25.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.2.6, s2
 *
 */
S2.namespace("S2.Ume.Disclaimer",function(){var module=this;var disabled_elements=$("body.show_disclaimer #subnav").add($("body.show_disclaimer #main div.wrapper"));module.initialize=function(){if($("#disclaimer").length==0){return}module.checkCookie();module.initalize_event_handler()};module.checkCookie=function(){if(document.cookie.length>0&&document.cookie.match(/accept_disclaimer=true/)){$("#disclaimer").addClass("hidden");disabled_elements.removeClass("disable")}else{disabled_elements.addClass("disable")}};module.setCookie=function(cookie_name,value){document.cookie=cookie_name+"="+escape(value)};this.initalize_event_handler=function(){$("#disclaimer a.accept_disclaimer").click(function(){return module.handle_accept_click()})};this.handle_accept_click=function(){$("#disclaimer").addClass("hidden");disabled_elements.removeClass("disable");module.setCookie("accept_disclaimer","true");return false};$(document).ready(this.initialize)});
/*
 * info_layer.js
 * Unitymedia.de
 *
 * Created on 2009-08-27.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.3, s2
 *
 */
/* 
 * Open and close windows
 *
 */
S2.namespace("S2.Ume.InfoLayer",function(){var module=this;module.initialize=function(){if($("div.info_layer").length==0){return}module.initalize_event_handler()};module.initalize_event_handler=function(){$("span.trigger_info_layer").mouseenter(function(){var info_layer=$(this).attr("id").replace(/trigger_/,"#");return module.show_info(info_layer)});$("span.trigger_info_layer").mouseleave(function(e){var info_layer=$(this).attr("id").replace(/trigger_/,"#");module.hide_info(info_layer)})};module.show_info=function(element){$(element).removeClass("hidden")};module.hide_info=function(element){$(element).addClass("hidden")};$(document).ready(this.initialize)});
/*
 * installation_manual.js
 * Unitymedia.de
 *
 * Created on 2009-09-08
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 * @requires jquery-1.3.2, s2
 *
 */
/* 
 * Embed Flash Player with Installation Manual
 */
S2.namespace("S2.Ume.InstallationManual",function(){if($("#installation_manual").length==0){return}var module=this;module.initialize=function(){swfobject.embedSWF("/flash/player_installation_manual.swf","installation_manual","768","530","7","swfobject/expressInstall.swf")};$(document).ready(this.initialize)});S2.namespace("S2.Ume",function(){var LAZY_OBSERVE_TIMEOUT_MILLIS=200;var OBSERVE_COUNTER=0;this.Event=function(name){this.eventName="s2:"+name;this.lazyTimeout=[]};this.Event.prototype={trigger:function(){var args=[];for(var i=0;i<arguments.length;i++){args[i]=arguments[i]}$(document).trigger(this.eventName,[args])},observe:function(func){var self=this;$(document).bind(this.eventName,function observe(e,data){func.apply(self,data)})},observeOnce:function(func){var self=this;this.observe(function observeOnce(e,data){if(func.executedOnce){return}if(data){func.apply(self,data)}else{func.call(self)}$(document).unbind(self.eventName,func);func.executedOnce=true})},observeLazy:function(func,millis){var self=this;var count=OBSERVE_COUNTER;var timeoutMillis=millis||LAZY_OBSERVE_TIMEOUT_MILLIS;this.observe(function lazyObserver(){if(self.lazyTimeout[count]){clearTimeout(self.lazyTimeout[count])}var args=arguments;self.lazyTimeout[count]=setTimeout(function lazyEventTimeout(){func.apply(self,args)},timeoutMillis)});OBSERVE_COUNTER++},toString:function(){return this.eventName}}});S2.namespace("S2.Ume.events",function(){this.AvailabilityZipChanged=new S2.Ume.Event("AvailabilityZipChanged");this.AvailabilityCityChanged=new S2.Ume.Event("AvailabilityCityChanged");this.AvailabilityStreetChanged=new S2.Ume.Event("AvailabilityStreetChanged");this.AvailabilityHouseNumberChanged=new S2.Ume.Event("AvailabilityHouseNumberChanged")});S2.namespace("S2.Ume.AvailabilityCheck",function(){var module=this;var relative_url_root="/bestellung";var messages={"availability_check.errors.no_city":"Leider wurde keine passende Stadt gefunden.","availability_check.errors.out_of_order":"Der Dienst steht gerade nicht zur VerfÃ¼gung."};module.initialize=function(){var availability_result=$.cookie("availability_result");if(availability_result){module.show_availability_result(availability_result)}else{module.show_form()}$("#service_address_post_code").val("");var changeZip=function(){S2.Ume.events.AvailabilityZipChanged.trigger($(this).val())};$("#service_address_post_code").change(changeZip).typingEnded(changeZip).keypress(function(){var self=this;setTimeout(function(){var val=self.value.replace(/[\D]/,"");self.value=val},10)});var lastZipcode;S2.Ume.events.AvailabilityZipChanged.observe(function(zip){if(zip&&zip.length==5&&lastZipcode!=zip){module.fetchCities();lastZipcode=zip}});$("#service_address_city").change(function(){S2.Ume.events.AvailabilityCityChanged.trigger($(this).val())});S2.Ume.events.AvailabilityCityChanged.observe(function(city){module.fetchStreets()});$("#service_address_street").change(function(){S2.Ume.events.AvailabilityStreetChanged.trigger($(this).val())});$("#service_address_house_number").change(function(){S2.Ume.events.AvailabilityHouseNumberChanged.trigger($(this).val())});S2.Ume.events.AvailabilityStreetChanged.observe(function(building){var street=$("#service_address_street").val();if(street!=""&&street!=null&&street!="--"){module.fetchBuildings()}else{module._fillSelect($("#service_address_house_number"),[""])}});S2.Ume.events.AvailabilityHouseNumberChanged.observe(function(house_number){module.validate()});$("#availability").submit(function(){if(module.validate()){module.fetchAvailability()}return false});$("#service_address_post_code").change();module.validate()};module.validate=function(){var house_number=$("#service_address_house_number").val();if(house_number!=""&&house_number!=null&&house_number!="--"){$("#availability_submit").removeClass("disabled");return true}else{$("#availability_submit").addClass("disabled");return false}};module.error=function(error){$("#availability_error").html(error);$("#service_address_post_code").parent().addClass("formError");$("#availability select").html("");this.validate()};module.clearError=function(){$("#availability_error").html("");$("#service_address_post_code").parent().removeClass("formError")};module.fetchAvailability=function(){this.request(module.url("/verfuegbarkeit"),function(availability){module.show_availability_result(availability.html);$.cookie("availability_result",availability.html)})};module.show_availability_result=function(availability_result){$("#availability_result").html(availability_result);$("#availability_result").show();$("#availability").hide();$("#change_service_address").click(function(){module.show_form();$.cookie("availability_result",null);return false})};module.show_form=function(){$("#availability").show();$("#availability_result").hide()};module.fetchCities=function(){this.request(module.url("/verfuegbarkeit_orte"),function(cities){var dest=$("#service_address_city");module._fillSelect(dest,cities);if(cities.length==0){module.error(messages["availability_check.errors.no_city"])}else{module.clearError()}})};module.fetchStreets=function(){this.request(module.url("/verfuegbarkeit_strassen"),function(streets){var dest=$("#service_address_street");streets.unshift("--");module._fillSelect(dest,streets)})};module.fetchBuildings=function(){this.request(module.url("/verfuegbarkeit_gebaeude"),function(buildings){var dest=$("#service_address_house_number");var house_numbers=[];Joose.A.each(buildings,function(b){house_numbers.push(b.house_number)});house_numbers.unshift("--");module._fillSelect(dest,house_numbers)})};module.sortClever=function(a,b){var ia=parseInt(a,10);var ib=parseInt(b,10);if(isNaN(ia)||isNaN(ib)){a=a.toLowerCase();a=a.replace(/Ã¤/g,"ae");a=a.replace(/Ã¶/g,"oe");a=a.replace(/Ã¼/g,"ue");a=a.replace(/ÃŸ/g,"ss");b=b.toLowerCase();b=b.replace(/Ã¤/g,"ae");b=b.replace(/Ã¶/g,"oe");b=b.replace(/Ã¼/g,"ue");b=b.replace(/ÃŸ/g,"ss");return(a==b)?0:(a>b)?1:-1}else{return ia-ib}};module._fillSelect=function(dest,values){var before=dest.val();dest.empty();Joose.A.each(values.sort(this.sortClever),function(val){var text=val;if(typeof val=="object"){text=val[1];val=val[0]}dest.append("<option value='"+val+"'>"+text+"</option>")});setTimeout(function(){if(before){dest.val(before)}dest.change()},0)};module.request=function(url,onSuccess){$.ajax({url:url+"?"+$("#availability").serialize(),dataType:"json",error:function(xhr,status){module.error(messages["availability_check.errors.out_of_order"])},success:function(object,status){if(object.OK){onSuccess.call(this,object.response)}else{module.error(object.error_message)}}})};module.url=function(url){return relative_url_root+url};$(document).ready(this.initialize)});var s_account="unitymedia-"+runtime_env;var s=s_gi(s_account);s.charSet="UTF-8";s.currencyCode="EUR";s.trackDownloadLinks=true;s.trackExternalLinks=true;s.trackInlineStats=true;s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls";s.linkInternalFilters="javascript:,"+window.location.host;s.linkLeaveQueryString=false;s.linkTrackVars="None";s.linkTrackEvents="None";s.visitorNamespace="unitymedia";s.dc="122";var i=1;s.usePlugins=true;function s_doPlugins(s){if(s.getQueryParam("s_kwcid")){s.pageURL=s.manageQueryParam("s_kwcid",1,1)}s.clickThruQuality("s_kwcid","event15","event16");s.campaign=s.getValOnce(s.campaign,"s_campaign",0);var sc_campaign_cid=s.getQueryParam("et_cid");if((sc_campaign_cid!=null)&&(sc_campaign_cid!="")){s.eVar2=sc_campaign_cid;var sc_campaign_lid=s.getQueryParam("et_lid");if((sc_campaign_lid!=null)&&(sc_campaign_lid!="")){s.eVar2+="-"+sc_campaign_lid}s.eVar2=s.getValOnce(s.eVar2,"sc_cmp",0)}var sc_salesid=s.getQueryParam("salesid_nrw");if((sc_salesid!=null)&&(sc_salesid!="")){s.eVar6=sc_salesid}}s.doPlugins=s_doPlugins;s.getQueryParam=new Function("p","d","u","var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.location);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p.length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t)v+=v?d+t:t;p=p.substring(i==p.length?i:i+1)}return v");s.p_gpv=new Function("k","u","var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v=s.pt(q,'&','p_gvf',k)}return v");s.p_gvf=new Function("t","k","if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'True':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s.epa(v)}return ''");s.manageQueryParam=new Function("p","w","e","u","var s=this,x,y,i,qs,qp,qv,f,b;u=u?u:(s.pageURL?s.pageURL:''+s.wd.location);u=u=='f'?''+s.gtfs().location:u+'';x=u.indexOf('?');qs=x>-1?u.substring(x,u.length):'';u=x>-1?u.substring(0,x):u;x=qs.indexOf('?'+p+'=');if(x>-1){y=qs.indexOf('&');f='';if(y>-1){qp=qs.substring(x+1,y);b=qs.substring(y+1,qs.length);}else{qp=qs.substring(1,qs.length);b='';}}else{x=qs.indexOf('&'+p+'=');if(x>-1){f=qs.substring(1,x);b=qs.substring(x+1,qs.length);y=b.indexOf('&');if(y>-1){qp=b.substring(0,y);b=b.substring(y,b.length);}else{qp=b;b='';}}}if(e&&qp){y=qp.indexOf('=');qv=y>-1?qp.substring(y+1,qp.length):'';qv=s.epa(qv);qv=unescape(qv);qv=unescape(qv);i=qv.indexOf('|');if(i>-1){x=qv.substring(0,i);qv=escape(x)+qv.substring(i);}else{qv=escape(qv)}qp=qp.substring(0,y+1)+qv;}if(w&&qp){if(f)qs='?'+qp+'&'+f+b;else if(b)qs='?'+qp+'&'+b;else	qs='?'+qp}else if(f)qs='?'+f+'&'+qp+b;else if(b)qs='?'+qp+'&'+b;else	qs='?'+qp;return u+qs");s.clickThruQuality=new Function("scp","tcth_ev","cp_ev","cff_ev","cf_th","if(i<=1){var ev=(s.events?s.events+',':'');if(s.getQueryParam(scp)){s.events=ev+tcth_ev;if(s.c_r('cf')){var tct=parseInt(s.c_r('cf'))+1;s.c_w('cf',tct,0);if(tct==cf_th&&cff_ev){s.events=s.events+','+cff_ev;};}else{s.c_w('cf',1,0);}}else{if(s.c_r('cf')>=1){s.c_w('cf',0,0);s.events=ev+cp_ev;}}i++;}");s.getValOnce=new Function("v","c","e","var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime()+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");var s_code="",s_objectID;function s_gi(un,pg,ss){var c="s._c='s_c';s.wd=window;if(!s.wd.s_c_in){s.wd.s_c_il=new Array;s.wd.s_c_in=0;}s._il=s.wd.s_c_il;s._in=s.wd.s_c_in;s._il[s._in]=s;s.wd.s_c_in++;s.an=s_an;s.cls=function(x,c){var i,y='';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}return y};s.fl=function(x,l){return x?(''+x).substring(0,l):x};s.co=function(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1))<0)return 0;return 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toUpperCase():'';if(x){x=''+x;if(c=='AUTO'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.substring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h.substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';else y+=escape(c)}x=y}else{x=x?s.rep(escape(''+x),'+','%2B'):x;if(x&&c&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}}return x};s.epa=function(x){var s=this;return x?unescape(s.rep(''+x,'+',' ')):x};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s[f](t,a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a.indexOf(':');if(c>=0)a=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.si=function(wd){var s=this,c=''+s_gi,a=c.indexOf(\"{\"),b=c.lastIndexOf(\"}\"),m;c=s_fe(a>0&&b>0?c.substring(a+1,b):0);if(wd&&wd.document&&c){wd.setTimeout('function s_sv(o,n,k){var v=o[k],i;if(v){if(typeof(v)==\"string\"||typeof(v)==\"number\")n[k]=v;else if (typeof(v)==\"array\"){n[k]=new Array;for(i=0;i<v.length;i++)s_sv(v,n[k],i)}else if (typeof(v)==\"object\"){n[k]=new Object;for(i in v)s_sv(v,n[k],i)}}}function s_si(t){var wd=window,s,i,j,c,a,b;wd.s_gi=new Function(\"un\",\"pg\",\"ss\",\"'+c+'\");wd.s=s_gi(\"'+s.oun+'\");s=wd.s;s.sa(\"'+s.un+'\");s.tfs=wd;s.pt(s.vl_g,\",\",\"vo1\",t);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3=\\'\\';if(t.m_l&&t.m_nl)for(i=0;i<t.m_nl.length;i++){n=t.m_nl[i];if(n){m=t[n];c=t[\"m_\"+n];if(m&&c){c=\"\"+c;if(c.indexOf(\"function\")>=0){a=c.indexOf(\"{\");b=c.lastIndexOf(\"}\");c=a>0&&b>0?c.substring(a+1,b):0;s[\"m_\"+n+\"_c\"]=c;if(m._e)s.loadModule(n);if(s[n])for(j=0;j<m._l.length;j++)s_sv(m,s[n],m._l[j])}}}}}var e,o,t;try{o=window.opener;if(o&&o.s_gi){t=o.s_gi(\"'+s.un+'\");if(t)s_si(t)}}catch(e){}',1)}};s.c_d='';s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPeriods;if(d&&!s.c_d){n=n?parseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x.b=r?0:o[e];x.o[e]=f}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}catch(e){r=s[t](e)}return r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfsoe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=this,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,0,r.t,r.u)}};s.br=function(id,rs){var s=this;if(s.disableBufferedRequests||!s.c_w('s_br',rs))s.brl=rs};s.flushBufferedRequests=function(){this.fbr(0)};s.fbr=function(id){var s=this,br=s.c_r('s_br');if(!br)br=s.brl;if(br){if(!s.disableBufferedRequests)s.c_w('s_br','');s.mr(0,0,br)}s.brl=0};s.mr=function(sess,q,rs,id,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackingServerBase,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Object,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase();else dc='d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/H.20.3/'+sess+'?AQB=1&ndh=1'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac){if(s.apv>5.5)rs=s.fl(rs,4095);else rs=s.fl(rs,2047)}if(id){s.br(id,rs);return}}if(s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s.rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im.s_l=0;im.onload=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il['+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;im.src=rs;if(rs.indexOf('&pe=')>=0&&(!ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.name))){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg=function(v){var s=this;if(!s.wd['s_'+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s.pt(v,',','glf',0)};s.rf=function(x){var s=this,y,i,j,h,l,a,b='',c='',t;if(x){y=''+x;i=y.indexOf('?');if(i>0){a=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase();i=0;if(h.substring(0,7)=='http://')i+=7;else if(h.substring(0,8)=='https://')i+=8;h=h.substring(i);i=h.indexOf(\"/\");if(i>0){h=h.substring(0,i);if(h.indexOf('google')>=0){a=s.sp(a,'&');if(a.length>1){l=',q,ie,start,search_key,word,kw,cd,';for(j=0;j<a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.substring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c){y+='?'+b+'&'+c;if(''+x!=y)x=y}}}}}}return x};s.hav=function(){var s=this,qs='',fv=s.linkTrackVars,fe=s.linkTrackEvents,mn,i;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}fv=fv?fv+','+s.vl_l+','+s.vl_l2:'';for(i=0;i<s.va_t.length;i++){var k=s.va_t[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(v&&k!='linkName'&&k!='linkType'){if(s.pe||s.lnk||s.eo){if(fv&&(','+fv+',').indexOf(','+k+',')<0)v='';if(k=='events'&&fe)v=s.fs(v,fe)}if(v){if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL'){q='g';v=s.fl(v,255)}else if(k=='referrer'){q='r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q='vmf';if(s.ssl&&s.visitorMigrationServerSecure)v=''}else if(k=='visitorMigrationServerSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUTO')v='ISO8859-1';else if(s.em==2)v='UTF-8'}else if(k=='visitorNamespace')q='ns';else if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q='vvp';else if(k=='currencyCode')q='cc';else if(k=='channel')q='ch';else if(k=='transactionID')q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else if(k=='javascriptVersion')q='j';else if(k=='javaEnabled')q='v';else if(k=='cookiesEnabled')q='k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct';else if(k=='homepage')q='hp';else if(k=='plugins')q='p';else if(s.num(x)){if(b=='prop')q='c'+n;else if(b=='eVar')q='v'+n;else if(b=='list')q='l'+n;else if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+q+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}}return qs};s.ltdf=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.location.hostname;h=h.toLowerCase();if(s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Function('e','var s=s_c_il['+s._in+'],f,tcf;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Function(\"s\",\"var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement||s.eo.parentNode))s.t()}catch(e){}\");tcf(s);s.eo=0');s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i>j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l.pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=function(o){var t=o.tagName;t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if(t=='INPUT'&&o.type&&o.type.toUpperCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=='AREA')&&(!c||!p||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(o.value&&(t=='INPUT'||t=='SUBMIT')){n=o.value;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e=t.indexOf('='),u=e>=0?','+t.substring(0,e)+',':'';return u&&u.indexOf(','+un+',')>=0?s.epa(t.substring(e+1)):''};s.rq=function(un){var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.links.length;i++){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick:\"\";if((oc.indexOf(\"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=function(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.eh(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s=this;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n.substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s.wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m){r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l[i]]=m[l[i]];r._il[r._in]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new Function('n','g','e','if(!g)g=\"m_\"+n;var s=s_c_il['+s._in+'],c=s[g+\"_c\"],m,x,f=0;if(!c)c=s.wd[\"s_\"+g+\"_c\"];if(c&&s_d)s[g]=new Function(\"s\",s_ft(s_d(c)));x=s[g];if(!x)x=s.wd[\\'s_\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!=\"m_\"+n)){m._i=f=1;if((\"\"+x).indexOf(\"function\")>=0)x(s);else s.m_m(\"x\",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i];if(!n||x==n){m=s.m_i(x);u=m[t];if(u){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u=m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o.e,1);g[i]=0}};s.loadModule=function(n,u,d,l,e,ln){var s=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.substring(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c++;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement(\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o.defer=true;o.onload=o.onreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catch(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}return m};s.vo1=function(t,a){if(a[t]||a['!'+t])this[t]=a[t]};s.vo2=function(t,a){if(!a[t]){a[t]=this[t];if(!a[t])a['!'+t]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.dll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!s.m_m(\"d\")||d.getTime()-vo._t>=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){var s=this,d=new Date;if(!vo)vo=new Object;s.pt(s.vl_g,',','vo2',vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.maxDelay)s.maxDelay=250;s.dlt()};s.t=function(vo,id){var s=this,trk=1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1900?y+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),ta='',q='',qs='',code='',vb=new Object;s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j='1.1';if(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Object;tcf=new Function('o','var e,i=0;try{i=new Iterator(o)}catch(e){}return i');i=tcf(o);if(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?\"Y\":\"N\"}catch(e){}return hp');hp=tcf(s,tl);tcf=new Function('s','var e,ct=0;try{s.b.addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.resolution=x;s.colorDepth=c;s.javascriptVersion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;s.td=1}if(vo){s.pt(s.vl_g,',','vo2',vb);s.pt(s.vl_g,',','vo1',vo)}if(s.usePlugins)s.doPlugins(s);var l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s._1_referrer){s.referrer=r;s._1_referrer=1}if((vo&&vo._t)||!s.m_m('d')){s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk;if(!o)return '';var p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';t=s.ot(o);n=s.oid(o);x=o.s_oidt}oc=o.onclick?''+o.onclick:'';if((oc.indexOf(\"s_gs(\")>=0&&oc.indexOf(\".s_oc(\")<0)||oc.indexOf(\".tl(\")>=0)return ''}ta=n?o.target:1;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l))q+='&pe=lnk_'+(t=='d'||t=='e'?s.ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');else trk=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}if(!trk&&!qs)return '';s.sampled=s.vs(sed);if(trk){if(s.sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq(s.un)),0,id,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=''}s.sq(qs);}else{s.dl(vo);}if(vo)s.pt(s.vl_g,',','vo1',vb);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';if(!id&&!s.tc){s.tc=1;s.flushBufferedRequests()}return code};s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName=n;s.t(vo)};if(pg){s.wd.s_co=function(o){var s=s_gi(\"_\",1,1);return s.co(o)};s.wd.s_gs=function(un){var s=s_gi(un,1,1);return s.t()};s.wd.s_dc=function(un){var s=s_gi(un,1);return s.t()}}s.ssl=(s.wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=document;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgent;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Explorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));else s.apv=parseFloat(v);s.em=0;if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i=='%U0100'?1:0))}s.sa(un);s.vl_l='dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,pageName,pageURL,referrer,currencyCode';s.va_l=s.sp(s.vl_l,',');s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,products,linkName,linkType';for(var n=1;n<51;n++)s.vl_t+=',prop'+n+',eVar'+n+',hier'+n+',list'+n;s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidth,browserHeight,connectionType,homepage,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disableBufferedRequests,mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks,trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkDownloadFileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,_1_referrer';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);if(!ss)s.wds()",w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf("MSIE "),m=u.indexOf("Netscape6/"),a,i,s;if(un){un=un.toLowerCase();if(l){for(i=0;i<l.length;i++){s=l[i];if(!s._c||s._c=="s_c"){if(s.oun==un){return s}else{if(s.fs&&s.sa&&s.fs(s.oun,un)){s.sa(un);return s}}}}}}w.s_an="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";w.s_sp=new Function("x","d","var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.substring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a");w.s_jn=new Function("a","d","var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x");w.s_rep=new Function("x","o","n","return s_jn(s_sp(x,o),n)");w.s_d=new Function("x","var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn(x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x");w.s_fe=new Function("c","return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");w.s_fa=new Function("f","var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':a");w.s_ft=new Function("c","c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){if(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")'+c.substring(e+1);s=c.indexOf('=function(')}return c;");c=s_d(c);if(e>0){a=parseInt(i=v.substring(e+5));if(a>3){a=parseFloat(i)}}else{if(m>0){a=parseFloat(u.substring(m+10))}else{a=parseFloat(v)}}if(a>=5&&v.indexOf("Opera")<0&&u.indexOf("Opera")<0){w.s_c=new Function("un","pg","ss","var s=this;"+c);return new s_c(un,pg,ss)}else{s=new Function("un","pg","ss","var s=new Object;"+s_ft(c)+";return s")}return s(un,pg,ss)}
/*
 * track_static_page.js
 * Unitymedia.de
 *
 * Created on 2009-09-23.
 * Copyright 2009 SinnerSchrader. All rights reserved.
 *
 */
/*
 * Omniture tracking for static pages
 */
S2.namespace("S2.Ume.TrackStaticPage",function(){if(!runtime_env){return}var basename=location.pathname.toLowerCase().replace(/\.html.*$/,"").slice(1);var path_segments=basename.split("/",2);if(path_segments.length>1){s.channel=path_segments.shift()}s.pageName=path_segments[0];if(path_segments[0].match(/404/)){s.pageType="errorPage"}var s_code=s.t();if(s_code){document.write(s_code)}if(navigator.appVersion.indexOf("MSIE")>=0){document.write(unescape("%3C")+"!--")}});
