$(document).ready(function() { 
    $("table#jobslist") 
    .tablesorter({
    	sortList: [[5,1]],
    	headers: {0: {sorter: false},1: {sorter: false}, 6: {sorter:false}},
    	widthFixed: true, 
    	widgets: ['zebra']
    }) 
    .tablesorterPager({
    	container: $("#pager"),
    	positionFixed: false
    }); 
}); 

$(document).ready(function() { 
    $("table#time_sheets") 
    .tablesorter({
    	sortList: [[0,1]],
    	headers: {1: {sorter: false},2: {sorter: false}, 3: {sorter: false}, 4: {sorter: false}},
    	widthFixed: true, 
    	widgets: ['zebra']
    }) 
    .tablesorterPager({
    	container: $("#pager"),
    	positionFixed: false
    }); 
}); 


// for the jobs section - bringing in the salaries 

$(document).ready(function(){
	$("#jobTypeSearch :input").each(function() {
		var $thisInput = $(this);
		$thisInput.change(function(){
		$('.payDrop').load('http://www.marchrecruitment.co.uk/ajax/getPaySearch.php',{'type':(this).value});
		});
	});
});

// this for the registration form

$(document).ready(function(){
	$(".worktype :input").click(function(){
		$('.showstuff').load('http://www.marchrecruitment.co.uk/ajax/showContracts.php',{'type':(this).value});
	})
});

// faq

$(document).ready(function() {
  $('#faqList').find('dd').hide().end().find('dt').click(function() {
     $(this).next().slideToggle();
 	$('#faqList').find('dd').hide().end();
   });   
});


$(document).ready(function(){
	$(".drivers_licence :input").change(function(){
		if (this.value == 'yes')
		{
			 if ($(".optionalWithPoints").is(":hidden")) {
        	$(".optionalWithPoints").slideDown("slow");
      		} else {
        	$(".optionalWithPoints").hide();
      		}
		}
		else
		{
    		if ($(".optionalWithPoints").is(":visible")) {
        	$(".optionalWithPoints").slideUp("slow");
      		} else {
       		 $(".optionalWithPoints").hide();
     		 }
		}
	})
});


$(document).ready(function(){
	$(".optionalWithPoints :input").change(function(){
		if (this.value == 'yes')
		{
			 if ($(".howManyPoints").is(":hidden")) {
        	$(".howManyPoints").slideDown("slow");
      		} else {
        	$(".howManyPoints").hide();
      		}
		}
		else
		{
    		if ($(".howManyPoints").is(":visible")) {
        	$(".howManyPoints").slideUp("slow");
      		} else {
       		 $(".howManyPoints").hide();
     		 }
		}
	})
});




$(document).ready(function() {
	$('#clientFeedback,#candidateFeedback').cycle({ 
    fx:    'scrollLeft', 
    speed: 2000,
    timeout:  10000,
    pause:1  
	});
});


// tooltips

$(document).ready(function() {
	$('a.title').cluetip({splitTitle: '|'});
});

$(document).ready(function() {
	$('.leftTestimonial p:odd, .rightTestimonial p:odd').addClass("boldout");
});




