Help Us To Improve, We Need Your COMMENTS

    read more
    Showing posts with label Widgets. Show all posts
    Showing posts with label Widgets. Show all posts
    How to Show Blogger Widget Only In Home Page Or Post Pages of blogger,as you have seen in wordpress blog its your wish to what widget and what add you want to show in sidebar of that page but this service cant be used in blogger as all sidebar bar widgets are linked to all pages in blogger including home page but now you can select the option which sidebar widget you want to show in blogger homepage and which one in all other blogger post pages.

    As one more beautiful hack how to show only post titles in blogger home and label pages has also been released,dont forget to red about it.

    Lets follow on this tutorial i.e how to show blogger widget only in home page or blogger posts pages.

    Add the widget in blogger layout where you want to display in blogger.Now you wnt to select on which pages of blogger it should be displayed.

    Now go to "Edit HTML" page.
    Mark "Expand Widget Templates"

    And Search for
    <b:widget id='HTML3' locked='false' title='Your Title name you gave to your widget' type='HTML'>
    The number in red can be any like 1,2,3,4 it depends on your no of widget your are adding but the title to the widget you gave will be same.

    So to make the widget code find easily for you find the below word
    <b:widget id='HTML

    and you will find many codes like these so keep on matchng the title name of widget of them to which you want to show on different pages.

    After finding the code of widget you want to display on different pages add the red codes to them as i have shown below.

    1) To display the any Blogger widget only in HomePage


    <b:widget id='HTML5' locked='false' title='Widget Title Name' type='HTML'>
    <b:includable id='main'>
    <b:if cond='data:blog.url == data:blog.homepageUrl'>
    <!-- only display title if it's non-empty -->
    <b:if cond='data:title != ""'>
    <h2 class='title'><data:title/></h2>
    </b:if>
    <div class='widget-content'>
    <data:content/>
    </div>

    <b:include name='quickedit'/>
    </b:if>
    </b:includable>
    </b:widget>


    Add the red codes as shown above in codes whch you found for that particular widget in your blog html.

    2) To display widget in all posts pages but not in HomePage


    <b:widget id='HTML3' locked='false' title='Widget Title Name' type='HTML'>
    <b:includable id='main'>
    <b:if cond='data:blog.pageType == "item"'>
    <!-- only display title if it's non-empty -->
    <b:if cond='data:title != ""'>
    <h2 class='title'><data:title/></h2>
    </b:if>
    <div class='widget-content'>
    <data:content/>
    </div>

    <b:include name='quickedit'/>
    </b:if>
    </b:includable>
    </b:widget>


    3) To Display Widget In Archive Pages


    <b:widget id='HTML3' locked='false' title='Widget Title Name' type='HTML'>
    <b:includable id='main'>
    <b:if cond='data:blog.pageType == "archive"'>
    <!-- only display title if it's non-empty -->
    <b:if cond='data:title != ""'>
    <h2 class='title'><data:title/></h2>
    </b:if>
    <div class='widget-content'>
    <data:content/>
    </div>

    <b:include name='quickedit'/>
    </b:if>
    </b:includable>
    </b:widget>

    If you have any problem leave your comments.

    Posted on : | By : Er. Ankita Dhiman | In : , ,

    4

    This tutorial will show you how to add Mootools Featured Posts Slider into blogger or any other web site. Now if you like to add this slider to your site then follow the steps given below.

    1.Login to your blogger dashboard--> layout- -> Edit HTML

    2.Scroll down to where you see </head> tag .

    3.Copy below code and paste it just before the </head> tag .



    <script src='http://pwam.googlecode.com/files/mootools-1.2.1-core-yc.js' type='text/javascript'/>
    
    <script type='text/javascript'>
    //<![CDATA[
    
    //MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2008 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
    
    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}('11.36=f 12({1M:11,a:{1m:"2s"},X:8(B,A){7.P("1v",8(){7.1w=(7.13["k"+7.1x.37()]!=0);b(7.1w&&2t.2u.38){7.e.39().2v(7.13)}},n);7.e=7.2w=$(B);7.Q(A);9 C=7.e.1n("13");7.13=C||f 1c("3Y",{3Z:$1Y(7.e.40("14","1N"),{41:"42"})}).43(7.e);7.e.1Z("13",7.13).1d("14",0);7.l=[];7.1w=n},2s:8(){7.14="14-15";7.1x="21";7.k=7.e.2x},22:8(){7.14="14-16";7.1x="23";7.k=7.e.2y},17:8(A){7.e.1d(7.14,A[0]);7.13.1d(7.1x,A[1]);c 7},1O:8(E,D,C){9 B=[];9 A=2;A.3a(8(F){B[F]=11.1O(E[F],D[F],C)});c B},h:8(B,E){b(!7.z(Y.2z,B,E)){c 7}7[E||7.a.1m]();9 D=7.e.1e(7.14).1P();9 C=7.13.1e(7.1x).1P();9 A=[[D,C],[0,7.k]];9 G=[[D,C],[-7.k,0]];9 F;1Q(B){o"R":F=A;1f;o"3b":F=G;1f;o"1R":F=(7.13["k"+7.1x.37()]==0)?A:G}c 7.Q(F[0],F[1])},3c:8(A){c 7.h("R",A)},3d:8(A){c 7.h("3b",A)},2A:8(A){7[A||7.a.1m]();7.1w=j;c 7.17([-7.k,0])},2B:8(A){7[A||7.a.1m]();7.1w=n;c 7.17([0,7.k])},1R:8(A){c 7.h("1R",A)}});1c.44.r={17:8(B){9 A=7.1n("r");b(A){A.Z()}c 7.3e("r").1Z("r:a",$1Y({2C:"Z"},B))},2D:8(A){b(A||!7.1n("r")){b(A||!7.1n("r:a")){7.17("r",A)}7.1Z("r",f 11.36(7,7.1n("r:a")))}c 7.1n("r")}};1c.1o({r:8(D,E){D=D||"1R";9 B=7.2D("r"),A;1Q(D){o"2A":B.2A(E);1f;o"2B":B.2B(E);1f;o"1R":9 C=7.1n("r:2E",B.1w);B[(C)?"3d":"3c"](E);7.1Z("r:2E",!C);A=n;1f;45:B.h(D,E)}b(!A){7.3e("r:2E")}c 7}});11.46=f 12({1M:11,a:{k:{x:0,y:0},3f:n},X:8(B,A){7.e=7.2w=$(B);7.Q(A);9 D=7.Z.M(7,j);b($10(7.e)!="e"){7.e=$(7.e.24().25)}9 C=7.e;b(7.a.3f){7.P("h",8(){C.P("2F",D)},n);7.P("1v",8(){C.18("2F",D)},n)}},17:8(){9 A=1y.3g(Y);7.e.3h(A[0],A[1])},1O:8(E,D,C){9 B=[];9 A=2;A.3a(8(F){B.26(11.1O(E[F],D[F],C))});c B},h:8(C,H){b(!7.z(Y.2z,C,H)){c 7}9 E=7.e.3i(),F=7.e.47();9 B=7.e.3j(),D={x:C,y:H};S(9 G R D){9 A=F[G]-E[G];b($1z(D[G])){D[G]=($10(D[G])=="2G")?D[G].m(0,A):A}s{D[G]=B[G]}D[G]+=7.a.k[G]}c 7.Q([B.x,B.y],[D.x,D.y])},48:8(){c 7.h(j,0)},49:8(){c 7.h(0,j)},4a:8(){c 7.h("1A",j)},4b:8(){c 7.h(j,"1B")},4c:8(B){9 A=$(B).27(7.e);c 7.h(A.x,A.y)}});11.3k=f 12({1M:11.4d,X:8(B,A){7.2H=7.2w=$$(B);7.Q(A)},1O:8(G,H,I){9 C={};S(9 D R G){9 A=G[D],E=H[D],F=C[D]={};S(9 B R A){F[B]=7.Q(A[B],E[B],I)}}c C},17:8(B){S(9 C R B){9 A=B[C];S(9 D R A){7.4e(7.2H[C],D,A[D],7.a.2I)}}c 7},h:8(C){b(!7.z(Y.2z,C)){c 7}9 H={},I={};S(9 D R C){9 F=C[D],A=H[D]={},G=I[D]={};S(9 B R F){9 E=7.4f(7.2H[D],B,F[B]);A[B]=E.4g;G[B]=E.4h}}c 7.Q(H,I)}});9 1C=f 12({2J:[2K,2L],a:{1p:6,2I:"4i",1g:j,2M:n,m:j,28:j,29:j,1q:j,U:{x:"16",y:"15"}},X:8(){9 B=1y.2C(Y,{a:4j.10,e:$4k});7.e=$(B.e);7.t=7.e.24();7.2N(B.a||{});9 A=$10(7.a.28);7.2O=(A=="4l"||A=="4m")?$$(7.a.28):$(7.a.28)||7.e;7.19={l:{},2P:{}};7.p={h:{},l:{}};7.2a=(2t.2u.4n)?"4o":"2b";7.v={h:7.h.M(7),z:7.z.M(7),V:7.V.M(7),1h:7.1h.M(7),Z:7.Z.M(7),2c:$2Q(j)};7.3l()},3l:8(){7.2O.P("2b",7.v.h);c 7},4p:8(){7.2O.18("2b",7.v.h);c 7},h:8(C){b(7.a.1q){C.1q()}7.u("4q",7.e);7.19.h=C.N;9 A=7.a.m;7.m={x:[],y:[]};S(9 D R 7.a.U){b(!7.a.U[D]){3m}b(7.a.2M){7.p.l[D]=7.e.1e(7.a.U[D]).1P()}s{7.p.l[D]=7.e[7.a.U[D]]}b(7.a.29){7.p.l[D]*=-1}7.19.2P[D]=C.N[D]-7.p.l[D];b(A&&A[D]){S(9 B=2;B--;B){b($1z(A[D][B])){7.m[D][B]=$2Q(A[D][B])()}}}}b($10(7.a.1g)=="2G"){7.a.1g={x:7.a.1g,y:7.a.1g}}7.t.2R({1D:7.v.z,2d:7.v.Z});7.t.P(7.2a,7.v.2c)},z:8(A){b(7.a.1q){A.1q()}9 B=i.O(i.4r(i.3n(A.N.x-7.19.h.x,2)+i.3n(A.N.y-7.19.h.y,2)));b(B>7.a.1p){7.Z();7.t.2R({1D:7.v.V,2d:7.v.1h});7.u("h",7.e).u("1p",7.e)}},V:8(A){b(7.a.1q){A.1q()}7.19.l=A.N;S(9 B R 7.a.U){b(!7.a.U[B]){3m}7.p.l[B]=7.19.l[B]-7.19.2P[B];b(7.a.29){7.p.l[B]*=-1}b(7.a.m&&7.m[B]){b($1z(7.m[B][1])&&(7.p.l[B]>7.m[B][1])){7.p.l[B]=7.m[B][1]}s{b($1z(7.m[B][0])&&(7.p.l[B]<7.m[B][0])){7.p.l[B]=7.m[B][0]}}}b(7.a.1g[B]){7.p.l[B]-=(7.p.l[B]%7.a.1g[B])}b(7.a.2M){7.e.1d(7.a.U[B],7.p.l[B]+7.a.2I)}s{7.e[7.a.U[B]]=7.p.l[B]}}7.u("V",7.e)},Z:8(A){7.t.18("1D",7.v.z);7.t.18("2d",7.v.Z);b(A){7.t.18(7.2a,7.v.2c);7.u("Z",7.e)}},1h:8(A){7.t.18(7.2a,7.v.2c);7.t.18("1D",7.v.V);7.t.18("2d",7.v.1h);b(A){7.u("1v",7.e)}}});1c.1o({4s:8(A){c f 1C(7,$2e({U:{x:"23",y:"21"}},A))}});1C.3o=f 12({1M:1C,a:{1S:[],1a:j},X:8(C,B){7.Q(C,B);7.1S=$$(7.a.1S);7.1a=$(7.a.1a);b(7.1a&&$10(7.1a)!="e"){7.1a=$(7.1a.24().25)}C=7.e;9 D=C.1e("1N");9 A=(D!="4t")?D:"4u";b(C.1e("16")=="3p"||C.1e("15")=="3p"){C.1N(C.27(C.3q))}C.1d("1N",A);7.P("h",8(){7.2f()},n)},h:8(B){b(7.1a){9 D=7.e,J=7.1a,E=J.3r(D.3q),F={},A={};["15","1A","1B","16"].1r(8(K){F[K]=J.1e("4v-"+K).1P();A[K]=D.1e("14-"+K).1P()},7);9 C=D.2y+A.16+A.1A,I=D.2x+A.15+A.1B;9 H=[E.16+F.16,E.1A-F.1A-C];9 G=[E.15+F.15,E.1B-F.1B-I];7.a.m={x:H,y:G}}7.Q(B)},3s:8(B){B=B.3r();9 A=7.19.l;c(A.x>B.16&&A.x<B.1A&&A.y<B.1B&&A.y>B.15)},2f:8(){9 A=7.1S.4w(7.3s,7).3t();b(7.1s!=A){b(7.1s){7.u("4x",[7.e,7.1s])}b(A){7.1s=A;7.u("4y",[7.e,A])}s{7.1s=1E}}},V:8(A){7.Q(A);b(7.1S.2g){7.2f()}},1h:8(A){7.2f();7.u("4z",[7.e,7.1s]);7.1s=1E;c 7.Q(A)}});1c.1o({4A:8(A){c f 1C.3o(7,A)}});1F.2S=f 12({1M:2S,a:{3u:n},X:8(B,A){7.Q(B,A);7.2h()},3v:8(){9 A=3w.4B(7.2T);b(!A||A.2g>4C){c j}b(A=="{}"){7.39()}s{7.4D(A)}c n},2h:8(){7.2T=f 1F(3w.4E(7.4F(),n));c 7}});1F.2S.1o((8(){9 A={};1F.1r(1F.4G,8(C,B){A[B]=8(){9 D=C.4H(7.2T,Y);b(7.a.3u){7.3v()}c D}});c A})());9 W=f 4I({X:8(B,C){b(Y.2g>=3){C="1G";B=1y.2i(Y,0,3)}s{b(4J B=="4K"){b(B.2j(/1G/)){B=B.3x().2U(n)}s{b(B.2j(/q/)){B=B.1T()}s{B=B.2U(n)}}}}C=C||"1G";1Q(C){o"q":9 A=B;B=B.1T();B.q=A;1f;o"2V":B=B.2U(n);1f}B.1G=B.2i(0,3);B.q=B.q||B.2k();B.2V=B.3x();c $1Y(B,7)}});W.1o({4L:8(){9 A=1y.2i(Y);9 C=($10(A.3t())=="2G")?A.4M():50;9 B=7.2i();A.1r(8(D){D=f W(D);S(9 E=0;E<3;E++){B[E]=i.O((B[E]/1i*(1i-C))+(D[E]/1i*C))}});c f W(B,"1G")},29:8(){c f W(7.4N(8(A){c 1H-A}))},4O:8(A){c f W([A,7.q[1],7.q[2]],"q")},4P:8(A){c f W([7.q[0],A,7.q[2]],"q")},4Q:8(A){c f W([7.q[0],7.q[1],A],"q")}});8 $4R(C,B,A){c f W([C,B,A],"1G")}8 $4S(C,B,A){c f W([C,B,A],"q")}8 $4T(A){c f W(A,"2V")}1y.1o({2k:8(){9 B=7[0],C=7[1],J=7[2];9 G,F,H;9 I=i.1U(B,C,J),E=i.1j(B,C,J);9 K=I-E;H=I/1H;F=(I!=0)?K/I:0;b(F==0){G=0}s{9 D=(I-B)/K;9 A=(I-C)/K;9 L=(I-J)/K;b(B==I){G=L-A}s{b(C==I){G=2+D-L}s{G=4+A-D}}G/=6;b(G<0){G++}}c[i.O(G*3y),i.O(F*1i),i.O(H*1i)]},1T:8(){9 C=i.O(7[2]/1i*1H);b(7[1]==0){c[C,C,C]}s{9 A=7[0]%3y;9 E=A%2W;9 F=i.O((7[2]*(1i-7[1]))/4U*1H);9 D=i.O((7[2]*(3z-7[1]*E))/3A*1H);9 B=i.O((7[2]*(3z-7[1]*(2W-E)))/3A*1H);1Q(i.4V(A/2W)){o 0:c[C,B,F];o 1:c[D,C,F];o 2:c[F,C,B];o 3:c[F,D,C];o 4:c[B,F,C];o 5:c[C,F,D]}}c j}});4W.1o({2k:8(){9 A=7.2j(/\\d{1,3}/g);c(A)?q.2k():1E},1T:8(){9 A=7.2j(/\\d{1,3}/g);c(A)?A.1T():1E}});9 4X=f 12({X:8(){7.2l=1y.3g(Y);7.1I={};7.1J={}},P:8(B,A){7.1J[B]=7.1J[B]||{};7.1I[B]=7.1I[B]||[];b(7.1I[B].3B(A)){c j}s{7.1I[B].26(A)}7.2l.1r(8(C,D){C.P(B,7.z.M(7,[B,C,D]))},7);c 7},z:8(C,A,B){7.1J[C][B]=n;9 D=7.2l.4Y(8(F,E){c 7.1J[C][E]||j},7);b(!D){c}7.1J[C]={};7.1I[C].1r(8(E){E.3C(7,7.2l,A)},7)}});9 3D=f 1F({3E:8(F,D){D=$1Y({1t:$1K,t:t,z:$2Q(n)},D);9 B=f 1c("4Z",{2X:F,10:"3F/3E"});9 E=D.1t.M(B),A=D.z,G=D.t;2m D.1t;2m D.z;2m D.t;B.2R({2h:E,51:8(){b(["52","1v"].3B(7.53)){E()}}}).3G(D);b(2t.2u.38){9 C=(8(){b(!$54(A)){c}$3H(C);E()}).3I(50)}c B.2v(G.3J)},3K:8(B,A){c f 1c("2C",$2e({55:"56",57:"58",10:"3F/3K",59:B},A)).2v(t.3J)},3L:8(C,B){B=$2e({1t:$1K,3M:$1K,3N:$1K},B);9 D=f 5a();9 A=$(D)||f 1c("5b");["2h","5c","5d"].1r(8(E){9 F="5e"+E;9 G=B[F];2m B[F];D[F]=8(){b(!D){c}b(!A.5f){A.23=D.23;A.21=D.21}D=D.1t=D.3M=D.3N=1E;G.3O(1,A,A);A.u(E,A,1)}});D.2X=A.2X=C;b(D&&D.1v){D.1t.3O(1)}c A.3G(B)},5g:8(D,C){C=$2e({2Y:$1K,3P:$1K},C);b(!D.26){D=[D]}9 A=[];9 B=0;D.1r(8(F){9 E=f 3D.3L(F,{1t:8(){C.3P.3C(7,B,D.5h(F));B++;b(B==D.2g){C.2Y()}}});A.26(E)});c f 3k(A)}});9 5i=f 12({2J:[2K,2L],a:{5j:8(A){b(7.a.1p){A=7.2Z(7.w)}7.1L.1d(7.1V,A)},1p:j,k:0,T:j,2n:j,1k:1i,1m:"22"},X:8(E,A,D){7.2N(D);7.e=$(E);7.1L=$(A);7.30=7.31=7.w=-1;7.e.P("2b",7.3Q.M(7));b(7.a.2n){7.e.P("2F",7.3R.5k(7))}9 F,B={},C={x:j,y:j};1Q(7.a.1m){o"2s":7.1l="y";7.1V="15";F="2x";1f;o"22":7.1l="x";7.1V="16";F="2y"}7.3S=7.1L[F]/2;7.1b=7.e[F]-7.1L[F]+(7.a.k*2);7.1j=$1z(7.a.T[0])?7.a.T[0]:0;7.1U=$1z(7.a.T[1])?7.a.T[1]:7.a.1k;7.T=7.1U-7.1j;7.1k=7.a.1k||7.1b;7.1u=i.32(7.T)/7.1k;7.3T=7.1u*7.1b/i.32(7.T);7.1L.1d("1N","5l").1d(7.1V,-7.a.k);C[7.1l]=7.1V;B[7.1l]=[-7.a.k,7.1b-7.a.k];7.V=f 1C(7.1L,{1p:0,m:B,U:C,5m:7.2o.M(7),5n:7.2o.M(7),2Y:8(){7.2o();7.2p()}.M(7)});b(7.a.1p){7.V.a.1g=i.5o(7.3T);7.V.a.m[7.1l][1]=7.1b}},17:8(A){b(!((7.T>0)^(A<7.1j))){A=7.1j}b(!((7.T>0)^(A>7.1U))){A=7.1U}7.w=i.O(A);7.2q();7.2p();7.u("3U",7.2Z(7.w));c 7},3Q:8(C){9 B=7.T<0?-1:1;9 A=C.N[7.1l]-7.e.27()[7.1l]-7.3S;A=A.m(-7.a.k,7.1b-7.a.k);7.w=i.O(7.1j+B*7.33(A));7.2q();7.2p();7.u("3U",A)},3R:8(A){9 B=(7.a.1m=="22")?(A.2n<0):(A.2n>0);7.17(B?7.w-7.1u:7.w+7.1u);A.1h()},2o:8(){9 B=7.T<0?-1:1;9 A=7.V.p.l[7.1l];A=A.m(-7.a.k,7.1b-7.a.k);7.w=i.O(7.1j+B*7.33(A));7.2q()},2q:8(){b(7.30!=7.w){7.30=7.w;7.u("3V",7.w)}},2p:8(){b(7.31!==7.w){7.31=7.w;7.u("1v",7.w+"")}},33:8(A){9 B=(A+7.a.k)*7.1u/7.1b*7.1k;c 7.a.1k?i.O(B-=B%7.1u):B},2Z:8(A){c(7.1b*i.32(7.1j-A))/(7.1k*7.1u)-7.a.k}});9 5p=f 12({2J:[2K,2L],a:{1W:20,34:1,5q:8(A,B){7.e.3h(A,B)}},X:8(B,A){7.2N(A);7.e=$(B);7.2r=($10(7.e)!="e")?$(7.e.24().25):7.e;7.1X=1E;7.35=7.3W.M(7)},h:8(){7.2r.P("1D",7.35)},1h:8(){7.2r.18("1D",7.35);7.1X=$3H(7.1X)},3W:8(A){7.N=(7.2r.2D("5r")=="25")?A.5s:A.N;b(!7.1X){7.1X=7.3X.3I(50,7)}},3X:8(){9 B=7.e.3i(),A=7.e.3j(),E=7.e.27(),D={x:0,y:0};S(9 C R 7.N){b(7.N[C]<(7.a.1W+E[C])&&A[C]!=0){D[C]=(7.N[C]-7.a.1W-E[C])*7.a.34}s{b(7.N[C]+7.a.1W>(B[C]+E[C])&&B[C]+B[C]!=A[C]){D[C]=(7.N[C]-B[C]+7.a.1W-E[C])*7.a.34}}}b(D.y||D.x){7.u("3V",[A.x+D.x,A.y+D.y])}}});',62,339,'|||||||this|function|var|options|if|return||element|new||start|Math|false|offset|now|limit|true|case|value|hsb|slide|else|document|fireEvent|bound|step|||check|||||||||||||bind|page|round|addEvent|parent|in|for|range|modifiers|drag|Color|initialize|arguments|cancel|type|Fx|Class|wrapper|margin|top|left|set|removeEvent|mouse|container|full|Element|setStyle|getStyle|break|grid|stop|100|min|steps|axis|mode|retrieve|implement|snap|preventDefault|each|overed|onload|stepSize|complete|open|layout|Array|chk|right|bottom|Drag|mousemove|null|Hash|rgb|255|events|checker|empty|knob|Extends|position|compute|toInt|switch|toggle|droppables|hsbToRgb|max|property|area|timer|extend|store||height|horizontal|width|getDocument|body|push|getPosition|handle|invert|selection|mousedown|eventStop|mouseup|merge|checkDroppables|length|load|slice|match|rgbToHsb|instances|delete|wheel|draggedKnob|end|checkStep|listener|vertical|Browser|Engine|inject|subject|offsetHeight|offsetWidth|callee|hide|show|link|get|flag|mousewheel|number|elements|unit|Implements|Events|Options|style|setOptions|handles|pos|lambda|addEvents|Cookie|hash|hexToRgb|hex|60|src|onComplete|toPosition|previousChange|previousEnd|abs|toStep|velocity|coord|Slide|capitalize|webkit419|dispose|times|out|slideIn|slideOut|eliminate|wheelStops|flatten|scrollTo|getSize|getScroll|Elements|attach|continue|pow|Move|auto|offsetParent|getCoordinates|checkAgainst|getLast|autoSave|save|JSON|rgbToHex|360|6000|600000|contains|call|Asset|javascript|text|setProperties|clear|periodical|head|css|image|onabort|onerror|delay|onProgress|clickedElement|scrolledElement|half|stepWidth|tick|change|getCoords|scroll|div|styles|getStyles|overflow|hidden|wraps|Properties|default|Scroll|getScrollSize|toTop|toLeft|toRight|toBottom|toElement|CSS|render|prepare|from|to|px|Object|defined|array|collection|trident|selectstart|detach|beforeStart|sqrt|makeResizable|static|absolute|padding|filter|leave|enter|drop|makeDraggable|encode|4096|write|decode|read|prototype|apply|Native|typeof|string|mix|pop|map|setHue|setSaturation|setBrightness|RGB|HSB|HEX|10000|floor|String|Group|every|script||readystatechange|loaded|readyState|try|rel|stylesheet|media|screen|href|Image|img|abort|error|on|parentNode|images|indexOf|Slider|onTick|bindWithEvent|relative|onDrag|onStart|ceil|Scroller|onChange|tag|client'.split('|'),0,{}))
    
    //]]>
    </script>
    
    <script type='text/javascript'>
    //<![CDATA[
    
    /*
    This file is part of JonDesign's SmoothGallery v2.1beta1.
    
    JonDesign's SmoothGallery is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    JonDesign's SmoothGallery is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with JonDesign's SmoothGallery; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    
    Main Developer: Jonathan Schemoul (JonDesign: http://www.jondesign.net/)
    Contributed code by:
    - Christian Ehret (bugfix)
    - Nitrix (bugfix)
    - Valerio from Mad4Milk for his great help with the carousel scrolling and many other things.
    - Archie Cowan for helping me find a bugfix on carousel inner width problem.
    - Tomocchino from #mootools for the preloader class
    Many thanks to:
    - The mootools team for the great mootools lib, and it's help and support throughout the project.
    - Harald Kirschner (digitarald: http://digitarald.de/) for all his great libs. Some used here as plugins.
    */
    
    /* some quirks to circumvent broken stuff in mt1.2 */
    function isBody(element){
    return (/^(?:body|html)$/i).test(element.tagName);
    };
    Element.implement({
    getPosition: function(relative){
    if (isBody(this)) return {x: 0, y: 0};
    var el = this, position = {x: 0, y: 0};
    while (el){
     position.x += el.offsetLeft;
     position.y += el.offsetTop;
     el = el.offsetParent;
    }
    var rpos = (relative) ? $(relative).getPosition() : {x: 0, y: 0};
    return {x: position.x - rpos.x, y: position.y - rpos.y};
    }
    });
    
    // declaring the class
    var gallery = {
    Implements: [Events, Options],
    options: {
    showArrows: true,
    showCarousel: true,
    showInfopane: true,
    embedLinks: true,
    fadeDuration: 500,
    timed: false,
    delay: 9000,
    preloader: true,
    preloaderImage: true,
    preloaderErrorImage: true,
    /* Data retrieval */
    manualData: [],
    populateFrom: false,
    populateData: true,
    destroyAfterPopulate: true,
    elementSelector: "div.imageElement",
    titleSelector: "h3",
    subtitleSelector: "p",
    linkSelector: "a.open",
    imageSelector: "img.full",
    thumbnailSelector: "img.thumbnail",
    defaultTransition: "fade",
    /* InfoPane options */
    slideInfoZoneOpacity: 0.7,
    slideInfoZoneSlide: true,
    /* Carousel options */
    carouselMinimizedOpacity: 0.4,
    carouselMinimizedHeight: 20,
    carouselMaximizedOpacity: 0.9,
    thumbHeight: 75,
    thumbWidth: 100,
    thumbSpacing: 10,
    thumbIdleOpacity: 0.2,
    textShowCarousel: 'Pictures',
    showCarouselLabel: true,
    thumbCloseCarousel: true,
    useThumbGenerator: false,
    thumbGenerator: 'resizer.php',
    useExternalCarousel: false,
    carouselElement: false,
    carouselHorizontal: true,
    activateCarouselScroller: true,
    carouselPreloader: true,
    textPreloadingCarousel: 'Loading...',
    /* CSS Classes */
    baseClass: 'jdGallery',
    withArrowsClass: 'withArrows',
    /* Plugins: HistoryManager */
    useHistoryManager: false,
    customHistoryKey: false,
    /* Plugins: ReMooz */
    useReMooz: false
    },
    initialize: function(element, options) {
    this.setOptions(options);
    this.fireEvent('onInit');
    this.currentIter = 0;
    this.lastIter = 0;
    this.maxIter = 0;
    this.galleryElement = element;
    this.galleryData = this.options.manualData;
    this.galleryInit = 1;
    this.galleryElements = Array();
    this.thumbnailElements = Array();
    this.galleryElement.addClass(this.options.baseClass);
    
    if (this.options.useReMooz&&(this.options.defaultTransition=="fade"))
     this.options.defaultTransition="crossfade";
    
    this.populateFrom = element;
    if (this.options.populateFrom)
     this.populateFrom = this.options.populateFrom;
    if (this.options.populateData)
     this.populateData();
    element.style.display="block";
    
    if (this.options.useHistoryManager)
     this.initHistory();
    
    if ((this.options.embedLinks)|(this.options.useReMooz))
    {
     this.currentLink = new Element('a').addClass('open').setProperties({
      href: '#',
      title: ''
     }).injectInside(element);
     if ((!this.options.showArrows) && (!this.options.showCarousel))
      this.galleryElement = element = this.currentLink;
     else
      this.currentLink.setStyle('display', 'none');
    }
    
    this.constructElements();
    if ((this.galleryData.length>1)&&(this.options.showArrows))
    {
     var leftArrow = new Element('a').addClass('left').addEvent(
      'click',
      this.prevItem.bind(this)
     ).injectInside(element);
     var rightArrow = new Element('a').addClass('right').addEvent(
      'click',
      this.nextItem.bind(this)
     ).injectInside(element);
     this.galleryElement.addClass(this.options.withArrowsClass);
    }
    this.loadingElement = new Element('div').addClass('loadingElement').injectInside(element);
    if (this.options.showInfopane) this.initInfoSlideshow();
    if (this.options.showCarousel) this.initCarousel();
    this.doSlideShow(1);
    },
    populateData: function() {
    currentArrayPlace = this.galleryData.length;
    options = this.options;
    var data = $A(this.galleryData);
    data.extend(this.populateGallery(this.populateFrom, currentArrayPlace));
    this.galleryData = data;
    this.fireEvent('onPopulated');
    },
    populateGallery: function(element, startNumber) {
    var data = [];
    options = this.options;
    currentArrayPlace = startNumber;
    element.getElements(options.elementSelector).each(function(el) {
     elementDict = $H({
      image: el.getElement(options.imageSelector).getProperty('src'),
      number: currentArrayPlace,
      transition: this.options.defaultTransition
     });
     if ((options.showInfopane) | (options.showCarousel))
      elementDict.extend({
       title: el.getElement(options.titleSelector).innerHTML,
       description: el.getElement(options.subtitleSelector).innerHTML
      });
     if ((options.embedLinks) | (options.useReMooz))
      elementDict.extend({
       link: el.getElement(options.linkSelector).href||false,
       linkTitle: el.getElement(options.linkSelector).title||false,
       linkTarget: el.getElement(options.linkSelector).getProperty('target')||false
      });
     if ((!options.useThumbGenerator) && (options.showCarousel))
      elementDict.extend({
       thumbnail: el.getElement(options.thumbnailSelector).getProperty('src')
      });
     else if (options.useThumbGenerator)
      elementDict.extend({
       thumbnail: options.thumbGenerator + '?imgfile=' + elementDict.image + '&max_width=' + options.thumbWidth + '&max_height=' + options.thumbHeight
      });
    
     data.extend([elementDict]);
     currentArrayPlace++;
     if (this.options.destroyAfterPopulate)
      el.dispose();
    });
    return data;
    },
    constructElements: function() {
    el = this.galleryElement;
    if (this.options.embedLinks && (!this.options.showArrows))
     el = this.currentLink;
    this.maxIter = this.galleryData.length;
    var currentImg;
    for(i=0;i<this.galleryData.length;i++)
    {
     var currentImg = new Fx.Morph(
      new Element('div').addClass('slideElement').setStyles({
       'position':'absolute',
       'left':'0px',
       'right':'0px',
       'margin':'0px',
       'padding':'0px',
       'backgroundPosition':"center center",
       'opacity':'0'
      }).injectInside(el),
      {duration: this.options.fadeDuration}
     );
     if (this.options.preloader)
     {
      currentImg.source = this.galleryData[i].image;
      currentImg.loaded = false;
      currentImg.load = function(imageStyle, i) {
       if (!imageStyle.loaded) {
        this.galleryData[i].imgloader = new Asset.image(imageStyle.source, {
                                'onload'  : function(img, i){
               img.element.setStyle(
               'backgroundImage',
               "url('" + img.source + "')")
               img.loaded = true;
               img.width = this.galleryData[i].imgloader.width;
               img.height = this.galleryData[i].imgloader.height;
              }.pass([imageStyle, i], this)
        });
       }
      }.pass([currentImg, i], this);
     } else {
      currentImg.element.setStyle('backgroundImage',
           "url('" + this.galleryData[i].image + "')");
     }
     this.galleryElements[parseInt(i)] = currentImg;
    }
    },
    destroySlideShow: function(element) {
    var myClassName = element.className;
    var newElement = new Element('div').addClass('myClassName');
    element.parentNode.replaceChild(newElement, element);
    },
    startSlideShow: function() {
    this.fireEvent('onStart');
    this.loadingElement.style.display = "none";
    this.lastIter = this.maxIter - 1;
    this.currentIter = 0;
    this.galleryInit = 0;
    this.galleryElements[parseInt(this.currentIter)].set({opacity: 1});
    if (this.options.showInfopane)
     this.showInfoSlideShow.delay(1000, this);
    if (this.options.useReMooz)
     this.makeReMooz.delay(1000, this);
    var textShowCarousel = formatString(this.options.textShowCarousel, this.currentIter+1, this.maxIter);
    if (this.options.showCarousel&&(!this.options.carouselPreloader)&&(!this.options.useExternalCarousel))
     this.carouselBtn.set('html', textShowCarousel).setProperty('title', textShowCarousel);
    this.prepareTimer();
    if (this.options.embedLinks)
     this.makeLink(this.currentIter);
    },
    nextItem: function() {
    this.fireEvent('onNextCalled');
    this.nextIter = this.currentIter+1;
    if (this.nextIter >= this.maxIter)
     this.nextIter = 0;
    this.galleryInit = 0;
    this.goTo(this.nextIter);
    },
    prevItem: function() {
    this.fireEvent('onPreviousCalled');
    this.nextIter = this.currentIter-1;
    if (this.nextIter <= -1)
     this.nextIter = this.maxIter - 1;
    this.galleryInit = 0;
    this.goTo(this.nextIter);
    },
    goTo: function(num) {
    this.clearTimer();
    if(this.options.preloader)
    {
     this.galleryElements[num].load();
     if (num==0)
      this.galleryElements[this.maxIter - 1].load();
     else
      this.galleryElements[num - 1].load();
     if (num==(this.maxIter - 1))
      this.galleryElements[0].load();
     else
      this.galleryElements[num + 1].load();
    
    }
    if (this.options.embedLinks)
     this.clearLink();
    if (this.options.showInfopane)
    {
     this.slideInfoZone.clearChain();
     this.hideInfoSlideShow().chain(this.changeItem.pass(num, this));
    } else
     this.currentChangeDelay = this.changeItem.delay(500, this, num);
    if (this.options.embedLinks)
     this.makeLink(num);
    this.prepareTimer();
    /*if (this.options.showCarousel)
     this.clearThumbnailsHighlights();*/
    },
    changeItem: function(num) {
    this.fireEvent('onStartChanging');
    this.galleryInit = 0;
    if (this.currentIter != num)
    {
     for(i=0;i<this.maxIter;i++)
     {
      if ((i != this.currentIter)) this.galleryElements[i].set({opacity: 0});
     }
     gallery.Transitions[this.galleryData[num].transition].pass([
      this.galleryElements[this.currentIter],
      this.galleryElements[num],
      this.currentIter,
      num], this)();
     this.currentIter = num;
     if (this.options.useReMooz)
      this.makeReMooz();
    }
    var textShowCarousel = formatString(this.options.textShowCarousel, num+1, this.maxIter);
    if ((this.options.showCarousel)&&(!this.options.useExternalCarousel))
     this.carouselBtn.set('html', textShowCarousel).setProperty('title', textShowCarousel);
    this.doSlideShow.bind(this)();
    this.fireEvent('onChanged');
    },
    clearTimer: function() {
    if (this.options.timed)
     $clear(this.timer);
    },
    prepareTimer: function() {
    if (this.options.timed)
     this.timer = this.nextItem.delay(this.options.delay, this);
    },
    doSlideShow: function(position) {
    if (this.galleryInit == 1)
    {
     imgPreloader = new Image();
     imgPreloader.onload=function(){
      this.startSlideShow.delay(10, this);
     }.bind(this);
     imgPreloader.src = this.galleryData[0].image;
     if(this.options.preloader)
      this.galleryElements[0].load();
    } else {
     if (this.options.showInfopane)
     {
      if (this.options.showInfopane)
      {
       this.showInfoSlideShow.delay((500 + this.options.fadeDuration), this);
      } else
       if ((this.options.showCarousel)&&(this.options.activateCarouselScroller))
        this.centerCarouselOn(position);
     }
    }
    },
    createCarousel: function() {
    var carouselElement;
    if (!this.options.useExternalCarousel)
    {
     var carouselContainerElement = new Element('div').addClass('carouselContainer').injectInside(this.galleryElement);
     this.carouselContainer = new Fx.Morph(carouselContainerElement, {transition: Fx.Transitions.Expo.easeOut});
     this.carouselContainer.normalHeight = carouselContainerElement.offsetHeight;
     this.carouselContainer.set({'opacity': this.options.carouselMinimizedOpacity, 'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight)});
     this.carouselBtn = new Element('a').addClass('carouselBtn').setProperties({
      title: this.options.textShowCarousel
     }).injectInside(carouselContainerElement);
     if(this.options.carouselPreloader)
      this.carouselBtn.set('html', this.options.textPreloadingCarousel);
     else
      this.carouselBtn.set('html', this.options.textShowCarousel);
     this.carouselBtn.addEvent(
      'click',
      function () {
       this.carouselContainer.cancel();
       this.toggleCarousel();
      }.bind(this)
     );
     this.carouselActive = false;
    
     carouselElement = new Element('div').addClass('carousel').injectInside(carouselContainerElement);
     this.carousel = new Fx.Morph(carouselElement);
    } else {
     carouselElement = $(this.options.carouselElement).addClass('jdExtCarousel');
    }
    this.carouselElement = new Fx.Morph(carouselElement, {transition: Fx.Transitions.Expo.easeOut});
    this.carouselElement.normalHeight = carouselElement.offsetHeight;
    if (this.options.showCarouselLabel)
     this.carouselLabel = new Element('p').addClass('label').injectInside(carouselElement);
    carouselWrapper = new Element('div').addClass('carouselWrapper').injectInside(carouselElement);
    this.carouselWrapper = new Fx.Morph(carouselWrapper, {transition: Fx.Transitions.Expo.easeOut});
    this.carouselWrapper.normalHeight = carouselWrapper.offsetHeight;
    this.carouselInner = new Element('div').addClass('carouselInner').injectInside(carouselWrapper);
    if (this.options.activateCarouselScroller)
    {
     this.carouselWrapper.scroller = new Scroller(carouselWrapper, {
      area: 100,
      velocity: 0.2
     })
    
     this.carouselWrapper.elementScroller = new Fx.Scroll(carouselWrapper, {
      duration: 400,
      onStart: this.carouselWrapper.scroller.stop.bind(this.carouselWrapper.scroller),
      onComplete: this.carouselWrapper.scroller.start.bind(this.carouselWrapper.scroller)
     });
    }
    },
    fillCarousel: function() {
    this.constructThumbnails();
    this.carouselInner.normalWidth = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing + 2))+this.options.thumbSpacing) + "px";
    if (this.options.carouselHorizontal)
     this.carouselInner.style.width = this.carouselInner.normalWidth;
    },
    initCarousel: function () {
    this.createCarousel();
    this.fillCarousel();
    if (this.options.carouselPreloader)
     this.preloadThumbnails();
    },
    flushCarousel: function() {
    this.thumbnailElements.each(function(myFx) {
     myFx.element.dispose();
     myFx = myFx.element = null;
    });
    this.thumbnailElements = [];
    },
    toggleCarousel: function() {
    if (this.carouselActive)
     this.hideCarousel();
    else
     this.showCarousel();
    },
    showCarousel: function () {
    this.fireEvent('onShowCarousel');
    this.carouselContainer.start({
     'opacity': this.options.carouselMaximizedOpacity,
     'top': 0
    }).chain(function() {
     this.carouselActive = true;
     this.carouselWrapper.scroller.start();
     this.fireEvent('onCarouselShown');
     this.carouselContainer.options.onComplete = null;
    }.bind(this));
    },
    hideCarousel: function () {
    this.fireEvent('onHideCarousel');
    var targetTop = this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight;
    this.carouselContainer.start({
     'opacity': this.options.carouselMinimizedOpacity,
     'top': targetTop
    }).chain(function() {
     this.carouselActive = false;
     this.carouselWrapper.scroller.stop();
     this.fireEvent('onCarouselHidden');
     this.carouselContainer.options.onComplete = null;
    }.bind(this));
    },
    constructThumbnails: function () {
    element = this.carouselInner;
    for(i=0;i<this.galleryData.length;i++)
    {
     var currentImg = new Fx.Morph(new Element ('div').addClass("thumbnail").setStyles({
       backgroundImage: "url('" + this.galleryData[i].thumbnail + "')",
       backgroundPosition: "center center",
       backgroundRepeat: 'no-repeat',
       marginLeft: this.options.thumbSpacing + "px",
       width: this.options.thumbWidth + "px",
       height: this.options.thumbHeight + "px"
      }).injectInside(element), {duration: 200}).start({
       'opacity': this.options.thumbIdleOpacity
      });
     currentImg.element.addEvents({
      'mouseover': function (myself) {
       myself.cancel();
       myself.start({'opacity': 0.99});
       if (this.options.showCarouselLabel)
        $(this.carouselLabel).set('html', '<span class="number">' + (myself.relatedImage.number + 1) + "/" + this.maxIter + ":</span> " + myself.relatedImage.title);
      }.pass(currentImg, this),
      'mouseout': function (myself) {
       myself.cancel();
       myself.start({'opacity': this.options.thumbIdleOpacity});
      }.pass(currentImg, this),
      'click': function (myself) {
       this.goTo(myself.relatedImage.number);
       if (this.options.thumbCloseCarousel&&(!this.options.useExternalCarousel))
        this.hideCarousel();
      }.pass(currentImg, this)
     });
    
     currentImg.relatedImage = this.galleryData[i];
     this.thumbnailElements[parseInt(i)] = currentImg;
    }
    },
    log: function(value) {
    if(console.log)
     console.log(value);
    },
    preloadThumbnails: function() {
    var thumbnails = [];
    for(i=0;i<this.galleryData.length;i++)
    {
     thumbnails[parseInt(i)] = this.galleryData[i].thumbnail;
    }
    this.thumbnailPreloader = new Preloader();
    if (!this.options.useExternalCarousel)
     this.thumbnailPreloader.addEvent('onComplete', function() {
      var textShowCarousel = formatString(this.options.textShowCarousel, this.currentIter+1, this.maxIter);
      this.carouselBtn.set('html', textShowCarousel).setProperty('title', textShowCarousel);
     }.bind(this));
    this.thumbnailPreloader.load(thumbnails);
    },
    clearThumbnailsHighlights: function()
    {
    for(i=0;i<this.galleryData.length;i++)
    {
     this.thumbnailElements[i].cancel();
     this.thumbnailElements[i].start(0.2);
    }
    },
    changeThumbnailsSize: function(width, height)
    {
    for(i=0;i<this.galleryData.length;i++)
    {
     this.thumbnailElements[i].cancel();
     this.thumbnailElements[i].element.setStyles({
      'width': width + "px",
      'height': height + "px"
     });
    }
    },
    centerCarouselOn: function(num) {
    if (!this.carouselWallMode)
    {
     var carouselElement = this.thumbnailElements[num];
     var position = carouselElement.element.offsetLeft + (carouselElement.element.offsetWidth / 2);
     var carouselWidth = this.carouselWrapper.element.offsetWidth;
     var carouselInnerWidth = this.carouselInner.offsetWidth;
     var diffWidth = carouselWidth / 2;
     var scrollPos = position-diffWidth;
     this.carouselWrapper.elementScroller.start(scrollPos,0);
    }
    },
    initInfoSlideshow: function() {
    /*if (this.slideInfoZone.element)
     this.slideInfoZone.element.remove();*/
    this.slideInfoZone = new Fx.Morph(new Element('div').addClass('slideInfoZone').injectInside($(this.galleryElement))).set({'opacity':0});
    var slideInfoZoneTitle = new Element('h2').injectInside(this.slideInfoZone.element);
    var slideInfoZoneDescription = new Element('p').injectInside(this.slideInfoZone.element);
    this.slideInfoZone.normalHeight = this.slideInfoZone.element.offsetHeight;
    this.slideInfoZone.element.setStyle('opacity',0);
    },
    changeInfoSlideShow: function()
    {
    this.hideInfoSlideShow.delay(10, this);
    this.showInfoSlideShow.delay(500, this);
    },
    showInfoSlideShow: function() {
    this.fireEvent('onShowInfopane');
    this.slideInfoZone.cancel();
    element = this.slideInfoZone.element;
    element.getElement('h2').set('html', this.galleryData[this.currentIter].title);
    element.getElement('p').set('html', this.galleryData[this.currentIter].description);
    if(this.options.slideInfoZoneSlide)
     this.slideInfoZone.start({'opacity': [0, this.options.slideInfoZoneOpacity], 'height': [0, this.slideInfoZone.normalHeight]});
    else
     this.slideInfoZone.start({'opacity': [0, this.options.slideInfoZoneOpacity]});
    if (this.options.showCarousel)
     this.slideInfoZone.chain(this.centerCarouselOn.pass(this.currentIter, this));
    return this.slideInfoZone;
    },
    hideInfoSlideShow: function() {
    this.fireEvent('onHideInfopane');
    this.slideInfoZone.cancel();
    if(this.options.slideInfoZoneSlide)
     this.slideInfoZone.start({'opacity': 0, 'height': 0});
    else
     this.slideInfoZone.start({'opacity': 0});
    return this.slideInfoZone;
    },
    makeLink: function(num) {
    this.currentLink.setProperties({
     href: this.galleryData[num].link,
     title: this.galleryData[num].linkTitle
    })
    if (!((this.options.embedLinks) && (!this.options.showArrows) && (!this.options.showCarousel)))
     this.currentLink.setStyle('display', 'block');
    },
    clearLink: function() {
    this.currentLink.setProperties({href: '', title: ''});
    if (!((this.options.embedLinks) && (!this.options.showArrows) && (!this.options.showCarousel)))
     this.currentLink.setStyle('display', 'none');
    },
    makeReMooz: function() {
    this.currentLink.setProperties({
     href: '#'
    });
    this.currentLink.setStyles({
     'display': 'block'
    });
    
    this.galleryElements[this.currentIter].element.set('title', this.galleryData[this.currentIter].title + ' :: ' + this.galleryData[this.currentIter].description);
    this.ReMooz = new ReMooz(this.galleryElements[this.currentIter].element, {
     link: this.galleryData[this.currentIter].link,
     shadow: false,
     dragging: false,
     addClick: false,
     resizeOpacity: 1
    });
    var img = this.galleryElements[this.currentIter];
    var coords = img.element.getCoordinates();
    delete coords.right;
    delete coords.bottom;
    
    widthDiff = coords.width - img.width;
    heightDiff = coords.height - img.height;
    
    coords.width = img.width;
    coords.height = img.height;
    
    coords.left += Math.ceil(widthDiff/2)+1;
    coords.top += Math.ceil(heightDiff/2)+1;
    
    this.ReMooz.getOriginCoordinates = function(coords) {
     return coords;
    }.bind(this, coords);
    this.currentLink.onclick = function () {
     this.ReMooz.open.bind(this.ReMooz)();
     return false;
    }.bind(this);
    },
    /* To change the gallery data, those two functions : */
    flushGallery: function() {
    this.galleryElements.each(function(myFx) {
     myFx.element.dispose();
     myFx = myFx.element = null;
    });
    this.galleryElements = [];
    },
    changeData: function(data) {
    this.galleryData = data;
    this.clearTimer();
    this.flushGallery();
    if (this.options.showCarousel) this.flushCarousel();
    this.constructElements();
    if (this.options.showCarousel) this.fillCarousel();
    if (this.options.showInfopane) this.hideInfoSlideShow();
    this.galleryInit=1;
    this.lastIter=0;
    this.currentIter=0;
    this.doSlideShow(1);
    },
    /* Plugins: HistoryManager */
    initHistory: function() {
    this.fireEvent('onHistoryInit');
    this.historyKey = this.galleryElement.id + '-picture';
    if (this.options.customHistoryKey)
     this.historyKey = this.options.customHistoryKey;
    
    this.history = new History.Route({
     defaults: [1],
     pattern: this.historyKey + '\\((\\d+)\\)',
     generate: function(values) {
      return [this.historyKey, '(', values[0], ')'].join('')
     }.bind(this),
     onMatch: function(values, defaults) {
      if (parseInt(values[0])-1 < this.maxIter)
       this.goTo(parseInt(values[0])-1);
     }.bind(this)
    });
    this.addEvent('onChanged', function(){
     this.history.setValue(0, this.currentIter+1);
     this.history.defaults=[this.currentIter+1];
    }.bind(this));
    this.fireEvent('onHistoryInited');
    }
    };
    gallery = new Class(gallery);
    
    gallery.Transitions = new Hash ({
    fade: function(oldFx, newFx, oldPos, newPos){
    oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear;
    oldFx.options.duration = newFx.options.duration = this.options.fadeDuration;
    if (newPos > oldPos) newFx.start({opacity: 1});
    else
    {
     newFx.set({opacity: 1});
     oldFx.start({opacity: 0});
    }
    },
    crossfade: function(oldFx, newFx, oldPos, newPos){
    oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear;
    oldFx.options.duration = newFx.options.duration = this.options.fadeDuration;
    newFx.start({opacity: 1});
    oldFx.start({opacity: 0});
    },
    fadebg: function(oldFx, newFx, oldPos, newPos){
    oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear;
    oldFx.options.duration = newFx.options.duration = this.options.fadeDuration / 2;
    oldFx.start({opacity: 0}).chain(newFx.start.pass([{opacity: 1}], newFx));
    }
    });
    
    /* All code copyright 2007 Jonathan Schemoul */
    
    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    * Follows: Preloader (class)
    * Simple class for preloading images with support for progress reporting
    * Copyright 2007 Tomocchino.
    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    
    var Preloader = new Class({
    
    Implements: [Events, Options],
    
    options: {
    root        : '',
    period      : 100
    },
    
    initialize: function(options){
    this.setOptions(options);
    },
    
    load: function(sources) {
    this.index = 0;
    this.images = [];
    this.sources = this.temps = sources;
    this.total = this. sources.length;
    
    this.fireEvent('onStart', [this.index, this.total]);
    this.timer = this.progress.periodical(this.options.period, this);
    
    this.sources.each(function(source, index){
    this.images[index] = new Asset.image(this.options.root + source, {
    'onload'  : function(){ this.index++; if(this.images[index]) this.fireEvent('onLoad', [this.images[index], index, source]); }.bind(this),
    'onerror' : function(){ this.index++; this.fireEvent('onError', [this.images.splice(index, 1), index, source]); }.bind(this),
    'onabort' : function(){ this.index++; this.fireEvent('onError', [this.images.splice(index, 1), index, source]); }.bind(this)
    });
    }, this);
    },
    
    progress: function() {
    this.fireEvent('onProgress', [Math.min(this.index, this.total), this.total]);
    if(this.index >= this.total) this.complete();
    },
    
    complete: function(){
    $clear(this.timer);
    this.fireEvent('onComplete', [this.images]);
    },
    
    cancel: function(){
    $clear(this.timer);
    }
    
    });
    
    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    * Follows: formatString (function)
    * Original name: Yahoo.Tools.printf
    * Copyright Yahoo.
    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    
    function formatString() {
    var num = arguments.length;
    var oStr = arguments[0];
    for (var i = 1; i < num; i++) {
    var pattern = "\\{" + (i-1) + "\\}";
    var re = new RegExp(pattern, "g");
    oStr = oStr.replace(re, arguments[i]);
    }
    return oStr;
    }
    
    //]]>
    </script>
    
    <style type='text/css'>
    #myGallery, #myGallerySet {width: 515px;height: 250px;z-index:0;}
    
    .jdGallery a{outline:0;}
    
    .jdGallery{overflow: hidden;position: relative;}
    
    .jdGallery img{border: 0;margin: 0;}
    
    .jdGallery .slideElement
    {width: 100%;height: 100%;background-color: #000;background-repeat: no-repeat;background-position: center center;background-image:url('');}
    
    .jdGallery .slideInfoZone
    {position: absolute;z-index: 10;width: 100%;margin: 0px;left: 0;bottom: 0;height: 90px;background: #363636;color: #fff;text-indent: 0;overflow: hidden;}
    
    * html .jdGallery .slideInfoZone{bottom: -1px;}
    
    .jdGallery .slideInfoZone h2
    {padding: 0;font-size: 14px;text-decoration:none;margin: 0;margin: 2px 5px;font-weight: bold;color: #ff9000 !important;}
    
    .jdGallery .slideInfoZone h2 a
    {padding: 0;font-size: 14px;text-decoration:none;margin: 0;font-weight: bold;color: #ff9000 !important;}
    
    .jdGallery .slideInfoZone p
    {padding: 0;font-size: 12px;margin: 2px 5px;color: #eee;}
    
    </style>
    


    NOTE : You can DOWNLOAD and HOST mootools-1.2.1-core-yc.js yourself.And also you can change width and height of this slider easily (Default width:515px and height:250px;).

    4.Now save your template.

    5.Go to Layout --> Page Elements.

    6.Click on 'Add a Gadget'.

    7.Select 'HTML/Javascript' and add the code given below and click save.

    <script type="text/javascript">
    function startGallery() {
       var myGallery = new gallery($('myGallery'), {
               timed: true,
               delay: 5000,
               slideInfoZoneOpacity: 0.8,
               showCarousel: false
       });
    }
    window.addEvent('domready', startGallery);
    </script>
    
    
    <div id="myGallery">
    
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-1-LINK-HERE">THIS-IS-FEATURED-POST-1-TITLE</a></h3>
    <p>FEATURED-POST-1-DESCRIPTION</p>
    <a href="#" class="open"></a>
    <img src="FEATURED-POST-1-IMAGE-ADDRESS" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-LINK-2-HERE">THIS-IS-FEATURED-POST-2-TITLE</a></h3>
    <p>FEATURED-POST-2-DESCRIPTION</p>
    <a href="#" class="open"></a>
    <img src="FEATURED-POST-2-IMAGE-ADDRESS" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-3-LINK-HERE">THIS-IS-FEATURED-POST-3-TITLE</a></h3>
    <p>FEATURED-POST-3-DESCRIPTION</p>
    <a href="#" class="open"></a>
    <img src="FEATURED-POST-3-IMAGE-ADDRESS" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-4-LINK-HERE">THIS-IS-FEATURED-POST-4-TITLE</a></h3>
    <p>FEATURED-POST-4-DESCRIPTION</p>
    <a href="#" class="open"></a>
    <img src="FEATURED-POST-4-IMAGE-ADDRESS" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-5-LINK-HERE">THIS-IS-FEATURED-POST-5-TITLE</a></h3>
    <p>FEATURED-POST-5-DESCRIPTION</p>
    <a href="#" class="open"></a>
    <img src="FEATURED-POST-5-IMAGE-ADDRESS" class="full" alt="" />
    </div>
    
    </div>
    
    Change 5000 to change your slider speed.

    NOTE : Remember to replace ,

    ENTER-YOUR-POST-X-LINK-HEREs with your real post links.

    THIS-IS-FEATURED-POST-X-TITLEs with your real post titles.

    FEATURED-POST-X-DESCRIPTIONs with your post descriptions.

    FEATURED-POST-X-IMAGE-ADDRESSs with your real image addresses.

    Look at the example below.

    <script type="text/javascript">
    function startGallery() {
        var myGallery = new gallery($('myGallery'), {
                timed: true,
                delay: 5000,
                slideInfoZoneOpacity: 0.8,
                showCarousel: false
        });
    }
    window.addEvent('domready', startGallery);
    </script>
    
    
    <div id="myGallery">
    
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-LINK-HERE">This is featured post 1 title</a></h3>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et...</p>
    <a href="#" title="This is featured post 1" class="open"></a>
    <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbgPap2nnwPFAgfpAe8Vcz-Ss9y1o17cwk-rF0ReUUFLdUFtybKwQHcIg5KGZpDn_YB_66VfogrJK1oZT9rk8CJPxd-jJX8Pm7ssNDT9UEyC8xmSdyxE8bh-l4KtOYCRkfhIGm5uwFDIQ/" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-LINK-HERE">This is featured post 2 title</a></h3>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et...</p>
    <a href="#" title="This is featured post 2" class="open"></a>
    <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEDspLvDobTXVzf2DQfqsQCpsCkfmTBOPba2tYyR4eTlO4bMk48N6oSIk01Qzhn2SRy0Kv6Krmhm4TA91-Y83dDir-ZHAGDFMO-qX4BwuIXWQ7iLHSEJmeqTSNY_j3qKwsbNWkZtfjDPo/" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-LINK-HERE">This is featured post 3 title</a></h3>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et...</p>
    <a href="#" title="This is featured post 3" class="open"></a>
    <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX25EVvjUo5PdbT7F6WyrZq_Af5Etn2YyXOTmO-BmJIHyXzOh0Nvf1Mi-JFxaH-KmqOpKI5gB-DHP3YLfEyTifd6MCzDQcaN-5RVY0fqS-9Suw3rSscf6nhFtsmSt5XWaobFa0RecbsHw/" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-LINK-HERE">This is featured post 4 title</a></h3>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et...</p>
    <a href="#" title="This is featured post 4" class="open"></a>
    <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihael094hs84AQTh5UyKV48HKmI7dlgxBEeVOsrH-2505AgJexA1ZaWoVSrh0tKVGnJUPugKMxab2GAH696NKe0WgnRYGq0t5CCl5yNY0ErTgrVrE-4yHpkDN7pq3pf28c9inzyQK79KU/" class="full" alt="" />
    </div>
    
    <div class="imageElement">
    <h3><a href="ENTER-YOUR-POST-LINK-HERE">This is featured post 5 title</a></h3>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et...</p>
    <a href="#" title="This is featured post 5" class="open"></a>
    <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdFouAQqLCugl3ALC5xHSSoQMemiEl8nwbl99TAyL_Dq-3fmmXwhcYnR3CNTXbCRHNcPwvQ1BjRjDx5D_kqI7k2YJwC94esmGBrjCT0dqDfX_zVPEVGUkztAXYkewlmadkHAiWheEsLyw/" class="full" alt="" />
    </div>
    
    </div>
    


    You are done.

    Posted on : | By : Er. Ankita Dhiman | In :

    3

    This tutorials will show you how to add a Flickr photostream to your blogger blog.If you like to add this widget to your blogger blog,then follow the steps given below.



    1.First login to your Flickr account.

    2.Now click on "Your Photostream".



    3.Now you are in the your flickr Photostream page.



    4.Look at the address of the address bar of your browser.It will look like this:



    5.Now can see your Flickr ID.It will be something like this:

    38647261@N03

    6.Now copy your Flickr ID.

    7.Login to your blogger dashboard-->Layout > Page Elements

    8.Click on 'Add a Gadget'.

    9.Select 'HTML/Javascript' and add the code given below and click save.

    <style type="text/css">
    .flickr_badge_image { float: left; }
    #flickr_badge_wrapper { width: auto; border: 1px; }
    #flickr_badge_uber_wrapper { width: auto; }
    </style>
    
    <script src="http://www.flickr.com/badge_code_v2.gne?show_name=1&count=8&display=random&size=s&layout=y&source=user&user=YOUR-FLICKR-ID" type="text/javascript"></script>


    Note : Replace YOUR-FLICKR-ID with your Flickr ID.

    Please Comment how It Works.

    Posted on : | By : Er. Ankita Dhiman | In :

    0

    1.Login to your blogger dashboard--> layout- -> Edit HTML

    2.Scroll down to where you see </head> tag .

    3.Copy below code and paste it just before the </head> tag .

    <style type='text/css'>
    /*colorpicker*/
    .ui-colorpicker {
    width: 356px;
    height: 176px;
    overflow: hidden;
    position: absolute;
    background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgQHxhWi_hdfbLh71-v71b4gY9REuyex43PmtN4pOw_gnTA9iNc_SigfSRlh3qe7fKHAYInCcGmcptE6_hmoHemHd0eZtrVx8I-awIzRlPpBj1ONgUVsvLkoxlmaQpgFnUjJnpivYeOxB/);
    font-family: Arial, Helvetica, sans-serif;
    display: none;
    }
    .ui-colorpicker-color {
    width: 150px;
    height: 150px;
    left: 14px;
    top: 13px;
    position: absolute;
    background: #f00;
    overflow: hidden;
    cursor: crosshair;
    }
    .ui-colorpicker-color div {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisRdikUAP33dv7AZPSlQAKJGxXhKW-5ef9j0igEaoknOUvYT8ojX5vY_PTpSaggMEPITWTVOey_wZYLYC-20NoadOXglyzkaeVRVBOtUns8L5V5OrJF_iYJae35zaWzUbb6vrszUzXEYKC/);
    }
    .ui-colorpicker-color div div {
    position: absolute;
    top: 0;
    left: 0;
    width: 11px;
    height: 11px;
    overflow: hidden;
    background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs1u0X3h05H6pOv7P2NmTQbFBOFj4dwVlRQHlAmFt6qw2fiGIakLZN9K4Bzg8afZjbF6BZhp3f3tT4ZRNl_YmF10uZA3VJjSPPBnTUqYPq-uCwj9Qz-CYity9K2jFPSdPDzLQihK8f9eQ4/);
    margin: -5px 0 0 -5px;
    }
    .ui-colorpicker-hue {
    position: absolute;
    top: 13px;
    left: 171px;
    width: 35px;
    height: 150px;
    cursor: n-resize;
    }
    .ui-colorpicker-hue div {
    position: absolute;
    width: 35px;
    height: 9px;
    overflow: hidden;
    background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMK_c6K4h7r9l4L2ZwnyjoWaJlSVdV4MATiK88ly-C05j9gwW3rMFzssn3J2kNocTtmek06gXshO5XOrYLL3HpfBraB4N7MlrOAdpJNtpOSsuEeGzvbkwTJZ3IqbJk19qwhXpbWrwVNXzl/) left top;
    margin: -4px 0 0 0;
    left: 0px;
    }
    .ui-colorpicker-new-color {
    position: absolute;
    width: 60px;
    height: 30px;
    left: 213px;
    top: 13px;
    background: #f00;
    }
    .ui-colorpicker-current-color {
    position: absolute;
    width: 60px;
    height: 30px;
    left: 283px;
    top: 13px;
    background: #f00;
    }
    .colorpicker input {
    background-color: transparent;
    border: 1px solid transparent;
    position: absolute;
    font-size: 10px;
    font-family: Arial, Helvetica, sans-serif;
    color: #898989;
    top: 4px;
    right: 11px;
    text-align: right;
    margin: 0;
    padding: 0;
    height: 11px;
    }
    .ui-colorpicker-hex {
    position: absolute;
    width: 72px;
    height: 22px;
    background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0ssWHKDD1BpYOFjaSTX4tGiGYLgAOqarSfBi7uSljcA4nRiG0lUg60gznUHT5KRidhd3WnPqfULfqkfkqEH4DrHLuMFeEZUaOD9ZYtwF29mgMTIJEooK2COqEEBol9Pls8V-jAUxOcXYq/) top;
    left: 212px;
    top: 142px;
    }
    .ui-colorpicker input {
    height: 15px;
    }
    .ui-colorpicker-hex input {
    margin-left: 18px;
    right: 6px;
    width: 47px;
    }
    .ui-colorpicker-field {
    height: 22px;
    width: 62px;
    background-position: top;
    position: absolute;
    }
    .ui-colorpicker-field label {
    padding-left: 17px;
    font-size: 10px;
    }
    .ui-colorpicker-field input {
    width: 25px;
    }
    .ui-colorpicker-field span {
    position: absolute;
    width: 12px;
    height: 22px;
    overflow: hidden;
    top: 0;
    right: 0;
    cursor: n-resize;
    }
    .ui-colorpicker-rgb-r {
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlObuUK1VZBeTaj8SCVkzjMymR0MQEOop89fw-7kleTWrXtZoaBx-bVhailJFuulHFP0Q_qV5jtYuioOO03CmpfTtCkivWFkuAAnmHLE4ncnqplZD6thM-T2hG6f-xkm9TbobDc7PMZkwQ/);
    top: 52px;
    left: 212px;
    }
    .ui-colorpicker-rgb-g {
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji9xCkdcuWfjfKlt70ba4-43JjNZONxy_TpgdgACeIYG_4hoFDRkkSeVKORS2d7cMOb8LNP7cLOEqUBlRsOptOPmqZHsIppUfeJfNKyng8dWr15WMoEZJwmQpdh98yx3Go_bjS-weEmJOK/);
    top: 82px;
    left: 212px;
    }
    .ui-colorpicker-rgb-b {
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7GebAXA2jIIZe1jsTDfNIT49YJkSeyTa6znHZl540StpnbkIy8owNs3G9e3dc5sEnHU-EyVcG5GcT-uFK9CvThLk70DJAxTilHR7Zd4TdxP38hyphenhyphenkylXhQVp-ZcWJk31v81L4tqL_uXAVo/);
    top: 112px;
    left: 212px;
    }
    .ui-colorpicker-hsb-h {
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHEbAy-lNCwTFdivXh9E4utq-ZdMTpLkzCTEm6p5U5-bYQmRWhBVMQ1YGkwlzNuaZV71obGcs72uSIKoPw44VvBorgcgdxdn4pb1qr6ekHiWYgWcBiu1LMFUFtv2PbC6mo6T5ZWK5HnctN/);
    top: 52px;
    left: 282px;
    }
    .ui-colorpicker-hsb-s {
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim81vkCLbVnZ5YukWbyLlwTGSpGJEAEdFwL4N46FoHBGGS1DQDnqzVGdNsdT5LaXXvEel4ns48250gtELv5dbKTSANxWJyPyf0tCPLd-VINwy-VEHQGwVOjb9BnE55Xq98Q912pkXwX09b/);
    top: 82px;
    left: 282px;
    }
    .ui-colorpicker-hsb-b {
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5e9thut_x_GPS2GawuZqKgfkssuX8Z3hCNTG69LC8o-QeqlP-1-aR-7syYNAcOis9R_-8DzMGEQi1nZdga6nBeYK6spYF_T6tAz8rx_b-gfEfBsmGnkRq9ZO3TsvzdgMEgSZQW16zJ3Cg/);
    top: 112px;
    left: 282px;
    }
    .ui-colorpicker-submit {
    position: absolute;
    left: 296px;
    top: 144px;
    overflow: hidden;
    }
    .ui-colorpicker-focus {
    background-position: center;
    }
    .ui-colorpicker-hex.ui-colorpicker-focus {
    background-position: bottom;
    }
    .ui-colorpicker-submit.ui-colorpicker-focus {
    background-position: bottom;
    }
    .ui-colorpicker-slider {
    background-position: bottom;
    }
    </style>
    <style type='text/css'>
    #bg fieldset { border-width: 1px; width: 460px; }
    #bg .fields { padding: 25px; margin-bottom: 20px; }
    #bg div { clear: both; }
    #bg label { float: left; width: 85px; }
    #bg input { float: left; width: 190px; }
    .ui-colorpicker input { float: none; width: auto; height: auto; }
    #bg .submit { margin-top: 40px; text-align: center; }
    </style>
    
    <script type='text/javascript'>
    
    //<![CDATA[
    
    /*
    * jQuery 1.2.6 - New Wave Javascript
    *
    * Copyright (c) 2008 John Resig (jquery.com)
    * Dual licensed under the MIT (MIT-LICENSE.txt)
    * and GPL (GPL-LICENSE.txt) licenses.
    *
    * $Date: 2008-08-16 15:27:05 -0400 (Sat, 16 Aug 2008) $
    * $Rev: 2 $
    */
    (function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
    return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
    return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
    selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
    return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
    this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
    return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
    jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
    script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
    for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
    for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
    jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
    ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
    while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
    while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
    for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
    jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
    xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
    jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
    for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
    s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
    e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
    
    //]]>
    
    </script>
    
    <script type='text/javascript'>
    
    //<![CDATA[
    
    ;(function($){var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments);};function isVisible(element){function checkStyles(element){var style=element.style;return(style.display!='none'&&style.visibility!='hidden');}
    var visible=checkStyles(element);(visible&&$.each($.dir(element,'parentNode'),function(){return(visible=checkStyles(this));}));return visible;}
    $.extend($.expr[':'],{data:function(a,i,m){return $.data(a,m[3]);},tabbable:function(a,i,m){var nodeName=a.nodeName.toLowerCase();return(a.tabIndex>=0&&(('a'==nodeName&&a.href)||(/input|select|textarea|button/.test(nodeName)&&'hidden'!=a.type&&!a.disabled))&&isVisible(a));}});$.keyCode={BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38};function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
    var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
    return($.inArray(method,methods)!=-1);}
    $.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
    if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
    return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options)));(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self._setData(key,value);}).bind('getData.'+name,function(e,key){return self._getData(key);}).bind('remove',function(){return self.destroy();});this._init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName);},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
    options={};options[key]=value;}
    $.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,e,data){var eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);e=e||$.event.fix({type:eventName,target:this.element[0]});return this.element.triggerHandler(eventName,[e,data],this.options[type]);}};$.widget.defaults={disabled:false};$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
    for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
    var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
    return $.ui.cssCache[name];},disableSelection:function(el){return $(el).attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},enableSelection:function(el){return $(el).attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},hasScroll:function(e,a){if($(e).css('overflow')=='hidden'){return false;}
    var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(e[scroll]>0){return true;}
    e[scroll]=1;has=(e[scroll]>0);e[scroll]=0;return has;}};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self._mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
    this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(e){(this._mouseStarted&&this._mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(e)){return true;}
    this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
    if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
    this._mouseMoveDelegate=function(e){return self._mouseMove(e);};this._mouseUpDelegate=function(e){return self._mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},_mouseMove:function(e){if($.browser.msie&&!e.button){return this._mouseUp(e);}
    if(this._mouseStarted){this._mouseDrag(e);return false;}
    if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this._mouseDrag(e):this._mouseUp(e));}
    return!this._mouseStarted;},_mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._mouseStop(e);}
    return false;},_mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},_mouseDelayMet:function(e){return this.mouseDelayMet;},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.colorpicker",{_init:function(){this.charMin=65;var o=this.options,self=this,tpl='<div class="ui-colorpicker clearfix"><div class="ui-colorpicker-color"><div><div></div></div></div><div class="ui-colorpicker-hue"><div></div></div><div class="ui-colorpicker-new-color"></div><div class="ui-colorpicker-current-color"></div><div class="ui-colorpicker-hex"><label for="ui-colorpicker-hex" title="hex"></label><input type="text" maxlength="6" size="6" /></div><div class="ui-colorpicker-rgb-r ui-colorpicker-field"><label for="ui-colorpicker-rgb-r"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-rgb-g ui-colorpicker-field"><label for="ui-colorpicker-rgb-g"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-rgb-b ui-colorpicker-field"><label for="ui-colorpicker-rgb-b"</label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-hsb-h ui-colorpicker-field"><label for="ui-colorpicker-hsb-h"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-hsb-s ui-colorpicker-field"><label for="ui-colorpicker-hsb-s"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-hsb-b ui-colorpicker-field"><label for="ui-colorpicker-hsb-b"></label><input type="text" maxlength="3" size="2" /><span></span></div><button class="ui-colorpicker-submit ui-default-state" name="submit" type="button">Done</button></div>';if(typeof o.color=='string'){this.color=this._HexToHSB(o.color);}else if(o.color.r!=undefined&&o.color.g!=undefined&&o.color.b!=undefined){this.color=this._RGBToHSB(o.color);}else if(o.color.h!=undefined&&o.color.s!=undefined&&o.color.b!=undefined){this.color=this._fixHSB(o.color);}else{return this;}
    this.origColor=this.color;this.picker=$(tpl);if(o.flat){this.picker.appendTo(this.element).show();}else{this.picker.appendTo(document.body);}
    this.fields=this.picker.find('input').bind('keydown',function(e){return self._keyDown.call(self,e);}).bind('change',function(e){return self._change.call(self,e);}).bind('blur',function(e){return self._blur.call(self,e);}).bind('focus',function(e){return self._focus.call(self,e);});this.picker.find('span').bind('mousedown',function(e){return self._downIncrement.call(self,e);});this.selector=this.picker.find('div.ui-colorpicker-color').bind('mousedown',function(e){return self._downSelector.call(self,e);});this.selectorIndic=this.selector.find('div div');this.hue=this.picker.find('div.ui-colorpicker-hue div');this.picker.find('div.ui-colorpicker-hue').bind('mousedown',function(e){return self._downHue.call(self,e);});this.newColor=this.picker.find('div.ui-colorpicker-new-color');this.currentColor=this.picker.find('div.ui-colorpicker-current-color');this.picker.find('.ui-colorpicker-submit').bind('mouseenter',function(e){return self._enterSubmit.call(self,e);}).bind('mouseleave',function(e){return self._leaveSubmit.call(self,e);}).bind('click',function(e){return self._clickSubmit.call(self,e);});this._fillRGBFields(this.color);this._fillHSBFields(this.color);this._fillHexFields(this.color);this._setHue(this.color);this._setSelector(this.color);this._setCurrentColor(this.color);this._setNewColor(this.color);if(o.flat){this.picker.css({position:'relative',display:'block'});}else{$(this.element).bind(o.eventName+".colorpicker",function(e){return self._show.call(self,e);});}},destroy:function(){this.picker.remove();this.element.removeData("colorpicker").unbind(".colorpicker");},_fillRGBFields:function(hsb){var rgb=this._HSBToRGB(hsb);this.fields.eq(1).val(rgb.r).end().eq(2).val(rgb.g).end().eq(3).val(rgb.b).end();},_fillHSBFields:function(hsb){this.fields.eq(4).val(hsb.h).end().eq(5).val(hsb.s).end().eq(6).val(hsb.b).end();},_fillHexFields:function(hsb){this.fields.eq(0).val(this._HSBToHex(hsb)).end();},_setSelector:function(hsb){this.selector.css('backgroundColor','#'+this._HSBToHex({h:hsb.h,s:100,b:100}));this.selectorIndic.css({left:parseInt(150*hsb.s/100,10),top:parseInt(150*(100-hsb.b)/100,10)});},_setHue:function(hsb){this.hue.css('top',parseInt(150-150*hsb.h/360,10));},_setCurrentColor:function(hsb){this.currentColor.css('backgroundColor','#'+this._HSBToHex(hsb));},_setNewColor:function(hsb){this.newColor.css('backgroundColor','#'+this._HSBToHex(hsb));},_keyDown:function(e){var pressedKey=e.charCode||e.keyCode||-1;if((pressedKey>=this.charMin&&pressedKey<=90)||pressedKey==32){return false;}},_change:function(e,target){var col;target=target||e.target;if(target.parentNode.className.indexOf('-hex')>0){this.color=col=this._HexToHSB(this.value);this._fillRGBFields(col.color);this._fillHSBFields(col);}else if(target.parentNode.className.indexOf('-hsb')>0){this.color=col=this._fixHSB({h:parseInt(this.fields.eq(4).val(),10),s:parseInt(this.fields.eq(5).val(),10),b:parseInt(this.fields.eq(6).val(),10)});this._fillRGBFields(col);this._fillHexFields(col);}else{this.color=col=this._RGBToHSB(this._fixRGB({r:parseInt(this.fields.eq(1).val(),10),g:parseInt(this.fields.eq(2).val(),10),b:parseInt(this.fields.eq(3).val(),10)}));this._fillHexFields(col);this._fillHSBFields(col);}
    this._setSelector(col);this._setHue(col);this._setNewColor(col);this._trigger('change',e,{options:this.options,hsb:col,hex:this._HSBToHex(col),rgb:this._HSBToRGB(col)});},_blur:function(e){var col=this.color;this._fillRGBFields(col);this._fillHSBFields(col);this._fillHexFields(col);this._setHue(col);this._setSelector(col);this._setNewColor(col);this.fields.parent().removeClass('ui-colorpicker-focus');},_focus:function(e){this.charMin=e.target.parentNode.className.indexOf('-hex')>0?70:65;this.fields.parent().removeClass('ui-colorpicker-focus');$(e.target.parentNode).addClass('ui-colorpicker-focus');},_downIncrement:function(e){var field=$(e.target).parent().find('input').focus(),self=this;this.currentIncrement={el:$(e.target).parent().addClass('ui-colorpicker-slider'),max:e.target.parentNode.className.indexOf('-hsb-h')>0?360:(e.target.parentNode.className.indexOf('-hsb')>0?100:255),y:e.pageY,field:field,val:parseInt(field.val(),10)};$(document).bind('mouseup.cpSlider',function(e){return self._upIncrement.call(self,e);});$(document).bind('mousemove.cpSlider',function(e){return self._moveIncrement.call(self,e);});return false;},_moveIncrement:function(e){this.currentIncrement.field.val(Math.max(0,Math.min(this.currentIncrement.max,parseInt(this.currentIncrement.val+e.pageY-this.currentIncrement.y,10))));this._change.apply(this,[e,this.currentIncrement.field.get(0)]);return false;},_upIncrement:function(e){this.currentIncrement.el.removeClass('ui-colorpicker-slider').find('input').focus();this._change.apply(this,[e,this.currentIncrement.field.get(0)]);$(document).unbind('mouseup.cpSlider');$(document).unbind('mousemove.cpSlider');return false;},_downHue:function(e){this.currentHue={y:this.picker.find('div.ui-colorpicker-hue').offset().top};this._change.apply(this,[e,this.fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(e.pageY-this.currentHue.y))))/150,10)).get(0)]);var self=this;$(document).bind('mouseup.cpSlider',function(e){return self._upHue.call(self,e);});$(document).bind('mousemove.cpSlider',function(e){return self._moveHue.call(self,e);});return false;},_moveHue:function(e){this._change.apply(this,[e,this.fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(e.pageY-this.currentHue.y))))/150,10)).get(0)]);return false;},_upHue:function(e){$(document).unbind('mouseup.cpSlider');$(document).unbind('mousemove.cpSlider');return false;},_downSelector:function(e){var self=this;this.currentSelector={pos:this.picker.find('div.ui-colorpicker-color').offset()};this._change.apply(this,[e,this.fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(e.pageY-this.currentSelector.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(e.pageX-this.currentSelector.pos.left))))/150,10)).get(0)]);$(document).bind('mouseup.cpSlider',function(e){return self._upSelector.call(self,e);});$(document).bind('mousemove.cpSlider',function(e){return self._moveSelector.call(self,e);});return false;},_moveSelector:function(e){this._change.apply(this,[e,this.fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(e.pageY-this.currentSelector.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(e.pageX-this.currentSelector.pos.left))))/150,10)).get(0)]);return false;},_upSelector:function(e){$(document).unbind('mouseup.cpSlider');$(document).unbind('mousemove.cpSlider');return false;},_enterSubmit:function(e){this.picker.find('.ui-colorpicker-submit').addClass('ui-colorpicker-focus');},_leaveSubmit:function(e){this.picker.find('.ui-colorpicker-submit').removeClass('ui-colorpicker-focus');},_clickSubmit:function(e){var col=this.color;this.origColor=col;this._setCurrentColor(col);this._trigger("submit",e,{options:this.options,hsb:col,hex:this._HSBToHex(col),rgb:this._HSBToRGB(col)});return false;},_show:function(e){this._trigger("beforeShow",e,{options:this.options,hsb:this.color,hex:this._HSBToHex(this.color),rgb:this._HSBToRGB(this.color)});var pos=this.element.offset();var viewPort=this._getScroll();var top=pos.top+this.element[0].offsetHeight;var left=pos.left;if(top+176>viewPort.t+Math.min(viewPort.h,viewPort.ih)){top-=this.element[0].offsetHeight+176;}
    if(left+356>viewPort.l+Math.min(viewPort.w,viewPort.iw)){left-=356;}
    this.picker.css({left:left+'px',top:top+'px'});if(this._trigger("show",e,{options:this.options,hsb:this.color,hex:this._HSBToHex(this.color),rgb:this._HSBToRGB(this.color)})!=false){this.picker.show();}
    var self=this;$(document).bind('mousedown.colorpicker',function(e){return self._hide.call(self,e);});return false;},_hide:function(e){if(!this._isChildOf(this.picker[0],e.target,this.picker[0])){if(this._trigger("hide",e,{options:this.options,hsb:this.color,hex:this._HSBToHex(this.color),rgb:this._HSBToRGB(this.color)})!=false){this.picker.hide();}
    $(document).unbind('mousedown.colorpicker');}},_isChildOf:function(parentEl,el,container){if(parentEl==el){return true;}
    if(parentEl.contains&&!$.browser.safari){return parentEl.contains(el);}
    if(parentEl.compareDocumentPosition){return!!(parentEl.compareDocumentPosition(el)&16);}
    var prEl=el.parentNode;while(prEl&&prEl!=container){if(prEl==parentEl)
    return true;prEl=prEl.parentNode;}
    return false;},_getScroll:function(){var t,l,w,h,iw,ih;if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight;}else{t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight;}
    iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;return{t:t,l:l,w:w,h:h,iw:iw,ih:ih};},_fixHSB:function(hsb){return{h:Math.min(360,Math.max(0,hsb.h)),s:Math.min(100,Math.max(0,hsb.s)),b:Math.min(100,Math.max(0,hsb.b))};},_fixRGB:function(rgb){return{r:Math.min(255,Math.max(0,rgb.r)),g:Math.min(255,Math.max(0,rgb.g)),b:Math.min(255,Math.max(0,rgb.b))};},_HexToRGB:function(hex){var hex=parseInt(((hex.indexOf('#')>-1)?hex.substring(1):hex),16);return{r:hex>>16,g:(hex&0x00FF00)>>8,b:(hex&0x0000FF)};},_HexToHSB:function(hex){return this._RGBToHSB(this._HexToRGB(hex));},_RGBToHSB:function(rgb){var hsb={};hsb.b=Math.max(Math.max(rgb.r,rgb.g),rgb.b);hsb.s=(hsb.b<=0)?0:Math.round(100*(hsb.b-Math.min(Math.min(rgb.r,rgb.g),rgb.b))/hsb.b);hsb.b=Math.round((hsb.b/255)*100);if((rgb.r==rgb.g)&&(rgb.g==rgb.b))hsb.h=0;else if(rgb.r>=rgb.g&&rgb.g>=rgb.b)hsb.h=60*(rgb.g-rgb.b)/(rgb.r-rgb.b);else if(rgb.g>=rgb.r&&rgb.r>=rgb.b)hsb.h=60+60*(rgb.g-rgb.r)/(rgb.g-rgb.b);else if(rgb.g>=rgb.b&&rgb.b>=rgb.r)hsb.h=120+60*(rgb.b-rgb.r)/(rgb.g-rgb.r);else if(rgb.b>=rgb.g&&rgb.g>=rgb.r)hsb.h=180+60*(rgb.b-rgb.g)/(rgb.b-rgb.r);else if(rgb.b>=rgb.r&&rgb.r>=rgb.g)hsb.h=240+60*(rgb.r-rgb.g)/(rgb.b-rgb.g);else if(rgb.r>=rgb.b&&rgb.b>=rgb.g)hsb.h=300+60*(rgb.r-rgb.b)/(rgb.r-rgb.g);else hsb.h=0;hsb.h=Math.round(hsb.h);return hsb;},_HSBToRGB:function(hsb){var rgb={};var h=Math.round(hsb.h);var s=Math.round(hsb.s*255/100);var v=Math.round(hsb.b*255/100);if(s==0){rgb.r=rgb.g=rgb.b=v;}else{var t1=v;var t2=(255-s)*v/255;var t3=(t1-t2)*(h%60)/60;if(h==360)h=0;if(h<60){rgb.r=t1;rgb.b=t2;rgb.g=t2+t3;}
    else if(h<120){rgb.g=t1;rgb.b=t2;rgb.r=t1-t3;}
    else if(h<180){rgb.g=t1;rgb.r=t2;rgb.b=t2+t3;}
    else if(h<240){rgb.b=t1;rgb.r=t2;rgb.g=t1-t3;}
    else if(h<300){rgb.b=t1;rgb.g=t2;rgb.r=t2+t3;}
    else if(h<360){rgb.r=t1;rgb.g=t2;rgb.b=t1-t3;}
    else{rgb.r=0;rgb.g=0;rgb.b=0;}}
    return{r:Math.round(rgb.r),g:Math.round(rgb.g),b:Math.round(rgb.b)};},_RGBToHex:function(rgb){var hex=[rgb.r.toString(16),rgb.g.toString(16),rgb.b.toString(16)];$.each(hex,function(nr,val){if(val.length==1){hex[nr]='0'+val;}});return hex.join('');},_HSBToHex:function(hsb){return this._RGBToHex(this._HSBToRGB(hsb));},setColor:function(col){if(typeof col=='string'){col=this._HexToHSB(col);}else if(col.r!=undefined&&col.g!=undefined&&col.b!=undefined){col=this._RGBToHSB(col);}else if(col.h!=undefined&&col.s!=undefined&&col.b!=undefined){col=this._fixHSB(col);}else{return this;}
    this.color=col;this.origColor=col;this._fillRGBFields(col);this._fillHSBFields(col);this._fillHexFields(col);this._setHue(col);this._setSelector(col);this._setCurrentColor(col);this._setNewColor(col);}});$.extend($.ui.colorpicker,{defaults:{eventName:'click',color:'ff0000',flat:false}});})(jQuery);
    
    //]]>
    
    </script>
    
    <script language='JavaScript'>
    
    $(document).ready(function() {
    
    var hideit = function(e, ui) { $(this).val('#'+ui.hex); $('.ui-colorpicker').css('display', 'none'); };
    $('#bg #colorpicker').colorpicker({ hide: hideit, submit: hideit });
    
    $('#dochange').click(function() {
    
    $('body').css('background-color', $('#colorpicker').val());
    
    return false;
    });
    
    });
    
    </script>


    Note : Please Host Images Yourself.

    4.Now go to Layout-->Page Element and click on "Add a gadget".

    5.Select "html/java script" and add the code given below and click save.

    <form id="bg" action="#">
    
    <fieldset>
    <legend>Background Color</legend>
    
    <div class="fields">
    
    <div><label for="colorpicker">Color Picker:</label> <input type="text" id="colorpicker" name="colorpicker"/></div>
    
    <div class="submit">
    <button id="dochange">Change Background</button>
    </div>
    </div>
    </fieldset>
    <br/><br/><br/><br/><br/><br/><br/>
    
    </form>


    You are done.

    jQuery Colour Picker

    Posted on : | By : Er. Ankita Dhiman | In : ,

    0

    Followers