jQuery.noConflict();

jQuery(document).ready(
function ()
{    
   var MENU_SPEED = 250;
    
   jQuery(".nav > li").each(function()
   {
        var hoverState = false;
        var ctx = this;
        
        function checkStatus() {                            
            if (hoverState == false) {
                jQuery(ctx).children(".subnav").slideUp(MENU_SPEED);
                jQuery(ctx).children("a").removeClass("current");
            }
        }
                
        jQuery(this).hover(function () {        
            hoverState = true;
            if (!jQuery(this).children("a").hasClass("on"))
            jQuery(this).children("a").addClass("current");  
            jQuery(this).children(".subnav").slideDown(MENU_SPEED);       
        },
        function() {                    
            hoverState = false;
            setTimeout(checkStatus, 100);
        });        
   });
                
    /*slideshow text*/
         jQuery(".slideshow-text").hide();
         jQuery(".slideshow-text").css("opacity", "0.8");
            jQuery(".slideshow-wrapper").hover(function() {
            jQuery("#slideshow-nav").fadeIn('1000');
            jQuery(".slideshow-text").slideToggle('1000');
            
        },
            function() {
                jQuery(".slideshow-text").slideToggle('1000');
                jQuery("#slideshow-nav").fadeOut('1000');
            });
            
    /*vacancies*/
        jQuery(".vacancies-more").click(function(){
            jQuery(this).parent().children(".vacancies-hidden").slideToggle("normal");
        });
        
    /*film details*/
    jQuery(".film-details-more").click(function(){
            jQuery(".film-details-hidden").slideDown("normal");
        });
    jQuery(".film-details-less").click(function(){
            jQuery(".film-details-hidden").slideUp("normal");
        });
    
    /*icon overstates*/
    
    jQuery(".image-wrapper a").hover(function(){
        jQuery(this).children(".image-wrapper img").stop().animate({opacity: 0.5}, 200);
        jQuery(this).next(".events-over").show();
        jQuery(this).next(".tickets-over").show();
        jQuery(this).next(".books-over").show();
        },
        function() {
        jQuery(this).next(".books-over").hide();
        jQuery(this).next(".tickets-over").hide();
        jQuery(this).next(".events-over").hide();
        jQuery(this).children(".image-wrapper img").stop().animate({opacity: 1.0}, 200);
    });
    
    /*overstates*/
    
    jQuery("#content-right a img").hover(function(){
        jQuery(this).stop().animate({opacity: 0.5}, 200);
        },
        function() {
        jQuery(this).stop().animate({opacity: 1.0}, 200);
    });

});


