// JavaScript Document

function slideSwitch() {
    var $active = $('#SlideArea1 IMG.active');

    if ( $active.length == 0 ) $active = $('#SlideArea1 IMG:last');
       var $next =  $active.next().length ? $active.next()
       : $('#SlideArea1 IMG:first');
       $active.addClass('last-active');

       $next.css({opacity: 0.0})
          .addClass('active')
          .animate({opacity: 1.0}, 1000, function() {
             $active.removeClass('active last-active');
          });
       }

$(function() {
    setInterval( "slideSwitch()", 5000 );
});


	$(document).ready(function() {

		//Set css in Firefox (Required to use the backgroundPosition js)
		$('#shutter1').css({backgroundPosition: '0px 0px'});

		//Animate the shutter
		$(".link").hover(function(){
		      $(this).parent().animate({backgroundPosition: '(0px -100px)'}, 500 );
		    }, function() {
		      $(this).parent().animate({backgroundPosition: '(0px 0px)'}, 500 );
		});
	 });
	 
var objPage = null;
   function showPage(pageName) {
      if (objPage)
	     objPage.style.display = 'none';
         objPage=document.getElementById(pageName);
         objPage.style.display = 'block'
   }
