/*Javascript By Chris Burrows*/

/*Slider*/
function formatText(index, panel) {
return index + "";
}
$(function () {
$('.anythingSlider').anythingSlider({
easing: "easeInOutExpo",
autoPlay: true,
delay: 8000,
startStopped: false,
animationTime: 600,
hashTags: true,
buildNavigation: false,
pauseOnHover: true,
startText: "Go",
stopText: "Stop",
navigationFormatter: formatText
});
$("#slide-jump").click(function(){
$('.anythingSlider').anythingSlider(6);
});
});

/*Tooltip*/
this.tooltip = function(){		
xOffset = 10;
yOffset = 20;			
$("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");
});			
};

/*Ready Functions*/
$(document).ready(function(){
$("#call-me-back-form").validate();
});
$(document).ready(function(){
tooltip();
});