function dirdetails(hash) { $.get('dirprofile' + '?f=&hash=' + hash, function( data ) { $.colorbox({ maxWidth: "80%", maxHeight: "75%", scrolling: false, html: data }); }); } var ratingVal = 0; var ratingText = ''; var currentHash = ''; function fetchRatings(hash) { $.get('prate/' + hash, function(data) { if(typeof(data.rating) !== 'undefined') { ratingVal = data.rating; ratingText = data.rating_text; } buildRatingForm(hash); }); } function doRatings(hash) { fetchRatings(hash); } function buildRatingForm(hash) { var html = '