/* Custom functions */
$(document).ready(function() {

	// replace non web fonts
	Cufon.replace("div#navigation ul li a", {hover:true});
	Cufon.replace("h3,h4,h5,h6");
	Cufon.replace(".casesSummary");
	
	// return to home on the logo
	$("#logo").click(function() {
		document.location='/';
	});
	
	// style the selects
    
	// toggling career entries
	$(".careerEntry .title a").click(function() {
	
		var isON = $(this).parent().parent().hasClass("careerOn")
		
		$(".careerEntry").each(function() {
			$(this).removeClass("careerOn");
			$(this).addClass("careerOff");
		});
		
		if(!isON) {
			$(this).parent().parent().removeClass("careerOff");
			$(this).parent().parent().addClass("careerOn");
		}
	
	});
	
	// toggling faq entries
	$(".faqEntry .title a").click(function() {
	
		var isON = $(this).parent().parent().hasClass("faqOn")

		$(".faqEntry").each(function() {
			$(this).removeClass("faqOn");
			$(this).addClass("faqOff");
		});
		
		if(!isON) {
			$(this).parent().parent().removeClass("faqOff");
			$(this).parent().parent().addClass("faqOn");
		}
	
	});
	
	$(".iconTwitter").hover(function() {
		$(this).attr("src", "/wp-content/themes/expereo/images/iconTwitterSmallHover.png");
	}, function() {
		$(this).attr("src", "/wp-content/themes/expereo/images/iconTwitterSmall.jpg");
	});
	
});
