$('#scroll').cycle({ 
    fx:         'fade',
    speed: 1500,
    timeout:6000,
    pager:      '#nav', 
    pagerEvent: 'mouseover'
});

window.onload=function(){

var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes(); 
var seconds = now.getSeconds();
var i=(seconds+hours*60*60+minutes*60)*937;
startTime(i);
}
 
function startTime( i )
 {
         $('#stuff').airport([i+'',i+3*937+'',i+6*937+'',i+9*937+'']);
         i += 22*937;
         t = setTimeout('startTime('+i+')', 20000);
}

$(document).ready(function(){
    //$.preloadCssImages();
    $("ul.menu").addClass("topnav");
    $("ul.menu ul").addClass("subnav");
    $("ul.topnav li").hover(function() {
        // hover in
        $(this).find(".subnav").show();
    }, function() {
        // hover out
        $(this).find(".subnav").hide();
    });
    
    $(".left-half-blue").each(function(){
       $(this).find("img").unwrap();
       
    });
    $(".right-half-blue").each(function(){
       $(this).find("img").unwrap();
       
    });
    
    $(".left-half-blue").each(function(){
       $(this).find("br").remove();
       
    });
    
    $(".right-half-blue").each(function(){
       $(this).find("br").remove();
       
    });
	
    $(".right-half-blue").hover(
      function () {
            $(this).addClass('box-hover');;
      }, 
      function () {
            $(this).removeClass('box-hover');
      }
    );
    $(".left-half-blue").hover(
      function () {
            $(this).addClass('box-hover');;
      }, 
      function () {
            $(this).removeClass('box-hover');
      }
    );

    $(".left-half-blue").click(function(){    
            var e = $(this).find("a:first").attr("href");    
            window.location=e;  
    });
    
    $(".right-half-blue").click(function(){    
            var e = $(this).find("a:first").attr("href");    
            window.location=e;  
    });
    
    $("input[type=text]").focus(function(){
    // Check for the change
    if(this.value == this.defaultValue){
        this.value="";
        $(this).addClass("active");
    }
    });
    
    $("input[type=text]").blur(function(){
    // Check for the change
        if (this.value == "" || this.value==" " || this.value == this.defaultValue){
        this.value = this.defaultValue;
        $(this).removeClass("active");
        }
    });
    
    $("textarea").focus(function(){
    // Check for the change
    if(this.value == this.defaultValue){
        this.value="";
        $(this).addClass("active");
    }
    });
    
    $("textarea").blur(function(){
    // Check for the change
        if (this.value == "" || this.value==" " || this.value == this.defaultValue){
        this.value = this.defaultValue;
        $(this).removeClass("active");
        }
    });
	
});

