window.onload = function() {
	$(document).ready(function(){
	$('#head_1').css({"opacity" : "0"});
	$('#head_1').css({"visibility" : "visible"}); 
	$('#head_2').css({"opacity" : "0"});
	$('#head_2').css({"visibility" : "visible"});
	$('#head_1').stop().animate({opacity: "1"},{queue:false,duration:1000});						   
	$('#head_2').stop().animate({opacity: "1"},{queue:false,duration:1000});						   
	
	if (document.getElementById('head_6')) {
		
	$('#head_6').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#head_7').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#head_8').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#head_9').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#head_10').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#head_11').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	
	
	
$('#head_3').stop().animate({ width: "372px", height: "280px"},{queue:false,duration:1000});
setTimeout(function(){$('#head_4').stop().animate({ width: "280px", height: "213px"},{queue:false,duration:1000});},1000);
setTimeout(function(){$('#head_5').stop().animate({ width: "186px", height: "235px"},{queue:false,duration:1000});},2000);

$('#ten_3').stop().animate({left: "201px", top: "61px", width: "409px", height: "313px"},{queue:false,duration:1000});
setTimeout(function(){$('#ten_2').stop().animate({left: "454px", top: "157px", width: "308px", height: "248px"},{queue:false,duration:1000});},1000);
setTimeout(function(){$('#ten_1').stop().animate({left: "710px", top: "172px", width: "218px", height: "274px"},{queue:false,duration:1000});},2000);

setTimeout("chahge_fotos_1()",7000);
	}
	if (document.getElementById('layer_1')) {
	$('#layer_1').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#layer_2').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#layer_3').css({"opacity" : "0", "width" : "auto", "height" : "auto"});
	$('#ten_4').css({"width" : "auto", "height" : "auto"});
	$('#layer_1').stop().animate({opacity: "1"},{queue:false,duration:1000});
	setTimeout("chahge_layer(1)",6000);
	}
				});
	
	$(document).ready(function(){
					$('.leftmenu li').hover(function(){
					if (this.id=='menu_act')	{}
					else {
					document.getElementById('menu_act').getElementsByTagName('a')[0].style.backgroundImage='url(images/menu_out.png)';
					}
				}, function() {
					document.getElementById('menu_act').getElementsByTagName('a')[0].style.backgroundImage='url(images/menu_hover.png)';
					});
		});
	
	$(document).ready(function(){
					$('.product1 img').hover(function(){
						
						$(this).css({"position" : "absolute"});	
						$(this).css({"zIndex" : "20"});	
						
						if ($.browser.safari) {
							var zaz=document.getElementById('scroll').scrollTop;
						zaz=-zaz+(-69);
						zaz=zaz+'px';
   $(this).css({"width" : "230px", "height" : "230px", "marginLeft" : "-69px", "marginTop" : zaz});
 }
 else {$(this).css({"width" : "230px", "height" : "230px", "marginLeft" : "-69px", "marginTop" : "-69px"});}
						
						
						
				}, function() {
					$(this).css({"width" : "90px", "height" : "90px", "margin" : "0"});
					$(this).css({"position" : "static"});	
				});
			});	
}


function chahge_fotos_1(){
$(document).ready(function(){
$('#head_3').stop().animate({opacity: "0"},{queue:false,duration:1000});
$('#head_6').stop().animate({opacity: "1"},{queue:false,duration:1000});

setTimeout(function(){$('#head_4').stop().animate({opacity: "0"},{queue:false,duration:1000});},500);
setTimeout(function(){$('#head_7').stop().animate({opacity: "1"},{queue:false,duration:1000});},500);

setTimeout(function(){$('#head_5').stop().animate({opacity: "0"},{queue:false,duration:1000});},1000);
setTimeout(function(){$('#head_8').stop().animate({opacity: "1"},{queue:false,duration:1000});},1000);
setTimeout("chahge_fotos_2()",6000);
				});	
}
function chahge_fotos_2(){
$(document).ready(function(){
						   
$('#head_6').stop().animate({opacity: "0"},{queue:false,duration:1000});
$('#head_9').stop().animate({opacity: "1"},{queue:false,duration:1000});

setTimeout(function(){$('#head_7').stop().animate({opacity: "0"},{queue:false,duration:1000});},500);
setTimeout(function(){$('#head_10').stop().animate({opacity: "1"},{queue:false,duration:1000});},500);

setTimeout(function(){$('#head_8').stop().animate({opacity: "0"},{queue:false,duration:1000});},1000);
setTimeout(function(){$('#head_11').stop().animate({opacity: "1"},{queue:false,duration:1000});},1000);
setTimeout("chahge_fotos_3()",6000);
				});	
}
function chahge_fotos_3(){
$(document).ready(function(){
						   
$('#head_9').stop().animate({opacity: "0"},{queue:false,duration:1000});
$('#head_3').stop().animate({opacity: "1"},{queue:false,duration:1000});

setTimeout(function(){$('#head_10').stop().animate({opacity: "0"},{queue:false,duration:1000});},500);
setTimeout(function(){$('#head_4').stop().animate({opacity: "1"},{queue:false,duration:1000});},500);

setTimeout(function(){$('#head_11').stop().animate({opacity: "0"},{queue:false,duration:1000});},1000);
setTimeout(function(){$('#head_5').stop().animate({opacity: "1"},{queue:false,duration:1000});},1000);
setTimeout("chahge_fotos_1()",6000);
				});	
}


function chahge_layer(asd){
	nasd=asd+1;
	if (nasd==4){nasd=1}

$(document).ready(function(){
$('#layer_'+asd).stop().animate({opacity: "0"},{queue:false,duration:1000});
$('#layer_'+nasd).stop().animate({opacity: "1"},{queue:false,duration:1000});
asd=asd+1;
if (asd==4){asd=1}

setTimeout("chahge_layer("+asd+")",6000);
				});	
}
function checkmailform()
{
  if ( (document.forms.mailer.email.value == '') && (document.forms.mailer.phone.value == '') )
  {
    alert("Enter E-mail or Phone");
    document.forms.mailer.email.focus();
    return false;
  }
   if  (document.forms.mailer.email.value != '') {
  if (! (/^\w+[-_\.]*\w+@\w+-?\w+\.[a-z]{2,4}$/.test(document.forms.mailer.email.value)) )
  {
    alert("Enter Correct E-mail");
    document.forms.mailer.email.focus();
    return false;
  }      
}
 
 if ( (document.forms.mailer.name.value == null) || (document.forms.mailer.name.value.length < 1) )
  {
    alert("Enter Your Name");
    document.forms.mailer.name.focus();
    return false;
  
  }

  
  
 if ( (document.forms.mailer.message.value == null) || (document.forms.mailer.message.value.length < 5) )
  {
    alert("Enter Your Message");
    document.forms.mailer.message.focus();
    return false;
  
  }  
  return true;
 
} 


