// Keen Right Rails rotating banners js

    $(document).ready(function(){
	
		$(".rrnext").click(function(){
            //Performed when a control is clicked
	  		 banner_switch('#ed-banners');
			});
		$(".rrprev").click(function(){
            //Performed when a control is clicked
	  		 banner_switch_prev('#ed-banners');
			});
		$(".rrnexttip").click(function(){
            //Performed when a control is clicked
	  		 banner_switch('#ed-tips');
			});
		$(".rrprevtip").click(function(){
            //Performed when a control is clicked
	  		 banner_switch_prev('#ed-tips');
			});
    });
	
    function banner_switch(a){
        	var next =  $(a).find('.rrbanner.current').next('.rrbanner').length ? $(a).find('.rrbanner.current').next('.rrbanner') : $(a).find('.rrbanner:first');
       		$(next).fadeIn("slow");
       		$(a).find(".current").hide().removeClass("current");
        	$(next).addClass("current");
     }
	function banner_switch_prev(a){
        	var prev =  $(a).find('.rrbanner.current').prev('.rrbanner').length ? $(a).find('.rrbanner.current').prev('.rrbanner') : $(a).find('.rrbanner:last');
        	$(prev).fadeIn("slow");
       		$(a).find(".current").hide().removeClass("current");
        	$(prev).addClass("current");
    }

   function shuffle(){
        	//This function takes every .banner and changes the z-index to 1, hides them,
          	//  then takes the ".current" banner and brings it above and shows it
        	$(".banner").css("z-index", 1).hide();
       		$(".current").css("z-index", 2).show();
    }

<!-- social entertainment right rail show/hide more categories menu -->
menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        } else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}

