var mascotAutoHideTimer = 0;
function StartMascotAutoHideTimer() { 
  mascotAutoHideTimer=setTimeout("HideMascot()", 10000);
}
	
function StopMascotAutoHideTimer() {
  clearTimeout(mascotAutoHideTimer);
  mascotAutoHideTimer=0;
}


function ShowMascot(msg, tip) {
  if (msg!='') {
    $("#mascotText").html(msg);
    if (typeof tip != "undefined" && tip) {
        StopMascotAutoHideTimer();
        $("#mascotBalloon").show("fast");
    } else {
        StopMascotAutoHideTimer();
        StartMascotAutoHideTimer();
        $("#mascotBalloon").show();
    }
  }
}
function HideMascot() {
    $("#mascotBalloon").hide("fast");
    StopMascotAutoHideTimer();
}

$(document).ready(function() {
	$(".mascot").hover(function(e) {
    ShowMascot(this.title, true);
	},
	function() {
    HideMascot();
	}
	);
});

function m(a,b) {
    location.href="mailto:"+a+"@"+b;
}
