
	(function($) {
		
		$(function() {
		
			// preload rollovers adn add rollover effects for images with classname ro
			$('img.ro').each(function() {
				parts = this.src.match(/(.*)\.([^.]+)\b/);
				if (parts.length == 3)
					(new Image()).src = parts[1] + '_ro.' + parts[2]; 
			}).hover(function() {
				parts = this.src.match(/(.*)\.([^.]+)\b/);
				if (parts.length == 3)
					this.src = parts[1] + '_ro.' + parts[2];
			}, function() {
				this.src = this.src.split('_ro').join('');
			});
	
			$('ul#navs > li').hover(function() {
				$(this).addClass('hover');
			}, function() {
				$(this).removeClass('hover');
			});
			
			// make all external links open in new page
			$('a[href^=http]').attr('target', '_blank');
			
			// browser hacks
			$('p:has(label)')
				.css({
					position: 'relative',
					left: '163px',
					paddingRight: '163px'
				});

			$('#registerForm, #jobsForm, #usernameForm, #contactForm').validate();
								
		});
		
		if ($.browser.msie)
			$(window).load(function() {
				if ($('.menuContent').height() < 601)
					$('.menuContent').height('601px');
			});
		
	})(jQuery);


