/* =========================================================

// jquery.innerfade.js

// Datum: 2008-02-14
// Firma: Medienfreunde Hofmann & Baldes GbR
// Author: Torsten Baldes
// Mail: t.baldes@medienfreunde.com
// Web: http://medienfreunde.com

// based on the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/
// and Ralf S. Engelschall http://trainofthoughts.org/

// ========================================================= */

eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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($){$.17.c=5(m){W p.16(5(){$.c(p,m)})};$.c=5(q,m){b 2={\'r\':\'x\',\'g\':\'14\',\'f\':\'j\',\'o\':15,\'K\':\'18\',\'L\':\'c\',\'l\':O,\'10\':"u",\'J\':"P"};7(m)$.19(2,m);7(2.l===O)b 3=$(q).l();9 b 3=$(q).l(2.l);7(3.a>1){$(q).h(\'B\',\'1b\').h(\'1a\',2.K).1c(2.L);12(b i=0;i<3.a;i++){$(3[i]).h(\'z-S\',Z(3.a-i)).h(\'B\',\'Y\').N()};7(2.f=="j"){k(5(){$.c.n(3,2,1,0)},2.o);$(3[0]).v(2.g,5(){t($(p)[0])})}9 7(2.f=="e"){b 8=d.s(d.e()*(3.a));k(5(){13{4=d.s(d.e()*(3.a))}Q(8==4);$.c.n(3,2,4,8)},2.o);$(3[8]).11()}9 7(2.f==\'D\'){2.f=\'j\';b 4=d.s(d.e()*(3.a));k(5(){$.c.n(3,2,(4+1)%3.a,4)},2.o);$(3[4]).11()}9{E(\'C-R y F G \\\'j\\\', \\\'e\\\' w \\\'D\\\'\')}}9{$(3[0]).h(\'z-S\',Z(1)).h(\'B\',\'Y\').N();k(5(){$(3[0]).v(2.g,5(){t($(p)[0])})},V)}};$.c.n=5(3,2,4,8){7(4==1&&2.J=="u"){b I={};b A={};A.1n="1m";b M={};k(5(){1p.1r("1q/1o.1k","1l","1f","1e","6.0.0",P,I,A,M)},V)}7(2.r==\'X\'){$(3[8]).1g(2.g);$(3[4]).1d(2.g)}9 7(2.r==\'x\'){$(3[8]).1j(2.g);$(3[4]).v(2.g,5(){t($(p)[0])})}9 E(\'C-r y F G \\\'X\\\' w \\\'x\\\'\');7(2.f=="j"){7((4+1)<3.a){4=4+1;8=4-1}9{7(2.10=="u"){4=0;8=3.a-1}9{W}}}9 7(2.f=="e"){8=4;Q(4==8)4=d.s(d.e()*3.a)}9 E(\'C-R y F G \\\'j\\\', \\\'e\\\' w \\\'D\\\'\');k((5(){$.c.n(3,2,4,8)}),2.o)}})(1i);5 t(H){7(H.T.U){H.T.U(\'1h\')}}',62,90,'||settings|elements|current|function||if|last|else|length|var|innerfade|Math|random|type|speed|css||sequence|setTimeout|children|options|next|timeout|this|container|animationtype|floor|removeFilter|true|fadeIn|or|fade|must||params|position|Innerfade|random_start|alert|either|be|element|flashvars|homepage|containerheight|runningclass|attributes|hide|null|false|while|Type|index|style|removeAttribute|1000|return|slide|absolute|String|loop|show|for|do|normal|2000|each|fn|auto|extend|height|relative|addClass|slideDown|128|670|slideUp|filter|jQuery|fadeOut|swf|flash_header|transparent|wmode|logo|swfobject|flash|embedSWF'.split('|'),0,{}))

/**
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */
eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(9($){$.1B.z=9(o){r 4.1i(9(){2Z $t(4,o)})};8 1L={Z:F,2j:1,1Q:1,h:7,1d:3,P:7,1V:\'3b\',2N:\'38\',1t:0,A:7,1x:7,21:7,2d:7,2g:7,2f:7,2l:7,2A:7,2n:7,2v:7,1W:\'<Q></Q>\',1R:\'<Q></Q>\',2C:\'2L\',2H:\'2L\',2b:7,28:7};$.z=9(e,o){4.5=$.1e({},1L,o||{});4.S=F;4.C=7;4.G=7;4.g=7;4.T=7;4.V=7;4.B=!4.5.Z?\'20\':\'2u\';4.E=!4.5.Z?\'2Q\':\'2O\';8 1o=\'\',1l=e.K.1l(\' \');1s(8 i=0;i<1l.I;i++){6(1l[i].2F(\'z-1o\')!=-1){$(e).1J(1l[i]);8 1o=1l[i];1u}}6(e.2J==\'2U\'||e.2J==\'2V\'){4.g=$(e);4.C=4.g.1c();6(4.C.1A(\'z-G\')){6(!4.C.1c().1A(\'z-C\'))4.C=4.C.A(\'<Q></Q>\');4.C=4.C.1c()}16 6(!4.C.1A(\'z-C\'))4.C=4.g.A(\'<Q></Q>\').1c()}16{4.C=$(e);4.g=$(e).3a(\'>2D,>2M,Q>2D,Q>2M\')}6(1o!=\'\'&&4.C.1c()[0].K.2F(\'z-1o\')==-1)4.C.A(\'<Q 36=" \'+1o+\'"></Q>\');4.G=4.g.1c();6(!4.G.I||!4.G.1A(\'z-G\'))4.G=4.g.A(\'<Q></Q>\').1c();4.V=$(\'.z-19\',4.C);6(4.V.h()==0&&4.5.1R!=7)4.V=4.G.1H(4.5.1R).19();4.V.Y(4.K(\'z-19\'));4.T=$(\'.z-1g\',4.C);6(4.T.h()==0&&4.5.1W!=7)4.T=4.G.1H(4.5.1W).19();4.T.Y(4.K(\'z-1g\'));4.G.Y(4.K(\'z-G\'));4.g.Y(4.K(\'z-g\'));4.C.Y(4.K(\'z-C\'));8 1m=4.5.P!=7?1z.1Z(4.10()/4.5.P):7;8 18=4.g.2Y(\'18\');8 k=4;6(18.h()>0){8 B=0,i=4.5.1Q;18.1i(9(){k.2a(4,i++);B+=k.W(4,1m)});4.g.q(4.B,B+\'U\');6(!o||o.h===J)4.5.h=18.h()}4.C.q(\'1K\',\'1O\');4.T.q(\'1K\',\'1O\');4.V.q(\'1K\',\'1O\');4.2G=9(){k.1g()};4.2K=9(){k.19()};4.1X=9(){k.2x()};6(4.5.1x!=7)4.5.1x(4,\'2B\');6($.26.2e&&$.26.2T<2X){4.1q(F,F);$(2k).1F(\'2W\',9(){k.1C()})}16 4.1C()};8 $t=$.z;$t.1B=$t.37={z:\'0.2.3\'};$t.1B.1e=$t.1e=$.1e;$t.1B.1e({1C:9(){4.u=7;4.y=7;4.14=7;4.1a=7;4.1f=F;4.1p=7;4.N=7;4.11=F;6(4.S)r;4.g.q(4.E,4.H(4.5.1Q)+\'U\');8 p=4.H(4.5.2j);4.14=4.1a=7;4.1w(p,F);$(2k).1S(\'2m\',4.1X).1F(\'2m\',4.1X)},2w:9(){4.g.2q();4.g.q(4.E,\'35\');4.g.q(4.B,\'33\');6(4.5.1x!=7)4.5.1x(4,\'2w\');4.1C()},2x:9(){6(4.N!=7&&4.11)4.g.q(4.E,$t.L(4.g.q(4.E))+4.N);4.N=7;4.11=F;6(4.5.21!=7)4.5.21(4);6(4.5.P!=7){8 k=4;8 1m=1z.1Z(4.10()/4.5.P),B=0,E=0;$(\'18\',4.g).1i(9(i){B+=k.W(4,1m);6(i+1<k.u)E=B});4.g.q(4.B,B+\'U\');4.g.q(4.E,-E+\'U\')}4.1d(4.u,F)},39:9(){4.S=1n;4.1q()},31:9(){4.S=F;4.1q()},h:9(s){6(s!=J){4.5.h=s;6(!4.S)4.1q()}r 4.5.h},3c:9(i,13){6(13==J||!13)13=i;6(4.5.h!==7&&13>4.5.h)13=4.5.h;1s(8 j=i;j<=13;j++){8 e=4.M(j);6(!e.I||e.1A(\'z-1b-1I\'))r F}r 1n},M:9(i){r $(\'.z-1b-\'+i,4.g)},2t:9(i,s){8 e=4.M(i),15=0,2t=0;6(e.I==0){8 c,e=4.1M(i),j=$t.L(i);1y(c=4.M(--j)){6(j<=0||c.I){j<=0?4.g.2o(e):c.1Y(e);1u}}}16 15=4.W(e);e.1J(4.K(\'z-1b-1I\'));25 s==\'2S\'?e.2R(s):e.2q().30(s);8 1m=4.5.P!=7?1z.1Z(4.10()/4.5.P):7;8 B=4.W(e,1m)-15;6(i>0&&i<4.u)4.g.q(4.E,$t.L(4.g.q(4.E))-B+\'U\');4.g.q(4.B,$t.L(4.g.q(4.B))+B+\'U\');r e},24:9(i){8 e=4.M(i);6(!e.I||(i>=4.u&&i<=4.y))r;8 d=4.W(e);6(i<4.u)4.g.q(4.E,$t.L(4.g.q(4.E))+d+\'U\');e.24();4.g.q(4.B,$t.L(4.g.q(4.B))-d+\'U\')},1g:9(){4.1G();6(4.N!=7&&!4.11)4.1U(F);16 4.1d(((4.5.A==\'1P\'||4.5.A==\'y\')&&4.5.h!=7&&4.y==4.5.h)?1:4.u+4.5.1d)},19:9(){4.1G();6(4.N!=7&&4.11)4.1U(1n);16 4.1d(((4.5.A==\'1P\'||4.5.A==\'u\')&&4.5.h!=7&&4.u==1)?4.5.h:4.u-4.5.1d)},1U:9(b){6(4.S||4.1f||!4.N)r;8 H=$t.L(4.g.q(4.E));!b?H-=4.N:H+=4.N;4.11=!b;4.14=4.u;4.1a=4.y;4.1w(H)},1d:9(i,a){6(4.S||4.1f)r;4.1w(4.H(i),a)},H:9(i){6(4.S||4.1f)r;6(4.5.A!=\'1h\')i=i<1?1:(4.5.h&&i>4.5.h?4.5.h:i);8 17=4.u>i;8 H=$t.L(4.g.q(4.E));8 f=4.5.A!=\'1h\'&&4.u<=1?1:4.u;8 c=17?4.M(f):4.M(4.y);8 j=17?f:f-1;8 e=7,l=0,p=F,d=0;1y(17?--j>=i:++j<i){e=4.M(j);p=!e.I;6(e.I==0){e=4.1M(j).Y(4.K(\'z-1b-1I\'));c[17?\'1H\':\'1Y\'](e)}c=e;d=4.W(e);6(p)l+=d;6(4.u!=7&&(4.5.A==\'1h\'||(j>=1&&(4.5.h==7||j<=4.5.h))))H=17?H+d:H-d}8 10=4.10();8 1D=[];8 P=0,j=i,v=0;8 c=4.M(i-1);1y(++P){e=4.M(j);p=!e.I;6(e.I==0){e=4.1M(j).Y(4.K(\'z-1b-1I\'));c.I==0?4.g.2o(e):c[17?\'1H\':\'1Y\'](e)}c=e;8 d=4.W(e);6(d==0){3x(\'3w: 3t 20/2u 3u 1s 3v. 3C 3D 3F 3E 3G 3B. 3r...\');r 0}6(4.5.A!=\'1h\'&&4.5.h!==7&&j>4.5.h)1D.3d(e);16 6(p)l+=d;v+=d;6(v>=10)1u;j++}1s(8 x=0;x<1D.I;x++)1D[x].24();6(l>0){4.g.q(4.B,4.W(4.g)+l+\'U\');6(17){H-=l;4.g.q(4.E,$t.L(4.g.q(4.E))-l+\'U\')}}8 y=i+P-1;6(4.5.A!=\'1h\'&&4.5.h&&y>4.5.h)y=4.5.h;6(j>y){P=0,j=y,v=0;1y(++P){8 e=4.M(j--);6(!e.I)1u;v+=4.W(e);6(v>=10)1u}}8 u=y-P+1;6(4.5.A!=\'1h\'&&u<1)u=1;6(4.11&&17){H+=4.N;4.11=F}4.N=7;6(4.5.A!=\'1h\'&&y==4.5.h&&(y-P+1)>=1){8 m=$t.12(4.M(y),!4.5.Z?\'1r\':\'23\');6((v-m)>10)4.N=v-10-m}1y(i-->u)H+=4.W(4.M(i));4.14=4.u;4.1a=4.y;4.u=u;4.y=y;r H},1w:9(p,a){6(4.S||4.1f)r;4.1f=1n;8 k=4;8 27=9(){k.1f=F;6(p==0)k.g.q(k.E,0);6(k.5.A==\'1P\'||k.5.A==\'y\'||k.5.h==7||k.y<k.5.h)k.2P();k.1q();k.2c(\'2s\')};4.2c(\'3g\');6(!4.5.1V||a==F){4.g.q(4.E,p+\'U\');27()}16{8 o=!4.5.Z?{\'2Q\':p}:{\'2O\':p};4.g.1w(o,4.5.1V,4.5.2N,27)}},2P:9(s){6(s!=J)4.5.1t=s;6(4.5.1t==0)r 4.1G();6(4.1p!=7)r;8 k=4;4.1p=3m(9(){k.1g()},4.5.1t*3n)},1G:9(){6(4.1p==7)r;3o(4.1p);4.1p=7},1q:9(n,p){6(n==J||n==7){8 n=!4.S&&4.5.h!==0&&((4.5.A&&4.5.A!=\'u\')||4.5.h==7||4.y<4.5.h);6(!4.S&&(!4.5.A||4.5.A==\'u\')&&4.5.h!=7&&4.y>=4.5.h)n=4.N!=7&&!4.11}6(p==J||p==7){8 p=!4.S&&4.5.h!==0&&((4.5.A&&4.5.A!=\'y\')||4.u>1);6(!4.S&&(!4.5.A||4.5.A==\'y\')&&4.5.h!=7&&4.u==1)p=4.N!=7&&4.11}8 k=4;4.T[n?\'1F\':\'1S\'](4.5.2C,4.2G)[n?\'1J\':\'Y\'](4.K(\'z-1g-1E\')).29(\'1E\',n?F:1n);4.V[p?\'1F\':\'1S\'](4.5.2H,4.2K)[p?\'1J\':\'Y\'](4.K(\'z-19-1E\')).29(\'1E\',p?F:1n);6(4.T.I>0&&(4.T[0].1k==J||4.T[0].1k!=n)&&4.5.2b!=7){4.T.1i(9(){k.5.2b(k,4,n)});4.T[0].1k=n}6(4.V.I>0&&(4.V[0].1k==J||4.V[0].1k!=p)&&4.5.28!=7){4.V.1i(9(){k.5.28(k,4,p)});4.V[0].1k=p}},2c:9(O){8 X=4.14==7?\'2B\':(4.14<4.u?\'1g\':\'19\');4.R(\'2d\',O,X);6(4.14!==4.u){4.R(\'2g\',O,X,4.u);4.R(\'2f\',O,X,4.14)}6(4.1a!==4.y){4.R(\'2l\',O,X,4.y);4.R(\'2A\',O,X,4.1a)}4.R(\'2n\',O,X,4.u,4.y,4.14,4.1a);4.R(\'2v\',O,X,4.14,4.1a,4.u,4.y)},R:9(1j,O,X,1v,13,2p,2y){6(4.5[1j]==J||(25 4.5[1j]!=\'2r\'&&O!=\'2s\'))r;8 R=25 4.5[1j]==\'2r\'?4.5[1j][O]:4.5[1j];6(!$.3z(R))r;8 k=4;6(1v===J)R(k,X,O);16 6(13===J)4.M(1v).1i(9(){R(k,4,1v,X,O)});16{1s(8 i=1v;i<=13;i++)6(i!==7&&!(i>=2p&&i<=2y))4.M(i).1i(9(){R(k,4,i,X,O)})}},1M:9(i){r 4.2a(\'<18></18>\',i)},2a:9(e,i){8 $e=$(e).Y(4.K(\'z-1b\')).Y(4.K(\'z-1b-\'+i));$e.29(\'3s\',i);r $e},K:9(c){r c+\' \'+c+(!4.5.Z?\'-3j\':\'-Z\')},W:9(e,d){8 D=e.2h!=J?e[0]:e;8 15=!4.5.Z?D.1N+$t.12(D,\'2i\')+$t.12(D,\'1r\'):D.2E+$t.12(D,\'2I\')+$t.12(D,\'23\');6(d==J||15==d)r 15;8 w=!4.5.Z?d-$t.12(D,\'2i\')-$t.12(D,\'1r\'):d-$t.12(D,\'2I\')-$t.12(D,\'23\');$(D).q(4.B,w+\'U\');r 4.W(D)},10:9(){r!4.5.Z?4.G[0].1N-$t.L(4.G.q(\'3e\'))-$t.L(4.G.q(\'3f\')):4.G[0].2E-$t.L(4.G.q(\'3k\'))-$t.L(4.G.q(\'3l\'))},3q:9(i,s){6(s==J)s=4.5.h;r 1z.3i((((i-1)/s)-1z.3p((i-1)/s))*s)+1}});$t.1e({1L:9(d){r $.1e(1L,d||{})},12:9(e,p){6(!e)r 0;8 D=e.2h!=J?e[0]:e;6(p==\'1r\'&&$.26.2e){8 15={\'1K\':\'1O\',\'3A\':\'3y\',\'20\':\'1t\'},1T,22;$.2z(D,15,9(){1T=D.1N});15[\'1r\']=0;$.2z(D,15,9(){22=D.1N});r 22-1T}r $t.L($.q(D,p))},L:9(v){v=34(v);r 32(v)?0:v}})})(3h);',62,229,'||||this|options|if|null|var|function|||||||list|size|||self||||||css|return||jc|first||||last|jcarousel|wrap|wh|container|el|lt|false|clip|pos|length|undefined|className|intval|get|tail|evt|visible|div|callback|locked|buttonNext|px|buttonPrev|dimension|state|addClass|vertical|clipping|inTail|margin|i2|prevFirst|old|else|back|li|prev|prevLast|item|parent|scroll|extend|animating|next|circular|each|cb|jcarouselstate|split|di|true|skin|timer|buttons|marginRight|for|auto|break|i1|animate|initCallback|while|Math|hasClass|fn|setup|cache|disabled|bind|stopAuto|before|placeholder|removeClass|display|defaults|create|offsetWidth|block|both|offset|buttonPrevHTML|unbind|oWidth|scrollTail|animation|buttonNextHTML|funcResize|after|ceil|width|reloadCallback|oWidth2|marginBottom|remove|typeof|browser|scrolled|buttonPrevCallback|attr|format|buttonNextCallback|notify|itemLoadCallback|safari|itemFirstOutCallback|itemFirstInCallback|jquery|marginLeft|start|window|itemLastInCallback|resize|itemVisibleInCallback|prepend|i3|empty|object|onAfterAnimation|add|height|itemVisibleOutCallback|reset|reload|i4|swap|itemLastOutCallback|init|buttonNextEvent|ul|offsetHeight|indexOf|funcNext|buttonPrevEvent|marginTop|nodeName|funcPrev|click|ol|easing|top|startAuto|left|html|string|version|UL|OL|load|523|children|new|append|unlock|isNaN|10px|parseInt|0px|class|prototype|swing|lock|find|normal|has|push|borderLeftWidth|borderRightWidth|onBeforeAnimation|jQuery|round|horizontal|borderTopWidth|borderBottomWidth|setTimeout|1000|clearTimeout|floor|index|Aborting|jcarouselindex|No|set|items|jCarousel|alert|none|isFunction|float|loop|This|will|an|cause|infinite'.split('|'),0,{}))



/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * $LastChangedDate: 2007-12-20 09:02:08 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4265 $
 *
 * Version: 3.0
 * 
 * Requires: $ 1.2.2+
 */

eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(7($){$.2.i.5={C:7(){d 6=$.2.i.5.6;9($.e.h)$(4).t(\'k.5\',7(2){$.c(4,\'f\',{u:2.u,r:2.r,w:2.w,x:2.x})});9(4.z)4.z(($.e.h?\'l\':\'5\'),6,p);n 4.m=6},B:7(){d 6=$.2.i.5.6;$(4).v(\'k.5\');9(4.j)4.j(($.e.h?\'l\':\'5\'),6,p);n 4.m=7(){};$.A(4,\'f\')},6:7(2){d a=K.N.M.O(D,1);2=$.2.R(2||Q.2);$.o(2,$.c(4,\'f\')||{});d b=0,F=E;9(2.q)b=2.q/G;9(2.y)b=-2.y/3;2.c=2.c||{};2.I="5";a.s(b);a.s(2);g $.2.H.P(4,a)}};$.8.o({5:7(8){g 8?4.t("5",8):4.S("5")},J:7(8){g 4.v("5",8)}})})(L);',55,55,'||event||this|mousewheel|handler|function|fn|if|args|delta|data|var|browser|mwcursorposdata|return|mozilla|special|removeEventListener|mousemove|DOMMouseScroll|onmousewheel|else|extend|false|wheelDelta|pageY|unshift|bind|pageX|unbind|clientX|clientY|detail|addEventListener|removeData|teardown|setup|arguments|true|returnValue|120|handle|type|unmousewheel|Array|jQuery|slice|prototype|call|apply|window|fix|trigger'.split('|'),0,{}))


/**
 * --------------------------------------------------------------------
 * jQuery-Plugin "pngFix"
 * Version: 1.2, 09.03.2009
 * by Andreas Eberhard, andreas.eberhard@gmail.com
 *                      http://jquery.andreaseberhard.de/
 *
 * Copyright (c) 2007 Andreas Eberhard
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 */
 
eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(j($){3.1e.1d=j(q){q=3.1f({Z:\'1g.1i\'},q);8 R=(d.N=="h M L"&&O(d.m)==4&&d.m.s("K 5.5")!=-1);8 Q=(d.N=="h M L"&&O(d.m)==4&&d.m.s("K 6.0")!=-1);c(3.1b.1h&&(R||Q)){3(2).E("1t[b$=.F]").w(j(){3(2).7(\'g\',3(2).g());3(2).7(\'f\',3(2).f());8 e=\'\';8 a=\'\';8 I=(3(2).7(\'t\'))?\'t="\'+3(2).7(\'t\')+\'" \':\'\';8 J=(3(2).7(\'r\'))?\'r="\'+3(2).7(\'r\')+\'" \':\'\';8 H=(3(2).7(\'v\'))?\'v="\'+3(2).7(\'v\')+\'" \':\'\';8 P=(3(2).7(\'u\'))?\'u="\'+3(2).7(\'u\')+\'" \':\'\';8 15=(3(2).7(\'S\'))?\'1r:\'+3(2).7(\'S\')+\';\':\'\';8 G=(3(2).1l().7(\'1n\'))?\'1o:1q;\':\'\';c(2.9.n){e+=\'n:\'+2.9.n+\';\';2.9.n=\'\'}c(2.9.p){e+=\'p:\'+2.9.p+\';\';2.9.p=\'\'}c(2.9.l){e+=\'l:\'+2.9.l+\';\';2.9.l=\'\'}8 13=(2.9.1v);a+=\'<o \'+I+J+H+P;a+=\'9="14:T;19-18:1a-1j;16:11-W;C:1u;\'+15+G;a+=\'g:\'+3(2).g()+\'k;\'+\'f:\'+3(2).f()+\'k;\';a+=\'D:y:x.h.z\'+\'(b=\\\'\'+3(2).7(\'b\')+\'\\\', A=\\\'B\\\');\';a+=13+\'"></o>\';c(e!=\'\'){a=\'<o 9="14:T;16:11-W;\'+e+G+\'g:\'+3(2).g()+\'k;\'+\'f:\'+3(2).f()+\'k;\'+\'">\'+a+\'</o>\'}3(2).1p();3(2).1m(a)});3(2).E("*").w(j(){8 i=3(2).V(\'C-U\');c(i.s(".F")!=-1){8 X=i.12(\'1s("\')[1].12(\'")\')[0];3(2).V(\'C-U\',\'1k\');3(2).Y(0).10.D="y:x.h.z(b=\'"+X+"\',A=\'B\')"}});3(2).E("17[b$=.F]").w(j(){8 i=3(2).7(\'b\');3(2).Y(0).10.D=\'y:x.h.z\'+\'(b=\\\'\'+i+\'\\\', A=\\\'B\\\');\';3(2).7(\'b\',q.Z)})}1c 3}})(3);',62,94,'||this|jQuery||||attr|var|style|strNewHTML|src|if|navigator|prevStyle|height|width|Microsoft|bgIMG|function|px|margin|appVersion|border|span|padding|settings|class|indexOf|id|alt|title|each|DXImageTransform|progid|AlphaImageLoader|sizingMethod|scale|background|filter|find|png|imgHand|imgTitle|imgId|imgClass|MSIE|Explorer|Internet|appName|parseInt|imgAlt|ie6|ie55|align|relative|image|css|block|iebg|get|blankgif|runtimeStyle|inline|split|imgStyle|position|imgAlign|display|input|space|white|pre|browser|return|pngFix|fn|extend|blank|msie|gif|line|none|parent|after|href|cursor|hide|hand|float|url|img|transparent|cssText'.split('|'),0,{}))


/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
 

eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}(';(9($){f 2={},a,k,G,F=$.1U.1V&&/1W\\s(5\\.5|6\\.)/.1T(1S.1P),L=V;$.e={t:V,1f:{10:1Q,r:V,1c:1g,12:"",g:15,d:15,17:"e"},1R:9(){$.e.t=!$.e.t}};$.J.1l({e:9(4){4=$.1l({},$.e.1f,4);1m(4);b 3.B(9(){$.1e(3,"e",4);3.R=2.7.l("1C");3.U=3.k;$(3).1Y("k");3.25=""}).26(1d).24(o).23(o)},O:F?9(){b 3.B(9(){f N=$(3).l(\'11\');8(N.1Z(/^p\\(["\']?(.*\\.21)["\']?\\)$/i)){N=1O.$1;$(3).l({\'11\':\'27\',\'1a\':"1F:1G.1H.1N(1M=1g, 1I=1L, 1o=\'"+N+"\')"}).B(9(){f D=$(3).l(\'D\');8(D!=\'1K\'&&D!=\'1b\')$(3).l(\'D\',\'1b\')})}})}:9(){b 3},1z:F?9(){b 3.B(9(){$(3).l({\'1a\':\'\',11:\'\'})})}:9(){b 3},19:9(){b 3.B(9(){$(3)[$(3).A()?"j":"o"]()})},p:9(){b 3.1h(\'28\')||3.1h(\'1o\')}});9 1m(4){8(2.7)b;2.7=$(\'<q 17="\'+4.17+\'"><18></18><q 1k="c"></q><q 1k="p"></q></q>\').2q(M.c).o();8($.J.K)2.7.K();2.k=$(\'18\',2.7);2.c=$(\'q.c\',2.7);2.p=$(\'q.p\',2.7)}9 4(1n){b $.1e(1n,"e")}9 1p(n){8(4(3).10)G=2u(j,4(3).10);m j();L=!!4(3).L;$(M.c).2t(\'X\',z);z(n)}9 1d(){8($.e.t||3==a||(!3.U&&!4(3).Q))b;a=3;k=3.U;8(4(3).Q){2.k.o();f C=4(3).Q.2w(3);8(C.2v||C.2p){2.c.1i().W(C)}m{2.c.A(C)}2.c.j()}m 8(4(3).1j){f Z=k.2n(4(3).1j);2.k.A(Z.2o()).j();2.c.1i();2b(f i=0,Y;(Y=Z[i]);i++){8(i>0)2.c.W("<2a/>");2.c.W(Y)}2.c.19()}m{2.k.A(k).j();2.c.o()}8(4(3).1c&&$(3).p())2.p.A($(3).p().2k(\'2j://\',\'\')).j();m 2.p.o();2.7.16(4(3).12);8(4(3).O)2.7.O();1p.2e(3,2h)}9 j(){G=14;8((!F||!$.J.K)&&4(a).r){8(2.7.I(":1t"))2.7.T().j().S(4(a).r,a.R);m 2.7.I(\':1y\')?2.7.S(4(a).r,a.R):2.7.2m(4(a).r)}m{2.7.j()}z()}9 z(n){8($.e.t)b;8(n&&n.2l.2g=="2f"){b}8(!L&&2.7.I(":1y")){$(M.c).1s(\'X\',z)}8(a==14){$(M.c).1s(\'X\',z);b}2.7.13("u-w").13("u-1q");f d=2.7[0].1A;f g=2.7[0].1x;8(n){d=n.29+4(a).d;g=n.2c+4(a).g;f w=\'1v\';8(4(a).2d){w=$(E).1B()-d;d=\'1v\'}2.7.l({d:d,w:w,g:g})}f v=u(),h=2.7[0];8(v.x+v.1E<h.1A+h.1r){d-=h.1r+20+4(a).d;2.7.l({d:d+\'1u\'}).16("u-w")}8(v.y+v.1D<h.1x+h.1w){g-=h.1w+20+4(a).g;2.7.l({g:g+\'1u\'}).16("u-1q")}}9 u(){b{x:$(E).2r(),y:$(E).2s(),1E:$(E).1B(),1D:$(E).22()}}9 o(n){8($.e.t)b;8(G)1J(G);a=14;f H=4(3);9 P(){2.7.13(H.12).o().l("1C","")}8((!F||!$.J.K)&&H.r){8(2.7.I(\':1t\'))2.7.T().S(H.r,0,P);m 2.7.T().1X(H.r,P)}m P();8(4(3).O)2.7.1z()}})(2i);',62,157,'||helper|this|settings|||parent|if|function|current|return|body|left|tooltip|var|top|||show|title|css|else|event|hide|url|div|fade||blocked|viewport||right|||update|html|each|bodyContent|position|window|IE|tID|tsettings|is|fn|bgiframe|track|document|image|fixPNG|complete|bodyHandler|tOpacity|fadeTo|stop|tooltipText|false|append|mousemove|part|parts|delay|backgroundImage|extraClass|removeClass|null||addClass|id|h3|hideWhenEmpty|filter|relative|showURL|save|data|defaults|true|attr|empty|showBody|class|extend|createHelper|element|src|handle|bottom|offsetWidth|unbind|animated|px|auto|offsetHeight|offsetTop|visible|unfixPNG|offsetLeft|width|opacity|cy|cx|progid|DXImageTransform|Microsoft|sizingMethod|clearTimeout|absolute|crop|enabled|AlphaImageLoader|RegExp|userAgent|200|block|navigator|test|browser|msie|MSIE|fadeOut|removeAttr|match||png|height|click|mouseout|alt|mouseover|none|href|pageX|br|for|pageY|positionLeft|apply|OPTION|tagName|arguments|jQuery|http|replace|target|fadeIn|split|shift|jquery|appendTo|scrollLeft|scrollTop|bind|setTimeout|nodeType|call'.split('|'),0,{}))


/*	SWFObject v2.0 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var Z="undefined",P="object",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",W="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,T=null,S=false,C=false;var a=function(){var l=typeof g.getElementById!=Z&&typeof g.getElementsByTagName!=Z&&typeof g.createElement!=Z&&typeof g.appendChild!=Z&&typeof g.replaceChild!=Z&&typeof g.removeChild!=Z&&typeof g.cloneNode!=Z,t=[0,0,0],n=null;if(typeof N.plugins!=Z&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=Z){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var e=function(){if(!a.w3cdom){return }J(I);if(a.ie&&a.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=c("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);V()}}}}catch(j){}}if(a.webkit&&typeof g.readyState!=Z){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){V()}},10)}if(typeof g.addEventListener!=Z){g.addEventListener("DOMContentLoaded",V,null)}M(V)}();function V(){if(S){return }if(a.ie&&a.win){var m=Y("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return }}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=Z){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=Z){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=Z){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(a.pv[0]>0){var k=c(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(a.webkit&&a.webkit<312){U(k)}X(m,true)}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(a.win||a.mac)){D(H[j])}else{d(k)}}}}else{X(m,true)}}}function U(m){var k=m.getElementsByTagName(P)[0];if(k){var p=Y("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(a.ie&&a.win&&O("8.0.0")){G.attachEvent("onunload",function(){var k=c(i);if(k){for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)}})}}function D(j){C=true;var o=c(j.id);if(o){if(j.altContentId){var l=c(j.altContentId);if(l){L=l;T=j.altContentId}}else{L=b(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=a.ie&&a.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(a.ie&&a.win&&o.readyState!=4){var i=Y("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function d(j){if(a.ie&&a.win&&j.readyState!=4){var i=Y("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(b(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(b(j),j)}}function b(n){var m=Y("div");if(a.win&&a.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=c(q);if(typeof AE.id==Z){AE.id=q}if(a.ie&&a.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=c(AE.id)}else{if(a.webkit&&a.webkit<312){var AA=Y("embed");AA.setAttribute("type",W);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=Y(P);s.setAttribute("type",W);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=Y("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function c(i){return g.getElementById(i)}function Y(i){return g.createElement(i)}function O(k){var j=a.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(a.ie&&a.mac){return }var l=g.getElementsByTagName("head")[0],k=Y("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(a.ie&&a.win)&&typeof g.createTextNode!=Z){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(a.ie&&a.win&&typeof g.styleSheets!=Z&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}function X(k,i){var j=i?"visible":"hidden";if(S){c(k).style.visibility=j}else{A("#"+k,"visibility:"+j)}}return{registerObject:function(l,i,k){if(!a.w3cdom||!l||!i){return }var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;X(l,false)},getObjectById:function(l){var i=null;if(a.w3cdom&&S){var j=c(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=Z)){i=j}else{if(typeof k.SetVariable!=Z){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!a.w3cdom||!n||!u||!r||!t||!j){return }r+="";t+="";if(O(j)){X(u,false);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=Z){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);if(q.id==u){X(u,true)}})}else{if(m&&!C&&O("6.0.65")&&(a.win||a.mac)){X(u,false);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i)})}}},getFlashPlayerVersion:function(){return{major:a.pv[0],minor:a.pv[1],release:a.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(a.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(a.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=c(K);if(i){i.parentNode.replaceChild(L,i);if(T){X(T,true);if(a.ie&&a.win){L.style.display="block"}}L=null;T=null;C=false}}}}}();/* Copyright (c) 2006 Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * See http://kelvinluck.com/assets/jquery/jScrollPane/
 * $Id: jScrollPane.js 75 2009-05-15 05:49:20Z kelvin.luck@gmail.com $
 */

/**
 * Replace the vertical scroll bars on any matched elements with a fancy
 * styleable (via CSS) version. With JS disabled the elements will
 * gracefully degrade to the browsers own implementation of overflow:auto.
 * If the mousewheel plugin has been included on the page then the scrollable areas will also
 * respond to the mouse wheel.
 *
 * @example jQuery(".scroll-pane").jScrollPane();
 *
 * @name jScrollPane
 * @type jQuery
 * @param Object	settings	hash with options, described below.
 *								scrollbarWidth	-	The width of the generated scrollbar in pixels
 *								scrollbarMargin	-	The amount of space to leave on the side of the scrollbar in pixels
 *								wheelSpeed		-	The speed the pane will scroll in response to the mouse wheel in pixels
 *								showArrows		-	Whether to display arrows for the user to scroll with
 *								arrowSize		-	The height of the arrow buttons if showArrows=true
 *								animateTo		-	Whether to animate when calling scrollTo and scrollBy
 *								dragMinHeight	-	The minimum height to allow the drag bar to be
 *								dragMaxHeight	-	The maximum height to allow the drag bar to be
 *								animateInterval	-	The interval in milliseconds to update an animating scrollPane (default 100)
 *								animateStep		-	The amount to divide the remaining scroll distance by when animating (default 3)
 *								maintainPosition-	Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true)
 *								tabIndex		-	The tabindex for this jScrollPane to control when it is tabbed to when navigating via keyboard (default 0)
 *								enableKeyboardNavigation - Whether to allow keyboard scrolling of this jScrollPane when it is focused (default true)
 *								animateToInternalLinks - Whether the move to an internal link (e.g. when it's focused by tabbing or by a hash change in the URL) should be animated or instant (default false)
 *								scrollbarOnLeft	-	Display the scrollbar on the left side?  (needs stylesheet changes, see examples.html)
 *								reinitialiseOnImageLoad - Whether the jScrollPane should automatically re-initialise itself when any contained images are loaded (default false)
 * @return jQuery
 * @cat Plugins/jScrollPane
 * @author Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 */

(function($) {

$.jScrollPane = {
	active : []
};
$.fn.jScrollPane = function(settings)
{
	
	settings = $.extend({}, $.fn.jScrollPane.defaults, settings);

	var rf = function() { return false; };
	
	return this.each(
		function()
		{
			var $this = $(this);
			// Switch the element's overflow to hidden to ensure we get the size of the element without the scrollbars [http://plugins.jquery.com/node/1208]
			$this.css('overflow', 'hidden');
			var paneEle = this;
			
			if ($(this).parent().is('.jScrollPaneContainer')) {
				var currentScrollPosition = settings.maintainPosition ? $this.position().top : 0;
				var $c = $(this).parent();
				var paneWidth = $c.innerWidth();
				var paneHeight = $c.outerHeight();
				var trackHeight = paneHeight;
				$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown', $c).remove();
				$this.css({'top':0});
			} else {
				var currentScrollPosition = 0;
				this.originalPadding = $this.css('paddingTop') + ' ' + $this.css('paddingRight') + ' ' + $this.css('paddingBottom') + ' ' + $this.css('paddingLeft');
				this.originalSidePaddingTotal = (parseInt($this.css('paddingLeft')) || 0) + (parseInt($this.css('paddingRight')) || 0);
				var paneWidth = $this.innerWidth();
				var paneHeight = $this.innerHeight();
				var trackHeight = paneHeight;
				$this.wrap(
					$('<div></div>').attr(
						{'className':'jScrollPaneContainer'}
					).css(
						{
							'height':paneHeight+'px', 
							'width':paneWidth+'px'
						}
					).attr(
						'tabindex', 
						settings.tabIndex
					)
				);
				// deal with text size changes (if the jquery.em plugin is included)
				// and re-initialise the scrollPane so the track maintains the
				// correct size
				$(document).bind(
					'emchange', 
					function(e, cur, prev)
					{
						$this.jScrollPane(settings);
					}
				);
				
			}
			
			if (settings.reinitialiseOnImageLoad) {
				// code inspired by jquery.onImagesLoad: http://plugins.jquery.com/project/onImagesLoad
				// except we re-initialise the scroll pane when each image loads so that the scroll pane is always up to size...
				// TODO: Do I even need to store it in $.data? Is a local variable here the same since I don't pass the reinitialiseOnImageLoad when I re-initialise?
				var $imagesToLoad = $.data(paneEle, 'jScrollPaneImagesToLoad') || $('img', $this);
				var loadedImages = [];
				
				if ($imagesToLoad.length) {
					$imagesToLoad.each(function(i, val)	{
						$(this).bind('load readystatechange', function() {
							if($.inArray(i, loadedImages) == -1){ //don't double count images
								loadedImages.push(val); //keep a record of images we've seen
								$imagesToLoad = $.grep($imagesToLoad, function(n, i) {
									return n != val;
								});
								$.data(paneEle, 'jScrollPaneImagesToLoad', $imagesToLoad);
								var s2 = $.extend(settings, {reinitialiseOnImageLoad:false});
								$this.jScrollPane(s2); // re-initialise
							}
						}).each(function(i, val) {
							if(this.complete || this.complete===undefined) { 
								//needed for potential cached images
								this.src = this.src; 
							} 
						});
					});
				};
			}

			var p = this.originalSidePaddingTotal;
			var realPaneWidth = paneWidth - settings.scrollbarWidth - settings.scrollbarMargin - p;

			var cssToApply = {
				'height':'auto',
				'width': realPaneWidth + 'px'
			}

			if(settings.scrollbarOnLeft) {
				cssToApply.paddingLeft = settings.scrollbarMargin + settings.scrollbarWidth + 'px';
			} else {
				cssToApply.paddingRight = settings.scrollbarMargin + 'px';
			}

			$this.css(cssToApply);

			var contentHeight = $this.outerHeight();
			var percentInView = paneHeight / contentHeight;

			if (percentInView < .99) {
				var $container = $this.parent();
				$container.append(
					$('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(
						$('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(
							$('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),
							$('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'})
						)
					)
				);
				
				var $track = $('>.jScrollPaneTrack', $container);
				var $drag = $('>.jScrollPaneTrack .jScrollPaneDrag', $container);
				
				
				var currentArrowDirection;
				var currentArrowTimerArr = [];// Array is used to store timers since they can stack up when dealing with keyboard events. This ensures all timers are cleaned up in the end, preventing an acceleration bug.
				var currentArrowInc;
				var whileArrowButtonDown = function() 
				{
					if (currentArrowInc > 4 || currentArrowInc % 4 == 0) {
						positionDrag(dragPosition + currentArrowDirection * mouseWheelMultiplier);
					}
					currentArrowInc++;
				};

				if (settings.enableKeyboardNavigation) {
					$container.bind(
						'keydown.jscrollpane',
						function(e) 
						{
							switch (e.keyCode) {
								case 38: //up
									currentArrowDirection = -1;
									currentArrowInc = 0;
									whileArrowButtonDown();
									currentArrowTimerArr[currentArrowTimerArr.length] = setInterval(whileArrowButtonDown, 100);
									return false;
								case 40: //down
									currentArrowDirection = 1;
									currentArrowInc = 0;
									whileArrowButtonDown();
									currentArrowTimerArr[currentArrowTimerArr.length] = setInterval(whileArrowButtonDown, 100);
									return false;
								case 33: // page up
								case 34: // page down
									// TODO
									return false;
								default:
							}
						}
					).bind(
						'keyup.jscrollpane',
						function(e) 
						{
							if (e.keyCode == 38 || e.keyCode == 40) {
								for (var i = 0; i < currentArrowTimerArr.length; i++) {
									clearInterval(currentArrowTimerArr[i]);
								}
								return false;
							}
						}
					);
				}

				if (settings.showArrows) {
					
					var currentArrowButton;
					var currentArrowInterval;

					var onArrowMouseUp = function(event)
					{
						$('html').unbind('mouseup', onArrowMouseUp);
						currentArrowButton.removeClass('jScrollActiveArrowButton');
						clearInterval(currentArrowInterval);
					};
					var onArrowMouseDown = function() {
						$('html').bind('mouseup', onArrowMouseUp);
						currentArrowButton.addClass('jScrollActiveArrowButton');
						currentArrowInc = 0;
						whileArrowButtonDown();
						currentArrowInterval = setInterval(whileArrowButtonDown, 100);
					};
					$container
						.append(
							$('<a></a>')
								.attr({'href':'javascript:;', 'className':'jScrollArrowUp', 'tabindex':-1})
								.css({'width':settings.scrollbarWidth+'px'})
								.html('Scroll up')
								.bind('mousedown', function()
								{
									currentArrowButton = $(this);
									currentArrowDirection = -1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
								.bind('click', rf),
							$('<a></a>')
								.attr({'href':'javascript:;', 'className':'jScrollArrowDown', 'tabindex':-1})
								.css({'width':settings.scrollbarWidth+'px'})
								.html('Scroll down')
								.bind('mousedown', function()
								{
									currentArrowButton = $(this);
									currentArrowDirection = 1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
								.bind('click', rf)
						);
					var $upArrow = $('>.jScrollArrowUp', $container);
					var $downArrow = $('>.jScrollArrowDown', $container);
					if (settings.arrowSize) {
						trackHeight = paneHeight - settings.arrowSize - settings.arrowSize;
						$track
							.css({'height': trackHeight+'px', top:settings.arrowSize+'px'})
					} else {
						var topArrowHeight = $upArrow.height();
						settings.arrowSize = topArrowHeight;
						trackHeight = paneHeight - topArrowHeight - $downArrow.height();
						$track
							.css({'height': trackHeight+'px', top:topArrowHeight+'px'})
					}
				}
				
				var $pane = $(this).css({'position':'absolute', 'overflow':'visible'});
				
				var currentOffset;
				var maxY;
				var mouseWheelMultiplier;
				// store this in a seperate variable so we can keep track more accurately than just updating the css property..
				var dragPosition = 0;
				var dragMiddle = percentInView*paneHeight/2;
				
				// pos function borrowed from tooltip plugin and adapted...
				var getPos = function (event, c) {
					var p = c == 'X' ? 'Left' : 'Top';
					return event['page' + c] || (event['client' + c] + (document.documentElement['scroll' + p] || document.body['scroll' + p])) || 0;
				};
				
				var ignoreNativeDrag = function() {	return false; };
				
				var initDrag = function()
				{
					ceaseAnimation();
					currentOffset = $drag.offset(false);
					currentOffset.top -= dragPosition;
					maxY = trackHeight - $drag[0].offsetHeight;
					mouseWheelMultiplier = 2 * settings.wheelSpeed * maxY / contentHeight;
				};
				
				var onStartDrag = function(event)
				{
					initDrag();
					dragMiddle = getPos(event, 'Y') - dragPosition - currentOffset.top;
					$('html').bind('mouseup', onStopDrag).bind('mousemove', updateScroll);
					if ($.browser.msie) {
						$('html').bind('dragstart', ignoreNativeDrag).bind('selectstart', ignoreNativeDrag);
					}
					return false;
				};
				var onStopDrag = function()
				{
					$('html').unbind('mouseup', onStopDrag).unbind('mousemove', updateScroll);
					dragMiddle = percentInView*paneHeight/2;
					if ($.browser.msie) {
						$('html').unbind('dragstart', ignoreNativeDrag).unbind('selectstart', ignoreNativeDrag);
					}
				};
				var positionDrag = function(destY)
				{
					destY = destY < 0 ? 0 : (destY > maxY ? maxY : destY);
					dragPosition = destY;
					$drag.css({'top':destY+'px'});
					var p = destY / maxY;
					$this.data('jScrollPanePosition', (paneHeight-contentHeight)*-p);
					$pane.css({'top':((paneHeight-contentHeight)*p) + 'px'});
					$this.trigger('scroll');
					if (settings.showArrows) {
						$upArrow[destY == 0 ? 'addClass' : 'removeClass']('disabled');
						$downArrow[destY == maxY ? 'addClass' : 'removeClass']('disabled');
					}
				};
				var updateScroll = function(e)
				{
					positionDrag(getPos(e, 'Y') - currentOffset.top - dragMiddle);
				};
				
				var dragH = Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2), settings.dragMaxHeight), settings.dragMinHeight);
				
				$drag.css(
					{'height':dragH+'px'}
				).bind('mousedown', onStartDrag);
				
				var trackScrollInterval;
				var trackScrollInc;
				var trackScrollMousePos;
				var doTrackScroll = function()
				{
					if (trackScrollInc > 8 || trackScrollInc%4==0) {
						positionDrag((dragPosition - ((dragPosition - trackScrollMousePos) / 2)));
					}
					trackScrollInc ++;
				};
				var onStopTrackClick = function()
				{
					clearInterval(trackScrollInterval);
					$('html').unbind('mouseup', onStopTrackClick).unbind('mousemove', onTrackMouseMove);
				};
				var onTrackMouseMove = function(event)
				{
					trackScrollMousePos = getPos(event, 'Y') - currentOffset.top - dragMiddle;
				};
				var onTrackClick = function(event)
				{
					initDrag();
					onTrackMouseMove(event);
					trackScrollInc = 0;
					$('html').bind('mouseup', onStopTrackClick).bind('mousemove', onTrackMouseMove);
					trackScrollInterval = setInterval(doTrackScroll, 100);
					doTrackScroll();
					return false;
				};
				
				$track.bind('mousedown', onTrackClick);
				
				$container.bind(
					'mousewheel',
					function (event, delta) {
						delta = delta || (event.wheelDelta ? event.wheelDelta / 120 : (event.detail) ?
-event.detail/3 : 0);
						initDrag();
						ceaseAnimation();
						var d = dragPosition;
						positionDrag(dragPosition - delta * mouseWheelMultiplier);
						var dragOccured = d != dragPosition;
						return !dragOccured;
					}
				);

				var _animateToPosition;
				var _animateToInterval;
				function animateToPosition()
				{
					var diff = (_animateToPosition - dragPosition) / settings.animateStep;
					if (diff > 1 || diff < -1) {
						positionDrag(dragPosition + diff);
					} else {
						positionDrag(_animateToPosition);
						ceaseAnimation();
					}
				}
				var ceaseAnimation = function()
				{
					if (_animateToInterval) {
						clearInterval(_animateToInterval);
						delete _animateToPosition;
					}
				};
				var scrollTo = function(pos, preventAni)
				{
					if (typeof pos == "string") {
						$e = $(pos, $this);
						if (!$e.length) return;
						pos = $e.offset().top - $this.offset().top;
					}
					$container.scrollTop(0);
					ceaseAnimation();
					var maxScroll = contentHeight - paneHeight;
					pos = pos > maxScroll ? maxScroll : pos;
					$this.data('jScrollPaneMaxScroll', maxScroll);
					var destDragPosition = pos/maxScroll * maxY;
					if (preventAni || !settings.animateTo) {
						positionDrag(destDragPosition);
					} else {
						_animateToPosition = destDragPosition;
						_animateToInterval = setInterval(animateToPosition, settings.animateInterval);
					}
				};
				$this[0].scrollTo = scrollTo;
				
				$this[0].scrollBy = function(delta)
				{
					var currentPos = -parseInt($pane.css('top')) || 0;
					scrollTo(currentPos + delta);
				};
				
				initDrag();
				
				scrollTo(-currentScrollPosition, true);
			
				// Deal with it when the user tabs to a link or form element within this scrollpane
				$('*', this).bind(
					'focus',
					function(event)
					{
						var $e = $(this);
						
						// loop through parents adding the offset top of any elements that are relatively positioned between
						// the focused element and the jScrollPaneContainer so we can get the true distance from the top
						// of the focused element to the top of the scrollpane...
						var eleTop = 0;
						
						while ($e[0] != $this[0]) {
							eleTop += $e.position().top;
							$e = $e.offsetParent();
						}
						
						var viewportTop = -parseInt($pane.css('top')) || 0;
						var maxVisibleEleTop = viewportTop + paneHeight;
						var eleInView = eleTop > viewportTop && eleTop < maxVisibleEleTop;
						if (!eleInView) {
							var destPos = eleTop - settings.scrollbarMargin;
							if (eleTop > viewportTop) { // element is below viewport - scroll so it is at bottom.
								destPos += $(this).height() + 15 + settings.scrollbarMargin - paneHeight;
							}
							scrollTo(destPos);
						}
					}
				)
				
				
				if (location.hash) {
					setTimeout(function() {scrollTo(location.hash);}, $.browser.safari ? 100 : 0);
				}
				
				// use event delegation to listen for all clicks on links and hijack them if they are links to
				// anchors within our content...
				$(document).bind(
					'click',
					function(e)
					{
						$target = $(e.target);
						if ($target.is('a')) {
							var h = $target.attr('href');
							if (h && h.substr(0, 1) == '#' && h.length > 1) {
								setTimeout(function() {scrollTo(h, !settings.animateToInternalLinks);}, $.browser.safari ? 100 : 0);
							}
						}
					}
				); 
				
				// Deal with dragging and selecting text to make the scrollpane scroll...
				function onSelectScrollMouseDown(e)
				{
				   $(document).bind('mousemove.jScrollPaneDragging', onTextSelectionScrollMouseMove);
				   $(document).bind('mouseup.jScrollPaneDragging',   onSelectScrollMouseUp);
				  
				}
				
				var textDragDistanceAway;
				var textSelectionInterval;
				
				function onTextSelectionInterval()
				{
					direction = textDragDistanceAway < 0 ? -1 : 1;
					$this[0].scrollBy(textDragDistanceAway / 2);
				}

				function clearTextSelectionInterval()
				{
					if (textSelectionInterval) {
						clearInterval(textSelectionInterval);
						textSelectionInterval = undefined;
					}
				}
				
				function onTextSelectionScrollMouseMove(e)
				{
					var offset = $this.parent().offset().top;
					var maxOffset = offset + paneHeight;
					var mouseOffset = getPos(e, 'Y');
					textDragDistanceAway = mouseOffset < offset ? mouseOffset - offset : (mouseOffset > maxOffset ? mouseOffset - maxOffset : 0);
					if (textDragDistanceAway == 0) {
						clearTextSelectionInterval();
					} else {
						if (!textSelectionInterval) {
							textSelectionInterval  = setInterval(onTextSelectionInterval, 100);
						}
					}
				}

				function onSelectScrollMouseUp(e)
				{
				   $(document)
					  .unbind('mousemove.jScrollPaneDragging')
					  .unbind('mouseup.jScrollPaneDragging');
				   clearTextSelectionInterval();
				}

				$container.bind('mousedown.jScrollPane', onSelectScrollMouseDown);

				
				$.jScrollPane.active.push($this[0]);
				
			} else {
				$this.css(
					{
						'height':paneHeight+'px',
						'width':paneWidth-this.originalSidePaddingTotal+'px',
						'padding':this.originalPadding
					}
				);
				$this[0].scrollTo = $this[0].scrollBy = function() {};
				// clean up listeners
				$this.parent().unbind('mousewheel').unbind('mousedown.jScrollPane').unbind('keydown.jscrollpane').unbind('keyup.jscrollpane');
			}
			
		}
	)
};

$.fn.jScrollPaneRemove = function()
{
	$(this).each(function()
	{
		$this = $(this);
		var $c = $this.parent();
		if ($c.is('.jScrollPaneContainer')) {
			$this.css(
				{
					'top':'',
					'height':'',
					'width':'',
					'padding':'',
					'overflow':'',
					'position':''
				}
			);
			$c.after($this).remove();
		}
	});
}

$.fn.jScrollPane.defaults = {
	scrollbarWidth : 10,
	scrollbarMargin : 5,
	wheelSpeed : 18,
	showArrows : false,
	arrowSize : 0,
	animateTo : false,
	dragMinHeight : 1,
	dragMaxHeight : 99999,
	animateInterval : 100,
	animateStep: 3,
	maintainPosition: true,
	scrollbarOnLeft: false,
	reinitialiseOnImageLoad: false,
	tabIndex : 0,
	enableKeyboardNavigation: true,
	animateToInternalLinks: false
};

// clean up the scrollTo expandos
$(window)
	.bind('unload', function() {
		var els = $.jScrollPane.active; 
		for (var i=0; i<els.length; i++) {
			els[i].scrollTo = els[i].scrollBy = null;
		}
	}
);

})(jQuery);

/*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
		  
var tb_pathToImage = "images/jquery/loadingAnimation.gif";
var isCatalogCarousel = true;

/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/

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

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk, gallery){
	$(domChunk).click(function(){
			// alert(domChunk);		  
//	var t = this.title || this.name || null;
if(domChunk == "#lowercontent li a"){
	
	var t = this.title || this.name || null;
		isCatalogCarousel = false;

}else{
	//	var t = $("#"+this.class +"").html();
var t = $("#" + this.name).html();
isCatalogCarousel = true;

}


//alert(t);
	var a = this.href || this.alt;
	var g = this.rel || false;
	tb_show(t,a,g, gallery);
	this.blur();
	return false;
	});
}


function tb_show(caption, url, imageGroup, gallery) {//function called when the user clicks on a thickbox link
//url=url+"?KeepThis=true&amp;TB_iframe=true&amp;height=400&amp;width=600";

	try {
		if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
			$("body","html").css({height: "100%", width: "100%"});
			$("html").css("overflow","hidden");
			if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
				$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
				$("#TB_overlay").click(tb_remove);
			}
		}else{//all others
			if(document.getElementById("TB_overlay") === null){
				$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
				$("#TB_overlay").click(tb_remove);
			}
		}
		
		if(tb_detectMacXFF()){
			$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
		}else{
			$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
		}
		
		if(caption===null){caption="";}
		$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
		$('#TB_load').show();//show loader
		
		var baseURL;
	   if(url.indexOf("?")!==-1){ //ff there is a query string involved
			baseURL = url.substr(0, url.indexOf("?"));
	   }else{ 
	   		baseURL = url;
	   }
	   
	   var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
	   var urlType = baseURL.toLowerCase().match(urlString);


		//if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
		if("mike" == 'mike'){//code to show images
				
			TB_PrevCaption = "";
			TB_PrevURL = "";
			TB_PrevHTML = "";
			TB_NextCaption = "";
			TB_NextURL = "";
			TB_NextHTML = "";
			TB_imageCount = "";
			TB_FoundURL = false;
			if(imageGroup){
									

				TB_TempArray = $("a[rel="+imageGroup+"]").get();
				

				for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
					
					var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
					//alert("TB_TempArray[TB_Counter].href :" + TB_TempArray[TB_Counter].href + "      <br/>    " + url);
						if (!(TB_TempArray[TB_Counter].href == url)) {						
							if (TB_FoundURL) {
								TB_NextCaption = TB_TempArray[TB_Counter].title;
								TB_NextURL = TB_TempArray[TB_Counter].href;
								TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
							} else {
								TB_PrevCaption = TB_TempArray[TB_Counter].title;
								TB_PrevURL = TB_TempArray[TB_Counter].href;
								TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
							}
						} else {
							TB_FoundURL = true;
							if(TB_TempArray.length != 1){
							TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length/2);	
							}
						}
				}
			}

			imgPreloader = new Image();
			imgPreloader.onload = function(){		
			imgPreloader.onload = null;
				
			// Resizing large images - orginal by Christian Montoya edited by me.
			var pagesize = tb_getPageSize();
			var x = pagesize[0] - 150;
			var y = pagesize[1] - 150;
			var imageWidth = imgPreloader.width;
			var imageHeight = imgPreloader.height;
			
			if (imageWidth > x) {
				imageHeight = imageHeight * (x / imageWidth); 
				imageWidth = x; 
				if (imageHeight > y) { 
					imageWidth = imageWidth * (y / imageHeight); 
					imageHeight = y; 
				}
			} else if (imageHeight > y) { 
				imageWidth = imageWidth * (y / imageHeight); 
				imageHeight = y; 
				if (imageWidth > x) { 
					imageHeight = imageHeight * (x / imageWidth); 
					imageWidth = x;
				} 
			}
			// End Resizing
			
			
//			

if(!isCatalogCarousel){
	TB_WIDTH = imageWidth + 30;
			TB_HEIGHT = imageHeight + 60;
			$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img style='margin:15px 0 0 15px;' id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' /></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>Close</a></div>"); 	
}else if(gallery){
	TB_WIDTH = imageWidth + 30;
			TB_HEIGHT = imageHeight + 30;
			$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img style='margin:15px 0 0 15px;' id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' /></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>Close</a></div>"); 	
}else{
	TB_WIDTH = 650;
	TB_HEIGHT = imageHeight + 60; 
	$("#TB_window").append("<div id='imageScroll' style='height:"+imageHeight+"px; width:"+TB_WIDTH+"px; overflow:auto;'><a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' /></a></div>" + "<div style='background:#fff;'><div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close' class='orders'>Back to garments</a><a href='Contact-Us.html' class='orders'>orders and enquiries</a></div></div>"); 	
	
	
}

			
						
						// $("#TB_window").append("<div style='height:300px;overflow:hidden;' ><a href='' id='TB_ImageOff' title='Close'>"+imageWidth+"<img id='TB_Image' src='"+url+"' alt='"+caption+"'/></a></div>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>"); 
						
			$("#TB_closeWindowButton").click(tb_remove);
			
			if (!(TB_PrevHTML === "")) {
				function goPrev(){
					if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
					$("#TB_window").remove();
					$("body").append("<div id='TB_window'></div>");
					tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
					return false;	
				}
				$("#TB_prev").click(goPrev);
			}
			
			if (!(TB_NextHTML === "")) {		
				function goNext(){
					$("#TB_window").remove();
					$("body").append("<div id='TB_window'></div>");
					tb_show(TB_NextCaption, TB_NextURL, imageGroup);				
					return false;	
				}
				$("#TB_next").click(goNext);
				
			}

			document.onkeydown = function(e){ 	
				if (e == null) { // ie
					keycode = event.keyCode;
				} else { // mozilla
					keycode = e.which;
				}
				if(keycode == 27){ // close
					tb_remove();
				} else if(keycode == 190){ // display previous image
					if(!(TB_NextHTML == "")){
						document.onkeydown = "";
						goNext();
					}
				} else if(keycode == 188){ // display next image
					if(!(TB_PrevHTML == "")){
						document.onkeydown = "";
						goPrev();
					}
				}	
			};
			
			tb_position();
			$("#TB_load").remove();
			$("#TB_ImageOff").click(tb_remove);
			$("#TB_window").css({display:"block"}); //for safari using css instead of show
			
			//alert("mike");
			setTimeout(function(){$("#imageScroll").scrollTop(250)}, 1000);
			setTimeout(function(){$("#imageScroll").scrollLeft(200)}, 1000);
			
	
	$("#TB_caption img").tooltip({ 
	    track: true, 
	    delay: 0, 
	    showURL: false, 
	    showBody: " - ", 
	    fade: 250,
		left:0
	});
//setTimeout(function(){$("#imageScroll img").draggable()}, 2000);



};
			
			imgPreloader.src = url;
		}else{//code to show html
			
			var queryString = url.replace(/^[^\?]+\??/,'');
			var params = tb_parseQuery( queryString );



			TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
			TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
			ajaxContentW = TB_WIDTH - 30;
			ajaxContentH = TB_HEIGHT - 45;
			
			/*
			if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window		
					urlNoQuery = url.split('TB_');
					$("#TB_iframeContent").remove();
					if(params['modal'] != "true"){//iframe no modal
			*/		
				
			if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window		
					urlNoQuery = url.split('TB_');
					$("#TB_iframeContent").remove();
					if(params['modal'] != "true"){//iframe no modal
					
				// 
				//orig
				$("#TB_window").append("<div id='iFrameBg'><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe></div><div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div>");
				
				
				
				
					//	$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 10)+"%;height:"+(ajaxContentH + 10)+"%;' > </iframe>");
					}else{//iframe modal
					$("#TB_overlay").unbind();
						$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
					}
			}else{// not an iframe, ajax
					if($("#TB_window").css("display") != "block"){
						if(params['modal'] != "true"){//ajax no modal
						$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
						}else{//ajax modal
						$("#TB_overlay").unbind();
						$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");	
						}
					}else{//this means the window is already up, we are just loading new content via ajax
						$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
						$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
						$("#TB_ajaxContent")[0].scrollTop = 0;
						$("#TB_ajaxWindowTitle").html(caption);
					}
			}
					
			$("#TB_closeWindowButton").click(tb_remove);
			
				if(url.indexOf('TB_inline') != -1){	
					$("#TB_ajaxContent").append($('#' + params['inlineId']).children());
					$("#TB_window").unload(function () {
						$('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
					});
					tb_position();
					$("#TB_load").remove();
					$("#TB_window").css({display:"block"}); 
				}else if(url.indexOf('TB_iframe') != -1){
					tb_position();
					if($.browser.safari){//safari needs help because it will not fire iframe onload
						$("#TB_load").remove();
						$("#TB_window").css({display:"block"});
					}
				}else{
					$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
						tb_position();
						$("#TB_load").remove();
						tb_init("#TB_ajaxContent a.thickbox");
						$("#TB_window").css({display:"block"});
					});
				}
			
		}

		if(!params['modal']){
			document.onkeyup = function(e){ 	
				if (e == null) { // ie
					keycode = event.keyCode;
				} else { // mozilla
					keycode = e.which;
				}
				if(keycode == 27){ // close
					tb_remove();
				}	
			};
		}
		
	} catch(e) {
		//nothing here
	}
}

//helper functions below
function tb_showIframe(){
	$("#TB_load").remove();
	$("#TB_window").css({display:"block"});
			// $("#TB_iframeContent").jScrollPane({reinitialiseOnImageLoad:true});

}

function tb_remove() {
 	$("#TB_imageOff").unbind("click");
	$("#TB_closeWindowButton").unbind("click");
	$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
	$("#TB_load").remove();
	if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
		$("body","html").css({height: "auto", width: "auto"});
		$("html").css("overflow","");
	}
	document.onkeydown = "";
	document.onkeyup = "";
	return false;
}

function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
	if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
		$("#TB_window").css({marginTop: '-' + (parseInt((TB_HEIGHT / 2),10)+30) + 'px'});
	}
}

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

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

function tb_detectMacXFF() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
    return true;
  }
}


