$(document).ready(function(){
  /* CONFIG */
  /* set start (sY) and finish (fY) heights for the list items */
  sY = 34;
  fY = 370;
  /* end CONFIG */

  /* open first list item */
  animate (fY)

  $("#slide .top").hover(function() {
	  if (this.className.indexOf('clicked') == -1 ) {
		  animate(sY)
		  $('.clicked').removeClass('clicked');
		  $(this).addClass('clicked');
		  animate(fY)
	  }
  });

  function animate(pY) {
    $('.clicked').animate({"width": pY + "px"}, { queue:false, duration:500});
  }
  
  $.fn.cycle.defaults.speed = 900;
  $.fn.cycle.defaults.timeout = 10000;

  if (jQuery.support.leadingWhitespace)
  {
    $('.top .cycle').cycle({ 
      fx: 'fade'
    });
    
    $('.corner').corner();
  };   
				      	
});
