$(function(){
	   $('#main-menu li a').append('<span class="hover"></span>');
	   // span whose opacity will animate when mouse hovers.
	
	   $('#main-menu li a').hover(
			 function() {
			 $('.hover', this).stop().animate({
			'opacity': 1
			}, 700,'easeOutSine')
				},
			    function() {
			   $('.hover', this).stop().animate({
			'opacity': 0
			}, 700, 'easeOutQuad')
			
			})
		$('.corner').corner('round 5px'); 
	    $('.corner-right').corner('right round 5px');
	    $('.corner-bottom').corner('bottom round 5px');
	    
	    
	    
	   //$("#slider").scrollable({ circular: true, mousewheel: true }).autoscroll({interval:10000});
	   var tab=$(".tabs"); 
	   var i = $("#slider .items > li").length;
	   while (i-->0){ tab.append('<a href="#"></a>');};
	   
	   tab.tabs("#slider .items > li", {
			effect: 'fade',
			fadeOutSpeed: "slow",
			rotate: true
		}).slideshow({autoplay:true, interval:5000});
	   
	   // hints in inputs
	   q=$("input.hint");
	   q.focus(function (){
		   if (this.value==this.defaultValue){
			   this.value="";
			   $(this).removeClass("hint");
		   }	   
	   });
	   q.blur(function (){
		   
		   if (this.value =="") {
			   this.value=this.defaultValue;
			   $(this).addClass("hint");
		   }
		   
	   });
	   // rollup
	   $("div.rollup").hide();
	    with ($("a.rollup")) {
		   wrapInner("<span/>");
		   click(function(event){
			   $(this).toggleClass("rollup-open");
			   var node = $((this.hash ? this.hash:this.name));
			   if (node.css("display") == "none") node.slideDown("slow");
			   else node.slideUp("slow");
			   event.preventDefault();;
		   });
	   }
});
