/**
 * @author laurent
 */


$(function(){

    $("ul#ssnav li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul#ssnav li ul li:has(ul)").find("a:first").append(" &raquo; ");


	/*smooth scrolling*/
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
			&& location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target
			|| $('[name=' + this.hash.slice(1) +']');
		if ($target.length) {
			var targetOffset = $target.offset().top-150;
			$('html,body')
			.animate({scrollTop: targetOffset}, 1000);
			return false;
			}
		}
	});

});


$(document).ready(function() {


	 $('#galaxieFing').change(
	 	function() {
			gotosite(this.value);
		}
	 );
	 
	 $("#filtreType").change(function(){
  		gotosite(this.value);
	}); 


	menu.init();



 });


function gotosite(site) 
{
	if(site != "") {
		self.location=site;	
	}else {
		return;	
	}
}




