﻿$(document).ready(function() {
    init('a.washelpful');
});

function init(domChunk) {

    $(domChunk).click(function() {
        var a = this.href || this.alt;
        vote(a);
        this.blur();
        return false;
    });
};

function BuildThanksDiv(reviewId) {
    $("#review" + reviewId).hide();
    $("#" + reviewId).html('').html('<div class="thanks">Thank you for voting!</Div>');
    
}

function showThanks(clientId) {
    document.getElementById(clientId).visible = true;

}

function vote(href) {
    //Set the js flag to true if they get this far.  See glove.reviews.ajax.aspx.vb 
    href = (href).replace("false", "true");
    $.ajax({
        type: "GET",
        url: href,
        cache: false,
        success: function(data) {
         
        }
    });
};


