var hoogtes= new Array();
var animatie=''
$(function() {
	
	
		$("a.fancy").fancybox();
	


	$('.bannerBox .text').each(function() {
		//alert($(this).height());
		$(this).attr('height',$(this).height());
		$(this).css('height','52px');
	});
	
	$('.bannerBox').cycle({ 
		fx:     'fade', 
		timeout: 3000 ,
		speed: 1500 ,
		pause: true
	});
	
	$('.bannerBox span').mouseenter(function() {
		var hoogte = $(this).find('.text').attr('height');
		if(animatie!='') {
			animatie.stop();	
		}
		animatie = $(this).find('.text').animate({
			height: hoogte+'px'
		  }, 1000);
	}).mouseleave(function(){
		if(animatie!='') {
			animatie.stop();	
		}
		animatie = $(this).find('.text').animate({
			height: '52px'
		  }, 1000);
	});
	
	if($.browser.msie==null) {
	 	$(".fancyframe").fancybox({
	         'width' : 800,
	         'height' : 500,
	         'autoScale' : false,
	         'transitionIn' : 'none',
	         'transitionOut' : 'none',
	         'type' : 'iframe'
	     });
	} else {
		$(".fancyframe").each(function() {
			$(this).attr('target','_blank');						   
		});
	}
});

function theater_search() {
	var periode = $('#periode').val();
	var genre = $('#genre').val();
	var zoek = $('#zoek').val();
	var url = $('#url').val();

	document.location=url+'&periode='+periode+'&genre='+genre+'&zoek='+zoek;
	
}


