//var loc = 'http://localhost/';
//var loc = 'http://dev.aleapro.com/zago.it/';
var loc = 'http://www.zago.it/';
var hr = location.href;
var hr1 = hr.indexOf('www');
if (hr1 == -1)
loc = 'http://zago.it/';
//var loc = 'http://192.168.1.2/zago_birre/sito/';
//var loc = 'http://localhost/zago/';
var skip;

function init_events(skip)
	{
	
		if (skip != 2) skip = 1;
	

		
		$('.prodotto').css({display:'block'});

		$('#rassegna a').css(
   		 	{ padding:'5px 0px 5px 0px', display:'block', borderBottom:'1px dashed #ccc'}
		);

		$('#footer a').css(
   		 	{ color: '#cc9900'}
		);
		$('#footer a.grigetto').css(
   		 	{ color: '#999999'}
		);
		$('.b1 a').css(
   		 	{ color: '#000000', fontWeight:'bold'}
		);
		$('.b2 a').css(
   		 	{ color: '#000000'}
		);
		$('.prodotto a').css(
   		 	{ color: '#990000', fontWeight:'normal'}
		);
		$('#modulo a').css(
   		 	{ color: '#990000', fontWeight:'normal'}
		);
		$('.stampa a').css(
   		 	{ color: '#990000', fontWeight:'bold'}
		);
		$('.acquisti a').css(
   		 	{ color: '#ffffff', fontWeight:'bold'}
		);
		$('#testata').css(
   		 	{ opacity: 0}
		);
		$('#testata').animate(
   		 	{ opacity: 1}, {duration: 1000, easing: 'easeOutSine'});

		$('#anno').html(y0);

		if(location.href == loc+'it/contatti.php') {
			$('#footer .contatto').css({visibility:'hidden'});
		}

		if(location.href == loc+'it/zc_login.php' || location.href == loc+'it/zc_login.php?op=login') {
			$('#zc_login').css({visibility:'hidden'});
		}
		if (skip != 2) {
			$('.scroll-pane').jScrollPane();
		}
	};

/*function insertText(id,txt)
	{

		$(id).toggle(
			function () {
				$(this).html("ciao");
			},
			function () {
				$(this).html("");
			}
		)
	};*/

	function insertText(id,txt)
	{

		$(id).html(txt);

	};


function callPage(id,txt)
	{

		$(id).html("<div style='font-size:12px; margin-top:10px; font-style:oblique'>"+txt+"</div>");
		$('.scroll-pane').jScrollPane();

	};

function openPage(id,txt)
	{

		$(id).load(txt, init_events);

	};

function inizializza(a,b,d,c,m)
	{
		$('#menu').flash(
   		 	{ src: 'http://www.zago.it/swf/menu.swf?lng=0&col=0&sezione='+c+'&musica='+m, width: 960, height: 99}, { version: '9' }
		);
		$('#menu_gourmet').flash(
   		 	{ src: 'http://www.zago.it/swf/menu_gourmet.swf?lng=0&col=0&sezione='+c+'&musica='+m, width: 960, height: 99}, { version: '9' }
		);
		if ($('.prodotto').html())
		{
			var h = $('.prodotto').height();
			$('.prodotto .lbx').lightBox();
		}
		$('#footer').html("<div style='width:100%' align='left'><img src='"+loc+"img/lb/loading.gif' /></div>");
		var url = location.href;
		$('#footer').load(loc+"it/footer.php", {url: url}, init_events);
		$('#sfondo').css ({width:0});
		$('#immagine').css ({width:0});
		$('#sfondo').animate({width:640}, {duration: 1000, easing: 'easeOutSine'});
		$('#immagine').animate({width:320}, {duration: 1000, easing: 'easeOutSine'});
		$('.famiglia').css({width:a, left:d, visibility:'visible'});
		$('.famiglia').animate({top:b}, {duration: 2000, easing: 'easeOutBack'});
		$('.prodotto a').css(
   		 	{ color: '#990000', fontWeight:'normal'}
		);
		$('.famiglia a').css(
   		 	{ color: '#990000', fontWeight:'normal'}
		);
		$('.moduli a').css(
   		 	{ color: '#990000', fontWeight:'normal'}
		);
		$('#modulo a').css(
   		 	{ color: '#990000', fontWeight:'normal'}
		);
		$('.stampa a').css(
   		 	{ color: '#990000'}
		);
	};

