var PrevImage=0;
var ActiveImage=1;
var NextImage=2;
var Maximum=6;
var i=1;
var path = window.location.pathname;
var page = path.split("/").pop();
$(document).ready(function() {
var adresy = ["../img/headers/header_1.png","../img/headers/header_2.png","../img/headers/header_3.png","../img/headers/header_4.png","../img/headers/header_5.png","../img/headers/header_6.png"];
var alt = "Ohňová Šou";
for (i;i<=Maximum;i++)
{
if (page == "index.html" || page == "")
{
if (adresy[i-1].endsWith(".mp4"))
{
$(".Header_container").append('');
}
else
$(".Header_container").append('');
}
else
{
$(".Header_container").append('');
}
}
$(".img_1").animate({left:0}, 1);
setTimeout(MoveHeader, 4000);
});
$(document).on('mouseenter','#home', function (event) {
$(".home").css("visibility", "visible").animate({width:185},200);
});
$(document).on('mouseleave','#home', function(event){
$(".home").animate({width:0},200).css("visibility", "hidden");
});
$(document).on('mouseenter','#cont', function (event) {
$(".cont").css("visibility", "visible").animate({width:80},200);
});
$(document).on('mouseleave','#cont', function(event){
$(".cont").animate({width:0},200).css("visibility", "hidden");
});
$(document).on('mouseenter','#offe', function (event) {
$(".offe").css("visibility", "visible").animate({width:125},200);
});
$(document).on('mouseleave','#offe', function(event){
$(".offe").animate({width:0},200).css("visibility", "hidden");
});
$(document).on('mouseenter','#abou', function (event) {
$(".abou").css("visibility", "visible").animate({width:53},200);
});
$(document).on('mouseleave','#abou', function(event){
$(".abou").animate({width:0},200).css("visibility", "hidden");
});
function MoveHeader()
{
if (PrevImage != 0)
$(".img_" + String(PrevImage)).animate({opacity:0},1).animate({left:1367}, 1);
PrevImage++;
$(".img_" + String(ActiveImage)).css("z-index", "3").animate({opacity:1},1).animate({left:-1367}, 1200);
ActiveImage++;
$(".img_" + String(NextImage)).css("z-index", "2").animate({opacity:1},1).animate({left:0}, 0);
NextImage++;
if (PrevImage > Maximum)
PrevImage = 1;
if (ActiveImage > Maximum)
ActiveImage = 1;
if (NextImage > Maximum)
NextImage = 1;
setTimeout(MoveHeader, 6000);
}
function MenuItemEnter(Name)
{
$(Name).css("visibility", "visible").animate({width:200},500);
}
function MenuItemLeave(Name)
{
$(Name).animate({width:0},200).css("visibility", "hidden");
}