/*
Sweet Titles (c) Creative Commons 2009
http://creativecommons.org/licenses/by-nc-sa/3.0/
Author: Leeiio | http://leeiio.me
*/

/*
Something Special tipElements
Do not include href="#xxx" : a:not([href^='#'])
*/
var sweetTitles = {
x : 30,								// @Number: x pixel value of current cursor position
y : 20,								// @Number: y pixel value of current cursor position
tipElements : "a.style39",	    			// @Array: Allowable elements that can have the toolTip,split with ","
init : function() {
$(this.tipElements).mouseover(function(e){
this.myTitle = this.title;
this.myHref = this.href;
this.myHref = (this.myHref.length > 30 ? this.myHref.toString().substring(0,30)+"..." : this.myHref);
this.title = "";
//var tooltip = "<div id='tooltip'><p>"+this.myTitle+"<em>"+this.myHref+"</em>"+"</p></div>";
var images="images/email-boxbg.png";
var tooltip = "<div id='tooltip'><table width=147 height=20 border=0 align=center background="+images+" ><tr><td align=center valign=middle><span class=style40>"+this.myTitle+"</span></td></tr></table></div>";

$('body').append(tooltip);
$('#tooltip')
.css({
"opacity":"0.8",
"top":(e.pageY+1)+"px",
"left":(e.pageX+25)+"px"


}).show('fast');	
}).mouseout(function(){
this.title = this.myTitle;
$('#tooltip').remove();
}).mousemove(function(e){
$('#tooltip')
.css({
//"top":(e.pageY+10)+"px",
//"left":(e.pageX+30)+"px"
"top":(e.pageY+1)+"px",
"left":(e.pageX+25)+"px"
});
});
}
};
$(function(){
sweetTitles.init();
});
