/*******************************************************************************************/   
	/*
	 * 1.0 - Pull through full job spec on the SERP page via AJAX.
	 */    
    function serpJobSpecAjax() {
	    $topResult = $("ul.thumb_view li a:first").attr("href");	       
	    $resultLinks = $("ul.thumb_view li a").attr("href");
		   
	    if($topResult) {          
	    	// Grabs the URL
	        $jobUrl = $("ul.thumb_view li a:first").attr("href");
	        // Adds a selected class on the <li>
	        $("ul.thumb_view li a:first").parent().addClass('selectedJob');
	        // Loads in the chosen div from the set URL into #rightColumn 
	        $("#rightcolumn").load($jobUrl +' #JobSearch_Details', function(){
	        	 //google analytics on ajax call
	        	_gaq.push(['_trackPageview', $jobUrl]);	        		        	
	        });  
	    } 
	   	
	   	// Click function to load in the job details into the content area
	    $("ul.thumb_view li a").click(function(e){
	        e.preventDefault(); 
	        	$(".thickBox").css('display','none');
		        $("ul.thumb_view li").removeClass('selectedJob');
		        $(this).parent().addClass('selectedJob');       	        
	            $("body#JobSearch_SearchResults #rightcolumn #JobSearch_Details").empty().html("<img src='/images/pageElements/loading/cf_loading-ani.gif' alt='please wait'/><p> Your search result(s) are loading... </p><p> Please wait </p>");
	
	        $jobUrl = $(this).attr("href");
	        $("#rightcolumn").load($jobUrl +' #JobSearch_Details', function(){
	        	 //google analytics on ajax call
	        	_gaq.push(['_trackPageview', $jobUrl]);        		        	
	        });        	
	    }); // close click function 
    }
	   
/*******************************************************************************************/       
	/*
	 * 1.1 - Check JavaScript availability in the browser
	 */ 
	function checkJavaScriptValidity() {
		// Shows the relevant SERP page dependant on whether JavaScript is enabled or disabled
		$('body#JobSearch_SearchResults div.threeQuartersWidth div#serpDetailedContainer').css({'display':'block'});
		$('body#JobSearch_SearchResults div.threeQuartersWidth div#normalSERP').css({'display':'none'});

		// Shows the relevant Featured Clients section on the homepage dependant on whether JavaScript is enabled or disabled
		$('body#ContentPage_Home div#content div#featClients').css({'display':'block'});
		$('body#ContentPage_Home div#content div#featClientsNormal').css({'display':'none'});
			
		// Alternative contact us map dependant on whether JavaScript is enabled or disabled
//		$('body#ContentPage_contact_us div#mapEnabled').css({'display':'block'});
//		$('body#ContentPage_contact_us div#mapDisabled').css({'display':'none'});
	
	}
	
/*******************************************************************************************/  
	/*
	 * 1.2 - Search Form keyword autocomplete  
	 */
	function keywordAutocomplete() {
		$("#Form_JobSearch_Keywords").autocomplete({	
			source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"]
		});
	}
   	
/*******************************************************************************************/  
	/*
	 * 1.3 - Height given to the SERP right column
	 */
	function serpHeight() {
		var jobView;
		var descView;
		
		$('ul.thumb_view li:last').css({'margin-bottom':'0'});
		jobView = $('ul.thumb_view').height();
		jobView = jobView - 10;
		
		$('div#JobSearch_ResultContainer div#rightcolumn').css({'min-height': '1070px'});
		descView = $('div#JobSearch_ResultContainer div#rightcolumn').height();
		
		$('body#olr_SearchResultsul.thumb_view li:last').css({'margin-bottom':'0'});
		jobView = $('body#olr_SearchResultsul.thumb_view').height();
		jobView = jobView - 10;
		$('body#olr_SearchResults div#rightcolumn').css({'min-height': '650px'});
		descView = $('body#olr_SearchResults div#rightcolumn').height();		
		
	}
	
/*******************************************************************************************/ 	
	/*
	 * 1.5 - Only show the name of the selected language */	

	function selectedLanguage(){
		$('ul#language_nav li a').each(function(){
			if(!($(this).parent().hasClass('sel'))){
				$(this).parent().addClass('unselected');
				$(this).contents().wrapAll('<span id="notSelected"></span>');
				$('span#notSelected').hide();
			}
		});
	}	
	
/*******************************************************************************************/	
	/*
	 * 1.6 - Slider for Marketing 
	 */
	
	function easySliders() {		
		// Marketing Campaigns (Client / Candidate Homepages)
		$("#campaigns").easySlider({
			auto: true, 
			continuous: true,
			numeric: true,
			speed: 1200,
			pause: 15000
		});		

		// Key People (About Us)
		$("#keyPeople").easySlider({
			continuous: true,
			numeric: true			
		});		
	
	}	
	
	function innerFade() {
		
		$('#cannedLinks').innerfade({
			speed: 'fast',
			timeout: 5500,
			type: 'sequence',
			containerheight: '400px'
		});		
		
	}

	
/*******************************************************************************************/		
	/*
	 * 1.7 Adds hover colour to the nested <a> tag on OLR search results within the <li>
	 */
	function olrLinkWrapper() {
		
		$('ul.OLR_thumb_view li').mouseover(function(){ 
			$(this).addClass("selected");
		});			

		$('ul.OLR_thumb_view li').mouseout(function(){ 
			$(this).removeClass("selected");
		});			
			
		
	}
	
	
/*******************************************************************************************/		
	/*
	 * 1.8 Removes labels on select boxes due to first option being selected as default

	function formInputValue() {
		
		// Removes the label on the select boxes (as a default value is loaded anyway)
		$('#Form_CVA select, #Form_SCVS select, #Form_Jbe select, Form#Form_PostAJob select, Form#Form_JobSearch select').each(function(){
			$(this).prev().css('display','none');							
		});
		
	}	
	 */
	
/*******************************************************************************************/		
	/*
	 * 1.9 Removes the "errorContainer" class when CVA form is submitted as error messages not required in design
	 */
	function removeErrorClass() {

		$('form#Form_CVA, form#Form_SCVS, form#Form_Jbe, form#Form_PostAJob, form#Form_mediaEnquires, form#Form_FutureOfIt').find('.ErrorMessage').not('').remove();
		$('form#Form_CVA div.form div.errorContainer, form#Form_SCVS div.form div.errorContainer, form#Form_Jbe div.form div.errorContainer, form#Form_PostAJob div.errorContainer, form#Form_mediaEnquires div.errorContainer, form#Form_JbeUnsubscribe div.form div.errorContainer, form#Form_FutureOfIt div.form div.errorContainer').each(function(){
			$('form#Form_CVA div.form div.errorContainer input, form#Form_SCVS div.form div.errorContainer input, form#Form_SCVS div.form div.errorContainer select, form#Form_Jbe div.form div.errorContainer input, form#Form_PostAJob div.errorContainer input,  form#Form_mediaEnquires div.errorContainer input, form#Form_mediaEnquires div.errorContainer textarea, form#Form_JbeUnsubscribe div.errorContainer input, form#Form_FutureOfIt div.form div.errorContainer input').css('border','1px solid #616A74');
		});
			
	}
		
/*******************************************************************************************/		
	/*
	 * 2.0 Removes the "errorContainer" class when CVA form is submitted as error messages not required in design
	 */
	function smoothScrolling() {

		// Normal Search results
		$("div.threeQuartersWidth ul.thumb_view li a").click(function(){
		
			$('html,body').animate({
				scrollTop: $("#scrollToHere").offset().top
			}, 2000);
		
		});	
		
		// OLR Search results
		$("div#OLR_serpDetailedContainer ul.thumb_view li a").click(function(){
		
			$('html,body').animate({
				scrollTop: $("#scrollToHere").offset().top
			}, 2000);
		
		});		
			
	}
	
/*******************************************************************************************/	
	/*
	 * 2.1 Staff search job shortlist count
	 */
	function checkBoxCount() {
		function updateCount () {
          var count = $("body#olr_SearchResults ul.OLR_thumb_view li input:checked").size();
          $(this).parent().toggleClass('shortlisted');
          
          $("#count").text(count);
          $("#status").toggle(count > -1);
        }		
        $("body#olr_SearchResults ul.OLR_thumb_view li input").each(function () {
          $(this).change(updateCount);  
        });
        updateCount();
	}	
/*******************************************************************************************/	

/*********************************** Thick Box *****************************************/	
	
    // 3.2 (a) Opens up the thick box
	function showThickBox(){
		var thickBoxHeight = $('div.overlay').height();
		var bodyHeight = $('body').height();
		
		thickBoxHeight = bodyHeight;
		thickBoxHeight = thickBoxHeight + 'px';
		
		$('div.overlay').css('height',thickBoxHeight);
		$('div.overlay').css('display','block');
		$('div.overlay').css('visibility','visible');
	}
	
	// 3.2 (b) Set the form wrapper in the center of the page 
	jQuery.fn.center = function () {
		this.css("display","block");
	    this.css("position","absolute");
	    this.css("z-index","1002");
	    this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
	    this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
	    return this;
	};
	
	// 3.2 (c) Focus add remove on empty input	
	function ghostText(){
		$('form#Form_feedback div.form input, form#Form_feedback div.form textarea, form#Form_askQuestions div.form input, form#Form_askQuestions div.form textarea, form#Form_JobSearch div.form input, form#Form_Olr div.form input').each(function(){
				$(this).bind('focusin', function(){
					if ( $.browser.msie ) {
						if($(this).attr('value') === ''){
							$(this).prev().hide();
						}
					}else{
						if($(this).attr('value') === ''){
							$(this).prev().fadeTo('slow','0.5');
						}
						if($(this).attr('type') === 'file'){
							$(this).prev().hide();
						}
					}
				});
				$(this).bind('focusout', function(){
					if ( $.browser.msie ) {
						if($(this).attr('value') === ''){
							$(this).prev().show();
						}
					}
					else{
						if($(this).attr('value') === ''){
							$(this).prev().fadeTo('fast','1');
						}
					}
				});
				if ( !$.browser.msie ) {
					$(this).bind('keypress', function() {
						$(this).prev().hide();
					});
				}
				if($(this).attr('value') !== '' && 
				   $(this).attr('type') !== 'checkbox' && 
				   $(this).attr('type') !== 'radio' && 
				   $(this).attr('id') !== 'Form_Olr_Keywords'){
					$(this).prev().hide();
				}
		});
		
		//Unbind function for all forms OLR/ OLR-LOGIN/ JS/ JS-ADVANCED
		
		$('form#Form_JobSearch-advanced div.form input').each(function(){
			$(this).unbind('focusin');
			$(this).unbind('focusout');
			$(this).unbind('keypress');
		});	
		$('body#olr_SearchResults form#Form_Olr div.form input').each(function(){
			$(this).unbind('focusin');
			$(this).unbind('focusout');
			$(this).unbind('keypress');
		});	
		/*$('form#Form_Olr div.form input').each(function(){
			$(this).unbind('focusin');
			$(this).unbind('focusout');
			$(this).unbind('keypress');
		});*/
	}
	// 3.2 (d) Remove error when the form re-submitted
	function removeError(elements){
		$(elements).each(function(){
			if($(this).attr('value') !== ''){
				$(this).parent().removeClass('error');
			}
		});
	}
	
	// 3.2 (e) Validate form function
	
	/** 3.3 Image Launcher on client branding page **/
	function imageLaunch(){
		/*$('div#careerPathImage a').click(function(){
			showThickBox();
			$('div.overlay').append($('div#careerPath'));
			$('div#careerPath').show();
			$('div#careerPath').center();
			return false;
		});
		$('div#careerPath a').click(function(){
			$('div.overlay').hide();
			return false;
		});*/
	} 
	
	/* 3.2 (f) Ajax call for thickBox */
	function ajaxCall(x,y){
		// Ajax start function
		$('div.thickBox').ajaxStart(function(){
			// remove any pre-load states
			$('div.thickBox form').unbind('submit');
			$(y).remove();
			$('a.closeOverlay').remove();
			$('div.loadingAnimation').remove();
			$('div.thickBox div.textAreaContainer').remove();
			$('div.thickBoxWrapper').center();
			
			// set pre-load states
			$(this).append('<div class="loadingAnimation"></div>');
			$('div.loadingAnimation').append('<img src="/images/pageElements/loading/cf_loading-ani.gif" alt="please wait" />');
			$('div.loadingAnimation').append('<p> Loading ... </p>');
		});
		
		//Ajax load function
		$('div.thickBox').load(x + y).ajaxComplete(function(){
			//google analytics on ajax call
			_gaq.push(['_trackPageview', x]);
			
			//Global variables
			var thickBoxInput = 'div.thickBox form .form div input, div.thickBox form .form div textarea';
			
			//Function call
			ghostText();
			
			// Elements removed
			$('a.closeOverlay').remove();
			$('div.thickBox div.textAreaContainer').remove();
			
			// Remove error call
			$('div.thickBox form div input').each(function(){
				if($(this).attr('type') == 'submit'){
					$(this).bind('click', function(e){
						removeError(thickBoxInput);
					});
				}
			});

			$('div.thickBox form').bind('submit', function(e){
						//google analytics on ajax call
						_gaq.push(['_trackPageview', x+'thankyou']);
						
			    		var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			    		var thickBoxEmailaddress = $('div.thickBox form div.form').children(':eq(1)').children(':last').attr('value');
			    		var thickBoxSpan = 'div.thickBox form div.form div label span';
			    		
						$(thickBoxSpan).each(function(){
							if($(this).hasClass('required_input')){
								if($(this).parent().next().attr('value') === ''){
									$(this).parent().parent().addClass('error');
									e.preventDefault();
								}
								else if($(this).parent().next().attr('name') == 'element_email'){
									if(!emailReg.test(thickBoxEmailaddress)){
										$(this).parent().parent().addClass('error');
										e.preventDefault();
									}
								}
								else{
									return true;
								}
							}
						});
			});
			
		    // Create close button on ajax load
			if(y == ' form#Form_feedback'){
				$(this).prepend(($('div.dummyWrapper1').html()));
			}
			if(y == ' form#Form_askQuestions'){
				$(this).prepend(($('div.dummyWrapper2').html()));
			}
		    $(this).prepend(' <a class="closeOverlay" href="#"></a> ');
		    
		    // Functionality of close button
			$("a.closeOverlay").click(function(){
		        		$(".thickBoxWrapper").css('display','none');
		        		$('.overlay').css('display','none');
		        		return false;
		      });
		    // Close the overlay
		});
	}

	/** 3.4 Menu Higlghlight on Hover **/
	function menuHighlight(){
		$('ul#mainMenu li div.headContentContainer').each(function(){
			$(this).mouseover(function(){
				$(this).prev().addClass('highlightHead');
			});
			$(this).mouseout(function(){
				$(this).prev().removeClass('highlightHead');
			});
		});
	}
/*******************************************************************************************/	

	/*
	 * 2.2 Staff search register form toggle
	 */
	function staffRegisterToggle() {
		$('body#olr_LoginRegister div#leftColumn').append($('div#OlrRegister-slide'));
	
		$('body#olr_LoginRegister #leftColumn div.toggleTrigger a').click(function(){
			var formSection = $('div.registerToggleContainer');
			if(formSection.css('display') == 'block'){
				formSection.slideUp('slow');
				$(this).removeClass('open');
			}else{
				$(this).addClass('open');
				formSection.slideDown('slow');
			}
			return false;
		});
	}
	function olrWrapper(){
		$('div#olrSearch-register, div#OlrRegister-slide').wrapAll('<div class="olrSlideWrapper"></div>');
	}
	function olrFormValidation(){
		var olrInput = 'div#Form_OlrReg_Container form .form div input, div#Form_OlrReg_Container form .form div textarea';
		$('div#Form_OlrReg_Submit_Container input').click(function(e) {	
			// Remove error call
			removeError(olrInput);
		});
		
		$('div#Form_OlrReg_Container form').bind('submit', function(e){
			var olrEmailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			var olrTelReg = /^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$/;

			var olrEmailaddress = $('div#Form_OlrReg_Container form div.form').children(':eq(1)').children(':last').attr('value');
			var olrTelephoneNumber = $('div#Form_OlrReg_Container form div.form').children(':eq(3)').children(':last').attr('value');
			var olrTelNumberLength = olrTelephoneNumber.split('').length;

			
				var olrBoxSpan = 'div#Form_OlrReg_Container form div.form div label span';
			    		
			$(olrBoxSpan).each(function(){
				if($(this).hasClass('required_input')){
					if($(this).parent().next().attr('value') === ''){
						$(this).parent().parent().addClass('error');
						e.preventDefault();
					}
					else if($(this).parent().next().attr('name') == 'element_email'){
						if(!olrEmailReg.test(olrEmailaddress)){
							$(this).parent().parent().addClass('error');
							e.preventDefault();
						}
					}
					else if($(this).parent().next().attr('name') == 'element_telephone'){
						if(10 <= olrTelNumberLength && olrTelNumberLength <= 20 && olrTelReg.test(olrTelephoneNumber)){
							// valid number
						}else{
							$(this).parent().parent().addClass('error');
							e.preventDefault();
						}
					}
					else{
						return true;
					}
				}
			});
		});
	}
		
/*******************************************************************************************/	
	/*
	 * 2.3 Adds class to language menu onHover
	 */ 		
	function langMenuHover() {
		
		$("#language_nav_Container ul#language_nav li a").mouseover(function(){ 
			$(this).stop().parent().addClass("hover");
		});	
		$("#language_nav_Container ul#language_nav li a").mouseout(function(){ 
			$(this).stop().parent().removeClass("hover");
		});	
		
	}
	
/*******************************************************************************************/	
	/*
	 * 2.4 form thick box call main function
	 */ 	
    function formThickBox() {  
	    $("a.feedback, a.askQuestions, div#careerPathImage a").click(function(){
	    	$(".thickBox").css('display','block');
	    	// Global variables for links 
	    	$(this).removeClass('clickThrough');
	    	linkValue = $(this).attr('href');
	    	linkName = $(this).attr('class');
	    	
	    	//Center and thickbox function call
	    	
	    	showThickBox();
		    
		    // Use Ajax call for any form
		    switch(linkName){
		    	case 'feedback':
		    		ajaxCall(linkValue, ' form#Form_feedback');
		    		break;
		    	case 'askQuestions':
		    		ajaxCall(linkValue, ' form#Form_askQuestions');
		    		break;
		    	case 'careerImage':
		    		ajaxCall(linkValue, ' div#careerPath');
		    		break;
		    }
	        return false;	        	        	
	    }); // close click function
    }   
    
/*******************************************************************************************/	
	/*
	 * 2.5 Privacy Policy Accordin
	 */ 	
    function privacyPolicyAccordin() {

    	$( "#accordion" ).accordion({ 
    		autoHeight: false 
    	});
    	
    }
    
/*******************************************************************************************/
	/*
	 * 2.6 Add "clickThrough" class to breadcrumb and language menu
	 */ 	

    function clickThrough() {
    	
    	$('a').addClass('clickThrough');
    	
    }
    
/*******************************************************************************************/
	/*
	 * 2.7 Various slideshows on About Us homepage
	 */ 
    function informationSlideShows() {
		$('#slideshowServices, #slideshowAwards, #dates').cycle({
			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});				
    
	}
		    
/*******************************************************************************************/			
	/*
	 * 2.8 Adds 'hover' class to each SERP result onHover 
	 */ 		
	function serpOnHover() {
		
		$("div#JobSearch_ResultContainer ul.thumb_view li a").mouseover(function(){ 
			$(this).stop().parent().addClass("hoverSelectedJob");
		});	
		$("div#JobSearch_ResultContainer ul.thumb_view li a").mouseout(function(){ 
			$(this).stop().parent().removeClass("hoverSelectedJob");
		});	
			
	}    
    
/*******************************************************************************************/	    
	/*
	 * 2.9 - Load contact form into individual office pages via AJAX.
	 */    
    function loadContactFormAjax() {
    	// Global variables
	    $getForm = $(".contactForm .innerContent a.loadForm").attr("href");
	    
	    if($getForm) { 
	    	$("#contactForm").ajaxStart(function(){
	    		$(".thickBox").css('display','block');
				$(this).append('<div class="loadingAnimation"></div>');
				$('div.loadingAnimation').append('<img src="/images/pageElements/loading/cf_loading-ani.gif" alt="please wait" />');
			});
	        // Loads in the chosen div from the set URL into #contactForm 
	        $("#contactForm").load($getForm +' form#Form_contact').ajaxComplete(function(){
	        	// Ajax global variables
	        	var contactInput = 'div#contactForm form .form div input, div#contactForm form .form div textarea';
	        		// ghostText(contactInput);
	        		
			    	$('input#Form_contact_Submit').click(function(e) {	
			    		// Remove error call
			    		removeError(contactInput);
			    	});	 
			    	$('div#contactForm form').submit(function(e) {
			    		//google analytics on ajax call
			    		_gaq.push(['_trackPageview', $getForm]);
			    		
			    		var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			    		var contactEmailaddress = $('form#Form_contact .form').children(':eq(1)').children(':last').attr('value');
			    		var contactSpan = 'form#Form_contact div.form div label span';
			    		
						$(contactSpan).each(function(){
							if($(this).hasClass('required_input')){
								if($(this).parent().next().attr('value') === ''){
									$(this).parent().parent().addClass('error');
									e.preventDefault();
								}
								else if($(this).parent().next().attr('name') == 'element_email'){
									if(!emailReg.test(contactEmailaddress)){
										$(this).parent().parent().addClass('error');
										e.preventDefault();
									}
								}
								else{
									return true;
								}
							}
						});
			    	});
	        });
	    }	
    }   
    
    // 3.0 - Hiding the CV label on CVA/SCVS forms when details remembered
	function hideLabel(){
		var CVLabel = $('form#Form_CVA .form div#Form_CVA_Cv_Container label, form#Form_SCVS .form div#Form_SCVS_Cv_Container label');
		if(!(CVLabel.next().is('input'))){
			CVLabel.hide();
		}
	}
    
	 // 3.1 - Key highlights slider
	function keyHighlightsSlider(){
		var iterator = 1;
		setInterval(function(){
			$('div#dates div.highlights').each(function(){
					console.log($(this).attr('id'));
			});
		},10000);
	}
    
	
	// 3.5 Apply rounded corners to OLR login form
	
	function OLRform_roundedCorners() {
		
		$('div.loginFormWrapper form#Form_OlrLogin div.form').addClass('fullyRounded');
		
	}
	
	// 3.6 PRINT FUNCTIONALITY ON JOB DETAILS 
	function printIcon(){
		$('div#content ul.jobOptions li a.print').css('display','block');
		$('div#content ul.jobOptions li a.print').click( function()
		{
			window.print();
			return false;
		});
	}
$(document).ready(function() {
	$('div#careerPath').hide();
	
	// Analytics set-up for timeSheets Link
	$('a.timeSheetLink').click(function(){
		pageTracker._trackPageview('/outgoing/'+ $(this).attr('href'));
	});
	
	// Analytics set-up for Future of IT
	$('form#Form_FutureOfIt').submit(function(){
		pageTracker._trackPageview('form/FutureOfIt/thankyou');
	});

	/*** Function Calls ***/	

	    /** 1.0 - Pull through full job spec on the SERP page via AJAX. **/
			serpJobSpecAjax();
	    /** 1.1 - Check JavaScript availability in the browser **/
	    	checkJavaScriptValidity();
	    /** 1.2 - Search Form Keyword autocomplete **/
	    	keywordAutocomplete();
	    /** 1.3 - Height given to the SERP right column **/
	    	serpHeight();	 
	    /** 1.5 - Only show the name of the selected language **/
	        selectedLanguage();	    	
	    /** 1.6 - Slider for Marketing areas **/
	        easySliders();	  
	        innerFade();
	    /** 1.7 - Adds hover colour to the nested <a> tag on OLR search results within the <li> **/
	        olrLinkWrapper();
	    /** 1.8 - Removes labels on select boxes due to first option being selected as default **/	
	    	// formInputValue();
	    /** 1.9 - Removes the "errorContainer" class when CVA form is submitted as error messages not required in design **/	
	    	removeErrorClass();
	    /** 2.0 - Smooth scrolling added to SERP links to scroll to top of page to see Job Details **/
	    	smoothScrolling();
	    /** 2.1 - Staff search job shortlist count **/
	    	checkBoxCount();
	    /** 2.2 - Staff search register form toggle **/
	    	staffRegisterToggle();
	    		//child function
	    		olrWrapper();
	    		olrFormValidation();
	    /** 2.3 - Adds class to language menu onHover **/
	    	langMenuHover();
	    /** 2.4 - form thick box call main function **/
	    	// Prerequisite functions
	    	// 2.4 (a) Opens up the thick box
			// 2.4 (b) Set the form wrapper in the center of the page 
			// 2.4 (c) Focus add remove on empty input
			// 2.4 (d) Remove error when the form re-submitted
	    	// 2.4 (e) Validate form function
			// 2.4 (f) Ajax call for thickBox
	    	formThickBox();
	    /** 2.5 - Privacy Policy Accordin **/	
	    	privacyPolicyAccordin();
	    /** 2.6 - Add "clickThrough" class to breadcrumb and language menu **/
	    	clickThrough();
	    /** 2.7 - Various sliedshows on About Us homepage **/	
	    	informationSlideShows();
	    /** 2.8 - Adds 'hover' class to each SERP result onHover **/
	    	serpOnHover();
	    /** 2.9  -Load contact form into individual office pages via AJAX **/	
	    	loadContactFormAjax();
	    /** 3.0 - Inline form validation for thickbox forms **/
	    	ghostText();
	    /** 3.1 - Hiding the CV label on CVA/SCVS forms when details remembered **/
	    	hideLabel();
	    /** 3.2 - Key highlights slider **/
	    	keyHighlightsSlider();
	    /** 3.3 Image Launcher on client branding page **/
	    	imageLaunch();
	    /** 3.4 Menu Higlghlight on Hover **/
	    	menuHighlight();
	    /** 3.5 Apply rounded corners to OLR login form **/	
	    	OLRform_roundedCorners();
	    /** 3.6 Print functionality on job details **/
	    	printIcon();
	    	//$('#KeywordTagCloud').tagcloud();
}); // end of $(document).ready
