$.globals = {};
function resetDefault(){
	$(this).val("");
}
function setDefault(){
	if($(this).val()=="") $(this).val($.globals.search_text);
}
function leftNav(){
	var thisurl = window.location.href;
	thisurl = thisurl.split("/");
	thisurl = thisurl[thisurl.length-1];
	$("div#content div.column.left a[href='"+thisurl+"']").addClass("on");
}
function overRow()
{
	$(this).siblings().not(this).removeClass("over");
	$(this).addClass("over");
}
function resetTableRows(){
	$("tr",this).removeClass("over");
}
$(document).ready(function(){
	leftNav();
	$.globals.search_text = $("#search").val();
	if($("a[rel='thumb']").length>0){
		$("a[rel='thumb']").colorbox({
			previous:'<img src="templates/images/colorbox/arrow_left.gif" />',
			next:'<img src="templates/images/colorbox/arrow_right.gif" />',
			close:"cerrar",
			current:"",
			maxHeight:"100%",
			maxWidth:"100%",
			scalePhotos:true
		});
	}
	$("#search").click(resetDefault)
	$("#search").blur(setDefault);
	$("table tr").mouseover(overRow);
	$("table").mouseout(resetTableRows);
	$("#sitemapLink").colorbox({
		previous:'',
		next:'',
		close:"cerrar",
		current:"",
		height:"600px",
		width:"600px",
		maxHeight:"100%",
		maxWidth:"100%",
		scalePhotos:true
	});
	$("#privacyPolicy").colorbox({
		previous:'',
		next:'',
		close:"cerrar",
		current:"",
		height:"600px",
		width:"700px",
		maxHeight:"100%",
		maxWidth:"100%",
		scalePhotos:true
	});
	$("#terms").colorbox({
		previous:'',
		next:'',
		close:"cerrar",
		current:"",
		height:"600px",
		width:"700px",
		maxHeight:"100%",
		maxWidth:"100%",
		scalePhotos:true
	});
});
