jQuery.noConflict();
(function($){
	$(window).load(function(){	
		$('#slider').slider({
			sliderType:'fade',
			numbers:false,
			animationTime : 1200,
			interval: 5000,
			onInit : function(e, items){
				if(!$('#text').length) {	
					$('#sliderOuterWrapper').prepend('<div id="textOverlay"/><div id="text"/>');
					$('#textOverlay').css({opacity:0.5});
					$('#text').append('<div id="2" style="bottom:0px;position:absolute;"/>');
					$('#text').append('<div id="1" style="right:20px;bottom:0px;position:absolute;"/>');
	
					$('#text div:last, #text div:first').css({height:'33px',width:'800px', overlay:'hidden'});	
					
					$('#text div:last').text(items.item.find('img').attr('title'));
					$('#text div:first').css({right:'100px',opacity:0}).text(items.item.next().find('img').attr('title'));
				}
			},
			onStart : function(e, items){
				//in-sliden
				$('#text div:first').animate({
					right:'20px',
					opacity:1
				});
	
				//uit-sliden
				$('#text div:last').animate({
					right:'-100px',
					opacity:0
				}, function(){
					$('#text').prepend($('#text div:last'));
					$('#text div:first').css({bottom:'0px',right:'100px'}).text(items.item.next().find('img').attr('title'));
					$('#text div:last').css({bottom:'0px',right:'20px'});
				});	
			}
		});
	});
})(jQuery);
