﻿//Javascript
$(document).ready(function() {

    $("span.bigLinkWrapper a").css("text-decoration", "none");

    $("span.bigLinkWrapper").not("#whoWeAreSection #whoWeAreSpan, #whatWeDoSection #whatWeDoSpan, #newsSection #newsSpan").hover(
        function() {
            $(this).animate({backgroundColor: "#a84f40"}, 200);
        },
        function() {
            $(this).animate({backgroundColor: "#972c19"}, 200);
        }
     );
	
	$("li.overview").css("display", "block");
	
	$("span a").click(function() {
	    var checkElement = $(this).parent().next('ul');
	    if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
	    return false;
	    }
	    if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
	        $('li ul:visible').slideUp('normal');
	        checkElement.slideDown('normal');
	        return false;
	    }
	    }
	   );
	 
	 $("li ul li a").click(function() {
	    var checkElement = $(this).next('ul');
	    if ((checkElement.is('ul')) && (checkElement.is(':visible'))) {
	    return false;
	    }
	    if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
	        $('li ul li ul:visible').slideUp('normal');
	        checkElement.slideDown('normal');
	        return false;
	    }
	 }
	 );
});