$(document).ready(function(){
					   

	// Activate PrettyPhoto Lightbox handle
	
	// PNG Fix

    $('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 - 30;
        $('html,body')
        .animate({scrollTop: targetOffset}, 750);
       return false;
      }
    }
    });
  
	// setup ul.tabs to work as tabs for each div directly under div.panes
	$("ul#releasesPP ul.tabs").tabs("ul#releasesPP div.panes > div");
	$("ul#mixesPP ul.tabs").tabs("ul#mixesPP div.panes > div");
	var ascenceurHeight=0;
	
	//surligne
	$('#navigation li a:eq(0)').addClass('active');
	
	$('#navigation li a').click(function(){
			$('#navigation li a').removeClass('active');	
			$(this).addClass('active');
		});
	
	//ascensseur
	/*
	$(window).scroll(function () { 
		var scrollTop = $(window).scrollTop();
		var scrollBottom5 = $('.plop:eq(5)').offset().top-30;
		var scrollBottom4 = $('.plop:eq(4)').offset().top-30;
		var scrollBottom3 = $('.plop:eq(3)').offset().top-30;
		var scrollBottom2 = $('.plop:eq(2)').offset().top-30;
		var scrollBottom1 = $('.plop:eq(1)').offset().top-30;
		var scrollBottom0 = $('.plop:eq(0)').offset().top-30;
	
		var zoneHeight = $('#navigation').height()-21;
		
		//console.log('Distance ScrollTop : '+scrollTop);
		//console.warn('Hauteur Zone : '+zoneHeight);
		//console.error('ScrollBottom : '+ scrollBottom1);
		
		 
	
		if (parseInt(scrollTop) <= parseInt(scrollBottom1)){
			ascenceurHeight = Math.floor((scrollTop*27)/scrollBottom1);
			
		} else if (parseInt(scrollTop) <= parseInt(scrollBottom2) && parseInt(scrollTop) > parseInt(scrollBottom1)){
			ascenceurHeight = Math.floor((scrollTop*(27*2))/scrollBottom2);
			
		} else if (parseInt(scrollTop) <= parseInt(scrollBottom3) && parseInt(scrollTop) > parseInt(scrollBottom2)){
			ascenceurHeight = Math.floor((scrollTop*(27*3))/scrollBottom3);
			
		} else if (parseInt(scrollTop) <= parseInt(scrollBottom4) && parseInt(scrollTop) > parseInt(scrollBottom3)){
			ascenceurHeight = Math.floor((scrollTop*(27*4))/scrollBottom4);
			
		} else if (parseInt(scrollTop) <= parseInt(scrollBottom5) && parseInt(scrollTop) > parseInt(scrollBottom4)){
			ascenceurHeight = Math.floor((scrollTop*(27*5))/scrollBottom5);
		}
		//console.error('Navi Top : '+ascenceurHeight);
	
		$('#navigation .navi').css("top",ascenceurHeight+'px');
		
	});
	*/
	
});
