$(document).ready(function() {
	$('body').addClass('js');
	$(function() {
		$("[title]").tooltip({
			position: {
				my: "left top",
				at: "left bottom",
				offset: "0 5"
			}
		});
	});
	$.datepicker.setDefaults($.datepicker.regional['fr']);
	$('a[rel*=popup]').click( function() {
		window.open(this.href+'popup/', 'popup', "width=640,height=480,menubar=no,location=no,resizable=no,scrollbars=yes,status=no");
		return false;
	});
	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});
	$('.coordonnees-tease a').click( function() {
		$('.coordonnees-tease').hide();
		$('.coordonnees-details').show();
		$.ajax({ url: window.location.pathname+'count/' });
		return false;
	});
	$('input.default').focus(
		function () { $(this).removeClass('default'); if (typeof this.val == 'undefined') this.val = this.value; if (this.value == this.val) this.value = ''; }
	).blur(
		function () { if (this.value == '') { $(this).addClass('default'); this.value = this.val; } }
	);

});
