	JQ= jQuery.noConflict();
    JQ(document).ready(function() {
      JQ('li.submenu').children('ul').hide();
      JQ('#navbar .main-nav li.submenu').mouseover(function() {
        JQ(this).find('.inner-boundary').show();
      }).mouseout(function() {
        JQ(this).find('.inner-boundary').hide();
      });
      
      
	  JQ("#thnavbar .thmenu").hover(function() {
		JQ(this).children("ul.subnav").show();
		JQ(this).hover(function() {
				JQ(this).find("a:first").addClass("thhover");
			}, function(){	
				JQ(this).parent().find("ul.subnav").hide();
				JQ(this).find("a:first").removeClass("thhover");
			});
		}).hover(function() {
			JQ(this).find("a:first").addClass("thhover");
		}, function(){
			JQ(this).find("a:first").removeClass("thhover");
	});
	  
        JQ('#search-bar form div.form-container input').focus(function() {
          if (this.value === this.defaultValue){  
            this.value = '';  
          } else {  
            this.select();  
          }
         
          JQ('#search-bar div.fancy-panel').show();
          JQ('#search-bar div.arrow').removeClass('arrow-up')
          JQ('#search-bar div.arrow').addClass('arrow-down')
        
        });
      
        JQ('#search-bar form div.form-container input').click(function() {
          JQ('#search-bar div.fancy-panel').show();
          JQ('#search-bar div.arrow').removeClass('arrow-up')
          JQ('#search-bar div.arrow').addClass('arrow-down')
        
        });
		
        JQ('#search-bar form div.form-container').mouseleave(function() {            
            JQ('#search-bar div.fancy-panel').hide();
            JQ('#search-bar div.arrow').removeClass('arrow-down')
          JQ('#search-bar div.arrow').addClass('arrow-up')
        });
        JQ('#search-bar form div.form-container input').blur(function() {
          if (JQ.trim(this.value) === ''){  
            this.value = (this.defaultValue ? this.defaultValue : '');  
          }
        });
	  
	 });

// JavaScript Document
function onResultsRowClick(target){
	document.location = target;
}
function showHideLoginArea(){
	if(document.getElementById('userTypeReturning').checked){
		document.getElementById('userTypeReturningDiv').style.display = '';
		document.getElementById('userTypeNewDiv').style.display = 'none';
	}else{
		document.getElementById('userTypeReturningDiv').style.display = 'none';
		document.getElementById('userTypeNewDiv').style.display = '';
	}
}

function jobTypeCheck(jobSelectLimit){
	
	if(!jobSelectLimit) {
		jobSelectLimit = 5;
	}
	
	var checkedCount = 0;
	var left = 0;
	var rowClass;
	var totalOptions = document.getElementById('jobTypeTotalOptions').value;

	for(i=0;i<=totalOptions;i++){
		if(document.getElementById('jobType_'+i)){
			if(document.getElementById('jobType_'+i).checked == true){
				checkedCount++;
				rowClass = "selected";
			}else{
				rowClass = "normal";
			}
		}
		if(document.getElementById('jobRow_'+i)){
			document.getElementById('jobRow_'+i).className = rowClass;
		}
	}

	left = jobSelectLimit - checkedCount;
	
	document.getElementById('jobTypeCountLeft').innerHTML = left;

	if (left <= 0) {
		for (i=0;i<=totalOptions;i++) {
			if(document.getElementById('jobType_'+i)){
				if (document.getElementById('jobType_'+i).checked == false) {
					document.getElementById('jobType_'+i).disabled=true;
				}
			}
		}
	} else {
		for (i=0;i<=totalOptions;i++) {
			if(document.getElementById('jobType_'+i)){
					document.getElementById('jobType_'+i).disabled=false;
			}
		}
	}
}

function showhideJobCat(id){
	showhide(id);
	if(document.getElementById(id).style.display=='none') {
		document.getElementById(id+'_heading').className = "jobCatTitle_closed";
	}else{
		document.getElementById(id+'_heading').className = "jobCatTitle_open";
	}
}

JQ(document).ready(function() {
	JQ('.odd').hover(
		function() {
			JQ(this).find('td:first').find('a').addClass('bold');
			JQ(this).find(".search-snippet").fadeTo('fast', 1.0);
		},
		function() {
			JQ(this).find(".search-snippet").stop().css("display", "none");
			JQ(this).find('td:first').find('a').removeClass('bold');
		}
	);
});


