﻿    $('#mainmenu .active').parent().addClass('open');

    var mainmenu = $('#mainmenu .touchanchor');
    mainmenu.bind('touchstart', function () { touchIntent($(this).parent()); return false });
    mainmenu.bind('touchend', function () { touchAction($(this).parent()); return false });

    var contactanchor = $('.contact .touchanchor.org');
    contactanchor.bind('touchstart', function () { touchIntent($(this).parent()) });
    contactanchor.bind('touchend', function () { touchAction($(this).parent()) });

    function touchIntent(handle) {
        handle.addClass('interact');
    }

    function touchAction(handle) {
        handle.removeClass('interact');
        if (handle.hasClass('open')) {
            handle.removeClass('open');
        } else {
            handle.addClass('open');
        }
    }

	$(window).load(function () {
		$('#slideshow').nivoSlider({
            effect:'fade',
            slices:1
	});
});
		
	$('.showMore').click(function(){
		$('.additionalContent').slideDown();
		$(this).remove();
		return false;
	});
				
	var o = 0;
	if($.browser.msie && $.browser.version == 7.0)
		o = 1;

	if (o == 0) {
	    var t;
	    var f;
	    $('#followus').hover(function () {
	        if (f != null)
	            clearTimeout(f);
	        t = setTimeout(function () { $('#shade').fadeIn(200); }, 300);
	    }, function () {
	        clearTimeout(t);
	        f = setTimeout(function () { $('#shade').fadeOut(200); }, 300);
	    });
	}
	$('#calltoaction .contenthandle').click(function () {
	    $('#calltoaction .contenthandle').removeClass('open')
	    $(this).addClass('open');
	    if (o == 0) {
	        $('#shade').fadeIn(200);
	    }
	});
	$('#shade').click(function () {
	    $(this).fadeOut(200);
	    $('#calltoaction .contenthandle').removeClass('open');
	});
	$('#calltoaction .close').click(function (event) {
	    event.stopPropagation();
	    $('#shade').fadeOut(200);
	    $('#calltoaction .contenthandle').removeClass('open');
	});


