$(document).ready(function(){
	/* Map Function */
	$('#reps').children('div').not('.active').hide();
	$('map[name="canada"] area', this).click(function(){
		var $this = $(this).attr('title');
		$('#map .active').remove();
		$('#reps .active').hide().removeClass('active');
		
		$('#map').prepend('<span id="'+$this+'" class="active"></span>');
		$('#reps-'+$this+'').show().addClass('active');
		
		return false;
	});
	
	/* Home Banner CTA Function */
	$('#banner-home .box').hover(function(){
		if(jQuery.support.opacity){
			$('span', this).fadeOut('fast');
			$(this).stop(true).animate({paddingTop : 100}, function(){
				$('img', this).fadeIn('fast');
			});
		}
		else {
			$('span', this).hide();
			$(this).stop(true).animate({paddingTop : 100}, function(){
				$('img', this).show();
			});	
		}
	},
	function(){
		if(jQuery.support.opacity){
			$('span', this).fadeIn('fast');
			$('img', this).fadeOut('fast', function(){
				$(this).parent().stop(true).animate({paddingTop : 14});
			});
		}
		else {
			$('span', this).show();
			$('img', this).hide().parent().stop(true).animate({paddingTop : 14});
		}
	});
	
});
