<!--
function social_click(social) {
	u=location.href;
	t=document.title;
	
	window_properties = 'toolbar=0,status=0,width=626,height=436';
	
	switch (social){
		
		case 'facebook':
		window_url = 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t);	
		break;

		case 'digg':
		window_url = 'http://digg.com/submit?phase=3&url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
		window_properties = 'scrollbars=1,toolbar=0,resizable=1,width=980,height=800';
		break;
		
		case 'delicious':
		window_url = 'http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
		window_properties = 'toolbar=no,width=700,height=400';
		break;
		
		case 'google':
		window_url = 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
		window_properties = 'toolbar=no,width=600,height=470';
		break;

	}
	
	window.open(window_url,'sharer_'+social,window_properties);
	return false;
}

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function mpopup(theURL,winName,features) { //v2.0
  openWindow(theURL,winName,features);
}

function openWindowCenter(theURL,winName,winWidth,winHeight,features) {
	if(screen.width) {
	  var winl = (screen.width-winWidth)/2; 
	  var wint = (screen.height-winHeight)/2;
	}
	else {
	  winl = 0;wint =0;
	}
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + winHeight + ',';
	settings += 'width=' + winWidth + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open(theURL,winName,settings);
	win.window.focus();
}

function addFavorite(title, url) {
	
	if( document.all ){
		window.external.AddFavorite(location.href, document.title);
	}else if(window.sidebar){
		window.sidebar.addPanel(document.title, location.href,"");
	} 
	return false;
}

function sizeIFrame( id ) {
	var IFrame = jQuery( id );
	var innerDoc = (IFrame.get(0).contentDocument) ? IFrame.get(0).contentDocument : IFrame.get(0).contentWindow.document;
	IFrame.height(innerDoc.body.scrollHeight + 35);
}

function checkSelectAll(obj){
	if($(obj).val() == $(obj).attr('title')){
		
		$(obj).val('');
		
	} else if( $(obj).val() == '' ) {
	
		$(obj).val($(obj).attr('title'));
	}
}

function checkDate(year, month, day){
	var date = new Date(year, month, day);
	return date.getFullYear()==year && date.getMonth()==month && date.getDate()==day;
}

$().ready(function(){

	$.localScroll();
	
	$('input,textarea,select')
	.focus(	function(){	$(this).addClass('focus');})
	.blur(	function(){	$(this).removeClass('focus');})
	.hover(	function(){ $(this).addClass('hover'); },function(){ $(this).removeClass('hover');}	);
		 	
	$('.focus:first').focus();	
	$('ul#primary-links ul').hide();
	$('ul#primary-links > li').hover(function(){ $('ul',  $(this) ).show() }, function(){ $('ul',  $(this) ).hide() });
		
	$("#bloc_message a.close").click(function(){ $("#bloc_message").slideUp('fast') });
		
	$('.confirm').click(function(){
		
		var message = 'Êtes vous certain ?';
		if ($(this).attr('title'))
			message = $(this).attr('title');				
		return confirm(message);
	})
	
	$('.bloc_message').corner();
	
	$('.corner').corner();
	$('.corner5').corner("5px");
	
	$('input[name=login],input[name=password],',$('.frmLogin'))
	.each(function(){
		
		$(this)
		.focus(function(){
			if($(this).val()==$(this).attr('title'))
				$(this).val('');
		})
		.blur(function(){
			if($(this).val()=='')
				$(this).val($(this).attr('title'));
		});
		
		if($(this).val()=='')
			$(this).val($(this).attr('title'));
		
	})
	
	
	// jQuery sIFR 
	/*
	$('.sifr').sifr({ 
		path: 'files/sifr', // this will prepend 'resources/fonts/' to the font name
		font: 'cafeta.swf'
	});
	*/
	
});
//-->