//jQuery.browser alteration for Google Chrome detection
//source: javascriptly.com/2008/09/javascript-to-detect-google-chrome/
var userAgent = navigator.userAgent.toLowerCase();
jQuery.browser = {
  version: (userAgent.match( /.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/ ) || [])[1],
    chrome: /chrome/.test( userAgent ),
    safari: /webkit/.test( userAgent ) && !/chrome/.test( userAgent ),
    opera: /opera/.test( userAgent ),
    msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
    mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
}; 
jQuery(document).ready(function() {
    jQuery('.tooltip').css('display', 'none');
    if ((jQuery.browser.chrome) || (jQuery.browser.msie)) {
	jQuery('.mostra').each(function() {
		var url    = '#'+ this.href.split('#')[1];
		$(url).insertAfter(this);
		jQuery(this).mouseover(function() {
			
			$(url).css('display', 'block');

		}).mouseout(function(){
			$(url).css('display', 'none');
		});
	});
    }
    else {
	jQuery('.tooltip').css('opacity', 0);
	jQuery('.mostra').each(function() {
		var url    = '#'+ this.href.split('#')[1];
		$(url).insertAfter(this);
		jQuery(this).mouseover(function() {
			
			$(url).css('display', 'block');
			jQuery(url).stop(true).animate({
				opacity: 1
			}, 300);

		}).mouseout(function(){
			$(url).css('display', 'none');
			jQuery(url).stop().animate({
				opacity: 0
			}, 300);
		});
	});
    }
});
