$(document).ready(function()
{

	bannerTrack = function(tag) {
		_gaq.push(['mp3._trackEvent', 'CPA', tag]);
		_gaq.push(['ciaopeople._trackEvent', 'CPA', tag]);
	};



	$(".minisearch-txt-central").focus( function()
	{
		//gestione focus
		$(this).attr('value' , '');
	});

	$(".minisearch-txt-central").blur( function()
	{
		//gestione blur
		if( $(this).attr('value') == '' )
			$(this).attr('value' , 'cerca un artista o un brano...');
	});


	// PEZZOTTO - Scroll js per evitare bug legato a overflow:hidden su div central
	$(".linkInterno").each(function() {

		$(this).click(function(){
			name = $(this).attr('href');
			pos = $(name).offset();
			self.scrollTo(0, pos.top);
			return false;
		});

	});



	function setCookieOverlayer() {
		$.ajax({ url: BASE_PATH+"/setCookieOverlayer.php?f="+TIMEOUT_OVERLAYER,
				 context: document.body
		});

	}



	$(".myOverlay").colorbox({
			width:"370px",
			height:"360px",
			iframe:true,
			title: "pubblicit&agrave;&nbsp;&nbsp;&nbsp;",
			open: true,
			overlayClose: false,
			onOpen:function(){
								$("embed, object, iframe, #flash-embed").hide();
							},

			onComplete:function(){
								setTimeout( function() {
											$.fn.colorbox.close();
										}, 30000);
							},
			onClosed:function(){
								$("embed, object, iframe, #flash-embed").show();
								setCookieOverlayer();
							}
	});



});