
function gdsrWait(rater, loader) {
    jQuery("#"+rater).css("display", "none");
    jQuery("#"+loader).css("display", "block");
}

function gdsrEmpty() { }

jQuery(document).ready(function() {
    if (jQuery.browser.msie) jQuery(".gdsr_rating_as > a").attr("href", "javascript:gdsrEmpty()");
    jQuery(".gdsr_rating_as > a").click(function() {
        var el = jQuery(this).attr("id").split("X");
        gdsrWait(el[5], el[6]);
        jQuery.getJSON('http://4mation.c4tech.co.uk/wp-content/plugins/gd-star-rating/ajax.php', {_ajax_nonce: 'b4470bebe6', vote_id: el[1], vote_value: el[2], vote_type: el[4], vote_tpl: el[7] }, function(json) {
            gdsrWait(el[6], el[5]);
            if (json.status == 'ok') {
                jQuery("#gdr_stars_" + el[4] + el[1]).html("");
                jQuery("#gdr_vote_" + el[4] + el[1]).css("width", json.value);
                jQuery("#gdr_text_" + el[4] + el[1]).addClass("voted");
                jQuery("#gdr_text_" + el[4] + el[1]).html(json.rater);
            }
        });
    });
        });

