//David Moore

$(document).ready(function(){
	
	//VARS
	var sbModule_qaBubbles_tooltip_html = '<div class="sbModule_qaBubblesWrapper"><div class="sbModule_qaBubbles"><div class="sbModule_qaBubbles_inner"><div class="top"><!-- --></div><div class="bottom"><!-- --></div><div class="arrow"><!-- --></div><div class="html"></div></div></div></div>';

	// Add the trigger & html for the tooltip
	$("body").append(sbModule_qaBubbles_tooltip_html);
	
	// Setup the hover action
	$("img.sbModule_qaBubbles_trigger").mouseover(
		function() {

			var offset = $(this).offset(); 
			var newTop = offset.top -5;
			var newLeft = offset.left + 26;
			$(".sbModule_qaBubblesWrapper")
				.find(".html")
				.html($(this).attr("alt"))
				.end()
				.css({
					top: newTop,
					left: newLeft
				})
				.show("0",function(){
					Cufon.replace('.sbModule_qaBubblesWrapper .html');
				});
				//swap out bubble
				$(this).attr("src","/extension/sbcorporateresponsibility/design/eontalkingenergy/images/sbModule_qaBubbles_triggerHi.gif");
			
				$("img.sbModule_qaBubbles_trigger").mouseout(function() {  
            	$(".sbModule_qaBubblesWrapper").hide();
				$(this).attr("src","/extension/sbcorporateresponsibility/design/eontalkingenergy/images/sbModule_qaBubbles_trigger.gif");
			});

		});
});






