$(document).ready(function(){
$(".SearchBasicInputBox_1").val("Search site...");
$('.SearchBasicInputBox_1').focus(function() {
  $(this).val("");
  $(this).addClass('SearchSel');
  $('#ctl00_Basicsearch1_btnSearch').attr('src','../Images/Structural/Search/Basic/Search_r.gif');
});
$('.SearchBasicInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).val("Search site...");
		$(this).removeClass('SearchSel');
		$('#ctl00_Basicsearch1_btnSearch').attr('src','../Images/Structural/Search/Basic/Search.gif');
	}
});	

 
$(".RegistrationFormEmailAddressInputBox_1").val("Email address");
$('.RegistrationFormEmailAddressInputBox_1').focus(function() {
  $(this).val("");
});
$('.RegistrationFormEmailAddressInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).val("Email address");
	}
});	



$('.LogonUserNameInputBox_1').focus(function() {
  	$(this).val("");
  	$(this).parent().addClass('LogonSel');
});
$('.LogonUserNameInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('LogonSel');
	}
});	
$('.LogonPasswordInputBox_1').focus(function() {
   	$(this).val("");
  	$(this).parent().addClass('LogonSel');
});
$('.LogonPasswordInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('LogonSel');
	}
});	


$('input#Contact1_btnSubmit').mouseover(function () {        
this.src = '/Images/Structural/Contact/Submit_r.gif';  });
$('input#Contact1_btnSubmit').mouseout(function () {        
this.src = '/Images/Structural/Contact/Submit.gif';  });

$('input#ctl02_objRegistration_btnSubmit').mouseover(function () {        
this.src = '/Images/Structural/Registration/Submit_r.gif';  });
$('input#ctl02_objRegistration_btnSubmit').mouseout(function () {        
this.src = '/Images/Structural/Registration/Submit.gif';  });

$('input#ctl03_objRegistration_btnSubmit').mouseover(function () {        
this.src = '/Images/Structural/Registration/Submit_r.gif';  });
$('input#ctl03_objRegistration_btnSubmit').mouseout(function () {        
this.src = '/Images/Structural/Registration/Submit.gif';  });


$('.ContactFormFirstNameInputBox_1').focus(function() {
  $(this).val("");
  $(this).parent().addClass('selected');
});
$('.ContactFormFirstNameInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('selected');
	}
});	

$('.ContactFormCompanyNameInputBox_1').focus(function() {
  $(this).val("");
  $(this).parent().addClass('selected');
});
$('.ContactFormCompanyNameInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('selected');
	}
});	
$('.ContactFormEmailAddressInputBox_1').focus(function() {
  $(this).val("");
  $(this).parent().addClass('selected');
});
$('.ContactFormEmailAddressInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('selected');
	}
});	

$('.ContactFormPhoneNumber1InputBox_1').focus(function() {
  $(this).val("");
  $(this).parent().addClass('selected');
});
$('.ContactFormPhoneNumber1InputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('selected');
	}
});	
$('.ContactFormMessageInputBox_1').focus(function() {
  $(this).val("");
  $(this).parent().addClass('selected2');
});
$('.ContactFormMessageInputBox_1').blur(function() {
	if(!$(this).val()){
		$(this).parent().removeClass('selected2');
	}
});
$('#Contact1_rfvFirstName').html('Your Name is required');
$('#Contact1_rfvPhoneNumber1').html('Phone Number is required');



$("#FooterSocialLinksContainer img[title]").tooltip();




});


//Our People Page
$(document).ready(function(){
	$('#dgrdResults').find('.ModuleContainer').each(function(){
		
		var twitterURL = $(this).find('.OPTwitter').attr('href');
		if(twitterURL.length == 0){
			$(this).find('.OPTwitter').remove()
		}
		var linkedinURL = $(this).find('.OPLinkedin').attr('href');
		if(linkedinURL.length == 0){
			$(this).find('.OPLinkedin').remove()
		}
	});
});

