// rotator
function theRotator() {
	$('#rotator li').css({opacity: 0.0});
	$('#rotator li:first').css({opacity: 1.0});
	setInterval('rotate()',5000);
}
function rotate() {
	var current = ($('#rotator li.show')?  $('#rotator li.show') : $('#rotator li:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('#rotator li:first') :current.next()) : $('#rotator li:first'));
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
};

$(document).ready(function() {
	theRotator();
	$("#mail-go .name input").mouseover(function()
  {  $("#mail-go .name strong").remove(); }
);
	$("#mail-go .email input").mouseover(function()
  {  $("#mail-go .email strong").remove(); }
);
	$("#mail-go .not_bot input").mouseover(function()
  {  $("#mail-go .not_bot strong").remove(); }
);

$(function() {
    $(".gall").jCarouselLite({
       btnNext: ".next-b",
        btnPrev: ".prev-b",
		visible: 1,
		circular: false,
		speed: 1
    });
});
// carusel portfolio
$(function() {
    $(".port-gall").jCarouselLite({
       btnNext: ".next-p",
        btnPrev: ".prev-p",
		visible: 1,
		circular: false,
		speed: 1
    });
});
 });
 // valide form
function checkFormz(form){
 fio = document.getElementById("name");
email = document.getElementById("email");
bot = document.getElementById("not_bot");
reg = /[a-z0-9-_.]+@[a-z0-9-_.]/i;
var prov = reg.test(email.value);
if(bot.checked !== true){
   $("#mail-go .not_bot input").before("<strong>Поставьте галочку у поля<br /> 'Я не робот'</strong>");
   $("#mail-go li strong").fadeTo("slow", 0.9); 
	}
if(prov !== true){
   $("#mail-go .email input").before("<strong>Заполните поле 'E-mail:'</strong>");
   $("#mail-go li strong").fadeTo("slow", 0.9);
	}
if(fio.value == "Ф.И.О.:"){
   $("#mail-go .name input").before("<strong>Заполните поле 'Ф.И.О.:'</strong>");
   $("#mail-go li strong").fadeTo("slow", 0.9);
	}
if (bot.checked == true && prov == true && fio.value !== "Ф.И.О.:") {
return true;
}
else {return false;}
};
// valide form
function checkFormn(form){
email = document.getElementById("email");
bot = document.getElementById("not_bot");
reg = /[a-z0-9-_.]+@[a-z0-9-_.]/i;
var prov = reg.test(email.value);
if(bot.checked !== true){
   $("#mail-go .not_bot input").before("<strong>Поставьте галочку у поля<br /> 'Я не робот'</strong>");
   $("#mail-go li strong").fadeTo("slow", 0.9); 
	}
if(prov !== true){
   $("#mail-go .email input").before("<strong>Заполните поле 'E-mail:'</strong>");
   $("#mail-go li strong").fadeTo("slow", 0.9);
	}
if (bot.checked == true && prov == true) {
return true;
}
else {return false;}
}
// carusel otziv

// carusel doverie
$(function() {  
				$(".partn").jCarouselLite({    
						speed:750,
						btnNext: ".next1",
						btnPrev: ".prev1",
						visible: 5 
					});
				});

