﻿var test = function(){

    $("#navigation").dropSlideMenu({
			indicators: true, // adds a div to the list items for attaching indicators (arrows)
			clickstream: true, // highlights the clickstream in a menu by comparing the links to the current URL path
			openEasing: "easeOutQuad", // open animation effect
			closeEasing: "easeInQuad", // close animation effect
			duration: 600, // speed of drop down animation (in milliseconds)
			delay: 800, // delay before the drop down closes (in milliseconds)
			hideSelects: true // hide all select elements on the page when the menu is active (IE6 only)
		});
		
}


	$(document).ready(function() {

	 $("#tabArea").load("Includes/tabmenu.htm");
	 $("#fntdisp").load("includes/fntdisp.aspx");
	// test;
     setTimeout(test, 1000);
    $("#headerArea").load("includes/header.htm");
    $("#rightBar").load("includes/rightbar.htm");
    $("#footerarea").load("includes/footer.htm");     
    $("#topnav").load("includes/topnav.aspx");
    
   
	});

function slideSwitch(id1,last,first) {

    var $active = $(id1);
    if ( $active.length == 0 ) $active = $(last);
    var $next =  $active.next().length ? $active.next()
        : $(first);
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1500, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch('#slideshow IMG.active','#slideshow IMG:last','#slideshow IMG:first')", 3000 );
    setInterval( "slideSwitch('#slideshow1 IMG.active','#slideshow1 IMG:last','#slideshow1 IMG:first')", 3000 );
	setInterval( "slideSwitch('#slideshow2 IMG.active','#slideshow2 IMG:last','#slideshow2 IMG:first')", 3000 );
	setInterval( "slideSwitch('#slideshow3 IMG.active','#slideshow3 IMG:last','#slideshow3 IMG:first')", 3000 );
	setInterval( "slideSwitch('#slideshow4 IMG.active','#slideshow4 IMG:last','#slideshow4 IMG:first')", 4000 );
});

