$(document).ready(function(){
						// hide all panels then reveal first panel
						$(".panel").css({ 'opacity' : 0 }).first().css({ 'opacity' : 1 });
						
						// custom panels
						var panelWidth = $(".custom-panels li").outerWidth();
    		var leftPos = panelWidth * (-1);   
						var panelSpeed = 800;
						var panelFadeIn = 1000;
						var panelFadeOut = 700;
						
						// move the last item before first item, just in case user click prev button  
						$('.custom-panels li:first').before($('.custom-panels li:last'));  
				
						// set the default item to the correct position   
						$(".custom-panels").css({'left' : leftPos});  

						$(".arrow-right a, .look-forward a").click(function() {
								// return function if already animated
								if ($(".custom-panels").is(":animated")) { return; }
																																																														
								var left_indent = parseInt($('.custom-panels').css('left')) - panelWidth; 
								
								// slide panels left
								$(".custom-panels").animate({
											'left' : left_indent																																										
								}, panelSpeed, function() {
										//move the first item and put it as last item, then correct the panel position             
										$(".custom-panels li:last").after($(".custom-panels li:first"));
          $('.custom-panels').css({'left' : leftPos});  
								});
								
								// fade panels 
								$(".custom-panels .active").animate({
												'opacity': 0
								}, panelFadeOut).next().animate({
										'opacity' : 1
								}, panelFadeIn);
								
								$(".custom-panels .active").removeClass("active").next().addClass("active");
								
								return false;
								
						}); // end $(".arrow-right a").click()
						
						$(".arrow-left a, .glance-back a").bind("click", function() {		
								// return function if already animated
								if ($(".custom-panels").is(":animated")) { return; }
																																																														
								var left_indent = parseInt($('.custom-panels').css('left')) + panelWidth; 
								
								// slide panels left
								$(".custom-panels").animate({
											'left' : left_indent																																											
								}, panelSpeed, function() {
									
										// move the last item and put it as first item, then correct the panel position                  
										$('.custom-panels li:first').before($('.custom-panels li:last'));
          $('.custom-panels').css({'left' : leftPos});
								});
								
								// fade panels
								$(".custom-panels .active").animate({
												'opacity': 0
								}, panelFadeOut).prev().animate({
										'opacity' : 1
								}, panelFadeIn);

								$(".custom-panels .active").removeClass("active").prev().addClass("active");

								return false;
								
						}); // end $(".arrow-left a").click()
				});
