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 = '
'+aStr['rating_desc']+'
'+aStr['rating_text']+'
'; $.colorbox({maxwidth: "50%", maxHeight: "50%", scrolling: false, html: html, close: 'X' }); currentHash = hash; } function postRatings() { $.post('prate',$('#ratings_form').serialize(),function(data) { $.colorbox.remove(); $('#edited-'+currentHash).show(); },'json'); } $(document).ready(function() { collapseHeight(); });