/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/

this.vtip = function () {
	this.xOffset = -10; // x distance from mouse
	this.yOffset = 10; // y distance from mouse       

	$(".tt").unbind().hover(
        function (e) {
        	this.t = this.title;
        	this.title = '';
        	this.top = (e.pageY + yOffset);
        	this.left = (e.pageX + xOffset);
        	var ttboxTitle = $(this).html()
        	var heading = $(this).attr("rel");

        	$('body').append('<div class="ttbox"><img id="vtipArrow" /><div class="topedge"></div><div class="innerArea"><h3>' + heading + '</h3><p>' + this.t + '</p></div><div class="bottomedge"></div>');

        	$('div.ttbox #vtipArrow').attr("src", '/Templates/Images/Spanien/Images/tt-arrow.png');
        	$('div.ttbox').css("top", this.top + "px").css("left", this.left + "px").fadeIn("slow");

        },
        function () {
        	this.title = this.t;
        	$("div.ttbox").fadeOut("slow").remove();
        }
    ).mousemove(
        function (e) {
        	this.top = (e.pageY + yOffset);
        	this.left = (e.pageX + xOffset);

        	$("div.ttbox").css("top", this.top + 22 + "px").css("left", this.left - 84 + "px");
        }
    );

};

jQuery(document).ready(function($){vtip();})
