//FADES!!!!!!!!!!!!
$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.learnMore, .corevalues, .factsnfigures, .moreButton, .newsLink a, .downloadButton').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .hover', this);

		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(200);
		}
	});
	

	// get rid of the text
	$('.learnMore > .hover').empty();
	$('.corevalues > .hover').empty();
	$('.factsnfigures > .hover').empty();
	$('.moreButton > .hover').empty();
	$('.newsLink a > .hover').empty();
	$('.downloadButton > .hover').empty();
	
$(function () {
        if ($.browser.msie && $.browser.version < 7) return;
        
        $('#navigation li')
            .removeClass('highlight')
            .find('a')
            .append('<span class="hover" />').each(function () {
                    var $span = $('> span.hover', this).css('opacity', 0);
                    $(this).hover(function () {
                        // on hover
                        $span.stop().fadeTo(500, 1);
                    }, function () {
                        // off hover
                        $span.stop().fadeTo(500, 0);
                    });
                });
                
    });
//SHELF!!!!!!!!!!!
    $('a.learnMore').click(function () {
	$('#reveal').slideToggle('medium');
    });

	$(".toggle_container").hide();

	$("h2.trigger").toggle(function(){
		$(this).addClass("active"); 
		}, function () {
		$(this).removeClass("active");
	});
	
	$("h2.trigger").click(function(){
		$(this).next(".toggle_container").slideToggle("slow,");
	});


});

   



