$("document").ready(function() {
	Cufon.replace("#header span.gill-font", {fontFamily: "Gill Sans Light"});
	Cufon.replace("p.title", {fontFamily: "PT Serif"});
	Cufon.replace("ul.page-nav li a, ul.page-nav li b", {fontFamily: "Gill Sans"});
	Cufon.replace("h1", {fontFamily: "Gill Sans Light"});
	Cufon.replace("#section a, #section span", {fontFamily: "Gill Sans"});
	
	Cufon.replace("#fancybox-content i, span.error", {fontFamily: "PT Serif"});
	Cufon.replace(".order-form h2, #fancybox-content h2", {fontFamily: "Gill Sans Light"});
	
/*-- index.html --*/
	Cufon.replace("#header a", {fontFamily: "Gill Sans"});
	Cufon.replace("#header a, #header p, .organize-banquet", {fontFamily: "Gill Sans"});
	Cufon.replace("#footer #copyright, #footer #reserve-tables", {fontFamily: "Gill Sans"});
	Cufon.replace("#content.banquet .main-text", {fontFamily: "PT Serif"});
	$(".pay a").click(function() {
		return false;
	});
/*-- index.html --*/		

/*-- contacts.html --*/		
	Cufon.replace("div.address-phone address, div.address-phone a, .order-form i", {fontFamily: "PT Serif"});	
/*-- contacts.html --*/	
	
/*-- history.html --*/		
	Cufon.replace("#content.history .main-text", {fontFamily: "PT Serif"});
/*-- history.html --*/	

/*-- team.html --*/	
	Cufon.replace("#content.team p, #content.team i", {fontFamily: "PT Serif"});
/*-- team.html --*/	

/*-- news.html --*/	
	Cufon.replace("#content.news h3, #content.news div.right-side a", {fontFamily: "Gill Sans"});
	Cufon.replace("div.news-item p", {fontFamily: "PT Serif"});
/*-- news.html --*/	

/*-- menu.html --*/	
	Cufon.replace("#content.menu h3, #content.menu div.right-side a", {fontFamily: "Gill Sans"});
	Cufon.replace("ul.list li p, ul.list li b, ul.list li i.vine", {fontFamily: "PT Serif"});
	$("#accordion p.title").click(function() {
		if($(this).parent().hasClass("active") == false) {
			$("#accordion div.active div.text").slideUp("slow");
			$("#accordion div.active span").addClass("tr-down");
			$("#accordion > div").removeClass("active");
			
			var current = $(this).parent();
			current.find(".text").slideDown("slow");
			$(this).find("span").removeClass("tr-down");
			$(this).find("span").addClass("tr-up");
			current.addClass("active");
		}
	});
/*-- menu.html --*/	

/*-- index.html --*/	
	Cufon.replace("#content.index i", {fontFamily: "PT Serif"});
	Cufon.replace("#content.index h3, #content.index div.about p", {fontFamily: "Gill Sans"});
	$("#slider").easySlider({
		auto: true, 
		continuous: true,
		numeric: true,
		pause: 5000,
	});
	$("h3 a").click(function() {
		if($(this).hasClass("show-press") == true) {
			$(".show-news").addClass("underline");
			$(this).removeClass("underline");
			$(".news-block").hide();
			$(".press-block").show();
			
			Cufon.replace($(this), {color: "#000000", fontFamily: "Gill Sans"});
			Cufon.replace($(".show-news"), {color: "#A29061", fontFamily: "Gill Sans"});
		}
		if($(this).hasClass("show-news") == true) {
			$(".show-press").addClass("underline");
			$(this).removeClass("underline");
			$(".press-block").hide();
			$(".news-block").show();
			
			Cufon.replace($(this), {color: "#000000", fontFamily: "Gill Sans"});
			Cufon.replace($(".show-press"), {color: "#A29061", fontFamily: "Gill Sans"});
		}
		return false;
	});
/*-- index.html --*/	

/*-- company-news.html --*/	
	Cufon.replace("#content.company-news p, div.news-detail", {fontFamily: "PT Serif"});
	Cufon.replace(".back-to-list", {fontFamily: "Gill Sans"});
/*-- company-news.html --*/	

/*-- reviews.html --*/	
	Cufon.replace("#content.reviews i, #content.reviews ul li, #tip-title", {fontFamily: "PT Serif"});
	
	function formatTitle(title, currentArray, currentIndex, currentOpts) {
		return '<div id="tip-title"><span>' + title + '</span><a class="next" href="javascript:;" onclick="$.fancybox.next();"></a><a class="prev" href="javascript:;" onclick="$.fancybox.prev();"></a></div><script type="text/javascript">Cufon.replace("#tip-title", {fontFamily: "PT Serif"});</script>';
	}
	
	$("#reviews-list a").fancybox({
		titlePosition: "inside",
		padding: 30,
		overlayColor: "#d5d3d0",
		overlayOpacity: 0.7,		
		titleFormat: formatTitle,
		showNavArrows: false,
		cyclic: true
	});
/*-- reviews.html --*/	

/*-- gallery.html --*/		
	$(".gallery-image").each(function(i) {
		var text = $(this).attr("title");
		$(this).append('<div class="hint">' + text + '</div>');
	});
	$(".gallery-image").hover(
		function() {
			$(this).find(".hint").slideDown(150);
		},
		function() {
			$(this).find(".hint").slideUp(150);
		}
	);
	
	$(".gallery-image").fancybox({
		titlePosition: 'inside',
		padding: 40,
		titleFormat: formatTitle,
		showNavArrows: false,
		overlayColor: "#d5d3d0",
		overlayOpacity: 0.7,	
		cyclic: true
	});
/*-- gallery.html --*/		
});
