$(document).ready(function(){
		//the "down" class is used as a flag to tell whether the pane is up or down.  set it down first.
		$(".cover").addClass("down");
		
		//kludge - you have to do this for every box on the page
		var stockIframe = $("#stock_iframe").contents().get(0);
		$(stockIframe).bind('click', function(e) {
			$("#caption1").toggleClass("down").animate({top:'109px'},{queue:false,duration:200});
		});
		//for weather box
		var weatherIframe = $("#weather_iframe").contents().get(0);
		$(weatherIframe).bind('click', function(e) {
			$("#caption2").toggleClass("down").animate({top:'109px'},{queue:false,duration:200});
		});
		
		$('.boxgrid.caption, .cover_iframe').click(function(){
			$(".cover", this).stop();
			if ($(".cover", this).hasClass("down"))
			{
				$(".cover", this).toggleClass("down").animate({top:'0px'},{queue:false,duration:200});
			}
			else
			{
				$(".cover", this).toggleClass("down").animate({top:'125px'},{queue:false,duration:200});
			}
		});
		
	});

