// JavaScript Document
$(document).ready(function(){
     $('#slider-list a').lightBox();
		$('.top_menu ul .submenu').each(function(index)
					{	
						$(this).parent().hover(
									  function () {
										  $(this).children().next().fadeIn(400);
										  },
									  function () {
										  $(this).children().next().hide();
										  }
									  )
					});
					
					
			// Roll menu
    	$('#carousel_ul li.section:first').before($('#carousel_ul li.section:last'));       
    	$('#right_scroll img').click(function(){
    		var item_width = $('#carousel_ul li.section').outerWidth() + 0;
    		var left_indent = parseInt($('#carousel_ul').css('left')) - item_width;
    		$('#carousel_ul:not(:animated)').animate({'left' : left_indent},500,function(){    
    			$('#carousel_ul li.section:last').after($('#carousel_ul li.section:first')); 
    			$('#carousel_ul').css({'left' : '-250px'});
    		}); 
    	});
    	$('#left_scroll img').click(function(){
    		var item_width = $('#carousel_ul li.section').outerWidth() + 0;
    		var left_indent = parseInt($('#carousel_ul').css('left')) + item_width;             
    		$('#carousel_ul:not(:animated)').animate({'left' : left_indent},500,function(){              
    			$('#carousel_ul li.section:first').before($('#carousel_ul li.section:last')); 
    			$('#carousel_ul').css({'left' : '-250px'});
    		});
    	});
     
    	$('.prev img').click(function(){
    		var item_height = $(this).parent().next().children('ul.elements').children().outerHeight() + 0;
    		var left_indent = parseInt($(this).parent().next().children('ul.elements').css('top')) - item_height;
    		$(this).parent().next().children('ul.elements:not(:animated)').animate({'top' : left_indent},500,function(){    
    			$(this).children('li.element:last').after($(this).children('li.element:first')); 
    			$(this).css({'top' : '-138px'});
    		}); 
    	});
    	$('.next img').click(function(){
    		var item_height = $(this).parent().prev().children('ul.elements').children().outerHeight() + 0;
    		var left_indent = parseInt($(this).parent().prev().children('ul.elements').css('top')) + item_height;
    		$(this).parent().prev().children('ul.elements:not(:animated)').animate({'top' : left_indent},500,function(){              
    			$(this).children('li.element:first').before($(this).children('li.element:last')); 
    			$(this).css({'top' : '-138px'});
    		});
    	});         
    	// END Roll Menu
		
		
});

