/*
  Custom ready function
  This should be used to reposition elements or to define and use custom functions
*/
$(document).ready(function(){
 		//reposition header elements
        
        /*
            page element repositioning
        */
        
        /* */
        
        		
		//element repositioning
		$('.box-middle').prepend($('#content-left, .boxes, .photo-block'));
		$('.header').append($('.nationalcoverage, .mainnav'));
		$('.content-right-interior').prepend($('.photo-interior'));
		$('.content-left-interior').prepend($('.photo-form, .form-interior, .testimonials-interior'));

	
		$('.partner_with_us textarea').click(function(){
   			this.select();
   			return false;
			});
		
		$('em.error').remove();
        
        /* */
        
        /**   site-specific functions       **/
        
        $('img.nav').hover(function(){
			var src = $(this).attr('src');
			var	pos = src.lastIndexOf('.jpg');
			var new_src = src.substring(0,pos);
			 		new_src += '-hover.jpg';
					$(this).attr('src',new_src);
		},function(){
			var src = $(this).attr('src');
			var	pos = src.lastIndexOf('-hover.jpg');
			var new_src = src.substring(0,pos);
			 		new_src += '.jpg';
					$(this).attr('src',new_src);
		});
		
		$('#home_form_a').click(function(){
		  $('#theform').submit();
		  return false;
		});
     
});//ready
