function getClientWidth()
{
		return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}


$(document).ready(function(){      

    $(".tip").hover(function(){
        var id = this.id;
        var tipTop = $("#"+id+"Tip");

        var left = this.offsetLeft;
        var top = this.offsetTop;
        var width = 400;
        var clientWidth = getClientWidth();

        var oW = left + width;
      
        if( oW > clientWidth )
        {
            left = clientWidth - width - 40;
            
            //while( oW > clientWidth )
            {
               // left = left - 100;
               // oW = oW - 20;
            }
        }
        tipTop.css({"display":"block", "position":"absolute", "top":(top+20), "left":(left-40)});
    }, function(){
        var id = this.id;
        var tipTop = $("#"+id+"Tip"); 
        tipTop.css({"display":"none", "top":0, "left":0});  
    });

    $("#makeOrder a").hover(function(){
        $(this).animate( { fontSize:"24px" }, { queue:false, duration:300 } )
    }, function(){
        $(this).animate( { fontSize:"20px" }, { queue:false, duration:300 } )
    });    
});   


