
/*
 * Replace <hr /> by <div class="hr"><hr /></div> and preserve class
 */

// Prevent the default behaviour as soon as possible
document.writeln('<style type="text/css">hr{display:none;}</style>');

// Wrap the hr tag
$(document).ready(function(){
	$("body").find("hr").each(function() {
		// Get properties
		var mt = $(this).css("margin-top");
		var mb = $(this).css("margin-bottom");
		var cl = $(this).attr("class");
		// Wrap target and add properties
		$(this).wrap('<div class="hr"></div>').parent().css("margin-top", mt).css("margin-bottom", mb).addClass(cl).children().removeClass(cl);
	})
	//.remove("hr") // Optional
	;
});



/*
 * Use <a href="#" class="external">Link</a> to emulate <a href="#" target="_blank">Link</a>
 */
$(document).ready(function(){
	$("a.external").click(function(){
		$(this).attr({target: "_blank"});
	});
});



/* French initialisation for the jQuery UI date picker plugin. */
/* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
jQuery(function($){
	$.datepicker.regional['fr'] = {
		closeText: 'Fermer',
		prevText: '&#x3c;Préc',
		nextText: 'Suiv&#x3e;',
		currentText: 'Courant',
		monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
		'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
		monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
		'Jul','Aoû','Sep','Oct','Nov','Déc'],
		dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
		dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
		dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
		weekHeader: 'Sm',
		dateFormat: 'dd/mm/yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['fr']);
});

