/* PAREX PLAY */

	$(document).ready(function()
	{
		blurLinks();
		
		$("div#employees a").click(function(){

			var data = $("div#"+$(this).attr("rel")).html();
			
			if (data != null)
			{
				$("#popup").html(data+"");
				show_popup();
			}
		});
		
		$("#layer").click(function(){
			hide_popup();
		});

		$("div#mapinfo").mouseover(function(){
			//$("div#mapinfo").fadeIn("normal");
			$("div#mapinfo").show();
		});
				
		$("img#imgmap").mouseover(function(){
			//$("div#mapinfo").fadeIn("normal");
			$("div#mapinfo").show();
		});

		$("img#imgmap").mouseout(function(){
			//$("div#mapinfo").fadeOut("normal");
			$("div#mapinfo").hide();
		});


	});
	
	/**
	* Hook every A element so blur() function is called
	* when onclick event is triggered
	*/
	function blurLinks()
	{	
		$("a").focus(function()
		{
			this.blur();
		});
	}


	/**
	 * Show popup box
	 */
	function show_popup()
	{
		$("div#layer").show();
		$("div#popup").fadeIn("normal");
		
		$("div#popup td.photo img").click(function(){
			hide_popup();
		});
		
		$("div#popup a.close").click(function(){
			hide_popup();
		});
	}
	
	/**
	 * Hide popup box
	 */
	function hide_popup()
	{
		$("div#layer").hide();
		$("div#popup").fadeOut("normal");
	}
	
	/**
	 * Print email link (protection from spambots)
	 * If javascript is disabled, nothing is visible
	 * 
	 * @param string p1 Part 1 - this is username
	 * @param string p2 Part 2 - this is domain
	 * @param string p3 Part 3 - this is TLD
	 */
	
	function writemail(p1, p2, p3)
	{
		document.write("<a href='mailto:"+p1+"@"+p2+"."+p3+"' class='txt'>"+p1+"@"+p2+"."+p3+"</a>");
	}

