/* WUT? O.o */NoFirstFotoScroll=false;NoFotoComments=false;NoFotoTitle=false;function RefreshGorbunovPosition(a){if(f=$("f"+fotoID)){var c=Element.cumulativeOffset(f);var b=$("gorbunov");b.style.left=(c[0]-3)+"px";b.style.top=(c[1]-3)+"px";b.style.display="block"}}var rgpCountdown=20;function RefreshGorbunovPositionWithCountdown(){RefreshGorbunovPosition();rgpCountdown--;if(rgpCountdown>0){setTimeout(RefreshGorbunovPositionWithCountdown,500)}}function LocalOnLoad(){setTimeout(RefreshGorbunovPositionWithCountdown,500);var a=false;if((wtf=document.URL.indexOf("#foto"))>1){if((desired=document.URL.substr(wtf+5))!=""){if(whodahellareyou=fotosmap[desired]){Cool(desired);a=true}}}if((!a)&&(foto)&&(foto.fotoID)){Cool(foto.fotoID,true)}}function LocalOnResize(){RefreshGorbunovPosition()}function Cool(e,d){prev_foto=fotos[fotosmap[e]-1];foto=fotos[fotosmap[e]];next_foto=fotos[fotosmap[e]+1];if(!d){if(!NoFotoComments){new Ajax.Updater("foto_comments","/ajax/foto_comments.html",{asynchronous:true,method:"POST",onSuccess:CommentsAreLoaded,parameters:"digest="+digest+"&fotoID="+foto.fotoID})}}window.fotoID=foto.fotoID;RefreshGorbunovPosition(true);var i=foto.height;var g=foto.width;var a=false;if(g>600){new_height=i/g*600;new_width=600;i=new_height;g=new_width;var a=true}var b=g+2;var h=i+2+10;$("big_foto_container").style.backgroundPosition="50% "+(h/2)+"px";foto_loader=foto_loader=="big_foto1"?"big_foto2":"big_foto1";foto_loader_other=foto_loader=="big_foto1"?"big_foto2":"big_foto1";loader=foto_loader+"_loader";loader_other=foto_loader_other+"_loader";$(loader).style.zIndex=101;$(loader_other).style.zIndex=100;if((fl=$(foto_loader))._effector){fl._effector.cancel();fl._effector=false}if((flo=$(foto_loader_other))._effector){flo._effector.cancel()}flo._effector=new Effect.Opacity(foto_loader_other,{from:1,to:0,duration:0.1});$(foto_loader).setOpacity(1);big_foto=$(foto_loader);big_foto.width=g;big_foto.height=i;if(d){big_foto.src=foto.murl}else{big_foto.src="http://i.cdn.promodeejay.net/0.gif";setTimeout("big_foto.src = foto.murl",1)}var c=$("big_foto_container");c.style.height=h+"px";$("foto_title").innerHTML=foto.title;$("foto_title_ndash").style.display=(foto.title==""?"none":"inline");if(!NoFotoTitle){if(foto.title==""){document.title=title_stub.split("&quot;").join('"')+" "+$("fuckinshit").innerHTML+" "+title_suffix}else{document.title=foto.title.split("&quot;").join('"')+" "+$("fuckinshit").innerHTML+" "+title_suffix}}$("go_left").style.height=h+"px";$("go_right").style.height=h+"px";$("go_fullscreen").style.height=h+"px";$("go_left").style.display=prev_foto?"block":"none";if(prev_foto){$("go_left_a").href=prev_foto.link}if(next_foto){$("go_right_a").href=next_foto.link;setTimeout("if (next_foto) preload_foto.src = next_foto.murl",3000)}else{$("go_right_a").href=go_up}if(!d){window.location="#foto"+e}if(fullscreened){ShowFullSize(true)}$("embed_blog").value="";$("embed_blog").value='<a href="'+foto.link+'"><img border="0" src="'+foto.url+'" /></a><br /><small><a href="'+foto.link+'">'+foto.title+'</a> @ <a href="'+user_url+'">'+title_suffix+"</a></small><br />";$("embed_forum").value="";$("embed_forum").value="[URL="+foto.link+"][IMG]"+foto.url+"[/IMG][/URL]";$("embed_link").value="";$("embed_link").value=foto.link;$("embeddos").style.display="block";RefreshGorbunovPosition();if(!NoFirstFotoScroll){setTimeout(function(){Effect.ScrollToEx("stikko",{duration:0.1,offset:-44})},1)}NoFirstFotoScroll=false;return false}function CommentsAreLoaded(a){setTimeout(tooltip.ieall,1);setTimeout(RefreshGorbunovPosition,1)}function GoLeft(){if(prev_foto){Cool(prev_foto.fotoID)}return false}function GoRight(){if(next_foto){Cool(next_foto.fotoID)}else{Cool(fotos[0].fotoID)}return false}function ShowFullSize(h){if(!foto){return false}var c=$("fullscreen");var g=$("fullscreen_foto");var b=document.viewport.getScrollOffsets();var e=document.viewport.getDimensions();var d=b.top+(e.height/2-foto.height/2);g.src=foto.url;g.width=foto.width;g.height=foto.height;g.style.marginTop=d+"px";var a=$("bottomspot").cumulativeOffset();c.style.width=document.body.clientWidth+"px";c.style.height=a[1]+"px";c.style.display="block";fullscreened=true;return false}function FullScreenSlideShow(){if(next_foto){GoRight()}else{HideFullSize()}}function HideFullSize(){var b=$("fullscreen");var a=$("fullscreen_foto");a.src="http://i.cdn.promodeejay.net/0.gif";a.width=1;a.height=1;b.style.display="none";fullscreened=false;return false}function SlideshowWorker(){GoRight();if(next_foto){slideshowTimeout=setTimeout(SlideshowWorker,5000)}else{SlideshowToggle()}}function SlideshowToggle(){var a=$("slideshow_button");if(slideshowTimeout){clearTimeout(slideshowTimeout);slideshowTimeout=false;a.src="http://i.cdn.promodeejay.net/slideshow3.gif";if(tooltipped){a.setAttribute("tooltip",__SLIDESHOW_ON);tooltip.h()}else{a.title=__SLIDESHOW_ON}return false}slideshowTimeout=setTimeout(SlideshowWorker,5000);a.src="http://i.cdn.promodeejay.net/slideshow3_active.gif";if(tooltipped){a.setAttribute("tooltip",__SLIDESHOW_OFF);tooltip.h()}else{a.title=__SLIDESHOW_OFF}return false};
