
//<![CDATA[ 
$(document).ready(function() {
						   
var currentButton = '';
var cache = [];
//function below is to cache the rollover images
findImagesToLoad = function(type){
	var pageImgArray = [];
	var imgs = document.getElementsByTagName(type);
	for (var i=0;i<imgs.length;i++) {
		if(imgs[i].src.indexOf('buttons')>-1){
      		var cacheImage = document.createElement('img');
      		cacheImage.src = imgs[i].src.substr(0,imgs[i].src.indexOf('.png')) + '_over.png';
	  		cacheImage.alt = imgs[i].alt.substr(0,imgs[i].alt.indexOf('.png'));
			cache.push(cacheImage);
		}
	}
	return pageImgArray;
	}
//load any roll over images into the cache
findImagesToLoad('img');

//when hovering over any image.... 
$("a").hover(
				function(){//when you roll into the image
					$(this).blur();
					if((currentButton = $(this).find("img").attr("src"))!=null){// if there is a src path
						if(currentButton.indexOf('orange')==-1){// if the image isn't orange (orange means active page, so no rollover is desired)
							$(this).find("img").attr("src",currentButton.substring(0,currentButton.indexOf('.png')) + "_over.png");//switch src to the rollover image
						}
					}
				},
				function(){//when you roll off of the image
					if(currentButton!=''){
						if(currentButton.indexOf('orange')==-1){
							if($(this).find("img").attr("src")!=null && $(this).find("img").attr("src")!=currentButton){
								$(this).find("img").attr("src",currentButton);
							}
							currentButton='';
						}
					}
		});

});
//]]

