var Testimonials = {
	index: 0, 
	content:[
	{descr:"I was pleasantly surprised by all the great gift that came in this year. The download area is packed full of great stuff that <strong>I would happily pay full price for any other time</strong> of year.", user:"-- Shelby Carr", image:''},
	{descr:"You guys rock! <strong>I couldn't believe the quality of products available for FREE</strong> in your download area. I can't wait to tell my business contacts and friends about your program.", user:"-- Sandy Liu", image:''},
	{descr:"<strong>The software products that you give away are unbelievable.</strong> The value and the content... What else can I say except &quote;Thank You Very Much&quote.<br /><br />Gosh, I just still don't believe this is REAL! ", user:"-- Dina Philips", image:''},
	{descr:"<strong>Wow! I just hope I can actually get all this stuff downloaded before</strong> the event is over. Your download area is MASSIVE guys!<br /><br/ >Thanks for putting on such a cool event!", user:"-- Tim Whitson", image:''},
	{descr:"We have literally thousands of these stories you can enjoy that have been posted by our members in our community.   Come inside and see for yourself.  It's free!", user:"", image:''},
	]
};
var howdoesitwork = Class.empty();

window.addEvents({
	domready:function(){
		if ($('span_descr')){
			$('span_descr').innerHTML = Testimonials.content[Testimonials.index].descr;
			$('span_user').innerHTML = Testimonials.content[Testimonials.index].user;
		}

		
		howdoesitwork = new Slidey({pause: 5500});
		$$(".sbutton").each(function(el){
			el.fx = el.effects({duration: 800, transition:Fx.Transitions.Sine.easeOut, wait:true});	
			el.addEvents({
				mouseleave:function(){
				},
				mouseenter:function(){
					el.fx.start({
						'opacity': [.3, 1]
					});
				},
				mousedown:function(){
					this.setStyle('opacity', .3);
				},
				mouseup:function(){
					this.setStyle('opacity', 1);
				}
				
			});
			
		});//end each
		
		if ($('div_testimonials')) {
			$('a_testimonials').fx = $('div_testimonials').effects({duration: 1000, transition:Fx.Transitions.Sine.easeOut, wait:true, onStart:function(){
				$('span_descr').innerHTML = Testimonials.content[Testimonials.index].descr;
				$('span_user').innerHTML = Testimonials.content[Testimonials.index].user;
				if ($('div_testimonials').hasClass('bgimage')) {
					$('div_testimonials').setStyle('background-image', 'url('+Testimonials.content[Testimonials.index].image+')');
				}
			}});	
			
			$('a_testimonials').addEvent("click", function(){
				Testimonials.index = (Testimonials.index < (Testimonials.content.length-1))?Testimonials.index + 1: Testimonials.content.length-1;
				this.fx.start({
					'opacity': [.3, 1]
				});
				
			});
		}
		
		$$('.a_howdoesitwork').each( function(el){
			el.addEvent('click', function(e){				 
				e = new Event(e).stop();
				howdoesitwork.show($('popupbox'));
			}).setStyle('cursor','pointer');
		});
		
	},
	load:function(){
	}
});