       
$(document).ready(function()
{

 	
  $("img.a").hover(
    function() {
      $(this).stop().animate({"opacity": "0"}, "slow");
    },
    function() {
      $(this).stop().animate({"opacity": "1"}, "slow");
    

  });

   
  //player
  flowplayer("player", "media/scripts/flowplayer-3.1.3.swf");
	
  $("#gallery").hide();
	$('#dialog').hide();
	$('#label').hide();
	
	$("#show_movie").click(function(e){
    $('#dialog').show();
		$('#label').show();
		$f().play(); 
  });

	
  $("#close_movie").click(function(e){
	  $f().stop(); 
	  $('#dialog').hide();
	  $('#label').hide();
  });
  
 
 
  $('#gallery a').lightBox();
  $('#kiddie_rides_main a').lightBox();
  $('#promo_offer a').lightBox();
  $('#photos a').lightBox();
  
  $("#gallery").hide();
  $("#gallery_ico").click(function(e){
    $("#gallery").fadeIn("slow");
    $("#technical_data").hide();
  });
  
  $("#gallery_close").click(function(e){
    
    $("#gallery").hide();
    $("#technical_data").fadeIn("slow");
    
  });
  
  if($("#gallery_ico").hasClass('small')){
    $("#gallery").css({'height' : '260px'});
  }
  
  if($("#gallery_ico").hasClass('small_r')){
    $("#gallery").css({'height' : '200px'});
  }

  if($("#gallery_ico").hasClass('small_p')){
    $("#gallery").css({'height' : '100px'});
  }
  
  if($("#gallery_ico").hasClass('small_przy')){
    $("#gallery").css({'height' : '140px'});
  }	

  $('#lang').change(function() {
    window.location = $(':selected',this).attr('href')
  });

	
    $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)
  
    $("ul.topnav li span").hover(function() { //When trigger is clicked...
  
	    //Following events are applied to the subnav itself (moving subnav up and down)
	    $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
  
	    $(this).parent().hover(function() {
	    }, function(){
		    $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
	    });
  
	    //Following events are applied to the trigger (Hover events for the trigger)
	    }).hover(function() {
		    $(this).addClass("subhover"); //On hover over, add class "subhover"
	    }, function(){	//On Hover Out
		    $(this).removeClass("subhover"); //On hover out, remove class "subhover"
    });






	
});


	





