$(function() {
	$("#header_callcenter a").hover(
			function () {$("#popup-callcenter").show();},
		    function () {$("#popup-callcenter").hide();}
	);
	
	$(".popper").click(function(){
		w = h = 0;
		s = r = "yes";
		switch($(this).attr("id")){
			case "geotrust":
				w = 400;
				h = 450;
				break;
			default :
				w = 400;
				h = 400;
				break;
		}
		geo = window.open($(this).attr("href"),"geo","scrollbars="+s+",width="+w+",height="+h+",resizable="+r);
		geo.focus();
		return false;
	});
	
	
	$("a.hotelsearch").click(function(){
		form = $("#hotelsearch");
		$("input[name='hotel_id']",form).attr('value', $(this).attr('alt'))
		form.submit();
		return false;
	});
	
	
	$("a.form-link").click(function(){
		$("#form_link").attr("action",$(this).attr('alt'))
					   .attr("target",$(this).attr('target'))
					   .submit();
		return false;
	});
	
	$(".pop-abstracts a").hover(
		function(event){
			$tip = $("#"+$(this).attr("alt"));
			offset = $(this).offset();
			l =  offset.left+$(this).width()+10;
			t = offset.top;
			$tip.css({top: t, left: l}) 
			$tip.show();
		},
		function(event){
			$("#"+$(this).attr("alt")).hide();
		}
	);
});