
	function actionMyStyles(wAction, prodId, elementId){
		var query = "pid="+prodId+"&action="+wAction+"&ele_id="+elementId;
		
		$("#"+elementId).html('<span class="status">'+(wAction == 'add' ? "Adding" : "Removing")+'...</span>');
		
		$.get("/common_gl/inc_product_my-styles_action.php", query, function(data){
			$("#"+elementId).html(data);
			if (cropCurrSortBy == "mystyles") {
				if (siteVer >= 3) {
					updateProductCropV3();
				} else {
					updateProductCrop();
				}
			}
			if (document.location.href.indexOf("product-my-styles") > -1 || document.location.href.indexOf("product-wishlist") > -1 || document.location.href.indexOf("product-gift-guides") > -1) {
				if (siteVer >= 3) {
					updateProductMyStylesRangeV3();
				} else {
					updateProductMyStylesRange();
				}
			}
		});
	}

	function myStylesEmail(){
		window.open('/html_gl/my-styles_email.php', 'myStylesEmailWindow', 'resizable=1,width=760,height=550,scrollbars=1,status=1');
	}
	

	function actionMyStylesV3(wAction, prodId, elementId){
		var query = "pid="+prodId+"&action="+wAction+"&ele_id="+elementId;
		$("#"+elementId+' .MS').css({  'height': $("#"+elementId+' .MS').innerHeight()  });
		$("#"+elementId+' .MS').html('<span class="loading"></span>');
		$.get("/common_gl/inc_product_my-styles_action.php", query, function(data){
			$("#"+elementId+' .MS').html(data);
			$("#"+elementId+' .MS').css({  'height': 'auto'  });
			if (cropCurrSortBy == "mystyles") {
				updateProductCropV3();
			}
			if (document.location.href.indexOf("product-my-styles") > -1 || document.location.href.indexOf("product-wishlist") > -1 || document.location.href.indexOf("product-gift-guides") > -1) {
				updateProductMyStylesRangeV3();
			}
		});
	}
	function actionLikeV3(wAction, prodId, elementId) {
		var query = "pid="+prodId+"&ele_id="+elementId;
		$("#"+elementId+' .LK').css({  'height': $("#"+elementId+' .LK').innerHeight()  });
		$("#"+elementId+' .LK').html('<span class="loading"></span>');
		
		$.get("/common_gl/inc_product_like_add.php", query, function(data){
			$("#"+elementId+' .LK').html('<span class="done">LIKED!</span>');
			$("#"+elementId+' .LK').css({  'height': 'auto'  });
			$("#"+elementId+'-count').html(data);
		});
	}
