(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)
jQuery.preLoadImages("/interface/images/sidebar/links.png");
		$('.sidebar li.sideList a').click(function() {
			if($(this).hasClass('off') & !($(this).hasClass('subMenu'))){
				$(this).css('backgroundPosition','0 0')
				;$('ul.on').slideUp(200);
				$('li.sideList a').css('backgroundPosition','0 -31px');
				$('li.sideList a').removeAttr("style");
				$('.on').addClass('off');
				$('.on').removeClass('on');
				$(this).next('ul').slideDown(200);
				$(this).addClass('on');
				$(this).next('ul').addClass('on');
				$(this).removeClass('off');
				
			}else{
				$(this).css('backgroundPosition','0 -31px');
				$(this).next('ul').slideUp(200);
				$(this).addClass('off');
				$(this).removeClass('on');
				$(this).next('ul').removeClass('on');
				$(this).next('ul').addClass('off');
				$(this).removeAttr("style");
				}
		});
		$(document).ready(function() {
			if($('#peers').hasClass('on')){
					$('#peers').next('ul').slideDown(500);
			}

			$('li a.on').next('ul').fadeIn(500);
			$('li a.on').css('opacity','1');		
					
	
		});

