$(document).ready(function(){ var clicked = false; var isSliding = false; var slx = 0; var slw = 0; var slc = 0; $(window).scroll(function(){  if($(this).scrollTop() > 50)  {  $(".topFixedMenu .logo").fadeOut(200, function(){  $(".topFixedMenu .logoMini").fadeIn(200);  });  }  else  {  $(".topFixedMenu .logoMini").fadeOut(200, function(){  $(".topFixedMenu .logo").fadeIn(200)});  }  if($(this).scrollTop() > 530){  $(".fixedStatus").show();  }  else $(".fixedStatus").hide();  if(!clicked && !isSliding){  isSliding = true;  $(".fixedStatus .links a, .slideStatusMenu .links a").removeClass("active");  if($(this).scrollTop() < 1300){ slx = 0, slw = 142; slc = 0; }  else if($(this).scrollTop() > 1300 && $(this).scrollTop() < 1720){ slx = 190, slw = 165; slc = 1; }  else if($(this).scrollTop() > 1720 && $(this).scrollTop() < 2550){ slx = 405, slw = 180; slc = 2; }  else if($(this).scrollTop() > 2550){ slx = 650, slw = 75; slc = 3; }  $(".fixedStatus .slideBg, .slideStatusMenu .slideBg").stop().animate({"left":slx+"px"}, 400);  $(".fixedStatus .slideBg .middle, .slideStatusMenu .slideBg .middle").stop().animate({"width":slw+"px"}, 400, function(){isSliding = false;});  $(".fixedStatus .links a:eq("+slc+"), .slideStatusMenu .links a:eq("+slc+")").addClass("active");  }  }); $(".fixedStatus .links a, .slideStatusMenu .links a").click(function(){ if(!clicked && !isSliding){ if($(this).hasClass("active")) return false; clicked = true; var wpos = new Array(880, 1320, 1740, $(".logincontent").offset().top - 130); var lpos = new Array(0, 190, 405, 650); var lw = new Array(142, 165, 180, 75); var i = $(this).index(); $(".fixedStatus .links a, .slideStatusMenu .links a").removeClass("active"); $(".fixedStatus .slideBg, .slideStatusMenu .slideBg").animate({"left":lpos[i]+"px"}, 400); $(".fixedStatus .slideBg .middle, .slideStatusMenu .slideBg .middle").animate({"width":lw[i]+"px"}, 400, function(){$(".fixedStatus .links a:eq("+i+"), .slideStatusMenu .links a:eq("+i+")").addClass("active");}); $("html, body").animate({scrollTop:wpos[i]+"px"}, 500, function(){clicked = false;isSliding = false;}); } return false; }); $(".topFotoSlider #slider").nivoSlider(); $(".post .select").hover(function(){  $(".options", this).show();  }, function(){  $(".options", this).hide();  }); $(".post .select .options a").click(function(){  var val = $(this).text();  $(this).parent().prev().prev("label").text("Kde chci přijít na casting:").hide();  $(this).parent().prev("input").attr("value", val);  return false;  }); $(".topFixedMenu .login, .head .text .login, .content .contentFotoSlider .slider .text .login").click(function(){$("html, body").animate({scrollTop:$(".logincontent").offset().top - 130}, 500);}); $(".topFixedMenu .became, .head .text .became").click(function(){$("html, body").animate({scrollTop:"880px"}, 500);}); var isSlide = false; var total = 3; var current = 0; var slideBgX = new Array(0, 83, 203, 320); var slideBgW = new Array(60, 97, 93, 80); $(".contentFotoSlider .arrowLeft").click(function(){ if(isSlide) return; isSlide = true; current -= 1; current = current < 0 ? 3 : current; $(".contentFotoSlider .slider").animate({"top":"-245px", "opacity":"0"}, 400, function(){  $(".itemTxt, .picItem", this).hide();  $(".itemTxt:eq("+current+"), .picItem:eq("+current+")", this).show();  $(".contentFotoSlider .slider").animate({"top":"40px", "opacity":"1"}, 400, function(){isSlide = false;});  }); $(".contentFotoSlider .status .slideBg").animate({"left":slideBgX[current]+"px"}, 400, function(){  $(".contentFotoSlider .status .links a").removeClass("active");  $(".contentFotoSlider .status .links a:eq("+current+")").addClass("active");  }); $(".contentFotoSlider .status .slideBg .middle").animate({"width":slideBgW[current]+"px"}, 400); }); $(".contentFotoSlider .arrowRight").click(function(){ if(isSlide) return; isSlide = true; current += 1; current = current > 3 ? 0 : current; $(".contentFotoSlider .slider").animate({"top":"-245px", "opacity":"0"}, 400, function(){  $(".itemTxt, .picItem", this).hide();  $(".itemTxt:eq("+current+"), .picItem:eq("+current+")", this).show();  $(".contentFotoSlider .slider").animate({"top":"40px", "opacity":"1"}, 400, function(){isSlide = false;});  }); $(".contentFotoSlider .status .slideBg").animate({"left":slideBgX[current]+"px"}, 400, function(){  $(".contentFotoSlider .status .links a").removeClass("active");  $(".contentFotoSlider .status .links a:eq("+current+")").addClass("active");  }); $(".contentFotoSlider .status .slideBg .middle").animate({"width":slideBgW[current]+"px"}, 400); }); $(".contentFotoSlider .links a").click(function(){ isSlide = true; if(current != $(this).index()) { current = $(this).index(); $(".contentFotoSlider .slider").animate({"top":"-245px", "opacity":"0"}, 400, function(){  $(".itemTxt, .picItem", this).hide();  $(".itemTxt:eq("+current+"), .picItem:eq("+current+")", this).show();  $(".contentFotoSlider .slider").animate({"top":"40px", "opacity":"1"}, 400, function(){isSlide = false;});  }); $(".contentFotoSlider .status .slideBg").animate({"left":slideBgX[current]+"px"}, 400, function(){  $(".contentFotoSlider .status .links a").removeClass("active");  $(".contentFotoSlider .status .links a:eq("+current+")").addClass("active");  }); $(".contentFotoSlider .status .slideBg .middle").animate({"width":slideBgW[current]+"px"}, 400); } return false; }); $(".text .itemTxt:eq("+current+")").show(); $(".foto .picItem:eq("+current+")").show(); $(".steps .step1, .steps .step3, .steps .step5").hover(function(){  $(this).stop().animate({"top":"-10px"}, 300);  }, function(){  $(this).stop().delay(500).animate({"top":"0px"}, 500);  }); $(".steps .step2, .steps .step4").hover(function(){  $(this).stop().animate({"top":"40px"}, 300);  }, function(){  $(this).stop().delay(500).animate({"top":"50px"}, 500);  }); $(document).mousemove(function(e){ var mx = e.pageX / $(this).width(); var paralexX = (mx * 120) - 230; var textX = (mx * 30); var fotoX = (mx * 10); $(".head .paralex").css({"left":paralexX+"px"}); $(".head .text").css({"left":textX+"px"}); $(".head .topFotoSlider").css({"right":fotoX+"px"}); }); $(".content .questions .left .girl").click(function(){ if($(this).hasClass("active")) return;  var curr = $(this).index();  $(".content .questions .left .girl").removeClass("active");  $(".content .questions .left .girl:eq("+curr+")").addClass("active");  $(".content .questions .right #miss0, .content .questions .right #miss1, .content .questions .right #miss2").hide();  $(".content .questions .right #miss"+curr).show();  }); Cufon.replace("h1, h2, h3, .questions .right p span, .copyright ul li.first"); Cufon.Now(); });
