function resizeSlide(){
	var heightW=$(window).height()-143;
	var widthW=$(window).width()-30;
	var marginleftVideo=$(window).width()-200;
	
	$("#body").find('img').each( function() {	
		$(this).css('width', widthW+ 'px');
		$(this).css('height', 'auto');
		var altezzaImg=$(this).height();
		var diff =(heightW-altezzaImg)/2;
		$(this).css('margin-top', diff+ 'px');
	});
	$("a#player").css("width",widthW+"px");
	$("a#player").css("height",heightW+"px");
	$("a#player").css("left",marginleftVideo +"px");
	$("a#player").css("left","15px");
	
	
	
}

$(window).load(function() {
  if (jQuery.browser.safari && document.readyState != "complete"){
    setTimeout( arguments.callee, 100 );
    return;
  }
 // $("#player").hover(function(){$(this).animate({"left": "-=" +($(window).width()-215)+ "px"}, "slow");},function(){$(this).animate({"left": "+=" +($(window).width()-215)+ "px"}, "slow");});
  

resizeSlide();
$(window).resize(function() {
  resizeSlide();
});
});

function slideSwitch() {
    var $active = $('#body IMG.active');
    if ( $active.length == 0 ) $active = $('#body IMG:last');
    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#body IMG:first');
    	$active.addClass('last-active');
    	$next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
        $active.removeClass('active last-active');
    });
}
 

