$(function() { 
	$(".lavaLamp").lavaLamp({ 
		fx: "backout", speed: 700 })
});

function updateOrientation() { 
    switch(window.orientation) { 
    case 0: 
        orient = "portrait"; 
        break; 
    case -90: 
        orient = "landscape"; 
        break; 
    case 90: 
        orient = "landscape"; 
        break; 
    case 180: 
        orient = "portrait"; 
        break; 
    } 
    document.body.setAttribute("orient", orient); 
} 

$(document).ready(function(){
	
 	if(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) { 
  		$('#list_musicians li a').each(function(){
	   		content = $(this).html();
	   		$(this).parent().html(content);
	   		$(this).remove();
 		});
 		
 		picture = $('#picture_registre').parent('a').attr("href","#");
 		
 	} 

	if(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) { 
  		
	} else{
		height_content = $("#content_with_sidebar").height();
		height_sidebar = $("#sidebar").height();
		if(height_content > height_sidebar){
			$("#sidebar").height(height_content);
		}else{
			$("#content_with_sidebar").height(height_sidebar);
		}
	}

	$(document).pngFix(); 
	
	$('.boxgrid.captionfull').hover(function(){
		height_cover = $(".cover", this).height();
		height = 163 - height_cover;
		$(".cover", this).stop().animate({top:height},{queue:false,duration:500});
	}, function() {
		$(".cover", this).stop().animate({top:'162px'},{queue:false,duration:500});
	});
	
	$('.old_directors').hover(function(){
		height_cover = $(".cover", this).height();
		height = 271 - height_cover;
		$(".cover", this).stop().animate({top:height},{queue:false,duration:500});
	}, function() {
		$(".cover", this).stop().animate({top:'271px'},{queue:false,duration:500});
	});
	
	$('.director').hover(function(){
		height_cover = $(".cover", this).height();
		height = 271 - height_cover;
		$(".cover", this).stop().animate({top:height},{queue:false,duration:500});
	}, function() {
		$(".cover", this).stop().animate({top:'270px'},{queue:false,duration:500});
	});
	
	

});	