// JavaScript Document
$(function (){ 
	$(".faq > dd").hide();  
	$(".faq > dt").click(function() {
		$(this).toggleClass("on").toggleClass("off").next().slideToggle("fast");
		});
});

$(function (){
//	$("div#appointment").bind("click keydown", function() { 
//		$(this).expose({ 
//			onLoad: function() { 
//				this.getExposed().css({backgroundColor: '#ffffff'}); 
//			},
//			maskId: 'mask', 
//			onClose: function() { 
//				this.getExposed().css({backgroundColor: null}); 
//			}, 
//			api: true 
//		}).load(); 
//	});
	$('#request').submit(function(){
		var action = $(this).attr('action');
		$('#submit_btn')
			.before('<img src="images/ajax-loader.gif" class="loader" />')
			.attr('disabled','disabled');
		$.post(action, { 
			name: $('#name').val(),
			email: $('#email').val(),
			phone: $('#phone').val(),
			day: $('#day').val(),
			time: $('#time').val()
		},
			function(data){
				$('#request #submit_btn').attr('disabled','');
				$('.response').remove();
				$('#request').before('<span class="response">'+data+'</span>');
				$('.response').slideDown();
				$('#request img.loader').fadeOut(500,function(){$(this).remove()});
				if(data=='Message sent!') $('#request').slideUp();
			}
		);
		return false;	
	});
});

$(document).ready(function() {	
	$("a.group").fancybox({
		'hideOnContentClick': false
	});
	$("a.services-1").fancybox({
		'frameHeight':		600,
		'frameWidth':		600,
		'hideOnContentClick': false
	});
	$("a.services-2").fancybox({
		'frameHeight':		400,
		'frameWidth':		400,
		'hideOnContentClick': false
	 });
	
});	

$(document).ready(function(){
	
	$(".tooltip a").hover(function() {
	$(this).next("em").stop(true, true).animate({opacity: "show", top: "-60"}, "slow");
	}, function() {
	$(this).next("em").animate({opacity: "hide", top: "-70"}, "fast");
	});

});  

$(function() {
	$('#slider').click(function(){
		$('#request').slideDown();
	});
});    

