
	var close = 1;
	
	var lastsalon = 1;

function show(val){
	
			$(val).css({
						"visibility" : "visible",
						"display"  :"block"
					});
	
}

function hide(val){
				$(val).css({
						"visibility" : "hidden",
						"display"  :"none"
					});


}


function cacheSilmo(){

$("#silmoflash").css("display","none");
	
}

function showNewBG(gamBG){

	hide(".fdBrandHome");
	show($("#BH"+gamBG));
	
	$("#img"+gamBG).imgpreload(function()
	{
		show("#img"+gamBG);
	});
	

	
}


	if ((navigator.appVersion.substring(17,25))=="MSIE 6.0"){
		
			isIE6=1;
		
		}else{
			
			isIE6=0;
		}


function showsalon(ids){
	

$(".salon").fadeOut(300);
$("#salon"+ids).fadeIn(900);
ids++;
if (ids>lastsalon) ids=1;
setTimeout("showsalon("+ids+")", 10000);	

}



	$(document).ready(function (){
				
				
			$(".salon").fadeOut(10);	
			showsalon(1);	
			
			$(".btn_mnu").mouseover(function(){
			if (isIE6==0){
					id = $(this).attr('id');
					
					$(".btn_mnu").css("backgroundImage","")	;
					
				if (id!="contact"){
					$(this).css("backgroundImage","url(/img/menu_fd2.png)")	;	
				}
					$(".txt_box").css({
						"visibility" : "hidden",
						"display"  :"none"
					});
					
					$("#"+id+"_txt").css({
					"visibility" : "visible",
					"display"  :"block"
					});	
				}
			
			});	
						var lflag = 0;
			$("#lang").click(function(){
				
				if (lflag==0) {show("#lang2"); lflag=1; $("#contact").css('visibility','hidden');}
				else{ hide("#lang2"); lflag=0;$("#contact").css('visibility','visible');}
									  
			});
			
			$(".fdo70").click(function(){
			
							
					hide(".fdo70");
					hide(".modal_box");
			
			});
			

			
			
			$(".fdo70").click(function(){
			
					hide(".waitdiv");
					hide(".fdo70");
					hide(".modal_box");
			
			});

			/*
			$(".txt_box").mouseout(function(){
				
					$(".txt_box").css({
						"visibility" : "hidden",
						"display"  :"none"
					});
					
					$(".btn_mnu").css("backgroundImage","")	;
				
			});
			*/
			$("#flash").mouseover(function(){
				
					$(".btn_mnu").css("backgroundImage","")	;
					$(".txt_box").css({
						"visibility" : "hidden",
						"display"  :"none"
					});
			});
			
			
	$('.imgBrand').imgpreload(function()
	{
		animBrand(1);
	});
		
		
		$('.imgBrand').mouseover(function(){
				
				
				
				$(this).animate({
					'width': '100px',
					'height': '500px',
					'marginTop' : '-20px'
				}, 250,'swing', function() {
				
				});	
				
				showNewBG($(this).attr('ref'));
				
				
		});
		
		$('.imgBrand').mouseout(function(){
				
				
				
				$(this).animate({
					'width': '75px',
					'height': '375px',
					'marginTop' : '1px'
				}, 250,'swing', function() {
				
				});								  
				
		});
						

			
			
			
			

	});
	
	
function animBrand(id){
	
		$("#"+id+"Brand").animate({
			'width': '37px',
			'height': '187px',
			'marginTop' : '50px'
			}, 250,'linear', function() {

				finishMove(id);
				nid = id + 1;
				if(nid<5) animBrand(nid);
				finishMove(8 - id);
				
				
		});	
		if(id<4){
		last = 8 - id;
		$("#"+last+"Brand").animate({
			'width': '37px',
			'height': '187px',
			'marginTop' : '50px'
			}, 250,'linear', function() {

				//finishMove(last);
				
				
		});	
		}

}	

function finishMove(id){
	
	
		$("#"+id+"Brand").animate({
			'width': '75px',
			'height': '375px',
			'marginTop' : '1px'
			}, 250,'linear', function() {
				
		});	
	
}

