/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/

this.vtip = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 30; // y distance from mouse
    jQuery(".vtip").each(function(){
    if(jQuery(this).attr('href')!='#'){
    jQuery(this).css('cursor','pointer');
    }
    })

    jQuery(".vtip").unbind().hover(
        function(e) {
            this.t = this.title;
            if(jq(this).hasClass('itip')){
            var alt = jq(this).attr('alt');
            }
            if(this.t!=''){
            this.title = '';
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            if(this.t!=''){var desc=this.t}else{var desc=''}
            if(jq(this).hasClass('itip')){
              jQuery('body').append( '<p id="vtip"><img id="vtipArrow"  /><img src="' + alt + '"class="popupImage"  /><br />'+desc+'</p>' );
            }else{
            jQuery('body').append( '<p id="vtip"><img id="vtipArrow"  />' + this.t + '</p>' );
            }
            jQuery('p#vtip #vtipArrow').attr('src', 'images/vtip_arrow.png');
            jQuery('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            }
        },
        function() {
            this.title = this.t;
            jQuery("p#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);

            jQuery("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );
    jQuery(".vtip").click(function(){
    if(jQuery(this).attr('href')=='#'){
    return false;
    }
    })
};

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