// Gallery Hide from Flash...
//function showHome(){
//	//$("#header").fadeIn(500);	
//	$("#footer").fadeIn(500);	
//}
//function hideHome(){
//	//$("#header").fadeOut(500);	
//	$("#footer").fadeOut(500);
//}
function hideFooter(){
	if ( $("#home").length > 0 ) {
		$("#footer").fadeOut(500);
	}
    $("#menu_ht:visible").fadeOut(300);
}
function showMenu(){
    $("#footer").fadeIn(500);
    $("#menu_ht:hidden").fadeIn(300);
}
// JQuery
$(document).ready(function(){
	// DEFAULT
	//$('#content').minmax();
	// Win Close
	$(".win .close").click(
		function() {
			$(this).parent().parent(".win").fadeOut(500);
			return false;
		}
	);
	$(".win .close_form").click(
			function() {
				$(this).parent().parent().parent(".win").fadeOut(500);
				return false;
			}
		);
	// Window identification & lng
	$(".identification").click(
		function() {
			$(this).prev(".win").slideToggle(300);
			return false;
		}	
	);
	$(".lngs").click(
		function() {
			$(this).prev(".win").slideToggle(300);
			return false;
		}	   
	);
	//Menu
	$("#home_b_ht1").toggle(
		function () {
		 $("#menu_ht").fadeIn(500);							
		return false;
		},
		function () {
		 $("#menu_ht").fadeOut(300);							
		return false;
		}
	);
	// Window Resize...
	$(window).resize(function(){
		var t = $(window).height()-60;
		var l = $(window).width()/2-490;
		$("#header").css({'left': l});
		$("#footer").css({'top': t, 'width': $(window).width()-20});
		$("#body_off").css({'height': $(document).height()});
	});
	// Banner campanya
	if ( $(".win_banner").length > 0 ) {
		$(window).resize(function(){
			var w = $(".win_banner").width()/2;
			var l = $(window).width()/2-540;
			$(".win_banner").css({'left': l});
			$("#body_off").css({'width': $(window).width()});
			$("#body_off").css({'height': $(document).height()});
		});
		$("#body_off").click(function(){
			$(".win_banner").fadeOut(500);
			$("#body_off").slideUp("slow");
		});
		var w = $(".win_banner").width()/2;
		var l = $(window).width()/2-540;
		$(".win_banner").css({'left': l});
		$(".win_banner").show();
	}
	// Init
	var t = $(window).height()-60;
	var l = $(window).width()/2-490;
	$("#header").css({'left': l});
	$("#footer").css({'top': t, 'width': $(window).width()-20});
	$("#footer").fadeIn(500);
});