﻿// JavaScript Document


$(document).ready(
	function()
	{

	    $(".navigation li").hover(function()
	    {
	        $(this).children("ul").show();
	    }, function()
	    {
	        $(this).children("ul").hide();
	    });

	    $(".faq h3").click(function()
	    {
	        $(this).next("div").slideToggle("slow")
		.siblings("div:visible").slideUp("slow");
	        $(this).toggleClass("active");
	        $(this).siblings("h3").removeClass("active");
	    });

	    $(".thumbs > a").click(function() { $(".thumbs > a").removeClass("current"); var a = $(".image > a:first"); var img = a.children(); var src = $(this).attr("class"); a.attr("href", src + ".aspx"); img.attr("src", src + "_390_275.aspx"); $(this).addClass("current"); return false; });


	});

function OpenModalDialog(title, frameUrl, width, height)
{
    var frame = "<iframe frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='" + frameUrl + "' style='width:" + width + "px;height:" + height + "px' ></iframe>";
    $("<div>" + frame + "</div>").dialog({ modal: true, title: 'Гостевая книга - оставить сообщение', width: (width + 24), height: (height + 45) });
}


function OpenForm(server)
{
    OpenModalDialog('Гостевая книга - оставить сообщение', server + "form.aspx", 579, 357);
}
