/**
*
*	simpleTooltip jQuery plugin, by Marius ILIE
*	visit http://dev.mariusilie.net for details
* @author Jack 2011-03-29 12:14:30 change log
* 1.In order to make jquery and prototype work together,use $jqry instead of $
**/
var $jqry = jQuery;
(function($jqry){ $jqry.fn.simpletooltip = function(){
	return this.each(function() {
		var text = $jqry(this).attr("title");
		$jqry(this).attr("title", "");
		if(text != undefined) {
			$jqry(this).hover(function(e){
				var tipX = e.pageX + 12;
				var tipY = e.pageY + 12;
				$jqry(this).attr("title", ""); 
				$jqry("body").append("<div id='simpleTooltip' style='position: absolute; z-index: 100; display: none;'>" + text + "</div>");
//				if($.browser.msie) var tipWidth = $("#simpleTooltip").outerWidth(true);
//				else var tipWidth = $("#simpleTooltip").width();
//				$("#simpleTooltip").width(tipWidth);
				$jqry("#simpleTooltip").css("left", tipX).css("top", tipY).fadeIn("medium");
			}, function(){
				//alert("a");
				$jqry("#simpleTooltip").hide();
				$jqry("#simpleTooltip").remove();
				$jqry(this).attr("title", text);
			});
			$jqry(this).mousemove(function(e){
				var tipX = e.pageX + 12;
				var tipY = e.pageY + 12;
				var tipWidth = $jqry("#simpleTooltip").outerWidth(true);
				var tipHeight = $jqry("#simpleTooltip").outerHeight(true);
				if(tipX + tipWidth > $jqry(window).scrollLeft() + $jqry(window).width()) tipX = e.pageX - tipWidth;
				if($jqry(window).height()+$jqry(window).scrollTop() < tipY + tipHeight) tipY = e.pageY - tipHeight;
				$jqry("#simpleTooltip").css("left", tipX).css("top", tipY).fadeIn("medium");
			});
		}
	});
};})(jQuery);


/**
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       
    
    $jqry("a.with-tooltip,.clients-logoSlider li img").unbind().hover(    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $jqry('body').append( '<div id="vtip">' + this.t + '</div>' );
                        
            //$('p#vtip #vtipArrow').attr("src", 'images/vtip_arrow.png');<img id="vtipArrow" />
            //$('#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            
        },
        function() {
            this.title = this.t;
            $jqry("#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $jqry("#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

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