jQuery(document).ready(function($) {

/* 
 * Accordion Init
*/
    	$(function() {
	        $( "#accordion" ).accordion({
	            autoHeight: false
	        });
	    });
	    $('.accordion .head').click(function() {
	        $(this).next().toggle('slow');
	        return false;
	    }).next().hide();
/* 
 * Target Link auto _blank
*/

        $("a[href^='http://']").each(function(){
          var thehref = $(this).attr('href');
          if(!thehref.match(window.location.host))
              $(this).attr('target', '_blank').addClass('external_link');
        });
         
/* 
 * Ancre automatique
*/
        var uri = document.location.pathname;
        var indice = uri.lastIndexOf('.')+3;
        var current_page=uri.substring(indice,uri.length);
        if(current_page!=""){
            $('html').animate({scrollTop : 300}, 'slow');
        }


});
