// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function ToggleSidebarTabs(on_tab) {
	all_tabs = ['popular_tab', 'most_commented_tab', 'recent_tab']
	off_tabs = all_tabs.without(on_tab)

	off_tabs.each(function(tab,index) {
		$(tab).removeClassName('selected');
		$(tab + '_content').hide();
	});
	$(on_tab).addClassName('selected');
	$(on_tab + '_content').show();
	
	return false;
}

try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
