jQuery(document).ready(function($){$('.wpfp-link').live('click',function(){dhis=$(this);wpfp_do_js(dhis,1);if(dhis.hasClass('remove-parent')){dhis.parent("li").fadeOut();}
return false;});});function wpfp_do_js(dhis,doAjax){loadingImg=dhis.prev();loadingImg.show();beforeImg=dhis.prev().prev();beforeImg.hide();url=document.location.href.split('#')[0];params=dhis.attr('href').replace('?','')+'&ajax=1';if(doAjax){jQuery.get(url,params,function(data){dhis.parent().html(data);if(typeof wpfp_after_ajax=='function'){wpfp_after_ajax(dhis);}
loadingImg.hide();});}};jQuery(document).ready(function($){$('.tabs-wrapper').each(function(){$(this).find(".tab_content").hide();$(this).find("ul.tabs li:first").addClass("active").show();$(this).find(".tab_content:first").show();});$("ul.tabs li").click(function(e){$(this).parents('.tabs-wrapper').find("ul.tabs li").removeClass("active");$(this).addClass("active");$(this).parents('.tabs-wrapper').find(".tab_content").hide();var activeTab=$(this).find("a").attr("href");$(this).parents('.tabs-wrapper').find(activeTab).fadeIn();e.preventDefault();});$("ul.tabs li a").click(function(e){e.preventDefault();});});;var $jx=jQuery.noConflict();$jx(document).ready(function(){$jx('ul.spy').simpleSpy('4','4000');$jx('ul.spy li').reverseOrder();});(function($jx){$jx.fn.reverseOrder=function(){return this.each(function(){$jx(this).prependTo($jx(this).parent());});};$jx.fn.simpleSpy=function(limit,interval){limit=limit||4;interval=interval||4000;return this.each(function(){var $jxlist=$jx(this),items=[],currentItem=limit,total=0,start=0,startdelay=4000;height=$jxlist.find('> li:first').height();$jxlist.find('> li').each(function(){items.push('<li>'+$jx(this).html()+'</li>');});total=items.length;$jxlist.wrap('<div class="spyWrapper" />').parent().css({height:height*limit});$jxlist.find('> li').filter(':gt('+(limit-1)+')').remove();function spy(){$jxlist.find('> li:last').animate({opacity:0},1000,function(){$jx(this).remove();var $jxinsert=$jx(items[currentItem]).css({height:0,opacity:0,display:'inline'}).prependTo($jxlist);$jxinsert.animate({height:height},1000).animate({opacity:1},1000);});currentItem++;if(currentItem>=total){currentItem=0;}
setTimeout(spy,interval)}
if(start<1){setTimeout(spy,startdelay);start++;}else{spy();}});};})(jQuery);