
	
	$(document).ready(function() {
 	$("#topmenu a").hover(function() {
		    $(this).stop().animate({ marginTop: "-6px" }, 200);
		    $(this).children('#topmenu').stop().animate({ marginTop: "11px"}, 200);
		},function(){
		    $(this).stop().animate({ marginTop: "0px" }, 300);
		    $(this).children('#topmenu').stop().animate({ marginTop: "5px"}, 300);
		});
	});

	$(document).ready(function(){
          $(".fadelink").fadeIn(2000);
          return false;
        }); 
	 

	$(document).ready(function(){
  $('.default').each(function(){
    var defaultVal = $(this).attr('title');
    $(this).focus(function(){
      if ($(this).val() == defaultVal){
        $(this).removeClass('active').val('');
      }
    })
    .blur(function(){
      if ($(this).val() == ''){
        $(this).addClass('active').val(defaultVal);
      }
    })
    .blur().addClass('active');
  });
  $('form').submit(function(){
    $('.default').each(function(){
      var defaultVal = $(this).attr('title');
      if ($(this).val() == defaultVal){
        $(this).val('');
      }
    });
  });
});

function slideSwitch() {
    var $active = $('.slideshow A.active');

    if ( $active.length == 0 ) $active = $('.slideshow A:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('.slideshow A: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()", 3000 );
});
