$(document).ready(function() {
	$("a.toOpen").toggle(
		function(event){
			$(this).prev().fadeIn();
			$(this).find("div i span.toOpen").hide();
			$(this).find("div i span.toClose").show();
		},
		function(event){
			$(this).prev().hide('fast');
			$(this).find("div i span.toClose").hide();
			$(this).find("div i span.toOpen").show();
		}
	);
	$("div.hideShow div").hide();
	$("div.hideShow a").click(function(){
		$(this).parent().find("div.aqtree").toggle("slow");
	});
	
	/*
	$("img.requestThumb").mouseover(function(){
		$(this).attr("width",100);
	}).mouseout(function(){
		$(this).attr("width",50);
	});
	*/
	
	$("img.requestThumb").click(function(){
		src=$(this).attr("src");
		div=$("div.imagePreview");
		div.find("img").attr("src",src);
		div.fadeIn();
		$("div.imagePreviewLayer").show();
	});
	$("div.imagePreviewLayer").css('opacity', 0.9);
	$("div.imagePreview").click(function(){
		$(this).hide();
		$("div.imagePreviewLayer").hide();
	}).mouseout(function(){
		$(this).hide();
		$("div.imagePreviewLayer").hide();
	});
	
/*	
	$("a.regionLink").click(function(){
		$("a.regionLink").attr("class","regionLink");
		$(this).attr("class","regionLink selected");
		id=$(this).attr("id");
		$("div.rep").hide();
		$("div.lr_" + id).show();
		return false;
	});
*/

	$("select.regionBar").change(function(){
		id=$(this).val();
		$("div.rep").fadeOut('slow');
		$("div.lr_" + id).fadeIn('slow');
		return false;
	});
	
	
	$("a[href*=.pdf]").click(function(){
		window.open(this.href, "", "toolbar=0; resizable=yes");
		return false;
	});	
});

