	var pathname = document.location.pathname;
	var pathnameResult = pathname.search(/annuaire.+/);
	
// Redirect for mobile device
if ((screen.width<640) && (screen.height<960)) {
	if(pathnameResult == -1){
		window.location="http://www.editus.mobi";
	}
}

// TODO: Enlever la fonction js là pour la placer ailleurs 
$(document).ready(function() { 
	var count =0;
	$("#ediSense li").each(function() {
		$(this).hide();
		if ($(this).find('a').html() != '' &&  $(this).find('a').html() != null && $(this).find('a').html() != undefined
				&&
				$(this).find('p').html() != '' &&  $(this).find('p').html() != null && $(this).find('p').html() != undefined) {
			$(this).show();
			count = parseInt(count) + parseInt(1);
		}
	});	
	
	if(count == 0){
		$('#ediSense').remove();
		$('#results').addClass('noEdisense');
		$('#rmap').addClass('noEdisense');
	}
	
	$('#sAround').click(function(){
		if($(this).val() == sAroundTxt){
			$(this).val('');
		}
	});
	
	$('#sAround').blur(function(){
		if($(this).val() == ''){
			$(this).val(sAroundTxt);
		}
	});
	
	$('#sRech').click(function(){
		if($(this).val() == sRechTxt){
			$(this).val('');
		}
	});
	
	$('#sRech').blur(function(){
		if($(this).val() == ''){
			$(this).val(sRechTxt);
		}
	});
	
	
	// Habillage evenementiel : logo
	//1er test est pour rtl
	if(pathnameResult != -1){
		$('#editusLogo').attr('title', 'Editus.lu, mon partenaire St-Valentin').attr('href', 'http://service.rtl.lu/editus/annuaire/recherche.html?q=saint+valentin');
		$('.noHome #editusLogo').attr('title', 'Editus.lu').attr('href', 'http://service.rtl.lu/editus/annuaire/');
	}else{
		$('#editusLogo').attr('title', 'Editus.lu, mon partenaire St-Valentin').attr('href', 'http://www.editus.lu/ed/fr/recherche.html?q=saint+valentin');
		$('.noHome #editusLogo').attr('title', 'Editus.lu').attr('href', 'http://www.editus.lu/ed/fr/');
	}
	
	
	//Mise en place des tests de langues pour l'operation moovi job
	//1er test est pour rtl
	if(pathnameResult != -1){
		// Habillage evenementiel : bandeau autopromo
		$('#iphone>a').attr('href', 'http://oas.luxweb.com/5c/editus.lu/clickcommand1/1234567890/x14/Editus/Editus-Moovijob-CC-01-12/ipix.gif/1');
		$('#iphone>a').attr('target', '_blank');
		$('#iphone>a>img').attr('alt', 'Moovijobs').attr('src', 'http://webfiles.luxweb.com/images/ed2/autopromo_mooviJobs3_fr.png');
	}else if(document.documentElement.lang == "fr"){
			// Habillage evenementiel : bandeau autopromo
			$('#iphone>a').attr('href', 'http://oas.luxweb.com/5c/editus.lu/clickcommand1/1234567890/x14/Editus/Editus-Moovijob-CC-01-12/ipix.gif/1');
			$('#iphone>a>img').attr('alt', 'Moovijob').attr('src', 'http://webfiles.luxweb.com/images/ed2/autopromo_mooviJobs3_fr.png');				
	}else if(document.documentElement.lang == "ltz"){
			// Habillage evenementiel : bandeau autopromo
			$('#iphone>a').attr('href', 'http://oas.luxweb.com/5c/editus.lu/clickcommand1/1234567890/x14/Editus/Editus-Moovijob-CC-01-12/ipix.gif/1');
			$('#iphone>a>img').attr('alt', 'Moovijob').attr('src', 'http://webfiles.luxweb.com/images/ed2/autopromo_mooviJobs3_fr.png');
			
	}else if(document.documentElement.lang == "de"){
			// Habillage evenementiel : bandeau autopromo
			$('#iphone>a').attr('href', 'http://oas.luxweb.com/5c/editus.lu/clickcommand1/1234567890/x14/Editus/Editus-Moovijob-CC-DE-01-12/ipix.gif/1');
			$('#iphone>a>img').attr('alt', 'Moovijob').attr('src', 'http://webfiles.luxweb.com/images/ed2/autopromo_mooviJobs3_de.png');
			
	}else if(document.documentElement.lang == "en"){		
			// Habillage evenementiel : bandeau autopromo
			$('#iphone>a').attr('href', 'http://oas.luxweb.com/5c/editus.lu/clickcommand1/1234567890/x14/Editus/Editus-Moovijob-CC-EN-01-12/ipix.gif/1');
			$('#iphone>a>img').attr('alt', 'Moovijob').attr('src', 'http://webfiles.luxweb.com/images/ed2/autopromo_mooviJobs3_en.png');
	} 
});
