jQuery.fn.rollover = function(onImage, offImage) {
    return this.each(function() {    
        var currentImage = $(this).attr("src");            
        $(this).hover(function() {
            $(this).attr("src", onImage);
        }, function() {	
            if (offImage && offImage != "")
                $(this).attr("src",offImage);    
            else
                $(this).attr("src", currentImage);    
        });
        
    });
}

jQuery.fn.aperionBox = function() {
    $(this).find(".header .info").wrap("<div class=\"stripe\"><div class=\"west\"><div class=\"east\"></div></div></div>");
    $(this).find(".content .info").wrap("<div class=\"north\"><div class=\"west\"><div class=\"east\"><div class=\"south\"><div class=\"ne\"><div class=\"nw\"><div class=\"se\"><div class=\"sw\"></div></div></div></div></div></div></div></div>");
    $(this).addClass("roundContainer");
}


//$.fn.borderTableHeader = function()
//{

//    this.each(function() {
//    
//        var firstHeaderCell = $(this).children("th.first");
//        var lastHeaderCell = $(this).children("th.last");
//        
//        var firstHtml = $(firstHeaderCell).html();
//        var lastHtml = $(lastHeaderCell).html();
//        
//        $(firstHeaderCell).empty();        
//        $(firstHeaderCell).prepend("<div class='northwest'><div class='southwest'>" + firstHtml + "</div></div>");
//        
//        $(lastHeaderCell).empty();        
//        $(lastHeaderCell).prepend("<div class='northeast'><div class='southeast'>" + lastHtml + "</div></div>");
//        
//    });
//}

//$.fn.borderWithOptions = function(prefix, options)
//{
//    var classNames = options;
//	
//	this.each(
//		function()
//		{
//			var borderElement = null;
//			var currentElement = this.cloneNode(true);
//			var nodeList = this.childNodes;
//			var nodeArray = new Array();
//			
//			$(currentElement).addClass(prefix);
//			
//			for (var index = classNames.length - 1, className; className = classNames[index]; index--) 
//			{				
//				if (prefix != null)
//				{ 
//					className = prefix + "-" + className;
//				}
//				
//				borderElement = document.createElement('div');
//				$(borderElement).addClass(className).css({display: 'block'});
//				
//				borderElement.appendChild(currentElement);
//				currentElement = borderElement;
//			}
//						
//			this.parentNode.replaceChild(currentElement, this);
//			
//			/* IE Hack:
//			 *     IE collapses the bottom and top margins
//			 *     rendering the next sibbling partially
//			 *     inside of the previous sibbling element.
//			 */
//			
//			/*@cc_on
//			$(currentElement).css({zoom: '1'});
//			@*/
//		}
//	);
//		
//	return this;
//}

//$.fn.border = function(prefix)
//{
//	var classNames = [
//		'northwest',
//		'southwest', 
//		'southeast', 
//		'northeast', 
//		'west', 
//		'south',
//		'east',
//		'north'];
//	
//	this.each(
//		function()
//		{
//			$(this).addClass(prefix);

//			for (var index = classNames.length - 1, className; className = classNames[index]; index--) 
//			{				
//				if (prefix != null)
//				{ 
//					className = prefix + "-" + className;
//				}
//				
//				borderElement = document.createElement('div');
//				$(borderElement).addClass(className).css({display: 'block'});
//				
//				$(this).wrap( borderElement );
//			}
//		}
//	);
//		
//	return this;
//};