﻿// Function to "activate" images.
function imgAct(imgName) {
    document.getElementById(imgName).src = "images/" + imgName + "-over.png";
}

// Function to "deactivate" images.
function imgInact(imgName) {
    document.getElementById(imgName).src = "images/" + imgName + ".png";
}


var RTS = new Object();
//var $j = jQuery.noConflict();


RTS.show = function (divid){
    
    if($('#m1').css('display')=='block')
        $('#m1').animate({height: 'toggle'}, 'slow');
    
    if($(divid).css('display')=='none')
        $(divid).animate({height: 'toggle'}, 'slow');
    
}

/*
	FORM BUILDER SPECIFIC !!
*/
function changeHeadingToSpan(textToChange){
	$('.fbfullColumnHeading').each(function(idx,elem){
		if($(this).text().toLowerCase() == textToChange.toLowerCase()){
			$(this).removeClass('fbfullColumnHeading');
			$(this).addClass('fbfullColumnHeading-small');
			//$(this).css('font-size','16px');
			$(this).html('<span class="form-label">'+ textToChange + '</span>');
		}
		
		
	});
}



$(document).ready(function() {
    var myarray = new Array(6);
	   myarray[0] = "images/content001.jpg";
	   myarray[1] = "images/content002.jpg";
	   myarray[2] = "images/content003.jpg";
	   myarray[3] = "images/content004.jpg";
	   myarray[4] = "images/content005.jpg";
	   myarray[5] = "images/content006.jpg";
           
           var number = Math.ceil( 6 * Math.random()) - 1;
          
	   $("#mainContentContainer").css("background-image","url(" + myarray[number] + ")");
	   changeHeadingToSpan('Please Note: Tours are scheduled two weeks out.');
	   changeHeadingToSpan('Tour Shirts - Please indicate the number of shirts for each size. Tour shirts tend to run small.');
	   changeHeadingToSpan('Please indicate the number of workbooks for each grade level.');

	});
