
this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 60;
		yOffset = -165;
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("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");
	});			
};



$(document).ready(function() {
  
	$(function() {
	$("#tabs ul.nav").tabs({ fx: { opacity: 'toggle' }, selected: 0 });
  });
	
	$(function() {
	$("#tabs-second ul.nav-2").tabs({ fx: { opacity: 'toggle' }, selected: 0 });
  });
	
	$(function() {
	$("#tabs-home ul.nav").tabs({ fx: { opacity: 'toggle' }, selected: 0 }).tabs('rotate', 11000);
  });
	
	$(function() {
	$("#tabs-people ul.nav-people").tabs({ fx: { opacity: 'toggle' }, selected: 0 });
  });
	
	$('.change').focus(function() {
	if (this.value == this.defaultValue) {
	this.value = ''; }});
	$('.change').blur(function() {
	if (this.value == '') {
	this.value = this.defaultValue; }});

	$('.edit').focus(function() {
	$(this).css("border","3px solid #7996BD"); 
	});
	$('.edit').blur(function() {
	$(this).css("border","3px solid #DFDFDF"); 
	});

  var options = {
    newsList: "#ticker-news",
    startDelay: 10,
    placeHolder1: " _"
  }
  $().newsTicker(options);
  
  
  
  //tooltip();
	
	$('#contact-form div input').focus(function() {
	$(this).css("border","4px solid #98B0C3"); 
	});
	$('#contact-form div input').blur(function() {
	$(this).css("border","4px solid #DFDFDF"); 
	});

	$('#contact-form textarea').focus(function() {
	$(this).css("border","4px solid #98B0C3"); 
	});
	$('#contact-form textarea').blur(function() {
	$(this).css("border","4px solid #DFDFDF"); 
	});

	$('#contact-form select').focus(function() {
	$(this).css("border","4px solid #98B0C3"); 
	});
	$('#contact-form select').blur(function() {
	$(this).css("border","4px solid #DFDFDF"); 
	});

});
