
// COMMON: Load page in new window; use class="new_window" on <a> tags
$(document).ready(function(){
	$("a.new_window").click(function(){
		w = window.open(this.href, 'new_window');
		return false;
	});
});


// HEADER: jQuery Suckerfish Drop Downs
// http://be.twixt.us/jquery/suckerFish.php
$(document).ready(function(){
	if (document.all) {
		$("#nav ul li").hoverClass("suckerfish");
	}
});

$.fn.hoverClass = function(c){
	return this.each(function(){
		$(this).hover( 
			function(){ $(this).addClass(c); },
			function(){ $(this).removeClass(c); }
		);
	});
};


// HEADER: Select text from search box when clicked
$(document).ready(function(){
	$("#s").click(function(){
		$(this).select();
	});
});


// BOITE A OUTILS: Accordion
$(document).ready(function(){
  $('#accordion').accordion({
    active: false,
		autoHeight: false,
		collapsible: true,
		header: "h4"
	});
});

// BOITE A OUTILS: Toggle arrow next to title
$(document).ready(function(){
  $("#accordion h4").click(function(){
    $("#accordion h4").removeClass('open');
    $(this).addClass("open");
  });
});

// BOITE A OUTILS: Toggle item description
$(document).ready(function(){
  $("#accordion .item h5").click(function(){
    $(this).next().toggle();
  });
});
