$(document).ready(function() {
	// Preload all rollovers
    $("#headline-welcome img").each(function() {
        // Set the original src
        rollsrc = $(this).attr("src");
        rollON = rollsrc.replace(/.png$/ig,"-over.png");
        $("<img>").attr("src", rollON);
    });
	
    // Navigation rollovers
    $("#headline-welcome a").mouseover(function(){
        imgsrc = $(this).children("img").attr("src");
        if (imgsrc != null){
			matches = imgsrc.match(/-over/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
				imgsrcON = imgsrc.replace(/.png$/ig,"-over.png"); // strip off extension
				$(this).children("img").attr("src", imgsrcON);
			}
		}
    });
	
    $("#headline-welcome a").mouseout(function(){
        $(this).children("img").attr("src", imgsrc);
    });
	
	// SECOND ONE
	
	// Preload all rollovers
    $("#footer-top img").each(function() {
        // Set the original src
        rollsrc = $(this).attr("src");
        rollON = rollsrc.replace(/.jpg$/ig,"-over.jpg");
        $("<img>").attr("src", rollON);
    });
	
    // Navigation rollovers
    $("#footer-top a").mouseover(function(){
        imgsrc = $(this).children("img").attr("src");
        if (imgsrc != null){
			matches = imgsrc.match(/-over/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
				imgsrcON = imgsrc.replace(/.jpg$/ig,"-over.jpg"); // strip off extension
				$(this).children("img").attr("src", imgsrcON);
			}
		}
    });
	
    $("#footer-top a").mouseout(function(){
        $(this).children("img").attr("src", imgsrc);
    });
});
