Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /virtual/thepub/public_html/wp-includes/functions.php on line 3382

Warning: Cannot modify header information - headers already sent by (output started at /virtual/thepub/public_html/wp-includes/functions.php:3382) in /virtual/thepub/public_html/wp-content/themes/pk2011_foodme/parkerandkent2011/functions/theme/pk_ratings.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /virtual/thepub/public_html/wp-includes/functions.php:3382) in /virtual/thepub/public_html/wp-content/themes/pk2011_foodme/parkerandkent2011/functions/theme/pk_ratings.php on line 301
function ratepostVote(post_id, vote) { jQuery.ajax({ type: 'POST', data: {'post_id': post_id, 'vote': vote}, url: 'http://www.thepubhakuba.com/index.php?ak_action=ratepost_vote', timeout: 2000, error: function() {}, success: function(r) { ratepostVoteAvg(post_id); } }) return false; } function ratepostVoteAvg(post_id) { jQuery.ajax({ type: 'POST', data: {'post_id': post_id}, url: 'http://www.thepubhakuba.com/index.php?ak_action=ratepost_vote_avg', timeout: 2000, error: function() {}, success: function(r) { jQuery('#ratepost-'+post_id).find('div.rating-info').text('Rating ' + r + ' out of 5'); } }) return false; } jQuery(document).ready(function() { jQuery('div.ratepost').not('.voted').find('span div').hover( function() { rating_text = { '1': 'Needs Work', '2': 'Below Average', '3': 'Average', '4': 'Very Good', '5': 'Excellent'}; $current = jQuery(this); $ratepost = $current.parent().parent(); new_rating = $current.attr('rel'); $ratepost.find('span').removeClass().addClass('rating' + new_rating); $ratepost.find('div.status-info').text(rating_text[new_rating]); }, function (){ $ratepost = jQuery(this).parent().parent(); $ratepost.find('span').removeClass().addClass('rating' + $ratepost.attr('rel')); $ratepost.find('div.status-info').text(''); }); jQuery('div.ratepost').not('.voted').find('span div').click(function() { $current = jQuery(this); $ratepost = $current.parent().parent(); vote = $current.attr('rel'); post_id = $ratepost.attr('id').split('-')[1]; $ratepost.find('span div').unbind(); $ratepost.attr('rel', vote); $ratepost.find('span').removeClass().addClass('rating' + vote); $ratepost.find('div.status-info').text('Thank you for voting!'); ratepostVote(post_id, vote); }); });