jQuery(function($){

$(".most_voted_box4p1 #addComment").colorbox({width:"670px", height:"465px", iframe:true});

$("#post_review,#post_review2").colorbox({width:"670px", height:"465px", iframe:true});

$("#show_reviews").colorbox({width:"685px", height:"465px"});

$("#show_howtouse").colorbox({width:"680px", height:"340px"});

$("#forgot_password").colorbox({width:"680px", height:"300px", iframe:true});

//IndexPage Scroller
$("#infinite").scrollable().circular();	

$(".most_voted_box2_p2 a").click(function(){  
var the_id = $(this).attr("id");  
//$(this).parent().html("<img src='/images/spinner.gif'/>");  

/*$.ajax({type: "POST",data: "action=vote_up&id="+the_id, url: "/Coupons/state", success: function(msg){
		$("#voting"+the_id).remove();
		$("#votes_count"+the_id).fadeOut();
		$("#votes_count"+the_id).html(msg);
		$("#votes_count"+the_id).fadeIn();
}});
*/
$.ajax({
   type: "POST",
   data: "action=vote_up&id="+the_id,
   url: "/coupons/state",
   success: function(msg){
		$("#votes_count"+the_id).remove;
		$("#vote"+the_id).fadeOut();
		$("#votes_count"+the_id).html(msg);
		$("#votes_count"+the_id).fadeIn();
  }
  });
return false;
});

$(".most_voted_box2_p3 a").click(function(){
$.ajax({
type: "POST",
data: "action=vote_down&id="+$(this).attr("id"),
url: "/coupons/state",
success: function(){

}
});
$(this).parents(".test").slideUp('slow')
.animate({ opacity: "hide" }, "fast");
return false;
});


$(".a3").hide();


});

function getComments(id)
{
	$('#comments'+id).fadeIn('fast');
	$('#open'+id).hide();
	$('#close'+id).show();
}

function closeComments(id)
{
	$('#comments'+id).fadeOut('fast');
	$('#close'+id).hide();
	$('#open'+id).show();
}


function getMerLink(lnk)
{
	window.location.href = lnk;
}
