$(document).ready(function(){
    Cufon.replace('div.title, h1');
   
    //banner rotation
    $('.banner-images').cycle({
        fx: 'fade',
        timeout: 5000,
        speed: 2000
    });
        
    //    $('#nav li a').hover(function(){
    //        $('.banner-images').cycle('pause');
    //
    //        $(this).siblings('img[class]').fadeIn();
    //    },
    //    function() {
    //        $('.banner-images').cycle('resume');
    //        $(this).siblings('img[class]').fadeOut();
    //    });
   
    //JCarousel Plugin
    $('#carousel').jcarousel({
        vertical: true,
        scroll: 2
    //auto: 2,
    //wrap: 'last',
    //initCallback: mycarousel_initCallback
    });
  
    /* fade images*/
  
    $("ul.thumb li a").fadeTo("slow", 0.3);
    $("ul.thumb li a").hover(function(){
        $(this).fadeTo("slow", 1.0);
    },function(){
        $(this).fadeTo("slow", 0.3);
    });
  
   
    /* swap image */
    /*  $("ul.thumb li a").click(function() {
      var mainImage = $(this).attr("href"); //Find Image Name
      $("#main_view img").attr({ src: mainImage });
      return false;   
  });
 */

    $('li.sect').click(function(){
        var id = $(this).attr('id');
        var visible = $('.pane[id=sub_' + id + ']').is(':visible');

        $('.pane').hide();

        if(visible==false){
            $('.pane[id=sub_' + id + ']').show();
            $('li.sect').removeClass('arr_down')
            $(this).addClass(' arr_down')
        }
        else
            $('li.sect').removeClass('arr_down')
    });
  
  
})  
function mycarousel_initCallback(carousel) {
  
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
}
