/* hoverIntent r5 2007.03.27 */
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);

/* mousewheel v3.0.2 */
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}('(5($){6 c=[\'p\',\'4\'];$.7.q.4={r:5(){8(2.f)g(6 i=c.h;i;)2.f(c[--i],9,j);k 2.l=9},s:5(){8(2.m)g(6 i=c.h;i;)2.m(c[--i],9,j);k 2.l=t}};$.u.v({4:5(a){e a?2.w("4",a):2.x("4")},y:5(a){e 2.z("4",a)}});5 9(a){6 b=[].A.B(C,1),d=0,D=E;a=$.7.F(a||G.7);a.H="4";8(a.n)d=a.n/I;8(a.o)d=-a.o/3;b.J(a,d);e $.7.K.L(2,b)}})(M);',49,49,'||this||mousewheel|function|var|event|if|handler||||delta|return|addEventListener|for|length||false|else|onmousewheel|removeEventListener|wheelDelta|detail|DOMMouseScroll|special|setup|teardown|null|fn|extend|bind|trigger|unmousewheel|unbind|slice|call|arguments|returnValue|true|fix|window|type|120|unshift|handle|apply|jQuery'.split('|'),0,{}));

/*imgPreview v0.22*/
(function(c){c.expr[':'].linkingToImage=function(a,g,e){return!!(c(a).attr(e[3])&&c(a).attr(e[3]).match(/\.(gif|jpe?g|png|bmp)$/i))};c.fn.imgPreview=function(j){var b=c.extend({imgCSS:{},distanceFromCursor:{top:10,left:10},preloadImages:true,onShow:function(){},onHide:function(){},onLoad:function(){},containerID:'imgPreviewContainer',containerLoadingClass:'loading',thumbPrefix:'',srcAttr:'href'},j),d=c('<div/>').attr('id',b.containerID).append('<img/>').hide().css('position','absolute').appendTo('body'),f=c('img',d).css(b.imgCSS),h=this.filter(':linkingToImage('+b.srcAttr+')');function i(a){return a.replace(/(\/?)([^\/]+)$/,'$1'+b.thumbPrefix+'$2')}if(b.preloadImages){(function(a){var g=new Image(),e=arguments.callee;g.src=i(c(h[a]).attr(b.srcAttr));g.onload=function(){h[a+1]&&e(a+1)}})(0)}h.mousemove(function(a){d.css({top:a.pageY+b.distanceFromCursor.top+'px',left:a.pageX+b.distanceFromCursor.left+'px'})}).hover(function(){var a=this;d.addClass(b.containerLoadingClass).show();f.load(function(){d.removeClass(b.containerLoadingClass);f.show();b.onLoad.call(f[0],a)}).attr('src',i(c(a).attr(b.srcAttr)));b.onShow.call(d[0],a)},function(){d.hide();f.unbind('load').attr('src','').hide();b.onHide.call(d[0],this)});return this}})(jQuery);

/* easing v1.3 */
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}('h.i[\'E\']=h.i[\'y\'];h.F(h.i,{z:\'A\',y:9(x,t,b,c,d){6 h.i[h.i.z](x,t,b,c,d)},G:9(x,t,b,c,d){6 c*(t/=d)*t+b},A:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},H:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},I:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},K:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},L:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},N:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},O:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},P:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},R:9(x,t,b,c,d){6-c*8.B(t/d*(8.g/2))+c+b},S:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},T:9(x,t,b,c,d){6-c/2*(8.B(8.g*t/d)-1)+b},U:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},V:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},X:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},Y:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Z:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},11:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.r(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.u(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},12:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.r(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.u(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},13:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.r(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.u(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},14:9(x,t,b,c,d,s){e(s==v)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},15:9(x,t,b,c,d,s){e(s==v)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==v)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.C))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.C))+1)*t+s)+2)+b},D:9(x,t,b,c,d){6 c-h.i.w(x,d-t,0,c,d)+b},w:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.17/2.k))*t+.18)+b}m{6 c*(7.q*(t-=(2.19/2.k))*t+.1a)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.D(x,t*2,0,c,d)*.5+b;6 h.i.w(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|abs|||asin|undefined|easeOutBounce||swing|def|easeOutQuad|cos|525|easeInBounce|jswing|extend|easeInQuad|easeInOutQuad|easeInCubic|easeOutCubic|easeInOutCubic|easeInQuart|easeOutQuart|easeInOutQuart|easeInQuint|easeOutQuint|easeInOutQuint|easeInSine|easeOutSine|easeInOutSine|easeInExpo|easeOutExpo|easeInOutExpo|easeInCirc|easeOutCirc|easeInOutCirc||easeInElastic|easeOutElastic|easeInOutElastic|easeInBack|easeOutBack|easeInOutBack|25|9375|625|984375|easeInOutBounce'.split('|'),0,{}));

/* roundabout v.1.1 */
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}('6.2v({1t:{1u:\'1G\',1G:l(r,a,t){q{x:C.1H(r+a),y:(C.1H(r+3*C.19/2+a)/8)*t,z:(C.2w(r+a)+1)/2,J:(C.1H(r+C.19/2+a)/2)+0.5}}}});6.F.n=l(){m f=(s p[0]!=\'21\')?{}:p[0];f={O:(s f.O==\'G\')?0.0:6.u(f.O%v.0),K:(s f.K==\'G\')?0.0:6.u(f.K),T:(s f.T==\'G\')?2x:1i(f.T,10),Y:(s f.Y==\'G\')?2y:1i(f.Y,10),Z:(s f.Z==\'G\')?0.22:6.u(f.Z),11:(s f.11==\'G\')?1.23:6.u(f.11),12:(s f.12==\'G\')?0.22:6.u(f.12),13:(s f.13==\'G\')?1.23:6.u(f.13),1a:(s f.1a==\'G\')?2z:1i(f.1a,10),1v:f.1v||L,1w:f.1w||L,w:f.w||\'24\',1j:(f.1j!==U),1b:(s f.1b==\'G\')?0.0:6.u(f.1b%v.0),14:f.14||\'1G\',1k:f.1k||U,M:f.M||\'2A\',1l:(s f.1l==\'G\')?L:1i(f.1l,10),V:(s f.V==\'G\'||f.V===U)?U:Q};7.E(l(i){m b=6(7);m c=6.u(v.0/b.15(f.M).25);m d=(f.1l===L)?f.O:f.1l*c;b.1I(\'n-2B\').A(\'26\',0).A(\'27\',\'2C\').A(\'z-1x\',f.T);b.k(\'n\',{\'O\':d,\'K\':f.K,\'T\':f.T,\'Y\':f.Y,\'Z\':f.Z,\'11\':f.11,\'12\':f.12,\'13\':f.13,\'1a\':f.1a,\'w\':f.w,\'1j\':f.1j,\'1b\':f.1b,\'N\':0,\'1y\':-1,\'14\':f.14,\'1z\':c,\'1k\':f.1k,\'M\':f.M,\'V\':f.V});o(f.1j===Q){b.15(f.M).E(l(i){6(7).1J(l(e){m a=(f.V===Q)?v.0-(c*i):c*i;a=6.u(a);o(!6.1K(b,a)){e.1L();o(b.k(\'n\').N===0){b.1M(a)}q U}})})}o(f.1v){6(f.1v).28(\'1J.n\',l(e){e.1L();o(b.k(\'n\').N===0){b.29()}q U})}o(f.1w){6(f.1w).28(\'1J.n\',l(e){e.1L();o(b.k(\'n\').N===0){b.2a()}q U})}});7.2b();o(s p[1]===\'l\'){m g=p[1],P=7;1m(l(){g(P)},0)}q 7};6.F.2b=l(){7.E(l(i){m b=6(7);m c=b.k(\'n\');m d=b.15(c.M);d.E(l(i){m a=(c.V===Q)?v.0-(c.1z*i):c.1z*i;6(7).1I(\'n-2D-2E\').A(\'27\',\'2F\');6(7).k(\'n\',{\'2c\':6(7).B(),\'2d\':6(7).H(),\'2e\':1i(6(7).A(\'16-1c\'),10),\'1A\':a})});b.1d()});q 7};6.F.2G=l(a){7.E(l(i){6(7).k(\'n\').K=a;6(7).1d()});o(s p[1]===\'l\'){m b=p[1],P=7;1m(l(){b(P)},0)}q 7};6.F.1N=l(a){7.E(l(i){6(7).k(\'n\').O=6.u(a%v,2);6(7).1d()});o(s p[1]===\'l\'){m b=p[1],P=7;1m(l(){b(P)},0)}q 7};6.F.2H=l(a){a=6.u(a);o(a!==0){7.E(l(i){6(7).k(\'n\').O=6.W(6(7))+a;6(7).1d()})}o(s p[1]===\'l\'){m b=p[1],P=7;1m(l(){b(P)},0)}q 7};6.F.2I=l(a){a=6.u(a);o(a!==0){7.E(l(i){6(7).k(\'n\').K=6.u(6(7).2J(\'K\')+a);6(7).1d()})}o(s p[1]===\'l\'){m b=p[1],P=7;1m(l(){b(P)},0)}q 7};6.F.1O=l(d){d=6.u(d);m e=2K 2L();m f=(s p[1]==\'G\')?L:p[1];m g=(s p[2]==\'G\')?L:p[2];m h=(s p[3]!==\'21\')?L:p[3];7.E(l(i){m a=6(7),k=a.k(\'n\'),1e,1P,1B;m b=(f===L)?k.1a:f;m c=(g!==L)?g:k.w||\'24\';o(h===L){h={2f:e,1n:6.W(a),1C:b}}1e=e-h.2f;o(1e<b){k.N=1;o(s 6.w.1u==\'2M\'){1P=6.w[c]||6.w[6.w.1u];1B=1P(L,1e,h.1n,d-h.1n,h.1C)}1D{1B=6.w[c]((1e/h.1C),1e,h.1n,d-h.1n,h.1C)}a.1N(1B,l(){a.1O(d,b,c,h)})}1D{d=(d<0)?d+v:d%v;k.N=0;a.1N(d)}});q 7};6.F.1E=l(a){m b=p[1],w=p[2];7.E(l(i){a=6.W(6(7))+6.u(a);6(7).1O(a,b,w)});q 7};6.F.2N=l(c){m d=p[1],w=p[2];7.E(l(i){m a=6(7),k=a.k(\'n\');o(k.1y!==c&&k.N===0){m b=6(a.15(k.M)[c]);a.1M(b.k(\'n\').1A,d,w)}});q 7};6.F.1Q=l(f,g){m h=f[0],w=f[1];7.E(l(i){m a=6(7).k(\'n\');m b=6.u(v.0-6.W(6(7)));m c=a.1z,j=0,I;m d=a.V;m e=6(7).15(a.M).25;b=(d===Q)?b%v.0:b;o(a.N===0){o((d===U&&g===\'1R\')||(d===Q&&g!==\'1R\')){b=(b===0)?v:b;1F(Q&&j<e){I={1o:6.u(c*j),R:6.u(c*(j+1))};I.R=(j==e-1)?v.0:I.R;o(b<=I.R&&b>I.1o){6(7).1E(b-I.1o,h,w);2g}j++}}1D{1F(Q){I={1o:6.u(c*j),R:6.u(c*(j+1))};I.R=(j==e-1)?v.0:I.R;o(b>=I.1o&&b<I.R){6(7).1E(b-I.R,h,w);2g}j++}}}});q 7};6.F.29=l(){q 7.1Q(p,\'1R\')};6.F.2a=l(){q 7.1Q(p,\'2O\')};6.F.1M=l(b){m c=p[1],w=p[2];7.E(l(i){m a=6.W(6(7))-b;a=(C.2h(v.0-a)<C.2h(0.0-a))?v.0-a:0.0-a;a=(a>2i)?-(v.0-a):a;o(a!==0){6(7).1E(a,c,w)}});q 7};6.F.1d=l(){7.E(l(i){m a=6(7),k=a.k(\'n\');m b=-1;m c={O:6.W(a),K:k.K,1p:{B:C.2j(a.B()*0.9),H:C.2j(a.H()*0.9)},N:k.N,1S:k.1y,2k:6.1T(k.1b),14:6.1t[k.14]||6.1t[6.1t.1u]};c.1q={B:c.1p.B/2,H:c.1p.H/2};c.1U={B:c.1q.B+c.1p.B*0.2l,H:c.1q.H+c.1p.H*0.2l};c.1V={1f:k.T,1W:k.Y,1g:k.Y-k.T};c.1h={1f:k.Z,1W:k.11,1g:k.11-k.Z};c.J={1f:k.12,1W:k.13,1g:k.13-k.12};a.15(k.M).E(l(i){o(6.2m(6(7),a,c,i)&&c.N===0){b=i;6(7).1I(\'n-2n-1X\')}1D{6(7).2P(\'n-2n-1X\')}});o(b!==c.1S){6.1Y(a,c.1S,\'2Q\');o(b!==-1){6.1Y(a,b,\'1X\')}k.1y=b}});q 7};6.W=l(a){q 6.u(a.k(\'n\').O)%v};6.1T=l(a){q(a%v.0)*C.19/2i.0};6.1K=l(a,b){q(6.W(a)%v===(b%v))};6.1Y=l(a,b,c){q(b<0)?7:6(a.15(a.k(\'n\').M)[b]).2R(c)};6.u=l(a){a=C.2o(2p(a)*2q)/2q;q 2p(a.X(2))};6.2m=l(a,b,c,d){m e=6(a),k=e.k(\'n\'),S=[];m f=6.1T((v.0-e.k(\'n\').1A)+c.O);1F(f<0){f=f+C.19*2}1F(f>C.19*2){f=f-C.19*2}m g=c.14(f,c.2k,c.K);g.J=(g.J>1)?1:g.J;g.1r=(c.J.1f+(c.J.1g*g.J)).X(4);g.B=(g.1r*k.2c).X(4);g.H=(g.1r*k.2d).X(4);e.A(\'1Z\',((g.x*c.1q.B+c.1U.B)-g.B/2.0).X(1)+\'1s\').A(\'20\',((g.y*c.1q.H+c.1U.H)-g.H/2.0).X(1)+\'1s\').A(\'B\',g.B+\'1s\').A(\'H\',g.H+\'1s\').A(\'1h\',(c.1h.1f+(c.1h.1g*g.J)).X(2)).A(\'z-1x\',C.2o(c.1V.1f+(c.1V.1g*g.z))).A(\'16-1c\',(g.1r*k.2e).X(2)+\'1s\').2r(\'2s-J\',g.1r);o(b.k(\'n\').1k===Q){S.17(\'<2t 2u="16-2S: 2T; 16-1c: 2U; 26: 2V; B: \'+e.A(\'B\')+\'; 2W-2X: #2Y;">\');S.17(\'<D 2u="16-1c: 2Z; 30-31: 32;">33 \'+d+\'</D><18 />\');S.17(\'<D>1Z:</D> \'+e.A(\'1Z\')+\'<18 /><D>20:</D> \'+e.A(\'20\')+\'<18 />\');S.17(\'<D>B:</D> \'+e.A(\'B\')+\'<18 /><D>1h:</D> \'+e.A(\'1h\')+\'<18 />\');S.17(\'<D>z-1x:</D> \'+e.A(\'z-1x\')+\'<18 /><D>16-1c:</D> \'+e.A(\'16-1c\')+\'<18 />\');S.17(\'<D>J:</D> \'+e.2r(\'2s-J\'));S.17(\'</2t>\');e.34(S.35(\'\'))}q 6.1K(b,e.k(\'n\').1A)};',62,192,'||||||jQuery|this|||||||||||||data|function|var|roundabout|if|arguments|return||typeof||roundabout_toFloat|360|easing||||css|width|Math|strong|each|fn|undefined|height|range|scale|tilt|null|childSelector|animating|bearing|ref|true|upper|out|minZ|false|reflect|roundabout_getBearing|toFixed|maxZ|minOpacity||maxOpacity|minScale|maxScale|shape|children|font|push|br|PI|duration|focusBearing|size|roundabout_updateChildPositions|timer|min|diff|opacity|parseInt|clickToFocus|debug|startingChild|setTimeout|start|lower|stage|midStage|adjustedScale|px|roundabout_shape|def|btnNext|btnPrev|index|childInFocus|period|degrees|newBearing|totalTime|else|roundabout_animateToDelta|while|lazySusan|sin|addClass|click|roundabout_isInFocus|preventDefault|roundabout_animateAngleToFocus|roundabout_setBearing|roundabout_animateToBearing|easingFn|roundabout_animateToNearbyChild|next|inFocus|roundabout_degToRad|nudge|zValues|max|focus|roundabout_triggerEvent|left|top|object|40|00|swing|length|padding|position|bind|roundabout_animateToNextChild|roundabout_animateToPreviousChild|roundabout_startChildren|startWidth|startHeight|startFontSize|timerStart|break|abs|180|floor|focusBearingRad|05|roundabout_updateChildPosition|in|round|parseFloat|1000|attr|current|div|style|extend|cos|100|400|600|li|holder|relative|moveable|item|absolute|roundabout_setTilt|roundabout_adjustBearing|roundabout_adjustTilt|roundabout_get|new|Date|string|roundabout_animateToChild|previous|removeClass|blur|trigger|weight|normal|10px|2px|background|color|ffc|12px|white|space|nowrap|Child|html|join'.split('|'),0,{}));

/* youtubeplaylist v1.2 */
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}('1o.1p.Q=7(a){s(3.1q(a)===0)};12.1r.1s=7(l){4 l=12.1t({R:\'1u\',E:1v,F:1w,13:G,14:\'15\',S:G,16:J,17:J,K:G},l);s 3.L(7(){4 f=$(3);4 g="";4 h="&18=0";4 j="";5(l.16)g="&1x=1";5(l.17)h="&18=1";5(l.K)j="&1y=1";7 T(a){4 b=\'\';b+=\'<19 n="\'+l.E+\'" t="\'+l.F+\'">\';b+=\'<u U="1z" V="o://M.w.y/v/\'+a+g+h+j+\'"> </u>\';b+=\'<u U="1a" V="1b"> </u>\';5(l.K){b+=\'<u U="W" V="J"> </u>\'}b+=\'<X H="o://M.w.y/v/\'+a+g+h+j+\'"\';5(l.K){b+=\' W="J" \'}b+=\'1A="1B/x-1C-1D" 1a="1b"  n="\'+l.E+\'" t="\'+l.F+\'"></X>\';b+=\'</19>\';s b};7 1E(a){4 b=\'\';b+=\'<1c t="\'+l.F+\'" n="\'+l.E+\'"\';b+=\' H="o://M.w.y/X/\'+a+\'" 1F="0"\';1G+=\' W></1c>\'}7 1d(a){4 b=a.1H("[\\\\?&]v=([^&#]*)");b=b[1];s b};f.z(\'8\').L(7(){$(3).I(\'a\').L(7(){4 a=$(3).p(\'Y\');5(a.Q(\'o://M.w.y\')){$(3).m(\'9-N\');$(3).A(\'9-B\',1d(a))}q 5(a.Q(\'o://1I.1J\')){$(3).m(\'9-N\');4 b=a.1K(a.1L("/")+1);$(3).A(\'9-B\',b)}q{$(3).m(\'r-1e\')}})});f.z("8").z("a.9-N").Z(7(){5(l.S){$("8.6").O("6");$(3).C("8").m("6").D(T($(3).A("9-B")))}q{$("#"+l.R+"").D(T($(3).A("9-B")));$(3).C().C("1f").I("8.6").O("6");$(3).C("8").m("6")}s G});f.I("a.r-1e").Z(7(){4 a=$(\'<r/>\');a.p({H:$(3).p(\'Y\')}).P({1M:\'1N\',1g:\'1O\',1P:\'1h\',11:\'1Q%\'});5(l.S){$("8.6").O("6");$(3).C("8").m("6").D(a)}q{$("#"+l.R+"").D(a);$(3).1R("1f").I("8.6").O("6");$(3).C("8").m("6")}1S(7(){5(a.n()<a.t()){a.t(l.F).P(\'1T-11\',1U(a.n()/-2,10)).P({n:\'1i\'})}q{a.P({n:l.E,t:\'1i\',11:\'1h\',1g:\'1V\'})}a.1W()},1X);s G});5(l.13){f.z().L(7(i){4 a=$(3).I(\'a:1j\');4 b=$(3).1Y();5(a.1Z(\'9-N\')){5(l.14==\'15\'){4 c="o://r.w.y/1k/"+a.A("9-B")+"/2.1l"}q{4 c="o://r.w.y/1k/"+a.A("9-B")+"/0.1l"}4 d="<r H=\'"+c+"\' 20=\'"+b+"\' />";a.1m().D(d+b).p("1n",b)}q{4 e=$(\'<r/>\').p(\'H\',a.p(\'Y\'));a.1m().D(e).p("1n",b)}})}4 k=f.z("8:1j-21").m("6").z("a").Z()})};',62,126,'|||this|var|if|currentvideo|function|li|yt|||||||||||||addClass|height|http|attr|else|img|return|width|param||youtube||com|children|data|id|parent|html|playerHeight|playerWidth|false|src|find|true|allowFullScreen|each|www|vid|removeClass|css|startsWith|holderId|showInline|playOld|name|value|allowfullscreen|embed|href|click||top|jQuery|addThumbs|thumbSize|small|autoPlay|showRelated|rel|object|wmode|transparent|iframe|youtubeid|link|ul|position|0px|auto|first|vi|jpg|empty|title|String|prototype|indexOf|fn|ytplaylist|extend|ytvideo|380|600|autoplay|fs|movie|type|application|shockwave|flash|playNew|frameborder|hml|match|youtu|be|substr|lastIndexOf|display|none|absolute|left|50|closest|setTimeout|margin|parseInt|relative|fadeIn|100|text|hasClass|alt|child'.split('|'),0,{}));

/* colorbox v1.3.17.2 */
(function(a,b,c){function bc(b){if(!U){P=b,_(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1));if(!S){S=T=!0,r.show();if(K.returnFocus)try{P.blur(),a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=Z(K.initialWidth,"x"),K.h=Z(K.initialHeight,"y"),X.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),ba(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}X.load(!0)}}function bb(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop)a=setTimeout(X.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(X.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,d),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function ba(b,c){c&&c.call(P),a.event.trigger(b)}function _(b){K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.substring(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function $(a){return K.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function Y(c,d,e){e=b.createElement("div"),c&&(e.id=f+c),e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;X=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{};if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bc(f[0]);return f},X.init=function(){z=a(c),r=Y().attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y("Overlay",o?"position:absolute":"").hide(),s=Y("Wrapper"),t=Y("Content").append(A=Y("LoadedContent","width:0; height:0; overflow:hidden"),C=Y("LoadingOverlay").add(Y("LoadingGraphic")),D=Y("Title"),E=Y("Current"),G=Y("Next"),H=Y("Previous"),F=Y("Slideshow").bind(h,bb),I=Y("Close")),s.append(Y().append(Y("TopLeft"),u=Y("TopCenter"),Y("TopRight")),Y(!1,"clear:left").append(v=Y("MiddleLeft"),t,w=Y("MiddleRight")),Y(!1,"clear:left").append(Y("BottomLeft"),x=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"}),B=Y(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),t.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){X.next()}),H.click(function(){X.prev()}),I.click(function(){X.close()}),J=G.add(H).add(E).add(F),t.children().removeClass("hover"),q.click(function(){K.overlayClose&&X.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),X.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})},X.remove=function(){r.add(q).remove(),a("."+g).removeData(e).removeClass(g)},X.position=function(a,c){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var d=0,e=0;z.unbind("resize."+f),r.hide(),K.fixed&&!o?r.css({position:"fixed"}):(d=z.scrollTop(),e=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?e+=Math.max(z.width()-K.w-O-M-Z(K.right,"x"),0):K.left!==!1?e+=Z(K.left,"x"):e+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?d+=Math.max(b.documentElement.clientHeight-K.h-N-L-Z(K.bottom,"y"),0):K.top!==!1?d+=Z(K.top,"y"):d+=Math.round(Math.max(b.documentElement.clientHeight-K.h-N-L,0)/2),r.show(),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:d,left:e},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",c&&c(),setTimeout(function(){z.bind("resize."+f,X.position)},1)},step:function(){g(this)}})},X.resize=function(a){if(S){a=a||{},a.width&&(K.w=Z(a.width,"x")-O-M),a.innerWidth&&(K.w=Z(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=Z(a.height,"y")-N-L),a.innerHeight&&(K.h=Z(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=A.wrapInner("<div style='overflow:auto'></div>").children();K.h=b.height(),b.replaceWith(b.children())}A.css({height:K.h}),X.position(K.transition==="none"?0:K.speed)}},X.prep=function(b){function h(){K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h;return K.h}function g(){K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w;return K.w}if(!!S){var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y("LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function o(){n&&r[0].style.removeAttribute("filter")}var b,c,g,h,i=y.length,k,l;!S||(l=function(){clearTimeout(W),C.hide(),ba(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show(),i>1?(typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",i)).show(),G[K.loop||Q<i-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),b=Q?y[Q-1]:y[i-1],g=Q<i-1?y[Q+1]:y[0],K.slideshow&&F.show(),K.preloading&&(h=a.data(g,e).href||g.href,c=a.data(b,e).href||b.href,h=a.isFunction(h)?h.call(g):h,c=a.isFunction(c)?c.call(b):c,$(h)&&(a("<img/>")[0].src=h),$(c)&&(a("<img/>")[0].src=c))):J.hide(),K.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],K.fastIframe?l():a(k).one("load",l),k.name=f+ +(new Date),k.src=K.href,K.scrolling||(k.scrolling="no"),n&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(A).one(m,function(){k.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,o):o())},K.transition==="fade"?r.fadeTo(d,0,function(){X.position(0,c)}):X.position(d,c)}},X.load=function(b){var c,d,e=X.prep;T=!0,R=!1,P=y[Q],b||_(),ba(m),ba(i,K.onLoad),K.h=K.height?Z(K.height,"y")-N-L:K.innerHeight&&Z(K.innerHeight,"y"),K.w=K.width?Z(K.width,"x")-O-M:K.innerWidth&&Z(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=Z(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=Z(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,W=setTimeout(function(){C.show()},100),K.inline?(Y().hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):$(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Y("Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q<y.length-1||K.loop)&&(R.style.cursor="pointer",R.onclick=function(){X.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},X.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Q<y.length-1?Q+1:0,X.load())},X.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Q?Q-1:y.length-1,X.load())},X.close=function(){S&&!U&&(U=!0,S=!1,ba(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),ba(m),A.remove(),setTimeout(function(){U=!1,ba(l,K.onClosed)},1)}))},X.element=function(){return a(P)},X.settings=d,V=function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),bc(this))},a.fn.delegate?a(b).delegate("."+g,"click",V):a("."+g).live("click",V),a(X.init)})(jQuery,document,this);

/* jQuery.CuteTime v 1.1.3 (4/6/2010) http://tpgblog.com/cutetime/ compiled by http://yui.2clics.net/ */
(function(f){var b=Number.NEGATIVE_INFINITY;var d=Number.POSITIVE_INFINITY;var a="data-timestamp";f.fn.cuteTime=function(n){var m=new Date().getTime();var o;var p;if((typeof n=="object")||(n==undefined)){f.fn.cuteTime.c_settings=f.extend({},f.fn.cuteTime.settings,n);f.fn.cuteTime.the_selected=this;this.each(function(){p=f(this);o=j(p);p.html(c(m-o))});f.fn.cuteTime.start_cuteness()}return this};f.cuteTime=function(n,q){var m=new Date().getTime();var p;var r;var o=null;if(typeof n=="object"){f.fn.cuteTime.c_settings=f.extend({},f.fn.cuteTime.settings,n)}if(typeof n=="string"){o=n}else{if(typeof q=="string"){o=q}}if(o!=null){p=l(o);if(!isNaN(p)){return c(m-p)}else{return"INVALID_DATETIME_FORMAT"}}return this};f.fn.cuteTime.settings={refresh:-1,time_ranges:[{bound:b,cuteness:"en el futuro!",unit_size:0},{bound:0,cuteness:"en este momento",unit_size:0},{bound:20*1000,cuteness:"hace unos segundos",unit_size:0},{bound:60*1000,cuteness:"hace un minuto",unit_size:0},{bound:60*1000*2,cuteness:" minutos atras",unit_size:60*1000},{bound:60*1000*60,cuteness:"hace una hora",unit_size:0},{bound:60*1000*60*2,cuteness:" horas atras",unit_size:60*1000*60},{bound:60*1000*60*24,cuteness:"ayer",unit_size:0},{bound:60*1000*60*24*2,cuteness:" dias atras",unit_size:60*1000*60*24},{bound:60*1000*60*24*30,cuteness:"el mes pasado",unit_size:0},{bound:60*1000*60*24*30*2,cuteness:" meses atras",unit_size:60*1000*60*24*30},{bound:60*1000*60*24*30*12,cuteness:"el a&ntilde;o pasado",unit_size:0},{bound:60*1000*60*24*30*12*2,cuteness:" a&ntilde;os atras",unit_size:60*1000*60*24*30*12},{bound:d,cuteness:"hace un rato",unit_size:0}]};f.fn.cuteTime.start_cuteness=function(){var m=f.fn.cuteTime.c_settings.refresh;if(f.fn.cuteTime.process_tracker==null){if(m>0){f.fn.cuteTime.process_tracker=setInterval("$.fn.cuteTime.update_cuteness()",m)}}else{}return this};f.fn.cuteTime.update_cuteness=function(){var m=new Date().getTime();var o;var n;f.fn.cuteTime.the_selected.each(function(){o=f(this);n=j(o);o.html(c(m-n))})};f.fn.cuteTime.stop_cuteness=function(){if(f.fn.cuteTime.process_tracker!=null){clearInterval(f.fn.cuteTime.process_tracker);f.fn.cuteTime.process_tracker=null}else{}return this};function c(q){var o=f.fn.cuteTime.c_settings.time_ranges;var n,p;var m="";jQuery.each(o,function(r,s){if(r<o.length-1){if((q>=s.bound)&&(q<o[r+1]["bound"])){if(s.unit_size>0){p=Math.floor(q/s.unit_size)}else{p=""}n=s.cuteness.replace(/%CT%/,p);if(n==s.cuteness){m=p+s.cuteness}else{m=n}return false}}else{return false}});if(m==""){m="2 pookies ago"}return m}function l(n){var m;if((new_date=g(n))!=null){m=new_date.valueOf()}else{m=(new Date(n)).valueOf();if(isNaN(m)){m=new Date(n.replace(/-/g," "))}}return m}function g(q){var m=q.match(/^(\d{4})((-(\d{2})(-(\d{2})(T(\d{2}):(\d{2})(:(\d{2})(.(\d+))?)?(Z|(([+-])((\d{2}):(\d{2})))))?)?)?)$/);if(m!=null){var n=new Date();var p=0;var o=0;n.setUTCFullYear(m[1]);if(!e(m[4])){n.setUTCMonth(m[4]-1);if(!e(m[6])){n.setUTCDate(m[6]);if(!e(m[16])){p=m[18];o=m[19];if(m[16]=="-"){p*=-1;o*=-1}}if(!e(m[8])){n.setUTCHours(m[8]-p);n.setUTCMinutes(m[9]-o);if(!e(m[11])){n.setUTCSeconds(m[11]);if(!e(m[13])){n.setUTCMilliseconds(m[13]*1000)}}}}}return n}else{return null}}function e(m){if(null==m||""==m){return true}return false}function j(o){var n=Number.NaN;var m=h(o);if(m!=null){n=l(m)}if(isNaN(n)){m=i(o);if(m!=null){n=l(m)}}if(isNaN(n)){m=new Date().toString();n=l(m)}k(m,o);return n}function h(n){var m=n.attr(a);if(m!=undefined){return m}else{return null}}function k(m,n){n.attr(a,m)}function i(m){return m.text()}})(jQuery);

/*CoverFlow*/
var ContentFlowGlobal={Flows:new Array,AddOns:{},scriptName:"plugins.js",scriptElement:null,Browser:new (function(){this.Opera=window.opera?true:false;this.IE=document.all&&!this.Opera?true:false;this.IE6=this.IE&&typeof (window.XMLHttpRequest)=="undefined"?true:false;this.IE8=this.IE&&typeof (document.querySelectorAll)!="undefined"?true:false;this.IE7=this.IE&&!this.IE6&&!this.IE8?true:false;this.WebKit=/WebKit/i.test(navigator.userAgent)?true:false,this.iPhone=/iPhone|iPod/i.test(navigator.userAgent)?true:false;this.Chrome=/Chrome/i.test(navigator.userAgent)?true:false;this.Safari=/Safari/i.test(navigator.userAgent)&&!this.Chrome?true:false;this.Konqueror=navigator.vendor=="KDE"?true:false;this.Konqueror4=this.Konqueror&&/native code/.test(document.getElementsByClassName)?true:false;this.Gecko=!this.WebKit&&navigator.product=="Gecko"?true:false;this.Gecko19=this.Gecko&&Array.reduce?true:false})(),getAddOnConf:function(A){if(this.AddOns[A]){return this.AddOns[A].conf}else{return{}}},setAddOnConf:function(B,A){this.AddOns[B].setConfig(A)},getScriptElement:function(D){var C=new RegExp(D);var A=document.getElementsByTagName("script");for(var B=0;B<A.length;B++){if(A[B].src&&C.test(A[B].src)){return A[B]}}return""},getScriptPath:function(C,B){var A=new RegExp(B+".*");return C.src.replace(A,"")},addScript:function(B){if(this.Browser.IE||this.Browser.WebKit||this.Browser.Konqueror){document.write('<script type="text/javascript" src="'+B+'"><\/script>')}else{var A=document.createElement("script");A.src=B;A.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(A)}},addScripts:function(C,B){for(var A=0;A<filename.length;A++){this.addScript(basepath+B[A])}},addStylesheet:function(B){if(this.Browser.Gecko19){var A=document.createElement("link");A.setAttribute("rel","stylesheet");A.setAttribute("href",B);A.setAttribute("type","text/css");A.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(A)}else{document.write('<link rel="stylesheet" href="'+B+'" type="text/css" media="screen" />')}},addStylesheets:function(C,B){for(var A=0;A<filename.length;A++){this.addStylesheet(basepath+B[A])}},initPath:function(){this.scriptElement=this.getScriptElement(this.scriptName);if(!this.scriptElement){this.scriptName="plugins.js";this.scriptElement=this.getScriptElement(this.scriptName)}this.BaseDir=this.getScriptPath(this.scriptElement,this.scriptName);if(!this.AddOnBaseDir){this.AddOnBaseDir=this.BaseDir}if(!this.CSSBaseDir){this.CSSBaseDir='css/'}},init:function(){this.addStylesheet(this.CSSBaseDir+"style.css");this.addStylesheet(this.CSSBaseDir+"style.css");this.loadAddOns=new Array();if(this.scriptElement.getAttribute("load")){var A=this.loadAddOns=this.scriptElement.getAttribute("load").replace(/\ +/g," ").split(" ");for(var C=0;C<A.length;C++){if(A[C]==""){continue}this.addScript(this.AddOnBaseDir+"ContentFlowAddOn_"+A[C]+".js")}}var E=this;if(document.addEventListener){if(this.Browser.WebKit){var D=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(D);E.onloadInit()}},10)}else{document.addEventListener("DOMContentLoaded",E.onloadInit,false)}}else{if(this.Browser.IE){document.write("<script id=__ie_cf_onload defer src=javascript:void(0)><\/script>");var B=document.getElementById("__ie_cf_onload");B.onreadystatechange=function(){if(this.readyState=="complete"){E.onloadInit()}}}}window.addEvent("load",E.onloadInit,false)},onloadInit:function(){if(arguments.callee.done){return }for(var C=0;C<ContentFlowGlobal.loadAddOns.length;C++){var A=ContentFlowGlobal.loadAddOns[C];if(!ContentFlowGlobal.AddOns[A]){var G=ContentFlowGlobal;window.setTimeout(G.onloadInit,10);return }}arguments.callee.done=true;if(window.Element&&Element.implement&&document.all&&!window.opera){for(var H in window.CFElement.prototype){if(!window.Element.prototype[H]){var F={};F[H]=window.CFElement.prototype[H];Element.implement(F)}}}for(var C=0;C<ContentFlowGlobal.Flows.length;C++){ContentFlowGlobal.Flows[C].init()}var D=document.getElementsByTagName("div");DIVS:for(var C=0;C<D.length;C++){if(D[C].className.match(/\bContentFlow\b/)){for(var B=0;B<ContentFlowGlobal.Flows.length;B++){if(D[C]==ContentFlowGlobal.Flows[B].Container){continue DIVS}}var E=new ContentFlow(D[C],{},false);E.init()}}}};ContentFlowGlobal.initPath();var ContentFlowAddOn=function(B,A,C){if(typeof C=="undefined"||C!=false){ContentFlowGlobal.AddOns[B]=this}this.name=B;if(!A){A={}}this.methods=A;this.conf={};if(this.methods.conf){this.setConfig(this.methods.conf);delete this.methods.conf}this.scriptpath=ContentFlowGlobal.AddOnBaseDir;if(A.init){var D=A.init.bind(this);D(this)}};ContentFlowAddOn.prototype={Browser:ContentFlowGlobal.Browser,addScript:ContentFlowGlobal.addScript,addScripts:ContentFlowGlobal.addScripts,addStylesheet:function(A){if(!A){A=this.scriptpath+"ContentFlowAddOn_"+this.name+".css"}ContentFlowGlobal.addStylesheet(A)},addStylesheets:ContentFlowGlobal.addStylesheets,setConfig:function(A){for(var B in A){this.conf[B]=A[B]}},_init:function(A){if(this.methods.ContentFlowConf){A.setConfig(this.methods.ContentFlowConf)}}};var ContentFlowGUIElement=function(A,B){B.setDimensions=function(){this.dimensions=this.getDimensions();this.center={x:this.dimensions.width/2,y:this.dimensions.height/2};this.position=this.findPos()};B.addObserver=function(D,E){var C=this.eventMethod=E.bind(A);this.observedEvent=D;this.addEvent(D,C,false)};B.makeDraggable=function(E,D,F){this.stopDrag=function(H){if(!H){var H=window.event}if(this.Browser.iPhone){window.removeEvent("touchemove",E,false);if(!this.ontochmove){var G=H.target;if(G.firstChild){G=G.firstChild}var I=document.createEvent("MouseEvents");I.initEvent("click",true,true);G.dispatchEvent(I)}}else{window.removeEvent("mousemove",E,false)}F(H)}.bind(this);this.initDrag=function(G){if(!G){var G=window.event}var H=G;if(G.touches){H=G.touches[0]}this.mouseX=H.clientX;this.mouseY=H.clientY;D(G)}.bind(this);this.startDrag=function(I){if(!I){var I=window.event}var G=this.stopDrag;if(this.Browser.iPhone){var H=this;H.ontouchmove=false;window.addEvent("touchmove",function(J){H.ontouchmove=true;E(J)},false);I.preventDefault();window.addEvent("touchend",G,false)}else{window.addEvent("mousemove",E,false);window.addEvent("mouseup",G,false)}if(I.preventDefault){I.preventDefault()}}.bind(this);var C=this.startDrag;if(this.Browser.iPhone){this.addEventListener("touchstart",C,false)}else{this.addEvent("mousedown",C,false)}};B.Browser=ContentFlowGlobal.Browser;$CF(B).setDimensions();return B};var ContentFlowItem=function(C,D,E){this.CFobj=C;this._activeElement=C.conf.activeElement;this.pre=null;this.next=null;this.clickItem=function(M){if(!M){var M=window.event}var K=M.target?M.target:M.srcElement;var J=K.itemIndex?K.itemIndex:K.parentNode.itemIndex;var L=this.items[J];if(this._activeItem==L){this.conf.onclickActiveItem(L)}else{if(this.conf.onclickInactiveItem(L)!=false){this.moveToIndex(J)}}}.bind(C),this.setIndex=function(J){this.index=J;this.element.itemIndex=J};this.getIndex=function(){return this.index};if($CF(D).nodeName=="IMG"){var A=document.createElement("div");A.className="item";var I=D.parentNode.replaceChild(A,D);I.className="content";A.appendChild(I);if(D.title){var F=document.createElement("div");F.className="caption";F.innerHTML=D.title;A.appendChild(F)}D=A}this.element=$CF(D);this.item=D;if(typeof E!="undefined"){this.setIndex(E)}this.content=this.element.getChildrenByClassName("content")[0];this.caption=this.element.getChildrenByClassName("caption")[0];this.label=this.element.getChildrenByClassName("label")[0];if(this.content.nodeName=="IMG"){C._imagesToLoad++;var B=function(){C._imagesToLoad--;this.image=this.content;this.setImageFormat(this.image);if(C.conf.reflectionHeight>0){this.addReflection()}this.initClick();C._addItemCueProcess(true)}.bind(this);if(this.content.complete&&this.content.width>0){window.setTimeout(B,100)}else{if(this.Browser.IE&&!this.content.onload){var H=this;var G=window.setInterval(function(){if(H.content.complete&&H.content.width>0){window.clearInterval(G);B()}},10)}else{this.content.onload=window.setTimeout(B,100)}}}else{this.initClick();C._addItemCueProcess(true)}};ContentFlowItem.prototype={Browser:ContentFlowGlobal.Browser,makeActive:function(){this.element.addClassName("active");this.CFobj.conf.onMakeActive(this)},makeInactive:function(){this.element.removeClassName("active");this.CFobj.conf.onMakeInactive(this)},initClick:function(){var A=this.clickItem;this[this._activeElement].addEvent("click",A,false)},setImageFormat:function(A){if(this.Browser.IE6||this.Browser.IE7){A.style.width="auto"}A.origProportion=A.width/A.height;A.setAttribute("origProportion",A.width/A.height);if(this.Browser.IE6||this.Browser.IE7){A.style.width=""}if(A.origProportion<=1){A.addClassName("portray")}else{A.addClassName("landscape")}},addReflection:function(){var F=this.CFobj;var S;var K=this.content;if(this.Browser.IE){var Q="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";if(F._reflectionColorRGB){if(F.conf.reflectionColor=="transparent"){var N=S=this.reflection=document.createElement("img");S.src=K.src}else{S=this.reflection=document.createElement("div");var N=document.createElement("img");N.src=K.src;S.width=N.width;S.height=N.height;N.style.width="100%";N.style.height="100%";var M=F._reflectionColorRGB;S.style.backgroundColor="#"+M.hR+M.hG+M.hB;S.appendChild(N)}Q+=" progid:DXImageTransform.Microsoft.Alpha(opacity=0, finishOpacity=50, style=1, finishX=0, startY="+F.conf.reflectionHeight*100+" finishY=0)"}else{var N=S=this.reflection=document.createElement("img");S.src=K.src}Q+=" progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22="+1/F.conf.reflectionHeight+")";if(ContentFlowGlobal.Browser.IE6){if(K.src.match(/\.png$/)){K.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+K.src+"', sizingMethod=scale )";K.filterString="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+K.src+"', sizingMethod=scale )";Q+=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+K.src+"', sizingMethod=scale )";K.origSrc=K.src;K.src="img/blank.gif";N.src="img/blank.gif"}}S.filterString=Q;N.style.filter=Q}else{if(F._reflectionWithinImage){var D=this.canvas=$CF(document.createElement("canvas"))}else{var D=S=this.reflection=document.createElement("canvas")}if(D.getContext){if(F._reflectionWithinImage){for(var R=0;R<K.attributes.length;R++){D.setAttributeNode(K.attributes[R].cloneNode(true))}}var C=D.getContext("2d");var P=F.maxHeight;var I=F._scaleImageSize(this,{width:P,height:P},P);var L=I.width;var J=I.height;if(F._reflectionWithinImage){D.width=L;D.height=J;this.setImageFormat(D);D.height=J*(1+F.conf.reflectionHeight+F.conf.reflectionGap)}else{D.width=L;D.height=J*F.conf.reflectionHeight}C.save();if(F._reflectionWithinImage){C.drawImage(K,0,0,L,J)}if(F._reflectionWithinImage){var O=J*(1+F.conf.reflectionGap/2)*2}else{var O=K.height}O-=1;C.translate(0,O);C.scale(1,-1);C.drawImage(K,0,0,L,J);C.restore();if(F._reflectionColorRGB){var B=C.createLinearGradient(0,0,0,D.height);var E=[0,0.5,1];if(F._reflectionColor=="transparent"){C.globalCompositeOperation="destination-in";E=[1,0.5,0]}var G=F._reflectionColorRGB.iR;var H=F._reflectionColorRGB.iG;var A=F._reflectionColorRGB.iB;if(F._reflectionWithinImage){B.addColorStop(0,"rgba("+G+","+H+","+A+","+E[0]+")");B.addColorStop(J/D.height,"rgba("+G+","+H+","+A+","+E[0]+")");B.addColorStop(J/D.height,"rgba("+G+","+H+","+A+","+E[1]+")")}else{B.addColorStop(0,"rgba("+G+","+H+","+A+","+E[1]+")")}B.addColorStop(1,"rgba("+G+","+H+","+A+","+E[2]+")");C.fillStyle=B;C.fillRect(0,0,D.width,D.height)}if(F._reflectionWithinImage){K.parentNode.replaceChild(D,K);this.content=D;this.origContent=D;delete this.image}}else{F._reflectionWithinImage=false;delete this.reflection}}if(S){S.className="reflection";this.element.appendChild(S);if(this.caption){this.element.appendChild(this.caption)}}}};var ContentFlow=function(A,B){if(A){ContentFlowGlobal.Flows.push(this);this.Container=A;this._userConf=B?B:{};this.conf={};this._loadedAddOns=new Array()}else{throw ("ContentFlow ERROR: No flow container node or id given")}};ContentFlow.prototype={_imagesToLoad:0,_activeItem:0,_currentPosition:0,_targetPosition:0,_stepLock:false,_millisecondsPerStep:40,_reflectionWithinImage:true,Browser:ContentFlowGlobal.Browser,_defaultConf:{useAddOns:"all",biggestItemPos:0,loadingTimeout:30000,activeElement:"content",maxItemHeight:0,scaleFactor:1,scaleFactorLandscape:1.33,scaleFactorPortrait:1,fixItemSize:false,relativeItemPosition:"top center",circularFlow:true,verticalFlow:false,visibleItems:-1,endOpacity:1,startItem:"center",scrollInFrom:"pre",flowSpeedFactor:1,flowDragFriction:1,scrollWheelSpeed:1,keys:{13:function(){this.conf.onclickActiveItem(this._activeItem)},37:function(){this.moveTo("pre")},38:function(){this.moveTo("visibleNext")},39:function(){this.moveTo("next")},40:function(){this.moveTo("visiblePre")}},reflectionColor:"transparent",reflectionHeight:0.5,reflectionGap:0,onInit:function(){},onclickInactiveItem:function(A){},onclickActiveItem:function(B){var A,C;if(A=B.content.getAttribute("href")){C=B.content.getAttribute("target")}else{if(A=B.element.getAttribute("href")){C=B.element.getAttribute("target")}else{if(A=B.content.getAttribute("src")){C=B.content.getAttribute("target")}}}if(A){if(C){window.open(A,C).focus()}else{window.location.href=A}}},onMakeInactive:function(A){},onMakeActive:function(A){},onReachTarget:function(A){},onMoveTo:function(A){},onDrawItem:function(A){},onclickPreButton:function(A){this.moveToIndex("pre");return Event.stop(A)},onclickNextButton:function(A){this.moveToIndex("next");return Event.stop(A)},calcStepWidth:function(D){var C=this.conf.visibleItems;var A=this.items.length;A=A==0?1:A;if(Math.abs(D)>C){if(D>0){var B=D-C}else{var B=D+C}}else{if(C>=this.items.length){var B=D/A}else{var B=D*(C/A)}}return B},calcSize:function(D){var B=D.relativePosition;var C=1/(Math.abs(B)+1);var A=C;return{width:A,height:C}},calcCoordinates:function(C){var B=C.relativePosition;var E=this.conf.visibleItems;var D=1-1/Math.exp(Math.abs(B)*0.75);var A=C.side*E/(E+1)*D;var F=1;return{x:A,y:F}},calcZIndex:function(A){return -Math.abs(A.relativePositionNormed)},calcFontSize:function(A){return A.size.height},calcOpacity:function(A){return Math.max(1-((1-this.conf.endOpacity)*Math.sqrt(Math.abs(A.relativePositionNormed))),this.conf.endOpacity)}},_checkIndex:function(A){A=Math.max(A,0);A=Math.min(A,this.itemsLastIndex);return A},_setLastIndex:function(){this.itemsLastIndex=this.items.length-1},_getItemByIndex:function(A){return this.items[this._checkIndex(A)]},_getItemByPosition:function(A){return this._getItemByIndex(this._getIndexByPosition(A))},_getPositionByIndex:function(B){if(!this.conf.circularFlow){return this._checkIndex(B)}var A=this._getIndexByPosition(this._currentPosition);var C=B-A;if(Math.abs(C)>C+this.items.length){C+=this.items.length}else{if(Math.abs(C)>(Math.abs(C-this.items.length))){C-=this.items.length}}return this._currentPosition+C},_getIndexByPosition:function(A){if(A<0){var C=0}else{var C=1}var B=(Math.round(A)+C)%this.items.length;if(B>0){B-=C}else{if(B<0){B+=this.items.length-C}else{if(A<0){B=0}else{B=this.items.length-1}}}return B},_getIndexByKeyWord:function(B,D,A){if(D){var C=D}else{if(this._activeItem){var C=this._activeItem.index}else{var C=0}}if(isNaN(B)){switch(B){case"first":case"start":C=0;break;case"last":case"end":C=this.itemsLastIndex;break;case"middle":case"center":C=Math.round(this.itemsLastIndex/2);break;case"right":case"next":C+=1;break;case"left":case"pre":case"previous":C-=1;break;case"visible":case"visiblePre":case"visibleLeft":C-=this.conf.visibleItems;break;case"visibleNext":case"visibleRight":C+=this.conf.visibleItems;break;default:C=C}}else{C=B}if(A!=false){C=this._checkIndex(C)}return C},_setCaptionLabel:function(A){if(this.Position&&!this.Slider.locked){this.Position.setLabel(A)}this._setGlobalCaption()},getAddOnConf:function(A){return ContentFlowGlobal.getAddOnConf(A)},setAddOnConf:function(B,A){ContentFlowGlobal.setAddOnConf(B,A)},init:function(){if(this.isInit){return }this._init()},setConfig:function(A){if(!A){return }var E=this._defaultConf;for(var F in A){if(E[F]=="undefined"){continue}switch(F){case"scrollInFrom":case"startItem":if(typeof (A[F])=="number"||typeof (A[F])=="string"){this.conf[F]=A[F]}break;default:if(typeof (E[F]==A[F])){if(typeof A[F]=="function"){this.conf[F]=A[F].bind(this)}else{this.conf[F]=A[F]}}}}switch(this.conf.reflectionColor){case this.conf.reflectionColor.search(/#[0-9a-fA-F]{6}/)>=0?this.conf.reflectionColor:this.conf.reflectionColor+"x":this._reflectionColorRGB={hR:this.conf.reflectionColor.slice(1,3),hG:this.conf.reflectionColor.slice(3,5),hB:this.conf.reflectionColor.slice(5,7),iR:parseInt(this.conf.reflectionColor.slice(1,3),16),iG:parseInt(this.conf.reflectionColor.slice(3,5),16),iB:parseInt(this.conf.reflectionColor.slice(5,7),16)};break;case"none":case"transparent":default:this._reflectionColor="transparent";this._reflectionColorRGB={hR:0,hG:0,hB:0,iR:0,iG:0,iB:0};break}if(this.items){if(this.conf.visibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1)}if(this.conf.relativeItemPosition){var C={x:{left:function(J){return -1},center:function(J){return 0},right:function(J){return 1}},y:{top:function(J){return -1},center:function(J){return 0},bottom:function(J){return 1}}};var I=this.conf.relativeItemPosition;I=I.replace(/above/,"top").replace(/below/,"bottom");var H,G=null;H=I.match(/left|right/);G=I.match(/top|bottom/);c=I.match(/center/);if(!H){if(c){H="center"}else{H="center"}}if(!G){if(c){G="center"}else{G="top"}}var D=C.x[H];var B=C.y[G];this.conf.calcRelativeItemPosition=function(K){var J=D(K.size);var L=B(K.size);return{x:J,y:L}};this.conf.relativeItemPosition=null}if(this._reflectionType&&this._reflectionType!="clientside"){this.conf.reflectionHeight=0}},getItem:function(A){return this.items[this._checkIndex(Math.round(A))]},getActiveItem:function(){return this._activeItem},getNumberOfItems:function(){return this.items.length},resize:function(){this._initSizes();this._initStep()},moveToPosition:function(B,A){if(!this.conf.circularFlow){B=this._checkIndex(B)}this._targetPosition=B;this.conf.onMoveTo(this._getItemByPosition(B));this._initStep(false,A)},moveToIndex:function(A){this._targetPosition=Math.round(this._getPositionByIndex(this._getIndexByKeyWord(A,this._activeItem.index,!this.conf.circularFlow)));this.conf.onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep()},moveToItem:function(B){var A;if(B.itemIndex){A=B.itemIndex}else{A=B.index}this.moveToIndex(A)},moveTo:function(A){if(typeof A=="object"){this.moveToItem(A)}else{if(isNaN(A)||(A==Math.floor(A)&&A<this.items.length)){this.moveToIndex(A)}else{this.moveToPosition(A)}}},_addItemCue:[],_addItemCueProcess:function(C){var D=this._addItemCue;if(C==true){D.shift()}if(D.length>0&&!D[0].p){D[0].p=true;var A=this;var B=D.length>5?1:40;window.setTimeout(function(){A._addItem(D[0].el,D[0].i)},B)}},addItem:function(B,A){this._addItemCue.push({el:B,i:A,p:false});if(this._addItemCue.length==1){this._addItemCueProcess()}},_addItem:function(C,A){if(typeof A=="string"){switch(A){case"first":case"start":A=0;break;case"last":case"end":A=isNaN(this.itemsLastIndex)?0:this.itemsLastIndex;A+=1;break;default:A=this._getIndexByKeyWord(A)}}A=Math.max(A,0);A=Math.min(A,this.itemsLastIndex+1);A=isNaN(A)?0:A;this.Flow.appendChild(C);var D=new ContentFlowItem(this,C,A);if(this.items.length==0){this.resize();if(this.conf.circularFlow){D.pre=D;D.next=D}}else{if(A==this.itemsLastIndex+1){D.pre=this.items[this.itemsLastIndex];D.next=D.pre.next}else{D.next=this.items[A];D.pre=D.next.pre}if(D.pre){D.pre.next=D}if(D.next){D.next.pre=D}}this.items.splice(A,0,D);for(var B=A;B<this.items.length;B++){this.items[B].setIndex(B)}this._setLastIndex();if(this.conf.origVisibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1);if(Math.round(this._getPositionByIndex(A))<=Math.round(this._targetPosition)){this._targetPosition++;if(!this.conf.circularFlow){this._targetPosition=Math.min(this._targetPosition,this.itemsLastIndex)}}if(this._getPositionByIndex(A)<=this._currentPosition){this._currentPosition++;if(!this.conf.circularFlow){this._currentPosition=Math.min(this._currentPosition,this.itemsLastIndex)}}var E=this;window.setTimeout(function(){if(E.items.length==1){E._currentPosition=-0.01;E._targetPosition=0;E.resize()}else{E._initStep()}},100);return A},rmItem:function(A){if(A=="undefined"){A=this._activeItem.index}A=this._getIndexByKeyWord(A);if(!this.items[A]){return null}var D=this.items[A];if(D.pre){D.pre.next=D.next}if(D.next){D.next.pre=D.pre}this.items.splice(A,1);for(var B=A;B<this.items.length;B++){this.items[B].setIndex(B)}this._setLastIndex();if(Math.round(this._getPositionByIndex(A))<Math.round(this._targetPosition)){this._targetPosition--;if(!this.conf.circularFlow){this._targetPosition=this._checkIndex(this._targetPosition)}}if(this._getPositionByIndex(A)<this._currentPosition){this._currentPosition--;if(!this.conf.circularFlow){this._currentPosition=this._checkIndex(this._currentPosition)}}this._activeItem=this._getItemByPosition(this._currentPosition);var C=D.element.parentNode.removeChild(D.element);var E=this;window.setTimeout(function(){E._initStep()},10);return C},_init:function(){if(typeof (this.Container)=="string"){var B=document.getElementById(this.Container);if(B){this.Container=B}else{throw ("ContentFlow ERROR: No element with id '"+this.Container+"' found!");return }}$CF(this.Container).addClassName("ContentFlow");var A=$CF(this.Container).getChildrenByClassName("flow")[0];if(!A){throw ("ContentFlow ERROR: No element with class'flow' found!");return }this.Flow=new ContentFlowGUIElement(this,A);var M=this.Container.getChildrenByClassName("scrollbar")[0];if(M){this.Scrollbar=new ContentFlowGUIElement(this,M);var F=this.Scrollbar.getChildrenByClassName("slider")[0];if(F){this.Slider=new ContentFlowGUIElement(this,F);var H=this.Slider.getChildrenByClassName("position")[0];if(H){this.Position=new ContentFlowGUIElement(this,H)}}}this.setConfig(this._defaultConf);this._initAddOns();this.setConfig(this._userConf);this._initSizes();var J=this.Flow.getChildrenByClassName("item");this.items=new Array();for(var G=0;G<J.length;G++){var K=this.items[G]=new ContentFlowItem(this,J[G],G);if(G>0){K.pre=this.items[G-1];K.pre.next=K}}this._setLastIndex();if(this.conf.circularFlow&&this.items.length>0){var L=this.items[0];L.pre=this.items[this.items.length-1];L.pre.next=L}this._initGUI();if(this._activeElement!="content"){this._activeElement="element"}this.conf.origVisibleItems=this.conf.visibleItems;if(this.conf.visibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1);this._targetPosition=this._getIndexByKeyWord(this.conf.startItem,0);var I=this._getIndexByKeyWord(this.conf.scrollInFrom,this._targetPosition);switch(this.conf.scrollInFrom){case"next":case"right":I-=0.5;break;case"pre":case"previous":case"left":I+=0.5;break}this._currentPosition=I;var E=new Date();var D=this;var C=window.setInterval(function(){if(D._imagesToLoad==0||new Date()-E>D._loadingTimeout){clearInterval(C);D._activeItem=D.getItem(D._currentPosition);if(D._activeItem){D._activeItem.makeActive();D._setCaptionLabel(D._activeItem.index)}D.Flow.style.visibility="visible";if(D.loadIndicator){D.loadIndicator.style.display="none"}if(D.Scrollbar){D.Scrollbar.style.visibility="visible"}D.resize();for(var O=0;O<D._loadedAddOns.length;O++){var N=ContentFlowGlobal.AddOns[D._loadedAddOns[O]];if(N.methods.afterContentFlowInit){N.methods.afterContentFlowInit(D)}}D.conf.onInit()}},10);this.isInit=true},_initAddOns:function(){var C=[];if(this._userConf.useAddOns){if(typeof this._userConf.useAddOns=="string"){C=this._userConf.useAddOns.split(" ")}else{if(typeof this._userConf.useAddOns=="array"){C=this._userConf.useAddOns}}}else{if(this.Container.getAttribute("useAddOns")){C=this.Container.getAttribute("useAddOns").split(" ")}else{C=this.conf.useAddOns.split(" ")}}for(var B=0;B<C.length;B++){if(C[B]=="none"){C=new Array();break}else{if(C[B]=="all"){C=new Array();for(var A in ContentFlowGlobal.AddOns){C.push(A)}break}}}for(var B=0;B<C.length;B++){var A=ContentFlowGlobal.AddOns[C[B]];if(A){this._loadedAddOns.push(C[B]);A._init(this);this.Container.addClassName("ContentFlowAddOn_"+A.name);if(A.methods.onloadInit){A.methods.onloadInit(this)}}}},_initGUI:function(){var C=this.resize.bind(this);window.addEvent("resize",C,false);var K=this.Container.getElementsByTagName("div");for(var G=0;G<K.length;G++){if($CF(K[G]).hasClassName("preButton")){var F=K[G];var A=this.conf.onclickPreButton;F.addEvent("click",A,false)}else{if(K[G].hasClassName("nextButton")){var I=K[G];var A=this.conf.onclickNextButton;I.addEvent("click",A,false)}}}if(this.conf.scrollWheelSpeed!=0){var J=this._wheel.bind(this);if(window.addEventListener){this.Container.addEventListener("DOMMouseScroll",J,false)}this.Container.onmousewheel=J}var L=this._keyStroke.bind(this);if(this.conf.keys&&!this.Browser.iPhone){if(document.addEventListener){if(!this.Browser.Opera){var D=document.createElement("div");D.addClassName("mouseoverCheckElement");this.Container.appendChild(D);if(this.Browser.WebKit){document.body.addEvent("keydown",function(O){if(D.offsetLeft>0){L(O)}})}else{window.addEvent("keydown",function(O){if(D.offsetLeft>0){L(O)}})}}else{this.Container.addEvent("keydown",L)}}else{this.Container.onkeydown=L}}if(this.conf.flowDragFriction>0){var E=function(R){var U=R;if(R.touches){U=R.touches[0]}var Q=U.clientX;var P=U.clientY;if(this.conf.verticalFlow){var V=P-this.Flow.mouseY;var T=this.Flow.dimensions.height}else{var V=Q-this.Flow.mouseX;var T=this.Flow.dimensions.width}var O=(V/T)*(2*this.conf.visibleItems+1);var S=this._currentPosition-O*2*this.conf.visibleItems/this.conf.flowDragFriction;this.Flow.mouseX=Q;this.Flow.mouseY=P;this.moveToPosition(S,true)}.bind(this);var N=function(){};var H=function(P){var O=Math.round(this._targetPosition);if(Math.abs(O-this._currentPosition)>0.001){this.moveToPosition(O)}}.bind(this);this.Flow.makeDraggable(E,N,H)}if(this.Scrollbar){var M=function(R){if(!R){var R=window.event}if(!this.Scrollbar.clickLocked){var Q=R.clientX;var P=Q-this.Scrollbar.position.left;var O=Math.round(P/this.Scrollbar.dimensions.width*this.itemsLastIndex);this.moveToIndex(O)}else{this.Scrollbar.clickLocked=false}}.bind(this);this.Scrollbar.addObserver("click",M)}if(this.Slider){if(this.Browser.IE6){var B=document.createElement("div");B.className="virtualSlider";this.Slider.appendChild(B)}this.Slider.setPosition=function(O){O=O-Math.floor(O)+this._getIndexByPosition(Math.floor(O));if(Math.round(O)<0){O=this.itemsLastIndex}else{if(O<=0){O=0}else{if(Math.round(O)>this.itemsLastIndex){O=0}else{if(O>=this.itemsLastIndex){O=this.itemsLastIndex}}}}if(this.items.length>1){var P=(O/this.itemsLastIndex)*this.Scrollbar.dimensions.width}else{var P=0.5*this.Scrollbar.dimensions.width}this.Slider.style.left=P-this.Slider.center.x+"px";this.Slider.style.top=this.Scrollbar.center.y-this.Slider.center.y+"px"}.bind(this);var N=function(O){this.Scrollbar.clickLocked=true}.bind(this);var E=function(P){var Q=P;if(P.touches){Q=P.touches[0]}var O=this._checkIndex((Q.clientX-this.Scrollbar.position.left)/this.Scrollbar.dimensions.width*this.itemsLastIndex);this._targetPosition=this._getPositionByIndex(O);this.Slider.setPosition(O);if(this.Position){this.Position.setLabel(O)}this._initStep(true,true)}.bind(this);var H=function(O){this._targetPosition=Math.round(this._targetPosition);this.conf.onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep(true)}.bind(this);this.Slider.makeDraggable(E,N,H)}if(this.Position){this.Position.setLabel=function(O){O=this._checkIndex(Math.round(O));if(this.items&&this.items[O].label){this.Position.innerHTML=this.items[O].label.innerHTML}else{this.Position.innerHTML=O+1}}.bind(this)}this.globalCaption=this.Container.getChildrenByClassName("globalCaption")[0];this.loadIndicator=this.Container.getChildrenByClassName("loadIndicator")[0]},_initSizes:function(A){this._initMaxHeight();var E=this._initScrollbarSize();if(!this.conf.verticalFlow&&this.Container.style.height&&this.Container.style.height!="auto"){this.maxHeight-=E}if(!this._activeItem){return }var D=this._findBiggestItem();var F=this.Flow.findPos();if(this.conf.verticalFlow){this.Flow.style.width=D.width.width+"px";this.Flow.style.height=3*D.width.width*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}else{this.Flow.style.height=D.height.height+(D.height.top-F.top)+"px"}var C=this.conf.verticalFlow?D.width.width:D.height.height;var B=C/(1+this.conf.reflectionHeight+this.conf.reflectionGap);this.Flow.style.marginBottom=-(C-B)+"px";this.Flow.dimensions=this.Flow.getDimensions();if(!this.Browser.IE6){if(this.conf.verticalFlow&&this.Container.clientWidth<this.Flow.dimensions.width){}else{if(this.Container.clientHeight<this.Flow.dimensions.height){this.Container.style.height=this.Flow.dimensions.height+"px"}}}if(this.conf.verticalFlow){this.Flow.center={x:this.Flow.dimensions.height/2,y:D.width.width/2}}else{this.Flow.center={x:this.Flow.dimensions.width/2,y:D.height.height/2}}},_initScrollbarSize:function(){var C;var I;var F;if(C=this.Scrollbar){C.setDimensions();var B=C.dimensions.height;if(I=this.Slider){I.setDimensions();B+=I.dimensions.height;if(F=this.Position){var K=F.innerHTML;var G=maxW=0;F.style.width="auto";if(this.items){for(var D=0;D<this.items.length;D++){var J=this.items[D];if(J.label){F.innerHTML=J.label.innerHTML}else{F.innerHTML=J.index}var E=F.clientHeight;var H=F.clientWidth;if(E>G){G=E}if(H>maxW){maxW=H}}}else{F.innerHTML="&nbsp;";G=F.clientHeight;maxW=F.clientWidth}F.innerHTML=K;F.setDimensions();F.style.width=maxW+"px";F.style.left=(I.dimensions.width-maxW)/2+"px";var A=F.position.top-I.position.top;if(A>0){A+=-C.dimensions.height+G;C.style.marginBottom=A+"px"}else{A*=-1;C.style.marginTop=A+"px"}B+=A}}}else{B=0}return B},_initMaxHeight:function(){if(this.conf.verticalFlow){var G=screen.width/screen.height;var D=this.Container.style.width;var E=this.Container.clientWidth;var C=this.Flow.style.width;var F=this.Flow.clientWidth;var A=this.Flow.clientHeight}else{var G=screen.height/screen.width;var D=this.Container.style.height;var E=this.Container.clientHeight;var C=this.Flow.style.height;var F=this.Flow.clientHeight;var A=this.Flow.clientWidth}if(this.ContainerOldDim){D=this.ContainerOldDim}if(this.FlowOldDim){C=this.FlowOldDim}this.ContainerOldDim="auto";this.FlowOldDim="auto";if(this.conf.maxItemHeight<=0){this.maxHeight=A/3*G/1*this.conf.scaleFactor;if(this.conf.verticalFlow&&(this.maxHeight==0||this.maxHeight>F)){this.maxHeight=F}if(D&&D!="auto"){var H=this.conf.verticalFlow?0:this.conf.reflectionGap;var B=this.conf.verticalFlow?0:this.conf.reflectionHeight;this.maxHeight=E/(this.conf.scaleFactor*(1+B+H));this.ContainerOldDim=D}else{if(C&&C!="auto"){var H=this.conf.verticalFlow?0:this.conf.reflectionGap;this.maxHeight=F/(this.conf.scaleFactor*(1+this.conf.reflectionHeight+H));this.FlowOldDim=C}}}else{this.maxHeight=this.conf.maxItemHeight}},_findBiggestItem:function(){var G=this._activeItem;var A=G.pre;var B=G.next;var E=maxFlowSize={width:{width:0,left:0,height:0,top:0,item:null,rI:0},height:{width:0,left:0,height:0,top:0,item:null,rI:0}};var F=function(N,J){var M=N.element;M.style.display="block";var O=M.findPos();var L=M.clientHeight;var K=M.clientWidth;if(L+O.top>=E.height.height+E.height.top){E.height.height=L;E.height.top=O.top;E.height.item=N;E.height.rI=J}if(K+O.left>=E.width.width+E.width.left){E.width.width=K;E.width.left=O.left;E.width.item=N;E.width.rI=J}M.style.display="none"};var H=this._currentPosition;this._currentPosition=this.conf.visibleItems+1;for(var C=-this.conf.visibleItems;C<=this.conf.visibleItems;C++){G.element.style.display="none";this._positionItem(G,C);F(G,C)}var D=E.height.rI;for(var C=0;C<this.items.length;C++){var I=this.items[C];I.element.style.display="none";this._positionItem(I,D);F(I,D)}this._currentPosition=H;return E},_keyStroke:function(A){if(!A){var A=window.event}if(A.which){var B=A.which}else{if(A.keyCode){var B=A.keyCode}}if(this.conf.keys[B]){this.conf.keys[B].bind(this)();return Event.stop(A)}else{return true}},_wheel:function(A){if(!A){var A=window.event}var C=0;if(A.wheelDelta){C=A.wheelDelta/120}else{if(A.detail){C=-A.detail/3}}if(C){var B=this._targetPosition;if(C<0){B+=(1*this.conf.scrollWheelSpeed)}else{B-=(1*this.conf.scrollWheelSpeed)}this.moveToPosition(Math.round(B))}return Event.stop(A)},_setGlobalCaption:function(){if(this.globalCaption){this.globalCaption.innerHTML="";if(this._activeItem&&this._activeItem.caption){this.globalCaption.appendChild(this._activeItem.caption.cloneNode(true))}}},_initStep:function(B,A){if(this.Slider){if(B){this.Slider.locked=true}else{this.Slider.locked=false}}this._holdPos=A==true?true:false;if(!this._stepLock){this._stepLock=true;this._step()}},_step:function(){var D=this._targetPosition-this._currentPosition;var C=Math.abs(D);if(C>0.001){this._currentPosition+=this.conf.flowSpeedFactor*this.conf.calcStepWidth(D,C,this.items.length,this.conf.visibleItems);var A=this.items[(this._getIndexByPosition(this._currentPosition))];if(A&&A!=this._activeItem){if(this._activeItem){this._activeItem.makeInactive()}this._activeItem=A;this._activeItem.makeActive();this._setCaptionLabel(this._activeItem.index);if(Math.abs(this._targetPosition-this._currentPosition)<=0.5){this.conf.onReachTarget(this._activeItem)}}this._positionItems();var B=this._step.bind(this);window.setTimeout(B,this._millisecondsPerStep)}else{if(!this._holdPos){if(this.Slider){this.Slider.locked=false}this._currentPosition=Math.round(this._currentPosition);if(this.Position&&!this.Slider.locked&&this._activeItem){this._setCaptionLabel(this._activeItem.index)}this._positionItems();this._stepLock=false}else{this._stepLock=false}}if(this.Slider&&!this.Slider.locked){this.Slider.setPosition(this._currentPosition)}},_positionItems:function(){if(this._lastStart){var E=this._lastStart;while(E){E.element.style.display="none";E=E.next;if(E==this._lastStart){break}if(E&&E.pre==this._lastEnd){break}}}else{this._lastStart=this._activeItem}if(!this._activeItem){return }var C=this._activeItem;var B=C.pre;var D=C.next;this._positionItem(C,0);for(var A=1;A<=this.conf.visibleItems&&2*A<this.items.length;A++){if(B){this._positionItem(B,-A);this._lastStart=B;B=B.pre}if(D){this._positionItem(D,A);this._lastEnd=D;D=D.next}}},_positionItem:function(S,A){var I=this.conf;var N=I.verticalFlow;var E=S.element.style;var L=S.position=this._currentPosition+A;var M=S.relativePosition=Math.round(L)-this._currentPosition;var Q=S.relativePositionNormed=I.visibleItems>0?M/I.visibleItems:0;var B=M<0?-1:1;B*=M==0?0:1;S.side=B;var J=I.calcSize(S);J.height=Math.max(J.height,0);J.width=Math.max(J.width,0);if(S.content.origProportion){J=this._scaleImageSize(S,J)}S.size=J;var P=S.coordinates=I.calcCoordinates(S);var H=S.relativeItemPosition=I.calcRelativeItemPosition(S);var K=S.zIndex=I.calcZIndex(S);var C=S.fontSize=I.calcFontSize(S);var D=S.opacity=I.calcOpacity(S);J.height*=this.maxHeight;J.width*=this.maxHeight;var R=N?J.height:J.width;var O=N?J.width:J.height;var G=this.Flow.center.x*(1+P.x)+(H.x-1)*R/2;var F=this.maxHeight/2*(1+P.y)+(H.y-1)*O/2;E.left=(N?F:G)+"px";E.top=(N?G:F)+"px";this._setItemSize(S,J);if(I.endOpacity!=1){this._setItemOpacity(S)}if(!this.Browser.IE){E.fontSize=(C*100)+"%"}E.zIndex=32768+Math.round(K*this.items.length);I.onDrawItem(S);E.visibility="visible";E.display="block"},_scaleImageSize:function(N,P,I){var E=this.conf.scaleFactorLandscape;var D=this.conf.scaleFactorPortrait;var M=this.conf.verticalFlow;var B=N.content.origProportion;var C=P.width;var L=P.height;var H=N.content;if(M){if(B<=1){if(E!="max"&&E!=1){L*=E;C=Math.min(L*B,I?I:1)}L=C/B}else{if(B>1){if(D=="max"){L=I?I:1}else{if(D!=1){C*=D;L=Math.min(C/B,I?I:1)}else{L=C/B}}C=L*B}}}else{if(B>1){if(E!="max"&&E!=1){C*=E;L=Math.min(C/B,I?I:1)}C=L*B}else{if(B<=1){if(D=="max"){C=I?I:1}else{if(D!=1){L*=D;C=Math.min(L*B,I?I:1)}else{C=L*B}}L=C/B}}}L=isNaN(L)?0:L;C=isNaN(C)?0:C;if(!I&&this.conf.fixItemSize){var A=P.width/P.height;var I=Math.max(P.width,P.height);var O=this._scaleImageSize(N,{width:I,height:I},I);if(A<1){L=O.height/P.height;C=L*B/A}else{C=O.width/P.width;L=C/B*A}var G=L*100;var K=C*100;var J=(1-C)/2*100;var F=(1-L)/A*100*(M?0.5:1);H.style.height=G+"%";if(N.reflection){N.reflection.style.height=G*this.conf.reflectionHeight+"%"}H.style.width=K+"%";if(N.reflection){N.reflection.style.width=K+"%"}H.style.marginLeft=J+"%";if(N.reflection){N.reflection.style.marginLeft=J+"%"}H.style.marginTop=F+"%";N.element.style.overflow="hidden";return P}else{return{width:C,height:L}}},_setItemSize:(function(){if(ContentFlowGlobal.Browser.IE){var A=function(E,C){if(!this.conf.fixItemSize){E.content.style.height=C.height+"px"}else{if(ContentFlowGlobal.Browser.IE6){var D=parseInt(E.content.style.height)/100;E.content.style.height=C.height*D+"px";var B=parseInt(E.content.style.marginTop)/100;E.content.style.marginTop=C.height*B+"px"}}if(E.reflection){var D=parseInt(E.content.style.height);E.reflection.style.height=D*this.conf.reflectionHeight+"px";E.reflection.style.marginTop=D*this.conf.reflectionGap+"px"}E.element.style.width=C.width+"px";E.element.style.height=C.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}}else{var A=function(C,B){if(C.reflection){C.element.style.height=B.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px";C.reflection.style.marginTop=B.height*this.conf.reflectionGap+"px"}else{if(this._reflectionWithinImage){C.element.style.height=B.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}else{C.element.style.height=B.height+"px"}}C.element.style.width=B.width+"px"}}return A})(),_setItemOpacity:(function(){if(ContentFlowGlobal.Browser.IE6){var A=function(C){if(C.content.origSrc&&C.content.origSrc.match(/\.png$/)){var B=C.content.src;C.content.src=C.content.origSrc;C.content.style.filter=C.content.filterString+" progid:DXImageTransform.Microsoft.BasicImage(opacity="+C.opacity+")";C.content.src=B}else{C.content.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity="+C.opacity+")"}if(C.reflection){C.reflection.style.filter=C.reflection.filterString+"progid:DXImageTransform.Microsoft.BasicImage(opacity="+C.opacity+")"}}}else{if(ContentFlowGlobal.Browser.IE){var A=function(B){B.element.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity="+B.opacity+")"}}else{var A=function(B){B.element.style.opacity=B.opacity}}}return A})()};if(!Function.bind){Function.prototype.bind=function(A){var B=this;return function(){return B.apply(A,arguments)}}}if(!Math.erf2){Math.erf2=function(A){var B=-(8*(Math.PI-3)/(3*Math.PI*(Math.PI-4)));var C=A*A;var D=1-Math.pow(Math.E,-C*(4/Math.PI+B*C)/(1+B*C));return D}}if(!Math._2PI05){Math._2PI05=Math.sqrt(2*Math.PI)}if(!Math.normDist){Math.normDist=function(A,C,B){if(!C){var C=1}if(!B){var B=0}if(!A){var A=-B}return 1/(C*Math._2PI05)*Math.pow(Math.E,-(A-B)*(A-B)/(2*C*C))}}if(!Math.normedNormDist){Math.normedNormDist=function(A,C,B){return this.normDist(A,C,B)/this.normDist(B,C,B)}}if(!Math.exp){Math.exp=function(A){return Math.pow(Math.E,A)}}if(!Math.ln){Math.ln=Math.log}if(!Math.log2){Math.log2=function(A){return Math.log(A)/Math.LN2}}if(!Math.log10){Math.log10=function(A){return Math.log(A)/Math.LN10}}if(!Math.logerithm){Math.logerithm=function(B,A){if(!A||A==Math.E){return Math.log(B)}else{if(A==2){return Math.log2(B)}else{if(A==10){return Math.log10(B)}else{return Math.log(B)/Math.log(A)}}}}}if(!Event){var Event={}}if(!Event.stop){Event.stop=function(A){A.cancelBubble=true;if(A.preventDefault){A.preventDefault()}if(A.stopPropagation){A.stopPropagation()}return false}}if(document.all&&!window.opera){window.$CF=function(A){if(typeof A=="string"){return window.$CF(document.getElementById(A))}else{if(CFElement.prototype.extend&&A&&!A.extend){CFElement.prototype.extend(A)}}return A}}else{window.$CF=function(A){return A}}if(!window.HTMLElement){CFElement={};CFElement.prototype={};CFElement.prototype.extend=function(A){for(var B in this){if(!A[B]){A[B]=this[B]}}}}else{CFElement=window.HTMLElement}if(!CFElement.findPos){CFElement.prototype.findPos=function(){var B=this;var C=curtop=0;try{if(B.offsetParent){C=B.offsetLeft;curtop=B.offsetTop;while(B=B.offsetParent){C+=B.offsetLeft;curtop+=B.offsetTop}}}catch(A){}return{left:C,top:curtop}}}if(!CFElement.getDimensions){CFElement.prototype.getDimensions=function(){return{width:this.clientWidth,height:this.clientHeight}}}if(!CFElement.hasClassName){CFElement.prototype.hasClassName=function(A){return(new RegExp("\\b"+A+"\\b").test(this.className))}}if(!CFElement.addClassName){CFElement.prototype.addClassName=function(A){if(!this.hasClassName(A)){this.className+=(this.className?" ":"")+A}}}if(!CFElement.removeClassName){CFElement.prototype.removeClassName=function(A){this.className=this.className.replace(new RegExp("\\b"+A+"\\b"),"").replace(/\s\s/g," ")}}if(!CFElement.toggleClassName){CFElement.prototype.toggleClassName=function(A){if(this.hasClassName(A)){this.removeClassName(A)}else{this.addClassName(A)}}}if(!CFElement.getChildrenByClassName){CFElement.prototype.getChildrenByClassName=function(C){var B=new Array();for(var A=0;A<this.childNodes.length;A++){var D=this.childNodes[A];if(D.nodeType==1&&$CF(D).hasClassName(C)){B.push(D)}}return B}}if(!CFElement.addEvent){CFElement.prototype.addEvent=function(B,C,A){if(this.addEventListener){this.addEventListener(B,C,A)}else{this.attachEvent("on"+B,C)}}}if(!CFElement.removeEvent){CFElement.prototype.removeEvent=function(B,C,A){if(this.removeEventListener){this.removeEventListener(B,C,A)}else{this.detachEvent("on"+B,C)}}}if(!window.addEvent){window.addEvent=function(B,C,A){if(this.addEventListener){this.addEventListener(B,C,A)}else{if(B!="load"&&B!="resize"){document.attachEvent("on"+B,C)}else{this.attachEvent("on"+B,C)}}}}if(!window.removeEvent){window.removeEvent=function(B,C,A){if(this.removeEventListener){this.removeEventListener(B,C,A)}else{if(B!="load"&&B!="resize"){document.detachEvent("on"+B,C)}else{this.detachEvent("on"+B,C)}}}}ContentFlowGlobal.init();

/*scrolling parallax v0.1*/
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}('(5($){$.18=5(n,o){2 o=o||{};o.M=U(o.M)!=\'W\'?o.M:N;3(o.M){o.8=o.8||4;o.Q=U(o.Q)!=\'W\'?o.Q:N;o.P=o.P||4;o.6=o.6||4}o.O=o.O||4;3(o.O){o.X=o.X||4;o.Y=U(o.Y)!=\'W\'?o.Y:N;o.Z=o.Z||4;o.V=o.V||4}o.19=o.19||4;o.10=U(o.10)!=\'W\'?o.10:N;o.1a=o.1a||(o.O?\'1m%\':\'1b%\');o.1c=o.1c||\'1m%\';o.1d=o.1d||4;o.11=o.11||4;o.1e=o.1e||4;o.1f=o.1f||4;2 p=$.1g.1n&&$.1g.1C<7?N:4;3(o.19&&p)S 4;2 q=$(1D);2 r=$(1E);2 s;2 t=4;3(o.M){2 u;2 v;2 w;2 x;2 y=0;2 z=0;2 A=0;2 B=4;2 C=1o}3(o.O){2 D;2 E;2 F;2 G;2 H=0;2 I=0;2 J=0;2 K=4;2 L=1o}1p(n);5 1p(a){3(U(a)==\'1F\')s=1q(a);9{s=$(a);s.R(\'1r\',p?\'1s\':\'1t\');3(o.M)A=T(s.R(\'12\'));3(o.O)J=T(s.R(\'13\'))}3(o.10&&p)S 4;1h();3(t){3(o.6&&o.M){A+=-1*x;s.R(\'12\',A)}3(o.V&&o.O){J+=-1*G;s.R(\'13\',J)}}r.1G(5(){1i()});r.1H(5(){1h()})}5 1q(a){2 b={1I:\'1J\',12:0,13:0,14:o.1a,15:o.1c,1K:0};b.1r=p?\'1s\':\'1t\';3(o.1d){2 c=o.11?$(\'<16></16>\').1u($(\'17\')):$(\'<16></16>\').1v($(\'17\'));b.1L=\'1M\';b.1N=\'1O("\'+a+\'")\'}9{2 c=o.11?$(\'<1w />\').1u($(\'17\')):$(\'<1w />\').1v($(\'17\'));c.1P(\'1Q\',a)}c.R(b);t=N;S c}5 1h(){3(o.M){u=s.15();v=r.15();w=q.15();x=(o.1e||u)-v;3(x<0){3(o.8)x=v-u;9 x=o.6?v-A-u:A;B=N}3(p&&!y)y=-1*(w-u);3(o.P)z=T(q.1x()/(B?v:u))}3(o.O){D=s.14();E=r.14();F=q.14();G=(o.1f||D)-E;3(G<0){G=o.X?E-D:o.V?E-J-D:J;K=N}3(p&&!H)H=-1*(F-D);3(o.Z)I=T(q.1y()/(K?E:D))}1i()}5 1i(){s.1R([]);2 a={};3(o.M){2 b=1j(N);a.12=b}3(o.O){2 c=1j(4);a.13=c}3(!$.1g.1n&&(1k.1z(C-b)>1b||1k.1z(L-c)>1b))s.1S(a,1T);9 s.R(a);C=b;L=c}5 1j(a){3(a){2 b=q.1x();2 c=w;2 d=v;2 e=u;2 f=x;2 g=z;2 h=A;2 f=x;2 i=B;2 j=y;2 k={6:o.6,8:o.8,P:o.P,Q:o.Q}}9{2 b=q.1y();2 c=F;2 d=E;2 e=D;2 g=I;2 h=J;2 f=G;2 i=K;2 j=H;2 k={6:o.V,8:o.X,P:o.Z,Q:o.Y}}3(k.8){2 l=b*k.8;l-=f*(g)}9{2 m=b/(c-d);2 l=m*f}3(!k.6)l*=-1;l+=h;3(k.8)l=1A(l,a,k,f,i);3(i&&k.8&&k.P)l+=d-e;3(p){l+=b;l=1k.1U(T(l),T(j))}S l}5 1A(a,b,c,d,e){3(!c.P){3(c.Q){3(e){3(a<0)a=0;3(a>d)a=d}9{3(a>0)a=0;3(-1*a>d)a=-1*d}}}9{1B(a<d){a+=d;2 f=c.6?-1:1;3(b)z+=f;9 I+=f}1B(a>(c.6?-1:0)){a-=d;2 f=c.6?-1:1;3(b)z-=f;9 I-=f}}S a}};$.1V.18=5(a){1l.1W(5(){1X $.18(1l,a)});S 1l}})(1Y);',62,123,'||var|if|false|function|reverseDirection||staticSpeed|else|||||||||||||||||||||||||||||||||||||||enableVertical|true|enableHorizontal|loopIt|staticScrollLimit|css|return|parseInt|typeof|reverseDirectionX|undefined|staticSpeedX|staticScrollLimitX|loopItX|disableIE6Anim|appendInFront|top|left|width|height|div|body|scrollingParallax|disableIE6|bgWidth|100|bgHeight|bgRepeat|parallaxHeight|parallaxWidth|browser|defineSizes|ani|calculateMove|Math|this|150|msie|null|init|appendBackground|position|absolute|fixed|appendTo|prependTo|img|scrollTop|scrollLeft|abs|checkMove|while|version|document|window|string|scroll|resize|display|block|zIndex|backgroundRepeat|repeat|backgroundImage|url|attr|src|queue|animate|30|max|fn|each|new|jQuery'.split('|'),0,{}));

/* SWFObject v2.2 */
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+encodeURI(O.location).toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();

/*hoverscroll v.0.2.4*/
(function($) {
  $.fn.hoverscroll = function(params) {
    if (!params) { params = {}; }
    params = $.extend({}, $.fn.hoverscroll.params, params);
    this.each(function() {
	var $this = $(this);
	if (params.debug) {$.log('[HoverScroll] Trying to create hoverscroll on element ' + this.tagName + '#' + this.id);}
	
	// wrap ul list with a div.listcontainer
        if (params.fixedArrows) {
	  $this.wrap('<div class="fixed-listcontainer"></div>')
	    }
        else {
	  $this.wrap('<div class="listcontainer"></div>');
        }
	
	$this.addClass('list');
	//.addClass('ui-helper-clearfix');
	
	// store handle to listcontainer
	var listctnr = $this.parent();
	
	// wrap listcontainer with a div.hoverscroll
	listctnr.wrap('<div class="ui-widget-content hoverscroll' +
		      (params.rtl && !params.vertical ? " rtl" : "") + '"></div>');
	//listctnr.wrap('<div class="hoverscroll"></div>');
	
	// store hoverscroll container
	var ctnr = listctnr.parent();
	
        var leftArrow, rightArrow, topArrow, bottomArrow;
	
	// Add arrow containers
	if (params.arrows) {
			if (!params.vertical) {
                if (params.fixedArrows) {
                    leftArrow = '<div class="fixed-arrow left"></div>';
                    rightArrow = '<div class="fixed-arrow right"></div>';

                    listctnr.before(leftArrow).after(rightArrow);
                }
                else {
                    leftArrow = '<div class="arrow left"></div>';
                    rightArrow = '<div class="arrow right"></div>';
                    
                    listctnr.append(leftArrow).append(rightArrow);
                }
			}
			else {
                if (params.fixedArrows) {
                    topArrow = '<div class="fixed-arrow top"></div>';
                    bottomArrow = '<div class="fixed-arrow bottom"></div>';

                    listctnr.before(topArrow).after(bottomArrow);
                }
                else {
                    topArrow = '<div class="arrow top"></div>';
                    bottomArrow = '<div class="arrow bottom"></div>';

                    listctnr.append(topArrow).append(bottomArrow);
                }
			}
		}
		
		// Apply parameters width and height
		ctnr.width(params.width).height(params.height);

        if (params.arrows && params.fixedArrows) {
            if (params.vertical) {
                topArrow = listctnr.prev();
                bottomArrow = listctnr.next();

                listctnr.width(params.width)
                    .height(params.height - (topArrow.height() + bottomArrow.height()));
            }
            else {
                leftArrow = listctnr.prev();
                rightArrow = listctnr.next();
                
                listctnr.height(params.height)
                    .width(params.width - (leftArrow.width() + rightArrow.width()));
            }
        }
        else {
            listctnr.width(params.width).height(params.height);
        }
		
		var size = 0;
		
		if (!params.vertical) {
			ctnr.addClass('horizontal');
			
			// Determine content width
			$this.children().each(function() {
				$(this).addClass('item');
				
				if ($(this).outerWidth) {
					size += $(this).outerWidth(true);
				}
				else {
					// jQuery < 1.2.x backward compatibility patch
					size += $(this).width() + parseInt($(this).css('padding-left')) + parseInt($(this).css('padding-right'))
						+ parseInt($(this).css('margin-left')) + parseInt($(this).css('margin-right'));
				}
			});
			// Apply computed width to listcontainer
			$this.width(size);
			
			if (params.debug) {
				$.log('[HoverScroll] Computed content width : ' + size + 'px');
			}
			
			// Retrieve container width instead of using the given params.width to include padding
			if (ctnr.outerWidth) {
				size = ctnr.outerWidth();
			}
			else {
				// jQuery < 1.2.x backward compatibility patch
				size = ctnr.width() + parseInt(ctnr.css('padding-left')) + parseInt(ctnr.css('padding-right'))
					+ parseInt(ctnr.css('margin-left')) + parseInt(ctnr.css('margin-right'));
			}
			
			if (params.debug) {
				$.log('[HoverScroll] Computed container width : ' + size + 'px');
			}
		}
		else {
			ctnr.addClass('vertical');
			
			// Determine content height
			$this.children().each(function() {
				$(this).addClass('item')
				
				if ($(this).outerHeight) {
					size += $(this).outerHeight(true);
				}
				else {
					// jQuery < 1.2.x backward compatibility patch
					size += $(this).height() + parseInt($(this).css('padding-top')) + parseInt($(this).css('padding-bottom'))
						+ parseInt($(this).css('margin-bottom')) + parseInt($(this).css('margin-bottom'));
				}
			});
			// Apply computed height to listcontainer
			$this.height(size);
			
			if (params.debug) {
				$.log('[HoverScroll] Computed content height : ' + size + 'px');
			}
			
			// Retrieve container height instead of using the given params.height to include padding
			if (ctnr.outerHeight) {
				size = ctnr.outerHeight();
			}
			else {
				// jQuery < 1.2.x backward compatibility patch
				size = ctnr.height() + parseInt(ctnr.css('padding-top')) + parseInt(ctnr.css('padding-bottom'))
					+ parseInt(ctnr.css('margin-top')) + parseInt(ctnr.css('margin-bottom'));
			}
			
			if (params.debug) {
				$.log('[HoverScroll] Computed container height : ' + size + 'px');
			}
		}
		
		// Define hover zones on container
		var zone = {
			1: {action: 'move', from: 0, to: 0.06 * size, direction: -1 , speed: 16},
			2: {action: 'move', from: 0.06 * size, to: 0.15 * size, direction: -1 , speed: 8},
			3: {action: 'move', from: 0.15 * size, to: 0.25 * size, direction: -1 , speed: 4},
			4: {action: 'move', from: 0.25 * size, to: 0.4 * size, direction: -1 , speed: 2},
			5: {action: 'stop', from: 0.4 * size, to: 0.6 * size},
			6: {action: 'move', from: 0.6 * size, to: 0.75 * size, direction: 1 , speed: 2},
			7: {action: 'move', from: 0.75 * size, to: 0.85 * size, direction: 1 , speed: 4},
			8: {action: 'move', from: 0.85 * size, to: 0.94 * size, direction: 1 , speed: 8},
			9: {action: 'move', from: 0.94 * size, to: size, direction: 1 , speed: 16}
		}
		
		// Store default state values in container
		ctnr[0].isChanging = false;
		ctnr[0].direction  = 0;
		ctnr[0].speed      = 1;
		
		
		/**
		 * Check mouse position relative to hoverscroll container
		 * and trigger actions according to the zone table
		 *
		 * @param x {Integer} Mouse X event position
		 * @param y {Integer} Mouse Y event position
		 */
		function checkMouse(x, y) {
			x = x - ctnr.offset().left;
			y = y - ctnr.offset().top;
			
			var pos;
			if (!params.vertical) {pos = x;}
			else {pos = y;}
			
			for (i in zone) {
				if (pos >= zone[i].from && pos < zone[i].to) {
					if (zone[i].action == 'move') {startMoving(zone[i].direction, zone[i].speed);}
					else {stopMoving();}
				}
			}
		}
		
		
		/**
		 * Sets the opacity of the left|top and right|bottom
		 * arrows according to the scroll position.
		 */
		function setArrowOpacity() {
			if (!params.arrows || params.fixedArrows) {return;}
			
			var maxScroll;
			var scroll;
			
			if (!params.vertical) {
				maxScroll = listctnr[0].scrollWidth - listctnr.width();
				scroll = listctnr[0].scrollLeft;
			}
			else {
				maxScroll = listctnr[0].scrollHeight - listctnr.height();
				scroll = listctnr[0].scrollTop;
			}
			var limit = params.arrowsOpacity;
			
            // Optimization of opacity control by Josef Körner
            // Initialize opacity; keep it between its extremas (0 and limit) we don't need to check limits after init
			var opacity = (scroll / maxScroll) * limit;
            
   		    if (opacity > limit) { opacity = limit; }
			if (isNaN(opacity)) { opacity = 0; }
            
			// Check if the arrows are needed
			// Thanks to <admin at unix dot am> for fixing the bug that displayed the right arrow when it was not needed
			var done = false;
			if (opacity <= 0) {
                $('div.arrow.left, div.arrow.top', ctnr).hide();
                if(maxScroll > 0) {
                    $('div.arrow.right, div.arrow.bottom', ctnr).show().css('opacity', limit);
                }
                done = true;
            }
			if (opacity >= limit || maxScroll <= 0) {
           	    $('div.arrow.right, div.arrow.bottom', ctnr).hide();
                done = true;
            }

			if (!done) {
				$('div.arrow.left, div.arrow.top', ctnr).show().css('opacity', opacity);
				$('div.arrow.right, div.arrow.bottom', ctnr).show().css('opacity', (limit - opacity));
			}
            // End of optimization
		}
		
		
		/**
		 * Start scrolling the list with a given speed and direction
		 *
		 * @param direction {Integer}	Direction of the displacement, either -1|1
		 * @param speed {Integer}		Speed of the displacement (20 being very fast)
		 */
		function startMoving(direction, speed) {
			if (ctnr[0].direction != direction) {
				if (params.debug) {
					$.log('[HoverScroll] Starting to move. direction: ' + direction + ', speed: ' + speed);
				}
				
				stopMoving();
				ctnr[0].direction  = direction;
				ctnr[0].isChanging = true;
				move();
			}
			if (ctnr[0].speed != speed) {
				if (params.debug) {
					$.log('[HoverScroll] Changed speed: ' + speed);
				}
				
				ctnr[0].speed = speed;
			}
		}
		
		/**
		 * Stop scrolling the list
		 */
		function stopMoving() {
			if (ctnr[0].isChanging) {
				if (params.debug) {
					$.log('[HoverScroll] Stoped moving');
				}
				
				ctnr[0].isChanging = false;
				ctnr[0].direction  = 0;
				ctnr[0].speed      = 1;
				clearTimeout(ctnr[0].timer);
			}
		}
		
		/**
		 * Move the list one step in the given direction and speed
		 */
		function move() {
			if (ctnr[0].isChanging == false) {return;}
			
			setArrowOpacity();
			
			var scrollSide;
			if (!params.vertical) {scrollSide = 'scrollLeft';}
			else {scrollSide = 'scrollTop';}
			
			listctnr[0][scrollSide] += ctnr[0].direction * ctnr[0].speed;
			ctnr[0].timer = setTimeout(function() {move();}, 50);
		}

		// Initialize "right to left" option if specified
		if (params.rtl && !params.vertical) {
			listctnr[0].scrollLeft = listctnr[0].scrollWidth - listctnr.width();
		}
		
		// Bind actions to the hoverscroll container
		ctnr
		// Bind checkMouse to the mousemove
		.mousemove(function(e) {checkMouse(e.pageX, e.pageY);})
		// Bind stopMoving to the mouseleave
		// jQuery 1.2.x backward compatibility, thanks to Andy Mull!
		// replaced .mouseleave(...) with .bind('mouseleave', ...)
		.bind('mouseleave', function() {stopMoving();});

        // Bind the startMoving and stopMoving functions
        // to the HTML object for external access
        this.startMoving = startMoving;
        this.stopMoving = stopMoving;
		
		if (params.arrows && !params.fixedArrows) {
			// Initialise arrow opacity
			setArrowOpacity();
		}
		else {
			// Hide arrows
			$('.arrowleft, .arrowright, .arrowtop, .arrowbottom', ctnr).hide();
		}
	});
	
	return this;
};


// Backward compatibility with jQuery 1.1.x
if (!$.fn.offset) {
	$.fn.offset = function() {
		this.left = this.top = 0;
		
		if (this[0] && this[0].offsetParent) {
			var obj = this[0];
			do {
				this.left += obj.offsetLeft;
				this.top += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		
		return this;
	}
}
 
 $.fn.hoverscroll.params = {
 vertical:	false,      // Display the list vertically or not
 width:		400,        // Width of the list
 height:		50,         // Height of the list
 arrows:		true,       // Display arrows to the left and top or the top and bottom
 arrowsOpacity:	0.7,    // Maximum opacity of the arrows if fixedArrows
 fixedArrows: false,     // Fix the displayed arrows to the side of the list
 rtl:		false,		// Set display mode to "Right to Left"
 debug:		false       // Display some debugging information in firebug console
 };
 $.log = function() {
   try {console.log.apply(console, arguments);}
   catch (e) {
     try {opera.postError.apply(opera, arguments);}
     catch (e) {}
   }
 };
 })(jQuery);

