$(document).ready(function() {
  $('#logo').animate({"left": "+=1000px"}, 2500);
  $('#animation').animate({"left": "+=-300px"}, 6500);
  $('#login').fadeIn(1000);  
 /*
  $('a').not('#akce ul a').click(function () { 
    $.prettyPhoto.open('images/exit.png','','');
    return false;   
  })
*/ 
   
  $("#backgroundImage").fadeIn(4000);
  $("#beta").click(); 
  $('#podmenu li').fadeIn(4000);     
  $("#menu li[id!='no']").hover( 
      function() {  
        $(this).animate({"top": "+=-20px"}, 400).animate({"opacity": "1"}, "fast");        
      },
      function() {  
        $(this).animate({"top": "+=20px"}, 200).animate({"opacity": "0.8"}, "fast");;        
      }
    );
   
  
  function slideSwitch() {    
     $('#akce li[class!="current"]').click();
  }
    
  $(function() {
        setInterval(slideSwitch, 7000 );
  });	  

    var imgWrapper = $('#plakat > img');
    imgWrapper.hide().filter(':first').show();
    $('#akce li').click(function () { 
       if (this.className.indexOf('current') == -1){       
       imgWrapper.hide();
       var pic = $(this).attr("name");       
       imgWrapper.filter(pic).fadeIn(500);    
       $('#akce li').removeClass('current');
             
       $('#akce li').each(function(i, el) {
          if($(el).html() != "" ) {
            $(el).html($(el).html().replace(/-on/ig, "-off"));
          }
        }); 
                 
       $(this).addClass('current'); 
          $(this).each(function(i, el) {
            if($(el).html() != "" ) {
              $(el).html($(el).html().replace(/-off/ig, "-on"));
            }
       });             
      }
    return false;           
  });

  if ($.browser.msie) {
    $('#slecna').css('display', 'block');         
  } else  {     
    $("a[class!=no]").hover(  
        function() {  
          $(this).stop().animate({"opacity": "0.8"}, "fast");
        },
        function() {  
          $(this).stop().animate({"opacity": "1"}, "fast");
        }
      );   
  }      
  $('#obsah').fadeIn("slow");      
  $('#top').fadeIn("slow");
        
  $("a[rel^='prettyPhoto']").prettyPhoto({ 
			opacity: 0.45,
			showTitle: false,
      allowresize: true,
			theme: 'dark_rounded',
      default_width: 290,
			default_height: 250
  }); 
   
  $("#scroller").simplyScroll({
			autoMode: 'loop'
  });
  
});	
/************** MP3 **************/
  var cacheBuster = "?t=" + Date.parse(new Date());		
  var stageW = 261;//"100%";
  var stageH = 50;//"100%";
  var attributes = {};
  attributes.id = 'player';
  attributes.name = attributes.id;
  var params = {};
  params.wmode = "transparent";
  params.allowfullscreen = "true";
  params.allowScriptAccess = "always";			
  params.bgcolor = "#ffffff";
  var flashvars = {};					
  flashvars.componentWidth = stageW;
  flashvars.componentHeight = stageH;
  flashvars.pathToFiles = "player/";
  flashvars.xmlPath = "settings.xml";
  flashvars.artistName = "Dj Robert Chochola";
  flashvars.songName = "Promo Mix 4 Retro Music Hall";
  flashvars.songURL = "dj robert - preview.mp3";			
  swfobject.embedSWF("player/player.swf"+cacheBuster, attributes.id, stageW, stageH, "9.0.124", "player/expressInstall.swf", flashvars, params);

/***********************************/
