$(function () {
	//Vertical Align Menu text in Anchors	
	var height;
	var otherHeight;
	$("ul.nav li a").wrapInner("<span />");
	$("ul.nav li a").each(function () {
		height = $(this).innerHeight();
		otherHeight = $(this).children("span").innerHeight();
		$(this).children("span").css("display", "block").css("margin-top", height/2-(otherHeight/2));
	});
	var height1;
	var otherHeight1
	$("#bottom-menu ul li a").wrapInner("<span />");
	$("#bottom-menu ul li a").each(function () {
		height1 = $(this).parent("li").innerHeight();
		otherHeight1 = $(this).children("span").innerHeight();
		if(otherHeight1 > height1/2) {
			$(this).children("span").css("display", "block").css("margin-top", height1/2-(otherHeight1/1.5));
		}	
		else {
			$(this).children("span").css("display", "block").css("margin-top", height1/2-(otherHeight1));
		}
	});
	$('.gallery a').lightBox();
	$(".gallery:not(.gallery.no)").jCarouselLite({
	    auto: 5000,
	    speed: 1000,
	    visible: 4,
	    afterEnd: function () {
			$('.gallery a').lightBox();
		}
	});
	$('<a class="more-link">Read More...</a>').insertBefore("span.read-more");
	$("span.read-more").hide();
	$("a.more-link").click(function () {
		$(this).next("span.read-more").slideToggle("slow");
		$(this).slideToggle("slow");
	});
	$("a[rel='external']").attr("target", "_blank");
});