jQuery(function(){
	$('input[type="text"],input[type="password"]').addClass('text');
	//form focus styling
	 $('.text').focus(function() {  
		 $(this).addClass("focusField");  
		 if (this.value == this.defaultValue){  
			 this.value = '';  
		 }  
		 if(this.value != this.defaultValue){  
			 this.select();  
		 }  
	 });  
	 $('.text').blur(function() {  
		 $(this).removeClass("focusField");  
	 });
	
	//navigation animation
	$('#nav a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate(
				{backgroundPosition:"(0 -60px)"}, 
				{duration:500})
			})
		.mouseout(function(){
			$(this).stop().animate(
				{backgroundPosition:"(0 0)"}, 
				{duration:500})
			})
	
	//equal heights columns
	function equalHeight(group) {
		tallest = 0;
		group.each(function() {
			thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	}
		equalHeight($(".col"));
		
	//pop up windows
    $('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
			
});