	var slideImages = ['/img/tutors_big.jpg','/img/students_big.jpg','/img/parents_big.jpg','/img/directors_big.jpg'];
    var slideTexts = [];
    slideTexts[0] = "<a href='/tutors'><span class='f_str'>Exceptional Tutors...</span><br />100% graduated from top-tier colleges</a>";
    slideTexts[1] = "<a href='/media/data.php'><span class='f_str'>Successful Students...</span><br />92% improved grades and test scores</a>";
    slideTexts[2] = "<a href='/media/parents.php'><span class='f_str'>Satisfied Parents...</span><br />99% recommend Tutorpedia to<br />friends and family</a>";
    slideTexts[3] = "<a href='/about/history.php'><span class='f_str'>Ivy League Leadership...</span><br />30+ years experience from Stanford,<br />Harvard and Brown</a>";
	
    
	//preload images    
    var preloadImages = [];
    for(var x in slideImages ) {
    	preloadImages[x] = new Image();
		preloadImages[x].src = slideImages[x];    
    }    
    
    var rotatorTimer;
    
    $(document).ready(function() {
		
    	$("#slide_but a img").hover(
			function () {
        		this.src = "/img/btn_sign_up_now_light.png"
      		}, 
      		function () {
        		this.src = "/img/btn_sign_up_now_dark.png"
      		}
    	);
    	
		rotatorTimer = setTimeout('goQueue(1)', 5000);//5 sec
		setTimeout('stopSlides()', 1000*60*2);//2 min
		 
 	});
 	
 	function goQueue(i){
 		i=parseInt(i);
 		if (i > 3 || i < 0) {
 			i=0;
 		}
 		changeSlide(i);
 		i = (i==3) ? 0 : i+1;
 		rotatorTimer = setTimeout('goQueue('+i+')', 5000);
 	}
 	
 	function changeSlide(i) {
 		$('#slides_cont').fadeTo(1000,0.05, function(){
 			$('#slides_cont').css('background-image', 'url('+slideImages[i]+')');
 			$('#slide_text').html(slideTexts[i]);
 			$(this).fadeTo(1000, 1);
 			//$(this).fadeIn('normal');
 		});
 	}
 	
 	function stopSlides() {
 		clearTimeout(rotatorTimer);
 		changeSlide(0);
 	}
