$(function(){
	if ($.browser.msie && $.browser.version <= 7) 
		$('hr').each(function(){
			var theClass = $(this).attr('class');
			$(this).replaceWith('<div class="hr ' + theClass + '"></div>');
		});
	
	$('#service-nav li').each(function(i){
		$(this).hover(function(){
			
			
			var el = $(this);
			
			el.parent().find('li').removeClass('selected').end().end().addClass('selected');
			
			$('#service-content div').removeClass('selected').eq(i).addClass('selected');
			
			var css = [
				'.sIFR-root { height:35px; font-size:30px; color:#434343; text-align:right }', 
				'a { text-decoration:none}', 
				'a:link { color:#434343; }', 
				'a:hover { color:#FF9000; text-decoration:none }'
			];
			
			var cssSel = [
				'.sIFR-root { height:35px; font-size:30px; color:#ffffff; text-align:right }', 
				'a { text-decoration:none}', 
				'a:link { color: #ffffff; }', 
				'a:hover { color: #ffffff; text-decoration:none }'
			];

			$.each(sIFR.replacements['#service-nav li.selected'], function( i ) {
				var li = $(this.getFlashElement()).parent();
				if ( !li.hasClass('selected') )
					this.changeCSS(css);
				else{
					this.changeCSS(cssSel);
				}
			});
			
			$.each(sIFR.replacements['#service-nav li'], function() {
				var li = $(this.getFlashElement()).parent();
				if ( !li.hasClass('selected') )
					this.changeCSS(css);
				else
					this.changeCSS(cssSel);
			});
			
		});
	});
});