﻿	
	$(function(){
		$('.addsite').click(function(){
			if($('#formsubmit').css('display') == 'none'){
				$('#infopage').hide('drop', false, 500, function(){
					$('#formsubmit').show('drop', false, 500);											   
				});			
			}
			else{
				$('#formsubmit').hide('drop', false, 500, function(){
					$('#infopage').show('drop', false, 500);											   
				});						
			}
		});
		$('.msg').click(function(){
			$(this).hide('slow');					 
		});
		$('#contact').attr({'href':'m'+'a'+'i'+'l'+'t'+'o'+':'+'c'+'o'+'n'+'t'+'a'+'c'+'t'+'@'+'e'+'w'+'e'+'d'+'i'+'a'+'.'+'c'+'o'+'m'});
		$('input[name=q]').focus();
	});
	
	function premium(id){
		if(id != ''){
			$('#premium_mask').remove();
			$('#premium_iframe').remove();
			$('body').append('<div id="premium_mask"></div><iframe id="premium_iframe" src="http://annuaires.ewedia.com/allopass/payement.php?id=' + id + '" frameborder="0" scrolling="no"></iframe>');
			$('#premium_mask').click(function(){
				if(confirm('Voulez vous fermer cette fenêtre ?')){
					$('#premium_mask').remove();
					$('#premium_iframe').remove();					
				}
			});
			
		}
	}
	
	function sendSearch(elem, url){
		$(elem).attr({'action' : url + 'q:' + encodeURIComponent($('input[name=q]', $(elem)).val()) + '/'});
		$(elem).submit();
		return false;
	}
