
function DetectIndicationSection(navID) {
    var currentID = navID;
    $('#indicationMenu ul a').removeClass();
    $('#indicationMenu ul a').addClass("inactive");
    $('li#' + navID + ' a').removeClass("inactive").addClass("navOn");   

    $('.contentItem').hide();
    $('#' + currentID + "Content").fadeIn(1500);
    $('#indicationItems').show();
}


function getUrlVars() {
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for (var i = 0; i < hashes.length; i++) {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}


$(document).ready(function () {


    //$('#indicationItems').hide();


    if (getUrlVars()["section"] != null && getUrlVars()["section"] != "") {
        var turnThisIDOn = getUrlVars()["section"].toUpperCase();
        DetectIndicationSection($('#' + turnThisIDOn).attr('id'));
    }

    $('#indicationMenu ul li a').click(function () {
        DetectIndicationSection($(this).parent().attr('id'));
    });


})
