this.tooltip = function(){			
		xOffset = 10;
		yOffset = 12;		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

$(function(){
	$('#areas ul li[class!=\'sel\'] a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -100px)"}, {duration:150})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:150})
		})
});

$(function() {
	$('ul.gallery a').lightBox();
});

$(document).ready(function(){
						   
	tooltip();

	$("p.submit input").hover(
      function () {
		$(this).addClass("hover");
      }, 
      function () {
		$(this).removeClass("hover");  
	  }
    );
	
	$("a.open_close").click(
      function () {
		$(this).toggleClass("opened");
		$(this).parent().next('dl').slideToggle('fast');
      }
    );

});
