$(document).ready(function() {
    tabContentShow ();
    show_banner();
    Calendar_Event_Hint();
});

function tabContentShow () {
    var tabContainers = $('div.tabs_holder > div');
    $('div.tabs_holder ul.tabNavigation a').click(function () {
        tabContainers.hide().filter(this.hash).fadeIn("slow").show();
        
        $('div.tabs_holder ul.tabNavigation a').removeClass('selected');
        $(this).addClass('selected');
        return false;
        
    }).filter(':first').click();
}

function show_banner() {
    $(".main_image .desc").show(); //Show Banner
    $(".main_image .block").animate({ opacity: 1.0 }, 1 ); //Set Opacity
}

function Calendar_Event_Hint(show, title, date, description){
    var oTitle = document.getElementById("calendarEventHintTitle")
    oTitle.innerHTML = title;
    
    var oDate = document.getElementById("calendarEventHintDate")
    oDate.innerHTML = date;
    
    var oDescription = document.getElementById("calendarEventHintDescription")
    oDescription.innerHTML = description;
    
    var oHint = document.getElementById("calendarEnventHint")
    oHint.style.visibility = (show)?"visible":"hidden";
    
    document.onmousemove = (show)?getMouseXY:null;
    // alert( show + ", " + title );
}

var IE = document.all?true:false
function getMouseXY(e) {
    if (IE) { // grab the x-y pos.s if browser is IE
        tempX = event.clientX + document.body.scrollLeft
        tempY = event.clientY + document.body.scrollTop
    } else {  // grab the x-y pos.s if browser is NS
        tempX = e.pageX
        tempY = e.pageY
    }

    var oHint = document.getElementById("calendarEnventHint")
    oHint.style.zIndex = 1000;
    oHint.style.top = (tempY-70) + "px";
    oHint.style.left = (tempX+20) + "px";
    // alert(tempY + ", "+  tempX)

    return true
}
