var palsystem = {}
palsystem.RollOverImage = {
	init : function(){
		var conf = 
		{
			className: 'rollover',
			postfix : '_f2'
		};
		var imgNodeList = $('.rollover');
		var node;
		var len = imgNodeList.length;
		for(var i = 0; i < len; i++)
		{
			node = imgNodeList[i];
			node.originalSrc = node.src;
			if(node.originalSrc.indexOf('_f2.') != -1){
				continue;
			}
			node.rolloverSrc = node.originalSrc.replace(
			  /(\.gif|\.jpg|\.png)/, conf.postfix + "$1");
			$(node).unbind('mouseover');
			$(node).unbind('mouseout');
			$(node).mouseover(function(){
				this.src = this.rolloverSrc;
			});
			$(node).mouseout(function(){
				this.src = this.originalSrc;
			});
			this.preload(node.rolloverSrc);
		}
	},
	preload : function(url){
		var l = this.images.length;
		this.images[l] = new Image();
		this.images[l].src = url;
	},
	images: new Array()
}

$(function(){
	palsystem.RollOverImage.init();
});
