// JavaScript Document

// ---	global rollover requires on/off image naming convention: 
//		{imagefilename}-on.png / {imagefilename}.png
function cnf_rover ( obj ) {
	//alert ( 'cnf_ron ( obj:' + obj + ' )' );
	obj.ogsrc 	= obj.src;
	src 		= obj.src.substr ( 0, obj.src.indexOf ( '.png' ) ) + '-on.png';
	if ( src.indexOf ( '-on-on' ) == -1 ) 	obj.src 	= src;
}
function cnf_rout ( obj ) {
	//alert ( 'cnf_rout ( obj:' + obj + ' )' );
	if ( obj.ogsrc ) 	obj.src 	= obj.ogsrc;
}

// ---	decode string from php urlencode
function urldecode ( str ) {
	str 	= str.replace ( /\+/g, ' ' );
	str 	= str.replace ( /%C3%A9/g, '&eacute;' );
	str 	= unescape ( str );
	return str;
}


// ---	initiate document and assign events/actions
function cnf_init () {
	//alert ( 'cnf_init ()' );
	// ---	topnav rollovers
	$( '#topnav-link4line' ).mouseover ( function () { cnf_rover ( this ); } );
	$( '#topnav-link4line' ).mouseout ( function () { cnf_rout ( this ); } );
}
$( document ).ready ( cnf_init );
