$(document).ready(function () {


    /* Watermark */

    $("td.acyfield_email input").watermark("E-maildres", "watermark");
    $("#newsletter input#ps_search_str").watermark("Zoeken...", "watermark");
    $("#inputName").watermark("Uw naam", "watermark2");
    $("#inputEmail").watermark("Uw e-mailadres", "watermark2");
    $("#inputSubject").watermark("Onderwerp van uw bericht", "watermark2");
    $("#inputMessage").watermark("Uw bericht", "watermark2");
	
	$('#acySubmit').click(
		function()
		{
			$.post("/global/ajax.php", { action: "postAcyMail", mail: $('#user_email_formAcymailing1').val() },
				function(data) {
					alert( data );
					$('#user_email_formAcymailing1').val('');
					$("td.acyfield_email input").watermark("E-maildres", "watermark");
				}
			);
		}
	);
    

    $("#ps_icon_background").live('click', function () {
        $("form#pp_search").submit();
    })
	
	$("#reserveerNuBtn").click(
		function()
		{
			$('#movieTimesGlow').fadeIn();
			setTimeout( "$('#movieTimesGlow').fadeOut();", 300 );
		}
	);

    $("#slider").easySlider({
        prevText: '',
        nextText: '',
        auto: true,
        pause: 5000,
        speed: 600,
        controlsShow: true,
        continuous: true
    });
	
	$("#btnReserve, .reserveren").click(
		function()
		{
			var brh 	= $(this).attr( 'class' ).split(" ");
			var reserv 	= $(this).attr( 'class' );
			
			if( !brh[2] && reserv != 'reserveren' )
			{
				window.open( $(this).attr('href') ,'Reservering','width=1000,height=800,scrollbars=yes,toolbar=no,location=yes');
				
				return false;
			}
			
			if( reserv == 'reserveren' )
			{
				window.open( $(this).children('a').attr('href') ,'Reservering','width=1000,height=800,scrollbars=yes,toolbar=no,location=yes');
				
				return false;
			}
			
		}
	);
	
	$('table.altRows tr').mouseover(
		function()
		{
			$(this).addClass('hover');
		}
	);
	
	$('table.altRows tr').mouseout(
		function()
		{
			$(this).removeClass('hover');
		}
	);
});



