function initSite()
{
	catSyncItems('1');
}



function openDetails(itemId)
{
	$.ajax({
	type: "GET",
	url: "modules/itemDetails.php",
	data: "itemId="+itemId,
	cache: true,
	//async: false,
	  success: function(html){
		$("#catDetDiv").html(html);
		$('#slide-'+itemId).cycle({ fx: 'fade', speed:  2500  });
		$("#catDetDiv").fadeIn(600);
		
	  }
	});	
	
}
function changeLang(sessVal){
	//alert("je change la session: "+sessItem+" qui devient: "+$(sessVal).attr('checked'));
	$.ajax({
	type: "GET",
	url: "modules/setSessionVal.php",
	data: "&lang="+sessVal,
	cache: true,
	async: true,
	success: function(html){
		location.reload() ; 
	  }
	});	
	
}
function closeMap()
{
	$("#contDivResellerMap").fadeOut("fast");
}
function closeBig()
{
	$("#portBiggerHolder").fadeOut("fast");
}
function portOpenFull(img)
{
	$("#portBiggerHolder").html('<div style=" width:100%; background-color:#ffcccc; cursor:pointer; color:#000000; font-weight:bold;" onclick="closeBig()">FERMER</div>');
	$("#portBiggerHolder").append('<img onclick="closeBig()" src="modules/portBig.php?item='+img+'"  />');
	$("#portBiggerHolder").fadeIn(600);
}

function getSessionValue(sessVal)
{
	var retVal="";
	$.ajax({
	type: "GET",
	url: "modules/getSessionVal.php?sessVal="+sessVal,
	data: "sessVal="+sessVal,
	cache: false,
	 async: false,

	  success: function(html){
		  if(html=='true')retVal='true';
		  else retVal='false';
	  }
	});
	
	return retVal;
}
/*
*/
function changeCss(id,css){
if($("#"+id).attr('class')!='menuLeftPanSelected' &&$("#"+id).attr('class')!='menuRightPanSelected')	$("#"+id).attr({"class": css});
}

function portScroll(page,id){
//closeDet($('#portOpened').val());
	var coeff=-page+1;
	$('#portScroller').animate({top:(268*coeff-1)}, {duration: 900, easing: 'easeOutCirc'});
	$.ajax({
	type: "GET",url: "modules/getPortItemInfo.php",	data: "item="+id,cache: false,	 async: false,
	success: function(html){ $('#portLowerCache').html(html); }	});	;
}
function goPageHome(pageNo){
	var coeff=-pageNo+1;$("span[id^='menuArtiste']").css("color","rgb(204, 204, 204)");
	$('#artistScroller').animate({left:450*coeff}, {duration: 500, easing: 'easeOutCirc'});	
	$('#menuArtiste-'+pageNo).css("color","#2e7eb0");

}
