// 3 : 2
var primaryNav = {
  mouseover: function() {
    $(this).addClass('over');
    $(this).children('a.lvl2').addClass('over');
    $(this).children('ul.lvl3').show();    
    if ($.browser.msie) {
	var h = $(this).children('ul.lvl3').height();
	var w = $(this).children('ul.lvl3').width() + 1;
	$(this).children('iframe').height(h).width(w).show();
    }
  },
  mouseout: function() {
    $(this).removeClass('over');
    $(this).children('a.lvl2').removeClass('over');
    $(this).children('ul.lvl3').hide();
    if ($.browser.msie)
        $(this).children('iframe').hide();
  },
  init: function() {
    this.setup();
    $('#primaryNav > li').hover(this.mouseover, this.mouseout);
    $('#primaryNav ul.lvl3 li').hover(function() { $(this).addClass('over'); }, function() { $(this).removeClass('over'); });
  },
  setup: function() {
    $('#primaryNav > li').append('<ul class="lvl3" style="display: none;">');
	// Remove everything from the Company and Services navigation drop down menu since there are no links.
	$('#primaryNav #navHome ul').empty();
	$('#primaryNav #navCustomers ul').empty();
	$('#primaryNav #navContact ul').empty();
	
	/**
    if ($.browser.msie) // iframe to fix dropdowns over select items
        $('#primaryNav > li').append('<iframe style="display: none;" src="javascript:false;" frameBorder="0" scrolling="no"></iframe>');
	*/
	
 	          //$('#navSolutions ul.lvl3')
	$('#navCompany ul.lvl3')
		          .append('<li class="f"><a href="Co_Overview.html">Company Overview</a>')
		          .append('<li><a href="Co_Management.html">Management</a>')
		          .append('<li><a href="Co_Partners.html">Partners</a>')
		           .append('<li class="l"><a href="Co_Employment.html">Employment</a>');
				   
	$('#navNewsAndEvents ul.lvl3')
		          .append('<li class="f"><a href="NE_PressReleases.html">Press Releases</a>')
		          .append('<li><a href="NE_IntheNews.html">In the News</a>')
		          .append('<li class="l"><a href="NE_Events.html">Events</a>');
        
	$('#navProduct ul.lvl3')
		          .append('<li class="f"><a href="BugScope-assertion-synthesis.html">Assertion Synthesis</a>');
		          //.append('<li><a href="#">Datasheet</a>')
		          //.append('<li class="l"><a href="#">Online Demo</a>');
        
	$('#navTechnology ul.lvl3')
		          .append('<li class="f"><a href="Te_AssertionBasedVerification.html">Assertion-based Verification</a>')
		          .append('<li class="l"><a href="Te_TechnicalPapers.html">Technical Papers</a>');
  }
}

$(function(){ primaryNav.init(); });


