$(document).ready(function(){
	
	
	$('#solutions-nav li').each(function() {
		
		var pathToNormalIcon = $("input[name='normal-background']", this).val();
		var pathToRolloverIcon = $("input[name='rollover-background']", this).val();
		var siblingPosition = GetSiblingNumber(this);
		
		$("a", this).css('background', 'url('+pathToNormalIcon+') no-repeat top left').hover(
			function(){
				$(this).css('background', 'url('+pathToRolloverIcon+') no-repeat top left');
				$('.callout-content .callcontent:eq('+siblingPosition+')').css('display', 'inline');
				$('span', this).css('color', '#d9872d');
			},
			function(){
				$(this).css('background', 'url('+pathToNormalIcon+') no-repeat top left');
				$('.callout-content .callcontent:eq('+siblingPosition+')').css('display', 'none');
				$('span', this).css('color', '#ffffff');
			}
		);
		
	});
});

function GetSiblingNumber(oElement) {
	return $(oElement).parent().children(oElement.nodeName).index(oElement);
}