// JavaScript Document
    jQuery(document).ready(function(){
		
		
		jQuery(".page-about-us #content .entry-content").before("<div class='sideImg'></div>");
		jQuery("#thumb_wrap > a").each( function( index ) {
  			 jQuery(this).attr('id', index);
    	});
		
		jQuery("#testi_wrap > #testimonial").each( function( index ) {
  			 jQuery(this).addClass('testID-' + index);
    	});
		

		var lastThumb = parseInt(jQuery('#thumb_wrap > a:last-child').attr("id"));
		var limitWidth = -730 * lastThumb;
		var lengthWidth = 730 * ( lastThumb + 1 );
		
		jQuery("#testi_wrap").css("width", lengthWidth);
		
		jQuery('#controller .next').click( function(){
			var left_indent = (parseInt(jQuery('#testi_wrap').css('margin-left'))) - 730;
			if ( left_indent >= limitWidth) {
			jQuery('#testi_wrap').animate({ 
				marginLeft : left_indent 
			});	
			};
			return false;
			
		});
		jQuery('#controller .prev').click( function(){
			var left_indent = (parseInt(jQuery('#testi_wrap').css('margin-left'))) + 730;
			if( left_indent < 1 ) {
				jQuery('#testi_wrap').animate({ 
					marginLeft : left_indent 
				});					
			} ;
			return false;
		});
		
		
		jQuery("#thumb_wrap a").click( function() {
			var thumbOrder = parseInt(jQuery(this).attr("id"));
			var left_indent = thumbOrder * -730;
			jQuery('#testi_wrap').animate({ 
				marginLeft : left_indent 
			});	
			return false;
		});
}); 	
