	//to set a review as helpful or not
	$(document).on('click','.review-helpful',function() {
		var rate = $(this).attr('rate');
		var revID = $(this).attr('reviewid');
		var userid = $(this).attr('user');
		var link = $(this);
		if(userid>0) {
			if(revID>0) {
				$.ajax({
					type:'POST',
					data:'revID='+revID+'&rating='+rate,
					url: GLOBAL_BASE_PATH+"/productreview/ajaxReviewHelpful/",
					success:function(text) {
						if(text == 'ok') {
							link.closest('div').find('.thanks-text').attr('style','display:block');
							link.closest('div').find('.thanks-text').html(thanksforvote);
						} 
						else {
							link.closest('div').find('.thanks-text').attr('style','display:block');
							link.closest('div').find('.thanks-text').html(errorMsgforvote);
						}
					}
				});
			}
		}
		else {
			$('#iframeLogin').attr('src', popup_iframe_url+'/login/ajaxPopupLogin/');
			$('.quickpopup, .popupsectionlogin').removeClass('popupShowLogin');	               
			FB.XFBML.parse();
		}
	});