Cufon.set('fontStretch', '100%');
Cufon.replace('h4.wtitle, h4.white_title', {
	fontFamily: 'Futura Bk BT'
});

Cufon.set('fontStretch', '100%');
Cufon.replace('.navigation a, .sub-nav a, h4.stitle', {
	fontFamily: 'Gotham Rounded Book'
});

Cufon.set('fontStretch', '100%');
Cufon.replace('h1.content_title,  .middle-column h1, .middle-column h2, .middle-column h3, .middle-column h4, .middle-column h5, .middle-column h6', {
	fontFamily: 'Gotham Rounded Light'
});

Cufon.set('fontStretch', '100%');
Cufon.replace('..navigation li.current_page_item a, .navigation li.current_page_parent a, .navigation li.current_page_ancestor a, .indent h4', {
	fontFamily: 'Gotham Rounded bold'
});

$(document).ready(function() {
	$(".navigation li:last").css("margin", "0px");
	$(".entry_content table").css("border-bottom", "solid 1px #ccc");
	
	$("#sb").click(function(e) {
		if(  $("#email").val().indexOf('@') == -1 || $("#email").val().indexOf('.') == -1 || $("#email").val().length < 9 ) {
			alert("Please enter your valid email address");
			
			
		} else {
			//document.regs.action = $("#regs").attr("action");
			document.regs.submit();
		}
		e.preventDefault();
	});
	
	$(".playbtn, .playv").click(function(e) {
		var vv = $(this).attr("title");
		$(".lightvideo iframe").attr("src", vv);
		$(".lightvideo").css("display", "block");
		$(".videoverlay").css("display", "block");
		e.preventDefault();						 
	});
	$(".closev").click(function(e) {
		$(".lightvideo").css("display", "none");
		$(".videoverlay").css("display", "none");
		e.preventDefault();						 
	});
	
	//Gallery
	var c = $(".ngg-galleryoverview div a:first").attr("href");
    //alert(c);
	$(".ngg-galleryoverview").prepend("<img  src="+c+">");
	var im = $(".ngg-galleryoverview img:first");

	$(".ngg-gallery-thumbnail a").click(function(e) {
		$(".ngg-galleryoverview img:first").attr("src", $(this).attr("href"));

		e.preventDefault();
	});

	
	//Video
	
	var vc = $(".videos div.each_video:first").html();
	
	$(".videos").prepend("<div class='vid'>"+vc+"</div>");
	
	$(".videos li").click(function(e) {
		$(".videos div.vid").remove();
		$(".videos").prepend("<div class='vid'>"+$(this).children("div.each_video").html()+"</div>");
		e.preventDefault();						  
	});
	
	$("blockquote#expand").addClass("blockquote_hide");
	$("blockquote#expand").after("<a class='exlink' href='#expand'>(+) Click to expand</a>");
	$(".exlink").click(function(e) {
		if($(this).html() == "(+) Click to expand") {
		$("blockquote#expand").removeClass();
		$(".exlink").html("(-) Click to collapse");
		} else {
			$("blockquote#expand").addClass("blockquote_hide");
			$(".exlink").html("(+) Click to expand");
		}
		//e.preventDefault();									
	});
});
