﻿/* 
    when hovering over anchor with poster class, display info layer     
    and hide on mouseout
*/
$(function() {
    $(".film_info a.poster").hover(function() {                
        $(this).parents(".film_info").children(".coverMask").show();            
    }, function() {    
        $(this).parents(".film_info").children(".coverMask").hide();
    });
});

/* keep info layer open while hovering */
$(function() {
    $(".film_info .coverMask").hover(function() {
        $(this).show();
    }, function() {
        $(this).hide();
    });
});

$(function(){
	// simple Accordion
	$('#sliders').accordion({
	    alwaysOpen: false,
		header: 'a.head',
		animated: 'easeslide',
		autoheight: true
	});
});

/* show photo captions */
$(function() {    
    $(".festivals_photos a img").mouseover(function() {
        var caption = $(this).parent().siblings("p.caption").html();
        
        $(".festivals_photos a img").removeClass("selected");       
        $(this).toggleClass("selected");
        $(this).parents("ul").siblings("p.caption_display").html(caption);        
    });    
});