// JavaScript Document
//----------
// Email this link


function mailThisUrl(){
var	u = window.location;
	
mail_str = "mailto:?subject="+document.title+"&body=For details please visit: "+location.href;
location.href = mail_str;
} 

//--------

$(document).ready(function(){
// Function for the peoplelink cycle to work smoothly. 


    $(".cycle-title").click(function(){
		$("li.cycle-desc").fadeOut("slow", function() {
			   //
			});
		$(this).find("li.cycle-desc").fadeIn("slow", function() {
			   //
			});
			return false;
			 
	});
			
	$(".btnclose").click(function(){
			
			$("li.cycle-desc").fadeOut("slow", function() {
			   //
			});
			return false;
    	});
		
		
//---------
// These below will assign section images on sidebar when the page is ready.

  		$('body.page-id-79 p.sectionimg').css("background-image", "url(/images/pic-aboutus.png)"); // sidebar img for about us page
  		$('body.page-id-5 p.sectionimg').css("background-image", "url(/images/pic-services.png)"); // sidebar img for services page
  		$('body.page-id-7 p.sectionimg').css("background-image", "url(/images/pic-e-hr.png)"); // sidebar img for e-hr page
  		$('body.page-id-9 p.sectionimg').css("background-image", "url(/images/pic-case-studies.png)"); // sidebar img for case studies page
  		$('body.page-id-13 p.sectionimg').css("background-image", "url(/images/pic-contactus.png)"); // sidebar img for contact us page
		
  		$('body.archive p.sectionimg').css("background-image", "url(/images/pic-insights.png)"); // sidebar img for archive/category page

		$('body.single p.sectionimg').css("background-image", "url(/images/pic-insights.png)"); // sidebar img for archive/category page
		
  		$('body.blog p.sectionimg').css("background-image", "url(/images/pic-insights.png)"); // sidebar img for insights page
		
  		$('body.postid-80 p.sectionimg').css("background-image", "url(/images/pic-corporate-bigwigs.png)"); // sidebar img for insights article
  		$('body.postid-115 p.sectionimg').css("background-image", "url(/images/pic-cost-turnover.png)"); // sidebar img for insights article
  		$('body.postid-64 p.sectionimg').css("background-image", "url(/images/pic-succession-planning.png)"); // sidebar img for insights article
  		$('body.postid-124 p.sectionimg').css("background-image", "url(/images/pic-fun-at-work.png)"); // sidebar img for insights article
  		$('body.postid-35 p.sectionimg').css("background-image", "url(/images/pic-bonuses.png)"); // sidebar img for insights article
  		$('body.postid-61 p.sectionimg').css("background-image", "url(/images/pic-sales-compensation.png)"); // sidebar img for insights article
  		$('body.postid-257 p.sectionimg').css("background-image", "url(/images/pic-recruitment.png)"); // sidebar img for insights article

//-------
// Tooltip function for footer privacy & terms bubble.

$(".tooltip a").click(function() {
	$(".txt-tooltip").stop(true, true).animate({opacity: "show", top: "-230"}, "slow");
	return false;
	});
	
	
	$(".btnclose a").click(function() {
	$(".txt-tooltip").animate({opacity: "hide", top: "-210"}, "fast");
	
	return false;
	});
	


//---------

	

});

