jQuery(document).ready(function(){
	var so = new SWFObject("http://"+location.host+"/i/Flash/flash-informer.swf", "swf_flash_informer", "400","100%", "8", "#ffffff");
	so.addVariable("current_page", location.pathname);
	so.addVariable("domen", location.host);
	so.addVariable("protocol", location.protocol);
	so.addVariable("link_to_menu", "/name.Flash/method.Menu/ajax.yes/cat.13/");
	so.addVariable("action_text", "Торопись выигрывать призы в игре «Адам и Ева»!");
	so.addVariable("link_to_action", "/media/nid.1121/");
	so.addVariable("jokelimit", 5);
	so.addParam("wmode", "transparent");
	so.write("for_flash_informer");
	
	jQuery('#informer_container').mouseover(showInformer);
});

function showInformer(){
	var informer = jQuery('#informer_container');
	informer.unbind();
	informer.width(400);
	informer.height(190);
	var flash = jQuery('#for_flash_informer');
	flash.css('visibility','visible');
	jQuery('#for_image_informer').css('display','none');
	jQuery('#for_flash_informer').mouseout(function(){
		callExternalInterface();
		hideInformer();
	});
}
function hideInformer(){
	var informer = jQuery('#informer_container');
	var flash = jQuery('#for_flash_informer');
	flash.css('visibility','hidden');
	informer.width(102);
	informer.height(110);
	jQuery('#for_image_informer').css('display','block');
	informer.unbind();
	setTimeout(function(){
		informer.mouseover(showInformer);
	}, 300);
}
function callExternalInterface() { 
	thisMovie("swf_flash_informer").ResetInformer();
}
function thisMovie(movieName) { 
	if (navigator.appName.indexOf("Microsoft") != -1) return window[movieName];
	else return document[movieName]; 
}
function Select(){
	var ta = document.getElementById('code_result');
	ta.focus();
	ta.select();
}

