 jQuery.fn.titleWindow = function(options) {
	return this.each(function() {
        // Default settings
		settings = jQuery.extend({
			width:'auto'
		}, options);

        var twThis = this;
        var tT = null;
        var w = $('<span class="infoTitle" style="position:absolute;z-index:100;" />');
        var wW = null;
        var d = $(window).width();
        var oL = 15;
        var oT = oL;

        $('.infoTitle').remove();
        
        $('*[title]', this).bind('mouseover', function(event) {
            $(this).attr('title', function(i,v){tT = v;return ''});
            $('body').append(w.html(tT));
            wW = $(w).width();
            if((wW+event.pageX) > d) oL = -(15+wW); else oL = 15;
            pL = event.pageX+oL;
            pT = event.pageY+oT;
            $(w).css({top:pT+'px',left:pL+'px'})
        }).bind('mousemove', function(event) {
            if((wW+event.pageX) > d) oL = -(15+wW); else oL = 15;
            pL = event.pageX+oL;
            pT = event.pageY+oT;
            $(w).css({top:pT+'px',left:pL+'px'})
        }).bind('mouseout', function() {
            $(this).attr('title',tT);
            $(w).remove();
        });
    });
 };
