function initAskBubble(){
	
	jQuery('.wpcf7 input.askbubblesend').before(jQuery('#askbubble img.ajax-loader'));		
				
	jQuery("body").delegate(".ask", "click", function(e){
							 
		var y = "t";
		var x = "l";
	
		var askbutton = jQuery(this);
		var productID = askbutton.attr('id');
		var position = askbutton.offset();
		// added
		var buttonheight = 20;
	
		var height = parseInt(jQuery('#askbubble').css("height"));
		var width = parseInt(jQuery('#askbubble').css("width"));
		var height_window = jQuery(window).height(); 
		var width_window = jQuery(window).width();
					
		if(position.top-height < 0){
			y = "b";
			var top = position.top+buttonheight;
		}else{
			y = "t";
			var top = position.top-height;			
		}
		
		if(position.left-width < 0){			
			var left = position.left;
			x = "r";
		}else{
			var left = position.left-width;
			x = "l";
		}			
		
		jQuery('input[name="your-id"]').val(productID);
		jQuery('#askbubble').css("left",left+"px");
		jQuery('#askbubble').css("top",top+"px");
		jQuery('#askbubble').css("background-image", "url("+skin_template_url+"/images/ask_"+y+x+".png)");
		jQuery('#askbubble').show();

		return false;			
			
	});

	jQuery('#askbubble').mouseleave(function(e){
		jQuery('#askbubble').hide();			
	});
	
	jQuery(window).resize(function() {
		jQuery('#askbubble').hide();		
	});
	
	jQuery('input.askbubblesend').corner("round 8px");
	
}
	

