$(document).ready(function(){

	$("map > area").tooltip({
		positionLeft: true,
		showURL: false
		});
	
	$(".botcols").equalHeights();


if (popupuk == true) {
  	$.modal("<div id='biggyme'><h1>Victory! Peru has banned wild animal circuses</h1><img src='/media/Colo1-Colo-in-250.jpg' align='right' width='250' class='imgy'/><p>Following an intense ADI campaign, President Alan Garcia has signed into law an end to the use of wild animals in circuses.</p><p>This is a huge victory for circus animals - but we desperately need funds to to continue our investigations, campaigns and rescues</p><p><a href='http://www.ad-international.org/animals_in_entertainment/go.php?id=2213&ssi=10'>Read more...</a></p><p><a href='https://www.secure.adi-navs-ldf.org/donate.asp?id=294&cachefixer='>UK: Donate Now</a></p><p><a href='https://www.secure.adi-navs-ldf.org/donate.asp?id=392&cachefixer='>US: Donate Now</a></p></div>");
  	
  	
$("#biggyme").modal({onClose: function (dialog) {
	dialog.data.fadeOut('slow', function () {
		dialog.container.slideUp('slow', function () {
			dialog.overlay.fadeOut('slow', function () {
				$.modal.close(); // must call this!
			});
		});
	});
}});

}

	$("ul.sf-menu").superfish();  
   
	$('a.seemore').click(function () {
		var parentTag = $(this).parent().prev().html();
		$.modal(parentTag);
	});	
	
	if ($('#recip').val() != "yes") {
		$('#recipient').hide();
	}
	$('.chooser0').attr('checked', true);
		
	$('.chooser0').change(function() {
	    $('#recipient').hide();
	    return false;
	  });
		
	$('.chooser1').change(function() {
	    $('#recipient').show();
	    return false;
	  });
		
	$('.chooser2').change(function() {
	    $('#recipient').show();
	    return false;
	  });
	

	$("#subForm").validate();

	/*
	//code to hide topic selection, disable for demo
	//var newsletter = $("#samplemag");
	// newsletter topics are optional, hide at first
	var inital = newsletter.is(":checked");
	var topics = $("#address_extras")[inital ? "removeClass" : "addClass"]("gray");
	var topicInputs = topics.find("input").attr("disabled", !inital);
	var topicInputs2 = topics.find("select").attr("disabled", !inital);
	// show when newsletter is checked
	newsletter.click(function() {
		topics[this.checked ? "removeClass" : "addClass"]("gray");
		topicInputs.attr("disabled", !this.checked);
		topicInputs2.attr("disabled", !this.checked);
	});
	*/
	  
});
