﻿if(!window.Blogcom){Blogcom={};}Object.extend(Blogcom,{columnHeightFixIterationsToGo:40,fixColumnHeight:function(){var A=document.getElementById("content");var E=document.getElementById("posts-slidingdoor-top");var C=document.getElementById("sidebar-slidingdoor-top");var F=Position.positionedOffset(E)[1];var D=Position.positionedOffset(C)[1];if(Element.getHeight(E)==0){E=document.getElementById("posts");}if(Element.getHeight(C)==0){E=document.getElementById("sidebar");}var B=Math.max(F+Element.getHeight(E),D+Element.getHeight(C))+20;if(Element.getHeight(E)!=0&&Element.getHeight(C)!=0){A.style.height=B+"px";document.getElementById("posts-slidingdoor-top").style.width=Element.getWidth(E)+"px";document.getElementById("posts").style.height=B-F+"px";document.getElementById("sidebar-slidingdoor-top").style.width=Element.getWidth(C)+"px";document.getElementById("sidebar").style.height=B-D+"px";}Blogcom.columnHeightFixIterationsToGo--;if(Blogcom.columnHeightFixIterationsToGo>0){window.setTimeout("Blogcom.fixColumnHeight()",500);}},rollSlideshows:function(){if(!window.slideshows){return;}var B=false;var D;for(D in window.slideshows){var A;A=document.getElementById("slideshow-"+D);if(A){var E=A.firstChild;while(E&&E.nodeType!=1){E=E.nextSibling;}if(E){var C=0;while(C<window.slideshows[D].hrefs.length&&E.href!=window.slideshows[D].hrefs[C]){C++;}do{C=(C+1)%window.slideshows[D].hrefs.length;E.setAttribute("href",window.slideshows[D].hrefs[C]);E.firstChild.setAttribute("src",window.slideshows[D].srcs[C]);E=E.nextSibling;while(E&&E.nodeType!=1){E=E.nextSibling;}}while(E&&E.nodeName.toUpperCase()=="A");}}}window.setTimeout("Blogcom.rollSlideshows()",6000);},loadFriendsOnlyPosts:function(){$$(".friendsonlypost-placeholder").each(function(A){$w(A.className).each(function(C){var B;if(B=/friendsonlypost-placeholder-(\d)*/i.exec(C)){new Ajax.Updater(A.parentNode,"/_/friendsonlypost/",{parameters:{id:B[1]},method:"get"});}});});}});Event.onDOMReady(function(){Blogcom.fixColumnHeight();Blogcom.loadFriendsOnlyPosts();});Event.observe(window,"load",function(){Blogcom.columnHeightFixIterationsToGo=0;});Event.observe(window,"load",function(){Blogcom.rollSlideshows();});