﻿//
// All miscellaneous Javascript actions go in here
//
//
$(document).ready(function() {

    // Add toggle link with content
    $('.toggleArrow').click(toggleArrows);

    //find all form with class jqtransform and apply the plugin
    //$("#content").jqTransform();

    $('.map a').bind('mouseover', function() {
        $('.map a').css({ zIndex: '5' });
        $(this).css({ zIndex: '100' });
    });

});

function toggleArrows(forceHide) {
    var anchorElement = $(this);
    if (anchorElement.attr('href')) {
        if (anchorElement.hasClass("hideOtherToggles")) {
            $('.toggleArrow').each(function() {
                $($(this).attr('href')).slideUp("normal");
            });
        }
        $(anchorElement.attr('href')).slideToggle("normal", function() {
            if (this.style.display != 'none') {
                anchorElement.removeClass('toggleActive');
            } else {
                anchorElement.addClass('toggleActive');
            }
        });
    }
    return false;
}