_g.namespace('_s.www.content').homeCarousel=function(){this.cid=null;this.cc=null;this.hp=null;var maxContentHeight=65;var ai={l:"templates/wpa/images/arrow_left.gif",r:"templates/wpa/images/arrow_right.gif"};var cCss={c:".article .content",m:".articleLinks"};this.init=function(cid,cc,pm,nm){this.cid=cid;this.cc=cc||0;this.hp=this.cc>1;this.adjRelPosition();var c=new _s.contentBlock.carousel();c.init(cid,cc,ai.r,ai.l,pm,nm);};this.adjRelPosition=function(){var mh=[];$("#"+this.cid+" "+_s.contentBlock.css.c).css("visibility","hidden");$("#"+this.cid+" "+_s.contentBlock.css.c).show();$("#"+this.cid+" "+cCss.c).each(function(){mh.push($(this).height());});$("#"+this.cid+" "+_s.contentBlock.css.c).css("visibility","");$("#"+this.cid+" "+_s.contentBlock.css.c).hide();if(mh.length==0)return;var h=parseInt(mh.sort(function(a,b){return b-a})[0]);if(h<=maxContentHeight)return;var delta=(h-maxContentHeight)>0?(h-maxContentHeight):0;var $mt=$("#"+this.cid+" "+cCss.m);if($mt.length>0&&$mt.css("top")!="undefined"){var mt=-1*parseInt($mt.css("top").replace("px",""));var mtd=(mt-delta)>0?delta:0;$mt.css("top",-1*mtd+"px");if(!this.hp)return;var $pt=$("#"+this.cid+" "+_s.contentBlock.css.p);var pt=-1*parseInt($pt.css("top").replace("px",""));$pt.css("top",-1*(pt-(mt-mtd))+"px");}};};
;
