function wp_review_tab_loadTabContent(tab_name,page_num,container,args_obj){var container=jQuery(container);var tab_content=find('#'+tab_name+'-tab-content');var isLoaded=data('loaded');if(!isLoaded||page_num!=1){if(!hasclass('wp-review-tab-loading')){addclass('wp-review-tab-loading');load(ajax_url,{action:'wp_review_tab_widget_content',tab:tab_name,page:page_num,args:args_obj},function(){removeclass('wp-review-tab-loading');data('loaded',1).hide().fadeIn().siblings().hide();});}}else{fadein().siblings().hide();}} jQuery(document).ready(function(){jQuery('.wp_review_tab_widget_content').each(function(){var $this=jQuery(this);var widget_id=id;var args=$data('args');$find('.wp-review-tabs a').click(function(e){preventdefault();jQuery(this).parent().addClass('selected').siblings().removeClass('selected');var tab_name=slice(0,-4);wp_review_tab_loadTabContent(tab_name,1,$this,args);});$on('click','.wp-review-tab-pagination a',function(e){preventdefault();var $this_a=jQuery(this);var tab_name=$closest('.tab-content').attr('id').slice(0,-12);var page_num=parseInt($parents('.tab-content').find('.page_num').val());if($hasclass('next')){wp_review_tab_loadTabContent(tab_name,page_num+1,$this,args);}else{$find('#'+tab_name+'-tab-content').data('loaded',0);wp_review_tab_loadTabContent(tab_name,page_num-1,$this,args);}});$find('.wp-review-tabs a').first().click();});});