	$(document).ready
	(
		function()
		{



			/*
			==============================================
				Hover button
			==============================================
			*/

			/* Change the hover button on mouse hover */
			$(".hover_button").hover ( function () 
				{
					if($(this).attr("src"))
					{
						/* Remove the png extension from the image name */
						var image_normal = $(this).attr("src"); 
						image_normal = image_normal.replace(/_hover.png/,"");
						image_normal = image_normal.replace(/.png/,"");
						image_normal = image_normal + "_hover.png";

						$(this).attr("src",image_normal); 
					}
				}, function () 
				{ 
					if($(this).attr("src"))
					{
						/* Remove the "_hover.png" substring from the image name */
						var image_hover = $(this).attr("src"); 
						image_hover = image_hover.replace(/_hover.png/,"");
						image_hover = image_hover.replace(/.png/,"");
						image_hover = image_hover + ".png";

						$(this).attr("src",image_hover); 
					}
				} 
			);


			/* Change the hover button on focus */
			$(".hover_button").focus ( function () 
				{
					if($(this).attr("src"))
					{
						/* Remove the png extension from the image name */
						var image_normal = $(this).attr("src"); 
						image_normal = image_normal.replace(/_hover.png/,"");
						image_normal = image_normal.replace(/.png/,"");
						image_normal = image_normal + "_hover.png";

						$(this).attr("src",image_normal); 
					}
				} 
			);

			/* Change the hover button on blur */
			$(".hover_button").blur ( function () 
				{ 
					if($(this).attr("src"))
					{
						/* Remove the "_hover.png" substring from the image name */
						var image_hover = $(this).attr("src"); 
						image_hover = image_hover.replace(/_hover.png/,"");
						image_hover = image_hover.replace(/.png/,"");
						image_hover = image_hover + ".png";

						$(this).attr("src",image_hover); 
					}
				} 
			);

			/* Unbind the functions */
			$(".hover_button").click ( function () 
				{ 
					if($(this).parent().lenght > 0)
					{
						var parent_href = $(this).parent().attr("href");
						if(parent_href.charAt(0) != "#")
							$(".hover_button").unbind();
					}
				} 
			);
		}
	);

	function evaluateShipment(country_code)
	{
		if(isNaN($('#calculatorBottles').val()))
			$('#calculatorBottles').val('1');

		$.ajax(
		{
			url: "/services/shipping-calculator/",
			cache: false,
			global: false,
			type: "GET",
			data: (
			{
				bottles : $('#calculatorBottles').val(),
				country : $('#calculatorCountry').val(),
				localization : country_code
			}),
			dataType: "html",
			success: function(html)
			{
				$("#calculatorPrice").html(html);
			}
		});
		return false;
	}