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