/*$(document).mousemove(function(){
	$("#debug").html("page:"+page+" order:"+order);
});*/
function blanc() {
	$("body").animate({ backgroundColor: "#ffffff" }, 800);
	$("#footer_content").animate({ backgroundColor: "#ffffff" }, 800);
	$("#footer_content p").animate({ color: "#757575" }, 800);
	$("#footer_content a").animate({ color: "#757575" }, 800);
	$(".cat_lab").css('background-image','url("images/lab_nb.png")'); 
	$(".cat_designgraphique").css('background-image','url("images/design_graphique_nb.png")'); 
	$(".cat_designobjet").css('background-image','url("images/design_objet_nb.png")'); 
	$(".cat_webdesign").css('background-image','url("images/webdesign_nb.png")'); 
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function noir() {
	$("body").animate({ backgroundColor: "#191919" }, 800);
	$("#footer_content").animate({ backgroundColor: "#191919" }, 800);
	$("#footer_content p").animate({ color: "#ffffff" }, 800);
	$("#footer_content a").animate({ color: "#3a3a3a" }, 800);
	$(".cat_lab").css('background-image','url("images/lab.png")'); 
	$(".cat_designgraphique").css('background-image','url("images/design_graphique.png")'); 
	$(".cat_designobjet").css('background-image','url("images/design_objet.png")'); 
	$(".cat_webdesign").css('background-image','url("images/webdesign.png")');
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function changeTitle(title) { // fonction qui permet de changer le titre de la page.
	document.title = title;
	}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function iPhoneDetect() {
 if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))){
  //window.location.href = "http://9ko.fr/iphone.php";
  $("#liste").hide(); // on cache ce qui ne peut etre lu par l'iphone
  $("#footer_content").hide(); // on cache ce qui ne peut etre lu par l'iphone
  $(".nav4").hide(); // on cache ce qui ne peut etre lu par l'iphone
 }
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function retour_accueil() {
	$("#results").fadeOut(300, function () {
		$("#blocks").fadeIn(300, function () {});
	});
	$("#nav").animate({ 
			opacity: 1.0				
	}, 1000 );
	
	page = "accueil";
	changeTitle("9ko");
	SWFAddress.setValue(''); // on vide la barre d'adresse
	
	$("#retour").hide();
	$("#cache_nav").hide(); // fait disparaitre le cache de la nav			
	
	$("#results").empty(); // details
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function retour_accueil_permalink() {
	$("#nav").animate({ // on remontre la nav
		opacity: 1.0				
	}, 1000 );
	
	page = "accueil";
	changeTitle("9ko");
	SWFAddress.setValue(''); // on vide la barre d'adresse
	
	$("#cache_nav").hide(); // fait disparaitre le cache de la nav						  
	$("#results").empty(); // details
	$('.texte_description').fadeOut(300);
	$("#retour").fadeOut(300); // on fait disparaitre le bouton de retour
	
	afficheblocks("designgraphique,designobjet,webdesign,lab","oui","non");
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
