$(function() {
	Cufon.replace('#main-content-qro h1', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('.pdt-title h2', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('.title-form h2', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('.sum-product > h1', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('#right-content h3', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	//Cufon.replace('footer h1', {
	//	hover: true,
	//	textShadow: '0 1px 0 black'
	//});
	Cufon.replace('.cufon-js', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('.cufon-js-noshdw', {
		hover: true
	});
	Cufon.replace('a.joinus-btn span', {
		hover: true,
		textShadow: '0 -1px 0 #ffef44'
	});
	Cufon.replace('a.free-account-btn span', {
		hover: true,
		textShadow: '0 -1px 0 white'
	});
	//Cufon.replace('nav ul li.user-id', {
	//	hover: true
	//});
	Cufon.replace('.member-menu-btn span', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('#central-content > ul.sign_in_menu li', {
		hover: true
	});
	Cufon.replace('.included-service li h4', {
		hover: true,
		textShadow: '0 1px 0 white'
	});

	Cufon.replace('ul.private_tabs li', {
		hover : true
	});
	
	Cufon.replace('.caption_job_board td strong', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	
	Cufon.replace('.home_board ul li a', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	
	Cufon.replace('ul.prospection_budget li label span', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('ul.contract_choice li label span', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	Cufon.replace('#region_container p', {
		textShadow: '0 1px 0 white'
	});
	
	Cufon.replace('ul.qbuttonset li label span', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	
	Cufon.replace('.resume-choice li.pmethod p', {
		hover: true,
		textShadow: '0 1px 0 white'
	});
	
	Cufon.replace('dl.header-offer dd div h2');
	
	//Civility choice $('.radio_list_inline li:nth-child(3n)').css('marginRight', '0');
	 $('.radio_list_inline li').css('width', 'auto');
	
	//Width for Menu
	  ItemMenuNb=$('ul.sign_in_menu li').length;
	  if(ItemMenuNb <= 3){
		$('ul.sign_in_menu li').css('width','33.33%');
	  }
	  
	 //Breadcrumb element
	// ItemBreadNb=$('#breadcrumb section ul li').length;
	 // if(ItemBreadNb = 1){
	  //  $('#breadcrumb section ul li').addClass('roundedfirst');
	//  }

	//Place the footer at the bottom when the document size is less high than window high
	/*var documentHeight   = $('#qpro-global').height(),
			windowHeight = $(window).height();

	if(windowHeight > documentHeight)
	{
		$('footer').addClass('bottom-pos');
	}*/

	//Height for carousel
	var maxtestiHeight = 0;
	$('#testimonials .slides_container figure').each(function(){
	  maxtestiHeight = Math.max($(this).height(), maxtestiHeight);
	});
	$('#testimonials .slides_container').height(maxtestiHeight);

	$('nav ul li.user-id').hover(
		function () {
			$(this).find('div').css('visibility', 'visible').slideDown('fast');
		},
		function () {
			$(this).find('div').hide();
		}
	);

	$('nav ul li.product-list').hover(
		function () {
			$(this).find('div').css('visibility', 'visible').slideDown('fast');
			var textspan = $(this).find('span');
			Cufon.replace(textspan, {
			  color: '#f8b323' ,
			  textShadow: '0 1px 0 black'
			});
		},
		function () {
			$(this).find('div').hide();
			var textspan = $(this).find('span');
			Cufon.replace(textspan, {
			  color: '#2a2a2a' ,
			  textShadow: '0 1px 0 white'
			});
		}
	);
	
	$('#central-content').change(function(){
	  resizeHeightRightColumn();
	})
});

$(window).load(function(){
  resizeHeightRightColumn();
})

function resizeHeightRightColumn()
{
  var mainHeight     = $('#central-content').innerHeight(),
      mainSignHeight = $('#sign_in_container').height(),
      columnHeight   = $('#right-content').height();
  if(columnHeight <= mainHeight)
  {
    $('#right-content section').height(mainHeight+'px');
  }
}
