$(document).ready(function(){var hasFlash=$.flash.available;if(hasFlash){var flashContainer=$('#banner div').empty().flash({swf:'/swf/main.swf',width:920,height:360});}
var currentFlashFrame;$(".investmentRow").bind('click',mouseoverHandler);var intervalCallerID=setInterval(function(){var nextRow=$(".investmentRow.activeInvestment").next();if(nextRow.length==0){nextRow=$(".investmentRow:nth(0)");}
nextRow.trigger("click",true);},8200);function mouseoverHandler(event,doNotStopInterval){if(doNotStopInterval!==true){clearInterval(intervalCallerID);}
if(currentFlashFrame!=undefined){if(hasFlash){flashContainer.flash(function(){this.GotoFrame(currentFlashFrame+1);});}}
var $row=$(this);setTimeout(function(){$(".activeInvestment").removeClass("activeInvestment");$row.addClass("activeInvestment");$("#centerSlot .slotContent:visible").fadeOut(500,function(){var companyName=$(".investmentName p",$row).text();$("#centerSlot h3 span").text(companyName);var contentID=$row.attr("id")+"_longInfo";$("#"+contentID).fadeIn(500,function(){if(hasFlash){flashContainer.flash(function(){currentFlashFrame=getFlashFrameFor($row.attr("id"),true);this.GotoFrame(currentFlashFrame);});}});});},800);}
function getFlashFrameFor(company,isOpening){var frameNumber=$(":hidden","#"+company).val();if(!isOpening){frameNumber++;}
return parseInt(frameNumber);}});
