	
/* 	function likeUnlike(type , ref_id ,module_log ,table_name, id_field) {
		
		var count_tem = $("#count_" + type + "\\[" + ref_id + "\\]_value").val();
		alert(count_tem);
		$.ajax({
			type: "POST",
			url: base_url() + "like_unlike_cmd.aspx",
			data: "mode=add_like_unlike&type=" + type + "&ref_id=" + ref_id + "&module_log=" + module_log + "&table_name=" + table_name + "&id_field=" + id_field,
			success: function(msg){
				$("#count_" + type + "\\[" + ref_id + "\\]").html(parseInt(count_tem) + 1);
				$("#count_" + type + "\\[" + ref_id + "\\]__value").val(parseInt(count_tem) + 1);
				$("#count_" + type + "\\[" + ref_id + "\\]_a").attr("onClick", "javascript:void(0);");
				$("#count_" + type + "\\[" + ref_id + "\\]_a").css("cursor", "default");
				$("#span_btn_" + type + "\\[" + ref_id + "\\]").css("cursor", "default");
			}
		});
		
	} */
	function like_unlike(){
		$('.scg_like_btn').click(function(){
			//alert('like');
				var data = $(this).attr('rel');
				$.nyroModalManual({
					type: 'ajax',
					closeButton: '<a href="#" class="nyroModalClose" id="like_unlike_button" title="close">Close</a>',
					url: base_url() +"like_unlike_form.aspx"+"?data="+data+"&ref=like"+"&rand="+Math.random()
					
				});	
			return false;
		});
		
		$('.scg_unlike_btn').click(function(){
			//alert('unlike');
				var data = $(this).attr('rel');
				$.nyroModalManual({
					type: 'ajax',
					closeButton: '<a href="#" class="nyroModalClose" id="like_unlike_button" title="close">Close</a>',
					url: base_url() +"like_unlike_form.aspx"+"?data="+data+"&ref=unlike"+"&rand="+Math.random()
					
				});	
			return false;
		});
	}
	$(document).ready(function(){
		like_unlike();
		
	});
