$(document).ready( function(){

	// times are in milliseconds
	// see http://www.malsup.com/jquery/cycle/options.html for all options
	$('#right_testimonials').cycle({ 
    	fx:            'fade',
		timeout:       3500,
		speed:         5000,
		cleartypeNoBg: true,
		pause:         1
	});

	// Used on product pages (ex: talkswitch) for additional images.
	// generates needed thumbnails, to cut down on HTML code.
	$(".cycle-thumbs").parent().append('<div id="smallimages" class="cyclethumbsnav"></div>');
	// Now, add all of the images as 'thumbnails' in the pager container,
	// with all needed html, ids, classes, etc for the cycle pager
	$(".cycle-thumbs img").each(function() {
		$("#smallimages").append('<span><a href="#"><img src="'+$(this).attr('src')+'" width="50" border="0" /></a></span>');
	});
	// Finally, call the cycle plug-in
	$(".cycle-thumbs").cycle({
		fx:      'scrollLeft',
		speed:   'slow',
		fit:     1,
		timeout: 0, 
		pager:   '#smallimages', 
		pagerAnchorBuilder: function(idx, slide) { 
			// return selector string for existing anchor 
			return '#smallimages span:eq(' + idx + ') a'; 
		}
	});


	// Request quote forms. Provides 'slide through steps' interface
	function quoteOnAfter(curr, next, opts) {
		var index = opts.currSlide;
		$('.prev')[index == 0 ? 'hide' : 'show']();
		$('.next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
		$('.done')[index == opts.slideCount - 1 ? 'show' : 'hide']();
	}

	$(".request-form").cycle({
		fx:    'scrollHorz',
		timeout:       0,
		next:          '.next',
		prev:          '.prev',
		nowrap:        1,
		pager:         '#pager',
		cleartypeNoBg: true,
		speed:         500,
		after:         quoteOnAfter
	});

	$('.dropshadow').dropShadow();

});