$(document).ready(function(){
	$('.job').mouseover(function(){
		$(this).toggleClass('hover');
	});
	$('.job').mouseout(function(){
		$(this).toggleClass('hover');
	});
	
	// search form
	$(".f_search_jobs").focus( function() {
		if(this.value == 'Search for a Flexible Career (City, Job Type, Position, Company...)') {
			this.value = '';
		}
		this.style.color = '#000'
		}
	);

	$(".f_search_jobs").blur( function() {
		if(this.value == '') {
			this.value = 'Search for a Flexible Career (City, Job Type, Position, Company...)';
		}
		this.style.color = '#666';
		}
	);
	
	//image rotator
	var images = [];
			
	//images
	images.push('/images/bg_feature_mother.jpg');
	images.push('/images/bg_feature_man.jpg');
	images.push('/images/bg_feature_woman.jpg');
	images.push('/images/bg_feature_painter.jpg');
			
	//random 
	randomNum = Math.floor(Math.random()*images.length);
	$("#site_desc").css({ backgroundImage: "url('" + images[randomNum] + "')" });
	
	// makes external links open in a new browser
	$('.resource a').each(function(){ $(this).attr("target", "_blank"); });
});