/*
 * jQuery 1.2.3 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $
 * $Rev: 4663 $
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i<M;i++)7((11=18[i])!=V)Q(L a 1p 11){7(b===11[a])6w;7(5c&&11[a]&&1o 11[a]=="3V"&&b[a]&&!11[a].15)b[a]=E.1s(b[a],11[a]);N 7(11[a]!=10)b[a]=11[a]}K b};L F="3N"+(1B 3v()).3L(),6t=0,5b={};L H=/z-?4X|86-?84|1w|6k|7Z-?1R/i;E.1s({7Y:J(a){1e.$=D;7(a)1e.3N=w;K E},1q:J(a){K!!a&&1o a!="25"&&!a.12&&a.1k!=1M&&/J/i.17(a+"")},3E:J(a){K a.1F&&!a.1h||a.28&&a.2i&&!a.2i.1h},5g:J(a){a=E.3g(a);7(a){L b=T.3S("6f")[0]||T.1F,1m=T.3s("1m");1m.U="1u/4m";7(E.14.1d)1m.1u=a;N 1m.38(T.5r(a));b.38(1m);b.34(1m)}},12:J(b,a){K b.12&&b.12.2E()==a.2E()},1T:{},O:J(c,d,b){c=c==1e?5b:c;L a=c[F];7(!a)a=c[F]=++6t;7(d&&!E.1T[a])E.1T[a]={};7(b!=10)E.1T[a][d]=b;K d?E.1T[a][d]:a},35:J(c,b){c=c==1e?5b:c;L a=c[F];7(b){7(E.1T[a]){2V E.1T[a][b];b="";Q(b 1p E.1T[a])1Q;7(!b)E.35(c)}}N{1S{2V c[F]}1X(e){7(c.52)c.52(F)}2V E.1T[a]}},R:J(c,a,b){7(b){7(c.M==10){Q(L d 1p c)7(a.1i(c[d],b)===S)1Q}N Q(L i=0,M=c.M;i<M;i++)7(a.1i(c[i],b)===S)1Q}N{7(c.M==10){Q(L d 1p c)7(a.1P(c[d],d,c[d])===S)1Q}N Q(L i=0,M=c.M,1A=c[0];i<M&&a.1P(1A,i,1A)!==S;1A=c[++i]){}}K c},1l:J(b,a,c,i,d){7(E.1q(a))a=a.1P(b,i);K a&&a.1k==51&&c=="2o"&&!H.17(d)?a+"2S":a},1t:{1b:J(c,b){E.R((b||"").23(/\\s+/),J(i,a){7(c.15==1&&!E.1t.3Y(c.1t,a))c.1t+=(c.1t?" ":"")+a})},1V:J(c,b){7(c.15==1)c.1t=b!=10?E.3y(c.1t.23(/\\s+/),J(a){K!E.1t.3Y(b,a)}).6a(" "):""},3Y:J(b,a){K E.33(a,(b.1t||b).3X().23(/\\s+/))>-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i<f.M;i++)7(f[i]!=V)2C[i].W.19=f[i]}7(k=="1w"&&d=="")d="1"}N 7(e.4n){L g=k.1r(/\\-(\\w)/g,J(a,b){K b.2E()});d=e.4n[k]||e.4n[g];7(!/^\\d+(2S)?$/i.17(d)&&/^\\d/.17(d)){L l=e.W.26,3K=e.3K.26;e.3K.26=e.4n.26;e.W.26=d||0;d=e.W.7f+"2S";e.W.26=l;e.3K.26=3K}}K d},4a:J(l,h){L k=[];h=h||T;7(1o h.3s==\'10\')h=h.2i||h[0]&&h[0].2i||T;E.R(l,J(i,d){7(!d)K;7(d.1k==51)d=d.3X();7(1o d=="25"){d=d.1r(/(<(\\w+)[^>]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+"></"+c+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>","</2k>"]||!f.1f("<9M")&&[1,"<73>","</73>"]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>","</1O>"]||!f.1f("<4v")&&[2,"<1O><1U>","</1U></1O>"]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>","</4v></1U></1O>"]||!f.1f("<7e")&&[2,"<1O><1U></1U><6V>","</6V></1O>"]||E.14.1d&&[1,"1x<1x>","</1x>"]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i<M;i++)a.1g(b[i]);N a=b.2K(0);K a},33:J(b,a){Q(L i=0,M=a.M;i<M;i++)7(a[i]==b)K i;K-1},37:J(a,b){7(E.14.1d){Q(L i=0;b[i];i++)7(b[i].15!=8)a.1g(b[i])}N Q(L i=0;b[i];i++)a.1g(b[i]);K a},57:J(a){L c=[],2r={};1S{Q(L i=0,M=a.M;i<M;i++){L b=E.O(a[i]);7(!2r[b]){2r[b]=P;c.1g(a[i])}}}1X(e){c=a}K c},3y:J(c,a,d){L b=[];Q(L i=0,M=c.M;i<M;i++)7(!d&&a(c[i],i)||d&&!a(c[i],i))b.1g(c[i]);K b},2c:J(d,a){L c=[];Q(L i=0,M=d.M;i<M;i++){L b=a(d[i],i);7(b!==V&&b!=10){7(b.1k!=1M)b=[b];c=c.71(b)}}K c}});L v=8Y.8W.2h();E.14={5K:(v.1D(/.+(?:8T|8S|8R|8O)[\\/: ]([\\d.]+)/)||[])[1],2d:/77/.17(v),2z:/2z/.17(v),1d:/1d/.17(v)&&!/2z/.17(v),48:/48/.17(v)&&!/(8L|77)/.17(v)};L y=E.14.1d?"6H":"75";E.1s({8I:!E.14.1d||T.6F=="79",46:{"Q":"8F","8E":"1t","4g":y,75:y,6H:y,3d:"3d",1t:"1t",1A:"1A",2Y:"2Y",3k:"3k",8C:"8B",2p:"2p",8A:"8z",3T:"3T",6C:"6C",28:"28",12:"12"}});E.R({6B:J(a){K a.1a},8y:J(a){K E.4u(a,"1a")},8x:J(a){K E.2Z(a,2,"2B")},8v:J(a){K E.2Z(a,2,"4t")},8u:J(a){K E.4u(a,"2B")},8t:J(a){K E.4u(a,"4t")},8s:J(a){K E.5i(a.1a.1C,a)},8r:J(a){K E.5i(a.1C)},6z:J(a){K E.12(a,"8q")?a.8o||a.8n.T:E.2I(a.3p)}},J(c,d){E.1n[c]=J(b){L a=E.2c(6,d);7(b&&1o b=="25")a=E.3e(b,a);K 6.2F(E.57(a))}});E.R({6y:"3t",8m:"6q",3o:"6o",8l:"5a",8k:"6S"},J(c,b){E.1n[c]=J(){L a=18;K 6.R(J(){Q(L i=0,M=a.M;i<M;i++)E(a[i])[b](6)})}});E.R({8j:J(a){E.1J(6,a,"");7(6.15==1)6.52(a)},8i:J(a){E.1t.1b(6,a)},8h:J(a){E.1t.1V(6,a)},8g:J(a){E.1t[E.1t.3Y(6,a)?"1V":"1b"](6,a)},1V:J(a){7(!a||E.1E(a,[6]).r.M){E("*",6).1b(6).R(J(){E.16.1V(6);E.35(6)});7(6.1a)6.1a.34(6)}},4x:J(){E(">*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K i<m[3]-0},88:J(a,i,m){K i>m[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i<T.4L.M;i++)7(T.4L[i].2Y){3z(18.3R,0);K}E.21()},S);7(E.14.2d){L a;(J(){7(E.2Q)K;7(T.39!="5V"&&T.39!="1y"){3z(18.3R,0);K}7(a===10)a=E("W, 7a[7A=7z]").M;7(T.4L.M!=a){3z(18.3R,0);K}E.21()})()}E.16.1b(1e,"3U",E.21)}E.R(("7y,7x,3U,7w,5d,4H,4V,7v,"+"7G,7u,7t,4P,4O,7s,2k,"+"58,7K,7q,7p,3a").23(","),J(i,b){E.1n[b]=J(a){K a?6.2j(b,a):6.1N(b)}});L I=J(a,c){L b=a.4S;2b(b&&b!=c)1S{b=b.1a}1X(3a){b=c}K b==c};E(1e).2j("4H",J(){E("*").1b(T).3w()});E.1n.1s({3U:J(g,d,c){7(E.1q(g))K 6.2j("3U",g);L e=g.1f(" ");7(e>=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i<a.M;i++)7(!a[i]())a.72(i--,1);7(!a.M){6I(E.3W);E.3W=V}},13)}},1G:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1G=P;6.45(0,6.2m());7(6.1l=="27"||6.1l=="1R")6.Y.W[6.1l]="8N";E(6.Y).1G()},1I:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1I=P;6.45(6.2m(),0)},30:J(a){L t=(1B 3v()).3L();7(a||t>6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{}));
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-12-20 15:43:48 +0100 (Do, 20 Dez 2007) $
 * $Rev: 4257 $
 *
 * Version: @VERSION
 *
 * Requires: jQuery 1.2+
 */

(function($){
	
$.dimensions = {
	version: '@VERSION'
};

// Create innerHeight, innerWidth, outerHeight and outerWidth methods
$.each( [ 'Height', 'Width' ], function(i, name){
	
	// innerHeight and innerWidth
	$.fn[ 'inner' + name ] = function() {
		if (!this[0]) return;
		
		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
		
		return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
	};
	
	// outerHeight and outerWidth
	$.fn[ 'outer' + name ] = function(options) {
		if (!this[0]) return;
		
		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
		
		options = $.extend({ margin: false }, options || {});
		
		var val = this.is(':visible') ? 
				this[0]['offset' + name] : 
				num( this, name.toLowerCase() )
					+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
					+ num(this, 'padding' + torl) + num(this, 'padding' + borr);
		
		return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
	};
});

// Create scrollLeft and scrollTop methods
$.each( ['Left', 'Top'], function(i, name) {
	$.fn[ 'scroll' + name ] = function(val) {
		if (!this[0]) return;
		
		return val != undefined ?
		
			// Set the scroll offset
			this.each(function() {
				this == window || this == document ?
					window.scrollTo( 
						name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
						name == 'Top'  ? val : $(window)[ 'scrollTop'  ]()
					) :
					this[ 'scroll' + name ] = val;
			}) :
			
			// Return the scroll offset
			this[0] == window || this[0] == document ?
				self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
					$.boxModel && document.documentElement[ 'scroll' + name ] ||
					document.body[ 'scroll' + name ] :
				this[0][ 'scroll' + name ];
	};
});

$.fn.extend({
	position: function() {
		var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
		
		if (elem) {
			// Get *real* offsetParent
			offsetParent = this.offsetParent();
			
			// Get correct offsets
			offset       = this.offset();
			parentOffset = offsetParent.offset();
			
			// Subtract element margins
			offset.top  -= num(elem, 'marginTop');
			offset.left -= num(elem, 'marginLeft');
			
			// Add offsetParent borders
			parentOffset.top  += num(offsetParent, 'borderTopWidth');
			parentOffset.left += num(offsetParent, 'borderLeftWidth');
			
			// Subtract the two offsets
			results = {
				top:  offset.top  - parentOffset.top,
				left: offset.left - parentOffset.left
			};
		}
		
		return results;
	},
	
	offsetParent: function() {
		var offsetParent = this[0].offsetParent;
		while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
			offsetParent = offsetParent.offsetParent;
		return $(offsetParent);
	}
});

function num(el, prop) {
	return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
};

})(jQuery);
/*
 * jQuery Tooltip plugin 1.2
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.tooltip.js 4569 2008-01-31 19:36:35Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
 
;(function($) {
	
		// the tooltip element
	var helper = {},
		// the current tooltipped element
		current,
		// the title of the current element, used for restoring
		title,
		// timeout id for delayed tooltips
		tID,
		// IE 5.5 or 6
		IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent),
		// flag for mouse tracking
		track = false;
	
	$.tooltip = {
		blocked: false,
		defaults: {
			delay: 200,
			showURL: true,
			extraClass: "",
			top: 15,
			left: 15,
			id: "tooltip"
		},
		block: function() {
			$.tooltip.blocked = !$.tooltip.blocked;
		}
	};
	
	$.fn.extend({
		tooltip: function(settings) {
			settings = $.extend({}, $.tooltip.defaults, settings);
			createHelper(settings);
			return this.each(function() {
					$.data(this, "tooltip-settings", settings);
					// copy tooltip into its own expando and remove the title
					this.tooltipText = this.title;
					$(this).removeAttr("title");
					// also remove alt attribute to prevent default tooltip in IE
					this.alt = "";
				})
				.hover(save, hide)
				.click(hide);
		},
		fixPNG: IE ? function() {
			return this.each(function () {
				var image = $(this).css('backgroundImage');
				if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
					image = RegExp.$1;
					$(this).css({
						'backgroundImage': 'none',
						'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
					}).each(function () {
						var position = $(this).css('position');
						if (position != 'absolute' && position != 'relative')
							$(this).css('position', 'relative');
					});
				}
			});
		} : function() { return this; },
		unfixPNG: IE ? function() {
			return this.each(function () {
				$(this).css({'filter': '', backgroundImage: ''});
			});
		} : function() { return this; },
		hideWhenEmpty: function() {
			return this.each(function() {
				$(this)[ $(this).html() ? "show" : "hide" ]();
			});
		},
		url: function() {
			return this.attr('href') || this.attr('src');
		}
	});
	
	function createHelper(settings) {
		// there can be only one tooltip helper
		if( helper.parent )
			return;
		// create the helper, h3 for title, div for url
		helper.parent = $('<div id="' + settings.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>')
			// add to document
			.appendTo(document.body)
			// hide it at first
			.hide();
			
		// apply bgiframe if available
		if ( $.fn.bgiframe )
			helper.parent.bgiframe();
		
		// save references to title and url elements
		helper.title = $('h3', helper.parent);
		helper.body = $('div.body', helper.parent);
		helper.url = $('div.url', helper.parent);
	}
	
	function settings(element) {
		return $.data(element, "tooltip-settings");
	}
	
	// main event handler to start showing tooltips
	function handle(event) {
		// show helper, either with timeout or on instant
		if( settings(this).delay )
			tID = setTimeout(show, settings(this).delay);
		else
			show();
		
		// if selected, update the helper position when the mouse moves
		track = !!settings(this).track;
		$(document.body).bind('mousemove', update);
			
		// update at least once
		update(event);
	}
	
	// save elements title before the tooltip is displayed
	function save() {
		// if this is the current source, or it has no title (occurs with click event), stop
		if ( $.tooltip.blocked || this == current || (!this.tooltipText && !settings(this).bodyHandler) )
			return;

		// save current
		current = this;
		title = this.tooltipText;
		
		if ( settings(this).bodyHandler ) {
			helper.title.hide();
			var bodyContent = settings(this).bodyHandler.call(this);
			if (bodyContent.nodeType || bodyContent.jquery) {
				helper.body.empty().append(bodyContent)
			} else {
				helper.body.html( bodyContent );
			}
			helper.body.show();
		} else if ( settings(this).showBody ) {
			var parts = title.split(settings(this).showBody);
			helper.title.html(parts.shift()).show();
			helper.body.empty();
			for(var i = 0, part; part = parts[i]; i++) {
				if(i > 0)
					helper.body.append("<br/>");
				helper.body.append(part);
			}
			helper.body.hideWhenEmpty();
		} else {
			helper.title.html(title).show();
			helper.body.hide();
		}
		
		// if element has href or src, add and show it, otherwise hide it
		if( settings(this).showURL && $(this).url() )
			helper.url.html( $(this).url().replace('http://', '') ).show();
		else 
			helper.url.hide();
		
		// add an optional class for this tip
		helper.parent.addClass(settings(this).extraClass);

		// fix PNG background for IE
		if (settings(this).fixPNG )
			helper.parent.fixPNG();
			
		handle.apply(this, arguments);
	}
	
	// delete timeout and show helper
	function show() {
		tID = null;
		helper.parent.show();
		update();
	}
	
	/**
	 * callback for mousemove
	 * updates the helper position
	 * removes itself when no current element
	 */
	function update(event)	{
		if($.tooltip.blocked)
			return;
		
		// stop updating when tracking is disabled and the tooltip is visible
		if ( !track && helper.parent.is(":visible")) {
			$(document.body).unbind('mousemove', update)
		}
		
		// if no current element is available, remove this listener
		if( current == null ) {
			$(document.body).unbind('mousemove', update);
			return;	
		}
		
		// remove position helper classes
		helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");
		
		var left = helper.parent[0].offsetLeft;
		var top = helper.parent[0].offsetTop;
		if(event) {
			// position the helper 15 pixel to bottom right, starting from mouse position
			left = event.pageX + settings(current).left;
			top = event.pageY + settings(current).top;
			helper.parent.css({
				left: left + 'px',
				top: top + 'px'
			});
		}
		
		var v = viewport(),
			h = helper.parent[0];
		// check horizontal position
		if(v.x + v.cx < h.offsetLeft + h.offsetWidth) {
			left -= h.offsetWidth + 20 + settings(current).left;
			helper.parent.css({left: left + 'px'}).addClass("viewport-right");
		}
		// check vertical position
		if(v.y + v.cy < h.offsetTop + h.offsetHeight) {
			top -= h.offsetHeight + 20 + settings(current).top;
			helper.parent.css({top: top + 'px'}).addClass("viewport-bottom");
		}
	}
	
	function viewport() {
		return {
			x: $(window).scrollLeft(),
			y: $(window).scrollTop(),
			cx: $(window).width(),
			cy: $(window).height()
		};
	}
	
	// hide helper and restore added classes and the title
	function hide(event) {
		if($.tooltip.blocked)
			return;
		// clear timeout if possible
		if(tID)
			clearTimeout(tID);
		// no more current element
		current = null;
		
		helper.parent.hide().removeClass( settings(this).extraClass );
		
		if( settings(this).fixPNG )
			helper.parent.unfixPNG();
	}
	
	$.fn.Tooltip = $.fn.tooltip;
	
})(jQuery);

/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * $LastChangedDate: 2008-08-25 09:43:59 +0200 (Mo, 25 Aug 2008) $
 * $Rev: 217 $
 *
 * Version: 3.0
 * 
 * Requires: $ 1.2.2+
 */

(function($) {

$.event.special.mousewheel = {
	setup: function() {
		var handler = $.event.special.mousewheel.handler;
		
		// Fix pageX, pageY, clientX and clientY for mozilla
		if ( $.browser.mozilla )
			$(this).bind('mousemove.mousewheel', function(event) {
				$.data(this, 'mwcursorposdata', {
					pageX: event.pageX,
					pageY: event.pageY,
					clientX: event.clientX,
					clientY: event.clientY
				});
			});
	
		if ( this.addEventListener )
			this.addEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
		else
			this.onmousewheel = handler;
	},
	
	teardown: function() {
		var handler = $.event.special.mousewheel.handler;
		
		$(this).unbind('mousemove.mousewheel');
		
		if ( this.removeEventListener )
			this.removeEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
		else
			this.onmousewheel = function(){};
		
		$.removeData(this, 'mwcursorposdata');
	},
	
	handler: function(event) {
		var args = Array.prototype.slice.call( arguments, 1 );
		
		event = $.event.fix(event || window.event);
		// Get correct pageX, pageY, clientX and clientY for mozilla
		$.extend( event, $.data(this, 'mwcursorposdata') || {} );
		var delta = 0, returnValue = true;
		
		if ( event.wheelDelta ) delta = event.wheelDelta/120;
		if ( event.detail     ) delta = -event.detail/3;
		if ( $.browser.opera  ) delta = -event.wheelDelta;
		
		event.data  = event.data || {};
		event.type  = "mousewheel";
		
		// Add delta to the front of the arguments
		args.unshift(delta);
		// Add event to the front of the arguments
		args.unshift(event);

		return $.event.handle.apply(this, args);
	}
};

$.fn.extend({
	mousewheel: function(fn) {
		return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
	},
	
	unmousewheel: function(fn) {
		return this.unbind("mousewheel", fn);
	}
});

})(jQuery);
(function($) {
	
	//If the UI scope is not available, add it
	$.ui = $.ui || {};
	
	//Add methods that are vital for all mouse interaction stuff (plugin registering)
	$.extend($.ui, {
		plugin: {
			add: function(module, option, set) {
				var proto = $.ui[module].prototype;
				for(var i in set) {
					proto.plugins[i] = proto.plugins[i] || [];
					proto.plugins[i].push([option, set[i]]);
				}
			},
			call: function(instance, name, arguments) {
				var set = instance.plugins[name]; if(!set) return;
				for (var i = 0; i < set.length; i++) {
					if (instance.options[set[i][0]]) set[i][1].apply(instance.element, arguments);
				}
			}	
		},
		cssCache: {},
		css: function(name) {
			if ($.ui.cssCache[name]) return $.ui.cssCache[name];
			
			var tmp = $('<div class="ui-resizable-gen">').addClass(name).css(
				{position:'absolute', top:'-5000px', left:'-5000px', display:'block'}
			).appendTo('body');
			
			//Opera and Safari set width and height to 0px instead of auto
			//Safari returns rgba(0,0,0,0) when bgcolor is not set
			$.ui.cssCache[name] = !!(
				((/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || 
				!(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
			);
			try { $('body').get(0).removeChild(tmp.get(0));	} catch(e){}
			return $.ui.cssCache[name];
		},
		disableSelection: function(e) {
			if (!e) return;
			e.unselectable = "on";
			e.onselectstart = function() {	return false; };
			if (e.style) e.style.MozUserSelect = "none";
		},
		enableSelection: function(e) {
			if (!e) return;
			e.unselectable = "off";
			e.onselectstart = function() { return true; };
			if (e.style) e.style.MozUserSelect = "";
		}
	});
	
	/********************************************************************************************************/

	$.fn.extend({
		mouseInteraction: function(o) {
			return this.each(function() {
				new $.ui.mouseInteraction(this, o);
			});
		},
		removeMouseInteraction: function(o) {
			return this.each(function() {
				if($.data(this, "ui-mouse"))
					$.data(this, "ui-mouse").destroy();
			});
		}
	});
	
	/********************************************************************************************************/
	
	$.ui.mouseInteraction = function(element, options) {
	
		var self = this;
		this.element = element;
		$.data(this.element, "ui-mouse", this);
		this.options = $.extend({}, options);
		
		$(element).bind('mousedown.draggable', function() { return self.click.apply(self, arguments); });
		if($.browser.msie) $(element).attr('unselectable', 'on'); //Prevent text selection in IE
		
	};
	
	$.extend($.ui.mouseInteraction.prototype, {
		
		destroy: function() { $(this.element).unbind('mousedown.draggable'); },
		trigger: function() { return this.click.apply(this, arguments); },
		click: function(e) {
			
			if(
				   e.which != 1 //only left click starts dragging
				|| $.inArray(e.target.nodeName.toLowerCase(), this.options.dragPrevention) != -1 // Prevent execution on defined elements
				|| (this.options.condition && !this.options.condition.apply(this.options.executor || this, [e, this.element])) //Prevent execution on condition
			) return true;
			
			var self = this;
			var initialize = function() {
				self._MP = { left: e.pageX, top: e.pageY }; // Store the click mouse position
				$(document).bind('mouseup.draggable', function() { return self.stop.apply(self, arguments); });
				$(document).bind('mousemove.draggable', function() { return self.drag.apply(self, arguments); });
			};

			if(this.options.delay) {
				if(this.timer) clearInterval(this.timer);
				this.timer = setTimeout(initialize, this.options.delay);
			} else {
				initialize();
			}
			
			return false;
			
		},
		stop: function(e) {			
			
			var o = this.options;
			if(!this.initialized) return $(document).unbind('mouseup.draggable').unbind('mousemove.draggable');

			if(this.options.stop) this.options.stop.call(this.options.executor || this, e, this.element);
			$(document).unbind('mouseup.draggable').unbind('mousemove.draggable');
			this.initialized = false;
			return false;
			
		},
		drag: function(e) {

			var o = this.options;
			if ($.browser.msie && !e.button) return this.stop.apply(this, [e]); // IE mouseup check
			
			if(!this.initialized && (Math.abs(this._MP.left-e.pageX) >= o.distance || Math.abs(this._MP.top-e.pageY) >= o.distance)) {
				if(this.options.start) this.options.start.call(this.options.executor || this, e, this.element);
				this.initialized = true;
			} else {
				if(!this.initialized) return false;
			}

			if(o.drag) o.drag.call(this.options.executor || this, e, this.element);
			return false;
			
		}
	});

 })(jQuery);
(function($) {

	$.fn.extend({
		slider: function(options) {
			var args = Array.prototype.slice.call(arguments, 1);
			
			if ( options == "value" )
				return $.data(this[0], "ui-slider").value(arguments[1]);
			
			return this.each(function() {
				if (typeof options == "string") {
					var slider = $.data(this, "ui-slider");
					slider[options].apply(slider, args);

				} else if(!$.data(this, "ui-slider"))
					new $.ui.slider(this, options);
			});
		}
	});
	
	$.ui.slider = function(element, options) {

		//Initialize needed constants
		var self = this;
		this.element = $(element);
		$.data(element, "ui-slider", this);
		this.element.addClass("ui-slider");
		
		//Prepare the passed options
		this.options = $.extend({}, options);
		var o = this.options;
		$.extend(o, {
			axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'),
			maxValue: !isNaN(parseInt(o.maxValue,10)) ? parseInt(o.maxValue,10) :  100,
			minValue: parseInt(o.minValue,10) || 0,
			startValue: parseInt(o.startValue,10) || 'none'		
		});
		
		//Prepare the real maxValue
		o.realMaxValue = o.maxValue - o.minValue;
		
		//Calculate stepping based on steps
		o.stepping = parseInt(o.stepping,10) || (o.steps ? o.realMaxValue/o.steps : 0);
		
		$(element).bind("setData.slider", function(event, key, value){
			self.options[key] = value;
		}).bind("getData.slider", function(event, key){
			return self.options[key];
		});

		//Initialize mouse and key events for interaction
		this.handle = o.handle ? $(o.handle, element) : $('> *', element);
		$(this.handle)
			.mouseInteraction({
				executor: this,
				delay: o.delay,
				distance: o.distance || 0,
				dragPrevention: o.prevention ? o.prevention.toLowerCase().split(',') : ['input','textarea','button','select','option'],
				start: this.start,
				stop: this.stop,
				drag: this.drag,
				condition: function(e, handle) {
					if(!this.disabled) {
						if(this.currentHandle) this.blur(this.currentHandle);
						this.focus(handle,1);
						return !this.disabled;
					}
				}
			})
			.wrap('<a href="javascript:void(0)"></a>')
			.parent()
				.bind('focus', function(e) { self.focus(this.firstChild); })
				.bind('blur', function(e) { self.blur(this.firstChild); })
				.bind('keydown', function(e) {
					if(/(37|39)/.test(e.keyCode))
						self.moveTo((e.keyCode == 37 ? '-' : '+')+'='+(self.options.stepping ? self.options.stepping : (self.options.realMaxValue / self.size)*5),this.firstChild);
				})
		;
		
		//Position the node
		if(o.helper == 'original' && (this.element.css('position') == 'static' || this.element.css('position') == '')) this.element.css('position', 'relative');
		
		//Prepare dynamic properties for later use
		if(o.axis == 'horizontal') {
			this.size = this.element.outerWidth();
			this.properties = ['left', 'width'];
		} else {
			this.size = this.element.outerHeight();
			this.properties = ['top', 'height'];
		}
		
		//Bind the click to the slider itself
		this.element.bind('click', function(e) { self.click.apply(self, [e]); });
		
		//Move the first handle to the startValue
		if(!isNaN(o.startValue)) this.moveTo(o.startValue, 0);
		
		//If we only have one handle, set the previous handle to this one to allow clicking before selecting the handle
		if(this.handle.length == 1) this.previousHandle = this.handle;
		
		
		if(this.handle.length == 2 && o.range) this.createRange();
	
	};
	
	$.extend($.ui.slider.prototype, {
		plugins: {},
		createRange: function() {
			this.rangeElement = $('<div></div>')
				.addClass('ui-slider-range')
				.css({ position: 'absolute' })
				.css(this.properties[0], parseInt($(this.handle[0]).css(this.properties[0]),10) + this.handleSize(0)/2)
				.css(this.properties[1], parseInt($(this.handle[1]).css(this.properties[0]),10) - parseInt($(this.handle[0]).css(this.properties[0]),10))
				.appendTo(this.element);
		},
		updateRange: function() {
				this.rangeElement.css(this.properties[0], parseInt($(this.handle[0]).css(this.properties[0]),10) + this.handleSize(0)/2);
				this.rangeElement.css(this.properties[1], parseInt($(this.handle[1]).css(this.properties[0]),10) - parseInt($(this.handle[0]).css(this.properties[0]),10));
		},
		getRange: function() {
			return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.properties[1]),10)) : null;
		},
		ui: function(e) {
			return {
				instance: this,
				options: this.options,
				handle: this.currentHandle,
				value: this.value(),
				range: this.getRange()
			};
		},
		propagate: function(n,e) {
			$.ui.plugin.call(this, n, [e, this.ui()]);
			this.element.triggerHandler(n == "slide" ? n : "slide"+n, [e, this.ui()], this.options[n]);
		},
		destroy: function() {
			this.element
				.removeClass("ui-slider ui-slider-disabled")
				.removeData("ul-slider")
				.unbind(".slider");
			this.handles.removeMouseInteraction();
		},
		enable: function() {
			this.element.removeClass("ui-slider-disabled");
			this.disabled = false;
		},
		disable: function() {
			this.element.addClass("ui-slider-disabled");
			this.disabled = true;
		},
		focus: function(handle,hard) {
			this.currentHandle = $(handle).addClass('ui-slider-handle-active');
			if(hard) this.currentHandle.parent()[0].focus();
		},
		blur: function(handle) {
			$(handle).removeClass('ui-slider-handle-active');
			if(this.currentHandle && this.currentHandle[0] == handle) { this.previousHandle = this.currentHandle; this.currentHandle = null; };
		},
		value: function(handle) {
			if(this.handle.length == 1) this.currentHandle = this.handle;
			return ((parseInt($(handle != undefined ? this.handle[handle] || handle : this.currentHandle).css(this.properties[0]),10) / (this.size - this.handleSize())) * this.options.realMaxValue) + this.options.minValue;
		},
		convertValue: function(value) {
			return (value / (this.size - this.handleSize())) * this.options.realMaxValue;
		},
		translateValue: function(value) {
			return ((value - this.options.minValue) / this.options.realMaxValue) * (this.size - this.handleSize());
		},
		handleSize: function(handle) {
			return $(handle != undefined ? this.handle[handle] : this.currentHandle)['outer'+this.properties[1].substr(0,1).toUpperCase()+this.properties[1].substr(1)]();	
		},
		click: function(e) {
		
			// This method is only used if:
			// - The user didn't click a handle
			// - The Slider is not disabled
			// - There is a current, or previous selected handle (otherwise we wouldn't know which one to move)
			var pointer = [e.pageX,e.pageY];
			var clickedHandle = false; this.handle.each(function() { if(this == e.target) clickedHandle = true;  });
			if(clickedHandle || this.disabled || !(this.currentHandle || this.previousHandle)) return;

			//If a previous handle was focussed, focus it again
			if(this.previousHandle) this.focus(this.previousHandle, 1);
			
			//Move focussed handle to the clicked position
			this.offset = this.element.offset();
			this.moveTo(this.convertValue(e[this.properties[0] == 'top' ? 'pageY' : 'pageX'] - this.offset[this.properties[0]] - this.handleSize()/2));
			
		},
		start: function(e, handle) {
			
			var o = this.options;
			
			this.offset = this.element.offset();
			this.handleOffset = this.currentHandle.offset();
			this.clickOffset = { top: e.pageY - this.handleOffset.top, left: e.pageX - this.handleOffset.left };
			this.firstValue = this.value();
			
			this.propagate('start', e);
			return false;
						
		},
		stop: function(e) {
			this.propagate('stop', e);
			if(this.firstValue != this.value()) this.propagate('change', e);
			return false;
		},
		drag: function(e, handle) {

			var o = this.options;
			var position = { top: e.pageY - this.offset.top - this.clickOffset.top, left: e.pageX - this.offset.left - this.clickOffset.left};

			var modifier = position[this.properties[0]];			
			if(modifier >= this.size - this.handleSize()) modifier = this.size - this.handleSize();
			if(modifier <= 0) modifier = 0;
			
			if(o.stepping) {
				var value = this.convertValue(modifier);
				value = Math.round(value / o.stepping) * o.stepping;
				modifier = this.translateValue(value);	
			}

			if(this.rangeElement) {
				if(this.currentHandle[0] == this.handle[0] && modifier >= this.translateValue(this.value(1))) modifier = this.translateValue(this.value(1));
				if(this.currentHandle[0] == this.handle[1] && modifier <= this.translateValue(this.value(0))) modifier = this.translateValue(this.value(0));
			}	
			
			this.currentHandle.css(this.properties[0], modifier);
			if(this.rangeElement) this.updateRange();
			this.propagate('slide', e);
			return false;
			
		},
		moveTo: function(value, handle) {

			var o = this.options;
			if(handle == undefined && !this.currentHandle && this.handle.length != 1) return false; //If no handle has been passed, no current handle is available and we have multiple handles, return false
			if(handle == undefined && !this.currentHandle) handle = 0; //If only one handle is available, use it
			if(handle != undefined) this.currentHandle = this.previousHandle = $(this.handle[handle] || handle);

			if(value.constructor == String) value = /\-\=/.test(value) ? this.value() - parseInt(value.replace('-=', ''),10) : this.value() + parseInt(value.replace('+=', ''),10);
			if(o.stepping) value = Math.round(value / o.stepping) * o.stepping;
			value = this.translateValue(value);

			if(value >= this.size - this.handleSize()) value = this.size - this.handleSize();
			if(value <= 0) value = 0;
			if(this.rangeElement) {
				if(this.currentHandle[0] == this.handle[0] && value >= this.translateValue(this.value(1))) value = this.translateValue(this.value(1));
				if(this.currentHandle[0] == this.handle[1] && value <= this.translateValue(this.value(0))) value = this.translateValue(this.value(0));
			}
			
			this.currentHandle.css(this.properties[0], value);
			if(this.rangeElement) this.updateRange();
			
			this.propagate('start', null);
			this.propagate('stop', null);
			this.propagate('change', null);

		}
	});

})(jQuery);
/*
 * Accordion 1.5 - jQuery menu widget
 *
 * Copyright (c) 2007 Jörn Zaefferer, Frank Marcia
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.accordion.js 2951 2007-08-28 07:21:13Z joern.zaefferer $
 *
 */

(function($) {

$.ui = $.ui || {}

$.ui.accordion = {};
$.extend($.ui.accordion, {
	defaults: {
		selectedClass: "selected",
		alwaysOpen: true,
		animated: 'slide',
		event: "click",
		header: "a"
	},
	animations: {
		slide: function(settings, additions) {
			settings = $.extend({
				easing: "swing",
				duration: 300
			}, settings, additions);
			if ( !settings.toHide.size() ) {
				settings.toShow.animate({height: "show"}, {
					duration: settings.duration,
					easing: settings.easing,
					complete: settings.finished
				});
				return;
			}
			var hideHeight = settings.toHide.height(),
				showHeight = settings.toShow.height(),
				difference = showHeight / hideHeight;
			settings.toShow.css({ height: 0, overflow: 'hidden' }).show();
			settings.toHide.filter(":hidden").each(settings.finished).end().filter(":visible").animate({height:"hide"},{
				step: function(n){
					settings.toShow.height(Math.ceil( (hideHeight - (n)) * difference ));
				},
				duration: settings.duration,
				easing: settings.easing,
				complete: settings.finished
			});
		},
		bounceslide: function(settings) {
			this.slide(settings, {
				easing: settings.down ? "bounceout" : "swing",
				duration: settings.down ? 1000 : 200
			});
		},
		easeslide: function(settings) {
			this.slide(settings, {
				easing: "easeinout",
				duration: 700
			})
		}
	}
});

$.fn.extend({
	nextUntil: function(expr) {
	    var match = [];
	
	    // We need to figure out which elements to push onto the array
	    this.each(function(){
	        // Traverse through the sibling nodes
	        for( var i = this.nextSibling; i; i = i.nextSibling ) {
	            // Make sure that we're only dealing with elements
	            if ( i.nodeType != 1 ) continue;
	
	            // If we find a match then we need to stop
	            if ( $.filter( expr, [i] ).r.length ) break;
	
	            // Otherwise, add it on to the stack
	            match.push( i );
	        }
	    });
	
	    return this.pushStack( match );
	},
	// the plugin method itself
	accordion: function(settings) {
		if ( !this.length )
			return this;
	
		// setup configuration
		settings = $.extend({}, $.ui.accordion.defaults, settings);
		
		if ( settings.navigation ) {
			var current = this.find("a").filter(function() { return this.href == location.href; });
			if ( current.length ) {
				if ( current.filter(settings.header).length ) {
					settings.active = current;
				} else {
					settings.active = current.parent().parent().prev();
					current.addClass("current");
				}
			}
		}
		
		// calculate active if not specified, using the first header
		var container = this,
			headers = container.find(settings.header),
			active = findActive(settings.active),
			running = 0;

		if ( settings.fillSpace ) {
			var maxHeight = this.parent().height();
			headers.each(function() {
				maxHeight -= $(this).outerHeight();
			});
			var maxPadding = 0;
			headers.nextUntil(settings.header).each(function() {
				maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
			}).height(maxHeight - maxPadding);
		} else if ( settings.autoheight ) {
			var maxHeight = 0;
			headers.nextUntil(settings.header).each(function() {
				maxHeight = Math.max(maxHeight, $(this).height());
			}).height(maxHeight);
		}

		headers
			.not(active || "")
			.nextUntil(settings.header)
			.hide();
		active.parent().andSelf().addClass(settings.selectedClass);
		
		
		function findActive(selector) {
			return selector != undefined
				? typeof selector == "number"
					? headers.filter(":eq(" + selector + ")")
					: headers.not(headers.not(selector))
				: selector === false
					? $("<div>")
					: headers.filter(":eq(0)");
		}
		
		function toggle(toShow, toHide, data, clickedActive, down) {
			var finished = function(cancel) {
				running = cancel ? 0 : --running;
				if ( running )
					return;
				// trigger custom change event
				container.trigger("change", data);
			};
			
			// count elements to animate
			running = toHide.size() == 0 ? toShow.size() : toHide.size();
			
			if ( settings.animated ) {
				if ( !settings.alwaysOpen && clickedActive ) {
					toShow.slideToggle(settings.animated);
					finished(true);
				} else {
					$.ui.accordion.animations[settings.animated]({
						toShow: toShow,
						toHide: toHide,
						finished: finished,
						down: down
					});
				}
			} else {
				if ( !settings.alwaysOpen && clickedActive ) {
					toShow.toggle();
				} else {
					toHide.hide();
					toShow.show();
				}
				finished(true);
			}
		}
		
		function clickHandler(event) {
			// called only when using activate(false) to close all parts programmatically
			if ( !event.target && !settings.alwaysOpen ) {
				active.toggleClass(settings.selectedClass);
				var toHide = active.nextUntil(settings.header);
				var toShow = active = $([]);
				toggle( toShow, toHide );
				return;
			}
			// get the click target
			var clicked = $(event.target);
			
			// due to the event delegation model, we have to check if one
			// of the parent elements is our actual header, and find that
			if ( clicked.parents(settings.header).length )
				while ( !clicked.is(settings.header) )
					clicked = clicked.parent();
			
			var clickedActive = clicked[0] == active[0];
			
			// if animations are still active, or the active header is the target, ignore click
			if(running || (settings.alwaysOpen && clickedActive) || !clicked.is(settings.header))
				return;

			// switch classes
			active.parent().andSelf().toggleClass(settings.selectedClass);
			if ( !clickedActive ) {
				clicked.parent().andSelf().addClass(settings.selectedClass);
			}

			// find elements to show and hide
			var toShow = clicked.nextUntil(settings.header),
				toHide = active.nextUntil(settings.header),
				data = [clicked, active, toShow, toHide],
				down = headers.index( active[0] ) > headers.index( clicked[0] );
			
			active = clickedActive ? $([]) : clicked;
			toggle( toShow, toHide, data, clickedActive, down );

			return !toShow.length;
		};
		function activateHandler(event, index) {
			// IE manages to call activateHandler on normal clicks
			if ( arguments.length == 1 )
				return;
			// call clickHandler with custom event
			clickHandler({
				target: findActive(index)[0]
			});
		};

		return container
			.bind(settings.event, clickHandler)
			.bind("activate", activateHandler);
	},
	activate: function(index) {
		return this.trigger('activate', [index]);
	}
});

})(jQuery);
/*
 * 
 * TableSorter 2.0 - Client-side table sorting with ease!
 * Version 2.0.3
 * @requires jQuery v1.2.3
 * 
 * Copyright (c) 2007 Christian Bach
 * Examples and docs at: http://tablesorter.com
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * 
 */
/**
 *
 * @description Create a sortable table with multi-column sorting capabilitys
 * 
 * @example $('table').tablesorter();
 * @desc Create a simple tablesorter interface.
 *
 * @example $('table').tablesorter({ sortList:[[0,0],[1,0]] });
 * @desc Create a tablesorter interface and sort on the first and secound column in ascending order.
 * 
 * @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });
 * @desc Create a tablesorter interface and disableing the first and secound column headers.
 * 
 * @example $('table').tablesorter({ 0: {sorter:"integer"}, 1: {sorter:"currency"} });
 * @desc Create a tablesorter interface and set a column parser for the first and secound column.
 * 
 * 
 * @param Object settings An object literal containing key/value pairs to provide optional settings.
 * 
 * @option String cssHeader (optional) 			A string of the class name to be appended to sortable tr elements in the thead of the table. 
 * 												Default value: "header"
 * 
 * @option String cssAsc (optional) 			A string of the class name to be appended to sortable tr elements in the thead on a ascending sort. 
 * 												Default value: "headerSortUp"
 * 
 * @option String cssDesc (optional) 			A string of the class name to be appended to sortable tr elements in the thead on a descending sort. 
 * 												Default value: "headerSortDown"
 * 
 * @option String sortInitialOrder (optional) 	A string of the inital sorting order can be asc or desc. 
 * 												Default value: "asc"
 * 
 * @option String sortMultisortKey (optional) 	A string of the multi-column sort key. 
 * 												Default value: "shiftKey"
 * 
 * @option String textExtraction (optional) 	A string of the text-extraction method to use. 
 * 												For complex html structures inside td cell set this option to "complex", 
 * 												on large tables the complex option can be slow. 
 * 												Default value: "simple"
 * 
 * @option Object headers (optional) 			An array containing the forces sorting rules. 
 * 												This option let's you specify a default sorting rule. 
 * 												Default value: null
 * 
 * @option Array sortList (optional) 			An array containing the forces sorting rules. 
 * 												This option let's you specify a default sorting rule. 
 * 												Default value: null
 * 
 * @option Array sortForce (optional) 			An array containing forced sorting rules. 
 * 												This option let's you specify a default sorting rule, which is prepended to user-selected rules.
 * 												Default value: null
 *  
  * @option Array sortAppend (optional) 			An array containing forced sorting rules. 
 * 												This option let's you specify a default sorting rule, which is appended to user-selected rules.
 * 												Default value: null
 * 
 * @option Boolean widthFixed (optional) 		Boolean flag indicating if tablesorter should apply fixed widths to the table columns.
 * 												This is usefull when using the pager companion plugin.
 * 												This options requires the dimension jquery plugin.
 * 												Default value: false
 *
 * @option Boolean cancelSelection (optional) 	Boolean flag indicating if tablesorter should cancel selection of the table headers text.
 * 												Default value: true
 *
 * @option Boolean debug (optional) 			Boolean flag indicating if tablesorter should display debuging information usefull for development.
 *
 * @type jQuery
 *
 * @name tablesorter
 * 
 * @cat Plugins/Tablesorter
 * 
 * @author Christian Bach/christian.bach@polyester.se
 */

(function($) {
	$.extend({
		tablesorter: new function() {
			
			var parsers = [], widgets = [];
			
			this.defaults = {
				cssHeader: "header",
				cssAsc: "headerSortUp",
				cssDesc: "headerSortDown",
				sortInitialOrder: "asc",
				sortMultiSortKey: "shiftKey",
				sortForce: null,
				sortAppend: null,
				textExtraction: "simple",
				parsers: {}, 
				widgets: [],		
				widgetZebra: {css: ["even","odd"]},
				headers: {},
				widthFixed: false,
				cancelSelection: true,
				sortList: [],
				headerList: [],
				dateFormat: "us",
				decimal: '.',
				debug: false
			};
			
			/* debuging utils */
			function benchmark(s,d) {
				log(s + "," + (new Date().getTime() - d.getTime()) + "ms");
			}
			
			this.benchmark = benchmark;
			
			function log(s) {
				if (typeof console != "undefined" && typeof console.debug != "undefined") {
					console.log(s);
				} else {
					alert(s);
				}
			}
						
			/* parsers utils */
			function buildParserCache(table,$headers) {
				
				if(table.config.debug) { var parsersDebug = ""; }
				
				var rows = table.tBodies[0].rows;
				
				if(table.tBodies[0].rows[0]) {

					var list = [], cells = rows[0].cells, l = cells.length;
					
					for (var i=0;i < l; i++) {
						var p = false;
						
						if($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter)  ) {
						
							p = getParserById($($headers[i]).metadata().sorter);	
						
						} else if((table.config.headers[i] && table.config.headers[i].sorter)) {
	
							p = getParserById(table.config.headers[i].sorter);
						}
						if(!p) {
							p = detectParserForColumn(table,cells[i]);
						}
	
						if(table.config.debug) { parsersDebug += "column:" + i + " parser:" +p.id + "\n"; }
	
						list.push(p);
					}
				}
				
				if(table.config.debug) { log(parsersDebug); }

				return list;
			};
			
			function detectParserForColumn(table,node) {
				var l = parsers.length;
				for(var i=1; i < l; i++) {
					if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)) {
						return parsers[i];
					}
				}
				// 0 is always the generic parser (text)
				return parsers[0];
			}
			
			function getParserById(name) {
				var l = parsers.length;
				for(var i=0; i < l; i++) {
					if(parsers[i].id.toLowerCase() == name.toLowerCase()) {	
						return parsers[i];
					}
				}
				return false;
			}
			
			/* utils */
			function buildCache(table) {
				
				if(table.config.debug) { var cacheTime = new Date(); }
				
				
				var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
					totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0,
					parsers = table.config.parsers, 
					cache = {row: [], normalized: []};
				
					for (var i=0;i < totalRows; ++i) {
					
						/** Add the table data to main data array */
						var c = table.tBodies[0].rows[i], cols = [];
					
						cache.row.push($(c));
						
						for(var j=0; j < totalCells; ++j) {
							cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));	
						}
												
						cols.push(i); // add position for rowCache
						cache.normalized.push(cols);
						cols = null;
					};
				
				if(table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); }
				
				return cache;
			};
			
			function getElementText(config,node) {
				
				if(!node) return "";
								
				var t = "";
				
				if(config.textExtraction == "simple") {
					if(node.childNodes[0] && node.childNodes[0].hasChildNodes()) {
						t = node.childNodes[0].innerHTML;
					} else {
						t = node.innerHTML;
					}
				} else {
					if(typeof(config.textExtraction) == "function") {
						t = config.textExtraction(node);
					} else { 
						t = $(node).text();
					}	
				}
				return t;
			}
			
			function appendToTable(table,cache) {
				
				if(table.config.debug) {var appendTime = new Date()}
				
				var c = cache, 
					r = c.row, 
					n= c.normalized, 
					totalRows = n.length, 
					checkCell = (n[0].length-1), 
					tableBody = $(table.tBodies[0]),
					rows = [];
				
				for (var i=0;i < totalRows; i++) {
					rows.push(r[n[i][checkCell]]);	
					if(!table.config.appender) {
						
						var o = r[n[i][checkCell]];
						var l = o.length;
						for(var j=0; j < l; j++) {
							
							tableBody[0].appendChild(o[j]);
						
						}
						
						//tableBody.append(r[n[i][checkCell]]);
					}
				}	
				
				if(table.config.appender) {
				
					table.config.appender(table,rows);	
				}
				
				rows = null;
				
				if(table.config.debug) { benchmark("Rebuilt table:", appendTime); }
								
				//apply table widgets
				applyWidget(table);
				
				// trigger sortend
				setTimeout(function() {
					$(table).trigger("sortEnd");	
				},0);
				
			};
			
			function buildHeaders(table) {
				
				if(table.config.debug) { var time = new Date(); }
				
				var meta = ($.metadata) ? true : false, tableHeadersRows = [];
			
				for(var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i]=0; };
				
				$tableHeaders = $("thead th",table);
		
				$tableHeaders.each(function(index) {
							
					this.count = 0;
					this.column = index;
					this.order = formatSortingOrder(table.config.sortInitialOrder);
					
					if(checkHeaderMetadata(this) || checkHeaderOptions(table,index)) this.sortDisabled = true;
					
					if(!this.sortDisabled) {
						$(this).addClass(table.config.cssHeader);
					}
					
					// add cell to headerList
					table.config.headerList[index]= this;
				});
				
				if(table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); }
				
				return $tableHeaders;
				
			};
						
		   	function checkCellColSpan(table, rows, row) {
                var arr = [], r = table.tHead.rows, c = r[row].cells;
				
				for(var i=0; i < c.length; i++) {
					var cell = c[i];
					
					if ( cell.colSpan > 1) { 
						arr = arr.concat(checkCellColSpan(table, headerArr,row++));
					} else  {
						if(table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row+1])) {
							arr.push(cell);
						}
						//headerArr[row] = (i+row);
					}
				}
				return arr;
			};
			
			function checkHeaderMetadata(cell) {
				if(($.metadata) && ($(cell).metadata().sorter === false)) { return true; };
				return false;
			}
			
			function checkHeaderOptions(table,i) {	
				if((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; };
				return false;
			}
			
			function applyWidget(table) {
				var c = table.config.widgets;
				var l = c.length;
				for(var i=0; i < l; i++) {
					
					getWidgetById(c[i]).format(table);
				}
				
			}
			
			function getWidgetById(name) {
				var l = widgets.length;
				for(var i=0; i < l; i++) {
					if(widgets[i].id.toLowerCase() == name.toLowerCase() ) {
						return widgets[i]; 
					}
				}
			};
			
			function formatSortingOrder(v) {
				
				if(typeof(v) != "Number") {
					i = (v.toLowerCase() == "desc") ? 1 : 0;
				} else {
					i = (v == (0 || 1)) ? v : 0;
				}
				return i;
			}
			
			function isValueInArray(v, a) {
				var l = a.length;
				for(var i=0; i < l; i++) {
					if(a[i][0] == v) {
						return true;	
					}
				}
				return false;
			}
				
			function setHeadersCss(table,$headers, list, css) {
				// remove all header information
				$headers.removeClass(css[0]).removeClass(css[1]);
				
				var h = [];
				$headers.each(function(offset) {
						if(!this.sortDisabled) {
							h[this.column] = $(this);					
						}
				});
				
				var l = list.length; 
				for(var i=0; i < l; i++) {
					h[list[i][0]].addClass(css[list[i][1]]);
				}
			}
			
			function fixColumnWidth(table,$headers) {
				var c = table.config;
				if(c.widthFixed) {
					var colgroup = $('<colgroup>');
					$("tr:first td",table.tBodies[0]).each(function() {
						colgroup.append($('<col>').css('width',$(this).width()));
					});
					$(table).prepend(colgroup);
				};
			}
			
			function updateHeaderSortCount(table,sortList) {
				var c = table.config, l = sortList.length;
				for(var i=0; i < l; i++) {
					var s = sortList[i], o = c.headerList[s[0]];
					o.count = s[1];
					o.count++;
				}
			}
			
			/* sorting methods */
			function multisort(table,sortList,cache) {
				
				if(table.config.debug) { var sortTime = new Date(); }
				
				var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length;
					
				for(var i=0; i < l; i++) {
					
					var c = sortList[i][0];
					var order = sortList[i][1];
					var s = (getCachedSortType(table.config.parsers,c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc");
					
					var e = "e" + i;
					
					dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); ";
					dynamicExp += "if(" + e + ") { return " + e + "; } ";
					dynamicExp += "else { ";
				}
				
				// if value is the same keep orignal order	
				var orgOrderCol = cache.normalized[0].length - 1;
				dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";
						
				for(var i=0; i < l; i++) {
					dynamicExp += "}; ";
				}
				
				dynamicExp += "return 0; ";	
				dynamicExp += "}; ";	
				
				eval(dynamicExp);
				
				cache.normalized.sort(sortWrapper);
				
				if(table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order+ " time:", sortTime); }
				
				return cache;
			};
			
			function sortText(a,b) {
				return ((a < b) ? -1 : ((a > b) ? 1 : 0));
			};
			
			function sortTextDesc(a,b) {
				return ((b < a) ? -1 : ((b > a) ? 1 : 0));
			};	
			
	 		function sortNumeric(a,b) {
				return a-b;
			};
			
			function sortNumericDesc(a,b) {
				return b-a;
			};
			
			function getCachedSortType(parsers,i) {
				return parsers[i].type;
			};
			
			/* public methods */
			this.construct = function(settings) {

				return this.each(function() {
					
					if(!this.tHead || !this.tBodies) return;
					
					var $this, $document,$headers, cache, config, shiftDown = 0, sortOrder;
					
					this.config = {};
					
					config = $.extend(this.config, $.tablesorter.defaults, settings);
					
					// store common expression for speed					
					$this = $(this);
					
					// build headers
					$headers = buildHeaders(this);
					
					// try to auto detect column type, and store in tables config
					this.config.parsers = buildParserCache(this,$headers);
					
					
					// build the cache for the tbody cells
					cache = buildCache(this);
					
					// get the css class names, could be done else where.
					var sortCSS = [config.cssDesc,config.cssAsc];
					
					// fixate columns if the users supplies the fixedWidth option
					fixColumnWidth(this);
					
					// apply event handling to headers
					// this is to big, perhaps break it out?
					$headers.click(function(e) {
						
						$this.trigger("sortStart");
						
						var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
						
						if(!this.sortDisabled && totalRows > 0) {
							
							
							// store exp, for speed
							var $cell = $(this);
	
							// get current column index
							var i = this.column;
							
							// get current column sort order
							this.order = this.count++ % 2;
							
							// user only whants to sort on one column
							if(!e[config.sortMultiSortKey]) {
								
								// flush the sort list
								config.sortList = [];
								
								if(config.sortForce != null) {
									var a = config.sortForce; 
									for(var j=0; j < a.length; j++) {
										if(a[j][0] != i) {
											config.sortList.push(a[j]);
										}
									}
								}
								
								// add column to sort list
								config.sortList.push([i,this.order]);
							
							// multi column sorting
							} else {
								// the user has clicked on an all ready sortet column.
								if(isValueInArray(i,config.sortList)) {	 
									
									// revers the sorting direction for all tables.
									for(var j=0; j < config.sortList.length; j++) {
										var s = config.sortList[j], o = config.headerList[s[0]];
										if(s[0] == i) {
											o.count = s[1];
											o.count++;
											s[1] = o.count % 2;
										}
									}	
								} else {
									// add column to sort list array
									config.sortList.push([i,this.order]);
								}
							};
							setTimeout(function() {
								//set css for headers
								setHeadersCss($this[0],$headers,config.sortList,sortCSS);
								appendToTable($this[0],multisort($this[0],config.sortList,cache));
							},1);
							// stop normal event by returning false
							return false;
						}
					// cancel selection	
					}).mousedown(function() {
						if(config.cancelSelection) {
							this.onselectstart = function() {return false};
							return false;
						}
					});
					
					// apply easy methods that trigger binded events
					$this.bind("update",function() {
						
						// rebuild parsers.
						this.config.parsers = buildParserCache(this,$headers);
						
						// rebuild the cache map
						cache = buildCache(this);
						
					}).bind("sorton",function(e,list) {
						
						$(this).trigger("sortStart");
						
						config.sortList = list;
						
						// update and store the sortlist
						var sortList = config.sortList;
						
						// update header count index
						updateHeaderSortCount(this,sortList);
						
						//set css for headers
						setHeadersCss(this,$headers,sortList,sortCSS);
						
						
						// sort the table and append it to the dom
						appendToTable(this,multisort(this,sortList,cache));

					}).bind("appendCache",function() {
						
						appendToTable(this,cache);
					
					}).bind("applyWidgetId",function(e,id) {
						
						getWidgetById(id).format(this);
						
					}).bind("applyWidgets",function() {
						// apply widgets
						applyWidget(this);
					});
					
					if($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {
						config.sortList = $(this).metadata().sortlist;
					}
					// if user has supplied a sort list to constructor.
					if(config.sortList.length > 0) {
						$this.trigger("sorton",[config.sortList]);	
					}
					
					// apply widgets
					applyWidget(this);
				});
			};
			
			this.addParser = function(parser) {
				var l = parsers.length, a = true;
				for(var i=0; i < l; i++) {
					if(parsers[i].id.toLowerCase() == parser.id.toLowerCase()) {
						a = false;
					}
				}
				if(a) { parsers.push(parser); };
			};
			
			this.addWidget = function(widget) {
				widgets.push(widget);
			};
			
			this.formatFloat = function(s) {
				var i = parseFloat(s);
				return (isNaN(i)) ? 0 : i;
			};
			this.formatInt = function(s) {
				var i = parseInt(s);
				return (isNaN(i)) ? 0 : i;
			};
			
			this.isDigit = function(s,config) {
				var DECIMAL = '\\' + config.decimal;
				var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL +'0+$)/';
				return RegExp(exp).test($.trim(s));
			};
			
			this.clearTableBody = function(table) {
				if($.browser.msie) {
					function empty() {
						while ( this.firstChild ) this.removeChild( this.firstChild );
					}
					empty.apply(table.tBodies[0]);
				} else {
					table.tBodies[0].innerHTML = "";
				}
			};
		}
	});
	
	// extend plugin scope
	$.fn.extend({
        tablesorter: $.tablesorter.construct
	});
	
	var ts = $.tablesorter;
	
	// add default parsers
	ts.addParser({
		id: "text",
		is: function(s) {
			return true;
		},
		format: function(s) {
			return $.trim(s.toLowerCase());
		},
		type: "text"
	});
	
	ts.addParser({
		id: "digit",
		is: function(s,table) {
			var c = table.config;
			return $.tablesorter.isDigit(s,c);
		},
		format: function(s) {
			return $.tablesorter.formatFloat(s);
		},
		type: "numeric"
	});
	
	ts.addParser({
		id: "currency",
		is: function(s) {
			return /^[&#194;&#163;$&#226;&#8218;&#172;?.]/.test(s);
		},
		format: function(s) {
			return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));
		},
		type: "numeric"
	});
	
	ts.addParser({
		id: "ipAddress",
		is: function(s) {
			return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);
		},
		format: function(s) {
			var a = s.split("."), r = "", l = a.length;
			for(var i = 0; i < l; i++) {
				var item = a[i];
			   	if(item.length == 2) {
					r += "0" + item;
			   	} else {
					r += item;
			   	}
			}
			return $.tablesorter.formatFloat(r);
		},
		type: "numeric"
	});
	
	ts.addParser({
		id: "url",
		is: function(s) {
			return /^(https?|ftp|file):\/\/$/.test(s);
		},
		format: function(s) {
			return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));
		},
		type: "text"
	});
	
	ts.addParser({
		id: "isoDate",
		is: function(s) {
			return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);
		},
		format: function(s) {
			return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g),"/")).getTime() : "0");
		},
		type: "numeric"
	});
		
	ts.addParser({
		id: "percent",
		is: function(s) { 
			return /\%$/.test($.trim(s));
		},
		format: function(s) {
			return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));
		},
		type: "numeric"
	});

	ts.addParser({
		id: "usLongDate",
		is: function(s) {
			return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));
		},
		format: function(s) {
			return $.tablesorter.formatFloat(new Date(s).getTime());
		},
		type: "numeric"
	});

	ts.addParser({
		id: "shortDate",
		is: function(s) {
			return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
		},
		format: function(s,table) {
			var c = table.config;
			s = s.replace(/\-/g,"/");
			if(c.dateFormat == "us") {
				// reformat the string in ISO format
				s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");
			} else if(c.dateFormat == "uk") {
				//reformat the string in ISO format
				s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
			} else if(c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
				s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");	
			}
			return $.tablesorter.formatFloat(new Date(s).getTime());
		},
		type: "numeric"
	});

	ts.addParser({
	    id: "time",
	    is: function(s) {
	        return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);
	    },
	    format: function(s) {
	        return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime());
	    },
	  type: "numeric"
	});
	
	
	ts.addParser({
	    id: "metadata",
	    is: function(s) {
	        return false;
	    },
	    format: function(s,table,cell) {
			var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName;
	        return $(cell).metadata()[p];
	    },
	  type: "numeric"
	});
	
	// add default widgets
	ts.addWidget({
		id: "zebra",
		format: function(table) {
			if(table.config.debug) { var time = new Date(); }
			$("tr:visible",table.tBodies[0])
	        .filter(':even')
	        .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0])
	        .end().filter(':odd')
	        .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);
			if(table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); }
		}
	});	
})(jQuery);
var RESOURCES_PATH;
if(RESOURCES_PATH !== undefined){
	var MACOS_STYLESHEET_REFERENCE   = RESOURCES_PATH + "css/styles-macos.css";
	var SAFARI_STYLESHEET_REFERENCE  = RESOURCES_PATH + "css/styles-safari.css";
}

/********************************************************************/
/* START: browser detection                                         */
var Info = new function() {
	var userAgent = navigator.userAgent.toLowerCase();
	var b = {};
	b.isIE      = userAgent.indexOf("msie") != -1;
	b.isIE7     = b.isIE && (typeof window.XMLHttpRequest != "undefined");
	b.isIEpre7  = b.isIE && !b.isIE7;
	b.isIEpre6  = b.isIE && (!document.compatMode);
	b.isSafari  = userAgent.indexOf("safari") != - 1;
	b.isMozilla = userAgent.indexOf("gecko") != -1 && b.isSafari == false;
	b.isFirefox = b.isMozilla == true && userAgent.indexOf("firefox") != -1;
	b.isOpera   = typeof window.opera != "undefined";
	this.browser = b;
	this.os = {
		isLinux: (navigator.platform.indexOf("Linux") == 0),
		isMac:   (navigator.platform.indexOf("Mac") == 0),
		isWin:   (navigator.platform.indexOf("Win") == 0)
	}
};
/* END: browser detection                                           */
/********************************************************************/
/********************************************************************/
/* START: serve special styles                                      */
if(RESOURCES_PATH !== undefined){
	if (Info.os.isMac)         document.write ("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + MACOS_STYLESHEET_REFERENCE + "\" />");
	if (Info.browser.isSafari) document.write ("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + SAFARI_STYLESHEET_REFERENCE + "\" />");
}

if (Info.os.isLinux) USE_SIFR = false;
/* END: serve special styles                                        */
/********************************************************************/
/********************************************************************/
/* START: Fix Flickering Background Images                          */
if (window.createPopup && document.compatMode && document.compatMode=="CSS1Compat" && !window.XMLHttpRequest) {
	try{
		document.execCommand("BackgroundImageCache", false, true);
	} catch(e) {}
}
/* END: Fix Flickering Background Images                            */
/********************************************************************/
/********************************************************************/
/* START: SWFObject v1.5.1                                          */
/**
 * SWFObject v1.5.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept={};}if(typeof deconcept.util=="undefined"){deconcept.util={};}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={};}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10]||"";},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=[];var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+(this.getAttribute("style")||"")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
/* END: SWFObject v1.5.1                                            */
/********************************************************************/
/********************************************************************/
/* START: flash player detection                                    */

if(typeof Info != "undefined" && typeof deconcept.util != "undefined" && typeof deconcept.SWFObjectUtil != "undefined"){
	var flashVersion = deconcept.SWFObjectUtil.getPlayerVersion(); // SWFObject
	Info.flash = {};
	Info.flash.major = flashVersion.major;
	Info.flash.minor = flashVersion.minor;
	Info.flash.rev = flashVersion.rev;
}

/* END: flash player detection                                      */
/********************************************************************/
/********************************************************************/
/* START: sIFR v2.0.7 and sIFR 2.0.1 Official Add-ons 1.2           */
/*	sIFR v2.0.7
	Copyright 2004 - 2008 Mark Wubben and Mike Davidson. Prior contributions by Shaun Inman and Tomas Jogin.
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.substr(b.indexOf(".")-2,2),10)>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.substr(aj.indexOf(".")-2,2),10)}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||al.getElementsByTagName("body").length==0)return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,'"></param><param name="flashvars" value="',Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

/*	sIFR 2.0.1 Official Add-ons 1.2
	Copyright 2005 Mark Wubben

	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/
if(typeof sIFR=="function")(function(){var j=document;var h=j.documentElement;sIFR.removeDecoyClasses=function(){function a(b){if(b&&b.className!=null)b.className=b.className.replace(/\bsIFR-hasFlash\b/,"")}return function(){a(h);a(j.getElementsByTagName("body")[0])}}();sIFR.preferenceManager={storage:{sCookieId:"sifr",set:function(a){var b=new Date();b.setFullYear(b.getFullYear()+3);j.cookie=[this.sCookieId,"=",a,";expires=",b.toGMTString(),";path=/"].join("")},get:function(){var a=j.cookie.match(new RegExp(";?"+this.sCookieId+"=([^;]+);?"));if(a!=null&&a[1]=="false")return false;else return true},reset:function(){var a=new Date();a.setFullYear(a.getFullYear()-1);j.cookie=[this.sCookieId,"=true;expires=",a.toGMTString(),";path=/"].join("")}},disable:function(){this.storage.set(false)},enable:function(){this.storage.set(true)},test:function(){return this.storage.get()}};if(sIFR.preferenceManager.test()==false){sIFR.bIsDisabled=true;sIFR.removeDecoyClasses()}sIFR.rollback=function(){function a(b){var c,d,e,f,g,h;var l=parseSelector(b);var i=l.length-1;var m=false;while(i>=0){c=l[i];l.length--;d=c.parentNode;if(c.getAttribute("sifr")=="true"){h=0;while(h<d.childNodes.length){c=d.childNodes[h];if(c.className=="sIFR-alternate"){e=c;h++;continue}d.removeChild(c)}if(e!=null){f=e.firstChild;while(f!=null){g=f.nextSibling;d.appendChild(e.removeChild(f));f=g}d.removeChild(e)}if(!sIFR.UA.bIsXML&&sIFR.UA.bUseInnerHTMLHack)d.innerHTML+="";d.className=d.className.replace(/\bsIFR\-replaced\b/,"")};m=true;i--}return m}return function(k){named.extract(arguments,{sSelector:function(a){k=a}});if(k==null)k="";else k+=">";sIFR.removeDecoyClasses();sIFR.bHideBrowserText=false;if(a(k+"embed")==false)a(k+"object")}}()})()

SIFR_IS_POSSIBLE = (typeof sIFR == "function" && !sIFR.UA.bIsIEMac && !sIFR.UA.bIsOpera && (!sIFR.UA.bIsWebKit || sIFR.UA.nWebKitVersion >= 100));

/* END: sIFR v2.0.5 and sIFR 2.0.1 Official Add-ons 1.2             */
/********************************************************************/

_ = {

	countries: [
	{ id: "36", 	title: "&Auml;gypten", 	isocode: "EG", 	mz_id: "7400" },
	{ id: "38", 	title: "&Auml;quatorialguinea", 	isocode: "GQ", 	mz_id: "22100" },
	{ id: "41", 	title: "&Auml;thiopien", 	isocode: "ET", 	mz_id: "21700" },
	{ id: "1", 	title: "Afghanistan", 	isocode: "AF", 	mz_id: "20000" },
	{ id: "2", 	title: "Albanien", 	isocode: "AL", 	mz_id: "20100" },
	{ id: "3", 	title: "Algerien", 	isocode: "DZ", 	mz_id: "7700" },
	{ id: "141", 	title: "Angola", 	isocode: "AO", 	mz_id: "20200" },
	{ id: "119", 	title: "Arabische Republik Syrien", 	isocode: "SY", 	mz_id: "9500" },
	{ id: "4", 	title: "Argentinien", 	isocode: "AR", 	mz_id: "2800" },
	{ id: "5", 	title: "Armenien", 	isocode: "AM", 	mz_id: "20300" },
	{ id: "8", 	title: "Aserbaidschan", 	isocode: "AZ", 	mz_id: "20400" },
	{ id: "6", 	title: "Australien", 	isocode: "AU", 	mz_id: "5200" },
	{ id: "9", 	title: "Bahrain", 	isocode: "BH", 	mz_id: "7900" },
	{ id: "142", 	title: "Bangladesch", 	isocode: "BD", 	mz_id: "6500" },
	{ id: "11", 	title: "Belgien", 	isocode: "BE", 	mz_id: "200" },
	{ id: "12", 	title: "Benin", 	isocode: "BJ", 	mz_id: "" },
	{ id: "143", 	title: "Bermuda", 	isocode: "BM", 	mz_id: "8000" },
	{ id: "144", 	title: "Bhutan", 	isocode: "BT", 	mz_id: "20500" },
	{ id: "168", 	title: "Bolivien", 	isocode: "null", 	mz_id: "20600" },
	{ id: "13", 	title: "Bosnien & Herzegowina", 	isocode: "BA", 	mz_id: "10600" },
	{ id: "145", 	title: "Botsuana", 	isocode: "BW", 	mz_id: "20700" },
	{ id: "14", 	title: "Brasilien", 	isocode: "BR", 	mz_id: "2900" },
	{ id: "15", 	title: "Bulgarien", 	isocode: "BG", 	mz_id: "400" },
	{ id: "16", 	title: "Burkina Faso", 	isocode: "BF", 	mz_id: "20800" },
	{ id: "146", 	title: "Burundi", 	isocode: "BI", 	mz_id: "" },
	{ id: "23", 	title: "Chile", 	isocode: "CL", 	mz_id: "3000" },
	{ id: "24", 	title: "China", 	isocode: "CN", 	mz_id: "3900" },
	{ id: "27", 	title: "Costa Rica", 	isocode: "CR", 	mz_id: "7600" },
	{ id: "33", 	title: "D&auml;nemark", 	isocode: "DK", 	mz_id: "600" },
	{ id: "156", 	title: "Demokratische Volksrepublik Laos", 	isocode: "LA", 	mz_id: "" },
	{ id: "48", 	title: "Deutschland", 	isocode: "DE", 	mz_id: "1000" },
	{ id: "101", 	title: "Dominikanische Republik", 	isocode: "DO", 	mz_id: "8100" },
	{ id: "34", 	title: "Dschibuti", 	isocode: "DJ", 	mz_id: "" },
	{ id: "35", 	title: "Ecuador", 	isocode: "EC", 	mz_id: "3200" },
	{ id: "37", 	title: "El Salvador", 	isocode: "SV", 	mz_id: "8200" },
	{ id: "39", 	title: "Eritrea", 	isocode: "ER", 	mz_id: "21600" },
	{ id: "40", 	title: "Estland", 	isocode: "EE", 	mz_id: "700" },
	{ id: "42", 	title: "Finnland", 	isocode: "FI", 	mz_id: "800" },
	{ id: "43", 	title: "Frankreich", 	isocode: "FR", 	mz_id: "900" },
	{ id: "45", 	title: "Gabun", 	isocode: "GA", 	mz_id: "21800" },
	{ id: "46", 	title: "Gambia", 	isocode: "GM", 	mz_id: "" },
	{ id: "47", 	title: "Georgien", 	isocode: "GE", 	mz_id: "21900" },
	{ id: "49", 	title: "Ghana", 	isocode: "GH", 	mz_id: "22000" },
	{ id: "50", 	title: "Griechenland", 	isocode: "GR", 	mz_id: "1100" },
	{ id: "131", 	title: "Grossbritannien", 	isocode: "GB", 	mz_id: "2500" },
	{ id: "51", 	title: "Guatemala", 	isocode: "GT", 	mz_id: "3300" },
	{ id: "52", 	title: "Guinea", 	isocode: "GN", 	mz_id: "22100" },
	{ id: "155", 	title: "Guinea-Bissau", 	isocode: "GW", 	mz_id: "" },
	{ id: "86", 	title: "Holland", 	isocode: "NL", 	mz_id: "1500" },
	{ id: "53", 	title: "Honduras", 	isocode: "HN", 	mz_id: "8300" },
	{ id: "56", 	title: "Indien", 	isocode: "IN", 	mz_id: "4100" },
	{ id: "57", 	title: "Indonesien", 	isocode: "ID", 	mz_id: "4200" },
	{ id: "59", 	title: "Irak", 	isocode: "IQ", 	mz_id: "8400" },
	{ id: "58", 	title: "Iran", 	isocode: "IR", 	mz_id: "22200" },
	{ id: "60", 	title: "Irland", 	isocode: "IE", 	mz_id: "1300" },
	{ id: "61", 	title: "Israel", 	isocode: "IL", 	mz_id: "6600" },
	{ id: "62", 	title: "Italien", 	isocode: "IT", 	mz_id: "1400" },
	{ id: "63", 	title: "Jamaika", 	isocode: "JM", 	mz_id: "22300" },
	{ id: "64", 	title: "Japan", 	isocode: "JP", 	mz_id: "4300" },
	{ id: "138", 	title: "Jemen", 	isocode: "YE", 	mz_id: "11200" },
	{ id: "65", 	title: "Jordanien", 	isocode: "JO", 	mz_id: "6700" },
	{ id: "153", 	title: "Kambodscha", 	isocode: "KH", 	mz_id: "20900" },
	{ id: "17", 	title: "Kamerun", 	isocode: "CM", 	mz_id: "21000" },
	{ id: "18", 	title: "Kanada", 	isocode: "CA", 	mz_id: "2600" },
	{ id: "19", 	title: "Kap Verde", 	isocode: "CV", 	mz_id: "" },
	{ id: "20", 	title: "Karibik", 	isocode: "null", 	mz_id: "9100" },
	{ id: "67", 	title: "Kasachstan", 	isocode: "KZ", 	mz_id: "22400" },
	{ id: "100", 	title: "Katar", 	isocode: "QA", 	mz_id: "8500" },
	{ id: "66", 	title: "Kenia", 	isocode: "KE", 	mz_id: "7800" },
	{ id: "69", 	title: "Kirgisistan", 	isocode: "KG", 	mz_id: "22500" },
	{ id: "25", 	title: "Kolumbien", 	isocode: "CO", 	mz_id: "3100" },
	{ id: "154", 	title: "Komoren", 	isocode: "KM", 	mz_id: "" },
	{ id: "26", 	title: "Kongo", 	isocode: "CG", 	mz_id: "21300" },
	{ id: "167", 	title: "Kosovo", 	isocode: "null", 	mz_id: "10800" },
	{ id: "29", 	title: "Kroatien", 	isocode: "HR", 	mz_id: "5600" },
	{ id: "68", 	title: "Kuwait", 	isocode: "KW", 	mz_id: "8600" },
	{ id: "157", 	title: "Lesotho", 	isocode: "LS", 	mz_id: "22600" },
	{ id: "70", 	title: "Lettland", 	isocode: "LV", 	mz_id: "5800" },
	{ id: "72", 	title: "Liberia", 	isocode: "LR", 	mz_id: "22700" },
	{ id: "73", 	title: "Libysch-Arabische Dschamahirija", 	isocode: "LY", 	mz_id: "8700" },
	{ id: "74", 	title: "Litauen", 	isocode: "LT", 	mz_id: "5900" },
	{ id: "158", 	title: "Madagaskar", 	isocode: "MG", 	mz_id: "22900" },
	{ id: "152", 	title: "Malawi", 	isocode: "MW", 	mz_id: "23000" },
	{ id: "77", 	title: "Malaysia", 	isocode: "MY", 	mz_id: "4400" },
	{ id: "78", 	title: "Malediven", 	isocode: "MV", 	mz_id: "" },
	{ id: "79", 	title: "Mali", 	isocode: "ML", 	mz_id: "23100" },
	{ id: "81", 	title: "Marokko", 	isocode: "MA", 	mz_id: "7500" },
	{ id: "82", 	title: "Mauretanien", 	isocode: "MR", 	mz_id: "23300" },
	{ id: "76", 	title: "Mazedonien", 	isocode: "MK", 	mz_id: "6000" },
	{ id: "83", 	title: "Mexiko", 	isocode: "MX", 	mz_id: "3400" },
	{ id: "85", 	title: "Mongolei", 	isocode: "MN", 	mz_id: "" },
	{ id: "166", 	title: "Montenegro", 	isocode: "null", 	mz_id: "11000" },
	{ id: "159", 	title: "Myanmar", 	isocode: "null", 	mz_id: "10700" },
	{ id: "160", 	title: "Namibia", 	isocode: "NA", 	mz_id: "23600" },
	{ id: "87", 	title: "Neuseeland", 	isocode: "NZ", 	mz_id: "5300" },
	{ id: "148", 	title: "Nicaragua", 	isocode: "NI", 	mz_id: "8900" },
	{ id: "88", 	title: "Niger", 	isocode: "NE", 	mz_id: "23700" },
	{ id: "89", 	title: "Nigeria", 	isocode: "NG", 	mz_id: "23800" },
	{ id: "90", 	title: "Norwegen", 	isocode: "NO", 	mz_id: "1600" },
	{ id: "7", 	title: "Oesterreich", 	isocode: "AT", 	mz_id: "100" },
	{ id: "91", 	title: "Oman", 	isocode: "OM", 	mz_id: "9000" },
	{ id: "92", 	title: "Pakistan", 	isocode: "PK", 	mz_id: "4500" },
	{ id: "93", 	title: "Pal&auml;stinische Gebiete", 	isocode: "PS", 	mz_id: "23900" },
	{ id: "94", 	title: "Panam&#225;", 	isocode: "PA", 	mz_id: "9100" },
	{ id: "169", 	title: "Paraguay", 	isocode: "PY", 	mz_id: "24000" },
	{ id: "95", 	title: "Peru", 	isocode: "PE", 	mz_id: "3600" },
	{ id: "96", 	title: "Philippinen", 	isocode: "PH", 	mz_id: "4600" },
	{ id: "97", 	title: "Polen", 	isocode: "PL", 	mz_id: "1700" },
	{ id: "98", 	title: "Portugal", 	isocode: "PT", 	mz_id: "1800" },
	{ id: "99", 	title: "Puerto Rico", 	isocode: "PR", 	mz_id: "24100" },
	{ id: "161", 	title: "Ruanda", 	isocode: "RW", 	mz_id: "" },
	{ id: "102", 	title: "Rum&auml;nien", 	isocode: "RO", 	mz_id: "9200" },
	{ id: "103", 	title: "Russland", 	isocode: "RU", 	mz_id: "1900" },
	{ id: "162", 	title: "S&#227;o Tom&#233; und Pr&#237;ncipe", 	isocode: "ST ", 	mz_id: "" },
	{ id: "113", 	title: "S&uuml;dafrika", 	isocode: "ZA", 	mz_id: "5400" },
	{ id: "114", 	title: "S&uuml;dkorea", 	isocode: "null", 	mz_id: "4800" },
	{ id: "165", 	title: "Sambia", 	isocode: "ZM", 	mz_id: "25300" },
	{ id: "104", 	title: "Saudi-Arabien", 	isocode: "SA", 	mz_id: "7000" },
	{ id: "117", 	title: "Schweden", 	isocode: "SE", 	mz_id: "2200" },
	{ id: "118", 	title: "Schweiz", 	isocode: "CH", 	mz_id: "2300" },
	{ id: "105", 	title: "Senegal", 	isocode: "SN", 	mz_id: "24200" },
	{ id: "106", 	title: "Serbien", 	isocode: "RS", 	mz_id: "11100" },
	{ id: "107", 	title: "Seychellen", 	isocode: "SC", 	mz_id: "" },
	{ id: "108", 	title: "Sierra Leone", 	isocode: "SL", 	mz_id: "" },
	{ id: "149", 	title: "Simbabwe", 	isocode: "ZW", 	mz_id: "25400" },
	{ id: "109", 	title: "Singapur", 	isocode: "SG", 	mz_id: "4700" },
	{ id: "110", 	title: "Slovakei", 	isocode: "SK", 	mz_id: "2000" },
	{ id: "111", 	title: "Slowenien", 	isocode: "SI", 	mz_id: "6200" },
	{ id: "112", 	title: "Somalia", 	isocode: "SO", 	mz_id: "24300" },
	{ id: "115", 	title: "Spanien", 	isocode: "ES", 	mz_id: "2100" },
	{ id: "151", 	title: "Sri Lanka", 	isocode: "LK", 	mz_id: "24400" },
	{ id: "116", 	title: "Sudan", 	isocode: "SD", 	mz_id: "24500" },
	{ id: "163", 	title: "Swasiland", 	isocode: "SZ", 	mz_id: "24600" },
	{ id: "126", 	title: "T&uuml;rkei", 	isocode: "TR", 	mz_id: "2400" },
	{ id: "121", 	title: "Tadschikistan", 	isocode: "TJ", 	mz_id: "24700" },
	{ id: "120", 	title: "Taiwan", 	isocode: "TW", 	mz_id: "4900" },
	{ id: "122", 	title: "Thailand", 	isocode: "TH", 	mz_id: "5000" },
	{ id: "123", 	title: "Togo", 	isocode: "TG", 	mz_id: "" },
	{ id: "22", 	title: "Tschad", 	isocode: "TD", 	mz_id: "21200" },
	{ id: "32", 	title: "Tschechische Republik", 	isocode: "CZ", 	mz_id: "500" },
	{ id: "125", 	title: "Tunesien", 	isocode: "TN", 	mz_id: "9600" },
	{ id: "127", 	title: "Turkmenistan", 	isocode: "TM", 	mz_id: "24900" },
	{ id: "128", 	title: "Uganda", 	isocode: "UG", 	mz_id: "25000" },
	{ id: "129", 	title: "Ukraine", 	isocode: "UA", 	mz_id: "9700" },
	{ id: "55", 	title: "Ungarn", 	isocode: "HU", 	mz_id: "1200" },
	{ id: "132", 	title: "Uruguay", 	isocode: "UY", 	mz_id: "3700" },
	{ id: "134", 	title: "Usbekistan", 	isocode: "UZ", 	mz_id: "25100" },
	{ id: "135", 	title: "Venezuela", 	isocode: "VE", 	mz_id: "3800" },
	{ id: "130", 	title: "Vereinigte Arabische Emirate", 	isocode: "AE", 	mz_id: "7200" },
	{ id: "164", 	title: "Vereinigte Republik Tansania", 	isocode: "TZ", 	mz_id: "24800" },
	{ id: "133", 	title: "Vereinigte Staaten von Amerika", 	isocode: "US", 	mz_id: "2700" },
	{ id: "136", 	title: "Vietnam", 	isocode: "VN", 	mz_id: "9800" },
	{ id: "10", 	title: "Weissrussland", 	isocode: "BY", 	mz_id: "" },
	{ id: "137", 	title: "Westsahara", 	isocode: "EH", 	mz_id: "25200" },
	{ id: "21", 	title: "Zentralafrikanische Republik", 	isocode: "CF", 	mz_id: "21100" }],

	lang: "en",

	pageTools: {
		bookmark: "Bookmark",
		delicious: "del.icio.us",
		digg: "digg",
		print: "Print"
	},

	rating: {
		error: "An error occured.",
		success: "Your rating was successful."
	},

	thickbox: {
		close: "Close window",
		next: "Next",
		prev: "Prev",
		image: "Image",
		of: "of"
	}
};



var USE_SIFR = true;

var SIFR_IMAGO_PATH              = RESOURCES_PATH + "sifr/dev_imago.swf";
var SIFR_MINION_ITALIC_PATH      = RESOURCES_PATH + "sifr/dev_minion_italic.swf";
var SIFR_MINION_BOLD_ITALIC_PATH = RESOURCES_PATH + "sifr/dev_minion_bold_italic.swf";

var PAGETOOLS_HTML = '\
<ul id="page-tools" class="clearfix">\
\
<dl class="toolzonecontrols">\
	<dt class="doNotOpen first"><a href="javascript: Tools.print();" id="page-tool-print">' + _.pageTools.print + '</a></dt>\
	<dd></dd>\
	\
	<dt><a href="" onclick="return false;" class="page-tool-bookmark">Bookmark</a></dt>\
	<dd>\
		<div>\
			<div id="localBookmarkLink" style="margin-bottom:15px; padding-bottom:15px; clear:both;">\
				<a href="javascript: Tools.bookmark();" id="page-tool-bookmark" alt="Favorits in the Browser" title="Favorits in the Browser">Lesezeichen hinzuf&#252;gen</a>\
			</div>\
			<div style="margin-bottom:5px; padding-bottom:5px; clear:both;">\
				speichere oder publiziere auf:\
			</div>\
			\
<div class="column first-column">\
		<a href="http://www.google.com/bookmarks/mark" onclick="window.open(\'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=' +encodeURIComponent(location.href) + '&amp;title=' + encodeURIComponent(document.title) + '\');saveBookmark(\'http://www.google.com/bookmarks/mark\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-google.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="bookmark this Page in Google" title="bookmark this Page in Google">Google</a>\
</div>\
\
<div class="column">\
		<a href="http://del.icio.us/post" onclick="window.open(\'http://del.icio.us/post?v=2&amp;url=' +encodeURIComponent(location.href) + '&amp;notes=Roche&amp;tags=Roche&amp;title=' + encodeURIComponent(document.title) + '\');saveBookmark(\'http://del.icio.us/post\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-delicious.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="share this Page in delicious" title="share this Page in delicious">delicious</a>\
</div>\
\
<div class="column first-column">\
		<a href="http://digg.com/submit" onclick="window.open(\'http://digg.com/submit?phase=2&amp;url=' +encodeURIComponent(location.href) + '&amp;bodytext=Roche&amp;tags=Roche&amp;title=' + encodeURIComponent(document.title) + '\');saveBookmark(\'http://digg.com/submit\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-digg.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="share this Page in digg" title="share this Page in digg">digg</a>\
</div>\
\
<div class="column">\
		<a href="http://www.facebook.com/share.php" onclick="window.open(\'http://www.facebook.com/share.php?u=' +encodeURIComponent(location.href) + '&amp;t=' + encodeURIComponent(document.title) + '\');saveBookmark(\'http://www.facebook.com/share.php\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-facebook.png) no-repeat scroll 0 1px; padding-left:19px;" alt="publihs this Page in facebook" title="publihs this Page in facebook">Facebook</a>\
</div>\
\
<div class="column first-column">\
		<a href="http://reddit.com/submit" onclick="window.open(\'http://reddit.com/submit?url=' +encodeURIComponent(location.href) + '&amp;title=' + encodeURIComponent(document.title) + '\');saveBookmark(\'http://reddit.com/submit\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-reddit.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="share thsi page in reddit" title="share thsi page in reddit">ReddIt</a>\
</div>\
\
<div class="column">\
		<a href="http://www.stumbleupon.com/submit" onclick="window.open(\'http://www.stumbleupon.com/submit?url=' +encodeURIComponent(location.href) + '&amp;title=' + encodeURIComponent(document.title) + '\');saveBookmark(\'http://www.stumbleupon.com/submit\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-stumbleupon.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="share this page in stumbleupon" title="share this page in stumbleupon">StumbleUpon</a>\
</div>\
\
<div class="column first-column">\
		<a href="http://www.mister-wong.de/index.php" onclick="window.open(\'http://www.mister-wong.de/index.php?action=addurl&amp;bm_url=' +encodeURIComponent(location.href) + '&amp;bm_notice=Roche&amp;bm_description=' + encodeURIComponent(document.title) + '&amp;bm_tags=Roche\');saveBookmark(\'http://www.mister-wong.de/index.php\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-wong.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="share this page in Mister Wong" title="share this page in Mister Wong">Mister Wong</a>\
</div>\
\
<div class="column">\
		<a href="http://twitthis.com/twit" onclick="window.open(\'http://twitthis.com/twit?url=' +encodeURIComponent(location.href) + '\');saveBookmark(\'http://twitthis.com/twit\', \'' + encodeURIComponent(location.href) + '\', \'' + encodeURIComponent(location.title) + '\'); return false") style="background:transparent url(icon-twitter.gif) no-repeat scroll 0 1px; padding-left:19px;" alt="publish this Page in Twitter" title="publish this Page in Twitter">Twitter</a>\
</div>\
\
		</div>\
	</dd>\
	\
';

try{
	//old Pages ....
	if (SHOW_RATE == "true") {
		PAGETOOLS_HTML += '\
	<dt><a href="" onclick="return false;" class="icon-rate">Bewerten</a></dt>\
	<dd>\
		<div id="rate_wrapper" class="post-ratings" style="opacity: 1;">\
			<div id="rate_star_wrapper">\
				<div style="float:left;">\
					Bitte bewerten Sie diese Seite:\
				</div>\
				<div style="float:right;">\
					<!--<input name="star1" type="radio" class="star" title="1 Star" value="B163CFB1F3D5E1E4410A4980D8334957DC85CF127AD5554AB1BCD923367422150CD73E08FA0C3D064CCE93A58F7E9EAD"/> ... geht in IE6 nicht ???-->\
					<input name="star1" type="radio" class="star" title="1 Stern" value="1"/>\
					<input name="star1" type="radio" class="star" title="2 Sterne" value="2"/>\
					<input name="star1" type="radio" class="star" title="3 Sterne" value="3"/>\
					<input name="star1" type="radio" class="star" title="4 Sterne" value="4"/>\
					<input name="star1" type="radio" class="star" title="5 Sterne" value="5"/>\
				</div>\
			</div>\
			<div style="clear:both"></div><!-- f&#252;r IE 6 -->\
			\
			<div id="rate-comment" style="display:none">\
				<div id="rate_comment_wrapper">\
					<!-- hidden field with rowid written by ajax after rating ... -->\
					Weitere Kommentare zu dieser Seite <br /><textarea id="rate_comment" name="rate_comment" style="width:300px; height: 80px; border: 1px solid #ccc; margin-bottom: 6px;"></textarea>\
					<div class="button"><div><button type="submit" onclick="submitComment(); return false;">Absenden</button></div></div>\
				</div>\
			</div>\
		</div>\
	</dd>'
	}
} catch (e) { };

PAGETOOLS_HTML += '\
</dl>\
</ul><br />\
';	

var TEXTRESIZE_HTML = '\
<div id="text-resize">\
	<span id="increase-font"></span>\
	<span id="text-resize-caption" style="background-image: url(_resources/img/' + _.lang + '/text-size.gif); width: 47px; "></span>\
	<span id="decrease-font"></span>\
</div>';

// navigation parameters
var ACTIVE_ENTRY_ID;
ACTIVE_ENTRY_ID = ACTIVE_ENTRY_ID !== undefined ? ACTIVE_ENTRY_ID : null; // set to default

var USE_UNICODE;
USE_UNICODE = USE_UNICODE !== undefined ? USE_UNICODE : false; // set to default
if(USE_UNICODE) USE_SIFR = false; // no sifr when using unicode charsets
 
var NAV_XML_PATH;
NAV_XML_PATH = NAV_XML_PATH !== undefined ? NAV_XML_PATH : null; // set to default

/********************************************************************/
/* START: initalization                                             */

if(SIFR_IS_POSSIBLE && USE_SIFR) {
	sIFR.setup();
};

$(document).ready(function() {

	// show text resize tool (including init sIFR)

	$("div#generic-nav-zone.use-text-resize").append(TEXTRESIZE_HTML);
	var textSizeManager = new TextSizeManager("span#decrease-font", "span#increase-font");

	// init flash navigation

	initNavigation();

	// cancle further initalisation for IE<6

	if (Info.browser.isIEpre6) {
		return;
	}

	// add min-width and max-width to IE<7

	var layoutManager = new LayoutManager;

	if (Info.browser.isIEpre7) {
		layoutManager.register(
			function() {
				LayoutManager.setMinMaxWidth("div#main-wrapper", 965, 1026);
				LayoutManager.setMinMaxWidth("div#main-zone", 965, 1024);
				LayoutManager.setMinMaxWidth("div#footer-zone", 965, 1024);
			}
		);
	}

	// show page tools

	$("div#tool-zone div.use-page-tools").prepend(PAGETOOLS_HTML);
	$("div#page-tool-zone div.use-page-tools").prepend(PAGETOOLS_HTML);

	if (!Tools.isBookmarkable()) {
		$("ul#page-tools li:eq(1)").css("display", "none"); // hide bookmark link
	}

	// measure footer height and correct manual set footer styles

	LayoutManager.repositionFooter();

	// init rating

	$("div#rating a").click(function() {
		RatingManager.clickHandler(this);
	});

	// layer (location selector and site map)

	var layerController = LayerController.getInstance();

	if ($("a#location-selector-handle").length) {
		var locationSelector = new LocationSelector;
		layerController.register(locationSelector);
		locationSelector.toggleWith("a#location-selector-handle");
	}

	if ($("a#sitemap-handle").length) {
		var siteMap = new SiteMap;
		layerController.register(siteMap);
		siteMap.toggleWith("a#sitemap-handle");
	} else if ($("div#sitemap").length) {
		// toggles easy sitemap
		$("div#sitemap dl .toggle").click(function(event) {
			if(event.target.tagName == "A" && event.target != this){ //execute link
				window.location.href = event.target.href;
				return;
			}
			$(this).parents("dl:first").toggleClass("collapsed").toggleClass("expanded");
		});
	}

	// page specific initalization. <body id="body-foo-page">: PageSpecificInit.foo() will be called.

	var pageId = ($("body").attr("id")) ? $("body").attr("id").replace(/^body-(.+)-page$/, "$1") : "";
	if (PageSpecificInit[pageId]) {
		PageSpecificInit[pageId].call();
	}
	
	$("dl#product-list").productList();
	
	$("div#productfinder").productfinder();
	
	if($(".interactive-image").length && typeof InteractiveImage == "function")
		new InteractiveImage(".interactive-image");

});

/* END: initalization                                               */
/********************************************************************/
/* START: sifr                                                      */

var SifrManager = {

	painted: false,

	paint: function(cSelector) {
		if(!SIFR_IS_POSSIBLE || !USE_SIFR) return false;
		if (SifrManager.painted) {
			if(cSelector){
				sIFR.rollback(named({sSelector:cSelector+" *"}));
			}else{
				sIFR.rollback();
			}
		}
		
		
		// stage inverted
		sIFR.replaceElement(named({
			sSelector: 	".inverted #stage-flash h1",
			sFlashSrc: 	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	".inverted #stage-flash div.h2-overline h2",
			sFlashSrc:	SIFR_IMAGO_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	".inverted #stage-flash div.h2 h2",
			sFlashSrc:	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	".inverted #stage-flash div.link a span",
			sFlashSrc:	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));		
		
		// stage
		sIFR.replaceElement(named({
			sSelector: 	"#stage-flash h1",
			sFlashSrc: 	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#333333",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	"#stage-flash div.h2-overline h2",
			sFlashSrc:	SIFR_IMAGO_PATH,
			sColor:		"#333333",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	"#stage-flash div.h2 h2",
			sFlashSrc:	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#333333",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	"#stage-flash div.link a span",
			sFlashSrc:	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#0066CC",
			sWmode:		"transparent"
		}));				
		
		// media stage		
		sIFR.replaceElement(named({
			sSelector: 	".inverted h1",
			sFlashSrc: 	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	".inverted div.h2-overline h2",
			sFlashSrc:	SIFR_IMAGO_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));
		sIFR.replaceElement(named({
			sSelector:	".inverted div.h2 h2",
			sFlashSrc:	SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:		"#ffffff",
			sWmode:		"transparent"
		}));
		
		sIFR.replaceElement(named(
			{sSelector: "div#content-zone h1",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor: ($("body#body-error-page").length) ? "#cc0033" : "#333333",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.h2-overline h2" : "div#content-zone div.h2-overline h2",
			sFlashSrc: SIFR_IMAGO_PATH,
			sColor: "#333333",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: "div#related-links div.h2 h2",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#cc0033",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.h2 h2" : "div.column div.h2 h2",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.big-quote p.quote" : "div.column div.big-quote p.quote",
			sFlashSrc: SIFR_MINION_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.medium-quote p.quote" : "div.column div.medium-quote p.quote",
			sFlashSrc: SIFR_MINION_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.small-quote p.quote" : "div.column div.small-quote p.quote",
			sFlashSrc: SIFR_MINION_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.small-quote-alternative-style p.quote" : "div.column div.small-quote-alternative-style p.quote",
			sFlashSrc: SIFR_MINION_ITALIC_PATH,
			sColor:"#333333",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.big-quote p.cite" : "div.column div.big-quote p.cite",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.medium-quote p.cite" : "div.column div.medium-quote p.cite",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.small-quote p.cite" : "div.column div.small-quote p.cite",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent",
			sFlashVars:"offsetTop=-1"}
		));
		sIFR.replaceElement(named(
			{sSelector: cSelector ? cSelector+" div.small-quote-alternative-style p.cite" : "div.column div.small-quote-alternative-style p.cite",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#333333",
			sWmode:"transparent",
			sFlashVars:"offsetTop=-1"}
		));
		sIFR.replaceElement(named(
			{sSelector:"div#productfinder div.h2 h2",
			sFlashSrc: SIFR_MINION_BOLD_ITALIC_PATH,
			sColor:"#666666",
			sWmode:"transparent"}
		));

		SifrManager.painted = true;
	}
};

/* END: sifr                                                        */
/********************************************************************/
/* START: common layout                                             */

var LayoutManager = function() {};

$.extend(LayoutManager.prototype, {

	register: function(fn) {
		fn.call();
		$(window).resize(fn);
	}
});

$.extend(LayoutManager, {

	repositionFooter: function() {
		var footerConstant = ($("div#footer").height() + 47) + "px";
		$("div#footer-zone").css({height: footerConstant, marginTop: "-" + footerConstant});
		$("div#main-zone").css("paddingBottom", footerConstant);
	},

	setMinMaxWidth: function(selector, minWidth, maxWidth) {
		var stylesheet = IEStylesheet.getImportedStylesheet("import/specific-ie.css");
		if (stylesheet) {
			var rule = IEStylesheet.getRuleBySelector(stylesheet, "html " + selector);
			if (rule) {
				rule.style.width = Utilities.minMax($(window).width(), minWidth, maxWidth) + "px";
			}
		}
	}

});

/* END: common layout                                               */
/********************************************************************/
/* START: text resizing                                             */

var TextSizeManager = function(decreaseNodeSelector, increaseNodeSelector) {
	this.decreaseJqo = $(decreaseNodeSelector);
	this.increaseJqo = $(increaseNodeSelector);
	this.init();
};

$.extend(TextSizeManager.prototype, {

	fontsize: null,

	init: function() {
		this.getFontsize();
		this.setFontsize();

		var _this = this;

		this.decreaseJqo.click(function() {
			if (_this.fontsize > 1) {
				_this.fontsize--;
				_this.setFontsize();
			}
		});
		this.increaseJqo.click(function() {
			if (_this.fontsize < 3) {
				_this.fontsize++;
				_this.setFontsize();
			}
		});

	},

	getFontsize: function() {
		this.fontsize = Cookie.get("fontsize");
		if (!/^[123]$/.test(this.fontsize)) {
			this.fontsize = 1;
		}
	},

	setFontsize: function() {
		var mainWrapper = $("div#main-wrapper");
		var _this = this;
		$.each({1: "text-size-m", 2: "text-size-l", 3: "text-size-xl"}, function(key, className) {
			if (key == _this.fontsize) {
				mainWrapper.addClass(className);
			} else {
				mainWrapper.removeClass(className);
			}
		});

		if (this.fontsize == 1) {
			this.decreaseJqo.removeClass("active");
		} else {
			this.decreaseJqo.addClass("active");
		}
		if (this.fontsize == 3) {
			this.increaseJqo.removeClass("active");
		} else {
			this.increaseJqo.addClass("active");
		}

		SifrManager.paint();
		LayoutManager.repositionFooter();

		Cookie.set("fontsize", this.fontsize, 365);
	}

});

/* END:   text resizing                                             */
/********************************************************************/
/* START: rating                                                    */

var RatingManager = function() {};

$.extend(RatingManager, {

	clickHandler: function(obj) {
		grade = parseInt(obj.id.match(/[1-6]$/));
		RatingManager.rate(grade);
	},

	displayFeedback: function(msg, grade, error) { // protected
		$("div#rating p").remove(".error").remove(".success");
		var className = (error) ? "error" : "success";
		$("div#rating p").eq(0).after("<p class=\"" + className + "\">" + msg + "</p>");
		$("div#rating a").each(
			function(dummy, item) {
				var itemGrade = parseInt(item.id.match(/[1-6]$/));
				var background = (itemGrade > grade) ? "#bababa" : "#06c";
				$(item).css("background", background);
			}
		);
	},

	displayError: function(msg) {
		RatingManager.displayFeedback(msg, -1, true);
	},

	displaySuccess: function(msg, grade) {
		RatingManager.displayFeedback(msg, grade, false);
	}

});

/* END: rating                                                      */
/********************************************************************/
/* START: KeyEventManager                                           */

var KeyEventManager = function() {
	this.handlers = [];
	var _this = this;

	$("html").keydown(function(e) {
		var keyCode = (e) ? e.which : event.keyCode;
		if( (keyCode < 37 || keyCode > 40) && keyCode != 32 ) return; //only handle arrow keys and space bar
		var preventDefault = _this.handleKeyup(keyCode);
		if(preventDefault){
			e.preventDefault();
			return false;
		} else {
			return true;
		}
	});
	
	$("html").keyup(function(e) {
		var keyCode = (e) ? e.which : event.keyCode;
		if( (keyCode >= 37 && keyCode <= 40) || keyCode == 32 ) return; //do not handle arrow keys and space bar
		var preventDefault = _this.handleKeyup(keyCode);
		if(preventDefault){
			e.preventDefault();
			return false;
		} else {
			return true;
		}
	});
};

KeyEventManager.getInstance = function() {
	this.instance = this.instance || new this;
	return this.instance;
};

$.extend(KeyEventManager.prototype, {

	handleKeyup: function(keyCode) {
		var preventDefault = false;
		for (i = 0; i < this.handlers.length; i++){
			preventDefault = preventDefault || this.handlers[i].callback.call(this.handlers[i].obj, keyCode);
		}
		return preventDefault;
	},

	register: function(handlerObj, callbackFunc) {
		if(!handlerObj) return false;
		if(!callbackFunc && typeof callbackFunc != "function") return false;
		for (i = 0; i < this.handlers.length; i++){
			if(this.handlers[i].obj == handlerObj){
				this.handlers[i].callback = callbackFunc;
				return;
			}
		}
		this.handlers.push({obj: handlerObj, callback: callbackFunc});
	},

	unregister: function(handlerObj) {
		if(!handlerObj) return false;
		for (i = 0; i < this.handlers.length; i++){
			if(this.handlers[i].obj == handlerObj){
				this.handlers.splice(i, 1);
				break;
			}
		}
	}
});

/* END: KeyEventManager                                             */
/********************************************************************/
/* START: KeyScrollable                                             */

var KeyScrollable = function() {
	this.initKeyScrolling();
};

$.extend(KeyScrollable.prototype, {
	initKeyScrolling: function(selectors) {
	
		var defaultSelectors = {
			selectList: 'div.keyScrollable',
			mask: 'div.scrollableMask',
			slider: 'div.slider'
		};
		
		this.selectors = $.extend(defaultSelectors, selectors);
	},

	onOpen: function(){
		if(KeyEventManager) var keyEventManager = KeyEventManager.getInstance();
		else return;
		keyEventManager.register(this, this.onKeyPressed);
	},
	
	onClose: function(){
		$(this.selectors.selectList + " li.selected:first").removeClass("selected");
		var $curContent = this.currentContent || $(this.selectors.selectList);
		var $curSlider = $(this.selectors.slider+":visible", $curContent);
		$curSlider.slider("moveTo", 0);
		if(KeyEventManager) var keyEventManager = KeyEventManager.getInstance();
		else return;
		keyEventManager.unregister(this);
	},
	
	onKeyPressed: function (keyCode){
		var $curContent = this.currentContent || $(this.selectors.selectList);
		var $curSlider = $(this.selectors.slider+":visible", $curContent);
		var self = this;
		
		var syncSliderWithSelection = function () {
			var $selected = $curContent.find("li.selected");
			if($selected.length == 0) return;
			var maskHeight = $curContent.find(self.selectors.mask).height();
			var liTop = $selected.position().top - parseInt($curContent.find("ul").css("padding-top"));
			var liOuterHeight = $selected.outerHeight();
			var listTop = $curContent.find("ul").position().top;
			
			var tempPos = liTop + listTop;
			if(tempPos < 0 || tempPos + liOuterHeight > maskHeight){
				$curSlider.slider("moveTo", liTop);
			}
		};
	
		var moveToNextBlock = function () {
			var maskHeight = $curContent.find(self.selectors.mask).height();
			var listTop = $curContent.find("ul").position().top;
			var listHeight = $curContent.find("ul").height();
			
			var nextPos = maskHeight - listTop;
			if(nextPos < listHeight){
				$curSlider.slider("moveTo", nextPos);
			}
		};
		
		var transformUmlaut = function (letter) {
			switch(letter){
				case "\u00C4": //&#196;
					letter = "A";
					break;
				case "\u00D6": //&#214;
					letter = "O";
					break;
				case "\u00DC": //&#220;
					letter = "U";
					break;
			}
			return letter;
		}
		
		var preventDefault = false;
		switch(keyCode){
			case 38: //up
				$curContent.find("li.selected:first").removeClass("selected").prev().addClass("selected");
				if($curContent.find("li.selected").length == 0){
					$curContent.find("li:last").addClass("selected");
				}
				syncSliderWithSelection();
				preventDefault = true;
				break;
			case 40: //down
				$curContent.find("li.selected:first").removeClass("selected").next().addClass("selected");
				if($curContent.find("li.selected").length == 0){
					$curContent.find("li:first").addClass("selected");
				}
				syncSliderWithSelection();
				preventDefault = true;
				break;
			case 32: //space
				preventDefault = true;
				moveToNextBlock();
				break;
			case 13: //enter
					$curContent.find("li.selected:first a").click(function(){if(this.href) window.location.href = this.href;}).trigger("click");
				break;
			default:
				if( (keyCode >= 65 && keyCode <= 90) || (keyCode >= 48 && keyCode <= 57) ){
					//letters
					var letter = String.fromCharCode(keyCode).toUpperCase();
					$curContent.find("li.selected").removeClass("selected");
					var $listItemToMark = null;
					$curContent.find("li a").each(function(){
						var firstLetter = transformUmlaut($(this).text().charAt(0).toUpperCase());
						if(firstLetter == letter){
							$listItemToMark = $(this).parents("li:first");
							return false;
						}else if(firstLetter > letter){
							$listItemToMark = $(this).parents("li:first").prev();
							return false;
						}
					});
					$listItemToMark = $listItemToMark || $curContent.find("li:last");
					$listItemToMark.addClass("selected");
					syncSliderWithSelection();
				}
		}
		
		return preventDefault;
	}

});

/* END: KeyScrollable                                               */
/********************************************************************/
/* START: layer                                                     */

var LayerController = function() {
	this.layers = [];
	this.currentLayer = null;
	this.instance = null;

	var _this = this;
	$("body").click(function() {
		_this.closeCurrentLayer();
	});
	$("body").keyup(function(e) {
		var keyCode = (e) ? e.which : event.keyCode;
		if (keyCode == 27) {
			_this.closeCurrentLayer();
		}
	});
};

LayerController.getInstance = function() {
	this.instance = this.instance || new this;
	return this.instance;
};

$.extend(LayerController.prototype, {

	closeCurrentLayer: function() {
		if (this.currentLayer)
		this.currentLayer.close();
	},

	register: function(layer) {
		this.layers.push(layer);
		layer.owner = this;
	}

});

/********************************************************************/

var Layer = function(cssSelector) {
	this.construct(cssSelector);
};

$.extend(Layer.prototype, {

	construct: function() {
		this.isOpen     = false;
		this.isInited   = false;
		this.contentJqo = null;
	},

	close: function(newLayer) {
		this.beforeHide();
		this.hide(newLayer);
		if (this.iframeLining) {
			this.iframeLining.hide();
		}

		this.afterHide();
		this.isOpen = false;
		this.owner.currentLayer = null;
		return true;
	},

	getContent: function() {},

	hide: function() {
		this.contentJqo.hide();
	},

	open: function() {
		this.owner.closeCurrentLayer();
		if (!this.isInited) {
			this.contentJqo = this.getContent();
			this.init();
			this.isInited = true;
			if (Info.browser.isIEpre7 || Info.os.isMac) {
				this.iframeLining = new iframeLining(this);
			} else {
				this.iframeLining = null;
			}
			this.contentJqo.click(function(e) { e.stopPropagation(); });
		}
		this.beforeShow();
		this.show();
		if (this.iframeLining) {
			this.iframeLining.show();
		}
		this.afterShow();
		this.isOpen = true;
		this.owner.currentLayer = this;
		return true;
	},

	reposition: function() {
		if (this.iframeLining) {
			this.iframeLining.reposition();
		}
	},

	show: function() {
		this.contentJqo.show();
	},

	toggle: function() {
	if (this.isOpen) {
			this.close();
		} else {
			this.open();
		}
	},

	toggleWith: function(cssSelector) {
		var _this = this;

		$(cssSelector).click(function(e) {
			_this.toggle();
			return false;
		});
	},

	afterHide: function() {},
	afterShow: function() {},
	beforeHide: function() {},
	beforeShow: function() {}

});

/********************************************************************/

var LocationSelector = function() {
	this.construct();
	
	this.selectors = {
		selectList: 'div#location-selector',
		mask: 'div#location-list-wrapper',
		slider: 'div.slider'
	};
	
	this.initKeyScrolling(this.selectors);
};

$.extend(LocationSelector.prototype, Layer.prototype);

$.extend(LocationSelector.prototype, KeyScrollable.prototype);

$.extend(LocationSelector.prototype, {
	afterHide: function() {
		$("a#location-selector-handle").parent().css("z-index", "10");

		this.onClose();
	},

	beforeShow: function() {
		$("a#location-selector-handle").parent().css("z-index", "11");

		this.onOpen();
	},

	init: function() {
		var numberOfLocations = $("div#location-selector li").length;
		var visibleLocations = 20;
		if (numberOfLocations < visibleLocations) {
			$("div#location-selector div.slider").hide();
		} else {
			var sliderHeight = 300;
			var visibleHeight = 300;
			var handleHeight = Math.round(sliderHeight * visibleLocations / numberOfLocations);
			$("div#location-selector div.handle").css("height", handleHeight + "px");
			var locationListHeight = $("div#location-selector ul").height();
			
			var syncLayer = function(e, ui) {
				var newLocationListOffset = parseInt(- ui.value);
				$("div#location-selector ul").css("top", newLocationListOffset);
			}
			
			var $slider = $("div#location-selector div.slider").slider( {
				minValue: 0,
				maxValue: (locationListHeight - visibleHeight),
				slide: syncLayer,
				change : syncLayer
			});
			
			$(this.selectors.selectList).mousewheel(function(event, delta) {
				if (delta > 0) {
					$slider.slider("moveTo", $slider.slider("value")-(delta+10));
				} else if (delta < 0) {
					$slider.slider("moveTo", $slider.slider("value")-delta+10);
				}
				event.preventDefault();
				event.stopPropagation();
			});
			
		}
	}
});

/********************************************************************/

var SiteMap = function() {
	this.construct();
};

$.extend(SiteMap.prototype, Layer.prototype);

$.extend(SiteMap.prototype, {

	getContent: function() {
		return $("div#sitemap");
	},

	init: function() {
		var handleLeftOffset	= $("a#sitemap-handle").parent().position().left;
		var handleWidth			= $("a#sitemap-handle").outerWidth();
		var _this				= this;
		
		$("div#sitemap-tab").css({
			left: (handleLeftOffset - 32) + "px",
			width: (handleWidth + 20) + "px",
			display: 'block'
		});
		
		this.toggleWith("div#sitemap-tab");

		$('<img src="tb-loading-animation.gif" width="208" height="13" alt="Loading..." />').appendTo('div#sitemap-container');
		$("div#sitemap-container").load("sitemap_xhr.html", {}, function(){
			$("div#sitemap dl .toggle").click(function(event) {
				if(event.target.tagName == "A" && event.target != this)
				{
					// execute link
					window.location.href = event.target.href;
					return;
				}
			
				$(this).parents("dl:first").toggleClass("collapsed").toggleClass("expanded");
			
				
			});		
		});
		
		_this.reposition();
	}
	
});





/********************************************************************/

/**
 * toolzone controls
 * kopie von controls (im Edit Mode)
 */

$(document).ready(function(){
	$('dl.toolzonecontrols dt').click(function(){
		var close = ($(this).hasClass('active'))? true : false;
		
		
					//ISSUE: Safari does not apply those stuff if toolzone-dt is not displayed !!!
					//alert("hide errors 222 333");
					//$('.error').hide();
					//$('input[type=radio].star').hide();
					
		
		// hide all visible controls
		$(this).parent().children('dt').removeClass('active');
		$(this).parent().children('dd').css('display', 'none');
		
		if ( ! $(this).hasClass('doNotOpen') ) {
	
			// show selected toolzonecontrols
			if (!close) {
				$(this).addClass('active');
				var body = $(this).next();
				if (body.css('display') == 'block') {
					body.css('display', 'none');
				} else {
				
					body.css('display', 'block');


				}
			}
			
		}
	});
	
	
	//alle Toolzonecontrols schliessen:
	$(document).bind('click', function(e) {

                var $clicked=$(e.target); // get the element clicked

                if($clicked.is('.toolzonecontrols') || $clicked.parents().is('.toolzonecontrols')) { 
					// if the element clicked is the one we're looking for or if the element has a parent that we're looking for then we clicked the right place !
                       //console.log('BULLSEYE !'); // here you should do anything
                } else { // we're outside the error paragraph, no matter where but we're outside !
                       // console.log('you clicked outside the toolzonecontrols !');
					$('dl.toolzonecontrols dt').parent().children('dt').removeClass('active');
					$('dl.toolzonecontrols dt').parent().children('dd').css('display', 'none')
                }

	});	

});



/********************************************************************/

/**
 * send to friend
 * 
 */


$(document).ready(function(){
	var err = 0;
	
	//alert("hide errors 111")
	
    //$('.error').hide(); //???? das funktioniert in Safari bei unsichtbaren layern nicht ....
	$('.error').css("display", "none")
	
	$("#send-to-friend .button").click(function() {
    	// $(".button").click(function() {
      	// validate and process form here
      
      $('.error').hide();
	  
	  var fname = $("input#id-fname").val();

  	 var namefrom = $("input#name-from").val();
  	if (namefrom == "") {
        $("label#name-from_error").show();
        $("input#name-from").focus();
		err ++;
        //return false;
      }
  	var emailfrom = $("input#email-from").val();
  	if (emailfrom == "") {
        $("label#email-from_error").show();
        $("input#email-from").focus();
		err ++;
        //return false;
      } else {
	 if ( ! checkmail(emailfrom)) {
        $("label#email-from-valid_error").show();
        $("input#email-from").focus();
		err ++;
        //return false;
	 }
	 }
  	var emailto = $("input#email-to").val();
	  emailto = emailto.replace(/,/gi, ";");
  	if (emailto == "") {
        $("label#email-to_error").show();
        $("input#email-to").focus();
		err ++;
        //return false;
      } else {
	 if ( ! checkmail(emailto)) {
        $("label#email-to-valid_error").show();
        $("input#email-to").focus();
		err ++;
        //return false;
	 }
	  }
      if (emailto.split(";").length > 10) {
        $("label#email-to-tomuch_error").show();
        $("input#email-to").focus();
		err ++;
	  }
	if (err > 0) {
		err = 0;
		return false;
	} 
	
	function checkmail(email) {
		if (email.indexOf(".") == -1) {
			return false
		}
		if (email.indexOf("@") == -1) {
			return false
		}
		return true
	}
	
	var submitData = new Object();
	submitData.mailform = "sendtofriend";
	submitData.fname = fname;
	submitData.fromname = namefrom;
	submitData.fromemail = emailfrom;
	submitData.toemail = emailto;
	submitData.senturl = encodeURIComponent(location.href);
		  
	  $('#send-to-friend_wrapper').load("ajax-send-this-mail", submitData);
	  	  
	  return false;	
	
    });
  	
});
  
  
/********************************************************************/

/**
 * rate
 * 
 */

 


function showRateComment() {
	$("#rate-comment").show();
};

function submitRating(val) {
	var submitData = new Object();
	submitData.action = "rate";
	submitData.url = encodeURIComponent(location.href);
	submitData.pageid = 12825;
	submitData.rating = val;
		  
	  $('#rate_star_wrapper').load("ajax-rate", submitData);
	  	  
	  return false;
};		
  	
function submitComment() {
	var submitData = new Object();
	submitData.action = "comment";
	submitData.rate_comment = encodeURIComponent($('#rate_comment').val());
	submitData.rate_rowid = $('#rate_rowid').val();
	
		  $('#rate_comment_wrapper').load("ajax-rate", submitData);
	  	  
	  return false;	

}



/**
 * Social Bookmark
 * 
 */
 
 //f&#252;r Safari Bookmark ausblenden
 $(document).ready(function(){
	if (!Tools.isBookmarkable()) {
		$("div#localBookmarkLink").css("display", "none"); // hide bookmark link
	}
 });

function saveBookmark (service, url, title) {
	var submitData = new Object();
	submitData.action = "saveBookmark";
	submitData.url = url;
	submitData.service = service;
	submitData.pageid = 12825;
	submitData.title = title;
		  
	  $.post("ajax-saveBookmark", submitData);
	  	  
	  return false;
}

/********************************************************************/

var iframeLining = function(layer) {
	this.layer = layer;
	this.liningJqo = $('<iframe src="javascript:false" class="lining" frameborder="0" scrolling="no"></iframe>');
	this.layer.contentJqo.parent().prepend(this.liningJqo); // parent is of type "div.layer-wrapper"
};

$.extend(iframeLining.prototype, {

	hide: function() {
		this.liningJqo.hide();
	},

	reposition: function() {
		var contentJqo = this.layer.contentJqo;
		this.liningJqo.css({
			width: contentJqo.outerWidth() + "px",
			height: contentJqo.outerHeight() + "px",
			left: this.layer.contentJqo.css("left"),
			top: this.layer.contentJqo.css("top")
		});
	},

	show: function() {
		this.reposition();
		this.liningJqo.show();
	}
});

/* END: layer                                                       */
/********************************************************************/
/* START: tools and utilities                                       */

var Tools = {

	bookmark: function() {
		var url   = location.href;
		var title = document.title;

		if (Info.browser.isIE) {
			window.external.AddFavorite(url,title);
		} else if (window.sidebar) {
			window.sidebar.addPanel(title,url,"");
		}
	},

	isBookmarkable: function() {
		var url    = location.href;
		var server = /^(https?|ftp):/i.test(url);
		if (Info.browser.isIE7 && server) return true;
		if (Info.browser.isIEpre7) return true;
		if (Info.browser.isMozilla && window.sidebar && server) return true;
		return false;
	},

	delicious: function() {
		window.open("http://del.icio.us/post?url=" + encodeURIComponent(location.href) + "&title=" + encodeURIComponent(document.title));
	},

	digg: function() {
		window.open("http://digg.com/submit?url=" + encodeURIComponent(location.href) + "&title=" + encodeURIComponent(document.title));
	},

	print: function() {
		window.print();
	}
};

var Utilities = {

	minMax: function(value, minValue, maxValue) {
		if (value < minValue) {
			return minValue;
		} else if (value > maxValue) {
			return maxValue;
		} else {
			return value;
		}
	}
};

var EventHelper = {
	target : function (e) {
		var t;
		if (!e) var e = window.event;
		if (e.target) t = e.target;
		else if (e.srcElement) t = e.srcElement;
		if (t.nodeType == 3) // defeat Safari bug
			t = t.parentNode;
		
		return t;	
	}
};

/* END: tools and utilities                                         */
/********************************************************************/
/* START: cookie                                                    */

var Cookie = {

	set: function(key, value, days) {
		var expires = "";
		if (days) {
			var date = new Date();
			date.setTime(date.getTime() + days * 86400000);
			var expires = "; expires=" + date.toGMTString();
		}
		document.cookie = key + "=" + value + expires + "; path=/";
	},

	get: function(key) {
		if (key) {
			var obj = Cookie.get();
			return obj[key];
		} else {
			var obj = {};
			if (document.cookie) {
				var pairs = document.cookie.split(";");
				for(i in pairs) {
					var pair = pairs[i].split("=");
					if (pair.length == 2) {
						obj[pair[0].replace(/^\s+/,"")] = pair[1];
					}
				}
			}
			return obj;
		}
	},

	unset: function(key) {
		Cookie.set(key, "", -1);
	}
};

/* END: cookie                                                      */
/********************************************************************/
/* START: stylesheet helper for IE                                  */

var IEStylesheet = {

	getImportedStylesheet: function(href) {

		for (var i = 0, li = document.styleSheets.length; i < li; ++i) {
			var stylesheet = document.styleSheets(i);
			if (stylesheet.imports) {
				for (j = 0, lj = stylesheet.imports.length; j < lj; ++j) {
					var imported = stylesheet.imports(j);
					if (imported.href == href) {
						return imported;
					}
				}
			}
		}
		return null;
	},

	getRuleBySelector: function(stylesheet, selector) {
		for(var i = 0, l = stylesheet.rules.length; i < l; ++i) {
			var rule = stylesheet.rules.item(i);
			if (rule.selectorText.replace(/^\s/,"").replace(/\s$/,"").toLowerCase() == selector.toLowerCase()) {
				return rule;
			}
		}
		return null;
	}
};

/* END: stylesheet helper for IE                                    */
/********************************************************************/
/********************************************************************/
/* START: resizing the flyoutnav containers for flash flyoutnavs at runtime */

var ZINDEX_ACTIVE = 100;
var ZINDEX_INACTIVE = 1;
var PRIM_NAV_HEIGHT_CLOSED = 42;
var PRIM_NAV_HEIGHT_NO_BORDER = 41;

function primNavHasNoBorder() {
	if ($("#stage-zone").length || $("#primary-nav-zone.no-border").length) {
		return true;
	}
	return false;
}

if (Info.browser.isIE){
/*functions for internet explorer*/
	resizeNavigation = function (divid, options){
		var $flyoutnav = $("#"+divid);
		var $flyoutnav_parent = $flyoutnav.parents(".flyoutnav_positioner:first");

		var newZIndex = ZINDEX_ACTIVE;
		var newHeight;

		if(options.height){
			newHeight = options.height;
			if (primNavHasNoBorder() && newHeight==PRIM_NAV_HEIGHT_CLOSED) {
				newHeight=PRIM_NAV_HEIGHT_NO_BORDER; // hide bottom border
			}
			$flyoutnav.height(newHeight);
		}
	}
} else {
/*functions for all browsers except internet explorer*/

	resizeNavigation = function(divid, options){
		var $flyoutnav = $("#"+divid);
		var $flyoutnav_parent = $flyoutnav.parents(".flyoutnav_positioner:first");

		if(options){
			calculateClipping($flyoutnav, $flyoutnav_parent, options);
		}
	}
}

function calculateClipping($flyoutnav, $flyoutnav_parent, options){
	var newWidth = $flyoutnav_parent.width();
	var newHeight = $flyoutnav_parent.height();
	var newOffsetTop = 0;
	var newOffsetLeft = 0;

	if(options){
		newWidth = options.width ? options.width : $flyoutnav_parent.width();
		newHeight = options.height ? options.height : $flyoutnav_parent.height();

		if(options.valign && options.valign == "bottom" && $flyoutnav.hasClass("open")){
			newOffsetTop = $flyoutnav.height() - $flyoutnav_parent.height();
			newHeight= $flyoutnav_parent.height();
		}

		if(options.align && options.align == "right" && $flyoutnav.hasClass("open")){
			newOffsetLeft = $flyoutnav.width() - $flyoutnav_parent.width();
			newWidth= $flyoutnav_parent.width();
		}
	}

	$flyoutnav.css({clip:"rect("+newOffsetTop+"px, "+newWidth+"px, "+newHeight+"px, "+newOffsetLeft+"px)"});
	if (primNavHasNoBorder() && newHeight==PRIM_NAV_HEIGHT_CLOSED) {
		newHeight=PRIM_NAV_HEIGHT_NO_BORDER; // hide bottom border
	}
	$flyoutnav.height(newHeight);
}










function initNavigation(){
	if($("#primary-nav-zone").length != 0 && Info.flash.major >= 8){
		$("#sub-nav-zone").remove();
		$("#primary-nav-zone").addClass("flyoutnav_positioner").empty().append("<div id='prim-nav' class='flyoutnav'></div>");
		
		if (primNavHasNoBorder()) {
			$("#prim-nav").height(PRIM_NAV_HEIGHT_NO_BORDER); // hide bottom border
			$("#primary-nav-zone").css("border-bottom","none");
			if ($("#stage-zone").length) $("#stage-zone").css("margin-top","0");
			$("#header-zone").css("z-index","10");
		}
		
		var so_lf = new SWFObject(RESOURCES_PATH+"swf/navigation.swf", "navigation_swf", "100%", "100%", "8", "#ffffff");

		so_lf.addParam("wmode", "transparent");
		so_lf.addParam("scale", "noscale");
		so_lf.addParam("salign", "tl");
		so_lf.addVariable("containerID", "prim-nav");
		/***** add additional params as variables *****/
		// path where xml containing navigation entries is located
		if(NAV_XML_PATH) so_lf.addVariable("navXML", NAV_XML_PATH);
		else so_lf.addVariable("navXML", RESOURCES_PATH+"/swf/nav.xml");
		// ID of selected navigation entry to highlight
		if(ACTIVE_ENTRY_ID) so_lf.addVariable("activeEntryID", ACTIVE_ENTRY_ID);
		// use unicode version if xml contains unicode charset
		if(USE_UNICODE) so_lf.addVariable("useUnicode", USE_UNICODE);
		

		so_lf.write("prim-nav");

		var mouseOutTimeout;

		function getFlashMovieObject(movieName){
			if (window.document[movieName]) return window.document[movieName];
			if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; 
			else return document.getElementById(movieName);
		}

		function closeNavigation(){
			if(getFlashMovieObject("navigation_swf")) document.getElementById("navigation_swf").SetVariable("mouseIsOver", "0");
		}

		$("#prim-nav").hover(
			function () {
				clearTimeout(mouseOutTimeout);
			},
			function () {
				clearTimeout(mouseOutTimeout);
				mouseOutTimeout = window.setTimeout(function () { closeNavigation(); },1000);
			}
		);

		if(Info.browser.isIEpre7 || Info.os.isMac) createIFrame($("#prim-nav").children().get(0));
	}
}
/* END: resizing the flyoutnav containers for flash flyoutnavs at runtime */
/********************************************************************/
/********************************************************************/
/* START: iframe for navigation in ie6                              */
function createIFrame(obj)
{
	var iframe = $(obj).next("iframe.opaque:first").get(0);
	if(!iframe){
		$(obj).after("<iframe src='javascript:false' class='opaque' frameBorder='0' scrolling='no'></iframe>");
		iframe = $(obj).next("iframe.opaque:first").get(0);
	}
	obj.iframe = iframe;

	return iframe;
}
/* END: iframe for navigation in ie6                                */
/********************************************************************/
/* START: page specific initalization                               */

var PageSpecificInit = {

	error: function() {

		// add "autojump" functionality to pulldowns: an url is called after changing the value

		$("select.autojump").change(function() {
			location.href = this.value;
		}).next("div.button").remove();

	},

	faq: function() {

		// collapse and expand toc chapters

		$("div.toc h3 a").click(function() {
			$(this).parent().parent().toggleClass("expanded");
			return false;
		});

	},


	"order-now": function() {

		// add tooltip functionality to order-now-page

		$("body#body-order-now-page p.annotation").prev("h3").each(function(i) {

			var h3      = $(this);
			var p       = $(this).next("p.annotation");
			var trigger = h3.append("<span>&nbsp;</span>").children("span");

			p.css({
				left: trigger.position().left + "px",
				top: trigger.position().top + "px"
			});

			trigger.mouseover(function() {
				p.css("display", "block");
			}).mouseout(function() {
				p.css("display", "none");
			});
		});

		// improve reset functionality to order-now-page (rests just the check-boxes)

		$("body#body-order-now-page button[type=reset]").click(function() {
			$("input[type=checkbox]").attr("checked", false);
			return false;
		});
	}
};

/* END: page specific initalization                                 */
/********************************************************************/
/* START: Productfinder                                             */
/* accordion functionality and slider for each accordion element    */
(function($) {
	$.productfinder = {};
	
	$.fn.extend($.productfinder, {
		defaults: {
			accordionClass : "accordion",
			menuContentClass : "menu-content",
			SLIDER_HTML : '<div class="slider"><div class="handle ui-slider-handle"></div></div>'
		}
	});
	
	$.fn.extend({
		productfinder : function(options) {
			// setup configuration
			options = $.extend({}, $.productfinder.defaults, options);		
			var element = this;
			if (!$('.' + options.accordionClass, element).length) {
				return;
			}

			new ProductfinderInstance(this, options);
			return this;
		}
	});
	
	var s, o, e;

	var ProductfinderInstance = function(element, options) {
		s = this;
		o = options;
		e = element;
		
		this.currentContent;
		
		this.initSlider();
		this.initAccordion();
		
		this.selectors = {
			selectList: 'div#productfinder div.menu-content',
			mask: 'div.menu-wrapper',
			slider: 'div.slider'
		};
		
		this.initKeyScrolling(this.selectors);
		
		var layerController = LayerController.getInstance();
		if(layerController) layerController.register(this);
	};
	
	var handleClickOutside = function(event) {
		var a = $('.accordion', e);
		//looking for stored element-data "opened"
		if (!a.data("opened")) return;
		
		var target = EventHelper.target(event);
		if(!$(target).parents("div#productfinder").length) {
			a.activate(false);
			$(".selected",a).removeClass("selected");
		}
	};

	$.extend(ProductfinderInstance.prototype, KeyScrollable.prototype);

	$.extend(ProductfinderInstance.prototype, {
		
		addCloseHandler: function() {
			$(document.body).click(handleClickOutside);
		},
		
		removeCloseHandler: function() {
			$(document.body).unbind("click", handleClickOutside);
		},
		
		initSlider: function() {
			var selector = "." + o.accordionClass + " div." + o.menuContentClass;
			$(selector, e).each(function() {
				$(this).append(o.SLIDER_HTML);
			});
		},
		
		initAccordion: function() {
			$('.accordion', e).accordion({ 
				header: '.trigger',
				active: false,
				autoHeight: false,
				alwaysOpen: false
			}).change(function(event, newHeader, oldHeader, newContent, oldContent) { 
				var self = $(this);
				//if the accordion is closed programmatically, newHeader would be null
				if (!newHeader) {
					self.removeData("opened");
					s.onClose();
					return;
				}
				
				//if user closed the opened element, newMenu would represent the closed one, so do nothing
				var newMenu = newHeader.parents("div.menu:first"); 
				if (!$(newMenu).hasClass("selected")) {
					self.removeData("opened");
					s.onClose();
					return;
				}
				
				var menuContent = $("div.menu-content", newMenu);
				self.data("opened","true");
				s.currentContent = menuContent;
				s.onOpen();
				//if accordion-element always be initialize, we would do nothing (stored for the element itself)
				if (!menuContent.data("init")){
					//initialise slider for each element once
					s.initSliding(menuContent);
				}
			}).click(function(e) { e.stopPropagation(); });
		},
		
		initSliding: function (menuContent) {
			$(menuContent).data("init","true");
			var visibleHeight = 236;
			var menuHeight = $("ul.menu", menuContent).height();
			
			if (menuHeight < visibleHeight) {
				$("div.slider", menuContent).hide();
			} else {
				$("div.slider", menuContent).show();
				var sliderHeight = 236;
				var visibleHeight = 236;
				var handleHeight = Math.round(sliderHeight * visibleHeight / menuHeight);
				$("div.handle", menuContent).css("height", handleHeight + "px");
		
				var syncLayer = function(e, ui) {
					var newLocationListOffset = parseInt(- ui.value);
					$("ul",menuContent).css("top", newLocationListOffset);
				}
					 
				var s = $("div.slider", menuContent).slider( {
					minValue: 0,
					maxValue: (menuHeight - visibleHeight),
					slide: syncLayer,
					change: syncLayer
				});
				
				menuContent.mousewheel(function(event, delta) {
					if (delta > 0) {
						s.slider("moveTo", s.slider("value")-(delta+10));
					} else if (delta < 0) {
						s.slider("moveTo", s.slider("value")-delta+10);
					}
					event.preventDefault();
					event.stopPropagation();
				});
			}
		},
		
		onOpen: function () {
			KeyScrollable.prototype.onOpen.call(this);
			
			if(this.owner.currentLayer != this){
				this.owner.closeCurrentLayer();
				this.owner.currentLayer = this;
			}
		},

		onClose: function () {
			this.currentContent = null;
			
			KeyScrollable.prototype.onClose.call(this);
			if(this.owner.currentLayer == this){
				this.owner.currentLayer = null;
			}
		},

		open: function () {
			$('.accordion', e).activate(0);
		},

		close: function () {
			$('.accordion', e).find("div.menu.selected:first").removeClass("selected"); 
			$('.accordion', e).activate("false");
		}
	});
})(jQuery);
/* START: Productfinder                                             */
/********************************************************************/
/********************************************************************/
/* START: Productlist                                               */
(function($) {
	$.fn.extend({
	  productList: function () {
	  	var entries = $("dt a",this).filter(function() {return true; $(this).hasClass("handler")});
	  	entries.each(function(i) {
			var isFirst = i==0;
			if($(this).hasClass("handler-external")) {
				ProductList.handleExternalLink(this);
			} else {
				ProductList.handle(this, isFirst);
			}
		});
	  }
	});
	
	var ProductList = function() {};
	
	$.extend(ProductList, {
		handleExternalLink : function(link) {
			$(link).click(function() {
				window.open(this.href); return false;
			});
		}, 
		handle : function(link, isFirst) {
			$(link).click(function() {
				if (ProductList.opened) {
					var openedDt = ProductList.opened[0];
					var openedContent = ProductList.opened[1];
					openedDt.show();
					openedContent.hide();
				}
				var dt = $(this).parents(":first");
				var content = dt.next("dd").find("div.section");
				ProductList.opened = [dt, content]
				dt.hide();
				if (isFirst) content.css({'padding-top' : '1px'});
				content.show();
			});
		},
		
		opened : null
	});
})(jQuery);
/* END: Productlist                                               */
/********************************************************************/


// these example method has to be implemented by fully functional methods

//THE: id="location-selector" -> width breiter, sonst funktioniert ui-slider-handler nicht infolge Umbruch von langen Country-Namen

EXAMPLE_RATED = false;

$.extend(RatingManager, {

	rate: function(grade) {
		// do something
		if (EXAMPLE_RATED) {
			RatingManager.displayError(_.rating.error);
			EXAMPLE_RATED = false;
		} else {
			RatingManager.displaySuccess(_.rating.success, grade);
			EXAMPLE_RATED = true;
		}
	}

});

$.extend(LocationSelector.prototype, {








	getContent: function() {
		//original width: 140px
		var content = '\
			<div id="location-selector" style="width: 200px; ">\
				<p id="location-selector-close-handle" style="background-image: url(_resources/img/en/roche-worldwide.gif); width: 96px; ">\
					<span class="access">Roche Worldwide</span>\
				</p>\
			    <div class="slider"><div class="handle ui-slider-handle"></div></div>\
			    <div id="location-list-wrapper">\
					<ul>' + this.getCountrylistAsHtml() + '\
					</ul>\
				</div>\
			</div>';
		$("a#location-selector-handle").parent().append(content);
		this.toggleWith("p#location-selector-close-handle");
		return $("div#location-selector");
	}//,

	/*
	DISSABLED. FUNCTION EXPORTED TO OUR TEMPLATE AS IT'S USED FOR CONTENT POPULATION
	getCountrylistAsHtml: function() {
		var list = [];
		for (var i=0; i < _.countries.length; i++) {
			list.push('<li><a href="roche_worldwide.htm?mz_id='+_.countries[i].mz_id+'">' +  _.countries[i].title + '</a></li>');
		}
		return list.join("");
	}
	*/

});

/***********************************************************************/
/* START: switch between tabs and repaint sIFR elements inside         */
// replace following code with custom functions to switch between tabs
$(document).ready(function() {
	$("ul.tab-nav-addAjaxFunc li").click(
		function(event){
			if($(this).is("li.active")){ // return when tab is already shown
				event.stopPropagation();
				event.preventDefault(); // prevent browser to trigger link
				return;
			}
			
			$(this).siblings(".active").removeClass("active").each(function(){
				var tabContentId = $(this).children("a:first").attr("href");
				if(/^#[-_\w]+$/.test(tabContentId)){
					$(tabContentId).get(0).alreadySifred = true; // set flag that this container was already repainted
					$(tabContentId).hide();
				}
			});
			
			$(this).addClass("active");
			var tabContentId = $(this).children("a:first").attr("href");
			if(/^#[-_\w]+$/.test(tabContentId)){ // check whether href is a container id
				$(tabContentId).show();

				if(!$(tabContentId).get(0).alreadySifred){ // check if this container was already repainted
					if(SifrManager) SifrManager.paint("div"+tabContentId); // repaint sIFR elements
					$(tabContentId).get(0).alreadySifred= true;
				}
			}
			event.stopPropagation();
			event.preventDefault(); // prevent browser to trigger link
		}
	);
/* END: switch between tabs and repaint sIFR elements inside         */
/***********************************************************************/

});
			

/**
 * open external links in a new window
 * @author Andreas Nebiker
 */
 
$(document).ready(function()
{
	$('a.external').click(function()
	{
		$(this).attr('target','_blank');
	});
});

/**
 * tabs
 * @author Andreas Nebiker
 */
 
$(document).ready(function(){
	$("div.tab-nav-zone").tabNav();
});

(function($){
	$.fn.extend({
		tabNav: function () {
			$("ul.tab-nav-addAjaxFunc li a",this).each(function(i) {
				tabNav.handle(this);
			});
		}
	});
	
	var tabNav = function() {};
	
	$.extend(tabNav, {
		handle : function(link) {
			$(link).click(function() {
				var clickedTab = $(this);
				var clickedIndex = clickedTab.parent().parent().children().index($(this).parent()[0]);
				
				clickedTab.parent().parent().parent().removeClass('tab1');
				clickedTab.parent().parent().parent().removeClass('tab2');
				clickedTab.parent().parent().parent().removeClass('tab3');
				clickedTab.parent().parent().parent().removeClass('tab4');
				clickedTab.parent().parent().parent().removeClass('tab5');
				clickedTab.parent().parent().parent().removeClass('tab6');
				clickedTab.parent().parent().parent().removeClass('tab7');
				clickedTab.parent().parent().parent().removeClass('tab8');
				clickedTab.parent().parent().parent().removeClass('tab9');
				clickedTab.parent().parent().parent().addClass('tab' + (clickedIndex + 1));
				
				//rewrite Sifr - Titles in the newly visible Tab;
				//SifrManager.paint();
				//if(SifrManager) SifrManager.paint("div"+tabContentId)
				
				if(SifrManager && !$("#tabContent"+(clickedIndex + 1)).alreadySifred)
				{
					SifrManager.paint("#tabContent"+(clickedIndex + 1));
					$("#tabContent"+(clickedIndex + 1)).alreadySifred = true;
				}
				

				
				
				
				//play first Video in new Tab if available
				try {
					//if (window.location.search == "?bla") {
					if ($('#movieplayer') && $('#movieplayer')[0]) {
						//else no <div id="movieplayer" ..> on page
						
						//alert('asdf')
						var container = $(this).parent().parent().parent();
						var contents = container.children('div')
						var toDisplayContent = $(contents.get(clickedIndex));
						//toDisplayContent.css('border', '2px solid red');

						var firstEntryInContent = toDisplayContent.children().children().children(':first').children()[0]
						
						var fullUrl = firstEntryInContent.href
						//alert(fullUrl.length)
						var movieUrl = fullUrl.substring(fullUrl.lastIndexOf("/"), fullUrl.length)
						initMovie(movieUrl, 'movieplayer', 315, 236, true)
						
						//unmark all and mark the playing element
						$(firstEntryInContent).parent().parent().children().removeClass('selectedMovie')
						$(firstEntryInContent).parent().addClass('selectedMovie')
												
					} else {
						//no movieplayer div on page ...
					}
						
					//}
				} catch (e) {
					for (p in e) {
						alert(p + ": " + e[p])
					}
				}

				return false;
			});
		}
	});
})(jQuery);

/**
 * insite authoring tools
 * @author Andreas Nebiker
 */

$(document).ready(function(){
	$('dl.controls dt').click(function(){
		var close = ($(this).hasClass('active'))? true : false;
	
		// hide all visible controls
		$(this).parent().children('dt').removeClass('active');
		$(this).parent().children('dd').css('display', 'none');
	
		// show selected controls
		if (!close) {
			$(this).addClass('active');
			var body = $(this).next();
			if (body.css('display') == 'block') {
				body.css('display', 'none');
			} else {
				body.css('display', 'block');
			}
		}
	});
});
 
$(document).ready(function()
{
	$('#newsControlsForm textarea[max_length]').each(function()
	{
		var iMaxLength	= $(this).attr('max_length');	
		var iLength		= this.value.replace(/\n/g, '______').length;
		var eCounter 	= $(this).prev().children('span')[0];
		
		// update counter
		if (eCounter)
		{
			$(eCounter).text(parseInt(iMaxLength - iLength) + ' characters remaining');
		}
	});
	
	$('#newsControlsForm textarea[max_length]').keyup(function(e)
	{
		var iMaxLength	= $(this).attr('max_length');
		var iLength		= this.value.replace(/\n/g, '______').length;
		var eCounter 	= $(this).prev().children('span')[0];
		
		// enforce max length
		if (iLength > iMaxLength)
		{
			this.value = this.value.replace(/\n/g, '______').substr(0,iMaxLength).replace(/______/g, '\n');
			iLength = iMaxLength
		}
		
		// update counter
		if (eCounter)
		{
			$(eCounter).text(parseInt(iMaxLength - iLength) + ' characters remaining');
		}
	});
}); 

/**
 * sorttable aktivieren
 * @author Thomas Heusser
 */
$(document).ready(function() 
    { 
        $("#sortable").tablesorter( {
			//debug: true,
			headers: { 
                0: { 
				  //erste Spalte immer als Text sortieren -> n&#246;tig f&#252;r /policies._guidelines_and_positions.htm -> allenfalls Style erweitern um dies als Parameter &#252;bergeben zu k&#246;nnen ....
                    sorter:'text' 
                } 
            	} 		
		} ); 
    } 
); 
    


/**
 * global extensions
 */

/** jquery.dragable&resizeable&dropable plugin 
 * jquery.dimensions required
 * 
 * required parameter: elem - whatever that might be given to jquery / only if called directly: new dynamic(elem, options)
 * 
 * optional parameters:  $('#object').dragable({params}).resizeable({params});
 * ----------------------
 * d - enable dragging // only if called directly
 * r - enable resizing // only if called directly
 * direction, resizeDirection - 'h' or 'v'
 * noevents - do not bind event handlers (for manual use)
 * edge - {x1, x2, y1, y2}
 * start, move, end - dragable callback functions( o ) // start(o, dom event), move(o, dom event)
 * over, moveover, out, drop - dropable target callback functions( o , target jquery object )
 * resizeStart, resize, resizeEnd - resizeable callback functions( o )
 * handlerPosition - custom function(o, handler jquery object) for setting the resize handler position
 * moveHandler - move handler object / whatever that might be given to $()
 * moveHandlerOutside - bool (false by default) - tells plugin to look moveHandler (jquery selector) outside of elem object (useful with mass dragging)
 * / if not set, plugin will look inside of elem - $(moveHandler, o.elem)
 * target - collection of target objects for dropping / whatever that might be given to $()
 * renewTarget - target collection should be renewed before moving
 * tolerance - 'intersect', 'leftcorn', 'pointer' - the way two object should intersect / todo: more modes
 * clone - bool or callback(o, new jquery object) - do not drag the actual object, use clone 
 * cloneRemove - callback(o, cloned jquery object) - called before object.remove(); 
 * / if returns false, object.remove() will not be called and also the position of the original element will not be updated
 * / useful for drag'n'drop creation of objects
 * moveReplacer - jquery object / can be used instead of clone / if both set, plugin will choose replacer 
 * / clone and cloneRemove callbacks, if set, will be called too with the same logic
 * / moveReplacer will not be removed from dom anyway
 * opacity, initialOpacity - (string) double - opacity of dragged object ( default element, cloned element, or replacer element - no matter)
 * zIndex - if set, it will be used while dragging, and initial z-index from style will be restored on mouseup event
 * proportion, min, max - {w, h}
 * resizeHandlerClass - initial class for resize handler
 * parent - jquery object of parent element / if edge is not set, it will be taken from parent element
 * 
 * -- in development
 * autoscroll - bool - will be used only if parent element is set
 * scrollStep - int / 15 by default
 * scrollMargin - int / 30 by default
 * -----------------------
 * 
 * simple use:
 * $('#object').dragable().resizeable();
 * 
 * @author: johann kuindji (www.kuindji.com , www.stuffedguys.com)
 * @email: jk@kuindji.com
 */

(function($)
{
	$.fn.extend(
	{
	    dragable: function(options)
		{
	        if (!this[0]) return this;
	        if (!options) options = {};
			
	        for (var j = 0; j < this.length; j++)
			{
	            if (!this[j].dynamic)
				{
	                var options = $.fn.extend({d: true}, options);
	                this[j].dynamic = new dynamic(this[j], options);
	            }
				
	            else
				{
	                this[j].dynamic.applyOptions(options);
	                this[j].dynamic.dragable();
	            }
	        }
			
	        return this;
	    },

	    notDragable: function()
		{
	        if (!this[0]) return this;
			
	        for (var j = 0; j < this.length; j++)
			{
				if (this[j].dynamic) this[j].dynamic.notDragable();
			}
			
	        return this;
	    },

	    resizeable: function(options)
		{
	        if (!this[0]) return this;
	        if (!options) options = {};
			
	        for (var j = 0; j < this.length; j++)
			{
	            if (!this[j].dynamic)
				{
	                options = $.fn.extend({r: true}, options);
					
	                this[j].dynamic = new dynamic(this[j], options);
	            }
				
	            else
				{
	                this[j].dynamic.applyOptions(options);
	                this[j].dynamic.resizeable();
	            }
	        }
			
	        return this;
	    },
	
	    notResizeable: function()
		{
	        if (!this[0]) return this;
			
	        for (var j = 0; j < this.length; j++)
			{
				if (this[j].dynamic) this[j].dynamic.notResizeable();
			}
			
	        return this;
	    },
	
	    drag: function(ev)
		{
	        if (!this[0]) return this;
			
	        for (var j = 0; j < this.length; j++)
			{
				if (this[j].dynamic) this[j].dynamic.mousedown(ev);
			}
			
	        return this;
	    },
	
	    stopDrag: function()
		{
	        if (!this[0]) return this;
			
	        for (var j = 0; j < this.length; j++)
			{
				if (this[j].dynamic) this[j].dynamic._dragable = false;
			}
			
	        return this;    
	    },
	
	    dynamic: function()
		{
	        if (!this[0] || !this[0].dynamic) return {};
			
	        return this[0].dynamic;
	    }
	})
})(jQuery);

function dynamic(elem, options) {
    if (!options) options = {};
    options.elem = elem;
    this.elem = null;
    this.originalElem = null;
    this.moveHandler = null;
    this.resizeHandler = null;
    this.target = null;
    this.d = false;
    this.r = false;

    this.edge = options.edge || null;
    this.parent = options.parent || null;
    this.autoscroll =  options.parent ? options.autoscroll || null : null;
    this.renewTarget = options.renewTarget || false;
    this.scrollStep = options.scrollStep || 15;
    this.scrollMargin = options.scrollMargin || 30;
    this.min = options.min || null;
    this.max = options.max || null;
    this.proportion = options.proportion || null;
    this.direction = options.direction || null;
    this.resizeDirection = options.resizeDirection || null;
    this.noevents = options.noevents || null;
    this.zIndex = options.zIndex || null;
    this.tolerance= options.tolerance || 'intersect';
    this.clone = options.clone || false;
    this.cloneRemove = options.cloneRemove || null;
    this.moveReplacer = options.moveReplacer || null;
    this.opacity = options.opacity || null;
    this.initialOpacity = options.initialOpacity || null;

    this.start = options.start || null;
    this.move = options.move || null;
    this.end = options.end || null;

    this.over = options.over || null;
    this.moveover = options.moveover || null;
    this.out = options.out || null;
    this.drop = options.drop || null;

    this.resizeStart = options.resizeStart || null;
    this.resize = options.move || null;
    this.handlerPosition = options.handlerPosition || null;
    this.resizeEnd = options.resizeEnd || null;

    this.options = options;
    this._dragable =false;
    this._resizeable = false;
    this.prevX = 0;
    this.prevY = 0;
    this.left = 0;
    this.top = 0;
    this.w = 0;
    this.h = 0;
    this.prevRX = 0;
    this.prevRY =0;
    this.initialIndex = null;
    this.targetMatrix = null;
    this.currentTarget = null;
    this.prevPosition = null;
    this.prevOpacity = null;
    this.bodyParent = false;

    extendDynamic(this);
}

function extendDynamic(o) {

    o.applyOptions = function(options) {
        if (!options) return false;
        for (var i in options) o[i]=options[i];
        o.options = $.extend(o.options, options);
    }

    // common functions
    o.setPosition = function( anyway ) {
        if ( !o.direction || anyway ) return o.elem.css({left: o.left, top: o.top});
        if ( o.direction == 'h' ) return o.elem.css('left', o.left);
        if ( o.direction == 'v' ) return o.elem.css('top', o.top);
    }

    o.checkPosition = function() {
        if (!o.edge) return false;
		
        var shifted = false;
		
        if ( o.autoscroll && o.elem.parent() ) { // not finished yet
            if ( o.left < o.edge.x1 + o.scrollMargin ) {
                o.elem.parent().get(0).scrollLeft -= o.scrollStep;
                if (o.bodyParent) { o.edge.x1 -= o.scrollStep; o.edge.x2 -= o.scrollStep; }
            }
            if ( o.top < o.edge.y1 +  o.scrollMargin ) {
                o.elem.parent().get(0).scrollTop -= o.scrollStep;
                if (o.bodyParent) { o.edge.y1 -= o.scrollStep; o.edge.y2 -= o.scrollStep; }
            }
            if ( o.left + o.w > o.edge.x2 - o.scrollMargin ) {
                o.elem.parent().get(0).scrollLeft += o.scrollStep;
                if (o.bodyParent) { o.edge.x2 += o.scrollStep; o.edge.x1 += o.scrollStep; }
            }
            if ( o.top + o.h > o.edge.y2 -  o.scrollMargin ) {
                o.elem.parent().get(0).scrollTop += o.scrollStep;
                if (o.bodyParent) { o.edge.y2 += o.scrollStep; o.edge.y1 += o.scrollStep; }
            } 
            if (o.edge.x1 < 0) o.edge.x1 = 0;
            if (o.edge.x2 < 0) o.edge.x2 = 0;
            if (o.edge.y1 < 0) o.edge.y1 = 0;
            if (o.edge.y2 < 0) o.edge.y2 = 0;
        }
		
        if ( o.left < o.edge.x1 ) { o.left = o.edge.x1; shifted = true; }
        if ( o.top < o.edge.y1 ) { o.top = o.edge.y1; shifted = true; }
        if ( o.left + o.w > o.edge.x2 ) { o.left = o.edge.x2 - o.w; shifted = true; }
        if ( o.top + o.h > o.edge.y2 ) {o.top = o.edge.y2 - o.h; shifted = true; }
		
        return shifted;
    }

    o.updatePosition = function()
	{
        var ofs = o.elem.offset();
		var pofs = (o.elem.parent())? o.elem.parent().offset(): {left: 0, top: 0};
		
		
        o.left = ofs.left - pofs.left;
        o.top = ofs.top - pofs.top;
		
        if (o.edge)
		{
			o.updateSize(); o.setPosition( o.checkPosition() );
		}
		
        else o.setPosition();
		
        return true;
    }

    o.updateSize = function() {
        o.w = o.elem.width();
        o.h = o.elem.height();
    }

    o.setSize = function (w, h)
	{
        var corrected = false;
        if (!w || w < 1) w = 1;
        if (!h || h < 1) h = 1;
		
        if (o.min)
		{
            if ( w < o.min.w )
			{
				w = o.min.w;
				corrected = true;
			}
			
            if ( h < o.min.h)
			{
				h = o.min.h;
				corrected = true;
			}
        }
		
        if (o.max) {
            if ( w > o.max.w )
			{
				w = o.max.w;
				corrected = true;
			}
			
            if ( h > o.max.h )
			{
				h = o.max.h;
				corrected = true;
			}           
        }   
		     
        if (o.proportion)
		{
            if (w >= h)
			{
                var h1 = Math.ceil( (w*o.proportion.h)/o.proportion.w )
                if (h1 != h) correted = true;
                h = h1;
            }
			
            if (h > w )
			{
                var w1 = Math.ceil( (h*o.proportion.w)/o.proportion.h )
                if (w1 != w) corrected = true;
                w = w1;
            }
        }
		
        if (o.edge)
		{
            if ( o.left + w > o.edge.x2 ) { w = o.edge.x2 - o.left; corrected = true; }
            if ( o.top + h > o.edge.y2 ) { h = o.edge.y2 - o.top; corrected = true; }
        }
		
        o.w = w;
        o.h = h;
		
        o.elem.css({width: o.w, height: o.h});
		
        if (corrected && o.edge && o.checkPosition()) o.setPosition();
		
        return corrected;
    }

    // drop functions
    o.prepareTargetMatrix = function() {
        o.targetMatrix = [];
        o.target.each ( function() {
            var t = $(this);
            var ofs = t.offset();
            var w = t.outerWidth();
            var h = t.outerHeight();
            this.targetPosition = {x1: ofs.left, x2: ofs.left+w, y1: ofs.top, y2: ofs.top+h, t: this};
            var inx = o.targetMatrix.push(this.targetPosition);
        })
        if (o.targetMatrix.length == 0) o.targetMatrix = null;
    }

    o.intersect = function(coord) {
        if (coord.t == o.elem[0] || (o.originalElem && coord.t == o.originalElem[0]) || (coord.t.dynamic && coord.t.dynamic._dragable)) return false;
        switch (o.tolerance ) {
        case 'intersect': 
            if ( o.left+o.w < coord.x1 || o.left > coord.x2 ) return false;
            if ( o.top+o.h < coord.y1 || o.top > coord.y2 ) return false;
            return true;
        case 'leftcorn': 
            if ( o.left > coord.x1 && o.left < coord.x2 && o.top > coord.y1 && o.top < coord.y2 ) return true;
            return false;
        case 'pointer':
            if ( o.prevX >= coord.x1 && o.prevX <= coord.x2 && o.prevY >= coord.y1 && o.prevY <= coord.y2 ) return true;
            return false;
        } 
        return false;
    }

    o.checkTargetMatrix = function(ev) {
        if (!o.targetMatrix) return false;
        var e = o.currentTarget ? o.currentTarget.get(0) : false;
        if (o.currentTarget) { //check if still over the object
            if (o.currentTarget.get(0).targetPosition) {
                if ( !o.intersect(o.currentTarget.get(0).targetPosition)) o.currentTarget = null;
            }
            else o.currentTarget = null;
        }
        if (!o.currentTarget) { 
            if (e && o.out) o.out (o, $(e));
            for (var i = 0; i < o.targetMatrix.length; i++) if (o.intersect(o.targetMatrix[i])) o.currentTarget = $(o.targetMatrix[i].t);
            if (o.currentTarget && o.over) o.over(o, o.currentTarget);
        }
    }

    // move functions
    o.createClone = function(x, y) {
        o.prevPosition = 'absolute';
        o.originalElem = o.elem;
        if (!o.moveReplacer) {
            o.elem = o.elem.clone();
            o.elem.hide().appendTo('body').css({position: 'absolute', left: o.left, top: o.top}).show();
        }
        else {
            o.elem = o.moveReplacer;
            o.left = x - Math.ceil(o.elem.width()/2);
            o.top = y - Math.ceil(o.elem.height()/2);
            o.elem.css({position: 'absolute', left: o.left, top: o.top}).show();
        }
        if ( typeof(o.clone) == 'function') o.clone(o, o.elem);
    }

    o.removeClone = function() {
        if (!o.originalElem) return false;
        if (o.cloneRemove && !o.cloneRemove(o, o.elem) ) {
            o.elem = o.originalElem;
            o.originalElem = null;
            return false;
        }
        o.originalElem.css({left: o.left, top: o.top})
        if (!o.moveReplacer) o.elem.remove();
        else o.elem.hide();
        o.elem = o.originalElem;
        o.originalElem = null;
        o.updatePosition();
    }

    o.mousedown = function (ev)
	{
        if (o._dragable) return false;
		
		var ofs = (o.elem.parent())? o.elem.parent().offset(): {left: 0, top: 0};
		
        o.prevX = ev.clientX;+document.body.scrollLeft - ofs.left;
        o.prevY = ev.clientY;+document.body.scrollTop - ofs.top;
		
        ofs = o.elem.offset();
        o.left = ofs.left;
        o.top = ofs.top;
		
        if (o.clone || o.moveReplacer)			o.createClone(o.prevX, o.prevY);
		
        if (o.zIndex)
		{
            o.initialIndex = o.elem.css('z-index')  ||  1;
            o.elem.css('z-index', o.zIndex);
        }
		
        o._dragable = true;
		
        if (o.opacity)							o.elem.css('opacity', o.opacity);
        if (o.renewTarget)						o.target = $(o.options.target);
        if (o.target && o.target.length > 0)	o.prepareTargetMatrix();
        if (o.resizeHandler)					o.toggleHandler( false );
        if (!o.prevPosition)					o.prevPosition = o.elem.css('position');
        if (o.prevPosition != 'absolute')		o.elem.css({position: 'absolute', left: o.left, top: o.top})
        if (o.start)							o.start(o, ev);
		
		
		o.elem.children('a#stage-zone-link').bind('click', function (e) { return false; });
        return false;
    }

    o.onmove = function (ev)
	{
        if (!o._dragable) return false;
		
		var ofs = (o.elem.parent() && o.r)? o.elem.parent().offset(): {left: 0, top: 0};
        var mx = ev.clientX+document.body.scrollLeft - ofs.left;
        var my = ev.clientY+document.body.scrollTop - ofs.top;
		
        o.left += mx - o.prevX;
        o.top += my - o.prevY;
        o.prevX = mx;
        o.prevY = my;
		
        if (o.edge) o.checkPosition();
		
        o.setPosition();
		
        if (o.targetMatrix) o.checkTargetMatrix();
        if (o.move) o.move(o, ev);
        if (o.targetMatrix && o.currentTarget && o.moveover) o.moveover( o, o.currentTarget , ev);
		
        return true;
    }

    o.onmoveend = function()
	{
        if (!o._dragable) return false;
		
        o._dragable = false;
		
        if (o.clone || o.moveReplacer) o.removeClone();
        if (o.opacity && !o.clone) o.elem.css('opacity', o.initialOpacity ? o.initialOpacity : '1');
        if (o.initialIndex) o.elem.css('z-index', o.initialIndex);
        if (o.currentTarget && o.drop) o.drop(o, o.currentTarget);
		
        if (o.resizeHandler)
		{
            o.setHandlerPosition();
            o.toggleHandler( true );
        }
		
        o.currentTarget = null;
		
        if (o.prevPosition != 'absolute') o.elem.css('position', o.prevPosition);
        if (o.end) o.end(o);
		
		if (o.r)
		{
			$.get('controls_stage.html', {action: 'editstage', linkleft: o.left, linktop: o.top, bgid: $('#bgid').attr('value')});
		}
		
        return false;
    }

    // resize functions
    o.onResizeStart = function() {
        if (o._resizeable) return false;
        o.prevW = o.w;
        o.prevH = o.h;
        o.prevRX = o.resizeHandler.prevX;
        o.prevRY = o.resizeHandler.prevY;
        if (o.resizeStart) o.resizeStart(o);
        o._resizeable = true;
        return false;
    }

    o.onResizeMove = function()
	{
        if (!o._resizeable) return false;
		
        var w = o.w;
        var h = o.h;
		
        if ( o.resizeDirection != 'h') w += o.resizeHandler.prevX - o.prevRX;
        if ( o.resizeDirection != 'v') h += o.resizeHandler.prevY - o.prevRY;
		
        o.prevRX = o.resizeHandler.prevX;
        o.prevRY = o.resizeHandler.prevY;
        o.setSize(w, h);
        o.setHandlerPosition();
		
        if (o.targetMatrix) o.checkTargetMatrix();
        if (o.resize) o.resize(o);
        if (o.targetMatrix && o.currentTarget && o.moveover) o.moveover( o, o.currentTarget );
        return false;
    }

    o.onResizeEnd = function() {
        if (o.resizeEnd) o.resizeEnd(o);
		
        o._resizeable = false;
		
		if (o.r)
		{
			$.get('controls_stage.html', {action: 'editstage', linkheight: o.h, linklength: o.w, bgid: $('#bgid').attr('value')});
		}
		
        return false;
    }

    o.setHandlerPosition = function() {
        if (o.handlerPosition) return o.handlerPosition( o, o.resizeHandler );
        o.resizeHandler.elem.css({left: (o.left + (o.w - Math.floor(o.resizeHandler.w/2))), top: ( o.top + (o.h - Math.floor(o.resizeHandler.h/2)))  });
    }

    o.toggleHandler = function(state) { o.resizeHandler.elem[ state? 'show':'hide' ](); }

    // init
    o.element = function(elem, parent) {
        if ( typeof(elem) == 'undefined') return null;
        if ( typeof(elem) == 'string') return $(elem, parent);
        if (elem.jquery) return elem;
        return $(elem);
    }

    o.dragable = function() {
        $( function() {
        if (o.d) return false;
        o.moveHandler =  o.options.moveHandler ? o.element(o.options.moveHandler, o.options.moveHandlerOutside ? null : o.elem) : o.elem;
        o.moveHandler.bind('mousedown', o.mousedown);
        $(o.elem.get(0).ownerDocument).bind('mousemove', o.onmove);
        $(o.elem.get(0).ownerDocument).bind('mouseup', o.onmoveend);
        if (!o.autoscroll) $(o.elem.get(0).ownerDocument).bind('scroll', o.onmoveend);
		
        if (o.elem.parent() && !o.edge)
		{
			/*
            if (o.elem.parent().get(0).tagName.toLowerCase() == 'body')
			{
                o.edge = {x1:0, x2: document.body.clientWidth, y1: 0, y2: document.body.clientHeight};
                o.bodyParent = true;
            }
			
            else
			{
			*/
				var ofs = o.elem.parent().offset();
				
				o.edge = {x1: 0, x2: o.elem.parent().width(), y1: 0, y2: o.elem.parent().height()};
            //}
        }
		
        o.d = true;
        }) 
    }

    o.notDragable = function() {
        if (!o.d) return false;
        o.moveHandler.unbind('mousedown', o.mousedown);
        $(o.elem.get(0).ownerDocument).unbind('mousemove', o.onmove);
        $(o.elem.get(0).ownerDocument).unbind('mouseup', o.onmoveend);
        $(o.elem.get(0).ownerDocument).unbind('scroll', o.onmoveend);
        o.target = null;
        o.moveHandler = null;
        o.d = false;
    }

    o.resizeable = function()
	{
        $(function()
		{
	        if (o.r) return false;
			
	        o.resizeHandler = new dynamic($('<div></div>')[0], {edge: o.edge, start: o.onResizeStart, move: o.onResizeMove, end:o.onResizeEnd, noevents: o.noevents, direction: o.resizeDirection, d: true});
	        o.elem.parent().append(o.resizeHandler.elem);
			
	        if (o.options.resizeHandlerClass) o.resizeHandler.elem.addClass(o.options.resizeHandlerClass);
	        else o.resizeHandler.elem.css({backgroundColor: '#FF00CC', width: '9px', height: '9px', position: 'absolute', cursor: 'nw-resize', zIndex: '999'});
	       
			o.resizeHandler.updateSize();
	        o.resizeHandler.checkPosition();
	        o.setSize(o.w, o.h);
	        o.setHandlerPosition();
	        o.r = true;
        })
    }

    o.notResizeable = function() {
        if (!o.r) return false;
		
        o.resizeHandler.notDragable();
        o.resizeHandler.remove();
        o.resizeHandler = null;
		
        o.r = false;
    }

    $(function() {
        o.elem =  o.element( o.options.elem );
        o.updateSize();
        o.updatePosition();
		
        if (o.noevents) return false;
        if (typeof (o.elem.get(0)) == 'undefined') return false;
		
        o.target =  (o.options.target)?  $(o.options.target): null;
		
        if (o.options.d) o.dragable();
        if (o.options.r) o.resizeable();
    })
}

/*
 * DOM node creation for jQuery.
 *
 * Author  :  Sean Gilbertson
 * Created :  2006-01-04
 *
 */

$.create = function() {
	if (arguments.length == 0) {
		return [];
	}
	
	var first_arg = arguments[0];

	/*
	 * In case someone passes in a null object,
	 * assume that they want an empty string.
	 */
	if (first_arg == null) {
		first_arg = "";
	}

	if (first_arg.constructor == String) {
		if (arguments.length > 1) {
			var second_arg = arguments[1];
			
			if (second_arg.constructor == String) {
				var elt = document.createTextNode(first_arg);
				
				var elts = [];
				
				elts.push(elt);

				var siblings = $.create.apply(null, Array.prototype.slice.call(arguments, 1));

				elts = elts.concat(siblings);
				
				return elts;
			} else {
				var elt = document.createElement(first_arg);
				
				/*
				 * Set element attributes.
				 */
				var attributes = arguments[1];

				for (var attr in attributes) {
					$(elt).attr(attr, attributes[attr]);
				}
		
				/*
				 * Add children of this element.
				 */
				var children = arguments[2];

				children = $.create.apply(null, children);

				$(elt).append(children);
		
				/*
				 * If there are more siblings, render those too.
				 */
				if (arguments.length > 3) {
					var siblings = $.create.apply(null, Array.prototype.slice.call(arguments, 3));
					
					return [elt].concat(siblings);
				}
		
				return elt;
			}
		} else {
			return document.createTextNode(first_arg);
		}
	}	else {
		var elts = [];
		
		elts.push(first_arg);

		var siblings = $.create.apply(null, (Array.prototype.slice.call(arguments, 1)));
				
		elts = elts.concat(siblings);
		
		return elts;
	}
}


/* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * Version 2.1
 * 
 * Thanks to 
 * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
 * Tom Leonard for some improvements
 * 
 */
 
/*
 * YSDE: modified attribute checks, possibly because of a jquery version mismatch
 */ 
 
jQuery.fn.extend({
/**
* Returns get parameters.
*
* If the desired param does not exist, null will be returned
*
* To get the document params:
* @example value = $(document).getUrlParam("paramName");
* 
* To get the params of a html-attribut (uses src attribute)
* @example value = $('#imgLink').getUrlParam("paramName");
*/ 
 getUrlParam: function(strParamName){
	  strParamName = escape(unescape(strParamName));
	  
	  var returnVal = new Array();
	  var qString = null;
	  
	  if ($(this).attr("nodeName")=="#document") {
	  	//document-handler
		
		if (window.location.search.search(strParamName) > -1 ){
			
			qString = window.location.search.substr(1,window.location.search.length).split("&");
		}
			
	  //returns void in our version } else if ($(this).attr("src")!="undefined") {
	  } else if ($(this).attr("src")) {
	  	
	  	var strHref = $(this).attr("src")
	  	if ( strHref.indexOf("?") > -1 ){
	    	var strQueryString = strHref.substr(strHref.indexOf("?")+1);
	  		qString = strQueryString.split("&");
	  	}
	  //returns void in our version } else if ($(this).attr("href")!="undefined") {
	  } else if ($(this).attr("href")) {
	  	
	  	var strHref = $(this).attr("href")
	  	if ( strHref.indexOf("?") > -1 ){
	    	var strQueryString = strHref.substr(strHref.indexOf("?")+1);
	  		qString = strQueryString.split("&");
	  	}
	  } else {
	  	return null;
	  }
	  	
	  
	  if (qString==null) return null;
	  
	  
	  for (var i=0;i<qString.length; i++){
			if (escape(unescape(qString[i].split("=")[0])) == strParamName){
				returnVal.push(qString[i].split("=")[1]);
			}
			
	  }
	  
	  
	  if (returnVal.length==0) return null;
	  else if (returnVal.length==1) return returnVal[0];
	  else return returnVal;
	}
});
/*
 ### jQuery Star Rating Plugin v3.12 - 2009-04-16 ###
 * Home: http://www.fyneworks.com/jquery/star-rating/
 * Code: http://code.google.com/p/jquery-star-rating-plugin/
 *
	* Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 ###
 *
 *
 * THE, 090709: div anpassungen ganz unten
 *
*/

/*# AVOID COLLISIONS #*/
;if(window.jQuery) (function($){
/*# AVOID COLLISIONS #*/
	
	// IE6 Background Image Fix
	if ($.browser.msie) try { document.execCommand("BackgroundImageCache", false, true)} catch(e) { };
	// Thanks to http://www.visualjquery.com/rating/rating_redux.html
	
	// plugin initialization
	$.fn.rating = function(options){
	
		
		if(this.length==0) return this; // quick fail
		
		//alert("init rating");
		
		// Handle API methods
		if(typeof arguments[0]=='string'){
			// Perform API methods on individual elements
			if(this.length>1){
				var args = arguments;
				return this.each(function(){
					$.fn.rating.apply($(this), args);
    				});
			};
			// Invoke API method handler
			$.fn.rating[arguments[0]].apply(this, $.makeArray(arguments).slice(1) || []);
			// Quick exit...
			return this;
		};
		
		// Initialize options for this call
		var options = $.extend(
			{}/* new object */,
			$.fn.rating.options/* default options */,
			options || {} /* just-in-time options */
		);
		
		// Allow multiple controls with the same name by making each call unique
		$.fn.rating.calls++;
		
		// loop through each matched element
		this
		 .not('.star-rating-applied')
			.addClass('star-rating-applied')
		.each(function(){
			
			// Load control parameters / find context / etc
			var control, input = $(this);
			var eid = (this.name || 'unnamed-rating').replace(/\[|\]/g, '_').replace(/^\_+|\_+$/g,'');
			var context = $(this.form || document.body);
			
			// FIX: http://code.google.com/p/jquery-star-rating-plugin/issues/detail?id=23
			var raters = context.data('rating');
			if(!raters || raters.call!=$.fn.rating.calls) raters = { count:0, call:$.fn.rating.calls };
			var rater = raters[eid];
			
			// if rater is available, verify that the control still exists
			if(rater) control = rater.data('rating');
			
			if(rater && control)//{// save a byte!
				// add star to control if rater is available and the same control still exists
				control.count++;
				
			//}// save a byte!
			else{
				// create new control if first star or control element was removed/replaced
				
				// Initialize options for this raters
				control = $.extend(
					{}/* new object */,
					options || {} /* current call options */,
					($.metadata? input.metadata(): ($.meta?input.data():null)) || {}, /* metadata options */
					{ count:0, stars: [], inputs: [] }
				);
				
				// increment number of rating controls
				control.serial = raters.count++;
				
				// create rating element
				rater = $('<span class="star-rating-control"/>');
				input.before(rater);
				
				// Mark element for initialization (once all stars are ready)
				rater.addClass('rating-to-be-drawn');
				
				// Accept readOnly setting from 'disabled' property
				if(input.attr('disabled')) control.readOnly = true;
				
				// Create 'cancel' button
				rater.append(
					control.cancel = $('<div class="rating-cancel"><a title="' + control.cancel + '">' + control.cancelValue + '</a></div>')
					.mouseover(function(){
						$(this).rating('drain');
						$(this).addClass('star-rating-hover');
						//$(this).rating('focus');
					})
					.mouseout(function(){
						$(this).rating('draw');
						$(this).removeClass('star-rating-hover');
						//$(this).rating('blur');
					})
					.click(function(){
					 $(this).rating('select');
					})
					.data('rating', control)
				);
				
			}; // first element of group
			
			// insert rating star
			var star = $('<div class="star-rating rater-'+ control.serial +'"><a class="star-rating-star" title="' + (this.title || this.value) + '">' + this.value + '</a></div>');
			rater.append(star);
			
			// inherit attributes from input element
			if(this.id) star.attr('id', this.id);
			if(this.className) star.addClass(this.className);
			
			// Half-stars?
			if(control.half) control.split = 2;
						
			// Prepare division control
			if(typeof control.split=='number' && control.split>0){
				var stw = ($.fn.width ? star.width() : 0) || control.starWidth;
				var spi = (control.count % control.split), spw = Math.floor(stw/control.split);
				star
				// restrict star's width and hide overflow (already in CSS)
				.width(spw)
				// move the star left by using a negative margin
				// this is work-around to IE's stupid box model (position:relative doesn't work)
				//.find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' })
				.find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' })
			};
			
			// readOnly?
			if(control.readOnly)//{ //save a byte!
				// Mark star as readOnly so user can customize display
				star.addClass('star-rating-readonly');
			//}  //save a byte!
			else//{ //save a byte!
			 // Enable hover css effects
				star.addClass('star-rating-live')
				 // Attach mouse events
					.mouseover(function(){
						$(this).rating('fill');
						$(this).rating('focus');
					})
					.mouseout(function(){
						$(this).rating('draw');
						$(this).rating('blur');
					})
					.click(function(){
						$(this).rating('select');
					})
				;
			//}; //save a byte!
			
			// set current selection
			if(this.checked)	control.current = star;
			
			// hide input element
			// THE 090809 Issues with Safari !!!! in disply:none Layer wird dies nicht angewandt ??? !!!
			//input.hide();//???? das funktioniert in Safari bei unsichtbaren layern nicht ....
			input.css("display", "none")
			
			// backward compatibility, form element to plugin
			input.change(function(){
    $(this).rating('select');
   });
			
			// attach reference to star to input element and vice-versa
			star.data('rating.input', input.data('rating.star', star));
			
			// store control information in form (or body when form not available)
			control.stars[control.stars.length] = star[0];
			control.inputs[control.inputs.length] = input[0];
			control.rater = raters[eid] = rater;
			control.context = context;
			
			input.data('rating', control);
			rater.data('rating', control);
			star.data('rating', control);
			context.data('rating', raters);
  }); // each element
		
		// Initialize ratings (first draw)
		$('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');
		
		return this; // don't break the chain...
	};
	
	/*--------------------------------------------------------*/
	
	/*
		### Core functionality and API ###
	*/
	$.extend($.fn.rating, {
		// Used to append a unique serial number to internal control ID
		// each time the plugin is invoked so same name controls can co-exist
		calls: 0,
		
		focus: function(){
			var control = this.data('rating'); if(!control) return this;
			if(!control.focus) return this; // quick fail if not required
			// find data for event
			var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
   // focus handler, as requested by focusdigital.co.uk
			if(control.focus) control.focus.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
		}, // $.fn.rating.focus
		
		blur: function(){
			var control = this.data('rating'); if(!control) return this;
			if(!control.blur) return this; // quick fail if not required
			// find data for event
			var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
   // blur handler, as requested by focusdigital.co.uk
			if(control.blur) control.blur.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
		}, // $.fn.rating.blur
		
		fill: function(){ // fill to the current mouse position.
			var control = this.data('rating'); if(!control) return this;
			// do not execute when control is in read-only mode
			if(control.readOnly) return;
			// Reset all stars and highlight them up to this element
			this.rating('drain');
			this.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-hover');
		},// $.fn.rating.fill
		
		drain: function() { // drain all the stars.
			var control = this.data('rating'); if(!control) return this;
			// do not execute when control is in read-only mode
			if(control.readOnly) return;
			// Reset all stars
			control.rater.children().filter('.rater-'+ control.serial).removeClass('star-rating-on').removeClass('star-rating-hover');
		},// $.fn.rating.drain
		
		draw: function(){ // set value and stars to reflect current selection
			var control = this.data('rating'); if(!control) return this;
			// Clear all stars
			this.rating('drain');
			// Set control value
			if(control.current){
				control.current.data('rating.input').attr('checked','checked');
				control.current.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-on');
			}
			else
			 $(control.inputs).removeAttr('checked');
			// Show/hide 'cancel' button
			control.cancel[control.readOnly || control.required?'hide':'show']();
			// Add/remove read-only classes to remove hand pointer
			this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly');
		},// $.fn.rating.draw
		
		select: function(value){ // select a value
			var control = this.data('rating'); if(!control) return this;
			// do not execute when control is in read-only mode
			if(control.readOnly) return;
			// clear selection
			control.current = null;
			// programmatically (based on user input)
			if(typeof value!='undefined'){
			 // select by index (0 based)
				if(typeof value=='number')
 			 return $(control.stars[value]).rating('select');
				// select by literal value (must be passed as a string
				if(typeof value=='string')
					//return 
					$.each(control.stars, function(){
						if($(this).data('rating.input').val()==value) $(this).rating('select');
					});
			}
			else
				control.current = this[0].tagName=='INPUT' ? 
				 this.data('rating.star') : 
					(this.is('.rater-'+ control.serial) ? this : null);
			
			// Update rating control state
			this.data('rating', control);
			// Update display
			this.rating('draw');
			// find data for event
			var input = $( control.current ? control.current.data('rating.input') : null );
			// click callback, as requested here: http://plugins.jquery.com/node/1655
			if(control.callback) control.callback.apply(input[0], [input.val(), $('a', control.current)[0]]);// callback event
		},// $.fn.rating.select
		
		readOnly: function(toggle, disable){ // make the control read-only (still submits value)
			var control = this.data('rating'); if(!control) return this;
			// setread-only status
			control.readOnly = toggle || toggle==undefined ? true : false;
			// enable/disable control value submission
			if(disable) $(control.inputs).attr("disabled", "disabled");
			else     			$(control.inputs).removeAttr("disabled");
			// Update rating control state
			this.data('rating', control);
			// Update display
			this.rating('draw');
		},// $.fn.rating.readOnly
		
		disable: function(){ // make read-only and never submit value
			this.rating('readOnly', true, true);
		},// $.fn.rating.disable
		
		enable: function(){ // make read/write and submit value
			this.rating('readOnly', false, false);
		}// $.fn.rating.select
		
 });
	
	/*--------------------------------------------------------*/
	
	/*
		### Default Settings ###
		eg.: You can override default control like this:
		$.fn.rating.options.cancel = 'Clear';
	*/
	
	$.fn.rating.options = { //$.extend($.fn.rating, { options: {
			cancel: 'Cancel Rating',   // advisory title for the 'cancel' link
			cancelValue: '',           // value to submit when user click the 'cancel' link
			split: 1,                  // split the star into how many parts?
			
			// Width of star image in case the plugin can't work it out. This can happen if
			// the jQuery.dimensions plugin is not available OR the image is hidden at installation
			starWidth: 10, //,
			
			//NB.: These don't need to be pre-defined (can be undefined/null) so let's save some code!
			//half:     false,         // just a shortcut to control.split = 2
			//required: false,         // disables the 'cancel' button so user can only select one of the specified values
			//readOnly: false,         // disable rating plugin interaction/ values cannot be changed
			//focus:    function(){},  // executed when stars are focused
			//blur:     function(){},  // executed when stars are focused
			//callback: function(){},  // executed when a star is clicked
			
			callback: function() {
				//alert("asdf");
				showRateComment();
				submitRating(this.value);
				
				
			}
			
 }; //} });
	
	/*--------------------------------------------------------*/
	
	/*
		### Default implementation ###
		The plugin will attach itself to file inputs
		with the class 'multi' when the page loads
	*/
	$(function(){
	 $('input[type=radio].star').rating();
	});
	
	
	
/*# AVOID COLLISIONS #*/
})(jQuery);
/*# AVOID COLLISIONS #*/


/**
 * Applications / Modules
 */
 
/* 
	relies on 
		jquery.js
		jquery.getUrlParam.js

*/

var GTHIDETIMEOUT;
var GTOVER;

// hide glossary on click
$(document).bind("click", function(e) 
{
	$('#glossarytooltip').hide();
});

$(document).bind("mouseover", function(e)
{
	var target = $(e.target);
	
	/* Handle Glossary Links */
	if (target.is("a.linktoglossary")) 
	{
		//create tooltip if it does not exist yet
		if ($('#glossarytooltip')!='') 
		{
			var oDiv = document.createElement('div');
			oDiv.id = 'glossarytooltip';
			$('body')[0].appendChild(oDiv);
		}
		
		//we need the article number: get it from the URL of the link
		var art = $(target).getUrlParam('art');
			
		//now we can request the content of the short article per AJAX
		$('#glossarytooltip').html('');
		$('#glossarytooltip').load('glossary_short?art=' + art);
			
		//position the tooltip
		var linkPosition = target.offset();
			
		$('#glossarytooltip').css('top', linkPosition.top);
		$('#glossarytooltip').css('left', linkPosition.left);
		$('#glossarytooltip').show();
		
		e.stopPropagation();
		return false;
	}
	else
	{
		//console.log('is: ' + target.parents('#glossarytooltip').length);
		if (!target.is('#glossarytooltip') && target.parents('#glossarytooltip').length == 0)
		{
			$('#glossarytooltip').hide();	
		}
	}
});
var Rotator = function (list)
{
	this.list 	= list;
	this.active = Math.ceil(Math.random()*100);
	this.mode 	= ($(this.list[0]).children('div.h2 h2')[0])? 'pop' : 'fade'; 
	
	Rotator.pool.push(this);
}

Rotator.pool				= new Array();
Rotator.speed				= 10500;
Rotator.fade				= 1500;

Rotator.prototype.list		= new Object();
Rotator.prototype.temp		= new Object();
Rotator.prototype.active	= -1;

Rotator.init = function ()
{
	$('.rotator ul').each(Rotator.create);
	
	Rotator.show();
}

Rotator.create = function (i)
{
	return new Rotator($(this).children('li'));
}

Rotator.show = function ()
{
	var rotator;
	var i;
	
	for (i = 0; i < this.pool.length; ++i)
	{
		rotator = this.pool[i];
		
		rotator.active = ++rotator.active % rotator.list.length;
		
		if (rotator.active != -1)
		{
			if (rotator.mode == 'fade')
			{	
				rotator.temp = rotator.list.get(rotator.active).cloneNode(true);
				rotator.temp.original = rotator.list.get(rotator.active);
				rotator.list.get(rotator.active).parentNode.appendChild(rotator.temp);
				$(rotator.temp).fadeIn(this.fade, Rotator.fadeInFinished);
			}
			else
		 	{
				$(rotator.list.get(rotator.active)).show();
				SifrManager.paint('.rotator ul');
				
				/*
				sIFR.replaceElement(named
				({
					sSelector: 	".rotator ul li div.h2 h2",
					sFlashSrc: 	"dev_minion_bold_italic.swf",
					sColor: 	"#ffffff",
					sWmode:		"transparent"
				}));
				*/
			}
		}
	}
	
	window.setTimeout('Rotator.hide()', this.speed);
}

Rotator.fadeInFinished = function (i)
{
	$(this.original).show();

	this.parentNode.removeChild(this);
}

Rotator.hide = function ()
{
	var rotator;
	var i;
	
	for (i = 0; i < this.pool.length; ++i)
	{
		rotator = this.pool[i];
		
		if (rotator.active != -1)
		{
			if (rotator.mode == 'fade')
			{	
				rotator.temp = rotator.list.get(rotator.active).cloneNode(true);
				rotator.temp.original = rotator.list.get(rotator.active);
				rotator.list.get(rotator.active).parentNode.appendChild(rotator.temp);
			
				$(rotator.list.get(rotator.active)).hide();
				$(rotator.temp).fadeOut(this.fade, Rotator.fadeOutFinished);
			}
			else
			{
				$(rotator.list.get(rotator.active)).hide();
			}
		}
	}
	
	window.setTimeout('Rotator.show()', this.fade);
}

Rotator.fadeOutFinished = function (i)
{
	this.parentNode.removeChild(this);
}

$(document).ready(Rotator.init);
/**
 * Movieplayer
 *
 * @author Andreas Nebiker
 */

function initMovie(filename, target, width, height, posterframe, autostart)
{
	if (!autostart) {
		autostart = false
	}
	
	// tracking the video request. this generates a hit when
	// 	the player is loaded but no video played
	// 	another video is selected which instantly plays
	// 	a video is selected twice and instantly plays
	pageTracker._trackPageview(filename);	
	
	height = parseInt(height)
		
	var mp = new SWFObject("/static/app/movieplayer/videoplayer.swf", "Player", "100%", "100%", "8", "#000000");

	// src path of the flv file relatively to videoplayer.swf
	mp.addVariable("flvsrc", "./video/" + filename);

	// width and height of the flv file (without the additional height for the control bar of the video player)
	mp.addVariable("flvwidth", width);
	mp.addVariable("flvheight", height);

	// buffer time in seconds
	mp.addVariable("bufferT", "3");

	// autostart?
	mp.addVariable("autostart", autostart);

	// color code f&#252;r time display, play button, pause button and progress bar
	mp.addVariable("fontcolor", "0xFFFFFF");
	
	// add posterframe
	mp.addVariable("startImage", posterframe);
	
	mp.addParam("wmode", "transparent");

	// change height of containing div
	$('#' + target).css('height', (height+40) + "px");

	mp.write(target);
}

$(document).ready(function()
{
	var movie;
	var width;
	var height;
	var current;
	var posterframe;
	
	$('#movieplayer').each(function()
	{
		current 	= $(this);	
		movie		= current.attr('className').split(' ')[0] || '';		
		posterframe = current.attr('className').split(' ')[1] || '';
		width		= current.css('width') || '315';
		width		= parseInt(width);		
		height		= current.css('height') || '236';
		height		= parseInt(height);
		
		initMovie(movie, current.attr('id'), width, height, posterframe);
		
		//mark the playing element (the first one)
		$($($($('.tab-nav-zone').children('div')[0]).children('div')[0]).children('ul').children('li')[0]).addClass('selectedMovie')
		$($('#movieplayer').next().children('ul').children('li')[0]).addClass('selectedMovie')
	});
});
$.extend(LocationSelector.prototype, {
		
	getCountrylistAsHtml: function() {

		var list = [];
		for (var i=0; i < _.countries.length; i++) {
			if (_.countries[i].mz_id && parseInt(_.countries[i].mz_id) > 0) {
				//&#246;ffne M&Z Flash
				list.push('<li><a href="roche_worldwide.htm?mz_id='+_.countries[i].mz_id+'">' +  _.countries[i].title + '</a></li>');
			} else {
				//&#246;ffne Google Map direkt (kein Angaben zu M&Z Flash)
				list.push('<li><a href="roche_worldwide-details.htm?cid='+_.countries[i].id+'">' +  _.countries[i].title + '</a></li>');
			}
		}
		return list.join("");
	}

});
$(document).ready(function(){

	var SLABELS 		= new Array('Search for...', 'Suche nach...');
	var SLABELORIG	= $('#generic-search-input').attr('value');
	var SLABELGOOD	= (SLABELORIG == SLABELS[0] || SLABELORIG == SLABELS[1])? true : false;

	$('#generic-search-input').focus(function(){
		$(this).addClass('focus');
		if ($(this).attr('value') == SLABELORIG && SLABELGOOD){
			$(this).attr('value', '');
		}
	});
	
	$('#generic-search-input').blur(function(){
		$(this).removeClass('focus');
		if (!$(this).attr('value')) {
			$(this).attr('value', SLABELORIG);
		}
	});
});


/*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
 * Adapted version by virtual identity AG
*/

var TB_PRELOAD_IMAGE = RESOURCES_PATH + "img/tb-loading-animation.gif";

var tb_layout = {
	htmlAddWidth:        0,
	htmlAddHeight:      53,
	imageAddWidth:       0,
	imageAddHeight:     53,
	iframeAddWidth:      0,
	iframeAddHeight:     0,
	minHeight:   350 - 150,
	minWidth:    965 - 150,
	paddingHorizontal: 150,
	paddingVertical:   150
}

var tb_snippet = {
	iframeHtml:
		'<p id="TB_caption">{$caption}</p><p id="TB_info">{$info}</p>\
		<p id="TB_closeWindow"><a href="#" id="TB_closeWindowButton">{$close}</a></p>\
		<iframe frameborder="0" hspace="0" src="{$src}" id="TB_iframeContent" name="TB_iframeContent{$uniqueId}" onload="tb_showIframe()" style="width: {$width}px; height:{$height}px;" > </iframe>',
	image:
		'<p id="TB_caption">{$caption}</p><p id="TB_info">{$info}</p>\
		<p id="TB_closeWindow"><a href="#" id="TB_closeWindowButton">{$close}</a></p>\
		<a href="#" id="TB_ImageOff" title="{$close}"><img id="TB_Image" src="{$src}" width="{$width}" height="{$height}" alt="{$caption}"/></a>',
	loader:
		'<div id="TB_load"><img src="{$src}" /></div>'
}

var TB_WIDTH, TB_HEIGHT;

//on page load call tb_init
$(document).ready(function(){
	tb_init('a.thickbox, area.thickbox, input.thickbox'); //pass where to apply thickbox
	imgLoader = new Image(); // preload image
	imgLoader.src = TB_PRELOAD_IMAGE;
});

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
	$(domChunk).click(function() {
		var caption = this.title || this.name || null;
		var url = this.href || this.alt;
		var imageGroup = this.rel || false;
		tb_show(caption, url, imageGroup);
		this.blur();
		return false;
	});
}

function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link

	var layerController = LayerController.getInstance();
	layerController.closeCurrentLayer();

	var queryString = url.replace(/^[^\?]+\??/,'');
	var params = tb_parseQuery(queryString);

	try {
		if (Info.browser.isIEpre7) {
			if (document.getElementById("TB_HideSelect") === null) { // iframe to hide select elements in ie6
				$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
				$("#TB_overlay").click(tb_remove);
			}
		} else {
			if (document.getElementById("TB_overlay") === null) {
				$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
				$("#TB_overlay").click(tb_remove);
			}
		}

		if (tb_detectMacXFF()) {
			$("#TB_overlay").addClass("TB_overlayMacFFBGHack"); //use png overlay so hide flash
		} else {
			$("#TB_overlay").addClass("TB_overlayBG"); //use background and opacity
		}

		caption = params["caption"] || caption || "";
		$("body").append(template(tb_snippet.loader, {src: imgLoader.src})); //add loader to the page
		$("#TB_load").show(); //show loader

		if (url.indexOf("?")!==-1) { //ff there is a query string involved
			var baseURL = url.substr(0, url.indexOf("?"));
		} else {
			var baseURL = url;
		}

		if (baseURL.toLowerCase().match(/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/)) { // code to show images

			var TB_PrevCaption = "";
			var TB_PrevURL     = "";
			var TB_PrevHTML    = "";
			var TB_NextCaption = "";
			var TB_NextURL     = "";
			var TB_NextHTML    = "";
			var TB_imageCount  = "";
			var TB_FoundURL    = false;

			/* not in use yet
			if (imageGroup) {
				var TB_TempArray = $("a[@rel=" + imageGroup + "]").get();
				for (var i = 0; (i < TB_TempArray.length) && (TB_NextHTML === ""); ++i) {
					if (TB_TempArray[i].href != url) {
						if (TB_FoundURL) {
							TB_NextCaption = TB_TempArray[i].title;
							TB_NextURL     = TB_TempArray[i].href;
							TB_NextHTML    = template(tb_snippet.next, _.thickbox.next);
						} else {
							TB_PrevCaption = TB_TempArray[i].title;
							TB_PrevURL     = TB_TempArray[i].href;
							TB_PrevHTML    = template(tb_snippet.prev, _.thickbox.prev);
						}
					} else {
						TB_FoundURL = true;
						TB_imageCount = template(tb_snippet.imageCount(_.thickbox.image, i + 1, _.thickbox.of, TB_TempArray.length));
					}
				}
			}
			*/

			imgPreloader = new Image();
			imgPreloader.onload = function() {
				imgPreloader.onload = null;

				// Resizing large images - orginal by Christian Montoya edited by me.
				var pagesize = tb_getPageSize();
				var x = Math.max(pagesize[0] - tb_layout.paddingHorizontal, tb_layout.minWidth);
				var y = Math.max(pagesize[1] - tb_layout.paddingVertical,   tb_layout.minHeight);
				var imageWidth  = imgPreloader.width;
				var imageHeight = imgPreloader.height;
				if (imageWidth > x) {
					imageHeight = Math.round(imageHeight * x / imageWidth);
					imageWidth = x;
					if (imageHeight > y) {
						imageWidth = Math.round(imageWidth * y / imageHeight);
						imageHeight = y;
					}
				} else if (imageHeight > y) {
					imageWidth = Math.round(imageWidth * y / imageHeight);
					imageHeight = y;
					if (imageWidth > x) {
						imageHeight = Math.round(imageHeight * x / imageWidth);
						imageWidth = x;
					}
				}
				// End Resizing

				TB_WIDTH  = imageWidth  + tb_layout.htmlAddWidth;
				TB_HEIGHT = imageHeight + tb_layout.htmlAddHeight;

				var code = template(tb_snippet.image, {
					caption: caption,
					close: _.thickbox.close,
					height: imageHeight,
					info: TB_imageCount + TB_PrevHTML + TB_NextHTML,
					src: url,
					width: imageWidth
				});

				$("#TB_window").append(code);

				$("#TB_closeWindowButton").click(tb_remove);

				if (TB_PrevHTML !== "") {
					function goPrev() {
						if ($(document).unbind("click",goPrev)) {
							$(document).unbind("click",goPrev);
						}
						$("#TB_window").remove();
						$("body").append("<div id='TB_window'></div>");
						tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
						return false;
					}
					$("#TB_prev").click(goPrev);
				}

				if (!(TB_NextHTML === "")) {
					function goNext(){
						$("#TB_window").remove();
						$("body").append("<div id='TB_window'></div>");
						tb_show(TB_NextCaption, TB_NextURL, imageGroup);
						return false;
					}
					$("#TB_next").click(goNext);

				}

				document.onkeydown = function(e){
					keycode = (e) ? e.which : event.keyCode;

					if(keycode == 27) { // close
						tb_remove();
					} else if (keycode == 190 && TB_NextHTML != "") { // display previous image
						document.onkeydown = "";
						goNext();
					} else if (keycode == 188 && TB_PrevHTML != "") { // display next image
						document.onkeydown = "";
						goPrev();
					}
				};

				tb_position();
				$("#TB_load").remove();
				$("#TB_ImageOff").click(tb_remove);
				$("#TB_window").css("display", "block"); //for safari using css instead of show
			};

			imgPreloader.src = url;

		} else { // code to show html

			var info = params["info"] || "";

			TB_WIDTH      = parseInt(params['width']) + tb_layout.htmlAddWidth;
			TB_HEIGHT     = parseInt(params['height']) + tb_layout.htmlAddHeight;
			IFRAME_WIDTH  = parseInt(params['width']) + tb_layout.iframeAddWidth;
			IFRAME_HEIGHT = parseInt(params['height']) + tb_layout.iframeAddHeight;

			urlNoQuery = url.split('TB_');
			$("#TB_iframeContent").remove();
			if (params["modal"] != "true") { //iframe no modal

				var code = template(tb_snippet.iframeHtml, {
					caption: caption,
					close: _.thickbox.close,
					height: IFRAME_HEIGHT,
					id: Math.round(Math.random()*1000),
					info: info,
					src: urlNoQuery[0],
					width: IFRAME_WIDTH
				});

				$("#TB_window").append(code);
			}

			$("#TB_closeWindowButton").click(tb_remove);

			tb_position();
			if($.browser.safari){ //safari needs help because it will not fire iframe onload
				$("#TB_load").remove();
				$("#TB_window").css("display", "block");
			}
		}

		if(!params['modal']){
			document.onkeyup = function(e) {
				keycode = (e) ? e.which : event.keyCode;
				if (keycode == 27){ // close
					tb_remove();
				}
			};
		}

	} catch(e) {
		//nothing here
	}
}

//helper functions below
function tb_showIframe(){
	$("#TB_load").remove();
	$("#TB_window").css("display", "block");
}

function tb_remove() {
 	$("#TB_imageOff").unbind("click");
	$("#TB_closeWindowButton").unbind("click");
	$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
	$("#TB_load").remove();
	document.onkeydown = "";
	document.onkeyup = "";
	return false;
}

function tb_position() {
	$("#TB_window").css({marginLeft: '-' + Math.round(TB_WIDTH / 2) + 'px', width: TB_WIDTH + 'px', height: TB_HEIGHT + 'px'});
	if (!Info.browser.isIEpre7) {
		$("#TB_window").css({marginTop: '-' + Math.round(TB_HEIGHT / 2) + 'px'});
	}
	tb_appendShadow();
}

function tb_appendShadow() {
	if (tb_detectMacXFF()) {
		return;
	}
	var shadow = {
		TB_topLeft: {
		},
		TB_left: {
			height: (TB_HEIGHT - 17) + "px"
		},
		TB_topRight: {
			left: TB_WIDTH + "px",
			right: "auto"
		},
		TB_right: {
			height: (TB_HEIGHT - 17) + "px",
			left: TB_WIDTH + "px",
			right: "auto"
		},
		TB_bottomLeft: {
			bottom: "auto",
			top: TB_HEIGHT + "px"
		},
		TB_bottom: {
			bottom: "auto",
			top: TB_HEIGHT + "px",
			width: (TB_WIDTH - 8) + "px"
		},
		TB_bottomRight: {
			bottom: "auto",
			left: (TB_WIDTH - 4) + "px",
			right: "auto",
			top: TB_HEIGHT + "px"
		}
	}

	for(id in shadow) {
		$('<div id="' + id + '"></div>').css(shadow[id]).appendTo("#TB_window");
	}
}

function tb_parseQuery(query) {
	var params = {};
	if (query) {
		var pairs = query.split(/[;&]/);
		for (var i = 0, l = pairs.length; i < l ; ++i) {
			var keyVal = pairs[i].split('=');
			if (!keyVal || keyVal.length != 2) {
				continue;
			}
			var key = unescape(keyVal[0]);
			var val = unescape(keyVal[1]);
			// val = val.replace(/\+/g, ' ');
			params[key] = val;
		}
	}
	return params;
}

function tb_getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de && de.clientHeight) || document.body.clientHeight;
	return [w, h];
}

function tb_detectMacXFF() {
	var userAgent = navigator.userAgent.toLowerCase();
	if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
		var ffversion = new Number(RegExp.$1);
		if (ffversion < 3 && userAgent.indexOf('mac') != -1) {
			return true;
		}
	}
}

function template(s, params) {
	for(var key in params) {
		var reg = new RegExp("\\{\\$" + key + "\\}", "g")
		s = s.replace(reg, params[key]);
	}
	return s;
}

/** * SWFAddress 2.2: Deep linking for Flash and Ajax <http://www.asual.com/swfaddress/> * * SWFAddress is (c) 2006-2008 Rostislav Hristov and contributors * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> * */

/**
 * Changed library to revert to plain GA trackPageview() call if no flash click is to be tracked.
 */
 
if(typeof asual=="undefined"){asual={};}if(typeof asual.swfaddress=="undefined"){asual.swfaddress={};}if(typeof asual.util=="undefined"){asual.util={};}asual.util.Browser=new function(){var B=-1,D=navigator.userAgent,H=false,G=false,F=false,A=false,C=false,I=false;var E=function(K,J){return parseFloat(D.substr(D.indexOf(K)+J));};if(A=/Opera/.test(D)){B=parseFloat(navigator.appVersion);}if(H=/MSIE/.test(D)){B=E("MSIE",4);}if(I=/Chrome/.test(D)){B=E("Chrome",7);}if(G=/Camino/.test(D)){B=E("Camino",7);}if(F=(/AppleWebKit/.test(D)&&!I)){B=E("Safari",7);}if(C=(/Firefox/.test(D)&&!G)){B=E("Firefox",8);}this.toString=function(){return "[class Browser]";};this.getVersion=function(){return B;};this.isIE=function(){return H;};this.isSafari=function(){return F;};this.isOpera=function(){return A;};this.isCamino=function(){return G;};this.isFirefox=function(){return C;};this.isChrome=function(){return I;};};asual.util.Events=new function(){var C="DOMContentLoaded",G="onstop",I=window,F=document,B=[],A=asual.util,D=A.Browser;this.toString=function(){return "[class Events]";};this.addListener=function(L,J,K){B.push({o:L,t:J,l:K});if(!(J==C&&(D.isIE()||D.isSafari()))){if(L.addEventListener){L.addEventListener(J,K,false);}else{if(L.attachEvent){L.attachEvent("on"+J,K);}}}};this.removeListener=function(N,K,L){for(var J=0,M;M=B[J];J++){if(M.o==N&&M.t==K&&M.l==L){B.splice(J,1);break;}}if(!(K==C&&(D.isIE()||D.isSafari()))){if(N.removeEventListener){N.removeEventListener(K,L,false);}else{if(N.detachEvent){N.detachEvent("on"+K,L);}}}};var H=function(){for(var K=0,J;J=B[K];K++){if(J.t!=C){A.Events.removeListener(J.o,J.t,J.l);}}};var E=function(){if(F.readyState=="interactive"){function J(){F.detachEvent(G,J);H();};F.attachEvent(G,J);I.setTimeout(function(){F.detachEvent(G,J);},0);}};if(D.isIE()||D.isSafari()){(function(){try{if((D.isIE()&&F.body)||!/loaded|complete/.test(F.readyState)){F.documentElement.doScroll("left");}}catch(K){return setTimeout(arguments.callee,0);}for(var J=0,K;K=B[J];J++){if(K.t==C){K.l.call(null);}}})();}if(D.isIE()){I.attachEvent("onbeforeunload",E);}this.addListener(I,"unload",H);};asual.util.Functions=new function(){this.toString=function(){return "[class Functions]";};this.extend=function(C,A){function B(){};B.prototype=C.prototype;A.prototype=new B();A.prototype.constructor=A;A.superConstructor=C;A.superClass=C.prototype;return A;};this.bind=function(F,B,E){for(var C=2,D,A=[];D=arguments[C];C++){A.push(D);}return function(){return F.apply(B,A);};};};asual.swfaddress.WEBAddressEvent=function(D){var A=asual.swfaddress.WEBAddress;this.toString=function(){return "[object WEBAddressEvent]";};this.type=D;this.target=[A][0];this.value=A.getValue();this.path=A.getPath();this.pathNames=A.getPathNames();this.parameters={};var E=A.getParameterNames();for(var C=0,B=E.length;C<B;C++){this.parameters[E[C]]=A.getParameter(E[C]);}this.parametersNames=E;};asual.swfaddress.WEBAddressEvent.INIT="init";asual.swfaddress.WEBAddressEvent.CHANGE="change";asual.swfaddress.WEBAddress=new function(){var ID="",_2f="function",_30="undefined",_31=asual.swfaddress,_32=asual.util,_33=_32.Browser,_34=_32.Events,_35=_32.Functions,_36=_33.getVersion(),_37=false,_t=top,_d=_t.document,_h=_t.history,_l=_t.location,_si=setInterval,_st=setTimeout,_dc=decodeURIComponent,_ec=encodeURIComponent,_40,_41,_42,_43,_44=_d.title,_45=_h.length,_46=false,_47=false,_48=true,_49=true,_4a=[],_4b={},_4c={history:true,html:false,strict:true,tracker:"_trackDefault"};if(_33.isOpera()){_37=_36>=9.02;}if(_33.isIE()){_37=_36>=6;}if(_33.isSafari()){_37=_36>=312;}if(_33.isChrome()){_37=_36>=0.2;}if(_33.isCamino()){_37=_36>=1;}if(_33.isFirefox()){_37=_36>=1;}if((!_37&&_l.href.indexOf("#")!=-1)||(_33.isSafari()&&_36<418&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write("<html><head><meta http-equiv=\"refresh\" content=\"0;url="+_l.href.substr(0,_l.href.indexOf("#"))+"\" /></head></html>");_d.close();}var _4d=function(){var _4e=_l.href.indexOf("#");return _4e!=-1?_l.href.substr(_4e+1):"";};var _4f=_4d();var _50=function(_51,_52){if(_4c.strict){_51=_52?(_51.substr(0,1)!="/"?"/"+_51:_51):(_51==""?"/":_51);}return _51;};var _53=function(_54){return (_33.isIE()&&_l.protocol=="file:")?_4f.replace(/\?/,"%3F"):_54;};var _55=function(el){for(var i=0,l=el.childNodes.length,s;i<l;i++){if(el.childNodes[i].src){_42=String(el.childNodes[i].src);}if(s=_55(el.childNodes[i])){return s;}}};var _5a=function(){if(_33.isIE()&&_d.title!=_44&&_d.title.indexOf("#")!=-1){_d.title=_44;if(_4c.html&&_40&&_40.contentWindow&&_40.contentWindow.document){_40.contentWindow.document.title=_44;}}};var _5b=function(){if(!_46){var _5c=_4d();var _5d=!(_4f==_5c||_4f==_dc(_5c)||_dc(_4f)==_5c);if(_33.isSafari()&&_36<523){if(_45!=_h.length){_45=_h.length;if(typeof _4a[_45-1]!=_30){_4f=_4a[_45-1];}_5e.call(this);}}else{if(_33.isIE()&&_5d){if(_36<7){_l.reload();}else{this.setValue(_5c);}}else{if(_5d){_4f=_5c;_5e.call(this);}}}_5a.call(this);}};var _5f=function(_60){this.dispatchEvent(new _31.WEBAddressEvent(_60));_60=_60.substr(0,1).toUpperCase()+_60.substr(1);if(typeof this["on"+_60]==_2f){this["on"+_60]();}};var _61=function(){_5f.call(this,"init");};var _62=function(){_5f.call(this,"change");};var _5e=function(){_62.call(this);_st(_35.bind(_63,this),10);};var _64=function(_65){if(typeof urchinTracker==_2f){urchinTracker(_65);}if(typeof pageTracker!=_30&&typeof pageTracker._trackPageview==_2f){pageTracker._trackPageview(_65);}};eval("var _trackDefault = "+_64+";");var _63=function(){if(typeof _4c.tracker!=_30&&eval("typeof "+_4c.tracker+" != \""+_30+"\""))
{
	var fn=eval(_4c.tracker);
	if(typeof fn==_2f)
	{
		if (this.getValue() == '' || this.getValue() == '/')
		{
			fn();
		}
		else
		{
			fn(_dc((_l.pathname+(/\/$/.test(_l.pathname)?"":"/")+this.getValue()).replace(/\/\//,"/").replace(/^\/$/,"")));
		}
	}
}};var _67=function(){var doc=_40.contentWindow.document;doc.open();doc.write("<html><head><title>"+_d.title+"</title><script>var "+ID+" = \""+_ec(_4d())+"\";</script></head></html>");doc.close();};var _69=function(){var win=_40.contentWindow;var src=win.location.href;_4f=(_4c.html)?(src.indexOf("?")>-1?_dc(src.substr(src.indexOf("?")+1)):""):(typeof win[ID]!=_30?_dc(win[ID]):"");if(_4c.html){win.document.title=_44;}if(_4f!=_4d()){_5e.call(_31.WEBAddress);_l.hash=_53(_4f);}};var _6c=function(){if(!_47){_47=true;var _6d="id=\""+ID+"\" style=\"position:absolute;top:-9999px;\"";if(_33.isIE()&&_36<8){_d.body.appendChild(_d.createElement("div")).innerHTML="<iframe "+_6d+" src=\""+(_4c.html?_42.replace(/\.js(\?.*)?$/,".html")+"?"+_ec(_4d()):"javascript:false;")+"\" width=\"0\" height=\"0\"></iframe>";_40=_d.getElementById(ID);_st(function(){_34.addListener(_40,"load",_69);if(!_4c.html&&typeof _40.contentWindow[ID]==_30){_67();}},50);}else{if(_33.isSafari()){if(_36<418){_d.body.innerHTML+="<form "+_6d+" method=\"get\"></form>";_41=_d.getElementById(ID);}if(typeof _l[ID]==_30){_l[ID]={};}if(typeof _l[ID][_l.pathname]!=_30){_4a=_l[ID][_l.pathname].split(",");}}}_st(_35.bind(_61,this),1);_st(_35.bind(_62,this),2);_st(_35.bind(_63,this),10);if(_33.isIE()&&_36>=8){_d.body.onhashchange=_35.bind(_5b,this);_43=_si(_35.bind(_5a,this),50);}else{_43=_si(_35.bind(_5b,this),50);}}};var _6e=function(){clearInterval(_43);};this.onInit=null;this.onChange=null;this.toString=function(){return "[class WEBAddress]";};this.back=function(){_h.back();};this.forward=function(){_h.forward();};this.up=function(){var _6f=this.getPath();this.setValue(_6f.substr(0,_6f.lastIndexOf("/",_6f.length-2)+(_6f.substr(_6f.length-1)=="/"?1:0)));};this.go=function(_70){_h.go(_70);};this.addEventListener=function(_71,_72){if(typeof _4b[_71]==_30){_4b[_71]=[];}_4b[_71].push(_72);};this.removeEventListener=function(_73,_74){if(typeof _4b[_73]!=_30){for(var i=0,l;l=_4b[_73][i];i++){if(l==_74){break;}}_4b[_73].splice(i,1);}};this.dispatchEvent=function(_77){if(this.hasEventListener(_77.type)){_77.target=this;for(var i=0,l;l=_4b[_77.type][i];i++){l(_77);}return true;}return false;};this.hasEventListener=function(_7a){return (typeof _4b[_7a]!=_30&&_4b[_7a].length>0);};this.getBaseURL=function(){var url=_l.href;if(url.indexOf("#")!=-1){url=url.substr(0,url.indexOf("#"));}if(url.substr(url.length-1)=="/"){url=url.substr(0,url.length-1);}return url;};this.getStrict=function(){return _4c.strict;};this.setStrict=function(_7c){_4c.strict=_7c;};this.getHistory=function(){return _4c.history;};this.setHistory=function(_7d){_4c.history=_7d;};this.getTracker=function(){return _4c.tracker;};this.setTracker=function(_7e){_4c.tracker=_7e;};this.getTitle=function(){return _d.title;};this.setTitle=function(_7f){if(!_37){return null;}if(typeof _7f==_30){return;}if(_7f=="null"){_7f="";}_44=_d.title=_7f;_st(function(){if((_49||_4c.html)&&_40&&_40.contentWindow&&_40.contentWindow.document){_40.contentWindow.document.title=_7f;_49=false;}if(!_48&&(_33.isCamino()||_33.isFirefox())){_l.replace(_l.href.indexOf("#")!=-1?_l.href:_l.href+"#");}_48=false;},50);};this.getStatus=function(){return _t.status;};this.setStatus=function(_80){if(typeof _80==_30){return;}if(!_33.isSafari()){_80=_50((_80!="null")?_80:"",true);if(_80=="/"){_80="";}if(!(/http(s)?:\/\//.test(_80))){var _81=_l.href.indexOf("#");_80=(_81==-1?_l.href:_l.href.substr(0,_81))+"#"+_80;}_t.status=_80;}};this.resetStatus=function(){_t.status="";};this.getValue=function(){if(!_37){return null;}return _50(_4f,false);};this.setValue=function(_82){if(!_37){return null;}if(typeof _82==_30){return;}if(_82=="null"){_82="";}_82=_50(_82,true);if(_82=="/"){_82="";}if(_4f==_82||_4f==_dc(_82)||_dc(_4f)==_82){return;}_48=true;_4f=_82;_46=true;_5e.call(_31.WEBAddress);_4a[_h.length]=_4f;if(_33.isSafari()){if(_4c.history){_l[ID][_l.pathname]=_4a.toString();_45=_h.length+1;if(_36<418){if(_l.search==""){_41.action="#"+_4f;_41.submit();}}else{if(_36<523||_4f==""){var evt=_d.createEvent("MouseEvents");evt.initEvent("click",true,true);var _84=_d.createElement("a");_84.href="#"+_4f;_84.dispatchEvent(evt);}else{_l.hash="#"+_4f;}}}else{_l.replace("#"+_4f);}}else{if(_4f!=_4d()){if(_4c.history){_l.hash=(_33.isChrome()?"":"#")+_53(_4f);}else{_l.replace("#"+_4f);}}}if((_33.isIE()&&_36<8)&&_4c.history){if(_4c.html){var loc=_40.contentWindow.location;loc.assign(loc.pathname+"?"+_4d());}else{_st(_67,50);}}if(_33.isSafari()){_st(function(){_46=false;},1);}else{_46=false;}};this.getPath=function(){var _86=this.getValue();return (_86.indexOf("?")!=-1)?_86.split("?")[0]:_86;};this.getPathNames=function(){var _87=this.getPath();var _88=_87.split("/");if(_87.substr(0,1)=="/"||_87.length==0){_88.splice(0,1);}if(_87.substr(_87.length-1,1)=="/"){_88.splice(_88.length-1,1);}return _88;};this.getQueryString=function(){var _89=this.getValue();var _8a=_89.indexOf("?");return (_8a!=-1&&_8a<_89.length)?_89.substr(_8a+1):"";};this.getParameter=function(_8b){var _8c=this.getValue();var _8d=_8c.indexOf("?");if(_8d!=-1){_8c=_8c.substr(_8d+1);var _8e=_8c.split("&");var p,i=_8e.length;while(i--){p=_8e[i].split("=");if(p[0]==_8b){return p[1];}}}return "";};this.getParameterNames=function(){var _91=this.getValue();var _92=_91.indexOf("?");var _93=[];if(_92!=-1){_91=_91.substr(_92+1);if(_91!=""&&_91.indexOf("=")!=-1){var _94=_91.split("&");var i=0;while(i<_94.length){_93.push(_94[i].split("=")[0]);i++;}}}return _93;};if(_37){for(var i=1;i<_45;i++){_4a.push("");}_4a.push(_4d());if(_33.isIE()&&_l.hash!=_4d()){_l.hash="#"+_53(_4d());}_55(document);var _qi=_42.indexOf("?");if(_42&&_qi>-1){var _98,_99=_42.substr(_qi+1).split("&");for(var i=0,p;p=_99[i];i++){_98=p.split("=");if(/^(history|html|strict)$/.test(_98[0])){_4c[_98[0]]=(isNaN(_98[1])?eval(_98[1]):(parseFloat(_98[1])>0));}if(/^tracker$/.test(_98[0])){_4c[_98[0]]=_98[1];}}}if(/file:\/\//.test(_l.href)){_4c.html=false;}var _ei=_42.indexOf(".js"),l;if(_42&&_ei>-1){while(_ei--){l=_42.substr(_ei,1);if(/(\/|\\)/.test(l)){break;}ID=l+ID;}}_5a.call(this);if(window==_t){_34.addListener(document,"DOMContentLoaded",_35.bind(_6c,this));}_34.addListener(_t,"load",_35.bind(_6c,this));_34.addListener(_t,"unload",_35.bind(_6e,this));}else{_63();}};SWFAddressEvent=asual.swfaddress.SWFAddressEvent=function(A){SWFAddressEvent.superConstructor.apply(this,arguments);this.target=[SWFAddress][0];this.toString=function(){return "[object SWFAddressEvent]";};};asual.util.Functions.extend(asual.swfaddress.WEBAddressEvent,SWFAddressEvent);asual.swfaddress.SWFAddressEvent.INIT="init";asual.swfaddress.SWFAddressEvent.CHANGE="change";SWFAddress=asual.swfaddress.SWFAddress=new function(){var _9e="undefined",_t=top,_l=_t.location,_a1=this,_a2=[],_a3=[],_a4={},_a5=asual.util,_a6=asual.util.Functions,_a7=asual.swfaddress.WEBAddress;for(var p in _a7){this[p]=_a7[p];}var _a9=function(_aa){this.dispatchEvent(new SWFAddressEvent(_aa));_aa=_aa.substr(0,1).toUpperCase()+_aa.substr(1);if(typeof this["on"+_aa]=="function"){this["on"+_aa]();}};var _ab=function(e){if(_a3.length>0){var _ad=window.open(_a3[0],_a3[1],eval(_a3[2]));if(typeof _a3[3]!=_9e){eval(_a3[3]);}}_a3=[];};var _ae=function(){if(_a5.Browser.isSafari()){document.body.addEventListener("click",_ab);}_a9.call(this,"init");};var _af=function(){_b0();_a9.call(this,"change");};var _b0=function(){for(var i=0,id,obj,_b4=SWFAddress.getValue(),_b5="setSWFAddressValue";id=_a2[i];i++){obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=_9e){obj.parentNode.so.call(_b5,_b4);}else{if(!(obj&&typeof obj[_b5]!=_9e)){var _b6=obj.getElementsByTagName("object");var _b7=obj.getElementsByTagName("embed");obj=((_b6[0]&&typeof _b6[0][_b5]!=_9e)?_b6[0]:((_b7[0]&&typeof _b7[0][_b5]!=_9e)?_b7[0]:null));}if(obj){obj[_b5](decodeURIComponent(_b4));}}}else{if(obj=document[id]){if(typeof obj[_b5]!=_9e){obj[_b5](_b4);}}}}};this.toString=function(){return "[class SWFAddress]";};this.addEventListener=function(_b8,_b9){if(typeof _a4[_b8]==_9e){_a4[_b8]=[];}_a4[_b8].push(_b9);};this.removeEventListener=function(_ba,_bb){if(typeof _a4[_ba]!=_9e){for(var i=0,l;l=_a4[_ba][i];i++){if(l==_bb){break;}}_a4[_ba].splice(i,1);}};this.dispatchEvent=function(_be){if(typeof _a4[_be.type]!=_9e&&_a4[_be.type].length){_be.target=this;for(var i=0,l;l=_a4[_be.type][i];i++){l(_be);}return true;}return false;};this.hasEventListener=function(_c1){return (typeof _a4[_c1]!=_9e&&_a4[_c1].length>0);};this.href=function(url,_c3){_c3=typeof _c3!=_9e?_c3:"_self";if(_c3=="_self"){self.location.href=url;}else{if(_c3=="_top"){_l.href=url;}else{if(_c3=="_blank"){window.open(url);}else{_t.frames[_c3].location.href=url;}}}};this.popup=function(url,_c5,_c6,_c7){try{var _c8=window.open(url,_c5,eval(_c6));if(typeof _c7!=_9e){eval(_c7);}}catch(ex){}_a3=arguments;};this.getIds=function(){return _a2;};this.getId=function(_c9){return _a2[0];};this.setId=function(id){_a2[0]=id;};this.addId=function(id){this.removeId(id);_a2.push(id);};this.removeId=function(id){for(var i=0;i<_a2.length;i++){if(id==_a2[i]){_a2.splice(i,1);break;}}};this.setValue=function(_ce){if(_a2.length>0!=0&&_a5.Browser.isFirefox()&&navigator.userAgent.indexOf("Mac")!=-1){setTimeout(function(){_a7.setValue.call(SWFAddress,_ce);},500);}else{_a7.setValue.call(this,_ce);}};_a7.addEventListener("init",_a6.bind(_ae,this));_a7.addEventListener("change",_a6.bind(_af,this));(function(){var _cf;if(typeof FlashObject!=_9e){SWFObject=FlashObject;}if(typeof SWFObject!=_9e&&SWFObject.prototype&&SWFObject.prototype.write){var _s1=SWFObject.prototype.write;SWFObject.prototype.write=function(){_cf=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof _cf[0]=="string")?document.getElementById(_cf[0]):_cf[0]).so=this;}var _d1;if(_d1=_s1.apply(this,_cf)){_a1.addId(this.getAttribute("id"));}return _d1;};}if(typeof swfobject!=_9e){var _d2=swfobject.registerObject;swfobject.registerObject=function(){_cf=arguments;_d2.apply(this,_cf);_a1.addId(_cf[0]);};var _d3=swfobject.createSWF;swfobject.createSWF=function(){_cf=arguments;_d3.apply(this,_cf);_a1.addId(_cf[0].id);};var _d4=swfobject.embedSWF;swfobject.embedSWF=function(){_cf=arguments;_d4.apply(this,_cf);_a1.addId(_cf[8].id);};}if(typeof UFO!=_9e){var _u=UFO.create;UFO.create=function(){_cf=arguments;_u.apply(this,_cf);_a1.addId(_cf[0].id);};}if(typeof AC_FL_RunContent!=_9e){var _a=AC_FL_RunContent;AC_FL_RunContent=function(){_cf=arguments;_a.apply(this,_cf);for(var i=0,l=_cf.length;i<l;i++){if(_cf[i]=="id"){_a1.addId(_cf[i+1]);}}};}})();};