$(function () {
	if($("#imglib").length > 0){
		$.getScript("/jscript/pikachoose-min.js", function(){
			$("#imglib").PikaChoose({
				show_captions:true,
				slide_enabled:false,
				show_prev_next:false,
				auto_play:false,
				delay_caption:false
			});	
		});
		
	}
	$("#il-terms").popupWindow({ 
		centerScreen:1
	}); 
	$('#submit_req').click(function() {											
		var satisfied = $('#terms:checked').val();
		if (satisfied == undefined){
			alert("Do you agree with Australia Zoo's Image Library Terms of Use?")
			return false;
		}		
		$("#submit_req").attr("value", "Submitting, please wait...");
	});
	
	$('#reqform').click(function() {												
		$("#reqform").attr("value", "Submitting, please wait...");
	});	
	
	
	/*$("#film_req").validate({
		errorClass: "invalid",
 		errorPlacement: function(error, element) {
			var error_element = element.parent().parent().prev().find("td");
			error_element.append("&nbsp;")
    		error.appendTo(error_element);
			if($("p.success").length>0){
				$("p.success").hide();
			}
	   }		
	});*/
	
	if($("#zoo_overview_list").length >0){
		$("#zoo_overview_list").hide();
		$("#zoo_overview_list_display").bind("click",function(){
			$("#zoo_overview_list").slideDown("slow");
			return false;
		})
	}
});