﻿/// <reference path="jquery-1.6.2.min.js" />

$(document).ready(function () {
    $('.tabbing .nav a').click(function () {
        var visibleTab = $(this).attr('href');
        $('.tabbing .nav a').removeClass('active');
        $(this).addClass('active');
        $('.tabbing div').hide();
        $(visibleTab).show();
        return false;
    });

    var url = document.URL;
    var parentName = url.split('/');
    if (parentName[4] == null) {
        var tmpUrlName = parentName[3].split('?');

        locationUrl = 'a[href="/' + tmpUrlName[0] + '"]';

    } else {
        locationUrl = 'a[href="/' + parentName[3] + '.aspx"]';
    }
    if (parentName[3] == "") {
        locationUrl = 'a[href="/Home.aspx"]';
    }
    //console.log(locationUrl);
    $(locationUrl).addClass('active');


    //menu list animations
    $('.menulist .button').css('cursor', 'pointer');
    $('.menulist .content').hide();
    $('.menulist .content:first').show();
    $('.menulist .button').click(function () {
        $('.menulist .content').hide(500);
        $(this).next('.content').show(1000);
    });

});
