/* LikeBoxEnabler     ************* *//*
handleLikeBoxOpen = function(obj){
	//handleLikeBoxOpen
	//document.getElementById("tropicana").onLikeBoxOpen();
	document.getElementById("tropicana").onLikeBoxOpen();
}//handleLikeBoxOpen
handleLikeBoxClose = function(obj){
	//handleLikeBoxClose
	document.getElementById("tropicana").onLikeBoxClose();
}//handleLikeBoxClose
ShowLikeIframe = function (){
      document.getElementById('likeFrame').src="http://www.facebook.com/plugins/likebox.php?id=114032458631695&amp;layout=standard&amp;show_faces=false&amp;width=10&amp;action=like&amp;connections=10&amp;stream=true&amp;header=true&amp;height=570";
      document.getElementById('likeDiv').style.display="block";
}
openLikeBox = function(){
	//openLikeBox
	handleLikeBoxOpen();
	ShowLikeIframe();
}//openLikeBox
closeLikeBox = function(){
	//closeLikeBox
	handleLikeBoxClose();
	document.getElementById('likeDiv').style.display="none";
}//closeLikeBox
*/

/* Stats     ************* */
// call by flash on each rubrique
function pushPageview(){
	//alert("TagType:"+tagType+"\n"+"pageName:"+pageName);		
	var tagType = arguments[0];
	var pageTracker = _gat._getTracker('UA-17931118-1'); 
	if(tagType=="_trackPageview"){
		pageTracker._trackPageview(arguments[1]);		
	}else if(tagType=="_setCustomVar"){
		pageTracker._setCustomVar(arguments[1], arguments[2], arguments[3], arguments[4]);			
	}else if(tagType=="_trackEvent"){
		pageTracker._trackEvent(arguments[1], arguments[2], arguments[3]);			
	}
}

function showLikeBtn(){
    $('#facebookButton').stop().animate({bottom:'0'},'200');
};

function hideLikeBtn(){
    $('#facebookButton').stop().animate({bottom:'-54px'},'200');
};

$(document).ready(function() {
	$('html').attr("id","js");
	
	$('#content').append( $('#facebookButton') );
	
	$('#facebookButton a').click(function(e) {
		e.preventDefault();
	    hideLikeBtn();
	});
	
	var ga = document.createElement('script');
		ga.type = 'text/javascript'; 
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

});
