$(document).ready(function(){

    // search bar
    $("input#s").focus(function(){       
        if (this.defaultValue == this.value){
            this.value="";
        }
    });
    $("input#s").blur(function(){       
        if (this.value == ""){
            this.value = this.defaultValue;
        }
    });
       
    // newsticker
    $("#newsticker").newsTicker();
    
    // tabs
    // $("#level1").tabs({
    //         select: function(event, elm){
    //                         
    //             if(elm.tab.id == "blog") {
    //                 location.href = $.data(elm.tab, 'load.tabs');
    //                 return false;
    //             }
    //         }
    //     });
    $("#level1").tabs();
    
    $("#level1").bind('tabsselect', function(event, ui){
        if(ui.tab.id == "blog") {
            location.href = $.data(ui.tab, 'load.tabs');
            return false;
        }
    });
    
    $("#tab-nav").tabs(); 
    
    $("#frm-contact").validate();
    $("#form-contact").validate();
});



    
