// JavaScript Document

Cufon.replace('h1,h2,h3,h4,h5,.top-menu li .parent', { fontFamily: 'aurulent',hover: true});

	
$(document).ready(function() {
						   
	$("a.inline").fancybox({
		'hideOnContentClick': false
	});
	
						   
	/*--Classes--*/
	
	$(".sub-parent li:last").addClass("end");
	$("#navigation-subpage li:last").addClass("end");

/*--Splashes--*/			   
						   
	$('#splash-cycle').cycle({ 
		fx:      'fade', 
		speed:    600, 
		timeout:  10000,
		pager:  '#frame-paginate .paginate-container',
		pagerAnchorBuilder: function(idx, slide) { 
			return '<li><a href="#">' + jQuery(slide).children(".pagenation").eq(0).html() + '</a></li>';
		} 
	});
						   
	$('#frame-paginate a').hover(function() {
		$('#frame-paginate a').not(this).children('.paginate-text').hide();
		$(this).children('.paginate-text').css("display","block");
	});
	
							   
	/*--Superfish--*/
	
	$('ul.sf-menu').superfish({ 
		delay:       200,                            
		animation:   {opacity:'show'},  
		speed:       'slow',                         
		autoArrows:  false,                         
		dropShadows: false                           
	}); 
	
	/*--Tabs-*/

	$(".menu > li a").click(function(e){

		switch(e.target.parentNode.id){
			case "appointment":
				//change status & style menu
				$("#appointment").addClass("active");
				$("#question").removeClass("active");
				$("#subscribe").removeClass("active");
				//display selected division, hide others
				$("div.appointment").fadeIn();
				$("div.question").css("display", "none");
				$("div.subscribe").css("display", "none");
			break;
			case "question":
				//change status & style menu
				$("#appointment").removeClass("active");
				$("#question").addClass("active");
				$("#subscribe").removeClass("active");
				//display selected division, hide others
				$("div.question").fadeIn();
				$("div.appointment").css("display", "none");
				$("div.subscribe").css("display", "none");
			break;
			case "subscribe":
				//change status & style menu
				$("#appointment").removeClass("active");
				$("#question").removeClass("active");
				$("#subscribe").addClass("active");
				//display selected division, hide others
				$("div.subscribe").fadeIn();
				$("div.appointment").css("display", "none");
				$("div.question").css("display", "none");
			break;
		}
		//alert(e.target.id);
		return false;
	});
	
	/*--Random Module--*/
	
	$('#rotator-contact').cycle({ 
		timeout: 9999999,                           
		random: true
	});

	
});


$(function(){
	$('a.blank').click(function(){
		window.open(this.href);
		return false;
	});
});


$(document).ready(function() {
  $('.form-validation').ketchup();
});






