// jQuery Reject - No IE5/IE6

$(document).ready(function() {
    $.reject({  
        reject: { msie5: true,msie6: true }, // Reject all renderers for demo  
		display: ['msie','firefox','safari','chrome'], // What browsers to display and their order  
		header: 'Did you know that your Internet Browser is out of date?', // Header of pop-up window  
    	paragraph1: 'Your browser is out of date, and may not be compatible with our website. A list of the most popular web browsers can be found below.', // Paragraph 1  
		paragraph2: 'Just click on the links below to get to the download page', // Paragraph 2  
		imagePath: '/images/browsers/', // Path where images are located  
    	overlayBgColor: '#000000', // Background color for overlay
        closeCookie: true // Set cookie to remmember close for this session  
    });  

    return false;  
});


$(document).ready(function() {

	// CONFIGURATION ----------------------------------------------------------

	// Setting to globally change the speed of the effects
	// Options: 'slow', 'normal', 'fast', or a custom time in milliseconds
	var fxspeed = 'fast';


	// BODY'S TOP PADDING -----------------------------------------------------

	// Adjust the whitespace at the top of the page depending on the height of the viewport.
	// The original top padding is 181px. Each navigation bar is 40px high.
	if ($(window).height() < 800) {
		$('body').css('padding-top', '0px'); // -40px
	}
	if ($(window).height() < 700) {
		$('body').css('padding-top', '0px'); // -80px
	}
	if ($(window).height() < 600) {
		$('body').css('padding-top', '0px'); // -120px
	}


	// NAVIGATION -------------------------------------------------------------

	// Wrap an extra div around the content parts. This makes the slide effects smoother
	// because the new outer div does not contain padding or margin.
	$('div.content').wrap('<div></div>');

	// Hide all the inactive content blocks.
	$('#main > li > h2:not(.active)').siblings().hide();

	// A jQuery object containing the navigation bars
	var $nav = $('#main > li > h2');

	// Here is what happens when the navigation is clicked
	$nav.click(function() {
		// Determine the position (1-5) of the clicked navigation bar,
		// this is needed to calculate the margin to align it next to the title (see below).
		var navcount = $(this)[0].id.replace(/\D+/, '');

		// Highlight or de-highlight the clicked navigation bar by toggling the CSS class “active”
		if ($(this).hasClass('active')) {
			$nav.removeClass('active');
			$('#main').animate({marginTop:0}, fxspeed);
		} else {
			$nav.removeClass('active');
			$(this).addClass('active');
			// Align the active nav next to the title
			$('#main').animate({marginTop:0}, fxspeed);
		}

		// Happy sliding!
		$nav.siblings(':visible').slideUp(fxspeed);
		$(this).siblings(':hidden').slideDown(fxspeed);
	});

	// Regular links can also be used to jump to another section (by linking to “#nav1”)
	// This code makes them trigger the navigation bar sliding effects
	$('a[href^=#nav]').click(function() {
		// Clean up the id, we only want the “#xxx” anchor part, and then simulate a navigation bar click
		$('h2' + $(this)[0].href.replace(/^[^#]+/, '')).trigger('click');
	});

		
	$("div.clickable").click(
	function()
	{
		$('h2#nav4').trigger('click');
		return false;
	});


});