﻿var a = function (a) {
		$.blockUI({
			message: a
		})
	};
var b = function () {
		$.unblockUI()
	};
var c = function (a, b, c) {
		if (b !== "") {
			$("#popup_alert").attr("title", b)
		}
		if (a !== "") {
			$("#popup_alert #popup_alert_message").html(a)
		}
		$("#popup_alert").dialog({
			modal: true,
			buttons: {
				OK: function () {
					$(this).dialog("close")
				}
			},
			close: function () {
				$(this).dialog("destroy");
				if ($.isFunction(c)) {
					c.call(c)
				}
			}
		});
		$("#popup_alert").dialog("open")
	};
var d = function (a, b, c) {
		if (b !== "") {
			$("#popup_confirm").attr("title", b)
		}
		if (a !== "") {
			$("#popup_confirm #popup_confirm_message").html(a)
		}
		$("#popup_confirm").dialog({
			modal: true,
			buttons: {
				Cancel: function () {
					$(this).dialog("close")
				},
				OK: function () {
					$(this).dialog("close");
					if ($.isFunction(c)) {
						c.call(c)
					}
				}
			},
			close: function () {
				$(this).dialog("destroy")
			}
		});
		$("#popup_confirm").dialog("open")
	};
$("a[rel=pop]").fancybox();
$(".sf-navbar li:first-child").addClass("hidden");
$(".sf-navbar li li:first-child").removeClass("hidden");
$(".sf-navbar").superfish({
	animation: {
		height: "show"
	},
	speed: 100,
	autoArrows: false
});

//$(".sf-navbar li:nth-of-type(2)").addClass("show");/

$(window).load(function () {
	function a(a, b, c) {
		var d = c.currSlide;
		$("#prev")[d === 0 ? "hide" : "show"]();
		$("#next")[d === c.slideCount - 1 ? "hide" : "show"]()
	}
	$("#banner").cycle({
		fx: "fade",
		speed: 500,
		timeout: 8e3,
		next: "#next",
		prev: "#prev",
		after: a
	})
});

$("div.faq .answer").hide();
var j_faq = {
	init: function () {
		$("div.faq .question").click(function () {
			j_faq.toggle(this)
		})
	},
	toggle: function (a) {
		$(a).toggleClass("active");
		$(a).siblings(".answer").slideToggle("fast")
	}
};
$(function () {
	j_faq.init()
})
