function internal(idSec) {
		
	//$('ul#main-nav > li').removeClass('selected');
	//$('ul#main-nav > li').removeClass('sfHover');
	//$('#'+idSec).parent().addClass('selected');
	
	/* change middle content */
	$('.content').hide();
	$('#'+idSec+'-content').show();
	//console.log('#'+idSec+'-content');
	
}

function highlight(idSec) {

	$('ul#main-nav > li').removeClass('selected');
	$('ul#main-nav > li').removeClass('sfHover');
	$('#'+idSec).parent().addClass('selected');
	
}

function changeRightUrl(url) {
	$('.right-container').html('<div id="iframe-container">\
									<iframe src ="'+url+'" width="312" height="500" frameborder="0" scrolling="yes">\
									</iframe>\
								</div>');
}

$(document).ready(function(){
	
	$('ul#main-nav li').hover(function() {
		$(this).addClass('sfHover');
	}, function() {
		$(this).removeClass('sfHover');
	});
	
	$('.dd-map .map a').click(function() {
		
		$('ul#main-nav > li').removeClass('selected');
		$('ul#main-nav > li').removeClass('sfHover');
		
		$('.content').hide();
		$('#map-content').show();
		
	});
	
	$('ul#main-nav > li a').click(function() {
		
		var mainNavChild = $(this).parent();
		
		while ($(mainNavChild).parent().attr('id') != 'main-nav') {
			mainNavChild	= $(mainNavChild).parent();	
		}
		
		if (($(this).attr('status') != 'no-click') || ($(this).attr('status') != 'special'))  {
		
			$('ul#main-nav > li').removeClass('selected');
			$('ul#main-nav > li').removeClass('sfHover');
			$(mainNavChild).addClass('selected');
		
		}
		
		/* change middle content */
		if ($(this).attr('id') == 'jobs') {
			
			$('.content').hide();
			$('#'+$(this).attr('id')+'-content').show();
			$("#jobs-content").load("data/jobs.html");
		} else if ($(this).attr('status') == 'no-click') {
			/* do nothing because no click through */
		} else if ($(this).attr('status') == 'special') {
			
			window.location.href($(this).attr('href'));
			
		} else {
			/* change middle content */
			$('.content').hide();
			$('#'+$(this).attr('id')+'-content').show();
		}
		
		/* change right content */
		if ($(this).attr('id') == 'jobs') {
			
			$('.right-container').html('<div class="image-container">\
                <img src="images/Candidate.gif" alt="Candidate" title="Candidate" height="503" width="312" border="0"/>\
            </div>');
			
		} else if (($(this).attr('id') == 'about-us') || ($(this).attr('id') == 'salary-survey')) {
			
			$('.right-container').html('<div class="image-container">\
                <img src="images/AboutUs.gif" alt="About Us" title="About Us" height="503" width="312" border="0"/>\
            </div>');
			
		} else if (($(this).attr('id') == 'candidate') || ($(this).attr('id') == 'contact-us')) {
			
			$('.right-container').html('<div class="image-container">\
                <img src="images/Candidate.gif" alt="Candidate" title="Candidate" height="503" width="312" border="0"/>\
            </div>');
			
		} else if (($(this).attr('id') == 'employer') || ($(this).attr('id') == 'register-with-us') || ($(this).attr('id') == 'business-sector') || ($(this).attr('id') == 'industry') || ($(this).attr('id') == 'roles')) {
			
			$('.right-container').html('<div class="image-container">\
                <img src="images/Employer.gif" alt="Employer" title="Employer" height="503" width="312" border="0"/>\
            </div>');
		}
		
		// console.log($(this).attr('id')+'-content');
		// ($(this).parents('#main-nav')
						   
		return false;
		
	});
	
	/* default content to be shown */
	$('#about-us-content').show();
	$('#about-us').parent().addClass('selected');
	$('.right-container').html('<div class="image-container">\
                					<img src="images/AboutUs.gif" alt="candidate" title="candidate" height="503" width="312" border="0"/>\
            					</div>');
	
	
		
	//$('iframe').attr('src','http://www.google.com');

});