$(function(){



		$('#product-slide').serialScroll({
		items:'li',
		prev:'#selector-window a.prev',
		next:'#selector-window a.next',
		duration:600,
		force:true,
		stop:true,
		lock:false,
		cycle:false, 
		easing:'easeOutQuart', 
		jump: false,
		exclude: 10,
		step: 6	
		});	
		
		if ((location.hash) && (location.hash != "#1")) {
			whereto = location.hash;
			whereto = whereto.substr(1, whereto.lenghth);			
			$('#product-slide').scrollTo($('.'+whereto), 800, {over: -4});
			$('.'+whereto+' a').addClass('highlight-product');
		}
	 

        $('#product-slide a').live('click', function(e) {
                var url = $(this).attr('href');
                url = url.replace(/^.*#/, '');
                $.history.load(url);
                return false;
            });
            
        $('#product-slide a').click(function() {
        	$('#product-slide a').removeClass('highlight-product');
        	$(this).addClass('highlight-product');
        });   
		


		

 		
 		$('#home-panels').mouseover(function(){
 			
 			$('#panel1').delay(2000).animate({
   	    			top: '-=800'
  				}, 1200, function() {
  				 // Animation complete.
  			});
 		
 			$('#panel2').delay(2000).animate({

    			top: '-=800'
  				}, 2000, function() {
  				 // Animation complete.
  			});
  			
  
  			
  			$('#panel3').delay(2000).animate({
    			top: '-=800'
  				}, 3000, function() {
  				 // Animation complete.
  			});
  			
 			$('#home-panels').delay(2000).fadeOut(1200);
 		});
 		

 	
		
				
	});
