﻿$(document).ready(function () {

    if (!$('body > .ewAdmin').exists()) {
        var activeLink = 'teamContactLinkActive';

        $('.teamContactLink').click(function (e) {
            e.preventDefault();
            
            if (!$(this).hasClass(activeLink)) {
                var href = $(this).attr('href');

                // active the links
                $(".teamContactLink").removeClass(activeLink);
                $(this).addClass(activeLink);

                // do the shizzle
                $(".teamContactActive").animate({ width: '0' }, 400, function () {
                     $(this).removeClass('teamContactActive');
                });
                $("#" + href).animate({ width: '100%' }, 400);
                $("#" + href).addClass('teamContactActive');
                }
        })

    }


});
