$(function() {

	$('a.target_blank').each(function() {
			$(this).click(function(){window.open(this.href);return false;});
		}
	);
	
	
	// make the drop down menus work in ie6
	if ($.browser.msie && $.browser.version < 7) {
		$('#nav ul.top-level li').hover(
			function() {
				$('ul', this).css('left', '0');
				$('ul', this).css('bottom', '33px');
			},
			function() {
				$('ul', this).css('left', '-999em');
			}
		);

		$('#menu-main-1').hover(
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -100px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -100px -40px no-repeat');
			}
		);

		$('#menu-main-2').hover(
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -200px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -200px -40px no-repeat');
			}
		);
		
		$('#menu-main-3').hover( 
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -300px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -300px -40px no-repeat');
			}
		);
		
		$('#menu-main-4').hover( 
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -400px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -400px -40px no-repeat');
			}
		);
		
		$('#menu-main-5').hover( 
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -500px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -500px -40px no-repeat');
			}
		);

		$('#menu-main-6').hover( 
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -600px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -600px -40px no-repeat');
			}
		);
		$('#menu-main-7').hover( 
			function() {
				$('a.base-link', this).css('background', 'url(/common/images/nav.gif) -700px -40px no-repeat');
			},
			function() {
				$('a.base-link', this).css('background', 'none');
				$('a.selected', this).css('background', 'url(/common/images/nav.gif) -700px -40px no-repeat');
			}
		);
	}
});
