/* Greybox Redux
 * Required: http://jquery.com/
 * Written by: John Resig
 * Based on code by: 4mir Salihefendic (http://amix.dk)
 * License: LGPL (read more in LGPL.txt)
 */
var GB_DONE=false;var GB_HEIGHT=400;var GB_WIDTH=400;function GB_show(caption,url,height,width){GB_HEIGHT=height||400;GB_WIDTH=width||400;if(!GB_DONE){$(document.body).append("<div id='GB_overlay'></div><div id='GB_window'>"
+"<div id='GB_close'><a style='cursor: pointer;'>"+GB_close_text+"</a></div></div>");$("#GB_window img").click(GB_hide);$("#GB_overlay").click(GB_hide);$(window).resize(GB_position);GB_DONE=true;}
$("#GB_frame").remove();$("#GB_window").prepend("<iframe id='GB_frame' src='"+url+"'></iframe>");$("#GB_caption").html(caption);$("#GB_overlay").show();GB_position();$("#GB_close a").click(GB_hide);if(GB_ANIMATION)
$("#GB_window").slideDown("slow");else
$("#GB_window").show();}
function GB_hide(){$("#GB_window,#GB_overlay").hide();}
function GB_position(){var de=document.documentElement;var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;$("#GB_window").css({width:GB_WIDTH+"px",height:(GB_HEIGHT+20)+"px",left:((w-GB_WIDTH)/2)+"px",top:((h-GB_HEIGHT)/2)+"px"});$("#GB_frame").css("height",GB_HEIGHT+"px");}

/**
 * @author Alexander Farkas
 * v. 1.02
 */
(function($){$.extend($.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end=='string'){var start=$.curCSS(fx.elem,'backgroundPosition');start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];}
var nowPosX=[];nowPosX[0]=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit[0];nowPosX[1]=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}}});})(jQuery);

/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.22
 * 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,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}('(4($){8 m=\'2.22\';8 n=$.20.21&&/2U 6.0/.1r(2V.2W);4 1B(){7(23.24&&23.24.1B)23.24.1B(\'[D] \'+2X.2Y.2Z.30(31,\'\'))};$.F.D=4(l){P B.1k(4(){l=l||{};7(l.2r==2s){32(l){25\'33\':7(B.12)1H(B.12);B.12=0;P;25\'26\':B.1j=1;P;25\'34\':B.1j=0;P;35:l={1l:l}}}7(B.12)1H(B.12);B.12=0;B.1j=0;8 c=$(B);8 d=l.27?$(l.27,B):c.36();8 e=d.37();7(e.M<2){1B(\'38; 39 3a 3b: \'+e.M);P}8 f=$.3c({},$.F.D.2t,l||{},$.2u?c.2u():$.3d?c.3e():{});7(f.28)f.29=f.2a||e.M;f.H=f.H?[f.H]:[];f.1g=f.1g?[f.1g]:[];f.1g.2v(4(){f.2b=0});7(f.1s)f.1g.J(4(){1m(e,f,0,!f.1n)});7(n&&f.1I&&!f.2w)2c(d);8 g=B.3f;f.C=V((g.1C(/w:(\\d+)/)||[])[1])||f.C;f.A=V((g.1C(/h:(\\d+)/)||[])[1])||f.A;f.W=V((g.1C(/t:(\\d+)/)||[])[1])||f.W;7(c.u(\'1J\')==\'3g\')c.u(\'1J\',\'3h\');7(f.C)c.C(f.C);7(f.A&&f.A!=\'1K\')c.A(f.A);7(f.1o){f.1t=[];1D(8 i=0;i<e.M;i++)f.1t.J(i);f.1t.3i(4(a,b){P 3j.1o()-0.5});f.1p=0;f.1d=f.1t[0]}R 7(f.1d>=e.M)f.1d=0;8 h=f.1d||0;d.u({1J:\'2x\',x:0,9:0}).T().1k(4(i){8 z=h?i>=h?e.M-(i-h):h-i:e.M-i;$(B).u(\'z-1L\',z)});$(e[h]).u(\'1e\',1).S();7($.20.21)e[h].2y.2z(\'2d\');7(f.1h&&f.C)d.C(f.C);7(f.1h&&f.A&&f.A!=\'1K\')d.A(f.A);7(f.26)c.3k(4(){B.1j=1},4(){B.1j=0});8 j=$.F.D.L[f.1l];7($.2A(j))j(c,d,f);R 7(f.1l!=\'2e\')1B(\'3l 3m: \'+f.1l);d.1k(4(){8 a=$(B);B.X=(f.1h&&f.A)?f.A:a.A();B.Y=(f.1h&&f.C)?f.C:a.C()});f.y=f.y||{};f.I=f.I||{};f.G=f.G||{};d.1M(\':2f(\'+h+\')\').u(f.y);7(f.1c)$(d[h]).u(f.1c);7(f.W){7(f.18.2r==2s)f.18={3n:3o,3p:3q}[f.18]||3r;7(!f.1N)f.18=f.18/2;3s((f.W-f.18)<3t)f.W+=f.18}7(f.2g)f.1O=f.1P=f.2g;7(!f.1u)f.1u=f.18;7(!f.1E)f.1E=f.18;f.2B=e.M;f.1i=h;7(f.1o){f.O=f.1i;7(++f.1p==e.M)f.1p=0;f.O=f.1t[f.1p]}R f.O=f.1d>=(e.M-1)?0:f.1d+1;8 k=d[h];7(f.H.M)f.H[0].1Q(k,[k,k,f,2C]);7(f.1g.M>1)f.1g[1].1Q(k,[k,k,f,2C]);7(f.1F&&!f.17)f.17=f.1F;7(f.17)$(f.17).2h(\'1F\',4(){P 2i(e,f,f.1n?-1:1)});7(f.2j)$(f.2j).2h(\'1F\',4(){P 2i(e,f,f.1n?1:-1)});7(f.1v)2D(e,f);f.3u=4(a){8 b=$(a),s=b[0];7(!f.2a)f.29++;e.J(s);7(f.19)f.19.J(s);f.2B=e.M;b.u(\'1J\',\'2x\').2E(c);7(n&&f.1I&&!f.2w)2c(b);7(f.1h&&f.C)b.C(f.C);7(f.1h&&f.A&&f.A!=\'1K\')d.A(f.A);s.X=(f.1h&&f.A)?f.A:b.A();s.Y=(f.1h&&f.C)?f.C:b.C();b.u(f.y);7(1R f.Z==\'4\')f.Z(b)};7(f.W||f.1s)B.12=1S(4(){1m(e,f,0,!f.1n)},f.1s?10:f.W+(f.2F||0))})};4 1m(a,b,c,d){7(b.2b)P;8 p=a[0].1T,1w=a[b.1i],17=a[b.O];7(p.12===0&&!c)P;7(!c&&!p.1j&&((b.28&&(--b.29<=0))||(b.1U&&!b.1o&&b.O<b.1i))){7(b.2k)b.2k(b);P}7(c||!p.1j){7(b.H.M)$.1k(b.H,4(i,o){o.1Q(17,[1w,17,b,d])});8 e=4(){7($.20.21&&b.1I)B.2y.2z(\'2d\');$.1k(b.1g,4(i,o){o.1Q(17,[1w,17,b,d])})};7(b.O!=b.1i){b.2b=1;7(b.1V)b.1V(1w,17,b,e,d);R 7($.2A($.F.D[b.1l]))$.F.D[b.1l](1w,17,b,e);R $.F.D.2e(1w,17,b,e)}7(b.1o){b.1i=b.O;7(++b.1p==a.M)b.1p=0;b.O=b.1t[b.1p]}R{8 f=(b.O+1)==a.M;b.O=f?0:b.O+1;b.1i=f?a.M-1:b.O-1}7(b.1v)$.F.D.2l(b.1v,b.1i)}7(b.W&&!b.1s)p.12=1S(4(){1m(a,b,0,!b.1n)},b.W);R 7(b.1s&&p.1j)p.12=1S(4(){1m(a,b,0,!b.1n)},10)};$.F.D.2l=4(a,b){$(a).3v(\'a\').3w(\'2G\').2d(\'a:2f(\'+b+\')\').3x(\'2G\')};4 2i(a,b,c){8 p=a[0].1T,W=p.12;7(W){1H(W);p.12=0}b.O=b.1i+c;7(b.O<0){7(b.1U)P 1W;b.O=a.M-1}R 7(b.O>=a.M){7(b.1U)P 1W;b.O=0}7(b.1X&&1R b.1X==\'4\')b.1X(c>0,b.O,a[b.O]);1m(a,b,1,c>=0);P 1W};4 2D(b,c){8 d=$(c.1v);$.1k(b,4(i,o){8 a=(1R c.2m==\'4\')?$(c.2m(i,o)):$(\'<a 3y="#">\'+(i+1)+\'</a>\');7(a.3z(\'3A\').M==0)a.2E(d);a.2h(c.2H,4(){c.O=i;8 p=b[0].1T,W=p.12;7(W){1H(W);p.12=0}7(1R c.2n==\'4\')c.2n(c.O,b[c.O]);1m(b,c,1,!c.1n);P 1W})});$.F.D.2l(c.1v,c.1d)};4 2c(b){4 1Y(s){8 s=V(s).3B(16);P s.M<2?\'0\'+s:s};4 2I(e){1D(;e&&e.3C.3D()!=\'3E\';e=e.1T){8 v=$.u(e,\'2J-2K\');7(v.3F(\'3G\')>=0){8 a=v.1C(/\\d+/g);P\'#\'+1Y(a[0])+1Y(a[1])+1Y(a[2])}7(v&&v!=\'3H\')P v}P\'#3I\'};b.1k(4(){$(B).u(\'2J-2K\',2I(B))})};$.F.D.2e=4(a,b,c,d){8 e=$(a),$n=$(b);$n.u(c.y);8 f=4(){$n.1Z(c.I,c.1u,c.1O,d)};e.1Z(c.G,c.1E,c.1P,4(){7(c.K)e.u(c.K);7(!c.1N)f()});7(c.1N)f()};$.F.D.L={2L:4(a,b,c){b.1M(\':2f(\'+c.1d+\')\').u(\'1e\',0);c.H.J(4(){$(B).S()});c.I={1e:1};c.G={1e:0};c.y={1e:0};c.K={N:\'U\'}}};$.F.D.3J=4(){P m};$.F.D.2t={1l:\'2L\',W:3K,1s:0,18:3L,1u:Q,1E:Q,17:Q,2j:Q,1X:Q,1v:Q,2n:Q,2H:\'1F\',2m:Q,H:Q,1g:Q,2k:Q,2g:Q,1O:Q,1P:Q,1G:Q,I:Q,G:Q,y:Q,K:Q,1V:Q,A:\'1K\',1d:0,1N:1,1o:0,1h:0,26:0,28:0,2a:0,2F:0,27:Q,1I:0,1U:0}})(2M);(4($){$.F.D.L.3M=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.x=b.1x;c.G.x=0-a.1x});f.1c={x:0};f.I={x:0};f.K={N:\'U\'}};$.F.D.L.3N=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.x=0-b.1x;c.G.x=a.1x});f.1c={x:0};f.I={x:0};f.K={N:\'U\'}};$.F.D.L.3O=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.9=b.1y;c.G.9=0-a.1y});f.1c={9:0};f.I={9:0}};$.F.D.L.3P=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.9=0-b.1y;c.G.9=a.1y});f.1c={9:0};f.I={9:0}};$.F.D.L.3Q=4(f,g,h){f.u(\'14\',\'1a\').C();h.H.J(4(a,b,c,d){$(B).S();8 e=a.1y,2o=b.1y;c.y=d?{9:2o}:{9:-2o};c.I.9=0;c.G.9=d?-e:e;g.1M(a).u(c.y)});h.1c={9:0};h.K={N:\'U\'}};$.F.D.L.3R=4(f,g,h){f.u(\'14\',\'1a\');h.H.J(4(a,b,c,d){$(B).S();8 e=a.1x,2p=b.1x;c.y=d?{x:-2p}:{x:2p};c.I.x=0;c.G.x=d?e:-e;g.1M(a).u(c.y)});h.1c={x:0};h.K={N:\'U\'}};$.F.D.L.3S=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.Z=4(a){a.T()};f.y={E:2};f.I={C:\'S\'};f.G={C:\'T\'}};$.F.D.L.3T=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.Z=4(a){a.T()};f.y={E:2};f.I={A:\'S\'};f.G={A:\'T\'}};$.F.D.L.1G=4(g,h,j){8 w=g.u(\'14\',\'2N\').C();h.u({9:0,x:0});j.H.J(4(){$(B).S()});j.18=j.18/2;j.1o=0;j.1G=j.1G||{9:-w,x:15};j.19=[];1D(8 i=0;i<h.M;i++)j.19.J(h[i]);1D(8 i=0;i<j.1d;i++)j.19.J(j.19.2O());j.1V=4(a,b,c,d,e){8 f=e?$(a):$(b);f.1Z(c.1G,c.1u,c.1O,4(){e?c.19.J(c.19.2O()):c.19.2v(c.19.3U());7(e)1D(8 i=0,2q=c.19.M;i<2q;i++)$(c.19[i]).u(\'z-1L\',2q-i);R{8 z=$(a).u(\'z-1L\');f.u(\'z-1L\',V(z)+1)}f.1Z({9:0,x:0},c.1E,c.1P,4(){$(e?B:a).T();7(d)d()})})};j.Z=4(a){a.T()}};$.F.D.L.3V=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.y.x=b.X;c.I.A=b.X});f.Z=4(a){a.T()};f.1c={x:0};f.y={A:0};f.I={x:0};f.G={A:0};f.K={N:\'U\'}};$.F.D.L.3W=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.I.A=b.X;c.G.x=a.X});f.Z=4(a){a.T()};f.1c={x:0};f.y={x:0,A:0};f.G={A:0};f.K={N:\'U\'}};$.F.D.L.3X=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.y.9=b.Y;c.I.C=b.Y});f.Z=4(a){a.T()};f.y={C:0};f.I={9:0};f.G={C:0};f.K={N:\'U\'}};$.F.D.L.3Y=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.I.C=b.Y;c.G.9=a.Y});f.Z=4(a){a.T()};f.y={9:0,C:0};f.I={9:0};f.G={C:0};f.K={N:\'U\'}};$.F.D.L.2P=4(d,e,f){f.1c={x:0,9:0};f.K={N:\'U\'};f.H.J(4(a,b,c){$(B).S();c.y={C:0,A:0,x:b.X/2,9:b.Y/2};c.K={N:\'U\'};c.I={x:0,9:0,C:b.Y,A:b.X};c.G={C:0,A:0,x:a.X/2,9:a.Y/2};$(a).u(\'E\',2);$(b).u(\'E\',1)});f.Z=4(a){a.T()}};$.F.D.L.3Z=4(d,e,f){f.H.J(4(a,b,c){c.y={C:0,A:0,1e:1,9:b.Y/2,x:b.X/2,E:1};c.I={x:0,9:0,C:b.Y,A:b.X}});f.G={1e:0};f.K={E:0}};$.F.D.L.40=4(d,e,f){8 w=d.u(\'14\',\'1a\').C();e.S();f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.y={9:w,E:2};f.K={E:1};f.I={9:0};f.G={9:w}};$.F.D.L.41=4(d,e,f){8 h=d.u(\'14\',\'1a\').A();e.S();f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.y={x:h,E:2};f.K={E:1};f.I={x:0};f.G={x:h}};$.F.D.L.42=4(d,e,f){8 h=d.u(\'14\',\'1a\').A();8 w=d.C();e.S();f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.y={x:h,9:w,E:2};f.K={E:1};f.I={x:0,9:0};f.G={x:h,9:w}};$.F.D.L.43=4(d,e,f){f.H.J(4(a,b,c){c.y={9:B.Y/2,C:0,E:2};c.I={9:0,C:B.Y};c.G={9:0};$(a).u(\'E\',1)});f.Z=4(a){a.T().u(\'E\',1)}};$.F.D.L.44=4(d,e,f){f.H.J(4(a,b,c){c.y={x:B.X/2,A:0,E:2};c.I={x:0,A:B.X};c.G={x:0};$(a).u(\'E\',1)});f.Z=4(a){a.T().u(\'E\',1)}};$.F.D.L.45=4(d,e,f){f.H.J(4(a,b,c){c.y={9:b.Y/2,C:0,E:1,N:\'1z\'};c.I={9:0,C:B.Y};c.G={9:a.Y/2,C:0};$(a).u(\'E\',2)});f.Z=4(a){a.T()};f.K={E:1,N:\'U\'}};$.F.D.L.46=4(d,e,f){f.H.J(4(a,b,c){c.y={x:b.X/2,A:0,E:1,N:\'1z\'};c.I={x:0,A:B.X};c.G={x:a.X/2,A:0};$(a).u(\'E\',2)});f.Z=4(a){a.T()};f.K={E:1,N:\'U\'}};$.F.D.L.47=4(e,f,g){8 d=g.2Q||\'9\';8 w=e.u(\'14\',\'1a\').C();8 h=e.A();g.H.J(4(a,b,c){c.y=c.y||{};c.y.E=2;c.y.N=\'1z\';7(d==\'2R\')c.y.9=-w;R 7(d==\'2S\')c.y.x=h;R 7(d==\'2T\')c.y.x=-h;R c.y.9=w;$(a).u(\'E\',1)});7(!g.I)g.I={9:0,x:0};7(!g.G)g.G={9:0,x:0};g.K=g.K||{};g.K.E=2;g.K.N=\'U\'};$.F.D.L.48=4(e,f,g){8 d=g.2Q||\'9\';8 w=e.u(\'14\',\'1a\').C();8 h=e.A();g.H.J(4(a,b,c){c.y.N=\'1z\';7(d==\'2R\')c.G.9=w;R 7(d==\'2S\')c.G.x=-h;R 7(d==\'2T\')c.G.x=h;R c.G.9=-w;$(a).u(\'E\',2);$(b).u(\'E\',1)});g.Z=4(a){a.T()};7(!g.I)g.I={9:0,x:0};g.y=g.y||{};g.y.x=0;g.y.9=0;g.K=g.K||{};g.K.E=1;g.K.N=\'U\'};$.F.D.L.49=4(d,e,f){8 w=d.u(\'14\',\'2N\').C();8 h=d.A();f.H.J(4(a,b,c){$(a).u(\'E\',2);c.y.N=\'1z\';7(!c.G.9&&!c.G.x)c.G={9:w*2,x:-h/2,1e:0};R c.G.1e=0});f.Z=4(a){a.T()};f.y={9:0,x:0,E:1,1e:1};f.I={9:0};f.K={E:2,N:\'U\'}};$.F.D.L.4a=4(o,p,q){8 w=o.u(\'14\',\'1a\').C();8 h=o.A();q.y=q.y||{};8 s;7(q.1f){7(/4b/.1r(q.1f))s=\'1q(1b 1b \'+h+\'11 1b)\';R 7(/4c/.1r(q.1f))s=\'1q(1b \'+w+\'11 \'+h+\'11 \'+w+\'11)\';R 7(/4d/.1r(q.1f))s=\'1q(1b \'+w+\'11 1b 1b)\';R 7(/4e/.1r(q.1f))s=\'1q(\'+h+\'11 \'+w+\'11 \'+h+\'11 1b)\';R 7(/2P/.1r(q.1f)){8 t=V(h/2);8 l=V(w/2);s=\'1q(\'+t+\'11 \'+l+\'11 \'+t+\'11 \'+l+\'11)\'}}q.y.1f=q.y.1f||s||\'1q(1b 1b 1b 1b)\';8 d=q.y.1f.1C(/(\\d+)/g);8 t=V(d[0]),r=V(d[1]),b=V(d[2]),l=V(d[3]);q.H.J(4(g,i,j){7(g==i)P;8 k=$(g).u(\'E\',2);8 m=$(i).u({E:3,N:\'1z\'});8 n=1,1A=V((j.1u/13))-1;4 f(){8 a=t?t-V(n*(t/1A)):0;8 c=l?l-V(n*(l/1A)):0;8 d=b<h?b+V(n*((h-b)/1A||1)):h;8 e=r<w?r+V(n*((w-r)/1A||1)):w;m.u({1f:\'1q(\'+a+\'11 \'+e+\'11 \'+d+\'11 \'+c+\'11)\'});(n++<=1A)?1S(f,13):k.u(\'N\',\'U\')}f()});q.K={};q.I={9:0};q.G={9:0}}})(2M);',62,263,'||||function|||if|var|left|||||||||||||||||||||css|||top|cssBefore||height|this|width|cycle|zIndex|fn|animOut|before|animIn|push|cssAfter|transitions|length|display|nextSlide|return|null|else|show|hide|none|parseInt|timeout|cycleH|cycleW|onAddSlide||px|cycleTimeout||overflow|||next|speed|els|hidden|0px|cssFirst|startingSlide|opacity|clip|after|fit|currSlide|cyclePause|each|fx|go|rev|random|randomIndex|rect|test|continuous|randomMap|speedIn|pager|curr|offsetHeight|offsetWidth|block|count|log|match|for|speedOut|click|shuffle|clearTimeout|cleartype|position|auto|index|not|sync|easeIn|easeOut|apply|typeof|setTimeout|parentNode|nowrap|fxFn|false|prevNextClick|hex|animate|browser|msie||window|console|case|pause|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|bind|advance|prev|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|nextW|nextH|len|constructor|String|defaults|metadata|unshift|cleartypeNoBg|absolute|style|removeAttribute|isFunction|slideCount|true|buildPager|appendTo|delay|activeSlide|pagerEvent|getBg|background|color|fade|jQuery|visible|shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|arguments|switch|stop|resume|default|children|get|terminating|too|few|slides|extend|meta|data|className|static|relative|sort|Math|hover|unknown|transition|slow|600|fast|200|400|while|250|addSlide|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t'.split('|'),0,{}));

// jquery.jparallax.js
// 0.9.1
// Stephen Band
//
// Dependencies:
// jQuery 1.2.6 (jquery.com)
//
// Project and documentation site:
// http://webdev.stephband.info/parallax.html
(function(jQuery){function stripFiletype(ref){var x=ref.replace('.html','');return x.replace('#','');}
function initOrigin(l){if(l.xorigin=='left'){l.xorigin=0;}else if(l.xorigin=='middle'||l.xorigin=='centre'||l.xorigin=='center'){l.xorigin=0.5;}else if(l.xorigin=='right'){l.xorigin=1;}
if(l.yorigin=='top'){l.yorigin=0;}else if(l.yorigin=='middle'||l.yorigin=='centre'||l.yorigin=='center'){l.yorigin=0.5;}else if(l.yorigin=='bottom'){l.yorigin=1;}}
function positionMouse(mouseport,localmouse,virtualmouse){var difference={x:0,y:0,sum:0};if(!mouseport.ontarget){difference.x=virtualmouse.x-localmouse.x;difference.y=virtualmouse.y-localmouse.y;difference.sum=Math.sqrt(difference.x*difference.x+difference.y*difference.y);virtualmouse.x=localmouse.x+difference.x*mouseport.takeoverFactor;virtualmouse.y=localmouse.y+difference.y*mouseport.takeoverFactor;if(difference.sum<mouseport.takeoverThresh&&difference.sum>mouseport.takeoverThresh*-1){mouseport.ontarget=true;}}
else{virtualmouse.x=localmouse.x;virtualmouse.y=localmouse.y;}}
function setupPorts(viewport,mouseport){var offset=mouseport.element.offset();jQuery.extend(viewport,{width:viewport.element.width(),height:viewport.element.height()});jQuery.extend(mouseport,{width:mouseport.element.width(),height:mouseport.element.height(),top:offset.top,left:offset.left});}
function parseTravel(travel,origin,dimension){var offset;var cssPos;if(typeof(travel)==='string'){if(travel.search(/^\d+\s?px$/)!=-1){travel=travel.replace('px','');travel=parseInt(travel,10);offset=origin*(dimension-travel);cssPos=origin*100+'%';return{travel:travel,travelpx:true,offset:offset,cssPos:cssPos};}
else if(travel.search(/^\d+\s?%$/)!=-1){travel.replace('%','');travel=parseInt(travel,10)/100;}
else{travel=1;}}
offset=origin*(1-travel);return{travel:travel,travelpx:false,offset:offset}}
function setupLayer(layer,i,mouseport){var xStuff;var yStuff;var cssObject={};layer[i]=jQuery.extend({},{width:layer[i].element.width(),height:layer[i].element.height()},layer[i]);xStuff=parseTravel(layer[i].xtravel,layer[i].xorigin,layer[i].width);yStuff=parseTravel(layer[i].ytravel,layer[i].yorigin,layer[i].height);jQuery.extend(layer[i],{diffxrat:mouseport.width/(layer[i].width-mouseport.width),diffyrat:mouseport.height/(layer[i].height-mouseport.height),xtravel:xStuff.travel,ytravel:yStuff.travel,xtravelpx:xStuff.travelpx,ytravelpx:yStuff.travelpx,xoffset:xStuff.offset,yoffset:yStuff.offset});if(xStuff.travelpx){cssObject.left=xStuff.cssPos;}
if(yStuff.travelpx){cssObject.top=yStuff.cssPos;}
if(xStuff.travelpx||yStuff.travelpx){layer[i].element.css(cssObject);}}
function setupLayerContents(layer,i,viewportOffset){var contentOffset;jQuery.extend(layer[i],{content:[]});for(var n=0;n<layer[i].element.children().length;n++){if(!layer[i].content[n])layer[i].content[n]={};if(!layer[i].content[n].element)layer[i].content[n]['element']=layer[i].element.children().eq(n);if(!layer[i].content[n].anchor&&layer[i].content[n].element.children('a').attr('name')){layer[i].content[n]['anchor']=layer[i].content[n].element.children('a').attr('name');}
if(layer[i].content[n].anchor){contentOffset=layer[i].content[n].element.offset();jQuery.extend(layer[i].content[n],{width:layer[i].content[n].element.width(),height:layer[i].content[n].element.height(),x:contentOffset.left-viewportOffset.left,y:contentOffset.top-viewportOffset.top});jQuery.extend(layer[i].content[n],{posxrat:(layer[i].content[n].x+layer[i].content[n].width/2)/layer[i].width,posyrat:(layer[i].content[n].y+layer[i].content[n].height/2)/layer[i].height});}}}
function moveLayers(layer,xratio,yratio){var xpos;var ypos;var cssObject;for(var i=0;i<layer.length;i++){xpos=layer[i].xtravel*xratio+layer[i].xoffset;ypos=layer[i].ytravel*yratio+layer[i].yoffset;cssObject={};if(layer[i].xparallax){if(layer[i].xtravelpx){cssObject.marginLeft=xpos*-1+'px';}
else{cssObject.left=xpos*100+'%';cssObject.marginLeft=xpos*layer[i].width*-1+'px';}}
if(layer[i].yparallax){if(layer[i].ytravelpx){cssObject.marginTop=ypos*-1+'px';}
else{cssObject.top=ypos*100+'%';cssObject.marginTop=ypos*layer[i].height*-1+'px';}}
layer[i].element.css(cssObject);}}
jQuery.fn.jparallax=function(options){var settings=jQuery().extend({},jQuery.fn.jparallax.settings,options);var settingsLayer={xparallax:settings.xparallax,yparallax:settings.yparallax,xorigin:settings.xorigin,yorigin:settings.yorigin,xtravel:settings.xtravel,ytravel:settings.ytravel};var settingsMouseport={element:settings.mouseport,takeoverFactor:settings.takeoverFactor,takeoverThresh:settings.takeoverThresh};if(settings.mouseport)settingsMouseport['element']=settings.mouseport;var layersettings=[];for(var a=1;a<arguments.length;a++){layersettings.push(jQuery.extend({},settingsLayer,arguments[a]));}
return this.each(function(){var localmouse={x:0.5,y:0.5};var virtualmouse={x:0.5,y:0.5};var timer={running:false,frame:settings.frameDuration,fire:function(x,y){positionMouse(mouseport,localmouse,virtualmouse);moveLayers(layer,virtualmouse.x,virtualmouse.y);this.running=setTimeout(function(){if(localmouse.x!=x||localmouse.y!=y||!mouseport.ontarget){timer.fire(localmouse.x,localmouse.y);}
else if(timer.running){timer.running=false;}},timer.frame);}};var viewport={element:jQuery(this)};var mouseport=jQuery.extend({},{element:viewport.element},settingsMouseport,{xinside:false,yinside:false,active:false,ontarget:false});var layer=[];function matrixSearch(layer,ref,callback){for(var i=0;i<layer.length;i++){var gotcha=false;for(var n=0;n<layer[i].content.length;n++){if(layer[i].content[n].anchor==ref){callback(i,n);return[i,n];}}}
return false;}
setupPorts(viewport,mouseport);for(var i=0;i<viewport.element.children().length;i++){layer[i]=jQuery.extend({},settingsLayer,layersettings[i],{element:viewport.element.children('*:eq('+i+')')});setupLayer(layer,i,mouseport);if(settings.triggerResponse){setupLayerContents(layer,i,viewport.element.offset());}}
viewport.element.children().css('position','absolute');moveLayers(layer,0.5,0.5);if(settings.mouseResponse){jQuery().mousemove(function(mouse){mouseport.xinside=(mouse.pageX>=mouseport.left&&mouse.pageX<mouseport.width+mouseport.left)?true:false;mouseport.yinside=(mouse.pageY>=mouseport.top&&mouse.pageY<mouseport.height+mouseport.top)?true:false;if(mouseport.xinside&&mouseport.yinside&&!mouseport.active){mouseport.ontarget=false;mouseport.active=true;}
if(mouseport.active){if(mouseport.xinside){localmouse.x=(mouse.pageX-mouseport.left)/mouseport.width;}
else{localmouse.x=(mouse.pageX<mouseport.left)?0:1;}
if(mouseport.yinside){localmouse.y=(mouse.pageY-mouseport.top)/mouseport.height;}
else{localmouse.y=(mouse.pageY<mouseport.top)?0:1;}}
if(mouseport.xinside&&mouseport.yinside){if(!timer.running)timer.fire(localmouse.x,localmouse.y);}
else if(mouseport.active){mouseport.active=false;}});}
if(settings.triggerResponse){viewport.element.bind("jparallax",function(event,ref){ref=stripFiletype(ref);matrixSearch(layer,ref,function(i,n){localmouse.x=layer[i].content[n].posxrat*(layer[i].diffxrat+1)-(0.5*layer[i].diffxrat);localmouse.y=layer[i].content[n].posyrat*(layer[i].diffyrat+1)-(0.5*layer[i].diffyrat);if(!settings.triggerExposesEdges){if(localmouse.x<0)localmouse.x=0;if(localmouse.x>1)localmouse.x=1;if(localmouse.y<0)localmouse.y=0;if(localmouse.y>1)localmouse.y=1;}
mouseport.ontarget=false;if(!timer.running)timer.fire(localmouse.x,localmouse.y);});});}
jQuery(window).resize(function(){setupPorts(viewport,mouseport);for(var i=0;i<layer.length;i++){setupLayer(layer,i,mouseport);}});});};jQuery.fn.jparallax.settings={mouseResponse:true,mouseActiveOutside:false,triggerResponse:true,triggerExposesEdges:false,xparallax:true,yparallax:true,xorigin:0.5,yorigin:0.5,xtravel:1,ytravel:1,takeoverFactor:0.65,takeoverThresh:0.002,frameDuration:25};initOrigin(jQuery.fn.jparallax.settings);jQuery(function(){});})(jQuery);

/*
 * xLazyLoader 1.0 - Plugin for jQuery
 * 
 * Load js, css and  images
 *
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Depends:
 *   jquery.js
 *
 *  Copyright (c) 2008 Oleg Slobodskoi (jimdo.com)
 */
;(function($){$.xLazyLoader=function(method,options){if(typeof method=='object'){options=method;method='load';};xLazyLoader[method](options);};var xLazyLoader=new function()
{var head=document.getElementsByTagName("head")[0];this.load=function(options)
{var d={js:[],css:[],image:[],name:null,load:function(){}};$.extend(d,options);var self=this,ready=false,loaded={js:[],css:[],image:[]};each('js',d.js);each('css',d.css);each('image',d.image);function each(type,urls)
{if($.isArray(urls)&&urls.length>0)
$.each(urls,function(i,url){load(type,url);});else if(typeof urls=='string')
load(type,urls);};function load(type,url)
{self[type](url,function(){$.isArray(d[type])?loaded[type].push(url):loaded[type]=url;d.js.length==loaded.js.length&&d.css.length==loaded.css.length&&d.image.length==loaded.image.length&&d.load.apply(loaded,[]);return;},d.name?'lazy-loaded-'+d.name:'lazy-loaded-'+new Date().getTime());};};this.js=function(src,callback,name)
{if($('script[src*="'+src+'"]').length>0){callback();return;};var script=document.createElement('script');script.setAttribute("type","text/javascript");script.setAttribute("src",src);script.setAttribute('id',name);if($.browser.msie)
script.onreadystatechange=function(){/loaded|complete/.test(script.readyState)&&callback();}
else
script.onload=callback;head.appendChild(script);};this.css=function(href,callback,name)
{if($('link[href*="'+href+'"]').length>0){callback();return;};var link=$('<link rel="stylesheet" type="text/css" media="all" href="'+href+'" id="'+name+'"></link>')[0];if($.browser.msie)
link.onreadystatechange=function(){/loaded|complete/.test(link.readyState)&&callback();}
else if($.browser.opera)
link.onload=callback;else
(function(){try{link.sheet.cssRule;}catch(e){setTimeout(arguments.callee,20);return;};callback();})();head.appendChild(link);};i=0;this.image=function(src,callback)
{var img=new Image();img.onload=function(){if($("div#preloader").is(":hidden")){var posTop=($(window).height()-$("div#preloader").height())/2;$("div#preloader").css("margin-top",posTop+"px").fadeIn();}
$("div#preloader #current").html(i);$("div#preloader #source").html(src.replace("images/",""));i++;callback();};img.src=src;};this.disable=function(name)
{$('#lazy-loaded-'+name,head).attr('disabled','disabled');};this.enable=function(name)
{$('#lazy-loaded-'+name,head).removeAttr('disabled');};this.destroy=function(name)
{$('#lazy-loaded-'+name,head).remove();};};})(jQuery);

/** MAIN SITE JS **/
var GB_ANIMATION=true;var backed=false;var fotoheight=function(){$("div#main").css({height:$(window).height()-100-47});$("div#parallax").css({height:$(window).height()-100-47});$("div#i2").css({height:$(window).height()-100-47});$("div#i3").css({height:$(window).height()-100-47});$("div#clipper").css({top:$("div#main").height()-19});};function clipperPos(el){var currentO=$(el).offset();var clipperPos=1400+40-currentO.left-($(el).width()/2);return clipperPos;}
function myParallax(){var vpW=$("div#parallax").width();var vpH=$("div#parallax").height();var vpO=$("div#parallax").offset();$("div#i0").mousemove(function(e){var thisO=$(this).offset();$(this).animate({top:"+="+e.clientY+"px",left:"+="+e.clientX+"px"});});}
function parallax(){var options={};var i4_options={};var i3_options={xparallax:false,yparallax:false};var i2_options={xparallax:false,yparallax:false};var i1_options={xparallax:false,yparallax:false};var i0_options={xparallax:false,yparallax:false};$('#parallax').jparallax(options,i0_options,i1_options,i2_options,i3_options,i4_options);}
function parallaxStop(){var options={};var i4_options={xparallax:false,yparallax:false};var i3_options={xparallax:false,yparallax:false};var i2_options={xparallax:false,yparallax:false};var i1_options={xparallax:false,yparallax:false};var i0_options={xparallax:false,yparallax:false};$('#parallax').jparallax(options,i0_options,i1_options,i2_options,i3_options,i4_options);alert("stopped");}
function activatePage(path){var el=$("a[href='#"+path.page+"']");if(path.page==0){el=$("a#home");}
if(backed==false){$("div#clipper").css({backgroundPosition:"-100px 0px"});backed=true;}
$("div#clipper").animate({backgroundPosition:"(-"+clipperPos($(el))+"px 0px)"},1000);firePage(path);init(path);$("ul.menu li").removeAttr("id");if(path.page==0){$(this).attr("id","current");}else{$(el).parent().attr("id","current");}}
function firePage(path){var transLen=700;var oldPath=parsePath(location.hash);if($("div#parallax .inbound[id='i"+path.page+"']").is(":hidden")&&$("div#main .content[id='index"+path.page+"']").is(":hidden")){$("div#main div.content:visible").fadeOut(transLen);$("div#parallax .inbound[id!='i"+path.page+"']").fadeOut(transLen);if(oldPath.page==3){$("div#index3_1").trigger("click");}else if(oldPath.page==2){$("div#index2").fadeOut();$("div.collectionPage").fadeOut();if($("div#index01").is(":visible")){$("div#index01").fadeOut();}}
$("div#parallax .inbound[id='i"+path.page+"']").fadeIn(transLen,function(){pageContents(path.page,path.cat,path.item);});}else{pageContents(path.page,path.cat,path.item);}}
function imgPos(el){var mainW=$("div#main").width();var mainH=$("div#main").height();var thisT=0;var thisL=0;$.each($(el),function(){var thisW=$(this).width();var thisH=$(this).height();if(thisW>mainW){thisL=(thisW-mainW)/2;}
if(thisH>mainH){thisT=(thisH-mainH)/2;}
$(this).css({top:"-"+thisT+"px",left:"-"+thisL+"px"});});}
function init(path){if(path.page==0){$('div#parallax div#i0').css("z-index","0").cycle({fx:'fade',speed:500,timeout:5000});$('div#parallax div#i0').css("height",$('div#parallax div#i0 img').eq(0).attr("height")+"px").css("width",$('div#parallax div#i0 img').eq(0).attr("width")+"px");imgPos($('div#parallax div#i0'));parallax();}else if(path.page==1){$('div#main div.content#index1 #index1_0').cycle({fx:'fade',speed:500,timeout:5000});$('div#parallax div#i1').css("height",$('div#parallax div#i1 img').eq(0).attr("height")+"px").css("width",$('div#parallax div#i1 img').eq(0).attr("width")+"px");imgPos($('div#parallax div#i1'));}else if(path.page==2){}else if(path.page==3){$('div#parallax div#i3').css("width","100%").css("background","#e1f4f8");}}
function pageContents(index,subindex,item){var title0="Домашние вещи";var title1="Философия yana";var title2="Коллекция yana";var title3="Книга отзывов";var title4="Контакты";if(index==0){$("div#main div.content#index0").css("z-index","100").css({top:($("div#main").height()-$("div#clipper").height()-$("div#main div.content#index0").height())/2+"px"}).fadeIn("fast");location.hash="#";document.title=title0;}else if(index==1){var posV=($("div#main").height()-$("div#clipper").height()-245)/2;if(posV<0){posV=0;}
$("div#main div.content#index1").css({top:posV+"px"}).fadeIn("fast",function(){});document.title=title1;}else if(index==2){if(subindex=="-1"){subindex="0";}
$("div#index2_0 div.collectionPage:visible").fadeOut();var index2H=$("div#main").height()-$("div#clipper").height()-30;var imgIndex2T="0";if(index2H>500){index2H=500;}
else{imgIndex2T=(500-index2H)/2;}
$("div#index2").css({height:index2H+"px"}).fadeIn();$("div.collWrap").css("position","relative").css({top:"-"+imgIndex2T+"px"});var posV=($("div#main").height()-$("div#clipper").height()-$("div#index2").height())/2;var posH=($("div#main").width()-$("div#main div.content#index2").width())/2;if(posV<0){posV=0;}
$("div#index2").css({top:posV+"px",left:posH+"px"});$("div.collectionPage").eq(subindex).css({height:index2H+"px"}).fadeIn();var nextD=parseInt(subindex)+parseInt(1);var prevD=parseInt(subindex)-parseInt(1);if($("div.collectionPage").eq(nextD).length){nextD="#2-"+nextD;}else{nextD="#2-0";}
if($("div.collectionPage").eq(prevD).length){prevD="#2-"+prevD;}else{prevD="#2-"+($("div.collectionPage").length-1);}
$("div#collNavi a#collPrev").attr("href",prevD);$("div#collNavi a#collNext").attr("href",nextD);var index2O=$("div#index2").offset();$("div#index01").css({right:(index2O.left-$("div#index01").width())/2+"px"}).fadeIn();document.title=title2;}else if(index==3){if(subindex==-1){subindex=0;}
var posV=($("div#main").height()-$("div#clipper").height()-280)/2;var posH=($("div#main").width()-$("div#main div.content#index3").width())/2;if(posV<0){posV=0;}
$("div#index3").css({top:posV+"px",left:posH+"px"}).fadeIn();$("div#index3 div#index3_0").animate({opacity:0.5},1000,function(){$(this).attr("rel","0.5");});$("div#index3 div#index3_1").attr("rel","1");$("div.comcontent").css("padding-top",($("div.comment").height()-$("div.comcontent").height()-$("div.comauthor").height()-20)/2);$("div.comment").hide();$("div.comment").eq(subindex).fadeIn();$("span#eqComment").html(parseInt(subindex)+parseInt(1));$("span#totalComment").html($("div.comment").length);if($("div.comment").eq(subindex).next(".comment").length==0){$("div#index3_1_2 span").fadeOut();}
if($("div.comment").eq(subindex).prev(".comment").length==0){$("div#index3_1_0 span").fadeOut();}
document.title=title3;}else if(index==4){var gmap='<iframe id="i4" width="'+$("div#main").width()+'" height="'+$("div#main").height()+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=ru&q=%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D1%8F,+121069,+%D0%A6%D0%B5%D0%BD%D1%82%D1%80%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9+%D0%B0%D0%B4%D0%BC%D0%B8%D0%BD%D0%B8%D1%81%D1%82%D1%80%D0%B0%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D0%B9+%D0%BE%D0%BA%D1%80%D1%83%D0%B3,+%D0%B3%D0%BE%D1%80%D0%BE%D0%B4+%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0,+%D1%83%D0%BB.+%D0%91%D0%BE%D0%BB.+%D0%9C%D0%BE%D0%BB%D1%87%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0,+30&sll=55.801281,37.705078&sspn=5.695196,19.775391&ie=UTF8&cd=1&geocode=FRi7UgMdppA9Ag&split=0&ll=55.760157,37.593327&spn=0.011133,0.054932&z=14&iwloc=addr&output=embed&s=AARTsJrxU2knPks9is_HcfFrIGN56Rrf0A"></iframe>';$("div#parallax div#i4").html(gmap);var posV=($("div#main").height()-$("div#clipper").height()-280)/2;$("div#index4").css({top:posV+"px"}).fadeIn();document.title=title4;}}
function parsePath(hash){var r,re;var path=new Array();path["page"]=0;path["cat"]=-1;path["item"]=-1;hash=hash.replace("#","");re=/(\d{1,3})/;r=hash.match(re);if(r&&r.length==2){path["page"]=r[1];re=/(\d{1,3})-(\d{1,3})/;r=hash.match(re);if(r&&r.length==3){path["cat"]=r[2];re=/(\d{1,3})-(\d{1,3})-(\d{1,3})/;r=hash.match(re);if(r&&r.length==4){path["item"]=r[3];}}}
return path;}
$(document).ready(function(){$("div#wrapper").fadeOut();$(window).resize(fotoheight);var imgArray=new Array();$.each($('img'),function(i){var src=$(this).attr("src");imgArray[i]=src;});$("div#preloader span#total").html(imgArray.length);$.xLazyLoader({image:imgArray,name:'dialog',load:function(){$("div#preloader").fadeOut(500,function(){$(this).remove();$("div#wrapper").fadeIn("fast",function(){fotoheight();var path=parsePath(location.hash);activatePage(path);if($("ul.menu li#current").length){$("div#clipper").css({top:$("div#main").height()-19,backgroundPosition:'0 0'}).animate({backgroundPosition:"(-"+clipperPos($("ul.menu li#current a"))+"px top)"},1000);}else{$("div#clipper").css({top:$("div#main").height()-19,backgroundPosition:'0 0'}).animate({backgroundPosition:"(-1265px 0px)"},1000);}});});}});$("ul.menu li a").bind("click",function(){var path=parsePath($(this).attr("href"));activatePage(path);});$("a#home, a#homeh").bind("click",function(e){e.preventDefault();var path=parsePath($(this).attr("href"));activatePage(path);})
$("div#yanasway").hover(function(){$("a#homeh").fadeIn();$("div#homepieces").fadeOut("fast");$("div#gohome").fadeIn("normal");},function(){$("a#homeh").fadeOut();$("div#gohome").fadeOut("fast");$("div#homepieces").fadeIn("normal");});$("p.newsline a").toggle(function(e){e.preventDefault();$("div#index0").append("<div id='index05'><div id='index050'>"+$("div.teasertext").html()+"</div><div id='index051'></div></div>");var teaserH=$("div#index05").height()/2;var index0_1Offset=$("div#index0_1").offset();$("div#index0").animate({top:"-="+teaserH+"px"},"fast",function(){var viewO=$("div#index0").offset();$("div#index05").css({top:"85px",left:(index0_1Offset.left-40)+"px"}).slideDown();});},function(){var teaserH=$("div#index05").height()/2;$("div#index05").slideUp("fast",function(){$("div#index0").animate({top:"+="+teaserH+"px"});});});$("div#collNavi a").click(function(e){e.preventDefault();var path=parsePath($(this).attr("href"));location.hash=$(this).attr("href");activatePage(path);});$("div.what").hover(function(){var thisO=$(this).offset();var collWrapO=$(this).parent(".collWrap").offset();var bubbleT="-10";var bubbleL="0";if($("div#index2").height()<parseInt(thisO.top)+parseInt(230)-parseInt(collWrapO.top)){bubbleT="-180";bubbleL="-2";}
if($("div#index2").width()<parseInt(thisO.left)+parseInt(230)){bubbleL="-187";}
$(this).css("z-index","5000");$("div.collHelper",this).css({top:bubbleT+"px",left:bubbleL+"px"}).show();},function(){$(this).css("z-index","1102");$("div.collHelper").hide();});$("a.atwl").live("click",function(){var el=$(this);$(this).parent().append("<span id='asecond'>A second...</span>");if($(this).attr("rel")==1){$.getJSON("wishlist.php",{act:'removeFromWL',id:$(el).attr("wl")},function(data){if(data.result=='success'){$("img",$(el)).attr("src","images/collection/new/heart.png");$(el).attr("rel","0");}else if(data.result=="error"){alert(data.message);}else if(data.result=="error1"){$("div#index01 a").attr("href","wishlist.php?suspid="+$(this).attr("wl")).trigger("click");}
$(el).parent().children("#asecond").remove();});}else if($(this).attr("rel")==0){$.getJSON("wishlist.php",{act:'addToWL',id:$(this).attr("wl")},function(data){if(data.result=='success'){$("img",$(el)).attr("src","images/collection/new/hearton.png");$(el).attr("rel","1");}else if(data.result=="error"){alert(data.message);}else if(data.result=="error1"){$("div#index01 a").attr("href","wishlist.php?suspid="+$(el).attr("wl")).trigger("click");}
$(el).parent().children("#asecond").remove();});}});$("div#index3 form#commentform input[name!='submit'], div#index3 form#commentform textarea").focus(function(){$("div#index3 div.opacity").eq(0).animate({opacity:1},500,function(){if($(this).attr("open")!=1){$(this).animate({width:"600px"},500).attr("open","1");$("textarea",this).animate({width:"573px"},500);$("input[name!='submit']",this).animate({width:"273px"},500);$("div#gbClose").fadeIn();}});$("div#index3 div.opacity").eq(1).animate({opacity:0.5},500);if($(this).val()==$(this).attr("title")){$(this).attr("name")=="url"?$(this).val("http://"):$(this).val("");}}).blur(function(){if($(this).val()==""||($(this).val()=="http://"&&$(this).attr("name")=="url")){$(this).val($(this).attr("title"));}});$("div#index3_1").click(function(){if($("div#index3 div.opacity").eq(0).attr("open")!=0){$("div#gbClose").fadeOut();$("div#index3 div.opacity").eq(0).animate({width:"230px"},500,function(){$("div#index3 div.opacity").eq(1).animate({opacity:1},500);$("div#index3 div.opacity").eq(0).animate({opacity:0.5},500);}).attr("open","0");$("textarea",$("div#index3 div.opacity").eq(0)).animate({width:"203px"},500);$("input[name!='submit']",$("div#index3 div.opacity").eq(0)).animate({width:"203px"},500);}});$("form#commentform").submit(function(e){e.preventDefault();var el=$(this);var formData=$("form#commentform").serialize();$("div#gbSending").fadeIn();$.post($(el).attr("action"),formData,function(data){if(data.result=="success"){$("div#gbForm").fadeOut("fast",function(){$("div#gbResult").css("color","green").html(data.message).fadeIn("fast",function(){setTimeout(function(){$("div#gbResult").fadeOut("fast",function(){$("div#gbForm").fadeIn();$.each($("div#gbForm input[name!='submit'],div#gbForm textarea"),function(){$(this).val($(this).attr("title")).css("width","203px");});});},2000);});$("div#index3_1").trigger("click");});}else if(data.result=="error"){alert(data.message);}
$("div#gbSending").fadeOut();},"json");});$("div#gbClose").click(function(){$("div#index3_1").trigger("click");});$("div#index3_1_0").click(function(){if($("div.comment:visible").prev(".comment").length){$("div.comment:visible").fadeOut("normal",function(){$(this).prev().fadeIn();var pathHere=parsePath(location.hash);location.hash="#"+pathHere.page+"-"+(pathHere.cat-1);if($("div.comment:visible").prev(".comment").length==0&&$("div#index3_1_0 span").is(":visible")){$("div#index3_1_0 span").fadeOut();}else{$("div#index3_1_0 span").fadeIn();}
if($("div.comment:visible").next(".comment").length==0&&$("div#index3_1_2 span").is(":visible")){$("div#index3_1_2 span").fadeOut();}else{$("div#index3_1_2 span").fadeIn();}
$("span#eqComment").html(parseInt($("span#eqComment").html())-parseInt(1));});}});$("div#index3_1_2").click(function(){if($("div.comment:visible").next(".comment").length){$("div.comment:visible").fadeOut("normal",function(){$(this).next().fadeIn();var pathHere=parsePath(location.hash);location.hash="#"+pathHere.page+"-"+(parseInt(pathHere.cat)+parseInt(1));if($("div.comment:visible").prev(".comment").length==0&&$("div#index3_1_0 span").is(":visible")){$("div#index3_1_0 span").fadeOut();}else{$("div#index3_1_0 span").fadeIn();}
if($("div.comment:visible").next(".comment").length==0&&$("div#index3_1_2 span").is(":visible")){$("div#index3_1_2 span").fadeOut();}else{$("div#index3_1_2 span").fadeIn();}
$("span#eqComment").html(parseInt($("span#eqComment").html())+parseInt(1));});}});$("div#index4 input, div#index4 textarea").focus(function(){if($(this).val()==$(this).attr("title")){$(this).val("");}}).blur(function(){if($(this).val()==""){$(this).val($(this).attr("title"));}});$("div#index4 form").submit(function(e){e.preventDefault();var el=$(this);var formData=$(el).serialize();$.post($(el).attr("action"),formData,function(data){if(data.result=="success"){alert(data.message);}else if(data.result=="error"){alert(data.message);}},"json");});$("div#index01 a").click(function(){var t=this.title||this.innerHTML||this.href;GB_show(t,this.href,500,780);return false;});$("a.greybox").click(function(){GB_show('',this.href,300,580);return false;});});
