﻿/*
plugin to set-up rollovers for a jquery selection list of imgs.  
assumes the rollover img has a -r on the filename
*/
(function($) {
    $.fn.imgRollovers = function() {
        return this.each(function() {
            var img = $(this);
            var src = img.attr("src");
            var rolloverSrc = src.split(".").join("-r.");

            $("<img>").attr("src", rolloverSrc);    /* preload */

            img.hover(
                        function() { img.attr("src", rolloverSrc) },
                        function() { img.attr("src", src) }
                    );
        });
    };
})(jQuery);

function changeFontSize(up) {
    var currSize = parseFloat($("#content-sized").css("font-size"));

    //alert(currSize);
    
    if (isNaN(currSize))
        return;

    if (up) {
        if (currSize <= 21)
            currSize++;
    }
    else {
        if( currSize > 8 )
            currSize--;
    }

    $("#content-sized").css("font-size", currSize);
}
