$(document).ready(function(){
	 $("dl dt.present").each(function(){
		$(this).bind("click", function(){
			$("dl dt.present").each(function(){
				if($(this.nextSibling).not(":hidden")){
					$(this.nextSibling).empty();
					$(this.nextSibling).animate({height: "hide", opacity: 0}, "slow");
				}
			});
			if($(this.nextSibling).is(":hidden")){
				$(this.nextSibling).animate({height: "show", opacity: 0.9}, "slow", function(){var swf = $(this).attr("rel"); var width=$(this).attr("relW");var height=$(this).attr("relH"); $(this).append('<center><div><object height="'+height+'" width="'+width+'" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="http://www.plan1.ru/mod/'+swf+'" name="movie"/><embed height="'+height+'" width="'+width+'" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.plan1.ru/mod/'+swf+'" type="application/x-shockwave-flash"/></object></div></center>');$.scrollTo($(this.offsetParent.offsetParent), 600);});
				$.addstat( $(this).attr("eid") , 6);
			} else {
				$(this.nextSibling).empty();
				$(this.nextSibling).animate({height: "hide", opacity: 0}, "slow");
			}
			
		});
		
	  });
	
	$("img.imgLogo").each(function(){
  		$(this).parent().append('<div class="transText" style="cursor:pointer;width: 350px;color: #fff; text-decoration:underline;font-size: 10px;background: transparent url(/images/tr.png) 0 0;position: absolute; bottom:10px; left:0; right:0; height:12px;line-height:10px;text-align: center;">Нажмите, чтобы узнать подробнее</div>');
		$(this).css({"cursor":"pointer"});
  		$(this).bind("click", function(){
	 		var eid = $(this).attr("eid");
	 		$("dl dt.present").each(function(){
	 			if($(this).attr("eid") == eid) $(this).click();
	 		});
	 	});
		$(this).parent().find("div.transText").bind("click", function(){
	 		var eid = $(this).parent().find("img.imgLogo").attr("eid");
	 		$("dl dt.present").each(function(){
	 			if($(this).attr("eid") == eid) $(this).click();
	 		});
	 	});
  });
});
