/**
 * rollOverImages - jQuery plugin 
 *
 * Copyright (c) 2009 Attrise.Inc.
 *  http://attrise.com
 *
 * Dual licensed under the MIT and GPL licenses:
 *  http://www.opensource.org/licenses/mit-license.html
 *  http://www.gnu.org/licenses/gpl.html
 *
 * $Id: $
 */
(function($){
    jQuery.fn.rollOverImages = function(options) {
        // default setting sufix
        var defaults = {
            suffix : '_over'
        };
        var image_cache = new Object();
        settings = jQuery.extend({}, defaults, options);
        
        this.each(function(i){
            var $this     = jQuery(this),
                imgsrc    = this.src,
                dot       = this.src.lastIndexOf('.'),
                mime      = this.src.substr(dot, this.src.length - dot),
                imgsrc_on = this.src.substr(0, dot) + settings.suffix + mime;
            image_cache[this.src]     = new Image();
            image_cache[this.src].src = imgsrc_on;
            $this.hover(function(){
                    this.src = imgsrc_on;
                },
                function(){
                    this.src = imgsrc;
            });
        });
        return this;
    }
})(jQuery);

$(function(){ $("img.swap").rollOverImages(); });


/**
 * boxSameHeight - jQuery plugin 
 *
 * Copyright (c) 2009 Attrise.Inc.
 *  http://attrise.com
 *
 * Dual licensed under the MIT and GPL licenses:
 *  http://www.opensource.org/licenses/mit-license.html
 *  http://www.gnu.org/licenses/gpl.html
 *
 * $Id: $
 */
(function($){
    jQuery.fn.boxSameHeight = function(options) {
        var defaults = {
            n : 0
        };
        settings = jQuery.extend({}, defaults, options);
        this.each(function(){
            var $this = jQuery(this),
                h     = $this.height();
            settings.n = (settings.n < h) ? h : settings.n;
        });
        jQuery(this).css('height', settings.n);
        return this;
    }
})(jQuery);

$(function(){ $(".SameHeight").boxSameHeight(); });


