$.fn.cycle.defaults.timeout = 6000;
$(function() {
    $('table pre code').not('#skip,#skip2').each(function() {
        eval($(this).text());
    });
    $('#s4').after('<div id="control-slider"><div id="nav" class="nav"></div></div>').cycle({
        fx:     'scrollHorz',
        speed:  'slow',
        timeout: 6000,
        pager:  '#nav'
    });
    $('#s1').before('<div id="nav1" class="nav1"></div>').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 7000,
        pager:  '#nav1'
    });

    $('.web-linked>li>ul').hide();
    $(".current_submenu").slideDown('1000');
    $("ul.web-linked>li a").click(function(){
        $(".current_submenu").slideUp('1000');
        $('.web-linked>li>ul').removeClass("current_submenu");
        $(this).next("ul").slideDown('1000');
        $(this).next("ul").addClass("current_submenu");
    });

    $("ul.web-linked>li").click(function(){
        $("ul.web-linked>li").removeClass("current");
        $(this).addClass("current");
    });
            
    $("#people-list>table").click(function(){
        $('.current_sub').slideUp('1000');
        $('.current_sub').next('div').show();
        $('.current_sub').removeClass("current_sub");
        $(this).next('div').slideDown('1000');
        $(this).next('div').next('div').hide();
        $(this).next("div").addClass("current_sub");
    });
    $('.slide-remove').click(function(){
        $('.current_sub').slideUp('1000');
        $('.current_sub').next('div').show();
        $('.current_sub').removeClass("current_sub");
    });
    $('#keyword').keyup(function(key)
    {
        if (this.value.length >= 3 || this.value == '')
        {
            $('#news-tab-content').html('<img src="/images/load.gif">');
              $.ajax({url:$(this).parents('form').attr('action')+"?keyword="+this.value+"&url="+document.location.href, success:function(result){
                $("#news-tab-content").html(result);
              }});
            $('#job-tab-content').html('<img src="/images/load.gif">');
              $.ajax({url:$(this).parents('form').attr('action')+"?keyword="+this.value+"&url="+document.location.href, success:function(result){
                $("#job-tab-content").html(result);
              }});
        }
    });

});




