$(document).ready(function(){	
  // Set up the home page's logo carousel
  $("#carousel").jCarouselLite({
      auto: 1,
      speed: 900,
      visible: 7,
      easing: "linear"
  });
  

  // Manage the animated menu swipes
  $(function(){
    $('.inactive a')
      .css( {backgroundPosition: "0px -65px"} )
      .mouseover(function(){
        $(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:500})
      })
      .mouseout(function(){
        $(this).stop().animate({backgroundPosition:"(0 55px)"}, {duration:500, complete:function(){
            $(this).css({backgroundPosition: "0 -65px"})
          }
        })
    });
    $('.active a')
      .css( {backgroundPosition: "0px 0px"} )
      .mouseover(function(){
        $(this).stop().animate({backgroundPosition:"(0px -30px)"}, {duration:500})
      })
      .mouseout(function(){
        $(this).stop().animate({backgroundPosition:"(0 0px)"}, {duration:500, complete:function(){
            $(this).css({backgroundPosition: "0 0px"})
          }
        })
      });
      
  });

  // tabs
  $(function() {
    $("#tabs").tabs();
  });
  
  // Accordion
  $(function() {
    $("#accordion").accordion({ collapsible: true, active: false });
  });

  // modal box
  $(function() {
    $(".modal").dialog({ modal: true, title: 'Mark CSB Payments as Paid', autoOpen: false, resizable: false, width: 800, position: 'center' });
  });

  // date picker
  $(function() {
    $(".datepicker").datepicker({dateFormat: 'yy-mm-dd'});
  });

});

