/*
  Custom ready function
  This should be used to reposition elements or to define and use custom functions
*/
$(document).ready(function(){
 		//reposition header elements
        
        /*
            Adulteducation.net page element repositioning
        */
        
        /* */
		$('#box-shadow').prepend($('#box-top'));
		$('#header').append($('.search-form'));
		$('#box-middle').prepend($('#adds'));
		
		if($('.content-form').length > 0){
			$('.content-left').append($('.testimonial'));
		}
	
		$('.partner_with_us textarea').click(function(){
   			this.select();
   			return false;
			});

		$('em.error').remove();
        
        /* */
        
        /**   Adulteducation.net 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
