 $(document).ready(function(){
 reloadmonitors();
 load_last();	

});
$(function(){
$("a, img, div").tipTip();
});
	function show_list(id){
		$('#' + id).slideToggle('slow');
		$('.' + id).slideToggle('slow');
		$('#showhide_' + id).toggle();
		$('.showhide_' + id).toggle();
	} 
 function reloadmonitors(){
		$("#monitors .server").hide().html('<br clear="both" \/><center><img src="theme\/images\/loading.gif" alt="" \/><\/center><br clear="both" \/>').fadeIn('slow').each(function(){
			$(this).load("/includes/monitor_inc.php?server="+$(this).attr("id")+"");
		});
		window.setTimeout('reloadmonitors',5000);
	}
function dd2s() {
		if($("#dd2s").is(":hidden")){
			$("#dd2s").slideDown();
		}else{
			$("#dd2s").slideUp();
		}
	}

function csdms() {
		if($("#csdms").is(":hidden")){
			$("#csdms").slideDown();
		}else{
			$("#csdms").slideUp();
		}
	}
function zms() {
		if($("#zms").is(":hidden")){
			$("#zms").slideDown();
		}else{
			$("#zms").slideUp();
		}
	}
function load_last(){
	$(".module").hide().html('<br clear="both" \/><center><img src="theme\/images\/loading.gif" alt="" \/><\/center><br clear="both" \/>').each(function(){
		$(this).load("/includes/"+$(this).attr("id")+"_inc.php").fadeIn('slow');
	});
	window.setTimeout('load_last',5000);
}
function resets_last() {
 $(document).ready(function(){
  $(".module").hide().html('<br clear="both" \/><center><img src="theme\/images\/loading.gif" alt="" \/><\/center><br clear="both" \/>').each(function(){
   $.get("/includes/"+$(this).attr("id")+"_inc.php")
   $(this).load("/includes/"+$(this).attr("id")+"_inc.php").fadeIn('slow');
  });
 }
)};
function toogler(elem2) {
  //elem2 = "#searchbox";
  if($(elem2).css("display") == "none")
  {
    $(elem2).show();
  }
  else{
    $(elem2).hide();
  } 
} 
		$(document).ready(function() {
		$("textarea#markItUp").markItUp(mySettings);
		});
		function smileys(elem){
			toogler("div.smileys_cont");
		};
		function add_smiley(selector) {
			$("textarea#markItUp").focus();
			text = " " + $(selector).attr("data") + " ";
			$.markItUp( { replaceWith:text } );
			return false;
	}


