/*
	EXTEND LIBRARY
*/
jQuery.extend();
jQuery.fn.extend();

/*
	AUTOMATION
*/
//FUNCTION initRollOvers
function initRollOvers(){
	if(!document.getElementById) return;
	jQuery('img.ahover').each(function(){
		var src = jQuery(this).attr('src');
		var isov = src.substring(0,src.lastIndexOf('.'));
		if( isov.substring(isov.length-3, isov.length) != "_ov"
		 && isov.substring(isov.length-3, isov.length) != "_on"
		 && isov.substring(isov.length-4, isov.length) != "_off"
		){
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_ov'+ftype);
			var dsrc = src;
			jQuery(this).attr('hsrc', hsrc);
			jQuery(this).attr('dsrc', dsrc);
			var preImage = new Image();
			preImage.src = hsrc;
			preImage.src = dsrc;
			jQuery(this).bind('mouseover', function(e){
				jQuery(this).attr('src', jQuery(this).attr('hsrc'));
			});
			jQuery(this).bind('mouseout', function(e){
				jQuery(this).attr('src', jQuery(this).attr('dsrc'));
			});
			if (jQuery.browser.webkit) {
					jQuery(this).bind('click', function(e){
					jQuery(this).attr('src', jQuery(this).attr('dsrc'));
				});
			}
		}
	});
}
