initialiser();
function initialiser(){
	// détection mobile
	var uagent = navigator.userAgent.toLowerCase();
	var mobile = detectDevice(uagent);
	
	if(!mobile){
		// redirection
		var url = window.location;
		if(url.href.indexOf("#")==-1){
			var newAddress = url.protocol + "//" + url.hostname + "/#" + url.pathname;
			window.location.replace(newAddress);
		}
	}
}
function detectDevice(uagent){
	var mobile = false;
	var uagents = new Array("android", "ipod", "iphone", "windows ce", "blackberry", "palm", "ipad");
	for(var c=0; c<uagents.length && mobile == false; c++){
		if(uagent.search(uagents[c])>-1){
			mobile = true;	
		}
	}
	

	return mobile;
}

