// UTF8‼
$(document).ready(function(){

	// Product Page Add To Order
	$("#v_prd_add").click(function(){
		$.post(v_url_root + "store/cart/index.codebehind.php",$("#addtocartform").serialize()+'&v_action=Add+To+Order',function(data){
			if (typeof data.Message != 'undefined') {
				alert(data.Message);
			}
			if (typeof data.Error == 'undefined') {
				// Display Order Products
				f_ord_prd(data.t_ord_prd);
				// Display Order Total
				f_ord(data.t_ord[0]);
				$("#minicart-total .control").text("Hide Items");
				$("#minicart-discount,#cart-actions").show();
			}
		},"json");
		return false;
	});

	// Product Page Related Items
	$("#product #related .product")
	.css({'cursor':'pointer'})
	.hover(
		function(){
			$(this).addClass("hover");
		},function(){
			$(this).removeClass("hover");
		}
	)
	.click(function(){
		location.href = $(this).find("a").attr("href");
	});

	// Category Page Products
	$("#category #products .product")
	.css({'cursor':'pointer'})
	.hover(
		function(){
			$(this).addClass("hover");
		},function(){
			$(this).removeClass("hover");
		}
	)
	.click(function(){
		location.href = $(this).find("a").attr("href");
	});

});
