nction (a) {
a.fn.webwidget_rating_simple = function (p) {
var p = p || {};
var b = p && p.rating_star_length ? p.rating_star_length : "5";
var c = p && p.rating_function_name ? p.rating_function_name : "";
var e = p && p.rating_initial_value ? p.rating_initial_value : "";
var d = p && p.directory ? p.directory : "/Shared";
var f = "";
var g = a(this);
b = parseInt(b);
init();
g.next("ul").children("li").hover(function () {
$(this).parent().children("li").css({backgroundImage: 'url(' + d + ')',backgroundPosition: '-7px -29px'});
var a = $(this).parent().children("li").index($(this));
$(this).parent().children("li").slice(0, a + 1).css({backgroundImage: 'url(' + d + ')',backgroundPosition: '-7px -55px'});
}, function () {});
g.next("ul").children("li").click(function () {
var a = $(this).parent().children("li").index($(this));
f = a + 1;
g.val(f);
if (c != "") {
eval(c + "(" + g.val() + ")")
}
});
g.next("ul").hover(function () {}, function () {
if (f == "") {
$(this).children("li").css({backgroundImage: 'url(' + d + ')',backgroundPosition: '-7px -29px'});
} else {
$(this).children("li").css({backgroundImage: 'url(' + d + ')',backgroundPosition: '-7px -29px'});
$(this).children("li").slice(0, f).css({backgroundImage: 'url(' + d + ')',backgroundPosition: '-7px -55px'});
}
});
function init() {
$('
').insertAfter(g);
g.css("float", "left");
var a = $("
");
a.attr("class", "webwidget_rating_simple");
for (var i = 1; i <= b; i++) {
a.append('- ' + i + '
')
}
a.insertAfter(g);
if (e != "") {
f = e;
g.val(e);
g.next("ul").children("li").slice(0, f).css({backgroundImage: 'url(' + d + ')',backgroundPosition: '-7px -29px'});
}
}
}
})(jQuery);
// Initialize Stars on Data Form
var eventsFired = 0;
function AddReview(grid,e){
if (eventsFired == 0) {
$("[id$='Rating']").webwidget_rating_simple({
rating_star_length: '5',
rating_initial_value: '',
rating_function_name: '',
directory: '/Shared/images2/Systems/Reviews_Icons.png'
});
eventsFired++;
}
}
// Display the Review Form
$('.addreviewbtn').click(function() {
AddReview();
$('.addreview').show();
});
// Hide the Reviews
$('.cancel').click(function() {
$('.addreview').hide();
});
$('.closemodal').click(function() {
$('#ReviewedTrue').hide(500);
});