$(document).ready(function() {

    /**** job search even binding******/	
     $(".jobSearchOffMiddle a").bind("click", 
	function(ev) { 
		ev.preventDefault();
		    OpenJobSearch();
	}    
     );
     
     $("a.hideSearchLink").bind("click", 
     	function(ev) { 
     		ev.preventDefault();
     		    CloseJobSearch();
     	}    
     );
     
     $(".footerOptionRight a").bind("click", 
	function(ev) { 
		ev.preventDefault();
		    OpenSearchPopup();
	}    
     );
     
     $("a.hideSearchPopup").bind("click", 
     	function(ev) { 
     		ev.preventDefault();
     		    CloseSearchPopup();
     	}    
     );
     
     $(".searchOpenState").css("display", "none");
     $(".jobSearchPopUpCandidate").css("display", "none");
     $(".jobSearchOffMiddle a img").attr("src", "images/chevron_jobsearch_off.gif");
     
     // added for alignment of digital experience image to the base of the page 

     var wholePageHght = $('.mainPageInnerWrapper').height();
     //alert(wholePageHght);
     var imgHght = $('.nucleusCreditContainerdiv').height();
     //alert(imgHght); 
     var emptyDivHght = parseInt(wholePageHght) - parseInt(imgHght); 
     //alert(emptyDivHght);    
     $('.nucleusCreditContainerEmptydiv').css('height',emptyDivHght);
    
     //loadPSDCarousel();
     
     //$("ul#jobTickerList").liScroll({travelocity: 0.05}); 
  
 });


function CloseJobSearch()
{
   $(".jobSearchPopUpCandidate").slideUp("slow");
   $(".jobSearchOffMiddle a img").attr("src", "images/chevron_jobsearch_off.gif");
   
}

function OpenJobSearch()
{
   $(".jobSearchPopUpCandidate").slideDown("slow");
   $(".jobSearchOffMiddle a img").attr("src", "images/chevron_jobsearch_open.gif");
}
function CloseSearchPopup()
{
   $(".searchOpenState").slideUp("slow");   
}

function OpenSearchPopup()
{
   $(".searchOpenState").slideDown("slow");   
}


function strTrim(strToTrim)
{
    strToTrim = strToTrim.replace(/^\s*/, "").replace(/\s*$/, "");  
    return strToTrim;
}