
 $(document).ready(function() {
   $('.clear_input').click(function() {
    $(this).val('');
   });
   
   image_tooltip();
 });

 
 function image_tooltip()
 {	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
	      
		
	/* END CONFIG */
	$("a.hoverimg").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.rel +"' alt='" + this.title + "' />"+ c +"</p>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.hoverimg").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
        
        $("a.hoverimg").click(function(e){
          return false;
        });
}
 
 function show_infotab(id)
 {
  var info_element = document.getElementById('info_' + id);
  var info_element_1 = document.getElementById('info_1');
  var info_element_2 = document.getElementById('info_2');
  
  info_element_2.style.display = 'none';
  info_element_1.style.display = 'none';
  info_element.style.display = 'block';
  
  link_1 = document.getElementById('infotab_link_1');
  link_2 = document.getElementById('infotab_link_2');
  if (id == 1)
  {
   link_1.setAttribute('class','infotab_link selected');
   link_2.setAttribute('class','infotab_link');
  }
  else if (id == 2)
  {
   link_2.setAttribute('class','infotab_link selected' );
   link_1.setAttribute('class','infotab_link');
  }
 }
 
 

