// JavaScript Document


var toplay;
var status = 0;
var blinkactive = 5;
var blinkk;
function activate_blink(act) {
	if (act) { blinkactive = true; } else { blinkactive = false; }
}

function evidenzia (som) {
	$(".tos").removeClass("overover");
	blinkk = setInterval( function() {
		if (blinkactive == true) {
			if (status == 0) {
				status = 1;
				$(".cntrls").show();
				$("#playCutback").addClass("overover");
				$("#tos-"+toplay).addClass("overover");
				$("#tos-"+toplay+" a").css("color", "black");
			} else {
				status = 0;
				$("#tos-"+toplay).removeClass("overover");
				$("#tos-"+toplay+" a").css("color", "white");
			}
		} else if (blinkactive == false) {
				status = 0;
				$("#playCutback").removeClass("overover");
				$("#tos-"+toplay).removeClass("overover");
				$("#tos-"+toplay+" a").css("color", "white");
				$(".cntrls").fadeOut();
				//$("#flashContent").hide();
				clearInterval(blinkk);
		}
	}, 1000);
	

}
$(document).ready(function() {
	
	//IMAGE LINK OVERLAY
	$(".entry a.image_link").hover(function () {$(".watch_video_div").remove(); $(this).prepend("<div class='watch_video_div'>&nbsp;</div>"); }, function () {$(".watch_video_div").remove(); });
	$("a.image_link_small").hover(function () {$(".watch_video_div_small").remove(); $(this).prepend("<div class='watch_video_div_small'>&nbsp;</div>"); }, function () {$(".watch_video_div_small").remove(); });
	
	//CUFON FONT REPLACEMENT
	Cufon.replace('.megalink, .CUT_sottotitolo, .megalinknolink, .tosubst, .tosubst2, .CUT_titolo, .CUT_descriptor, .CUT_statement, .CUT_statement_inv, .cut_statement_txt, .cufon', {hover: true});
	
	
	
		
});
$(window).load(function () {
	
});
