(function(A){A.browser=A.extend({chrome:/chrome/.test(navigator.userAgent.toLowerCase())},A.browser);A.fn.lightpop=function(t){var a="lightpop",B="images/";t=A.extend(true,{overlayBgColor:"#000",overlayOpacity:0.7,contentFrameType:"border",contentBorder:"none",boxBorderSize:6,containerBorderSize:10,containerResizeSpeed:"normal",contentBgColor:"#FFF",imageBox:B+a+"-box.gif",imageBorderL:B+a+"-border-l.gif",imageBorderR:B+a+"-border-r.gif",imageLoading:B+a+"-ico-loading.gif",imageBtnPrev:B+a+"-btn-prev.gif",imageBtnNext:B+a+"-btn-next.gif",imageBtnClose:B+a+"-btn-close.gif",imageBlank:B+a+"-blank.gif",imageBtnPrevWidth:63,imageBtnNextWidth:63,imageBtnCloseWidth:66,txtImage:null,txtOf:"of",setLinkToTitle:false,keyToClose:"c",keyToPrev:"p",keyToNext:"n",flvplayer:"mediaplayer.swf",iconAdd:true,detailsEnabled:true,initSize:250,defaultLater:1500,Image:{enabled:true,icon:B+"icon-image.png",param:{},size:new Array(0,0)},Contents:{enabled:true,icon:B+"icon-contents.png",param:{},size:new Array(0,0),iframeEnabled:true},Video:{enabled:true,icon:B+"icon-video.png",param:{},size:new Array(320,240)},YouTube:{enabled:true,icon:B+"icon-youtube.png",param:{hl:"ja"},size:new Array(425,355)},Metacafe:{enabled:true,icon:B+"icon-metacafe.png",param:{},size:new Array(400,345)},LiveLeak:{enabled:true,icon:B+"icon-liveleak.png",param:{},size:new Array(450,370)},GoogleVideo:{enabled:true,icon:B+"icon-googlevideo.png",param:{hl:"ja"},size:new Array(400,326)},ifilm:{enabled:true,icon:B+"icon-ifilm.png",param:{},size:new Array(448,365)},Dailymotion:{enabled:true,icon:B+"icon-dailymotion.png",param:{},size:new Array(420,330)},superdeluxe:{enabled:true,icon:B+"icon-superdeluxe.png",param:{},size:new Array(400,350)},nicovideo:{enabled:true,icon:B+"icon-nicovideo.png",param:{},size:new Array(312,176)},useImageSet:false},t);if(t.imageMaxWidth||t.imageMaxHeight){t=A.extend(true,t,{Image:{size:new Array((t.imageMaxWidth||0),(t.imageMaxHeight||0))}})}var x=document;var y=x.body,w=x.documentElement,H=x.images;var I=A.browser.msie,h=A.browser.opera,K=A.browser.safari||A.browser.chrome,S=!(x.compatMode&&x.compatMode!=="BackCompat");var G=(/^border$/i).test(t.contentFrameType);var i=new Array();i.length=0;var g={Image:{match:function(b){return(t.Image.enabled&&(/\.(jpe?g|gif|png|bmp)$/i).test(b))},base:"/",defaultSize:t.Image.size,set:function(b){Y(b,true)},preload:function(b){Y(b,false)}},Video:{match:function(b){return(t.Video.enabled&&(/\.(flv|swf|rm|mov|3gp|mp4|asf|avi|mpg|wmv)$/i).test(b))},defaultSize:t.Video.size,getInfo:function(AE,AD,d,AF,AC){var b={};var e=AE.replace(/\?.*$/,"");switch(e.toLowerCase().match(/\.(flv|swf|rm|mov|3gp|mp4|asf|avi|mpg|wmv)$/i)[1]){case"flv":d+=22;e=t.flvplayer+"?file="+e;case"swf":b={quality:"high",bgcolor:"#000"};e=X(e,AD,d,b);break;case"rm":b={autostart:"true",controls:"imagewindow,controlpanel"};e=AB(e,"CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA","audio/x-pn-realaudio-plugin",AD,d,b,"");break;case"mov":case"mp4":case"3gp":d+=20;b={href:e,controller:"true",pluginspage:"http://www.apple.com/quicktime/download/",autoplay:"true",bgcolor:"000000"};e=AB(e,"02BF25D5-8C17-4B23-BC80-D3488ABDDC6B","video/quicktime",AD,d,b,' codebase="http://www.apple.com/qtactivex/qtplugin.cab"');break;default:d+=20;b={href:e,autostart:"true",uiMode:"full"};e=AB(e,"6BF52A52-394A-11d3-B153-00C04F79FAA6","application/x-oleobject",AD,d,b,"");break}return{content:e,width:AD,height:d,later:Math.round(t.defaultLater*2/3)}}},YouTube:{match:function(b){return(t.YouTube.enabled&&(/\.youtube\.com\/watch/i).test(b))},base:"http://www.youtube.com/v/",defaultSize:t.YouTube.size,getInfo:function(AD,d,AE,AF,b){var e={};var AG=AD.replace(/^.*\?v=(.*)$/i,"$1");var AC=b.base+AG;for(var AH in AF){AC+="&"+AH+"="+AF[AH]}AC=X(AC,d,AE,e);return{content:AC,width:d,height:AE,later:t.defaultLater}}},Metacafe:{match:function(b){return(t.Metacafe.enabled&&(/\.metacafe\.com\/watch/i).test(b))},base:"http://www.metacafe.com/fplayer/",defaultSize:t.Metacafe.size,getInfo:function(AF,AE,e,AG,AD){var d={};var b=AF.replace(/^.*\/watch\/([\d]+\/[^\/]*)\/?.*$/i,"$1");var AC=AD.base+b+".swf";AC=X(AC,AE,e,d,AG);return{content:AC,width:AE,height:e,later:t.defaultLater}}},LiveLeak:{match:function(b){return(t.LiveLeak.enabled&&(/\.liveleak\.com\/view/i).test(b))},base:"http://www.liveleak.com/player.swf?autostart=false&amp;token=",defaultSize:t.LiveLeak.size,getInfo:function(AF,AE,e,AG,AD){var d={quality:"high"};var b=AF.replace(/^.*\?i=(.*)$/i,"$1");var AC=AD.base+b;AC=X(AC,AE,e,d,AG);return{content:AC,width:AE,height:e,later:t.defaultLater}}},GoogleVideo:{match:function(b){return(t.GoogleVideo.enabled&&(/video\.google\.com\/videoplay/i).test(b))},base:"http://video.google.com/googleplayer.swf?docId=",defaultSize:t.GoogleVideo.size,getInfo:function(AF,AE,e,AG,AD){var d={flashvars:""};var b=AF.replace(/^.*\?docid=([a-z\d\-]+).*$/i,"$1");var AC=AD.base+b;AC=X(AC,AE,e,d,AG);return{content:AC,width:AE,height:e,later:t.defaultLater}}},ifilm:{match:function(b){return(t.ifilm.enabled&&(/\.ifilm\.com\/video/i).test(b))},base:"http://www.ifilm.com/efp",defaultSize:t.ifilm.size,getInfo:function(AF,AE,e,AG,AD){var d={flashvars:"flvbaseclip="+b+"&",quality:"high",bgcolor:"000000"};var b=AF.replace(/\?.*$/,"").replace(/^.*\/video\/([^\/]*)[\/]?$/i,"$1");var AC=AD.base;AC=X(AC,AE,e,d,AG);return{content:AC,width:AE,height:e,later:t.defaultLater}}},Dailymotion:{match:function(b){return(t.Dailymotion.enabled&&(/\.dailymotion\.com\/video/i).test(b))},base:"http://www.dailymotion.com/swf/",defaultSize:t.Dailymotion.size,getInfo:function(AF,AE,e,AG,AD){var d={allowFullScreen:"true",allowScriptAccess:"always"};var b=AF.replace(/^.*\/video\/([^_]*).*$/i,"$1");var AC=AD.base+b;AC=X(AC,AE,e,d,AG);return{content:AC,width:AE,height:e,later:t.defaultLater}}},superdeluxe:{match:function(b){return(t.superdeluxe.enabled&&(/\.superdeluxe\.com\/sd/i).test(b))},base:"http://i.cdn.turner.com/sdx/static/swf/share_vidplayer.swf",defaultSize:t.superdeluxe.size,getInfo:function(AF,AE,e,AG,AD){var d={allowFullScreen:"true",FlashVars:"id="+b};var b=AF.replace(/^.*\?id=(.*)$/i,"$1");var AC=AD.base;AC=X(AC,AE,e,d,AG);return{content:AC,width:AE,height:e,later:t.defaultLater}}},nicovideo:{match:function(b){return(t.nicovideo.enabled&&(/\.nicovideo\.jp\/watch/i).test(b))},base:"http://www.nicovideo.jp/watch/",defaultSize:t.nicovideo.size,getInfo:function(AE,AD,d,AF,AC){var b=AE.replace(/^.*\/watch\/(.*)$/i,"$1");var e=AC.base+b;e='<iframe width="'+AD+'" height="'+d+'" src="http://www.nicovideo.jp/thumb/'+b+'" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"><a href="'+e+'">'+AC.tytle+"</iframe>";return{content:e,width:AD,height:d,later:Math.round(t.defaultLater/3)}}},Contents:{match:function(b){return(t.Contents.enabled&&RegExp(window.location.host,"i").test(b)&&!(/\.(jpe?g|gif|png|bmp)$/i).test(b))},defaultSize:t.Contents.size,set:function(e){var b;var AC=Q(i[e].href);var d='width="'+AC[0]+'" height="'+AC[1]+'"';if(t.Contents.iframeEnabled){b="<iframe "+d+' src="'+i[e].href+'" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"><a href="'+i[e].href+'">'+i[e].tytle+"</a></iframe>";i[e]=A.extend(i[e],{content:b,width:AC[0],height:AC[1],later:500});s(e)}else{A.get(i[e].href,function(AE,AD){b="<div "+d+">"+AE.replace(/[\r\n]/g,"").replace(/.*<body.*?>(.*?)<\/body>.*$/,"$1").replace(/<script.*?>.*<\/script>/g,"")+"</div>";i[e]=A.extend(i[e],{content:b,width:AC[0],height:AC[1],later:500});s(e)})}},preload:function(b){},content_css:{textAlign:"left",lineHeight:"1.2em"}}};var p="overlay",L=a,u=a+"-box",q=a+"-content",J=a+"-nav",m=a+"-data",V=a+"-details",U=a+"-loading";var T="#"+p,c="#"+L,R="#"+u,n="#"+q,k="#"+J,C="#"+m,D="#"+V,l="#"+U;var r=function(b){AA(t.imageBtnPrev,function(AE,AC,AD){t.imageBtnPrevWidth=(AC>0?AC:t.imageBtnPrevWidth);AA(t.imageBtnNext,function(AH,AF,AG){t.imageBtnNextWidth=(AF>0?AF:t.imageBtnNextWidth);AA(t.imageBtnClose,function(AK,AI,AJ){t.imageBtnCloseWidth=(AI>0?AI:t.imageBtnCloseWidth);if(!G){AA(t.imageBox,function(AN,AL,AM){AA(t.imageBorderL,function(AQ,AO,AP){AA(t.imageBorderR,function(AT,AR,AS){t.contentBorder="none"})})})}})})});var e=new Array();var d=0;b.filter("a").each(function(){var AC=window.location;var AG=A(this);if(!(/^https?:/i).test(AG.attr("href"))&&(/^https?:/i).test(AC.protocol)){AG.attr("href",((/^\//i).test(AG.attr("href"))?AC.protocol+"//"+AC.hostname+"/"+AG.attr("href"):AC.href.replace(/^(.*\/).*$/i,"$1")+AG.attr("href").replace(/^\/?(.*)$/i,"$1")))}for(var AE in g){var AD=g[AE];if(AD.match(AG.attr("href").replace(/\?.*$/,""))){var AF=t[AE];if(t.iconAdd&&AG.children("img").length===0){AG.css({background:"transparent url("+AF.icon+") no-repeat scroll 1px 0pt",paddingLeft:"20px"})}i.push({type:AE,href:AG.attr("href"),title:(AG.attr("title")?AG.attr("title"):AG.html().replace(/<[^>]*>/ig,"")),base:(AD.base?AD.base:"/")});AG.unbind("click").click((function(AH){return function(){W(AH);return false}})(d));e.push(this);d++;break}}});return new A(e)};var W=function(AG){F(A("embed, object, select"),false);var AF='<div id="'+q+'-wrap"><div id="'+q+'" /></div>';var AC=(t.detailsEnabled?'<div id="'+m+'-wrap"><div id="'+m+'"><div id="'+V+'"><div id="'+V+'-caption" /><div id="'+V+'-number" /></div><div id="'+m+'-nav"><a href="#" id="'+m+'-nav-close"><img src="'+t.imageBtnClose+'" /></a></div></div></div>':"");var AE='<div id="'+J+'"><a href="#" id="'+J+'-prev" /><a href="#" id="'+J+'-next" /></div><div id="'+U+'"><a href="#" id="'+U+'-link"><img src="'+t.imageLoading+'" /></a></div>';var e='<div id="'+p+'" /><div id="'+L+'"><div id="'+u+'"><div id="'+u+'-inner">'+(G?AF+"</div>"+AC:'<div id="'+u+'-hd"><div id="'+u+'-hdc" /></div><div id="'+u+'-bd"><div id="'+u+'-bdc">'+AF+AC+'</div></div><div id="'+u+'-ft"><div id="'+u+'-ftc" /></div></div>')+AE+"</div></div>";A("body").append(A(e).hide());var AH=N();var b=E();var d=t.containerBorderSize;A(T).css({position:"absolute",top:0,left:0,backgroundColor:t.overlayBgColor,opacity:t.overlayOpacity,width:AH[0],height:AH[1],zIndex:90});A(c).css({position:"absolute",top:b[1]+Math.round(AH[3]/10),left:b[0],width:"100%",height:0,overflow:"visible",textAlign:"center",lineHeight:0,border:"none",zIndex:100});A(c+" a img").css({border:"none"});A(R).css({position:"relative",width:t.initSize,height:t.initSize,top:0,margin:"0 auto",padding:0,backgroundColor:t.contentBgColor,border:t.contentBorder,overflow:(G?"hidden":"visible")});A(R+"-inner").css({width:t.initSize,height:t.initSize,backgroundColor:"transparent",margin:"0 auto",padding:(G?d:0),overflow:(G?"hidden":"visible")});A(n+"-wrap").css({backgroundColor:"transparent"});A(n).css({margin:(G?0:"0 auto"),padding:(G?0:d+"px 0"),zIndex:110});if(!G){var AD=t.boxBorderSize;Z(false).css({position:"relative"}).hide();A(R+"-hd").css({height:AD,top:0,margin:"0 "+AD+"px 0 0"});A(R+"-hdc").css({height:AD,top:0,margin:"0 "+AD*-1+"px 0 "+AD+"px"});A(R+"-ft").css({height:AD,bottom:0,margin:"0 "+AD+"px 0 0"});A(R+"-ftc").css({height:AD,bottom:0,margin:"0 "+AD*-1+"px 0 "+AD+"px"})}A(k).css({position:"absolute",top:0,left:0,height:"10px",width:"100%",padding:0,margin:(G?"0":t.boxBorderSize+"px")+" auto",zIndex:10});A(k+" a").css({display:"block",height:"100%",zoom:1,margin:(G?0:"0 "+t.boxBorderSize+"px"),outline:"none"});A(k+"-prev").css({width:t.imageBtnPrevWidth,left:0,styleFloat:"left"});A(k+"-next").css({width:t.imageBtnNextWidth,right:0,styleFloat:"right"});A(l).css({position:"absolute",top:"40%",left:0,height:"20%",width:"100%",margin:"0 auto",textAlign:"center",lineHeight:0});if(t.detailsEnabled){A(C+"-wrap").css({font:"10px Verdana, Helvetica, sans-serif",backgroundColor:t.contentBgColor,lineHeight:"1.4em",width:"100%",margin:"0 auto",padding:"0 "+d+"px 0",overflow:"hidden"}).hide();A(C).css({position:"relative",padding:"0 "+d+"px",color:"#666",left:0,bottom:0});A(D).css({width:"70%",styleFloat:"left",textAlign:"left"});A(D+"-caption").css({styleFloat:"left","font-weight":"bold",width:"100%"});A(D+"-number").css({styleFloat:"left",clear:"left",width:"100%","padding-bottom":"1.0em"});A(C+"-nav-close").css({styleFloat:"right",width:t.imageBtnCloseWidth,padding:"0.35em 0"})}A(T).fadeIn(t.containerResizeSpeed,function(){A(c).show()});A(T+","+l+"-link,"+C+"-nav-close").click(function(){f();return false});z(true);P(AG)};var P=function(b){F(A(C+","+D+","+D+"-caption,"+D+"-number,"+C+"-nav-close"),false);A(k+","+k+"-prev,"+k+"-next").hide();A(n).hide().children().remove();A(l+","+R+","+R+"-inner").show();Z(false);if(t.detailsEnabled&&!G&&K){A(C+"-wrap").height("auto")}s(b)};var s=function(b){(i[b].content?function(d){A(n).append(A(i[d].content));setTimeout(function(){v(d)},i[d].later)}:(g[i[b].type].set?g[i[b].type].set:(function(d){M(d);s(d)})))(b)};var o=function(e,d,b,AC){if(t.detailsEnabled){AC=(AC<28?28:AC);b+=AC}(G?(function(AD){A(R).animate({width:d,height:b},"fast",function(){F(AD,true)})}):(function(AD){if(t.detailsEnabled&&K){A(C+"-wrap").height(AC)}F(AD,true)}))(e)};var v=function(AG){var e=t.containerBorderSize,AF=t.boxBorderSize;var b=i[AG];var AC=b.width+(e+(G?0:AF))*2;var d=b.height+e*2;var AD=N();var AE=E();A(c).animate({top:AE[1]+Math.round(AD[3]/10),left:AE[0]},t.containerResizeSpeed,function(){A(R).animate({width:AC,height:d},t.containerResizeSpeed,function(){var AH=g[b.type];A(R+"-inner").css({width:(G?b.width:AC),height:b.height});A(n).css({width:b.width,height:b.height});if(t.detailsEnabled){A(C+"-wrap").css({width:b.width})}if(AH.content_css){A(n).children().css(AH.content_css)}A(l).hide();if((/<object.*>/i).test(b.content)){A(n).show()}else{A(n).fadeIn()}Z(true);A(D+"-caption").html((t.setLinkToTitle?'<a href="'+b.href+'" title="'+b.title+'">'+b.title+"</a>":b.title));if(t.useImageSet){A(D+"-number").html((t.txtImage?t.txtImage:b.type)+(i.length>1?" "+(AG+1)+" "+t.txtOf+" "+i.length:""))}var AI=F(A(C+","+D+","+D+"-caption,"+D+"-number,"+C+"-nav-close"),false).show();(t.detailsEnabled?function(AL,AJ,AK){A(C+"-wrap").slideDown("fast",function(){o(AL,AJ,AK,(!K?A(this).height():this.scrollHeight))})}:function(AL,AJ,AK){o(AL,AJ,AK)})(AI,AC,d);A(k).css({width:AC}).show(function(){A(k+"-prev,"+k+"-next").css({height:Math.round(d/3),background:"transparent url("+t.imageBlank+") no-repeat"}).unbind();if(AG!=0&&t.useImageSet){A(k+"-prev").hover(function(){A(this).css({background:"url("+t.imageBtnPrev+") left 30% no-repeat"})},function(){A(this).css({background:"transparent url("+t.imageBlank+") no-repeat"})}).show().click((function(AJ){return function(){P(AJ);return false}})(AG-1))}if(AG!=(i.length-1)&&t.useImageSet){A(k+"-next").hover(function(){A(this).css({background:"url("+t.imageBtnNext+") right 30% no-repeat"})},function(){A(this).css({background:"transparent url("+t.imageBlank+") no-repeat"})}).show().click((function(AJ){return function(){P(AJ);return false}})(AG+1))}if(t.useImageSet){j(true,AG)}});if((i.length-1)>AG){O(AG+1)}if(AG>0){O(AG-1)}})})};var O=function(b){if(!i[b].content){(g[i[b].type].preload?g[i[b].type].preload:(function(d){M(d)}))(b)}};var Q=function(e,d,AF){var AE=0,b=0;var AC=e.toLowerCase().replace(/[\r\n]/g,"").replace(/["']/g,"").match(/(width|height)=(\d+)/ig);if(AC){A.each(AC,function(){if((/^width=\d+$/i).test(this)){AE=Number(this.replace(/^width=(\d+)$/,"$1"))}if((/^height=\d+$/i).test(this)){b=Number(this.replace(/^height=(\d+)$/,"$1"))}})}if(AE===0||b===0){if(d){AE=d[0];b=d[1]}else{var AD=N();AE=AD[0]/4;b=AD[1]/4}}if(AF){if(AF[0]!=0&&AE>AF[0]){b=b*(AF[0]/AE);AE=AF[0]}if(AF[1]!=0&&b>AF[1]){AE=AE*(AF[1]/b);b=AF[1]}}return new Array(Math.round(AE),Math.round(b))};var M=function(AH){var e=i[AH];var b=t[e.type];var AC=g[e.type];var AE=e.href.replace(/&.*$/i,"");var d,AF={};var AG,AD=null;if((/\?.*$/).test(e.href)){var AI=e.href.replace(/^.*\?/,"").split("&");if(AI.length>0){A.each(AI,function(){var AK,AJ=this.toString();if(!(/^(width|height|v|i|docid|id)\=.*$/i).test(AJ)){AK=(AJ).match(/^([^=]*)=(.*)$/i);if(AK.length>2){AF[AK[1]]=AK[2]}}})}}AF=A.extend(AF,b.param);d=Q(e.href,AC.defaultSize);i[AH]=A.extend(e,AC.getInfo(AE,d[0],d[1],AF,e))};var X=function(d,AD,b,AF,AE){var AC="";if(typeof AE==="object"){A.each(AE,function(AG){if(d.indexOf(AG+"=")<0){d+=(d.indexOf("?")<0?"?":"&")+AG+"="+this}})}var e={movie:d,wmode:"transparent"};AF=(AF?A.extend(e,AF):e);AC='<object width="'+AD+'" height="'+b+'" data="'+d+'" type="application/x-shockwave-flash" wmode="'+AF.wmode+'">';A.each(AF,function(AG){AC+='<param name="'+AG+'" value="'+this+'" />'});AC+="</object>";return AC};var AB=function(d,AE,AH,e,AI,AD,AJ,b){var AG="",AC="";var AF={src:d,width:e,height:AI,type:AH};AD=(AD?A.extend(AF,AD):AF);AG+='<object width="'+e+'" height="'+AI+'"'+(AE!=" "?'classid="clsid:'+AE+'"':"")+' type="'+AH+'" '+b+">";AC+='<embed width="'+e+'" height="'+AI+'"';A.each(AD,function(AK){AG+='<param name="'+AK+'" value="'+this+'" />';AC+=" "+AK+'="'+this+'"'});AC+='><noembed><a href="'+d+'">'+d+"</a></noembed></embed>";AG+=AC+"</object>";return AG};var Z=function(AE){if(!G){var AD=A(R+"-hd, "+R+"-hdc, "+R+"-bd, "+R+"-bdc, "+R+"-ft, "+R+"-ftc");var e="transparent",d=t.contentBgColor;if(AE){var b=t.imageBox,AF=t.imageBorderL,AC=t.imageBorderR;A(R).css({backgroundColor:e});A(R+"-hd").css({background:e+" url("+b+") left top no-repeat"});A(R+"-hdc").css({background:e+" url("+b+") right top no-repeat"});A(R+"-bd").css({background:d+" url("+AF+") left top repeat-y"});A(R+"-bdc").css({background:e+" url("+AC+") right top repeat-y"});A(R+"-ft").css({background:e+" url("+b+") left bottom no-repeat"});A(R+"-ftc").css({background:e+" url("+b+") right bottom no-repeat"});AD.show()}else{A(R).css({backgroundColor:d});AD.css({background:e})}return AD}};var Y=function(d,b){AA(i[d].href,(function(AC,e){return function(AF,AE,AD){var AG=Q(AF,new Array(AE,AD),t.Image.size);i[AC]=A.extend(i[AC],{content:'<img src="'+AF.replace(/\?.*$/,"")+'" width="'+AG[0]+'" height="'+AG[1]+'" />',width:AG[0],height:AG[1],later:(I?250:100)});if(e){s(AC)}}})(d,b))};var AA=function(b,AG,AE,e,AH){AG=AG||function(){};AE=AE||function(){};e=e||10;AH=AH||2000;for(var d=0,AF=H.length;d<AF;++d){if(H[d].src===b&&H[d].complete){AG(b,H[d].width,H[d].height);return }}var AC=new Image(),AD=0;AC.finish=false;AC.onabort=AC.onerror=function(){if(AC.finish){return }AC.finish=true;AE(b)};AC.onload=function(){AC.finish=true;if(h&&!AC.complete){AE(b);return }AG(b,AC.width,AC.height)};AC.src=b;if(!AC.finish&&AH){setTimeout(function(){if(AC.finish){return }if(AC.complete){AC.finish=true;if(AC.width){return }AE(b);return }if((AD+=e)>AH){AC.finish=true;AE(b);return }setTimeout(arguments.callee,e)},0)}};var F=function(d,b){return d.css({visibility:(b?"visible":"hidden")})};var j=function(b,d){A(x).unbind("keydown");if(b){A(x).keydown(function(AD){var e=(AD?AD:event).keyCode;var AC=(AD?AD.DOM_VK_ESCAPE:27);var AE=String.fromCharCode(e).toLowerCase();if((AE==t.keyToClose)||(AE=="x")||(e==AC)){f()}else{if(((AE==t.keyToPrev)||(e==37))&&d!=0){P(d-1)}else{if(((AE==t.keyToNext)||(e==39))&&d!=(i.length-1)){P(d+1)}}}})}};var z=function(b){A(window).unbind("resize");if(b){A(window).resize(function(){var d=N();var e=E();A(T).css({width:d[0],height:d[1]});A(c).css({top:e[1]+Math.round(d[3]/10),left:e[0]})})}};var N=function(){var b=(w&&w.scrollWidth?w:y).scrollWidth;var e=(w&&w.scrollHeight?w:y).scrollHeight;var d=(S?y:w).clientWidth;var AC=(S?y:w).clientHeight;b=(b<d?b:d);e=(e<AC?AC:e);return new Array(b,e,d,AC)};var E=function(){var b=(w&&w.scrollLeft?w:y).scrollLeft;var d=(w&&w.scrollTop?w:y).scrollTop;return new Array(b,d)};var f=function(){F(A("object",A(c)),false).remove();A(c).height(A(R).height()).slideUp(function(){A(this).remove();A(T).fadeOut(function(){A(this).remove();F(A("embed, object, select"),true)})});j(false);z(false)};return r(this)}})(jQuery);