$(document).ready(function(){
	Drag.init(document.getElementById("news-container"));
	$(".news-handler").bind("click", function(){
		if($("#news-container:visible").length==0)
		{
			$("#news-container").css({"left":Math.floor(Math.random()*1000+200) + 'px', "top":Math.floor(Math.random()*500) + 'px'}).show();
			$.cookie("OFCNnews", 1, {path:"/"});
		}
		else
		{
			$("#news-container").hide();
			$.cookie("OFCNnews", 0, {path:"/"});
		}
		$(this).get(0).blur();
	});
	if($("#news-container > .news-header > .news-handler").length>0 && ($.cookie("OFCNnews")==null || $.cookie("OFCNnews")=="1"))
	{
		$("#news-container").css({"left":Math.floor(Math.random()*1000+200) + 'px', "top":Math.floor(Math.random()*500) + 'px'}).show();
		$.cookie("OFCNnews", 1, {path:"/"})
	}
});
