(function(b){var a;b.fn.undoChanges=function(){a.undoChanges()};b.fn.updateChanges=function(){a.updateChanges()};b.fn.setTransition=function(c){a.setTransition(c)};b.fn.setTextEffect=function(c){a.setTextEffect(c)};b.fn.setPlayButton=function(c){a.setPlayButton(c)};b.fn.setDButtons=function(c){a.setDButtons(c)};b.fn.setAdvButtons=function(c){a.setAdvButtons(c)};b.fn.setTextButton=function(c){a.setTextButton(c)};b.fn.setDlButton=function(c){a.setDlButton(c)};b.fn.setImgNumber=function(c){a.setImgNumber(c)};b.fn.setCatNumber=function(c){a.setCatNumber(c)};b.fn.setTimerBar=function(c){a.setTimerBar(c)};b.fn.setMouseoverCP=function(c){a.setMouseoverCP(c)};b.fn.setFloatCP=function(c){a.setFloatCP(c)};b.fn.setGridSize=function(d,c){a.setGridSize(d,c)};b.fn.setNoCategory=function(c){a.setNoCategory(c)};b.fn.setButtonSize=function(c){a.setButtonSize(c)};b.fn.wtGridGallery=function(t){var w="previous";var x="next";var p="tip";var y=0.7;var r=0.5;var l=5000;var g=800;var f=700;var m=400;var o=400;var s="update_adv_buttons";var z="update_buttons";var q="update_gallery_info";var h="update_label";var k="update_scrollbar";var i="switch_list";var c="check_single";function e(bU,bQ){var P=d(bQ.num_col,4);var bo=d(bQ.num_row,2);var av=d(bQ.screen_width,800);var bG=d(bQ.screen_height,450);var aa=d(bQ.item_width,75);var bC=d(bQ.item_height,75);var aK=v(bQ.item_margin,8);var a6=bQ.display_number;var O=bQ.display_playbutton;var bK=bQ.display_dbuttons;var aJ=bQ.display_advbuttons;var a3=bQ.display_textbutton;var bS=bQ.display_downloadbutton;var ae=bQ.display_tooltip;var ba=bQ.display_caption;var S=bQ.display_timer;var aN=bQ.display_gallery_info;var aq=bQ.effect.toLowerCase();var aQ=d(bQ.transition_speed,f);var az=bQ.text_effect.toLowerCase();var bR=bQ.text_sync;var aY=bQ.cpanel_float;var aC=bQ.cpanel_mouseover;var aU=bQ.auto_scale;var N=bQ.cont_nav;var G=bQ.auto_rotate;var H=d(bQ.delay,l);var a2=bQ.initial_open;var bF=d(bQ.selected_category,1)-1;var ax=d(bQ.selected_image,1)-1;var bs=bQ.easing;var ak=bQ.no_category;var bq;var be;var D;var aW;var ay;var E;var bX;var I;var aG;var ar;var bt;var ag;var aZ;var bc;var X;var B;var bY;var aR;var au;var aT;var bl;var bb;var W;var a4;var a8;var U;var ab;var J;var aj;var by;var aM;var ax;var Q;var Y;var A;var bW;var ad;var aO;var aV;var M;var bV;var bf;var ai;this.init=function(){ai=bU.find(">div:first").clone();bq=b(".grid-gallery",bU);be=bq.find(".screen").css("visibility","hidden");X=bq.find(".items");B=X.find(">ul");if(ak){bH()}bY=B.find(">li");Q=true;Y=x;bf=-1;by=null;aM=G;if(bF>=B.size()){bF=0}aR=b(B.get(bF));if(ax>=aR.find(">li").size()){ax=0}aj=0;aH();bn();bD();bq.css({width:av,height:bG});an(bF);if(B.size()>1){bq.bind(i,T)}else{bq.one(i,T)}be.css("visibility","visible");if(a2){E.css({top:E.data("offset")});aB()}bv(0);aE(ax)};var aH=function(){var b0="<div id='timer'/>				                <div id='preloader'/>								<div id='textbox'>							   		<div class='inner-bg'/>									<div id='box'>										<div class='outer-text'><div class='inner-text'/></div>										<div class='text-scrollbar'><div class='text-thumb'/></div>									</div>							   	</div>							   	<div id='cpanel'>									<div class='btn'><span id='rewind'/></div>									<div class='btn'><span id='prev'/></div>									<div class='btn'><span id='play'/></div>									<div class='btn'><span id='next'/></div>									<div class='btn'><span id='ffwd'/></div>									<span id='num-info'/>									<div class='btn'><span id='text'/></div>									<div class='btn'><span id='download'/></div>									<div class='btn'><span id='grid'/></div>								</div>";b0+="<a href='#'>";for(var bZ=0;bZ<B.size();bZ++){b0+="<span class='strip'/>"}b0+="</a>";be.css({width:av,height:bG}).append(b0);ay=be.find(">a:first");aT=be.find(".strip");if(aq=="h_slide"||aq=="slide"){aq="h_slide";aT.css({width:2*av,height:bG})}else{if(aq=="v_slide"){aT.css({width:av,height:2*bG})}else{aT.css({width:av,height:bG})}}aT.css("top",-bG);D=be.find("#preloader");$timer=be.find("#timer").data("pct",1);if(!S){$timer.css("visibility","hidden")}aL();bP()};var aL=function(){aW=be.find("#textbox");var b0=aW.find("#box");$outerText=aW.find(".outer-text");$innerText=$outerText.find(".inner-text");aO=b0.outerHeight()-b0.height();a8=aW.find(".text-scrollbar");U=a8.find(".text-thumb").click(af);a8.data("width",a8.outerWidth(true)).click(function(b2){var b1=Math.round(((b2.pageY-a8.offset().top)/b(this).height())*10)/10;$innerText.stop(true,true).animate({top:-Math.round(b1*aV)},o);U.stop(true,true).animate({top:Math.round(b1*(b(this).height()-U.height()))},o)});try{U.draggable({containment:"parent"}).bind("drag",function(){$innerText.css({top:Math.round(-b(this).position().top*bV)})})}catch(bZ){}};var bP=function(){E=be.find("#cpanel");if(aY){E.addClass("float")}bg();L();if(aY){E.css("margin-left",-E.outerWidth()/2)}E.data({offset:bG,pos:bG-E.outerHeight(true)});if(jQuery.browser.msie&&parseInt(jQuery.browser.version)<8){E.addClass("bg")}if(aC){E.css("top",E.data("offset"));be.hover(a1,aD)}else{E.css("top",E.data("pos"))}};var L=function(){var b2=E.find("#num-info");if(aY){if(a6){var bZ=B.map(function(){return b(this).find(">li").size()}).get();bZ.sort(function(b8,b7){return b7-b8});var b3=u(bZ[0]);var b4="";for(var b1=0;b1<b3;b1++){b4+="0"}b4+=" / "+b4;b2.html(b4).width(b2.width()).html("")}else{b2.hide()}}else{var b6=E.find(">div").outerWidth(true);var b5=(5-E.data("lCount"))*b6;var b0=(5-E.data("rCount"))*b6;b2.css({width:E.width()-10*b6,"padding-left":b5,"padding-right":b0});if(jQuery.browser.msie&&parseInt(jQuery.browser.version)<=6){b2.css("padding-right",b0-3)}}if(a6){bq.bind(h,function(){b2.html((ax+1)+" / "+ab)})}};var bg=function(){var b1=E.height();var b0=E.find(">div").hover(F,bk);bX=b0.has("#prev");I=b0.has("#next");bt=b0.has("#play");aG=b0.has("#rewind");ar=b0.has("#ffwd");ag=b0.has("#text");var bZ=b0.has("#download");var b3=b0.has("#grid");var b2=0;var b4=0;if(aJ){aG.click(aX).find(":only-child").css("backgroundPosition",-b1+"px 0");ar.click(bx).find(":only-child").css("backgroundPosition",-b1+"px "+-b1+"px");bq.bind(s,bj);b2+=2}else{aG.hide();ar.hide()}if(bK){bX.click(a7).find(":only-child").css("backgroundPosition","0 0");I.click(bL).find(":only-child").css("backgroundPosition","0 "+-b1+"px");if(!N){bq.bind(z,bN)}b2+=2}else{bX.hide();I.hide()}if(O){bt.click(V);if(G){bt.find(":only-child").addClass("pause")}b2++}else{bt.hide()}if(a3){ag.click(bz);b4++}else{ag.hide()}if(bS){bZ.click(function(){window.open(b(au.get(ax)).find(">a:first").attr("href"),"_blank")}).find(":only-child").css("backgroundPosition",-2*b1+"px "+-b1+"px");b4++}else{bZ.hide()}b3.click(aB).find(":only-child").css("backgroundPosition",-2*b1+"px 0");b4++;if(ae){ag.data(p,"info");b3.data(p,"gallery");bt.data(p,G?"pause":"play");bX.data(p,w);I.data(p,x);bZ.data(p,"get content");aG.data(p,"first");ar.data(p,"last");b0.each(function(b5){b(this).attr("title",b(this).data(p))})}E.data({lCount:b2,rCount:b4})};var bN=function(){ax==0?aS(bX,false):am(bX,null);ax==ab-1?aS(I,false):am(I,null)};var bj=function(){ax==0?aS(aG,false):am(aG,null);ax==ab-1?aS(ar,false):am(ar,null)};var F=function(){b(this).addClass("button-hl")};var bk=function(){b(this).removeClass("button-hl")};var aS=function(b0,bZ){b0.css("cursor","default").removeAttr("title").unbind("mouseenter").unbind("mouseleave");b0.find(":only-child").css("opacity",r);b0.removeClass("button-hl");if(bZ){b0.unbind("click")}};var am=function(b0,b1){var bZ=b0.find(":only-child");if(bZ.css("opacity")<1){b0.css("cursor","pointer").unbind("mouseenter").unbind("mouseleave").hover(F,bk);bZ.css("opacity",1);if(ae){b0.attr("title",b0.data(p))}if(b1){b0.unbind("click").click(b1)}}};var a1=function(){E.stop(true).animate({top:E.data("pos")},o)};var aD=function(){E.stop(true).animate({top:E.data("offset")},o)};var bE=function(bZ){var b1=bZ.find(">div:hidden");var b3=d(parseInt(b1.css("width"))-aO,300);var b2=parseInt(b1.css("height"));$innerText.width(b3).html(b1.html());var b4=false;var b0=1;if(isNaN(b2)||b2-aO<1){b2=$innerText.height()}else{b2-=aO;if(b2<$innerText.height()){b4=true;$innerText.width(b3-a8.data("width")).html(b1.html());b0=$innerText.height()-b2}}bZ.data("textbox",{color:b1.css("color"),bgcolor:b1.css("background-color"),x:b1.css("left"),y:b1.css("top"),w:b3+aO,h:b2+aO,areaW:b3,areaH:b2,scroll:b4,totalHeight:$innerText.height(),range:b0})};var bp=function(){if(!aW.data("visible")){var bZ=b(au.get(ax));var b1=bZ.find(">div:hidden").html();if(b1&&b1.length>0){if(Q){aW.data("visible",true);var b0=bZ.data("textbox");$innerText.css("color",b0.color);aW.find(".inner-bg").css("background-color",b0.bgcolor);switch(az){case"fade":bi(b1,b0);break;case"down":bB(b1,b0,{width:b0.w,height:0},{height:b0.h});break;case"right":bB(b1,b0,{width:0,height:b0.h},{width:b0.w});break;case"up":bB(b1,b0,{"margin-top":b0.h,height:0,width:b0.w},{height:b0.h,"margin-top":0});break;case"left":bB(b1,b0,{"margin-left":b0.w,width:0,height:b0.h},{width:b0.w,"margin-left":0});break;default:bT(b1,b0)}}am(ag,bz)}else{aS(ag,true)}}};var bM=function(){aW.data("visible",false).stop(true,true);a8.hide();switch(az){case"fade":if(jQuery.browser.msie){$innerText.css("opacity",0)}aW.fadeOut(m,function(){b(this).css("display","none")});break;case"down":$innerText.html("");aW.animate({height:0},m);break;case"right":$innerText.html("");aW.animate({width:0},m);break;case"left":$innerText.html("");aW.animate({width:0,"margin-left":aW.outerWidth()},m);break;case"up":$innerText.html("");aW.animate({height:0,"margin-top":aW.outerHeight()},m);break;default:aW.css("display","none")}};var ac=function(b2){$innerText.stop(true).css("top",0);var b0=b2.areaW;var b1=b2.areaH;if(b2.scroll){var bZ=Math.ceil((b1/b2.totalHeight)*b1);U.stop(true).css({top:0,height:bZ});a8.height(b1);$outerText.css({width:b0-a8.data("width"),height:b1});aV=b2.range;M=b1-bZ;bV=aV/M}else{$outerText.css({width:b0,height:b1})}a8.hide()};var bi=function(b0,bZ){ac(bZ);if(bZ.scroll){a8.show()}$innerText.css("opacity",1).html(b0);aW.css({top:bZ.y,left:bZ.x,width:bZ.w,height:bZ.h}).stop(true,true).fadeIn(m,function(){if(jQuery.browser.msie){$innerText[0].style.removeAttribute("filter")}})};var bB=function(b2,b1,b0,bZ){ac(b1);$innerText.html("");aW.stop(true).css({display:"block",top:b1.y,left:b1.x}).css(b0).animate(bZ,m,function(){$innerText.html(b2);if(b1.scroll){a8.show()}})};var bT=function(b0,bZ){ac(bZ);if(bZ.scroll){a8.show()}aW.stop(true).css({display:"block",top:bZ.y,left:bZ.x,width:bZ.w,height:bZ.h});$innerText.html(b0)};var al=function(){b("body").append("<div id='gg-caption'><div class='tt-txt'/></div>");bb=b("body").find("#gg-caption");if(jQuery.browser.msie&&parseInt(jQuery.browser.version)<=6){bb.css("background-image","none").find(":only-child").css("margin",0)}};var R=function(bZ){bb.find(">div.tt-txt").html(b(this).data("caption"));bb.css({top:bZ.pageY,left:bZ.pageX}).stop(true,true).delay(g).fadeIn("fast")};var aw=function(bZ){bb.css({top:bZ.pageY,left:bZ.pageX})};var br=function(){bb.stop(true,true).fadeOut(0)};var bn=function(){bY.css({width:aa,height:bC,"margin-right":aK,"margin-bottom":aK});J=bY.outerHeight(true);bY.each(function(b1){var b0=b(this).find(">a:first");var bZ=b0.find(">img").attr("alt");b(this).data({imgurl:b0.attr("href"),caption:bZ});bE(b(this));if(ba&&bZ!=""){b(this).hover(R,br).mousemove(aw)}}).hover(bu,a5);$innerText.html("").css({width:"auto",height:"auto"});aW.css("visibility","visible");if(ba){bY.find("img").removeAttr("alt");al()}$itemFrame=b("<span id='item-frame'/>").css({width:aa-6,height:bC-6})};var bD=function(){var b0=P*bY.outerWidth(true);var bZ=bo*bY.outerHeight(true);X.css({width:b0-aK,height:bZ-aK}).click(aA);var b1=false;ad=false;B.each(function(b6){var b4=b(this).find(">li").size();if(b4<2){b1=true}var b5=Math.ceil(b4/P);var b2=(b5>bo);if(b2){ad=true}var b3=(b5*J)-aK;b(this).css({width:b0}).data({numItems:b4,numRows:b5,range:b3-X.height(),scroll:b2,pos:0})});if(b1){bq.bind(c,ah)}aF()};var aF=function(){bq.append("<div id='overlay'></div>");aZ=bq.find("#overlay").click(a9);X.wrap("<div id='gallery'><div id='gallery-box'><div id='gallery-frame'/></div></div>");bc=bq.find("#gallery");bc.append("<div id='close-btn'/>");var b0=bc.find("#close-btn").click(a9);if(ae){b0.attr("title","close")}var bZ=bc.find("#gallery-frame").mousedown(af);bh(bZ);Z(bZ);bJ(bZ);bc.data({top:(bG-bc.outerHeight())/2,left:(av-bc.outerWidth())/2})};var bJ=function(bZ){if(aN){bZ.append("<div id='gallery-info'/>");var b0=bZ.find("#gallery-info");bq.bind(q,function(){var b4=aR.data("numItems");if(b4>0){var b3=-(aj/J);var b2=b3*P;var b1=Math.min(b2+(P*bo),b4);b0.html((b2+1)+"-"+b1+" of "+b4)}else{b0.html("")}})}};var bh=function(b0){if(ad){b0.append("<div class='scrollbar'><div class='thumb'/></div>");W=b0.find(".scrollbar");W.height(X.height()).data("height",W.height()).click(at);a4=W.find(".thumb").click(af);b0.width(X.outerWidth()+W.outerWidth(true));try{a4.draggable({containment:"parent"}).bind("drag",function(){aR.css({top:Math.round(-b(this).position().top*bW)})}).bind("dragstop",function(){aP(b(this).position().top/A)})}catch(bZ){}bq.bind(k,function(){a4.stop(true,true).animate({top:Math.round(-aj*(1/bW))},o)})}};var at=function(bZ){aP((bZ.pageY-W.offset().top)/b(this).height())};var Z=function(b2){if(B.size()>1){var b1="<ul id='menu'>";B.each(function(b3){b1+="<li>"+b(this).attr("title")+"</li>"});b1+="</ul>";bc.find("#gallery-box").prepend(b1);var b0=bc.find("#menu");bl=b0.find(">li");bl.hover(function(){b(this).addClass("menu-over")},function(){b(this).removeClass("menu-over")}).click(function(){var b3=b(this).index();if(b3!=bl.filter(".selected").index()){bq.trigger(i,b3)}});var bZ=0;bl.each(function(){bZ+=b(this).outerWidth()});b0.width(bZ);if(b0.outerWidth()>b2.outerWidth()){b2.width(b0.outerWidth()-(b2.outerWidth()-b2.width()))}else{b0.width(b2.outerWidth()-(b0.outerWidth()-b0.width()))}b2.addClass("square-upper")}else{bc.css("padding",Math.round(bc.find("#close-btn").height()/2))}B.removeAttr("title")};var T=function(b0,b2){bf=-1;try{bl.filter(".selected").removeClass("selected");b(bl.get(b2)).addClass("selected")}catch(b1){}aR.stop(true,true).data("pos",aj);aR=b(B.get(b2));aj=aR.data("pos");if(ad){if(aR.data("scroll")){var bZ=Math.ceil((bo/aR.data("numRows"))*W.data("height"));a4.height(bZ);A=W.data("height")-bZ;bW=aR.data("range")/A;a4.stop(true,true).css("top",-aj*(1/bW));W.css("visibility","visible")}else{W.css("visibility","hidden")}}B.not(":eq("+b2+")").css("visibility","hidden");aR.stop(true,true).css("visibility","visible");bq.trigger(q)};var an=function(bZ){var b0=b(aT.get(bF));b0.find(".content").removeAttr("id");b0.css("top",-bG);bF=bZ;b0=b(aT.get(bF));au=b(B.get(bF)).find(">li");ab=au.size();b0.css("top",0);bq.trigger(c)};var ah=function(){if(ab>1){if(bK){bX.show();I.show()}if(aJ){aG.show();ar.show()}if(O){bt.show()}}else{bX.hide();I.hide();aG.hide();ar.hide();bt.hide()}};var aP=function(b1){if(b1!=bf){bf=b1;var b0;var bZ=b1*aR.data("range");if(bZ>-aj){b0=Math.ceil(bZ/J)}else{if(bZ<-aj){b0=Math.floor(bZ/J)}else{return}}aj=-b0*J;aR.stop(true,true).animate({top:aj},o);bq.trigger(k).trigger(q)}};var a7=function(){if(ax>0){ax--}else{if(N){ax=ab-1}else{return}}bA();Y=w;aE(ax);return false};var bL=function(){if(ax<ab-1){ax++}else{if(N){ax=0}else{return}}bA();Y=x;aE(ax);return false};var aX=function(){if(ax>0){ax=0;bA();Y=w;aE(ax)}return false};var bx=function(){if(ax<ab-1){ax=ab-1;bA();Y=x;aE(ax)}return false};var bI=function(){bA();ax=ax<ab-1?ax+1:0;Y=x;aE(ax)};var V=function(){var bZ;aM=!aM;if(aM){bt.find(":only-child").addClass("pause");bd();bZ="pause"}else{bt.find(":only-child").removeClass("pause");K();bZ="play"}if(ae){bt.data(p,bZ).attr("title",bt.data(p))}return false};var bd=function(){if(aM&&by==null){var bZ=Math.round($timer.data("pct")*H);$timer.animate({width:av+1},bZ,"linear");by=setTimeout(bI,bZ)}};var bA=function(){clearTimeout(by);by=null;$timer.stop(true).width(0).data("pct",1)};var K=function(){clearTimeout(by);by=null;$timer.stop(true).data("pct",1-($timer.width()/(av+1)))};var a0=function(){if(bt.find(":only-child").hasClass("pause")&&ab>1){aM=true;bd()}};var ao=function(){if(aM){aM=false;K()}};var bz=function(){Q=!Q;b(this).find(":only-child").toggleClass("off",!Q);if(Q){bp()}else{bM()}return false};var aB=function(){bq.trigger(i,bF);aZ.stop(true,true).fadeTo(o,0.4);bc.stop(true,true).hide().css({top:bc.data("top"),left:bc.data("left")}).fadeIn(o);ao();aD();return false};var a9=function(){aZ.stop(true,true).fadeOut();bc.stop(true,true).fadeOut(function(){aj=0;B.data("pos",0).css("top",0)});au.trigger("mouseleave");a0();a1();return false};var aA=function(b1){var bZ=b(b1.target);if(bZ[0].nodeName!="LI"){bZ=bZ.parents("li")}var b0=bZ.index();if(b0>-1){var b2=bZ.parent().index();if(b2!=bF){an(b2)}else{if(b0==ax){a9();return false}}bA();ax=b0;Y=x;aE(ax);a9()}return false};var bu=function(){if(!(bF==b(this).parent().index()&&b(this).index()==ax)){b(this).find("img:first").stop().animate({opacity:y},o)}};var a5=function(bZ){b(this).find("img:first").stop().animate({opacity:1},o)};var aE=function(b2){bq.trigger(h).trigger(z).trigger(s);var b0=b(au.get(b2));b0.append($itemFrame);bM();if(!bR){bp()}var b3=b0.find(">a:nth-child(2)");var bZ=b3.attr("href");if(bZ){ay.unbind("click").css("cursor","pointer").attr({href:bZ,target:b3.attr("target")})}else{ay.click(af).css("cursor","default")}if(b0.data("img")){D.hide();aI(b0.data("img"))}else{var b4=b0.data("imgurl");var b1=b("<img class='content'/>");b1.attr("src",b4);if(b1[0].complete||b1[0].readyState=="complete"){D.hide();bO(b0,b1);aI(b1)}else{D.show();b1.load(function(){D.hide();bO(b0,b(this));aI(b(this))}).error(function(){alert("Error loading image")})}}};var aI=function(bZ){switch(aq){case"h_slide":bm(bZ,"left",av);break;case"v_slide":bm(bZ,"top",bG);break;case"fade":bw(bZ);break;default:C(bZ)}};var C=function(bZ){var b0=b(aT.get(bF));if(bR){bp()}b(".content",b0).removeAttr("id").hide();bZ.attr("id","curr-img").show();bd()};var bw=function(bZ){var b0=b(aT.get(bF));b("#curr-img",b0).stop(true,true);b(".content",b0).removeAttr("id").css("z-index",0);bZ.attr("id","curr-img").stop(true,true).css({opacity:0,"z-index":1}).show().animate({opacity:1},aQ,bs,function(){b(".content:not('#curr-img')",b0).hide();if(bR){bp()}bd()})};var bm=function(b3,b6,b2){var b4=b(aT.get(bF)).stop(true,true);var bZ=b("#curr-img",b4);if(bZ.size()>0){b(".content",b4).removeAttr("id").parent().css({top:0,left:0});b3.attr("id","curr-img").parent().show();var b1,b0;if(Y==w){b4.css(b6,-b2);b1=bZ;b0=0}else{b1=b3;b0=-b2}b1.parent().css(b6,b2);var b5=(b6=="top")?{top:b0}:{left:b0};b4.stop(true,true).animate(b5,aQ,bs,function(){b(".content:not('#curr-img')",b4).parent().hide();b1.parent().css({top:0,left:0});b4.css({top:0,left:0});if(bR){bp()}bd()})}else{b4.css({top:0,left:0});b(".content",b4).parent().hide().css({top:0,left:0});b3.attr("id","curr-img").parent().show();if(bR){bp()}bd()}};var bv=function(b0){var bZ=b(bY.get(b0));var b2=bZ.data("imgurl");var b1=b("<img class='content'/>");b1.attr("src",b2);b1.load(function(){if(!bZ.data("img")){bO(bZ,b(this))}if(++b0<bY.size()){bv(b0)}}).error(function(){if(++b0<bY.size()){bv(b0)}})};var bO=function(b1,b2){var b3=b1.parent().index();var b0=b(aT.get(b3));b0.append(b2);if(aU){ap(b2)}if(aq=="h_slide"||aq=="v_slide"){var bZ=b("<div class='content-box'/>").css({width:av,height:bG});b2.wrap(bZ);b2.css("display","block")}b1.data("img",b2)};var ap=function(bZ){if(bZ.outerWidth()>0&&bZ.outerHeight()>0){var b0;if(bZ.outerWidth()>av){b0=bZ.outerHeight()/bZ.outerWidth();bZ.width(av);bZ.height(b0*av)}if(bZ.outerHeight()>bG){b0=bZ.outerWidth()/bZ.outerHeight();bZ.width(b0*bG);bZ.height(bG)}bZ.css({left:Math.round((av-bZ.outerWidth())/2),top:Math.round((bG-bZ.outerHeight())/2)})}};var bH=function(){var b1=b(B.get(0));for(var b0=1;b0<B.size();b0++){var bZ=b(B.get(b0));b1.append(bZ.find(">li"));bZ.remove()}B=X.find(">ul")};var af=function(){return false};var af=function(){return false};this.setTransition=function(bZ){aq=bZ};this.setTextEffect=function(bZ){az=bZ};this.setPlayButton=function(bZ){O=bZ};this.setDButtons=function(bZ){bK=bZ};this.setAdvButtons=function(bZ){aJ=bZ};this.setTextButton=function(bZ){a3=bZ};this.setDlButton=function(bZ){bS=bZ};this.setImgNumber=function(bZ){a6=bZ};this.setCatNumber=function(bZ){aN=bZ};this.setTimerBar=function(bZ){S=bZ};this.setMouseoverCP=function(bZ){aC=bZ};this.setFloatCP=function(bZ){aY=bZ};this.setButtonSize=function(bZ){displayLarge=(bZ=="l")};this.setGridSize=function(b0,bZ){P=b0;bo=bZ};this.setNoCategory=function(bZ){ak=bZ};this.undoChanges=function(){bA();b("#gg-caption").remove();bU.empty();bU.append(ai);ax=0;bF=0};this.updateChanges=function(){this.init()}}var d=function(A,B){if(!isNaN(A)&&A>0){return A}return B};var v=function(A,B){if(!isNaN(A)&&A>=0){return A}return B};var u=function(A){var B=1;A=Math.abs(A);A=parseInt(A/10);while(A>0){B++;A=parseInt(A/10)}return B};var j={num_col:4,num_row:2,screen_width:800,screen_height:450,item_width:75,item_height:75,item_margin:8,display_number:true,display_playbutton:true,display_dbuttons:true,display_advbuttons:false,display_textbutton:true,display_downloadbutton:true,display_tooltip:true,display_caption:true,display_timer:true,display_gallery_info:true,effect:"fade",transition_speed:f,text_effect:"fade",text_sync:true,cpanel_float:true,cpanel_mouseover:false,auto_scale:true,cont_nav:true,auto_rotate:false,delay:l,initial_open:false,selected_category:1,selected_image:1,easing:"",no_category:false};var n=b.extend({},j,t);return this.each(function(){a=new e(b(this),n);a.init()})}})(jQuery);
