// JScript File

$(document).ready(function() {

	$("ul.dropdown>li").hover(
  		function() {
    			$(this).find("a").addClass("mainitemhover");
  		}, 
  		function() {
    			$(this).find("a").removeClass("mainitemhover");
  		}
	);

	$("ul.dropdown li.drop").hover(function() { 
		$(this).find("ul.subdropdown").show(); 

		$(this).hover(function() {
		}, function() {
			$(this).find("ul.subdropdown").hide(); 
		});
		
		}).hover(function() {
			$(this).addClass("mainitemhover"); 
		}, function() {	//On Hover Out
			$(this).removeClass("mainitemhover"); 
	});

	$("ul.dropdown ul.subdropdown>li").hover(
  		function() {
    			$(this).find("a").addClass("dropitemhover");
  		}, 
  		function () {
    			$(this).find("a").removeClass("dropitemhover");
  		}
	);

	$("ul.dropdown ul.subdropdown li.drop").hover(function() { 
		$(this).find("ul.subdropdown2").show();

		$(this).hover(function() {
		}, function() {
			$(this).find("ul.subdropdown2").hide(); 
		});

		
		}).hover(function() {
			$(this).addClass("dropitemhover");
		}, function() {	//On Hover Out
			$(this).removeClass("dropitemhover");
	});

});
      
$(document).ready(function(){

	$("ul.vdropdown li.drop").hover(function() {

		$(this).find("ul.subvdropdown").show(); 

		$(this).hover(function() {
		}, function() {
			$(this).find("ul.subvdropdown").hide();
		});

		}).hover(function() {
			$(this).addClass("vmainitemhoverOld");
		}, function() {	//On Hover Out
			$(this).removeClass("vmainitemhoverOld");
	});

});


      $(document).ready(function() {

          //$('.dropdown>li.drop>a').addClass('mainlistitemsetbold');
	  $('.dropdown>li.drop>ul.subdropdown>li.drop>a').addClass('dropdownitemsetbold');
          $('.vdropdown>li.drop>a').addClass('vmainlistitemarrow');
	  $('.vdropdown>li>a.expanded').addClass('vmainlistitemdownarrow');
          $('.vdropdown li a.onRoute').addClass('onRouteSet');
          if ($.browser.opera) {
              
          }else{
             $('#abthmenuContainer').corner('tl tr bl br');
             //$('#abtfooter').corner('tl tr bl br');
          }
      });
      
		$(document).ready(function() {
		    	var windowWidth = 0;
		    	if (typeof(window.innerWidth) == 'number') {
				windowWidth = window.innerWidth;
    	            	}
			else {
				if (document.documentElement && document.documentElement.clientWidth) {
					windowWidth = document.documentElement.clientWidth;
				}
				else {
					if (document.body && document.body.clientWidth) {
						windowWidth = document.body.clientWidth;
					}
				}
			}
			if (windowWidth > 0) {
	                    var contentWidth = document.getElementById('abtcontainer').offsetWidth;
			    var marginDiff = windowWidth - contentWidth;	
			    var marginWidth = marginDiff / 2;					
			    var contentElement = document.getElementById('abtcontainer');
			    var contentHeight = document.getElementById('abtcontainer').offsetHeight;
			    var abtcontentHeight = document.getElementById('abtcontent').offsetHeight;					
			    var footerHeight = document.getElementById('abtfooter').offsetHeight;
			    var footerPos = contentHeight - footerHeight;	
			    var calccontentHeight = abtcontentHeight + footerHeight;
			}
			document.getElementById('abtcontainer').style.marginLeft =  marginWidth.toString() + "px";
			document.getElementById('abtcontainer').style.marginRight =  marginWidth.toString() + "px";
			$('#abtcontainer').show();
		});


$(window).resize(function() {

		    	var windowWidth = 0;
		    	if (typeof(window.innerWidth) == 'number') {
				windowWidth = window.innerWidth;
    	            	}
			else {
				if (document.documentElement && document.documentElement.clientWidth) {
					windowWidth = document.documentElement.clientWidth;
				}
				else {
					if (document.body && document.body.clientWidth) {
						windowWidth = document.body.clientWidth;
					}
				}
			}
			if (windowWidth > 0) {
	                    var contentWidth = document.getElementById('abtcontainer').offsetWidth;
			    var marginDiff = windowWidth - contentWidth;	
			    var marginWidth = marginDiff / 2;					
			    var contentElement = document.getElementById('abtcontainer');
			    var contentHeight = document.getElementById('abtcontainer').offsetHeight;
			    var abtcontentHeight = document.getElementById('abtcontent').offsetHeight;					
			    var footerHeight = document.getElementById('abtfooter').offsetHeight;
			    var footerPos = contentHeight - footerHeight;	
			    var calccontentHeight = abtcontentHeight + footerHeight;
			}
			document.getElementById('abtcontainer').style.marginLeft =  marginWidth.toString() + "px";
			document.getElementById('abtcontainer').style.marginRight =  marginWidth.toString() + "px";
			$('#abtcontainer').show();
});

