
/*
	==================================================================
		init - start. 
	==================================================================  */
	
	jQuery(document).ready( function () {
		
		da_img_rotator_hide_init();
		da_img_rotator_start_timer();
		} );
	
	function da_img_rotator_hide_init() {
		jQuery('.da_img_rotator-wrap .init_hide').animate({opacity:0},0);
	}
	
	function da_img_rotator_start_timer() {
		
		setTimeout(function () { da_img_rotate(); },display_s);
	}
	
	
	function da_img_rotate()
		{
			
			var current_slide 	= jQuery('.da_img_rotator-wrap .current_slide').get(0);
			var new_slide		= jQuery('.current_slide').next('.rotator_slide').get(0);
			
			// remove the current slide indicatoer.
			jQuery(current_slide).removeClass('current_slide');
			
			if (typeof(new_slide) == 'undefined')
				{
					new_slide = jQuery('.rotator_slide.slide_1').get();
				}
				
			//jQuery(current_slide).animate({opacity:0},effect_s);
			//jQuery(new_slide).animate({opacity:1},effect_s, function () { jQuery(new_slide).addClass('current_slide'); } );
			
			jQuery(current_slide).queue( function () {
						jQuery(this).animate({opacity:0},effect_s, function() { da_img_rotator_start_timer(); } ); // restart the timer
						jQuery(new_slide).animate({opacity:1},effect_s, function () { jQuery(new_slide).addClass('current_slide'); } ); // make this the current slide
						jQuery(this).dequeue();
			});
		}