$(document).ready(function() {
	AutoHeight();
	$(".flash_sidebar,#frame,.padding").hide();
	$("#frame").slideDown(1500,function() {
		$(".padding").fadeIn(1000);
		$(".flash_sidebar").show();
		Marquee();
		Sifrize();
	});
	$("#menu ul > li[class!=active] > a").mouseover(function() {
		$(this).find("img").stop().animate({top:-50},250);
	}).mouseout(function() {
		$(this).find("img").stop().animate({top:0},700);
	});
	PngFix("#frame");
	PngFix("#menu ul");
	PngFix("#menu ul li a img");
	PngFix(".news_ticker");
	PngFix("#pied a img");
});

$(document).ready(function() {
	AutoHeight();
});

$(window).bind('resize', function() {
	AutoHeight();
});

function AutoHeight() {
	if($(window).height()<$(window).width()) {
		$("img.fond").css("width","100%");
		$("img.fond").css("height","auto");
	} else {
		$("img.fond").css("width","auto");
		$("img.fond").css("height","100%");	
	}
}

function Marquee() {
	$("marquee").marquee().mouseover(function() {
		$(this).trigger("stop");
	}).mouseout(function () {
		$(this).trigger("start");
	});
}
