(function(){var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){return new T.fn.init(b,a)},M=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(e,b){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this}if(typeof e==="string"){var c=M.exec(e);if(c&&(c[1]||!b)){if(c[1]){e=T.clean([c[1]],b)}else{var a=document.getElementById(c[3]);if(a&&a.id!=c[3]){return T().find(e)}var d=T(a||[]);d.context=document;d.selector=e;return d}}else{return T(b).find(e)}}else{if(T.isFunction(e)){return T(document).ready(e)}}if(e.selector&&e.context){this.selector=e.selector;this.context=e.context}return this.setArray(T.makeArray(e))},selector:"",jquery:"1.3.1",size:function(){return this.length},get:function(a){return a===ab?T.makeArray(this):this[a]},pushStack:function(c,a,d){var b=T(c);b.prevObject=this;b.context=this.context;if(a==="find"){b.selector=this.selector+(this.selector?" ":"")+d}else{if(a){b.selector=this.selector+"."+a+"("+d+")"}}return b},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return T.each(this,a,b)},index:function(a){return T.inArray(a&&a.jquery?a[0]:a,this)},attr:function(c,a,b){var d=c;if(typeof c==="string"){if(a===ab){return this[0]&&T[b||"attr"](this[0],c)}else{d={};d[c]=a}}return this.each(function(e){for(c in d){T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,c))}})},css:function(b,a){if((b=="width"||b=="height")&&parseFloat(a)<0){a=ab}return this.attr(b,a,"curCSS")},text:function(a){if(typeof a!=="object"&&a!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a))}var b="";T.each(a||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return b},wrapAll:function(b){if(this[0]){var a=T(b,this[0].ownerDocument).clone();if(this[0].parentNode){a.insertBefore(this[0])}a.map(function(){var c=this;while(c.firstChild){c=c.firstChild}return c}).append(this)}return this},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){T(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,find:function(c){if(this.length===1&&!/,/.test(c)){var a=this.pushStack([],"find",c);a.length=0;T.find(c,this[0],a);return a}else{var b=T.map(this,function(d){return T.find(c,d)});return this.pushStack(/[^+>] [^+>]/.test(c)?T.unique(b):b,"find",c)}},clone:function(b){var c=this.map(function(){if(!T.support.noCloneEvent&&!T.isXMLDoc(this)){var d=this.cloneNode(true),e=document.createElement("div");e.appendChild(d);return T.clean([e.innerHTML])[0]}else{return this.cloneNode(true)}});var a=c.find("*").andSelf().each(function(){if(this[aa]!==ab){this[aa]=null}});if(b===true){this.find("*").andSelf().each(function(g){if(this.nodeType==3){return}var i=T.data(this,"events");for(var d in i){for(var e in i[d]){T.event.add(a[g],d,i[d][e],i[d][e].data)}}})}return c},filter:function(a){return this.pushStack(T.isFunction(a)&&T.grep(this,function(b,c){return a.call(b,c)})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1})),"filter",a)},closest:function(b){var a=T.expr.match.POS.test(b)?T(b):null;return this.map(function(){var c=this;while(c&&c.ownerDocument){if(a?a.index(c)>-1:T(c).is(b)){return c}c=c.parentNode}})},not:function(b){if(typeof b==="string"){if(ac.test(b)){return this.pushStack(T.multiFilter(b,this,true),"not",b)}else{b=T.multiFilter(b,this)}}var a=b.length&&b[b.length-1]!==ab&&!b.nodeType;return this.filter(function(){return a?T.inArray(this,b)<0:this!=b})},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a==="string"?T(a):T.makeArray(a))))},is:function(a){return !!a&&T.multiFilter(a,this).length>0},hasClass:function(a){return !!a&&this.is("."+a)},val:function(c){if(c===ab){var k=this[0];if(k){if(T.nodeName(k,"option")){return(k.attributes.value||{}).specified?k.value:k.text}if(T.nodeName(k,"select")){var e=k.selectedIndex,b=[],a=k.options,g=k.type=="select-one";if(e<0){return null}for(var j=g?e:0,d=g?e+1:a.length;j<d;j++){var i=a[j];if(i.selected){c=T(i).val();if(g){return c}b.push(c)}}return b}return(k.value||"").replace(/\r/g,"")}return ab}if(typeof c==="number"){c+=""}return this.each(function(){if(this.nodeType!=1){return}if(T.isArray(c)&&/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,c)>=0||T.inArray(this.name,c)>=0)}else{if(T.nodeName(this,"select")){var l=T.makeArray(c);T("option",this).each(function(){this.selected=(T.inArray(this.value,l)>=0||T.inArray(this.text,l)>=0)});if(!l.length){this.selectedIndex=-1}}else{this.value=c}}})},html:function(a){return a===ab?(this[0]?this[0].innerHTML:null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(a){return this.pushStack(T.map(this,function(b,c){return a.call(b,c,b)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(d,a,b){if(this[0]){var e=(this[0].ownerDocument||this[0]).createDocumentFragment(),j=T.clean(d,(this[0].ownerDocument||this[0]),e),g=e.firstChild,l=this.length>1?e.cloneNode(true):e;if(g){for(var i=0,k=this.length;i<k;i++){b.call(c(this[i],g),i>0?l.cloneNode(true):e)}}if(j){T.each(j,E)}}return this;function c(o,m){return a&&T.nodeName(o,"table")&&T.nodeName(m,"tr")?(o.getElementsByTagName("tbody")[0]||o.appendChild(o.ownerDocument.createElement("tbody"))):o}}};T.fn.init.prototype=T.fn;function E(b,a){if(a.src){T.ajax({url:a.src,async:false,dataType:"script"})}else{T.globalEval(a.text||a.textContent||a.innerHTML||"")}if(a.parentNode){a.parentNode.removeChild(a)}}function ad(){return +new Date}T.extend=T.fn.extend=function(){var c=arguments[0]||{},e=1,d=arguments.length,j=false,g;if(typeof c==="boolean"){j=c;c=arguments[1]||{};e=2}if(typeof c!=="object"&&!T.isFunction(c)){c={}}if(d==e){c=this;--e}for(;e<d;e++){if((g=arguments[e])!=null){for(var i in g){var b=c[i],a=g[i];if(c===a){continue}if(j&&a&&typeof a==="object"&&!a.nodeType){c[i]=T.extend(j,b||(a.length!=null?[]:{}),a)}else{if(a!==ab){c[i]=a}}}}}return c};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(a){W.$=S;if(a){W.jQuery=F}return T},isFunction:function(a){return L.call(a)==="[object Function]"},isArray:function(a){return L.call(a)==="[object Array]"},isXMLDoc:function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&T.isXMLDoc(a.ownerDocument)},globalEval:function(a){a=T.trim(a);if(a){var b=document.getElementsByTagName("head")[0]||document.documentElement,c=document.createElement("script");c.type="text/javascript";if(T.support.scriptEval){c.appendChild(document.createTextNode(a))}else{c.text=a}b.insertBefore(c,b.firstChild);b.removeChild(c)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},each:function(e,a,g){var i,d=0,c=e.length;if(g){if(c===ab){for(i in e){if(a.apply(e[i],g)===false){break}}}else{for(;d<c;){if(a.apply(e[d++],g)===false){break}}}}else{if(c===ab){for(i in e){if(a.call(e[i],i,e[i])===false){break}}}else{for(var b=e[0];d<c&&a.call(b,d,b)!==false;b=e[++d]){}}}return e},prop:function(b,a,c,d,e){if(T.isFunction(a)){a=a.call(b,d)}return typeof a==="number"&&c=="curCSS"&&!ag.test(e)?a+"px":a},className:{add:function(b,a){T.each((a||"").split(/\s+/),function(d,c){if(b.nodeType==1&&!T.className.has(b.className,c)){b.className+=(b.className?" ":"")+c}})},remove:function(b,a){if(b.nodeType==1){b.className=a!==ab?T.grep(b.className.split(/\s+/),function(c){return !T.className.has(a,c)}).join(" "):""}},has:function(a,b){return a&&T.inArray(b,(a.className||a).toString().split(/\s+/))>-1}},swap:function(b,c,a){var e={};for(var d in c){e[d]=b.style[d];b.style[d]=c[d]}a.call(b);for(var d in c){b.style[d]=e[d]}},css:function(e,i,c){if(i=="width"||i=="height"){var a,g={position:"absolute",visibility:"hidden",display:"block"},b=i=="width"?["Left","Right"]:["Top","Bottom"];function d(){a=i=="width"?e.offsetWidth:e.offsetHeight;var k=0,j=0;T.each(b,function(){k+=parseFloat(T.curCSS(e,"padding"+this,true))||0;j+=parseFloat(T.curCSS(e,"border"+this+"Width",true))||0});a-=Math.round(k+j)}if(T(e).is(":visible")){d()}else{T.swap(e,g,d)}return Math.max(0,a)}return T.curCSS(e,i,c)},curCSS:function(e,j,i){var b,k=e.style;if(j=="opacity"&&!T.support.opacity){b=T.attr(k,"opacity");return b==""?"1":b}if(j.match(/float/i)){j=H}if(!i&&k&&k[j]){b=k[j]}else{if(Q.getComputedStyle){if(j.match(/float/i)){j="float"}j=j.replace(/([A-Z])/g,"-$1").toLowerCase();var a=Q.getComputedStyle(e,null);if(a){b=a.getPropertyValue(j)}if(j=="opacity"&&b==""){b="1"}}else{if(e.currentStyle){var d=j.replace(/\-(\w)/g,function(m,l){return l.toUpperCase()});b=e.currentStyle[j]||e.currentStyle[d];if(!/^\d+(px)?$/i.test(b)&&/^\d/.test(b)){var g=k.left,c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;k.left=b||0;b=k.pixelLeft+"px";k.left=g;e.runtimeStyle.left=c}}}}return b},clean:function(i,b,d){b=b||document;if(typeof b.createElement==="undefined"){b=b.ownerDocument||b[0]&&b[0].ownerDocument||document}if(!d&&i.length===1&&typeof i[0]==="string"){var e=/^<(\w+)\s*\/?>$/.exec(i[0]);if(e){return[b.createElement(e[1])]}}var g=[],j=[],a=b.createElement("div");T.each(i,function(m,k){if(typeof k==="number"){k+=""}if(!k){return}if(typeof k==="string"){k=k.replace(/(<(\w+)[^>]*?)\/>/g,function(t,s,u){return u.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?t:s+"></"+u+">"});var o=T.trim(k).toLowerCase();var l=!o.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!o.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||o.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!o.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!o.indexOf("<td")||!o.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!o.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];a.innerHTML=l[1]+k+l[2];while(l[0]--){a=a.lastChild}if(!T.support.tbody){var q=!o.indexOf("<table")&&o.indexOf("<tbody")<0?a.firstChild&&a.firstChild.childNodes:l[1]=="<table>"&&o.indexOf("<tbody")<0?a.childNodes:[];for(var r=q.length-1;r>=0;--r){if(T.nodeName(q[r],"tbody")&&!q[r].childNodes.length){q[r].parentNode.removeChild(q[r])}}}if(!T.support.leadingWhitespace&&/^\s/.test(k)){a.insertBefore(b.createTextNode(k.match(/^\s*/)[0]),a.firstChild)}k=T.makeArray(a.childNodes)}if(k.nodeType){g.push(k)}else{g=T.merge(g,k)}});if(d){for(var c=0;g[c];c++){if(T.nodeName(g[c],"script")&&(!g[c].type||g[c].type.toLowerCase()==="text/javascript")){j.push(g[c].parentNode?g[c].parentNode.removeChild(g[c]):g[c])}else{if(g[c].nodeType===1){g.splice.apply(g,[c+1,0].concat(T.makeArray(g[c].getElementsByTagName("script"))))}d.appendChild(g[c])}}return j}return g},attr:function(c,g,b){if(!c||c.nodeType==3||c.nodeType==8){return ab}var e=!T.isXMLDoc(c),a=b!==ab;g=e&&T.props[g]||g;if(c.tagName){var i=/href|src|style/.test(g);if(g=="selected"&&c.parentNode){c.parentNode.selectedIndex}if(g in c&&e&&!i){if(a){if(g=="type"&&T.nodeName(c,"input")&&c.parentNode){throw"type property can't be changed"}c[g]=b}if(T.nodeName(c,"form")&&c.getAttributeNode(g)){return c.getAttributeNode(g).nodeValue}if(g=="tabIndex"){var d=c.getAttributeNode("tabIndex");return d&&d.specified?d.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&&c.href?0:ab}return c[g]}if(!T.support.style&&e&&g=="style"){return T.attr(c.style,"cssText",b)}if(a){c.setAttribute(g,""+b)}var j=!T.support.hrefNormalized&&e&&i?c.getAttribute(g,2):c.getAttribute(g);return j===null?ab:j}if(!T.support.opacity&&g=="opacity"){if(a){c.zoom=1;c.filter=(c.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(b)+""=="NaN"?"":"alpha(opacity="+b*100+")")}return c.filter&&c.filter.indexOf("opacity=")>=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}g=g.replace(/-([a-z])/ig,function(l,k){return k.toUpperCase()});if(a){c[g]=b}return c[g]},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"")},makeArray:function(a){var c=[];if(a!=null){var b=a.length;if(b==null||typeof a==="string"||T.isFunction(a)||a.setInterval){c[0]=a}else{while(b){c[--b]=a[b]}}}return c},inArray:function(b,a){for(var d=0,c=a.length;d<c;d++){if(a[d]===b){return d}}return -1},merge:function(b,e){var d=0,c,a=b.length;if(!T.support.getAll){while((c=e[d++])!=null){if(c.nodeType!=8){b[a++]=c}}}else{while((c=e[d++])!=null){b[a++]=c}}return b},unique:function(a){var g=[],i={};try{for(var e=0,d=a.length;e<d;e++){var b=T.data(a[e]);if(!i[b]){i[b]=true;g.push(a[e])}}}catch(c){g=a}return g},grep:function(e,a,g){var d=[];for(var c=0,b=e.length;c<b;c++){if(!g!=!a(e[c],c)){d.push(e[c])}}return d},map:function(g,a){var e=[];for(var d=0,c=g.length;d<c;d++){var b=a(g[d],d);if(b!=null){e[e.length]=b}}return e.concat.apply([],e)}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&&!/opera/.test(O),mozilla:/mozilla/.test(O)&&!/(compatible|webkit)/.test(O)};T.each({parent:function(a){return a.parentNode},parents:function(a){return T.dir(a,"parentNode")},next:function(a){return T.nth(a,2,"nextSibling")},prev:function(a){return T.nth(a,2,"previousSibling")},nextAll:function(a){return T.dir(a,"nextSibling")},prevAll:function(a){return T.dir(a,"previousSibling")},siblings:function(a){return T.sibling(a.parentNode.firstChild,a)},children:function(a){return T.sibling(a.firstChild)},contents:function(a){return T.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)}},function(b,a){T.fn[b]=function(d){var c=T.map(this,a);if(d&&typeof d=="string"){c=T.multiFilter(d,c)}return this.pushStack(T.unique(c),b,d)}});T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,a){T.fn[b]=function(){var c=arguments;return this.each(function(){for(var e=0,d=c.length;e<d;e++){T(c[e])[a](this)}})}});T.each({removeAttr:function(a){T.attr(this,a,"");if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){T.className.add(this,a)},removeClass:function(a){T.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!=="boolean"){b=!T.className.has(this,a)}T.className[b?"add":"remove"](this,a)},remove:function(a){if(!a||T.filter(a,[this]).length){T("*",this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(b,a){T.fn[b]=function(){return this.each(a,arguments)}});function Y(b,a){return b[0]&&parseInt(T.curCSS(b[0],a,true),10)||0}var aa="jQuery"+ad(),I=0,R={};T.extend({cache:{},data:function(c,d,b){c=c==W?R:c;var a=c[aa];if(!a){a=c[aa]=++I}if(d&&!T.cache[a]){T.cache[a]={}}if(b!==ab){T.cache[a][d]=b}return d?T.cache[a][d]:a},removeData:function(c,d){c=c==W?R:c;var a=c[aa];if(d){if(T.cache[a]){delete T.cache[a][d];d="";for(d in T.cache[a]){break}if(!d){T.removeData(c)}}}else{try{delete c[aa]}catch(b){if(c.removeAttribute){c.removeAttribute(aa)}}delete T.cache[a]}},queue:function(c,d,a){if(c){d=(d||"fx")+"queue";var b=T.data(c,d);if(!b||T.isArray(a)){b=T.data(c,d,T.makeArray(a))}else{if(a){b.push(a)}}}return b},dequeue:function(a,b){var d=T.queue(a,b),c=d.shift();if(!b||b==="fx"){c=d[0]}if(c!==ab){c.call(a)}}});T.fn.extend({data:function(d,b){var a=d.split(".");a[1]=a[1]?"."+a[1]:"";if(b===ab){var c=this.triggerHandler("getData"+a[1]+"!",[a[0]]);if(c===ab&&this.length){c=T.data(this[0],d)}return c===ab&&a[1]?this.data(a[0]):c}else{return this.trigger("setData"+a[1]+"!",[a[0],b]).each(function(){T.data(this,d,b)})}},removeData:function(a){return this.each(function(){T.removeData(this,a)})},queue:function(b,a){if(typeof b!=="string"){a=b;b="fx"}if(a===ab){return T.queue(this[0],b)}return this.each(function(){var c=T.queue(this,b,a);if(b=="fx"&&c.length==1){c[0].call(this)}})},dequeue:function(a){return this.each(function(){T.dequeue(this,a)})}});(function(){var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,j=0,o=Object.prototype.toString;var q=function(v,z,s,al){s=s||[];z=z||document;if(z.nodeType!==1&&z.nodeType!==9){return[]}if(!v||typeof v!=="string"){return s}var u=[],x,ai,B,A,ak,y,w=true;b.lastIndex=0;while((x=b.exec(v))!==null){u.push(x[1]);if(x[2]){y=RegExp.rightContext;break}}if(u.length>1&&i.exec(v)){if(u.length===2&&m.relative[u[0]]){ai=l(u[0]+u[1],z)}else{ai=m.relative[u[0]]?[z]:q(u.shift(),z);while(u.length){v=u.shift();if(m.relative[v]){v+=u.shift()}ai=l(v,ai)}}}else{var aj=al?{expr:u.pop(),set:r(al)}:q.find(u.pop(),u.length===1&&z.parentNode?z.parentNode:z,c(z));ai=q.filter(aj.expr,aj.set);if(u.length>0){B=r(ai)}else{w=false}while(u.length){var C=u.pop(),D=C;if(!m.relative[C]){C=""}else{D=u.pop()}if(D==null){D=z}m.relative[C](B,D,c(z))}}if(!B){B=ai}if(!B){throw"Syntax error, unrecognized expression: "+(C||v)}if(o.call(B)==="[object Array]"){if(!w){s.push.apply(s,B)}else{if(z.nodeType===1){for(var t=0;B[t]!=null;t++){if(B[t]&&(B[t]===true||B[t].nodeType===1&&k(z,B[t]))){s.push(ai[t])}}}else{for(var t=0;B[t]!=null;t++){if(B[t]&&B[t].nodeType===1){s.push(ai[t])}}}}}else{r(B,s)}if(y){q(y,z,s,al)}return s};q.matches=function(t,s){return q(t,null,null,s)};q.find=function(t,A,s){var u,w;if(!t){return[]}for(var x=0,y=m.order.length;x<y;x++){var v=m.order[x],w;if((w=m.match[v].exec(t))){var z=RegExp.leftContext;if(z.substr(z.length-1)!=="\\"){w[1]=(w[1]||"").replace(/\\/g,"");u=m.find[v](w,A,s);if(u!=null){t=t.replace(m.match[v],"");break}}}}if(!u){u=A.getElementsByTagName("*")}return{set:u,expr:t}};q.filter=function(ak,s,D,x){var y=ak,B=[],u=s,v,A;while(ak&&s.length){for(var t in m.filter){if((v=m.match[t].exec(ak))!=null){var z=m.filter[t],C,ai;A=false;if(u==B){B=[]}if(m.preFilter[t]){v=m.preFilter[t](v,u,D,B,x);if(!v){A=C=true}else{if(v===true){continue}}}if(v){for(var w=0;(ai=u[w])!=null;w++){if(ai){C=z(ai,v,w,u);var aj=x^!!C;if(D&&C!=null){if(aj){A=true}else{u[w]=false}}else{if(aj){B.push(ai);A=true}}}}}if(C!==ab){if(!D){u=B}ak=ak.replace(m.match[t],"");if(!A){return[]}break}}}ak=ak.replace(/\s*,\s*/,"");if(ak==y){if(A==null){throw"Syntax error, unrecognized expression: "+ak}else{break}}y=ak}return u};var m=q.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(s){return s.getAttribute("href")}},relative:{"+":function(s,v){for(var u=0,w=s.length;u<w;u++){var t=s[u];if(t){var x=t.previousSibling;while(x&&x.nodeType!==1){x=x.previousSibling}s[u]=typeof v==="string"?x||false:x===v}}if(typeof v==="string"){q.filter(v,s,true)}},">":function(y,v,x){if(typeof v==="string"&&!/\W/.test(v)){v=x?v:v.toUpperCase();for(var u=0,w=y.length;u<w;u++){var s=y[u];if(s){var t=s.parentNode;y[u]=t.nodeName===v?t:false}}}else{for(var u=0,w=y.length;u<w;u++){var s=y[u];if(s){y[u]=typeof v==="string"?s.parentNode:s.parentNode===v}}if(typeof v==="string"){q.filter(v,y,true)}}},"":function(t,v,x){var u="done"+(j++),w=a;if(!v.match(/\W/)){var s=v=x?v:v.toUpperCase();w=d}w("parentNode",v,u,t,s,x)},"~":function(t,v,x){var u="done"+(j++),w=a;if(typeof v==="string"&&!v.match(/\W/)){var s=v=x?v:v.toUpperCase();w=d}w("previousSibling",v,u,t,s,x)}},find:{ID:function(u,t,s){if(typeof t.getElementById!=="undefined"&&!s){var v=t.getElementById(u[1]);return v?[v]:[]}},NAME:function(u,t,s){if(typeof t.getElementsByName!=="undefined"&&!s){return t.getElementsByName(u[1])}},TAG:function(t,s){return s.getElementsByTagName(t[1])}},preFilter:{CLASS:function(t,v,u,w,x){t=" "+t[1].replace(/\\/g,"")+" ";var y;for(var s=0;(y=v[s])!=null;s++){if(y){if(x^(" "+y.className+" ").indexOf(t)>=0){if(!u){w.push(y)}}else{if(u){v[s]=false}}}}return false},ID:function(s){return s[1].replace(/\\/g,"")},TAG:function(t,u){for(var s=0;u[s]===false;s++){}return u[s]&&c(u[s])?t[1]:t[1].toUpperCase()},CHILD:function(t){if(t[1]=="nth"){var s=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(t[2]=="even"&&"2n"||t[2]=="odd"&&"2n+1"||!/\D/.test(t[2])&&"0n+"+t[2]||t[2]);t[2]=(s[1]+(s[2]||1))-0;t[3]=s[3]-0}t[0]="done"+(j++);return t},ATTR:function(s){var t=s[1].replace(/\\/g,"");if(m.attrMap[t]){s[1]=m.attrMap[t]}if(s[2]==="~="){s[4]=" "+s[4]+" "}return s},PSEUDO:function(s,v,u,w,x){if(s[1]==="not"){if(s[3].match(b).length>1){s[3]=q(s[3],null,null,v)}else{var t=q.filter(s[3],v,u,true^x);if(!u){w.push.apply(w,t)}return false}}else{if(m.match.POS.test(s[0])){return true}}return s},POS:function(s){s.unshift(true);return s}},filters:{enabled:function(s){return s.disabled===false&&s.type!=="hidden"},disabled:function(s){return s.disabled===true},checked:function(s){return s.checked===true},selected:function(s){s.parentNode.selectedIndex;return s.selected===true},parent:function(s){return !!s.firstChild},empty:function(s){return !s.firstChild},has:function(s,t,u){return !!q(u[3],s).length},header:function(s){return/h\d/i.test(s.nodeName)},text:function(s){return"text"===s.type},radio:function(s){return"radio"===s.type},checkbox:function(s){return"checkbox"===s.type},file:function(s){return"file"===s.type},password:function(s){return"password"===s.type},submit:function(s){return"submit"===s.type},image:function(s){return"image"===s.type},reset:function(s){return"reset"===s.type},button:function(s){return"button"===s.type||s.nodeName.toUpperCase()==="BUTTON"},input:function(s){return/input|select|textarea|button/i.test(s.nodeName)}},setFilters:{first:function(s,t){return t===0},last:function(t,u,v,s){return u===s.length-1},even:function(s,t){return t%2===0},odd:function(s,t){return t%2===1},lt:function(s,t,u){return t<u[3]-0},gt:function(s,t,u){return t>u[3]-0},nth:function(s,t,u){return u[3]-0==t},eq:function(s,t,u){return u[3]-0==t}},filter:{CHILD:function(A,x){var u=x[1],t=A.parentNode;var v=x[0];if(t&&(!t[v]||!A.nodeIndex)){var w=1;for(var z=t.firstChild;z;z=z.nextSibling){if(z.nodeType==1){z.nodeIndex=w++}}t[v]=w-1}if(u=="first"){return A.nodeIndex==1}else{if(u=="last"){return A.nodeIndex==t[v]}else{if(u=="only"){return t[v]==1}else{if(u=="nth"){var B=false,y=x[2],s=x[3];if(y==1&&s==0){return true}if(y==0){if(A.nodeIndex==s){B=true}}else{if((A.nodeIndex-s)%y==0&&(A.nodeIndex-s)/y>=0){B=true}}return B}}}}},PSEUDO:function(y,u,t,x){var v=u[1],s=m.filters[v];if(s){return s(y,t,u,x)}else{if(v==="contains"){return(y.textContent||y.innerText||"").indexOf(u[3])>=0}else{if(v==="not"){var z=u[3];for(var t=0,w=z.length;t<w;t++){if(z[t]===y){return false}}return true}}}},ID:function(s,t){return s.nodeType===1&&s.getAttribute("id")===t},TAG:function(s,t){return(t==="*"&&s.nodeType===1)||s.nodeName===t},CLASS:function(s,t){return t.test(s.className)},ATTR:function(s,u){var w=m.attrHandle[u[1]]?m.attrHandle[u[1]](s):s[u[1]]||s.getAttribute(u[1]),x=w+"",t=u[2],v=u[4];return w==null?t==="!=":t==="="?x===v:t==="*="?x.indexOf(v)>=0:t==="~="?(" "+x+" ").indexOf(v)>=0:!u[4]?w:t==="!="?x!=v:t==="^="?x.indexOf(v)===0:t==="$="?x.substr(x.length-v.length)===v:t==="|="?x===v||x.substr(0,v.length+1)===v+"-":false},POS:function(s,v,u,x){var w=v[2],t=m.setFilters[w];if(t){return t(s,u,v,x)}}}};var i=m.match.POS;for(var e in m.match){m.match[e]=RegExp(m.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var r=function(s,t){s=Array.prototype.slice.call(s);if(t){t.push.apply(t,s);return t}return s};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(g){r=function(s,t){var v=t||[];if(o.call(s)==="[object Array]"){Array.prototype.push.apply(v,s)}else{if(typeof s.length==="number"){for(var u=0,w=s.length;u<w;u++){v.push(s[u])}}else{for(var u=0;s[u];u++){v.push(s[u])}}}return v}}(function(){var t=document.createElement("form"),s="script"+(new Date).getTime();t.innerHTML="<input name='"+s+"'/>";var u=document.documentElement;u.insertBefore(t,u.firstChild);if(!!document.getElementById(s)){m.find.ID=function(v,y,x){if(typeof y.getElementById!=="undefined"&&!x){var w=y.getElementById(v[1]);return w?w.id===v[1]||typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id").nodeValue===v[1]?[w]:ab:[]}};m.filter.ID=function(x,w){var v=typeof x.getAttributeNode!=="undefined"&&x.getAttributeNode("id");return x.nodeType===1&&v&&v.nodeValue===w}}u.removeChild(t)})();(function(){var s=document.createElement("div");s.appendChild(document.createComment(""));if(s.getElementsByTagName("*").length>0){m.find.TAG=function(w,x){var t=x.getElementsByTagName(w[1]);if(w[1]==="*"){var u=[];for(var v=0;t[v];v++){if(t[v].nodeType===1){u.push(t[v])}}t=u}return t}}s.innerHTML="<a href='#'></a>";if(s.firstChild&&s.firstChild.getAttribute("href")!=="#"){m.attrHandle.href=function(t){return t.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var t=q,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}q=function(y,u,w,v){u=u||document;if(!v&&u.nodeType===9&&!c(u)){try{return r(u.querySelectorAll(y),w)}catch(x){}}return t(y,u,w,v)};q.find=t.find;q.filter=t.filter;q.selectors=t.selectors;q.matches=t.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){m.order.splice(1,0,"CLASS");m.find.CLASS=function(t,s){return s.getElementsByClassName(t[1])}}function d(z,t,u,B,s,C){for(var w=0,y=B.length;w<y;w++){var A=B[w];if(A){A=A[z];var v=false;while(A&&A.nodeType){var x=A[u];if(x){v=B[x];break}if(A.nodeType===1&&!C){A[u]=w}if(A.nodeName===t){v=A;break}A=A[z]}B[w]=v}}}function a(z,u,v,B,t,s){for(var x=0,y=B.length;x<y;x++){var A=B[x];if(A){A=A[z];var w=false;while(A&&A.nodeType){if(A[v]){w=B[A[v]];break}if(A.nodeType===1){if(!s){A[v]=x}if(typeof u!=="string"){if(A===u){w=true;break}}else{if(q.filter(u,[A]).length>0){w=A;break}}}A=A[z]}B[x]=w}}}var k=document.compareDocumentPosition?function(s,t){return s.compareDocumentPosition(t)&16}:function(s,t){return s!==t&&(s.contains?s.contains(t):true)};var c=function(s){return s.nodeType===9&&s.documentElement.nodeName!=="HTML"||!!s.ownerDocument&&c(s.ownerDocument)};var l=function(w,x){var t=[],s="",z,u=x.nodeType?[x]:x;while((z=m.match.PSEUDO.exec(w))){s+=z[0];w=w.replace(m.match.PSEUDO,"")}w=m.relative[w]?w+"*":w;for(var y=0,v=u.length;y<v;y++){q(w,u[y],t)}return q.filter(s,t)};T.find=q;T.filter=q.filter;T.expr=q.selectors;T.expr[":"]=T.expr.filters;q.selectors.filters.hidden=function(s){return"hidden"===s.type||T.css(s,"display")==="none"||T.css(s,"visibility")==="hidden"};q.selectors.filters.visible=function(s){return"hidden"!==s.type&&T.css(s,"display")!=="none"&&T.css(s,"visibility")!=="hidden"};q.selectors.filters.animated=function(s){return T.grep(T.timers,function(t){return s===t.elem}).length};T.multiFilter=function(s,u,t){if(t){s=":not("+s+")"}return q.matches(s,u)};T.dir=function(t,u){var v=[],s=t[u];while(s&&s!=document){if(s.nodeType==1){v.push(s)}s=s[u]}return v};T.nth=function(s,w,u,t){w=w||1;var v=0;for(;s;s=s[u]){if(s.nodeType==1&&++v==w){break}}return s};T.sibling=function(s,t){var u=[];for(;s;s=s.nextSibling){if(s.nodeType==1&&s!=t){u.push(s)}}return u};return;W.Sizzle=q})();T.event={add:function(c,g,d,a){if(c.nodeType==3||c.nodeType==8){return}if(c.setInterval&&c!=W){c=W}if(!d.guid){d.guid=this.guid++}if(a!==ab){var e=d;d=this.proxy(e);d.data=a}var i=T.data(c,"events")||T.data(c,"events",{}),b=T.data(c,"handle")||T.data(c,"handle",function(){return typeof T!=="undefined"&&!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab});b.elem=c;T.each(g.split(/\s+/),function(m,l){var k=l.split(".");l=k.shift();d.type=k.slice().sort().join(".");var j=i[l];if(T.event.specialAll[l]){T.event.specialAll[l].setup.call(c,a,k)}if(!j){j=i[l]={};if(!T.event.special[l]||T.event.special[l].setup.call(c,a,k)===false){if(c.addEventListener){c.addEventListener(l,b,false)}else{if(c.attachEvent){c.attachEvent("on"+l,b)}}}}j[d.guid]=d;T.event.global[l]=true});c=null},guid:1,global:{},remove:function(b,e,c){if(b.nodeType==3||b.nodeType==8){return}var g=T.data(b,"events"),i,j;if(g){if(e===ab||(typeof e==="string"&&e.charAt(0)==".")){for(var d in g){this.remove(b,d+(e||""))}}else{if(e.type){c=e.handler;e=e.type}T.each(e.split(/\s+/),function(q,m){var k=m.split(".");m=k.shift();var o=RegExp("(^|\\.)"+k.slice().sort().join(".*\\.")+"(\\.|$)");if(g[m]){if(c){delete g[m][c.guid]}else{for(var l in g[m]){if(o.test(g[m][l].type)){delete g[m][l]}}}if(T.event.specialAll[m]){T.event.specialAll[m].teardown.call(b,k)}for(i in g[m]){break}if(!i){if(!T.event.special[m]||T.event.special[m].teardown.call(b,k)===false){if(b.removeEventListener){b.removeEventListener(m,T.data(b,"handle"),false)}else{if(b.detachEvent){b.detachEvent("on"+m,T.data(b,"handle"))}}}i=null;delete g[m]}}})}for(i in g){break}if(!i){var a=T.data(b,"handle");if(a){a.elem=null}T.removeData(b,"events");T.removeData(b,"handle")}}},trigger:function(d,b,e,j){var g=d.type||d;if(!j){d=typeof d==="object"?d[aa]?d:T.extend(T.Event(g),d):T.Event(g);if(g.indexOf("!")>=0){d.type=g=g.slice(0,-1);d.exclusive=true}if(!e){d.stopPropagation();if(this.global[g]){T.each(T.cache,function(){if(this.events&&this.events[g]){T.event.trigger(d,b,this.handle.elem)}})}}if(!e||e.nodeType==3||e.nodeType==8){return ab}d.result=ab;d.target=e;b=T.makeArray(b);b.unshift(d)}d.currentTarget=e;var c=T.data(e,"handle");if(c){c.apply(e,b)}if((!e[g]||(T.nodeName(e,"a")&&g=="click"))&&e["on"+g]&&e["on"+g].apply(e,b)===false){d.result=false}if(!j&&e[g]&&!d.isDefaultPrevented()&&!(T.nodeName(e,"a")&&g=="click")){this.triggered=true;try{e[g]()}catch(a){}}this.triggered=false;if(!d.isPropagationStopped()){var i=e.parentNode||e.ownerDocument;if(i){T.event.trigger(d,b,i,true)}}},handle:function(b){var c,j;b=arguments[0]=T.event.fix(b||W.event);var a=b.type.split(".");b.type=a.shift();c=!a.length&&!b.exclusive;var d=RegExp("(^|\\.)"+a.slice().sort().join(".*\\.")+"(\\.|$)");j=(T.data(this,"events")||{})[b.type];for(var g in j){var e=j[g];if(c||d.test(e.type)){b.handler=e;b.data=e.data;var i=e.apply(this,arguments);if(i!==ab){b.result=i;if(i===false){b.preventDefault();b.stopPropagation()}}if(b.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(c){if(c[aa]){return c}var e=c;c=T.Event(e);for(var d=this.props.length,a;d;){a=this.props[--d];c[a]=e[a]}if(!c.target){c.target=c.srcElement||document}if(c.target.nodeType==3){c.target=c.target.parentNode}if(!c.relatedTarget&&c.fromElement){c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement}if(c.pageX==null&&c.clientX!=null){var b=document.documentElement,g=document.body;c.pageX=c.clientX+(b&&b.scrollLeft||g&&g.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&&b.scrollTop||g&&g.scrollTop||0)-(b.clientTop||0)}if(!c.which&&((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){c.which=c.charCode||c.keyCode}if(!c.metaKey&&c.ctrlKey){c.metaKey=c.ctrlKey}if(!c.which&&c.button){c.which=(c.button&1?1:(c.button&2?3:(c.button&4?2:0)))}return c},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(b,a){T.event.add(this,a[0],af)},teardown:function(a){if(a.length){var c=0,b=RegExp("(^|\\.)"+a[0]+"(\\.|$)");T.each((T.data(this,"events").live||{}),function(){if(b.test(this.type)){c++}});if(c<1){T.event.remove(this,a[0],af)}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a)}if(a&&a.type){this.originalEvent=a;this.type=a.type}else{this.type=a}this.timeStamp=ad();this[aa]=true};function X(){return false}function J(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ah=function(b){var c=b.relatedTarget;while(c&&c!=this){try{c=c.parentNode}catch(a){c=this}}if(c!=this){b.type=b.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(a,b){T.event.special[b]={setup:function(){T.event.add(this,a,ah,b)},teardown:function(){T.event.remove(this,a,ah)}}});T.fn.extend({bind:function(b,a,c){return b=="unload"?this.one(b,a,c):this.each(function(){T.event.add(this,b,c||a,c&&a)})},one:function(b,a,c){var d=T.event.proxy(c||a,function(e){T(this).unbind(e,d);return(c||a).apply(this,arguments)});return this.each(function(){T.event.add(this,b,d,c&&a)})},unbind:function(a,b){return this.each(function(){T.event.remove(this,a,b)})},trigger:function(b,a){return this.each(function(){T.event.trigger(b,a,this)})},triggerHandler:function(c,a){if(this[0]){var b=T.Event(c);b.preventDefault();b.stopPropagation();T.event.trigger(b,a,this[0]);return b.result}},toggle:function(a){var c=arguments,b=1;while(b<c.length){T.event.proxy(a,c[b++])}return this.click(T.event.proxy(a,function(d){this.lastToggle=(this.lastToggle||0)%b;d.preventDefault();return c[this.lastToggle++].apply(this,arguments)||false}))},hover:function(b,a){return this.mouseenter(b).mouseleave(a)},ready:function(a){P();if(T.isReady){a.call(document,T)}else{T.readyList.push(a)}return this},live:function(a,b){var c=T.event.proxy(b);c.guid+=this.selector+a;T(document).bind(Z(a,this.selector),this.selector,c);return this},die:function(a,b){T(document).unbind(Z(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function af(a){var d=RegExp("(^|\\.)"+a.type+"(\\.|$)"),b=true,c=[];T.each(T.data(this,"events").live||[],function(i,g){if(d.test(g.type)){var e=T(a.target).closest(g.data)[0];if(e){c.push({elem:e,fn:g})}}});T.each(c,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){b=false}});return b}function Z(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"|")].join(".")}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler("ready")}}});var G=false;function P(){if(G){return}G=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);T.ready()}});if(document.documentElement.doScroll&&typeof W.frameElement==="undefined"){(function(){if(T.isReady){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}T.ready()})()}}}T.event.add(W,"load",T.ready)}T.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(a,b){T.fn[b]=function(c){return c?this.bind(b,c):this.trigger(b)}});T(W).bind("unload",function(){for(var a in T.cache){if(a!=1&&T.cache[a].handle){T.event.remove(T.cache[a].handle.elem)}}});(function(){T.support={};var g=document.documentElement,e=document.createElement("script"),a=document.createElement("div"),b="script"+(new Date).getTime();a.style.display="none";a.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 d=a.getElementsByTagName("*"),i=a.getElementsByTagName("a")[0];if(!d||!d.length||!i){return}T.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName("tbody").length,objectAll:!!a.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:i.style.opacity==="0.5",cssFloat:!!i.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};e.type="text/javascript";try{e.appendChild(document.createTextNode("window."+b+"=1;"))}catch(c){}g.insertBefore(e,g.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b]}g.removeChild(e);if(a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function(){T.support.noCloneEvent=false;a.detachEvent("onclick",arguments.callee)});a.cloneNode(true).fireEvent("onclick")}T(function(){var j=document.createElement("div");j.style.width="1px";j.style.paddingLeft="1px";document.body.appendChild(j);T.boxModel=T.support.boxModel=j.offsetWidth===2;document.body.removeChild(j)})})();var H=T.support.cssFloat?"cssFloat":"styleFloat";T.props={"for":"htmlFor","class":"className","float":H,cssFloat:H,styleFloat:H,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};T.fn.extend({_load:T.fn.load,load:function(e,b,a){if(typeof e!=="string"){return this._load(e)}var c=e.indexOf(" ");if(c>=0){var i=e.slice(c,e.length);e=e.slice(0,c)}var d="GET";if(b){if(T.isFunction(b)){a=b;b=null}else{if(typeof b==="object"){b=T.param(b);d="POST"}}}var g=this;T.ajax({url:e,type:d,dataType:"html",data:b,complete:function(k,j){if(j=="success"||j=="notmodified"){g.html(i?T("<div/>").append(k.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(i):k.responseText)}if(a){g.each(a,[k.responseText,j,k])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(c,b){var a=T(this).val();return a==null?null:T.isArray(a)?T.map(a,function(d,e){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});T.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(b,a){T.fn[a]=function(c){return this.bind(a,c)}});var N=ad();T.extend({get:function(d,b,a,c){if(T.isFunction(b)){a=b;b=null}return T.ajax({type:"GET",url:d,data:b,success:a,dataType:c})},getScript:function(b,a){return T.get(b,null,a,"script")},getJSON:function(c,b,a){return T.get(c,b,a,"json")},post:function(d,b,a,c){if(T.isFunction(b)){a=b;b={}}return T.ajax({type:"POST",url:d,data:b,success:a,dataType:c})},ajaxSetup:function(a){T.extend(T.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return W.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(m){m=T.extend(true,m,T.extend(true,{},T.ajaxSettings,m));var a,v=/=\?(&|$)/g,g,b,u=m.type.toUpperCase();if(m.data&&m.processData&&typeof m.data!=="string"){m.data=T.param(m.data)}if(m.dataType=="jsonp"){if(u=="GET"){if(!m.url.match(v)){m.url+=(m.url.match(/\?/)?"&":"?")+(m.jsonp||"callback")+"=?"}}else{if(!m.data||!m.data.match(v)){m.data=(m.data?m.data+"&":"")+(m.jsonp||"callback")+"=?"}}m.dataType="json"}if(m.dataType=="json"&&(m.data&&m.data.match(v)||m.url.match(v))){a="jsonp"+N++;if(m.data){m.data=(m.data+"").replace(v,"="+a+"$1")}m.url=m.url.replace(v,"="+a+"$1");m.dataType="script";W[a]=function(y){b=y;s();o();W[a]=ab;try{delete W[a]}catch(x){}if(t){t.removeChild(d)}}}if(m.dataType=="script"&&m.cache==null){m.cache=false}if(m.cache===false&&u=="GET"){var w=ad();var c=m.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+w+"$2");m.url=c+((c==m.url)?(m.url.match(/\?/)?"&":"?")+"_="+w:"")}if(m.data&&u=="GET"){m.url+=(m.url.match(/\?/)?"&":"?")+m.data;m.data=null}if(m.global&&!T.active++){T.event.trigger("ajaxStart")}var i=/^(\w+:)?\/\/([^\/?#]+)/.exec(m.url);if(m.dataType=="script"&&u=="GET"&&i&&(i[1]&&i[1]!=location.protocol||i[2]!=location.host)){var t=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.src=m.url;if(m.scriptCharset){d.charset=m.scriptCharset}if(!a){var k=false;d.onload=d.onreadystatechange=function(){if(!k&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){k=true;s();o();t.removeChild(d)}}}t.appendChild(d);return ab}var q=false;var r=m.xhr();if(m.username){r.open(u,m.url,m.async,m.username,m.password)}else{r.open(u,m.url,m.async)}try{if(m.data){r.setRequestHeader("Content-Type",m.contentType)}if(m.ifModified){r.setRequestHeader("If-Modified-Since",T.lastModified[m.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}r.setRequestHeader("X-Requested-With","XMLHttpRequest");r.setRequestHeader("Accept",m.dataType&&m.accepts[m.dataType]?m.accepts[m.dataType]+", */*":m.accepts._default)}catch(e){}if(m.beforeSend&&m.beforeSend(r,m)===false){if(m.global&&!--T.active){T.event.trigger("ajaxStop")}r.abort();return false}if(m.global){T.event.trigger("ajaxSend",[r,m])}var l=function(z){if(r.readyState==0){if(j){clearInterval(j);j=null;if(m.global&&!--T.active){T.event.trigger("ajaxStop")}}}else{if(!q&&r&&(r.readyState==4||z=="timeout")){q=true;if(j){clearInterval(j);j=null}g=z=="timeout"?"timeout":!T.httpSuccess(r)?"error":m.ifModified&&T.httpNotModified(r,m.url)?"notmodified":"success";if(g=="success"){try{b=T.httpData(r,m.dataType,m)}catch(x){g="parsererror"}}if(g=="success"){var y;try{y=r.getResponseHeader("Last-Modified")}catch(x){}if(m.ifModified&&y){T.lastModified[m.url]=y}if(!a){s()}}else{T.handleError(m,r,g)}o();if(z){r.abort()}if(m.async){r=null}}}};if(m.async){var j=setInterval(l,13);if(m.timeout>0){setTimeout(function(){if(r&&!q){l("timeout")}},m.timeout)}}try{r.send(m.data)}catch(e){T.handleError(m,r,null,e)}if(!m.async){l()}function s(){if(m.success){m.success(b,g)}if(m.global){T.event.trigger("ajaxSuccess",[r,m])}}function o(){if(m.complete){m.complete(r,g)}if(m.global){T.event.trigger("ajaxComplete",[r,m])}if(m.global&&!--T.active){T.event.trigger("ajaxStop")}}return r},handleError:function(c,a,d,b){if(c.error){c.error(a,d,b)}if(c.global){T.event.trigger("ajaxError",[a,c,b])}},active:0,httpSuccess:function(a){try{return !a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||a.status==1223}catch(b){}return false},httpNotModified:function(b,d){try{var a=b.getResponseHeader("Last-Modified");return b.status==304||a==T.lastModified[d]}catch(c){}return false},httpData:function(a,c,d){var e=a.getResponseHeader("content-type"),g=c=="xml"||!c&&e&&e.indexOf("xml")>=0,b=g?a.responseXML:a.responseText;if(g&&b.documentElement.tagName=="parsererror"){throw"parsererror"}if(d&&d.dataFilter){b=d.dataFilter(b,c)}if(typeof b==="string"){if(c=="script"){T.globalEval(b)}if(c=="json"){b=W["eval"]("("+b+")")}}return b},param:function(d){var b=[];function a(g,e){b[b.length]=encodeURIComponent(g)+"="+encodeURIComponent(e)}if(T.isArray(d)||d.jquery){T.each(d,function(){a(this.name,this.value)})}else{for(var c in d){if(T.isArray(d[c])){T.each(d[c],function(){a(c,this)})}else{a(c,T.isFunction(d[c])?d[c]():d[c])}}}return b.join("&").replace(/%20/g,"+")}});var V={},U,ae=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function K(b,c){var a={};T.each(ae.concat.apply([],ae.slice(0,c)),function(){a[this]=b});return a}T.fn.extend({show:function(c,a){if(c){return this.animate(K("show",3),c,a)}else{for(var e=0,i=this.length;e<i;e++){var j=T.data(this[e],"olddisplay");this[e].style.display=j||"";if(T.css(this[e],"display")==="none"){var g=this[e].tagName,b;if(V[g]){b=V[g]}else{var d=T("<"+g+" />").appendTo("body");b=d.css("display");if(b==="none"){b="block"}d.remove();V[g]=b}this[e].style.display=T.data(this[e],"olddisplay",b)}}return this}},hide:function(b,a){if(b){return this.animate(K("hide",3),b,a)}else{for(var c=0,d=this.length;c<d;c++){var e=T.data(this[c],"olddisplay");if(!e&&e!=="none"){T.data(this[c],"olddisplay",T.css(this[c],"display"))}this[c].style.display="none"}return this}},_toggle:T.fn.toggle,toggle:function(a,b){var c=typeof a==="boolean";return T.isFunction(a)&&T.isFunction(b)?this._toggle.apply(this,arguments):a==null||c?this.each(function(){var d=c?a:T(this).is(":hidden");T(this)[d?"show":"hide"]()}):this.animate(K("toggle",3),a,b)},fadeTo:function(c,a,b){return this.animate({opacity:a},c,b)},animate:function(a,d,b,c){var e=T.speed(d,b,c);return this[e.queue===false?"each":"queue"](function(){var i=T.extend({},e),k,g=this.nodeType==1&&T(this).is(":hidden"),j=this;for(k in a){if(a[k]=="hide"&&g||a[k]=="show"&&!g){return i.complete.call(this)}if((k=="height"||k=="width")&&this.style){i.display=T.css(this,"display");i.overflow=this.style.overflow}}if(i.overflow!=null){this.style.overflow="hidden"}i.curAnim=T.extend({},a);T.each(a,function(s,m){var o=new T.fx(j,i,s);if(/toggle|show|hide/.test(m)){o[m=="toggle"?g?"show":"hide":m](a)}else{var q=m.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),l=o.cur(true)||0;if(q){var t=parseFloat(q[2]),r=q[3]||"px";if(r!="px"){j.style[s]=(t||1)+r;l=((t||1)/o.cur(true))*l;j.style[s]=l+r}if(q[1]){t=((q[1]=="-="?-1:1)*t)+l}o.custom(l,t,r)}else{o.custom(l,m,"")}}});return true})},stop:function(b,c){var a=T.timers;if(b){this.queue([])}this.each(function(){for(var d=a.length-1;d>=0;d--){if(a[d].elem==this){if(c){a[d](true)}a.splice(d,1)}}});if(!c){this.dequeue()}return this}});T.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(b,a){T.fn[b]=function(d,c){return this.animate(a,d,c)}});T.extend({speed:function(b,a,c){var d=typeof b==="object"?b:{complete:c||!c&&a||T.isFunction(b)&&b,duration:b,easing:c&&a||a&&!T.isFunction(a)&&a};d.duration=T.fx.off?0:typeof d.duration==="number"?d.duration:T.fx.speeds[d.duration]||T.fx.speeds._default;d.old=d.complete;d.complete=function(){if(d.queue!==false){T(this).dequeue()}if(T.isFunction(d.old)){d.old.call(this)}};return d},easing:{linear:function(b,a,d,c){return d+c*b},swing:function(b,a,d,c){return((-Math.cos(b*Math.PI)/2)+0.5)*c+d}},timers:[],fx:function(b,c,a){this.options=c;this.elem=b;this.prop=a;if(!c.orig){c.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var b=parseFloat(T.css(this.elem,this.prop,a));return b&&b>-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(a,b,c){this.startTime=ad();this.start=a;this.end=b;this.unit=c||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;function d(g){return e.step(g)}d.elem=this.elem;if(d()&&T.timers.push(d)==1){U=setInterval(function(){var g=T.timers;for(var i=0;i<g.length;i++){if(!g[i]()){g.splice(i--,1)}}if(!g.length){clearInterval(U)}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(c){var d=ad();if(c||d>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var g=true;for(var e in this.options.curAnim){if(this.options.curAnim[e]!==true){g=false}}if(g){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var b in this.options.curAnim){T.attr(this.elem.style,b,this.options.orig[b])}}this.options.complete.call(this.elem)}return false}else{var a=d-this.startTime;this.state=a/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?"swing":"linear")](this.state,a,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var g=this[0].getBoundingClientRect(),c=this[0].ownerDocument,i=c.body,j=c.documentElement,a=j.clientTop||i.clientTop||0,b=j.clientLeft||i.clientLeft||0,d=g.top+(self.pageYOffset||T.boxModel&&j.scrollTop||i.scrollTop)-a,e=g.left+(self.pageXOffset||T.boxModel&&j.scrollLeft||i.scrollLeft)-b;return{top:d,left:e}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var g=this[0],k=g.offsetParent,l=g,a=g.ownerDocument,c,j=a.documentElement,e=a.body,d=a.defaultView,m=d.getComputedStyle(g,null),b=g.offsetTop,i=g.offsetLeft;while((g=g.parentNode)&&g!==e&&g!==j){c=d.getComputedStyle(g,null);b-=g.scrollTop,i-=g.scrollLeft;if(g===k){b+=g.offsetTop,i+=g.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(g.tagName))){b+=parseInt(c.borderTopWidth,10)||0,i+=parseInt(c.borderLeftWidth,10)||0}l=k,k=g.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"){b+=parseInt(c.borderTopWidth,10)||0,i+=parseInt(c.borderLeftWidth,10)||0}m=c}if(m.position==="relative"||m.position==="static"){b+=e.offsetTop,i+=e.offsetLeft}if(m.position==="fixed"){b+=Math.max(j.scrollTop,e.scrollTop),i+=Math.max(j.scrollLeft,e.scrollLeft)}return{top:b,left:i}}}T.offset={initialize:function(){if(this.initialized){return}var c=document.body,k=document.createElement("div"),i,j,a,g,b,l,e=c.style.marginTop,d='<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>';b={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(l in b){k.style[l]=b[l]}k.innerHTML=d;c.insertBefore(k,c.firstChild);i=k.firstChild,j=i.firstChild,g=i.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(j.offsetTop!==5);this.doesAddBorderForTableAndCells=(g.offsetTop===5);i.style.overflow="hidden",i.style.position="relative";this.subtractsBorderForOverflowNotVisible=(j.offsetTop===-5);c.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);c.style.marginTop=e;c.removeChild(k);this.initialized=true},bodyOffset:function(c){T.offset.initialized||T.offset.initialize();var a=c.offsetTop,b=c.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(T.curCSS(c,"marginTop",true),10)||0,b+=parseInt(T.curCSS(c,"marginLeft",true),10)||0}return{top:a,left:b}}};T.fn.extend({position:function(){var b=0,c=0,e;if(this[0]){var d=this.offsetParent(),a=this.offset(),g=/^body|html$/i.test(d[0].tagName)?{top:0,left:0}:d.offset();a.top-=Y(this,"marginTop");a.left-=Y(this,"marginLeft");g.top+=Y(d,"borderTopWidth");g.left+=Y(d,"borderLeftWidth");e={top:a.top-g.top,left:a.left-g.left}}return e},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&&(!/^body|html$/i.test(a.tagName)&&T.css(a,"position")=="static")){a=a.offsetParent}return T(a)}});T.each(["Left","Top"],function(b,c){var a="scroll"+c;T.fn[a]=function(d){if(!this[0]){return null}return d!==ab?this.each(function(){this==W||this==document?W.scrollTo(!b?d:T(W).scrollLeft(),b?d:T(W).scrollTop()):this[a]=d}):this[0]==W||this[0]==document?self[b?"pageYOffset":"pageXOffset"]||T.boxModel&&document.documentElement[a]||document.body[a]:this[0][a]}});T.each(["Height","Width"],function(b,d){var e=b?"Left":"Top",c=b?"Right":"Bottom";T.fn["inner"+d]=function(){return this[d.toLowerCase()]()+Y(this,"padding"+e)+Y(this,"padding"+c)};T.fn["outer"+d]=function(g){return this["inner"+d]()+Y(this,"border"+e+"Width")+Y(this,"border"+c+"Width")+(g?Y(this,"margin"+e)+Y(this,"margin"+c):0)};var a=d.toLowerCase();T.fn[a]=function(g){return this[0]==W?document.compatMode=="CSS1Compat"&&document.documentElement["client"+d]||document.body["client"+d]:this[0]==document?Math.max(document.documentElement["client"+d],document.body["scroll"+d],document.documentElement["scroll"+d],document.body["offset"+d],document.documentElement["offset"+d]):g===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof g==="string"?g:g+"px")}})})();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}}}}}();var domain=window.location.hostname.match(/(.*)\.(\w+\.\w+)/);if(domain){document.domain=domain[2]}var events={};events.AjaxEvent={LOAD:"load",COMPLETE:"complete",SUCCESS:"success",FAIL:"fail",READY:"ready",HISTORY:"history"};events.BatchEvent={INIT:"init",LOAD:"load",PARSE:"parse",COMPLETE:"complete"};events.UserEvent={ACTION:"user_action",READY:"ready",LOGIN:"login",LOGOUT:"logout"};events.CaptchaEvent={INIT:"init",LOAD:"load",CREATE:"create",COMPLETE:"complete",DESTROY:"destroy",RELOAD:"reload"};events.OverlayEvent={INIT:"init",LOAD:"load",COMPLETE:"open",CLOSE:"close",CHANGE:"change"};events.TabEvent={SWITCH:"switch"};events.FormEvent={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",RESPONSE:"response",SUCCESS:"success",FAIL:"fail",FORMDATA:"formdata"};events.UploadEvent={SELECT:"select",PROGRESS:"progress",COMPLETE:"complete",ERROR:"error",DEFAULT:"default"};events.RPCEvent={RESPONSE:"response",ERROR:"error",SUCCESS:"success",FAIL:"fail"};var isIE6=($.browser.msie&&Math.floor($.browser.version)==6);var isIE7=($.browser.msie&&Math.floor($.browser.version)==7);var isSafari=($.browser.safari);var isFirefox=($.browser.mozilla);var isIE=(isIE6||isIE7);var GLOBALS={HOSTNAME:function(){return window.location.protocol+"//"+window.location.host}(),URL:function(){return window.location.href}()};(function setConsole(){if(!window.console||!console.firebug){var b=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var a=0;a<b.length;++a){window.console[b[a]]=function(){}}}}());function inheritClass(d,c){var e=c.toString();var b=e.match(/\s*function (.*)\(/);if(b!=null){d.prototype[b[1]]=c}for(var a in c.prototype){if(!d.prototype[a]){d.prototype[a]=c.prototype[a]}}}function makeDispatchable(a){a._dispatcher=new ls.EventDispatcher();a.addEventListener=function(b,d,c){a._dispatcher.addEventListener(b,d,c)};a.addEventOnce=function(b,d,c){a._dispatcher.addEventOnce(b,d,c)};a.removeEventListener=function(b){a._dispatcher.removeEventListener(b)};a.dispatchEvent=function(b){a._dispatcher.dispatchEvent(b)}}var callableType=function(a){return function(){var b=function(){var c=[];for(var d=0;d<arguments.length;d++){c[d]=arguments[d]}c.unshift($(this));return b.__call__.apply(b,c)};a.apply(b,arguments);return b}};function isArray(a){return a&&typeof a==="object"&&typeof a.length==="number"&&typeof a.splice==="function"&&!(a.propertyIsEnumerable("length"))}$.prototype.getNSParams=function(a){var b={};this.each(function(){for(var e=0;e<this.attributes.length;e++){var c=this.attributes[e];var d="";if(!a){d=c.name}else{if(c.name.indexOf(a+":")==0){d=c.name.split(a+":")[1];b[d]=c.value}}}});return b};String.prototype.trim=function(g){var d=this.toString().replace(/^\s+|\s+$/g,"");if(g){if(typeof g=="string"){var e=new RegExp(g,"g");d=d.replace(e,"")}else{if(isArray(g)){var b="";for(var c=0;c<g.length;c++){b+=g[c];if(c<g.length-1){b+="|"}}b=ls.LovelyUtils.compileString("[${args}]",{args:b});var e=new RegExp(b,"g");d=d.replace(e,"")}else{if(typeof g=="number"){var a=parseInt(g,10);if(a<=d.length){a=d.length}d=d.substr(0,a)}}}}return d};String.prototype.isQueryString=function(){var d=this.toString();var b=d.split("&");for(var a=0;a<b.length;a++){var c=b[a].split("=");if(c.length!=2){return false}}return true};function getFlashMovie(b){var a=document[b];if(!a){a=window[b]}return a}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return false}function setCookie(b,d,a,g){if(!g){g="/"}var e=new Date();e.setDate(e.getDate()+a);var i=b+"="+d;if(a!=null){i+=";expires="+e.toGMTString()}i+=";path="+g;document.cookie=i}function setShortCookie(b,e,d,i){if(!i){i="/"}var j=b+"="+e;if(d){var a=new Date();var g=new Date(a.getTime()+(d*1000));j+=";expires="+g.toGMTString()}j+=";path="+i;document.cookie=j}function showHover(i,b,a){var d=$(a.target);var b=(b)?"bubble_"+b:null;var k='<div class="hoverBubbles" id="${id}"><p>${title}</p></div>';var i=(i)?i:null;if(!b||!i){console.log("Error in bubbles");return}var j=k.replace(/\${id}/,b);j=j.replace(/\${title}/,i);$("body").append(j);var e=$("#"+b);var g=0;var c=0;if(a.pageY){g=a.pageY;c=a.pageX}else{g=a.clientY+document.documentElement.scrollTop;c=a.clientX+document.documentElement.scrollLeft}e.css({top:g+15,left:c-25});d.bind("mousemove",function(l){if(l.pageY){g=l.pageY;c=l.pageX}else{g=l.clientY+document.documentElement.scrollTop;c=l.clientX+document.documentElement.scrollLeft}e.css({top:g+15,left:c-25})})}function destroyHover(){$(".hoverBubbles").each(function(){$(this).remove()})}function readJson(str){try{var res;eval("res="+str);return res}catch(e){console.warn("ERROR: Json read error: \n"+str);return false}return false}function getVersion(e){if(!e||typeof e!=="string"){return}var a=$("script");for(var d=0;d<a.length;d++){var b=$(a[d]).attr("src");if(b){var c=b.match(/([\w.]+)\?v=(.*)/);if(c&&c[1]==e){return c[2]}}}}var ls={VERSION:"0.1",AUTHOR:"Lovelysystems AG",DEBUG:false,debug:function(){if(this.DEBUG){console.log(arguments)}}};ls.AjaxEvent=function(a,b){this.type=a;this.data=(b)?b:null;this.target=null};ls.Delegate={context:null,delegations:[],create:function(d,b,c){var a=new ls.Delegation(d,b,c);this.delegations.push(a);return a},destroy:function(){for(var a=0;a<this.delegations.length;a++){this.delegations[a].destroy();this.delegations[a]=null}this.delegations=null;delete this.delegations}};ls.Delegation=callableType(function(c,a,b){this.obj=c;this.func=a;this.data=b;this.__call__=function(){var d=ls.LovelyUtils.createArgumentsArray(arguments);d.unshift(this.data);this.func.apply(this.obj,d)};this.destroy=function(){this.obj=null;this.func=null;this.data=null;delete this.obj;delete this.func;delete this.data}});ls.EventDispatcher=function(){this.EventDispatcher()};ls.EventDispatcher.prototype.EventDispatcher=function(){this.DEBUG=false;this.listeners={};this.once={};this.unique={}};ls.EventDispatcher.prototype.addEventListener=function(a,d,b){if(typeof(a)!="string"){if(this.DEBUG){console.warn("Could not register Event "+a)}return}if(!this.listeners[a]){this.listeners[a]=[]}var c={callback:d};this.listeners[a].push(c);if(b){this.listeners[a].sort(function(g,e){return g.weight-e.weight})}};ls.EventDispatcher.prototype.removeEventListener=function(d){if(!d){return}var c=d.split("-")[0];var b=parseInt(d.split("-")[1],10);if(!this.listeners[c]){return}var a=this.listeners[c].splice(b,1);if(a.length==1){return true}else{return false}};ls.EventDispatcher.prototype.dispatchEvent=function(c){var a=this.listeners[c.type];if(a){for(var b=0;b<a.length;b++){if(this.DEBUG){console.log("CALLBACK",b,a[b].callback,c.data)}a[b].callback.call(this,c.data)}}this.clearOnce(c)};ls.EventDispatcher.prototype.addEventOnce=function(a,d,b){if(!this.once[a]){this.once[a]=[]}var c=this.addEventListener(a,d,b);this.once[a].push(c);return c};ls.EventDispatcher.prototype.unique=function(b,a,e,c){if(!this.unique[b]){this._unique[b]={}}if(this.unique[b][a]){this.removeEventListener(this.unique[b][a])}var d=this.addEventListener(b,e,c);this.unique[b][a]=d};ls.EventDispatcher.prototype.clearOnce=function(b){if(!this.once[b]){return}for(var a=0;a<this._once[b].length;a++){this.unregister(this._once[b][a])}delete this.once[b]};ls.Document={};makeDispatchable(ls.Document);ls.LovelyUtils={DEBUG:false,compileString:function(a,d){var a=unescape(a);for(var c in d){var b=new RegExp("\\${"+c+"}","g");a=a.replace(b,d[c])}return a},equal:function(c,b){if(!c&&b){return false}if(c&&!b){return false}var a=true;for(p in c){if(c[p]!=b[p]){return false}}return a},equalArr:function(b,a){if(b.length!=a.length){return false}equal=true;for(var c=0;c<b.length;c++){if(b[c]!=a[c]){return false}}return equal},bool:function(b){if(typeof(b)=="object"){for(var a in b){return true}return false}return Boolean(b)},regMap:function(c,b){for(var a in b){if(c.match(b[a])){return a}}},createArgumentsArray:function(b){var a=[];for(var c=0;c<b.length;c++){a[c]=b[c]}return a},scrollToElement:function(a,d){var d=(d)?d:0;var b=document.getElementById(a);var c=0;while(b!=null){c+=b.offsetTop;b=b.offsetParent}window.scrollTo(0,c+d)},scrollToNode:function(b){var b=b.length?b[0]:b;var c=0;while(b!=null){c+=b.offsetTop;b=b.offsetParent}var a=window.pageYOffset||document.documentElement.scrollTop;if(c<a){window.scrollTo(0,c)}},convertTimestamp:function(e){var c=new Date(e);var b=(c.getDate().toString().length==1)?"0"+c.getDate():c.getDate();var g=(c.getMonth().toString().length==1)?"0"+c.getMonth():c.getMonth();var d=c.getFullYear();var a=(c.getHours().toString().length==1)?"0"+c.getHours():c.getHours();var i=(c.getMinutes().toString().length==1)?"0"+c.getMinutes():c.getMinutes();return b+"."+g+"."+d+" "+a+":"+i+" Uhr"},loadAjaxContent:function(a,c,b){console.info("THIS FUNCTION IS DEPRECATED AND IS GOING TO REMOVE TROUGH zl.AjaxLoader");$("#loader-image").show();if(!a||!c){ls.debug("No url or target.");return false}var c=$(c);if(c.length<0||c.length>1){ls.debug("No or too many targets.");return false}if(!c.parent().hasClass("ajax-wrapper")){var d='<div id="${id}" class="${class}"></div>';d=ls.LovelyUtils.compileString(d,{id:"ajax-wrapper-"+new Date().getTime(),"class":"ajax-wrapper"});c.wrap(d)}c.parent().load(a,ls.Delegate.create(this,this.onAjaxLoadComplete,b))},onAjaxLoadComplete:function(c,b,a){$("#loader-image").hide()},parseQueryString:function(o,q,a,l){var l=(l)?l:false;var q=(q)?q:"dict";var a=(a)?a:[];if(typeof o==="string"&&o!=""){var g={};var m={};var d=o.split("&");if(d){for(var k=0;k<d.length;k++){var c=d[k].split("=");if(c.length<2){console.log(o+" is not a valid query string to parse");return{}}var r=decodeURIComponent(c[1].replace(/\+/g,"%20"));r=r.replace(/<script\b[^>]*>(.*?)<\/script>/i,"");if(!l){r=r.replace(/<[a-zA-Z\/][^>]*>/g,"")}var s=c[0];for(var e=0;e<a.length;e++){if(s==a[e]){m[s]=r}}g[s]=r;if(g[s]==="True"||g[s]==="true"){g[s]=true}else{if(g[s]==="False"||g[s]==="false"){g[s]=false}}}}if(this.DEBUG){console.log("converter: ",o,g)}var t=0;for(s in m){t++;delete g[s]}var b={};if(q=="dict"){if(t>0){b=g;for(s in m){b[s]=m[s]}return b}else{return g}}else{if(q=="data"){if(t>0){b.data=g;for(s in m){b[s]=m[s]}return b}else{b.data=g;return b}}else{return null}}}else{return{}}},ajaxRPC:function(d,e,c,a){if(!d){console.info("ajaxRPC(endpoint,method,{data},[mapping])");return}var b=new ls.JsonRPC(d);b.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.onAjaxRPCComplete,a));b.call(e,c)},onAjaxRPCComplete:function(c,g,b){if(b!="None"){for(var e=0;e<c.length;e++){var j=c[e]["target"];var k=c[e]["field"];var a=c[e]["defaultTxt"];var d=b[k]!=null?b[k]:a;j.empty().append(d)}}else{console.log("Nothing came back from RPC")}}};ls.BatchBox=function(a,b){this.EventDispatcher();this.BatchBox(a,b)};ls.BatchBox.prototype.BatchBox=function(a,b){this.DEBUG=false;this.CLASS="ls.BatchBox";this.context=a;this.params=b};ls.BatchBox.prototype.bindClickEvents=function(){var a=$("a.ajaxBatchLink",this.context);a.bind("click",ls.Delegate.create(this,this.getBatchURL,null))};ls.BatchBox.prototype.getBatchURL=function(c,b){var a=b.attr("href");b.attr("href","javascript:void(0)");var d=new RegExp(/None$/);if(!a||a.match(d)||a=="javascript:void(0)"){if(this.DEBUG){console.warn("No valid URL specified.")}b.unbind("click");return}this.dispatchEvent(new ls.AjaxEvent(events.BatchEvent.INIT,a));this.loadBatch(a)};ls.BatchBox.prototype.loadBatch=function(c,b){var a=c;this.dispatchEvent(new ls.AjaxEvent(events.BatchEvent.LOAD,a));this.getBatchContainer().load(a,ls.Delegate.create(this,this.onBatchLoaded,null))};ls.BatchBox.prototype.onBatchLoaded=function(b,a){this.context=a;ls.AjaxCommands.init(a);this.dispatchEvent(new ls.AjaxEvent(events.BatchEvent.COMPLETE,null))};ls.BatchBox.prototype.getBatchContainer=function(){var a="<div class='batchContainer'></div>";if(!this.context.parent().hasClass("batchContainer")){this.context.wrap(a)}return this.context.parent()};inheritClass(ls.BatchBox,ls.EventDispatcher);ls.RecaptchaManager={DEBUG:false,API:"http://api.recaptcha.net/js/recaptcha_ajax.js",KEY:null,template:"/__recaptcha_base__",currentId:null,context:null,docs:"http://recaptcha.net/apidocs/captcha/client.html",isAPILoaded:false,setKey:function(a){this.KEY=a},setTemplate:function(a){this.template=a},initCaptcha:function(b,a){if(this.DEBUG){console.log(b,a,this.isAPILoaded)}if(!this.KEY){console.warn("No Recaptcha key set!");return}if(!this.isAPILoaded){$.getScript(this.API,ls.Delegate.create(this,this.onAPIReady,{id:b,template:a}))}else{if(this.DEBUG){console.log(this.currentId,b)}if(this.currentId&&this.currentId!=b){Recaptcha.destroy();this.dispatchEvent(new ls.AjaxEvent(events.CaptchaEvent.INIT,null));$("#recaptcha_widget_"+this.currentId).empty();$("#recaptcha_widget_"+this.currentId).attr("id",this.currentId);$("#"+this.currentId).hide()}if(this.currentId!=b){this.context=$("#"+b);this.currentId=b;this.loadTemplate(a)}else{if(this.DEBUG){console.log("same captcha id: ",this.currentId,b)}}}},onAPIReady:function(c,a,b){if(this.DEBUG){console.log("ReCaptcha API loaded.")}this.isAPILoaded=true;this.initCaptcha(c.id,c.template)},loadTemplate:function(b){var a=b?b:this.template;this.getTarget().load(a,ls.Delegate.create(this,this.createCaptcha,null))},createCaptcha:function(c,b,a){Recaptcha.create(this.KEY,this.currentId,{theme:"custom",tabindex:0,lang:"de",custom_theme_widget:"recaptcha_widget_"+this.currentId})},reloadCaptcha:function(){if(this.isAPILoaded){Recaptcha.reload()}},destroyCaptcha:function(){if(typeof Recaptcha==="undefined"){return}Recaptcha.destroy();this.currentId=null},getTarget:function(){var a="<div class='captchaContainer' id='recaptcha_widget_"+this.currentId+"'></div>";if(!this.context.parent().hasClass("captchaContainer")){this.context.wrap(a)}return this.context.parent()},showHelp:function(){console.log("Show help.")}};makeDispatchable(ls.RecaptchaManager);ls.TabBox=function(a,b){this.EventDispatcher();this.TabBox(a,b)};ls.TabBox.prototype.TabBox=function(a,b){this.context=a;this.params=b;this.TAB_PREFIX="tab";this.BOX_PREFIX="box";this.BOX_SUFFIX="Content";this.CLASS_PREFIX="show";this.tabs=$("div."+this.TAB_PREFIX,a);this.boxes=$("div."+this.BOX_PREFIX+this.BOX_SUFFIX,a);this.oldTabClass=this.CLASS_PREFIX+b.activetab};ls.TabBox.prototype.bindEvents=function(){this.tabs.bind("click",ls.Delegate.create(this,this.switchToTab,null))};ls.TabBox.prototype.switchToTab=function(e,a,d){var b=a.attr("id").split(this.TAB_PREFIX)[1];var g=this.BOX_PREFIX+b+this.BOX_SUFFIX;var c=$("#"+g,this.context);this.boxes.hide();c.show();var i=this.CLASS_PREFIX+b;this.context.removeClass(this.oldTabClass);this.context.addClass(i);this.oldTabClass=i;this.dispatchEvent(new ls.AjaxEvent(events.TabEvent.SWITCH,b))};inheritClass(ls.TabBox,ls.EventDispatcher);ls.OverlayManager={DEBUG:true,isOpen:false,context:null,params:null,holder:$("#overlay"),content:$("#overlay-content",this.holder),tableClass:"overlayBox",garbage:[],setOverlay:function(b,a){if(!b||!a){return}else{this.holder=$("#"+b);this.content=$("#"+a,this.holder);$(".overlayClose",this.holder).bind("click",ls.Delegate.create(this,this.closeOverlay,null))}},initOverlay:function(c,d){var a=d.url;if(!a){if(this.DEBUG){console.warn("No URL for overlay spezified.")}c.attr("href","javascript:void(0)");return}var b=d["class"];if(!b){if(this.DEBUG){console.log("No overlay class spezified. Take default")}b="smallBox"}this.context=c;this.params=d;this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.INIT,null));this.openOverlay(a,b)},openOverlay:function(a,c){if(!isIE){this.fixIframes("hidden")}$("object").css("visibility","hidden");var c=c||null;var b=$(document).height();var d=document.documentElement.scrollTop;$("#overlayBackground").css("height",b);$("#overlayBackgroundIFrame").css("height",b);$("#overlay-content").css("top",d+50);this.holder.toggle();this.isOpen=true;this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.LOAD,c));this.content.load(a,ls.Delegate.create(this,this.onOverlayComplete,null))},switchOverlay:function(a,b){if(this.isOpen){this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.LOAD,b));this.content.load(a,ls.Delegate.create(this,this.onOverlayComplete,null))}else{console.log("No open overlay!")}},onOverlayComplete:function(c,b,a){$(document).bind("keypress",ls.Delegate.create(this,this.onKeyPress,null));this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.COMPLETE,null))},closeOverlay:function(){$(document).unbind("keypress");if(!isIE){this.fixIframes("visible")}$("object").css("visibility","visible");this.holder.toggle();this.content.empty();this.isOpen=false;this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.CLOSE,null))},onKeyPress:function(c,a,b){if(b.which==0){}},fixIframes:function(a){window.setTimeout(function(){var c=document.getElementsByTagName("iframe");for(var b=0;b<c.length;b++){c[b].style.visibility=a}},250)}};makeDispatchable(ls.OverlayManager);ls.TemplateParser=function(a){this.TemplateParser(a)};ls.TemplateParser.prototype.TemplateParser=function(a){this.fade=false;this.context=a;this.html=this.context.html();this.context.empty()};ls.TemplateParser.prototype.parseTemplate=function(d,e,c){var d=d?d:{};var e=e?e:"append";var c=c?c:this.context;var b=ls.LovelyUtils.compileString(this.html,d);if(e=="prepend"){if(this.fade){var a=$(b);a.hide();c.show();c.prepend(a);a.fadeIn("slow")}else{c.prepend(b).show()}}else{if(e=="append"){if(this.fade){var a=$(b);a.hide();c.append(a);a.fadeIn("slow")}else{c.append(b).show()}}}};ls.TemplateParser.prototype.clearNode=function(a){if(a){this.context.empty().append(a)}else{this.context.empty()}};ls.SearchPanel={url:"",context:null,input:null,button:null,init:function(b,c){var a=c.url;if(a){this.url=a}this.input=$(c.button,b);this.input.bind("click",ls.Delegate.create(this,this.submitQuery,"click"));this.button=$(c.input,b);this.button.bind("keydown",ls.Delegate.create(this,this.onKeyDown,"enter"))},setURL:function(a){if(!a){return}this.url=a},onKeyDown:function(c,a,b){if(!b){return}if(b.which==13){this.submitQuery()}},submitQuery:function(d,a,b){var c=this.input.val();if(c==""||c==" "){ls.Debug.log("No input.");return}else{window.location.href=this.url+"/"+c}}};ls.JsonRPC=function(b,a){this.EventDispatcher();this.JsonRPC(b,a)};ls.JsonRPC.prototype.JsonRPC=function(b,a){this.endpoint=b;this.host=a?a:GLOBALS.HOSTNAME;this.url=this.host+this.endpoint};ls.JsonRPC.prototype.call=function(e,c){if(!typeof c==="object"){return}var d=Math.floor(Math.random()*1000000);var b=new Object();b.method=e;b.id=d;b.version="1.1";b.params=c;if(this.endpoint){var a=JSON.stringify(b);$.post(this.url,a,ls.Delegate.create(this,this.onResponse,null))}else{console.log("No endpoint")}};ls.JsonRPC.prototype.onResponse=function(g,c,d){var b=JSON.parse(d);this.dispatchEvent(new ls.AjaxEvent(events.RPCEvent.RESPONSE,b));if((b.result&&typeof(b.result)!=="object")||(b.result&&typeof(b.result.success)==="undefined")||(b.result&&b.result.success===true)){console.log("JSON-RPC/Response: (fire SUCESS)",b.result);this.dispatchEvent(new ls.AjaxEvent(events.RPCEvent.SUCCESS,b.result))}else{if(b.result&&b.result.success===false){console.log("JSON-RPC/Response: (fire FAIL1)",b.result);this.dispatchEvent(new ls.AjaxEvent(events.RPCEvent.FAIL,b))}else{if(b.result==false){console.log("JSON-RPC/Response: (fire FAIL2)",b.result);this.dispatchEvent(new ls.AjaxEvent(events.RPCEvent.FAIL,b))}else{if(b.error){var a={};if(b.error.message.match(/'(\w+)'/)){var e=b.error.message.match(/'(\w+)'/)[1];a[e]=b.error.message}if(b.error.message.match(/old_pass/)){a.old_password="old_password"}if(b.error.message.match(/Invalid Captcha/)){a.recaptcha_response_field="error_captcha_invalid"}if(b.error.type.match(/zlapp.user.NoSuchUser/)){a.email="email"}if(b.error.type.match(/zlapp.user.UserExists/)){a["email-already-taken"]="email-already-taken"}console.log("JSON-RPC/Error/Message: ",b.error.message);console.log("JSON-RPC/Error/Type: ",b.error.type);this.dispatchEvent(new ls.AjaxEvent(events.RPCEvent.FAIL,a))}}}}};inheritClass(ls.JsonRPC,ls.EventDispatcher);ls.AWSUploader=function(a){this.EventDispatcher();this.AWSUploader(a)};ls.AWSUploader.prototype.AWSUploader=function(a){this.DEBUG=false;this.context=a;this.wid=this.context.attr("id")||"noIdForm";this.params=this.context.getNSParams("ajax");this.action=null;this.FIELD="<input id='${f_id}' type='hidden' name='${f_name}' value='${f_value}' />"};ls.AWSUploader.prototype.requestPolicy=function(){if(!this.params.endpoint||!this.params.method||!this.params.purpose){console.warn("Could not request policy. Parameters missing.");return}var a=new ls.JsonRPC(this.params.endpoint);a.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.onPolicy,null));a.call(this.params.method,{purpose:this.params.purpose})};ls.AWSUploader.prototype.onPolicy=function(j,e,c){this.action=c.action;var a=c.fields;this.additionalFields=a;for(var d=a.length-1;d>=0;d--){var k=a[d][0];var g=a[d][1];var b=this.wid+"_"+k;this.context.prepend(ls.LovelyUtils.compileString(this.FIELD,{f_name:k,f_value:g,f_id:b}))}this.uploadFile()};ls.AWSUploader.prototype.uploadFile=function(){var a=this.context.formSerialize();this.context.attr("action",this.action);this.context.ajaxSubmit(ls.Delegate.create(this,this.onUploadComplete,null))};ls.AWSUploader.prototype.onUploadComplete=function(e,d,b){this.removeAdditionalField();b=b.replace(/<script\b[^>]*>(.*?)<\/script>/i,"");console.log("response:",b.trim());var a=JSON.parse(b.trim());var c=a.result;console.log("filedata",c);if(a.result!=false){this.dispatchEvent(new ls.AjaxEvent(events.AjaxEvent.SUCCESS,c))}else{this.dispatchEvent(new ls.AjaxEvent(events.AjaxEvent.FAIL,a))}};ls.AWSUploader.prototype.removeAdditionalField=function(){var a=this.additionalFields;for(var c=0;c<a.length;c++){var d=a[c][0];var b=this.wid+"_"+d;$("#"+b).remove()}};inheritClass(ls.AWSUploader,ls.EventDispatcher);ls.StorageManager={getDomain:function(){return window.location.hostname.replace(/\./g,"")},getWindowData:function(){var a={};try{a=(window.name!="")?JSON.parse(window.name):{}}catch(b){console.log(b);console.log("window.name is empty or malformed JSON");window.name="{}"}return a},getData:function(){var a=this.getDomain();var b=this.getWindowData();return b[a]?b[a]:{}},addData:function(a,d){var c=this.getWindowData();var b=this.getDomain();if(!c[b]){c[b]={}}c[b][a]=d;console.log(c);window.name=JSON.stringify(c)}};window.dhtmlHistory={isIE:false,isOpera:false,isSafari:false,isKonquerer:false,isGecko:false,isSupported:false,create:function(j){var i=this;var g=navigator.userAgent.toLowerCase();var e=navigator.platform.toLowerCase();var d=navigator.vendor||"";if(d==="KDE"){this.isKonqueror=true;this.isSupported=false}else{if(typeof window.opera!=="undefined"){this.isOpera=true;this.isSupported=true}else{if(typeof document.all!=="undefined"){this.isIE=true;this.isSupported=true}else{if(d.indexOf("Apple Computer, Inc.")>-1){this.isSafari=true;this.isSupported=(e.indexOf("mac")>-1)}else{if(g.indexOf("gecko")!=-1){this.isGecko=true;this.isSupported=true}}}}}window.historyStorage.setup(j);if(this.isSafari){this.createSafari()}else{if(this.isOpera){this.createOpera()}}var c=this.getCurrentLocation();this.currentLocation=c;if(this.isIE){this.createIE(c)}var b=function(){i.firstLoad=null};this.addEventListener(window,"unload",b);if(this.isIE){this.ignoreLocationChange=true}else{if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.ignoreLocationChange=true;this.firstLoad=true;historyStorage.put(this.PAGELOADEDSTRING,true)}else{this.ignoreLocationChange=false;this.fireOnNewListener=true}}var a=function(){i.checkLocation()};setInterval(a,100)},initialize:function(){if(this.isIE){if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.fireOnNewListener=false;this.firstLoad=true;historyStorage.put(this.PAGELOADEDSTRING,true)}else{this.fireOnNewListener=true;this.firstLoad=false}}},addListener:function(a){this.listener=a;if(this.fireOnNewListener){this.fireHistoryEvent(this.currentLocation);this.fireOnNewListener=false}},addEventListener:function(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false)}else{if(c.attachEvent){c.attachEvent("on"+b,function(){a(window.event)})}}},add:function(b,a){if(this.isSafari){b=this.removeHash(b);historyStorage.put(b,a);this.currentLocation=b;window.location.hash=b;this.putSafariState(b)}else{var d=this;var c=function(){if(d.currentWaitTime>0){d.currentWaitTime=d.currentWaitTime-d.waitTime}b=d.removeHash(b);if(document.getElementById(b)&&d.debugMode){var g="Exception: History locations can not have the same value as _any_ IDs that might be in the document, due to a bug in IE; please ask the developer to choose a history location that does not match any HTML IDs in this document. The following ID is already taken and cannot be a location: "+b;throw new Error(g)}historyStorage.put(b,a);d.ignoreLocationChange=true;d.ieAtomicLocationChange=true;d.currentLocation=b;window.location.hash=b;if(d.isIE){d.iframe.src=app.SETTINGS.media_url+"js/blank.html?"+b}d.ieAtomicLocationChange=false};window.setTimeout(c,this.currentWaitTime);this.currentWaitTime=this.currentWaitTime+this.waitTime}},isFirstLoad:function(){return this.firstLoad},getVersion:function(){return"0.6"},getCurrentLocation:function(){var a=(this.isSafari?this.getSafariState():this.getCurrentHash());return a},getCurrentHash:function(){var b=window.location.href;var a=b.indexOf("#");return(a>=0?b.substr(a+1):"")},PAGELOADEDSTRING:"DhtmlHistory_pageLoaded",listener:null,waitTime:200,currentWaitTime:0,currentLocation:null,iframe:null,safariHistoryStartPoint:null,safariStack:null,safariLength:null,ignoreLocationChange:null,fireOnNewListener:null,firstLoad:null,ieAtomicLocationChange:null,createIE:function(d){this.waitTime=400;var c=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var b="rshHistoryFrame";var a='<iframe frameborder="0" id="'+b+'" style="'+c+'" src="'+app.SETTINGS.media_url+"js/blank.html?"+d+'"></iframe>';document.write(a);this.iframe=document.getElementById(b)},createOpera:function(){this.waitTime=400;var a='<img src="javascript:location.href=\'javascript:dhtmlHistory.checkLocation();\';" style="'+historyStorage.hideStyles+'" />';document.write(a)},createSafari:function(){var g="rshSafariForm";var e="rshSafariStack";var d="rshSafariLength";var c=historyStorage.debugMode?historyStorage.showStyles:historyStorage.hideStyles;var b=(historyStorage.debugMode?"width:800px;height:20px;border:1px solid black;margin:0;padding:0;":historyStorage.hideStyles);var a='<form id="'+g+'" style="'+c+'"><input type="text" style="'+b+'" id="'+e+'" value="[]"/><input type="text" style="'+b+'" id="'+d+'" value=""/></form>';document.write(a);this.safariStack=document.getElementById(e);this.safariLength=document.getElementById(d);if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.safariHistoryStartPoint=history.length;this.safariLength.value=this.safariHistoryStartPoint}else{this.safariHistoryStartPoint=this.safariLength.value}},getSafariStack:function(){var a=this.safariStack.value;return historyStorage.fromJSON(a)},getSafariState:function(){var a=this.getSafariStack();var b=a[history.length-this.safariHistoryStartPoint-1];return b},putSafariState:function(b){var a=this.getSafariStack();a[history.length-this.safariHistoryStartPoint]=b;this.safariStack.value=historyStorage.toJSON(a)},fireHistoryEvent:function(b){var a=historyStorage.get(b);this.listener.call(null,b,a)},checkLocation:function(){if(!this.isIE&&this.ignoreLocationChange){this.ignoreLocationChange=false;return}if(!this.isIE&&this.ieAtomicLocationChange){return}var a=this.getCurrentLocation();if(a==this.currentLocation){return}this.ieAtomicLocationChange=true;if(this.isIE&&this.getIframeHash()!=a){this.iframe.src=app.SETTINGS.media_url+"js/blank.html?"+a}else{if(this.isIE){return}}this.currentLocation=a;this.ieAtomicLocationChange=false;this.fireHistoryEvent(a)},getIframeHash:function(){var b=this.iframe.contentWindow.document;var a=String(b.location.search);if(a.length==1&&a.charAt(0)=="?"){a=""}else{if(a.length>=2&&a.charAt(0)=="?"){a=a.substring(1)}}return a},removeHash:function(b){var a;if(b===null||b===undefined){a=null}else{if(b===""){a=""}else{if(b.length==1&&b.charAt(0)=="#"){a=""}else{if(b.length>1&&b.charAt(0)=="#"){a=b.substring(1)}else{a=b}}}}return a},iframeLoaded:function(b){if(this.ignoreLocationChange){this.ignoreLocationChange=false;return}var a=String(b.search);if(a.length==1&&a.charAt(0)=="?"){a=""}else{if(a.length>=2&&a.charAt(0)=="?"){a=a.substring(1)}}window.location.hash=a;this.fireHistoryEvent(a)}};window.historyStorage={setup:function(g){if(typeof g!=="undefined"){if(g.debugMode){this.debugMode=g.debugMode}if(g.toJSON){this.toJSON=g.toJSON}if(g.fromJSON){this.fromJSON=g.fromJSON}}var d="rshStorageForm";var e="rshStorageField";var c=this.debugMode?historyStorage.showStyles:historyStorage.hideStyles;var b=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var a='<form id="'+d+'" style="'+c+'"><textarea id="'+e+'" style="'+b+'"></textarea></form>';document.write(a);this.storageField=document.getElementById(e);if(typeof window.opera!=="undefined"){this.storageField.focus()}},put:function(a,b){this.assertValidKey(a);if(this.hasKey(a)){this.remove(a)}this.storageHash[a]=b;this.saveHashTable()},get:function(a){this.assertValidKey(a);this.loadHashTable();var b=this.storageHash[a];if(b===undefined){b=null}return b},remove:function(a){this.assertValidKey(a);this.loadHashTable();delete this.storageHash[a];this.saveHashTable()},reset:function(){this.storageField.value="";this.storageHash={}},hasKey:function(a){this.assertValidKey(a);this.loadHashTable();return(typeof this.storageHash[a]!=="undefined")},isValidKey:function(a){return(typeof a==="string")},showStyles:"border:0;margin:0;padding:0;",hideStyles:"left:-1000px;top:-1000px;width:1px;height:1px;border:0;position:absolute;",debugMode:false,storageHash:{},hashLoaded:false,storageField:null,assertValidKey:function(a){var b=this.isValidKey(a);if(!b&&this.debugMode){throw new Error("Please provide a valid key for window.historyStorage. Invalid key = "+a+".")}},loadHashTable:function(){if(!this.hashLoaded){var a=this.storageField.value;if(a!==""&&a!==null){this.storageHash=this.fromJSON(a);this.hashLoaded=true}}},saveHashTable:function(){this.loadHashTable();var a=this.toJSON(this.storageHash);this.storageField.value=a},toJSON:function(a){return a.toJSONString()},fromJSON:function(a){return a.parseJSON()}};var zl={VERSION:"0.1",AUTHOR:"Lovely Systems AG",listRegExp:/^(.+\/die-10-)[^\/]+-(\d+)(-0)$/,itemRegExp:/^(.+\/)[^\/]+-(\d+)(-\d+)$/};zl.Coverflow={SOURCE:app.SETTINGS.media_url+"swf/coverflow.swf",ALTERNATIVE_URL:"/__static_coverflow__/default/1${category}",CLOSE_BUTTON:app.SETTINGS.media_url+"images/coverflow-close-btn.gif",COOKIE_ALT:"coverflowAlternative",COOKIE_VISIBLE:"coverflowVisibility",FLASH_ID:"flash-cf",isOpen:false,position:0,isWheelLocked:false,noFlash:function(){return(swfobject.getFlashPlayerVersion().major<=8)},holder:function(){return $("#coverflow-holder")},button:function(){return $("#coverflow-show")},init:function(){if(window.addEventListener){window.addEventListener("DOMMouseScroll",this.wheelEventHandler,false)}window.onmousewheel=document.onmousewheel=this.wheelEventHandler;if(this.holder().hasClass("coverflow-open")){this.button().hide();var a=getCookie(this.COOKIE_ALT);if(a=="true"||this.noFlash()){this.showAlternative()}else{if(a!="true"){this.embedCoverflow()}}}else{this.holder().css("height","0px")}},showAlternative:function(){setCookie(this.COOKIE_ALT,true);var d=app.SETTINGS.category;var c=app.SETTINGS.subcategory;var a="";if(d!=null){a="/"+d;if(c!=null){a+="/"+c}}var b=ls.LovelyUtils.compileString(this.ALTERNATIVE_URL,{category:a});if(this.noFlash()){zl.AjaxLoader.addEventListener(events.AjaxEvent.SUCCESS,function(){$(".flashLink").hide()})}if(document.getElementById("coverflow-target")===null){this.holder().empty().append("<div id='coverflow-target'></div>")}zl.AjaxLoader.load(b,"coverflow-target");this.holder().addClass("coverflow-show-large");this.appendCloseButton();this.isOpen=true},showFlash:function(){if(this.noFlash()){console.warn("Keine, oder eine zu alte  Flash-Version installiert.")}else{setCookie(this.COOKIE_ALT,false);this.holder().empty().append("<div id='coverflow-target'><div id='coverflow'></div></div>");this.embedCoverflow()}},showCoverflow:function(){setCookie(this.COOKIE_VISIBLE,"open");this.button().hide();this.holder().toggleClass("coverflow-open");var a=getCookie(this.COOKIE_ALT);if(a=="true"||this.noFlash()){this.holder().animate({height:"388px"},1000,ls.Delegate.create(this,this.showAlternative,null))}else{if(a!="true"){this.holder().animate({height:"360px"},1000,ls.Delegate.create(this,this.embedCoverflow,null))}}},embedCoverflow:function(){var c=encodeURIComponent(GLOBALS.URL.replace(/^(http:\/\/)(.*)[\?](.*)/,"$1$2"));var g=this.getPosition();var d=app.SETTINGS.cf_url?encodeURIComponent(app.SETTINGS.cf_url):"";var a={context:c,media_url:app.SETTINGS.media_url,start_id:g,list_url:d};var e={wmode:"opaque",allowScriptAccess:"always"};var b={id:this.FLASH_ID};swfobject.embedSWF(this.SOURCE,"coverflow","830","352","9.0.0","",a,e,b);this.appendCloseButton();this.isOpen=true},hideCoverflow:function(){setCookie(this.COOKIE_VISIBLE,"closed");this.holder().empty().append("<div id='coverflow'></div>");this.holder().animate({height:"0px"},1000,ls.Delegate.create(this,this.unembedCoverflow,null))},unembedCoverflow:function(){this.button().show();this.holder().toggleClass("coverflow-open");this.isOpen=false},appendCloseButton:function(){var a="<div id='coverflow-close-button'><a href='javascript:zl.Coverflow.hideCoverflow()'>Showroom ausblenden</a></div>";this.holder().append(ls.LovelyUtils.compileString(a,{btn:this.CLOSE_BUTTON}))},toggleCoverflow:function(){if(this.isOpen){this.hideCoverflow()}else{this.showCoverflow()}},lockWheelEvent:function(a,b,c){this.isWheelLocked=a},wheelEventHandler:function(a){if(!a){a=window.event}if(zl.Coverflow.isWheelLocked){var b=0;if(a.wheelDelta){b=a.wheelDelta/120;if(window.opera){b*=-1}}else{if(a.detail){b=-a.detail}}if(b&&zl.Coverflow.getMovie()){zl.Coverflow.getMovie().controlWheel(b)}if(a.preventDefault){a.preventDefault()}a.returnValue=false}},getMovie:function(){var a=document[this.FLASH_ID];if(!a){a=window[this.FLASH_ID]}return a},setPosition:function(a){if(!isNaN(a)){this.position=parseInt(a,10)}},getPosition:function(){var b=ls.StorageManager.getData();var a="cfpos_"+window.location.pathname.replace(/[\/\.\-_]/g,"");if(b[a]){return b[a]}else{return null}},resetHistory:function(){ls.StorageManager.addData("cfpos_",0);window.onunload=function(){ls.StorageManager.addData("cfpos_",0)}},countIVW:function(){var a=app.IVW.code;zl.IVWTracking.countIVW(a)}};zl.AjaxLoader={CLASS:"zl.AjaxLoader",WRAP:"<div id='${id}' class='${class}'></div>",LOADER:"<div class='loader-image-holder'><div class='loader-image'><img src='${src}' /></div></div>",LOADERSOURCE:app.SETTINGS.media_url+"images/ajax-loader-big.gif",ERRORSOURCE:app.SETTINGS.media_url+"images/ajax-error.gif",STATECOOKIE:"listViewmode",VIEWPATTERN:/(.*?)\/(.*?)\/(\d+)\/$/,HTTPSTATUS:null,TARGET:null,AJAX_CLASS:"ajax-wrapper",load:function(c,e,b,g,d){if(b){if(b.preventDefault){b.preventDefault();b.stopPropagation()}else{b.cancelBubble=true;b.returnValue=false}}if(!c||!e){return false}this.TARGET=$(document.getElementById(e));if(this.TARGET.length<0||this.TARGET.length>1){console.log("No or too many targets.");return false}if(!this.TARGET.parent().hasClass(this.AJAX_CLASS)){var a=ls.LovelyUtils.compileString(this.WRAP,{id:"ajax-wrapper-"+new Date().getTime(),"class":this.AJAX_CLASS});this.TARGET.wrap(a)}var i=this.TARGET.parent();if(i.attr("ajax:current")==c){return}else{if(!c.match(/comment/)){i.attr("ajax:current",c)}}var k={key:e,value:c};if(d!=null){k.code=d}if(!g){this.dispatchEvent(new ls.AjaxEvent(events.AjaxEvent.LOAD,k))}this.createLoaderImage();var j=$.ajax({url:c,type:"GET",error:ls.Delegate.create(zl.AjaxLoader,zl.AjaxLoader.onErrorHTTP,c),success:ls.Delegate.create(zl.AjaxLoader,zl.AjaxLoader.onAjaxLoadComplete,i)});return false},onAjaxLoadComplete:function(d,b,a){var c=d;c.empty().append(a);this.dispatchEvent(new ls.AjaxEvent(events.AjaxEvent.SUCCESS));ls.LovelyUtils.scrollToNode(d[0])},onErrorHTTP:function(a,b,c){if(c.status==0){this.destroyLoaderImage(c,a)}else{this.showError(c,a)}return},createLoaderImage:function(){if(this.LOADERSOURCE){var e=this.TARGET.parent();e.css("position","relative");if($(".loader-image-holder",e).length<1){e.prepend(ls.LovelyUtils.compileString(this.LOADER,{src:this.LOADERSOURCE}));var a=$(".loader-image-holder",e);var b=e.width();var d=e.height();console.log(d);var i=0;if($(".title",e).length==1){i=$(".title",e).height();a.css("top",i)}a.css("height",d-i);a.css("width",b);var g=$(".loader-image",a);var c=d/2-g.height()/2-i;g.css("top",c)}}},showError:function(e,c){var d=this.TARGET.parent();var a=$(".loader-image",d);var b=$("img",a);b.attr("src",this.ERRORSOURCE).attr("title",e.status);if(a.children().length<2){a.append('<p class="error">'+c+"</p>")}},destroyLoaderImage:function(c,a){var b=this.TARGET.parent();$(".loader-image-holder",b).hide();console.info("Sie sind nicht mit dem Internet verbunden!")},restoreHistory:function(d,b,c){for(n in c){if(document.getElementById(n)!=null){var e=n;var a=c[n];if(a=="DEFAULT"){a=this.getBaseURL(e)}if(!a||!a.indexOf("/")==0){}else{this.load(a,e)}}}},getBaseURL:function(b){if(typeof b=="string"){var a=$(document.getElementById(b));return a?a.attr("ajax:base"):null}}};makeDispatchable(zl.AjaxLoader);zl.FormManager=function(a,b){this.EventDispatcher();this.FormManager(a,b)};zl.FormManager.prototype.FormManager=function(node,fill){this.DEBUG=false;this.context=node;this.fid=this.context.attr("id")||"";this.params=this.context.getNSParams("ajax");this.requiredFields=this.params.required?eval(this.params.required):[];this.confirmFields=this.params.confirm?eval(this.params.confirm):[];this.additionalValidations=[];this.errors=$("#form-error_general",this.context);this.loader=$(".loader-image",this.context);this.submitBtn=this.params.submitbutton?$(this.params.submitbutton,this.context):false;this.onEnterSubmit=this.params.onentersubmit?eval(this.params.onentersubmit):true;this.allowHTML=this.params.allowhtml?eval(this.params.allowhtml):false;this.type="dict";this.autofill=false;this.mapping=["recaptcha_challenge_field","recaptcha_response_field"];this.init();if(fill){this.autofill=true;this.getFormData()}};zl.FormManager.prototype.getFormData=function(){var a=new ls.JsonRPC(this.params.endpoint);a.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.fillFormData,null));a.call("asDict",{})};zl.FormManager.prototype.fillFormData=function(g,b,e){if(this.DEBUG){console.log("fillFormData",g,b,e)}if(!e.result){return}var m=e.result;for(key in m){var c=m[key];var d=$("#"+this.fid+"_"+key);if(this.DEBUG){console.log("fillFormData",d,c)}if(d.length>0){if(c===null){c=""}if(typeof c=="boolean"&&d.is("input:checkbox")){d[0].checked=c}var o=decodeURIComponent(c);if(d.is("select")||(d.is("fieldset")&&d.hasClass("radiolist"))){for(var j=0;j<d.children().length;j++){var l=$(d.children()[j]);if(l.val()===o){l.select()}}}var a=d.attr("ajax:fillrule");var k=d.attr("ajax:fillpattern");if(a&&k){var q=new RegExp(k);if(this.DEBUG){console.log(a,k,q,o)}o=o.replace(q,a)}d.val(o)}}this.dispatchEvent(new ls.AjaxEvent(events.FormEvent.FORMDATA))};zl.FormManager.prototype.init=function(){if(!this.params.submitbutton){return}$("input:checkbox",this.context).bind("change",function(){if($(this).val()===""||$(this).val()==="false"){$(this).val("true")}else{if($(this).val()==="true"){$(this).val("false")}}});if(this.params.type){this.type=this.params.type}$("input",this.context).bind("keypress",ls.Delegate.create(this,this.onKeyPress,null));$("textarea",this.context).bind("keypress",ls.Delegate.create(this,this.onKeyPress,null));this.submitBtn.bind("click",ls.Delegate.create(this,this.submitForm,null));this.proxy=new ls.JsonRPC(this.params.endpoint);this.proxy.addEventListener(events.RPCEvent.FAIL,ls.Delegate.create(this,this.onFormFail,null));this.proxy.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.onFormSuccess,null));this.proxy.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onFormResponse,null));$("input",this.context).bind("focus",ls.Delegate.create(this,this.hideSavedButton,null));$("textarea",this.context).bind("focus",ls.Delegate.create(this,this.hideSavedButton,null))};zl.FormManager.prototype.submitForm=function(){this.dispatchEvent(new ls.AjaxEvent(events.FormEvent.BEFORE_SUBMIT,null));var d=this.context.formSerialize();var e=ls.LovelyUtils.parseQueryString(d,this.type,this.mapping,this.allowHTML);var g=this.checkRequiredFields();var c=this.checkConfirmFields();var b=this.validateForm(e);var a=this.validateAdditional();if(g||c||b||a){}else{this.submitBtn.hide();this.loader.show();this.proxy.call(this.params.method,e)}};zl.FormManager.prototype.validateForm=function(k){if(!this.fid){return false}var g=false;var l=null;if(this.type=="data"){l=k.data}else{if(this.type=="dict"){l=k}}for(f in l){var s=f;var d=l[f];var m=this.fid+"_"+s;var r=$("#"+m);var t=r.attr("name");var e=r.attr("ajax:valid");var c=r.attr("ajax:transform");var q=r.attr("ajax:seperator");var b=$("#form-invalid_"+t+" p");if(e){var u=new RegExp(e);var a=true;if(q){var o=d.split(q);for(var j=0;j<o.length;j++){if(!u.test(o[j].trim())){a=false}}}else{a=u.test(d)}if(!a){r.addClass("alert");b.show();r.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,s));g=true}else{if(q){l[f]=d.split(q);for(var j=0;j<l[f].length;j++){l[f][j]=l[f][j].trim()}}if(c&&d!=""){l[f]=d.replace(u,c)}}}}return g};zl.FormManager.prototype.onKeyPress=function(c,a,b){if(a.is("input")){if(b.which==13&&this.onEnterSubmit){this.submitForm()}}};zl.FormManager.prototype.onFormResponse=function(c,b,a){this.submitBtn.show();this.loader.hide()};zl.FormManager.prototype.onFormSuccess=function(d,c,b){if(this.autofill){var a={result:b};this.fillFormData(d,c,a)}$(".saved",this.context).show();this.dispatchEvent(new ls.AjaxEvent(events.FormEvent.SUCCESS,b))};zl.FormManager.prototype.hideSavedButton=function(c,a,b){$(".saved",this.context).hide()};zl.FormManager.prototype.onFormFail=function(d,c,b){for(var g in b){var i=b[g];var a=$("#"+this.fid+"_"+i);var e=$("#form-error_"+i+" p");e.show();a.addClass("alert");a.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,i))}console.log("formmanager onformfail dispatches event ",b);this.dispatchEvent(new ls.AjaxEvent(events.FormEvent.FAIL,b))};zl.FormManager.prototype.clearErrorMessage=function(g,b,e){if(this.DEBUG){console.log("clearErrorMessage",g,b,e)}var d=$("#"+this.fid+"_"+g);var c=$("#"+this.fid+"_"+g+"-verify");d.removeClass("alert");c.removeClass("alert");d.unbind("focus");c.unbind("focus");var j=null;if(g&&this.fid){var j=$("#form-error_"+g+" p");var a=$("#form-error_"+g+"-verify p");var i=$("#form-invalid_"+g+" p")}if(!j){if(this.DEBUG){console.log("No such DOM node.")}return}j.hide();i.hide();a.hide()};zl.FormManager.prototype.checkRequiredFields=function(){var b=false;if(!this.fid){if(this.DEBUG){console.log("no this.fid")}return false}if(this.requiredFields.length>0){for(var c=0;c<this.requiredFields.length;c++){var e=this.requiredFields[c];var d=$("#"+this.fid+"_"+e);var a=$("#form-error_"+e+" p");if(d.val()==""||d.val()==" "||d.val()=="false"){a.show();d.addClass("alert");b=true;d.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,e))}}}return b};zl.FormManager.prototype.checkConfirmFields=function(){if(!this.fid){if(this.DEBUG){console.log("no this.fid")}return false}var a=false;if(this.confirmFields.length>0){for(var b=0;b<this.confirmFields.length;b++){var g=this.confirmFields[b];var e=$("#"+this.fid+"_"+g);var c=$("#"+this.fid+"_"+g+"-verify");if(this.DEBUG){console.log(e,c)}if(!e||!c){return}if(this.DEBUG){console.log(e.val(),c.val())}if(e.val()!=c.val()){var d=$("#form-error_"+g+"-verify p");if(d){d.show();e.addClass("alert");c.addClass("alert");e.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,g));c.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,g))}a=true}}}return a};zl.FormManager.prototype.addValidation=function(b,a){this.additionalValidations.push({field:b,func:a})};zl.FormManager.prototype.validateAdditional=function(){var c=false;var a=this.additionalValidations.length;for(var d=0;d<a;d++){var k=this.additionalValidations[d].field;var j=$("#"+this.fid+"_"+k);var b=$("#form-invalid_"+k+" p");var g=this.additionalValidations[d].func;var e=g.call();if(!e){b.show();j.addClass("alert");c=true;j.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,k))}}return c};zl.FormManager.prototype.setField=function(c,b){var a=$("#"+this.fid+"_"+c);if(a.length>0){a.val(b.toString())}};inheritClass(zl.FormManager,ls.EventDispatcher);zl.CommentManager=function(a,b){this.EventDispatcher();this.FormManager(a,b);this.CommentManager(a,b)};zl.CommentManager.prototype.CommentManager=function(a,b){this.template=new ls.TemplateParser($("#itemCommentTemplate"));this.template.fade=true;this.ANSWER_TEMPLATE="@${text} "};zl.CommentManager.prototype.onKeyPress=function(e,c,d){if(c.is("textarea")){var b=c.val().length;var g=parseInt($("span#maxChars").text());$("span#charsLeft").empty().text(b);if(b>g-1){var a=c.val().substr(0,g-1);c.val(a)}}else{if(this.DEBUG){console.log("is not a textarea node not found")}return}};zl.CommentManager.prototype.onFormSuccess=function(c,b,a){if(this.autofill){this.fillFormData(c,b,a)}$(".saved",this.context).show();this.dispatchEvent(new ls.AjaxEvent(events.FormEvent.SUCCESS));this.injectComment(a);this.removeCaptcha();$("span#charsLeft").empty().text(0)};zl.CommentManager.prototype.removeCaptcha=function(c,b,a){var d=ls.RecaptchaManager.currentId;ls.RecaptchaManager.destroyCaptcha();$(".captchaContainer").empty().attr("id",d).removeClass()};zl.CommentManager.prototype.onFormFail=function(e,d,c){for(var i in c){var j=c[i];var b=$("#"+this.fid+"_"+j);var g=$("#form-error_"+j+" p");var a=$("#newCommentForm_body");g.show();b.addClass("alert");b.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,j));a.bind("focus",ls.Delegate.create(this,this.clearErrorMessage,j))}ls.RecaptchaManager.reloadCaptcha();this.dispatchEvent(new ls.AjaxEvent(events.FormEvent.FAIL,c))};zl.CommentManager.prototype.injectComment=function(d){var a=new RegExp(/(\s|^)((http|https):\/\/([\w\d\-_\.]+)+\.([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)/g);d.body=d.body.replace(a,'$1<a href="$2" rel="nofollow" target="_blank">$2</a>');a=new RegExp(/(\s|^)((www)+\.([\.\w\d\-_]+)+\.([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)/g);d.body=d.body.replace(a,'$1<a href="http://$2" rel="nofollow" target="_blank">http://$2</a>');d.body=d.body.replace(/\n/g,"<br />");d.c_time=this.getFormattedDateTime();var c="comments_in_content__"+this.params.contextkey;var b=$("ul.neue-listen",$(".commentbox"));this.template.parseTemplate(d,"prepend",b);ls.LovelyUtils.scrollToNode(b);if(isIE){window.setTimeout(function(){$("#adsdf_830_250_95_f").hide().show()},200)}};zl.CommentManager.prototype.getFormattedDateTime=function(e){var c=e?new Date(e):new Date();var b=(c.getDate().toString().length==1)?"0"+c.getDate():c.getDate();var g=(c.getMonth().toString().length==1)?"0"+c.getMonth():c.getMonth();var d=c.getFullYear();var a=(c.getHours().toString().length==1)?"0"+c.getHours():c.getHours();var i=(c.getMinutes().toString().length==1)?"0"+c.getMinutes():c.getMinutes();return b+"."+g+"."+d+" um "+a+":"+i};inheritClass(zl.CommentManager,zl.FormManager);zl.GarbageCollector={garbage:[],addItem:function(a){this.garbage.push(a)},purge:function(){while(this.garbage.length>0){var a=this.garbage.pop();console.info("delete",a);delete a}}};makeDispatchable(zl.GarbageCollector);zl.Utils={DEBUG:false,listEditor:null,deleteKey:null,datasheetLoaded:false,deleteKey:null,favouriteId:null,favouriteKey:null,observedId:null,observedKey:null,browser:null,ivwCode:function(){var a=app.IVW.code.match(/_ugc$/)?app.IVW.code:app.IVW.code+"_ugc";return a}(),switchMITab:function(b){var a=$("div.frame");$(".master-tabs li").removeClass("active");$("li#"+b+"Tab").addClass("active");$(".tab-body").removeClass("active");$("div#"+b).addClass("active")},getBrowser:function(){if(this.browser!=null){return this.browser}else{var k={};var a=window.navigator.userAgent;var c=a.match(/MSIE\s([\d\.]+)/)||false;k.IE=c;var j=c?(Math.floor(parseInt(c[1]))<=6):false;k.IE6=j;var i=c?(Math.floor(parseInt(c[1]))==7):false;k.IE7=i;var e=c?(Math.floor(parseInt(c[1]))==8):false;k.IE8=e;var o=window.navigator.appName=="Netscape";var q=o?(a.match(/(safari)\/([\d\.]+)/i)||false):false;k.SF=q;var g=q?(Math.floor(parseInt(q[2]))==3):false;k.SF3=g;var d=q?(Math.floor(parseInt(q[2]))==4):false;k.SF4=d;var b=o?(a.match(/(firefox)\/([\d\.]+)/i)||false):false;k.FF=b;var m=b?(Math.floor(parseInt(b[2]))==2):false;k.FF2=m;var l=b?(Math.floor(parseInt(b[2]))==3):false;k.FF3=l;this.browser=k;return this.browser}},oldBrowserWarning:function(){var a=this.getBrowser();var c=["FF2","IE6","SF3"];for(var b=0;b<c.length;b++){if(a[c[b].trim()]){$("#browser-warning").prepend("Ooops! Sie verwenden eine alte Browser-Version, die wir leider nicht mehr unterstützen. Steigen Sie doch auf einen modernen, schnelleren und sichereren Browser - z.B. <a href='http://www.getfirefox.com' title='Firefox' target='_blank'>Firefox</a> - um! Damit können Sie unser Angebot noch besser nutzen");$("#browser-warning").slideDown("slow")}}},switchToDatasheet:function(b){console.log("switchToDatasheet");this.switchMITab("datenblatt");if(!this.datasheetLoaded){console.log("datasheet loaded");var a=[];a[0]=[];a[0]["field"]="description";a[0]["target"]=$(".item-data",$("#datenblatt"));a[0]["defaultTxt"]="Die Daten zu diesem Artikel sind noch nicht verfügbar. Bitte versuchen Sie es zu einem späteren Zeitpunkt wieder.";ls.LovelyUtils.ajaxRPC("/masteritems","getDescription",{key:b},a);this.datasheetLoaded=true}},toggleLogin:function(){$("#header").toggleClass("login-inline");$(".userbox").toggle();$(".userbox-login-inline").toggle();$("#search-form").toggle();if($("#header").hasClass("login-inline")){$("#login_inline_form_username").focus();var a=getCookie("zl_uid");if(a){$("#login_inline_form_username").val(a)}}},goToUrl:function(a){if(!a){return}window.location.href=a},checkHash:function(){if(GLOBALS.URL.match(/\/user\/(.+)#willkommen$/)){ls.OverlayManager.openOverlay("/willkommen");if(!isIE){window.location.hash=""}}if(GLOBALS.URL.match(/\/(user|experten)\/(.+)#change_password$/)){ls.OverlayManager.openOverlay("/revert_password_overlay");if(!isIE){window.location.hash=""}}if(GLOBALS.URL.match(/\/#profile_deleted$/)){ls.OverlayManager.openOverlay("/profile_deleted");if(!isIE){window.location.hash=""}}if(GLOBALS.URL.match(/\/#login$/)){ls.OverlayManager.openOverlay("/login_overlay");if(!isIE){window.location.hash=""}}if(GLOBALS.URL.match(/\/#register$/)){ls.OverlayManager.openOverlay("/register_overlay");if(!isIE){window.location.hash=""}}},openListEditor:function(b){if(b){var a=new ls.JsonRPC("/lock");var c={document:b};a.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.doOpenListEditor,b));a.call("locked_by",c)}else{this.doOpenListEditor(b,null,{result:null})}},doOpenListEditor:function(j,c,d){console.log(j,c,d);if(d.result!==null){var e=d.result.username;alert("Diese Liste wird derzeit von Benutzer '"+e+"' bearbeitet. Bitte versuchen Sie es später noch einmal.");return}this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.LOAD),null);var l="${key}=${value}";var g={width:"815",height:"612",left:"10",top:"10",location:"no",scrollbars:"no",toolbar:"no",status:"no",resizeable:"no",menubar:"no",innerWidth:"815",innerHeight:"582"};var k=[];for(key in g){k.push(ls.LovelyUtils.compileString(l,{key:key,value:g[key]}))}var i=k.join(",");var b="LIST_EDITOR";var a=j?"/listeditor#"+j:"/listeditor";if(!this.listEditor||this.listEditor.closed){this.listEditor=window.open(a,b,i)}else{this.listEditor.location.href=a;if(j){this.listEditor.location.reload()}}this.listEditor.focus()},confirmDeleteList:function(a){ls.OverlayManager.openOverlay("/delete_list_overlay");this.deleteKey=a},deleteList:function(){if(this.deleteKey){var a=new ls.JsonRPC("/lists");var b={o:this.deleteKey};a.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.removeItemFromList,null));a.call("delete",b)}else{console.log("Need a list id to delete list");return}},removeItemFromList:function(c,b,a){if(a.error){console.log("Could not delete list "+this.deleteKey)}else{if(a.id){$("#list_"+this.deleteKey).parent().fadeOut();ls.OverlayManager.closeOverlay()}}this.deleteKey=null},confirmRemoveFavourite:function(b,a){ls.OverlayManager.openOverlay("/remove_favourite_overlay");this.favouriteId=parseInt(b,10);this.favouriteKey=a},removeFavourite:function(){if(this.favouriteId){var a=new ls.JsonRPC("/lists");var b={id:this.favouriteId,v:false};a.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.removeFavouriteFromList,null));a.call("set_favourite",b)}else{console.log("Need a list id to delete list");return}},removeFavouriteFromList:function(e,b,a){if(a.error){console.log("Could not delete list "+this.favouriteKey)}else{if(a.id){var c=$("#list_"+this.favouriteKey).parent();var d=c.parent();if(d.children().length<=1){var g=new ls.JsonRPC("/myprofile");g.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onNoList,{type:"favourites",list:d}));g.call("asDict",{})}c.fadeOut("slow",function(){$(this).remove()});ls.OverlayManager.closeOverlay()}}this.favouriteId=null;this.favouriteKey=null},confirmRemoveObserved:function(a){ls.OverlayManager.openOverlay("/remove_observed_overlay");this.observedId=a;this.observedKey=a},removeObserved:function(){if(this.observedId){var a=new ls.JsonRPC("/profiles");var b={o:this.observedId,v:false};a.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.removeObservedFromList,null));a.call("set_observed",b)}else{console.log("Need a list id to delete list");return}},removeObservedFromList:function(e,b,a){if(a.error){console.log("Could not delete profile "+this.observedKey)}else{if(a.id){var c=$("#profile_big_"+this.observedKey).parent();var d=c.parent();if(d.children().length<=1){var g=new ls.JsonRPC("/myprofile");g.addEventListener(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onNoList,{type:"observed",list:d}));g.call("asDict",{})}c.fadeOut("slow",function(){$(this).remove()});ls.OverlayManager.closeOverlay()}}this.observedId=null;this.observedKey=null},onNoList:function(d,c,a){console.log(d,c,a);if(a.result[d.type].length<1){d.list.parent().fadeOut("slow",function(){$(this).remove()})}else{var g=d.list.parent().attr("id");var e=d.list.parent().attr("ajax:base");var b=e.replace(/^\/(.*)\/(\d)\/([^\/]+)$/,"/$1/1/$3");zl.AjaxLoader.load(b,g)}},register:function(){ls.OverlayManager.openOverlay("/register_overlay","reg_popup")},validateMultipleEmails:function(b){if(!b){false}var a=true;var g=b.val().split(",");for(var d=0;d<g.length;d++){var c=g[d].trim();if(c!=""){var e=new RegExp(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/);if(!e.test(c)){a=false}}}return a},twitterList:function(d,b){var a="http://twitter.com/home/?status=${title}:+${url}";if(zl.listRegExp.test(b)){var c=b.replace(zl.listRegExp,"$1$2$3")}else{if(zl.itemRegExp.test(b)){var c=b.replace(zl.itemRegExp,"$1die-10-$2-0")}else{return}}d=d.replace(/\s/g,"+");var b=ls.LovelyUtils.compileString(a,{title:d,url:c});window.open(b)}};makeDispatchable(zl.Utils);zl.MediaItemManager={URL:"/mediaitem_overlay",items:null,context:null,pos:0,TEMPLATE_IMAGE:"<a href='javascript:zl.MediaItemManager.nextItem()'><img class='mi-image' id='mi-image-${id}' src='${src}' /></a>",IMAGE_WIDTH:814,IMAGE_HEIGHT:590,TEMPLATE_YOUTUBE:"<object width='425' height='344'><param name='movie' value='${src}&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='${src}&hl=en&fs=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>",YOUTUBE_WIDTH:490,YOUTUBE_HEIGHT:435,TEMPLATE_AUDIO:"<div id='playerCover'></div>\n<div id='player'></div>",AUDIO_WIDTH:342,AUDIO_HEIGHT:380,getMediaItems:function(b,c){if(!b||typeof b!="string"){if(this.DEBUG){console.log("No (valid) Key")}return}if(!this.items){var a=new ls.JsonRPC("/files");var d={item:b,fields:["url","description","mime_type"],offset:0,limit:100};a.addEventListener(events.RPCEvent.FAIL,function(){console.log("Loading media items failed.")});a.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.openMediaOverlay,c));a.call("media_of",d)}else{this.openMediaOverlay(c)}},getItem:function(b){if(!b||typeof b!="string"){if(this.DEBUG){console.log("No (valid) Key")}return}var a=new ls.JsonRPC("/files");var c={key:b,fields:["url","description","mime_type"]};a.addEventListener(events.RPCEvent.FAIL,function(){console.log("Loading media items failed.")});a.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.openItemOverlay,b));a.call("asDict",c)},openItemOverlay:function(c,b,a){ls.OverlayManager.addEventOnce(events.OverlayEvent.COMPLETE,ls.Delegate.create(this,this.loadSingleItem,a));ls.OverlayManager.openOverlay(this.URL)},loadSingleItem:function(e,b,d){var c=e;var g=c.url+"thumb_750x500";var a=ls.LovelyUtils.compileString(this.TEMPLATE_IMAGE,{src:g,descr:c.description});$("#mediaitem-body").empty().append(a);$("#mediaitem-descr").empty().append(c.description);this.checkNavigation("all")},getOffset:function(b){if(!b){return 0}var a=0;for(a;a<this.items.length;a++){if(this.items[a].key==b){return a}}return a},openMediaOverlay:function(c,b,a){if(c){if(a){this.items=a.data}this.pos=this.getOffset(c)}ls.OverlayManager.addEventListener(events.OverlayEvent.COMPLETE,ls.Delegate.create(this,this.loadItem,null));ls.OverlayManager.openOverlay(this.URL)},beforeLoadItem:function(c,a,b){$("#mediaitem-body").fadeOut("slow",ls.Delegate.create(this,this.loadItem,c))},loadItem:function(g,d,e){ls.OverlayManager.removeEventListener(events.OverlayEvent.COMPLETE);this.context=$(".mediaitem-ol");$("#mediaitem-body").empty();if(g||g===0){this.pos=parseInt(g,10)}var g=this.items[this.pos];if(g.mime_type.match(/image\/.*/)){var j=g.url+"thumb_750x500";var c=ls.LovelyUtils.compileString(this.TEMPLATE_IMAGE,{src:j,descr:g.description,id:g.key});$(".mediaitem-ol").animate({width:this.IMAGE_WIDTH,height:this.IMAGE_HEIGHT},"slow");$("#mediaitem-body").animate({width:this.IMAGE_WIDTH-64,height:this.IMAGE_HEIGHT-90},"slow",ls.Delegate.create(this,this.loadImage,{html:c,data:g}))}else{if(g.mime_type.match(/audio\/.*/)){var c=this.TEMPLATE_AUDIO;var b=app.SETTINGS.media_url+"swf/mediaplayer.swf";var a={file:encodeURIComponent(g.url)};var i={wmode:"transparent",allowScriptAccess:"always"};$(".mediaitem-ol").animate({width:this.AUDIO_WIDTH,height:this.AUDIO_HEIGHT},"slow");$("#mediaitem-body").animate({width:this.AUDIO_WIDTH-64,height:this.AUDIO_HEIGHT-90},"slow",function(){$("#mediaitem-body").append(c);$("#mediaitem-descr").empty().append(g.description);swfobject.embedSWF(b,"player","280","22","9.0.0","",a,i)})}else{if(g.mime_type.match(/video\/youtube/)){var j=g.url.replace(/\/watch\?v=/,"/v/");var c=ls.LovelyUtils.compileString(this.TEMPLATE_YOUTUBE,{src:j});$(".mediaitem-ol").animate({width:this.YOUTUBE_WIDTH+30,height:this.YOUTUBE_HEIGHT+30},"slow");$("#mediaitem-body").animate({width:this.YOUTUBE_WIDTH-64,height:this.YOUTUBE_HEIGHT-64},"slow",function(){$("#mediaitem-body").append(c);$("#mediaitem-descr").empty().append(g.description)})}}}this.checkNavigation()},loadImage:function(c,a,b){$("#mediaitem-body").append(c.html);var d=$("img",$("#mediaitem-body"));c.image=d;d.hide();d.bind("load",ls.Delegate.create(this,this.onImageLoaded,c))},onImageLoaded:function(c,a,b){$("#mediaitem-body").show();$("#mediaitem-descr").empty().append(c.data.description);c.image.fadeIn("slow",ls.Delegate.create(this,this.afterLoadItem,null))},afterLoadItem:function(c,a,b){this.checkNavigation()},nextItem:function(){this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.CHANGE,app.IVW.code));var a=this.pos+1;if(a<this.items.length){this.beforeLoadItem(a)}},prevItem:function(){this.dispatchEvent(new ls.AjaxEvent(events.OverlayEvent.CHANGE,app.IVW.code));var a=this.pos-1;if(a>=0){this.beforeLoadItem(a)}},checkNavigation:function(c){var b=$("a.nav_prev",this.context);var d=$("a.nav_next",this.context);var a=$("span.nav_gap",this.context);if(c=="all"){b.hide();d.hide();a.hide();return}if(this.pos>0){b.show()}else{b.hide()}if(this.pos+1>=this.items.length){d.hide()}else{d.show()}if(this.pos>0&&this.pos<this.items.length-1){a.show()}else{a.hide()}}};makeDispatchable(zl.MediaItemManager);zl.Tracking={DEBUG:false,profilesProxy:null,listsProxy:null,init:function(){this.profilesProxy=new ls.JsonRPC("/profiles",GLOBALS.HOSTNAME);this.listsProxy=new ls.JsonRPC("/lists",GLOBALS.HOSTNAME);var a="tracked"+window.location.pathname.replace(/\//g,"_");if(!getCookie(a)){this.track();setCookie(a,"true",null,window.location.pathname)}else{if(this.DEBUG){console.log(window.location.href+" already tracked")}}},track:function(){var a=GLOBALS.URL.replace(/[#\?](.*)/,"");if(zl.listRegExp.test(a)){var b=a.match(zl.listRegExp)[2];this.trackList(b)}else{if(a.match(/\/user\/(.+)$/)&&app.SETTINGS.auth=="True"){var b=a.match(/\/user\/(.+)$/)[1];this.trackProfile(b)}else{if(a.match(/\/experten\/(.+)$/)&&app.SETTINGS.auth=="True"){var b=a.match(/\/experten\/(.+)$/)[1];this.trackProfile(b)}}}},trackProfile:function(a){if(a){var b={url_part:a};this.profilesProxy.call("visit",b);if(this.DEBUG){console.log("Track Profile "+a)}}},trackList:function(a){if(a){if(isNaN(a)){return}var c=parseInt(a,10);var b={id:c};this.listsProxy.call("count",b);if(this.DEBUG){console.log("Track List "+a)}}}};zl.ListDashboard={DEBUG:true,proxy:null,firstOpen:false,activeAction:null,ivwCode:function(){var a=app.IVW.code.match(/_ugc$/)?app.IVW.code:app.IVW.code+"_ugc";return a}(),getListProperties:function(){if(this.getContext()){var key=this.getContext().attr("ajax:key");var id=this.getContext().attr("ajax:id");var own=this.getContext().attr("ajax:isown");if(this.DEBUG){console.log(key,id,own)}return{key:key,id:parseInt(id,10),isOwn:eval(own)}}else{return null}},getContext:function(){var a=$(".dashboard");if(a.length<1){a=$(".dashboard-large")}return a},init:function(){if(this.getContext()){this.proxy=new ls.JsonRPC("/lists");$("ul.dashboardButtons a",this.getContext()).bind("mouseover",ls.Delegate.create(this,this.onMouseOver,null));$("ul.dashboardButtons a",this.getContext()).bind("mouseout",ls.Delegate.create(this,this.onMouseOut,null));if(!this.activeAction){this.board("dashboardDefault",false)}}else{if(this.DEBUG){console.log("No dashboard available.")}}},auth:function(){return eval(app.SETTINGS.auth.toLowerCase())},board:function(a,b){this.activeAction=a;if(b&&!this.auth()){ls.OverlayManager.openOverlay("/login_overlay","login_popup");return false}else{if(this.DEBUG){console.log("board::",a)}$(".dashboardItem",this.getContext()).hide();if(a){$("#"+a).show()}return true}},hideBoard:function(){$(".dashboardItem",this.getContext()).hide();$("ul.dashboardButtons li",this.getContext()).removeClass("button-down")},nothing:function(){if(this.DEBUG){console.log("Dashboard: Do nothing.")}},recommend:function(a){this.setActive(a);this.board("dashboardRecommend",true)},submitRecommendation:function(i){if(!this.proxy){return}var c=i?$("#"+i):$("form#dashboardRecommendForm");var d=$("#"+i+"_message",c).val();var a=$("#"+i+"_email",c).val();var b=$("#"+i+"_key",c).val();var e=new RegExp(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/);if(!e.test(a)){$("#"+i+"_email",c).addClass("alert").bind("focus",function(){$(this).removeClass("alert")});return}if(d.length>300){$("#"+i+"_message",c).addClass("alert").bind("focus",function(){$(this).removeClass("alert")});return}this.proxy.removeEventListener(events.RPCEvent.RESPONSE);this.proxy.addEventOnce(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onRecommendResponse,null));var g={o:b,recipient:a,message:d};this.proxy.call("recommend",g)},onRecommendResponse:function(c,b,a){if(a.result===true){$("#dashboardRecommendForm_email").val("");$("#dashboardRecommendForm_message").val("");this.board("dashboardRecommendSuccess");this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,"popup_mail"))}},countChars:function(c,b){var a=$(c).val().length;if(a>=b){$(c).val($(c).val().substr(0,a))}},compliment:function(){if(!this.proxy){return}if(this.board("",false)){var b=this.getListProperties().id;if(!b){return}this.proxy.removeEventListener(events.RPCEvent.RESPONSE);this.proxy.addEventOnce(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onComplimentResponse,null));var a={id:b};this.proxy.call("compliment",a)}},onComplimentResponse:function(c,b,a){this.board("dashboardCompliment");console.log("compliment done")},setVoted:function(){var a=$("ul.dashboardButtons-left a.i01",this.getContext());a.addClass("i01_inactive");a.removeClass("i01");var b=$("a.digg",$("#content"));if(b.length==1){b.html(parseInt(b.html(),10)+1)}},addFavourite:function(){if(!this.proxy){return}if(this.board("",true)){var b=this.getListProperties().id;if(!b){return}this.proxy.removeEventListener(events.RPCEvent.RESPONSE);this.proxy.addEventOnce(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onFavResponse,null));var a={id:b,v:true};this.proxy.call("set_favourite",a)}},onFavResponse:function(c,b,a){if(a.result){console.log(a);this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,this.ivwCode));this.board("dashboardFavourite");this.setFavoured()}else{this.board("dashboardFavouriteError")}this.setActive()},setFavoured:function(){var a=$("ul.dashboardButtons-right a.i02",this.getContext());a.addClass("i02_inactive");a.removeClass("i02")},bookmark:function(a){if(!this.isActive(a)){this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,this.ivwCode))}this.setActive(a);this.board("dashboardBookmark")},comment:function(c){var b=$("#newCommentForm");if(b.length>0){var a=$("#newCommentForm_body");a.val(c);a.focus();ls.LovelyUtils.scrollToNode(a)}else{if(this.DEBUG){console.log("No new CommentForm found")}return}},print:function(){this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,app.IVW.code));var a=window.open("/printlist/"+this.getListProperties().key,"_printdoc_","width=810,height=582,left=10,top=10,toolbar=no,status=no,scrollbars=yes,resizable=yes")},blame:function(a){this.setActive(a);this.board("dashboardBlame",false);$("dashboardBlameForm_message").val("");$("#blameCaptchaError").hide();if(app.SETTINGS.captcha_required&&!this.auth()){ls.RecaptchaManager.initCaptcha("blame-recaptcha-holder");ls.RecaptchaManager.reloadCaptcha()}},submitBlame:function(i){console.log("submit blame "+i,this.proxy!=true);if(!this.proxy){return}var d=i?$("#"+i):$("form#dashboardBlameForm");var e=$("#"+i+"_message",d).val();console.log("message: "+e);var c=$("#"+i+"_o",d).val();console.log("key: "+c);if(e.length>300){console.log("message too long");$("#"+i+"_message",d).addClass("alert").bind("focus",function(){$(this).removeClass("alert")});return}console.log("prepare proxy");this.proxy.removeEventListener(events.RPCEvent.SUCCESS);this.proxy.addEventOnce(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.onBlameSuccess,null));this.proxy.removeEventListener(events.RPCEvent.FAIL);this.proxy.removeEventListener(events.RPCEvent.FAIL);this.proxy.addEventOnce(events.RPCEvent.FAIL,ls.Delegate.create(this,this.onBlameFail,null));var a=$("#"+i+" #recaptcha_challenge_field").val();var b=$("#"+i+" #recaptcha_response_field").val();var g={o:c,message:e};if(a){g.recaptcha_challenge_field=a;g.recaptcha_response_field=b}console.log("call proxy with o: "+c+" message: "+e);this.proxy.call("report",g)},onBlameSuccess:function(c,b,a){ls.RecaptchaManager.destroyCaptcha();this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,"popup_mail"));this.board("dashboardBlameSuccess")},onBlameFail:function(c,b,a){ls.RecaptchaManager.reloadCaptcha();$("#blameCaptchaError").show()},blameUser:function(a){if(!this.auth()){ls.OverlayManager.openOverlay("/blame_user_overlay","popup_mail")}else{if(this.isActive(a)){this.reset(a)}else{this.setActive(a);this.board("dashboardBlame",true);$("#dashboardBlameForm").resetForm()}}},submitUserBlame:function(g){var c=g?$("#"+g):$("form#dashboardBlameForm");var d=$("#"+g+"_message",c).val();var b=$("#"+g+"_o",c).val();if(d.length>300){$("#"+g+"_message",c).addClass("alert").bind("focus",function(){$(this).removeClass("alert")});return}var a=new ls.JsonRPC("/profiles");a.addEventOnce(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onUserBlameResponse,null));var e={o:b,message:d};a.call("report",e)},onUserBlameResponse:function(c,b,a){if(a.result){this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,"popup_mail"));this.board("dashboardBlameSuccess")}else{this.board("dashboardBlameError")}},followUser:function(node){var follow=eval(node.attr("ajax:attr"));if(this.board("",true)){var key=this.getListProperties().key;if(!key){return}var proxy=new ls.JsonRPC("/profiles");proxy.addEventOnce(events.RPCEvent.RESPONSE,ls.Delegate.create(this,this.onFollowUser,{follow:follow,node:node}));var params={o:key,v:follow};proxy.call("set_observed",params)}},onFollowUser:function(d,a,c){var e=!d.follow;d.node.attr("ajax:attr",e.toString());var b=$("ul.profileFeatures li#followUserItem",this.getContext());if(e===true){b.removeClass("button-down");d.node.text("Diesen User beobachten")}else{if(e===false){b.addClass("button-down");d.node.text("nicht mehr beobachten");this.dispatchEvent(new ls.AjaxEvent(events.UserEvent.ACTION,this.ivwCode))}}},inviteFriend:function(){if(this.board("",true)){ls.OverlayManager.openOverlay("/invite_friends_overlay","popup_mail")}},setActive:function(a){var a=(a)?a:null;$("ul.dashboardButtons li",this.getContext()).removeClass("button-down");if(a!=null){$(a[0]).parent().addClass("button-down")}},isActive:function(a){if(a){return $(a[0]).parent().hasClass("button-down")}else{false}},reset:function(a){if(a){$(a[0]).parent().removeClass("button-down")}return this.board()}};makeDispatchable(zl.ListDashboard);zl.UserImageUpload={context:null,fid:null,uploader:null,USER_IMAGES:[[".profile-box-user-image","thumbc_72x96"],[".login-box-user-image","thumbc_36x48"]],MESSAGE_ERROR:"Das Bild konnte wegen eines Fehlers nicht hochgeladen werden.",init:function(a){this.context=a?a:null;this.fid=this.context.attr("id")?this.context.attr("id"):"uploadForm";this.uploader=new ls.AWSUploader(this.context);this.uploader.addEventListener(events.AjaxEvent.SUCCESS,ls.Delegate.create(this,this.onSuccess,null));this.uploader.addEventListener(events.AjaxEvent.FAIL,ls.Delegate.create(this,this.onFail,null));zl.GarbageCollector.addItem(this.uploader);$("#"+this.fid+"_agbs").bind("click",ls.Delegate.create(this,this.activateButton,null))},switchTabs:function(){$(".widgetTab").toggle()},submitUpload:function(){var a=$("#"+this.fid+"_file",this.context);if(a.val().length!=0){this.updateStatus("Bild wird hochgeladen ...");$("#"+this.fid+"_agbs").trigger("click");this.uploader.requestPolicy()}else{this.updateStatus();$("#form-error_"+this.fid+"_file p").show();a.addClass("alert");a.bind("focus",ls.Delegate.create(this,this.clearErrors,null))}},onSuccess:function(c,b,a){this.updateStatus("Bild erfolgreich hochgeladen.");this.lastFile=a;this.writeToProfile()},onFail:function(c,b,a){this.updateStatus("Das Bild konnte nicht hochgeladen werden.",true)},activateButton:function(d,b,c){var a=$("#upload-button",this.context);if(a.hasClass("upload-inactive")){a.removeClass("upload-inactive");a.addClass("upload-active");a.bind("click",ls.Delegate.create(this,this.submitUpload,null))}else{a.removeClass("upload-active");a.addClass("upload-inactive");a.unbind("click")}},replaceImage:function(a){this.updateStatus("Userbild wird ersetzt.");for(var c=0;c<this.USER_IMAGES.length;c++){var d=$(this.USER_IMAGES[c][0]);var b=this.USER_IMAGES[c][1];d.attr("src",a+b)}},writeToProfile:function(){this.updateStatus("Neues Bild im Profil speichern.");var a=new ls.JsonRPC("/myprofile");var b={data:{image:this.lastFile.key}};a.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.getFileInfo,null));a.call("update",b)},getFileInfo:function(){var a=new ls.JsonRPC("/files");var b={key:this.lastFile.key};a.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.finishUpload,null));a.call("asDict",b)},finishUpload:function(c,b,a){this.replaceImage(a.url);this.switchTabs();this.updateStatus()},updateStatus:function(e,d){var c=e?e:"";var a=d?true:false;var b=$("#upload-status",this.context);b.empty().append(c);if(e&&!a){$("#uploading").show()}else{$("#uploading").hide()}},clearErrors:function(){$(".form-error p",this.context).hide();$(".alert",this.context).removeClass("alert")}};zl.IchImNetz={context:null,proxy:null,parser:null,DEBUG:false,first:true,PROVIDER:{Facebook:"^http://(.*)facebook.com/.+$",Flickr:"^http://(.*)flickr.com/(photos|people)/[\\w\\d]+/?$",Friendfeed:"^http://(.*)friendfeed.com/[\\w\\d]+/?$","Last.fm":"^http://(.*)last.?fm[^/]*/(user|music)/[\\d\\w\\-\\+]+/?$",Myspace:"^http://(.*)myspace.com/[\\d\\w]+$",Twitter:"^(http|https)://(.*)twitter.com/[\\d\\w\\._\\-]+/?$",Wordpress:"^http://[\\w\\d]+.wordpress.com/?",Xing:"^(http|https)://(.*)xing.(de|com)/profile/[\\d\\w\\.\\-_]+/?$"},init:function(a){if(!a){return}else{this.first=true;this.context=a;this.fid=a.attr("id");this.params=this.context.getNSParams("ajax");this.parser=new ls.TemplateParser($(this.params.template));this.context.bind("submit",ls.Delegate.create(this,this.addItem,null));$("#"+this.fid+"_url",this.context).bind("focus",ls.Delegate.create(this,this.hideMessages,null));this.proxy=new ls.JsonRPC(this.params.endpoint);this.proxy.addEventListener(events.RPCEvent.SUCCESS,ls.Delegate.create(this,this.onSuccess,null));this.proxy.call("asDict",{})}},addItem:function(g,d,e){if(e){e.preventDefault()}var b=$(this.params.validator,this.context);var c=$(this.params.profileurl,this.context).val();var a=new RegExp(b.val());if(a.test(c)){this.links.push(c);this.submit()}else{this.notValidUrl()}},removeItem:function(a){this.links.splice(a,1);this.submit()},submit:function(){var a={data:{links:this.links}};this.proxy.call(this.params.method,a)},onSuccess:function(g,d,a){if(!this.first){$("#"+this.fid+"_saved").show()}else{this.first=false}this.parser.clearNode();this.links=a.links;if(!this.links||this.links.length==0){$(".profile-links-box").hide()}else{$(".profile-links-box").show()}$(this.params.profileurl,this.context).val("");for(var c=0;c<this.links.length;c++){var b=this.links[c];var j="Unbekanntes Profil";for(key in this.PROVIDER){var e=new RegExp(this.PROVIDER[key]);if(e.test(b)){j=key}}this.parser.parseTemplate({pos:c,url:b,provider:j,"short":j.toLowerCase().replace(/[\.\-\n\s]/g,"")})}},onFail:function(c,b,a){},notValidUrl:function(){$("#"+this.fid+"_url",this.context).addClass("alert");$("#form-error_"+this.fid+"_url p",this.context).show()},hideMessages:function(){$("#"+this.fid+"_url",this.context).removeClass("alert");$("#"+this.fid+"_saved").hide();$("#form-error_"+this.fid+"_url p",this.context).hide()}};zl.AjaxHistory={rsh:dhtmlHistory,base:{},history:{},lastHash:null,init:function(){if(isSafari){return}else{this.setDefault();var a=window.location.hash;if(a!=""){this.historyChanged(null,null,a.substr(1))}this.rsh.initialize();this.rsh.addListener(ls.Delegate.create(this,this.historyChanged,null))}},change:function(g,b,e){var d=e.key;var a=e.value;if(!d||!a||d.match(/comment/)){console.log("No history action key defined or action key "+d+" filtered");return}else{this.history[d]=a;var c=this.createHash();this.rsh.add(c);this.lastHash=c}},historyChanged:function(d,b,g){if(decodeURIComponent(g)==decodeURIComponent(this.lastHash)){console.log("SAME HASH:"+g+", "+this.lastHash);return}var a=this.parseHash(g);var e=this.parseHash(this.lastHash);for(id in e){if(!a[id]){var c=this.base[id]?this.base[id]:"DEFAULT";a[id]=c}}this.dispatchEvent(new ls.AjaxEvent(events.AjaxEvent.HISTORY,a))},createHash:function(){var c="/";var a=0;for(h in this.history){a++}var b=0;for(h in this.history){c+=h+"="+this.history[h];if(b<a-1){c+="&"}b++}return c},parseHash:function(a){if(typeof a=="string"&&a.substr(1).isQueryString()){var b=ls.LovelyUtils.parseQueryString(a.substr(1));return b}else{return{}}},setDefault:function(){var c=$("div");for(var b=0;b<c.length;b++){var d=$(c[b]);var e=d.getNSParams("ajax");if(e.base){var a=d.attr("id");this.base[a]=e.base}}}};makeDispatchable(zl.AjaxHistory);zl.IVWTracking={DEBUG:false,IVW_URL:"<img src='http://${account}.ivwbox.de/cgi-bin/ivw/${type}/${code};${comment}?r=${referrer}&d=${rand}' width='1' height='1' alt='szmtag' />",conf:{},init:function(a){this.conf=a},countIVW:function(c){var b=c?c:this.conf.code;if(!b||!this.conf.account||!this.conf.type){if(this.DEBUG){console.log("IVW: Try fallback ...")}if(app&&app.IVW){this.conf=app.IVW;b=c?c:this.conf.code;if(!b||!this.conf.account||!this.conf.type){if(this.DEBUG){console.log("IVW: Aborting ...")}return}}else{if(this.DEBUG){console.log("IVW: Aborting ...")}return}}var a=ls.LovelyUtils.compileString(this.IVW_URL,{account:this.conf.account,type:this.conf.type,code:b,comment:this.conf.comment,referrer:document.referrer,rand:Math.random()*100000});$("body").append(a);if(this.DEBUG){console.log("IVW: Inject "+a+" ...")}}};
