// JavaScript Document
$(function(){
	
	Cufon.replace('#logo, #stories b', {fontFamily: 'Palatino Linotype', textShadow: '#fff 1px 1px', fontStretch: '' });
	//Cufon.replace('#nav-holder li:not(.current)', {fontFamily: 'Arial', textShadow: '#fff 1px 1px', fontStretch: '0px', hover: 'true' });
		Cufon.replace('#nav-holder li:not(.current)', {fontFamily: 'Arial', textShadow: '#fff 1px 1px', fontStretch: '0px'/*, hover: 'true' */, hover: {textShadow: '0px 0px #3880ED'}});
		Cufon.replace('#nav-holder .current', {fontFamily: 'Arial', textShadow: '#464646 1px 1px', fontStretch: ''});
	   Cufon.replace('#banner-holder h1, #banner-holder h2', {fontFamily: 'FreeSet'});
	   Cufon.replace('#key-holder ul li a, #body-area h1, #footer address strong', {fontFamily: 'Lucida Sans Unicode', hover: 'true'});
	Cufon.replace('#body-area h1, .sidebar h2, .sidebar .med_eme, #key-holder h1', {fontFamily: 'FuturisLightCTT'});
	Cufon.replace('#key-holder h1', {fontFamily: 'FuturisLightCTT', textShadow: '#fff 1px 1px'});
	Cufon.replace('#stories blockquote', {fontFamily: 'CAC Saxon Bold', textShadow: '#fff 1px 1px'});
	
	$('#banner-holder h1 span, #round').corner({ 
			tl: { radius: 4 }, tr: { radius: 4 }, bl: { radius: 4 }, br: { radius: 4 }, antiAlias: true, autoPad: true 
		});
	$('#round').corner({ 
			tl: { radius: 4 }, tr: { radius: 4 }, bl: { radius: 4 }, br: { radius: 4 }, antiAlias: true, autoPad: true 
		});	
	
	$("#navigation").lavaLamp({
       			fx: "easeOutQuart",
       			speed: 500,
       			click: function(event, menuItem) {
       			return true;} });
/*	$("#navigation li a").each(function() {
               if(this.href == window.location) {$(this).parent("li").addClass("current")};
        	   });
	$("#footer-nav li a").each(function() {
               if(this.href == window.location) $(this).addClass("current");
        	   });*/		   
	$('#banner-slider #slides').coinslider();	   
	 			
	$('#key-holder ul li a, #read-more1').blend(600);
	
	$("#footer-nav li").hover(function () {
		 $(this).children().stop().animate({
			marginLeft : "20px"					 						 
		}, 400);
	}, function () {
		$(this).children().stop().animate({
			marginLeft : "0px"					 						 
		}, 400);
	});
	//$(".shd2").dropShadow({left: -1, top: -1, opacity: 1, blur: 2, color: "#000"});
	//$(".shd").dropShadow({left: 1, top: 1, opacity: 1, blur: 0, color: "#fff"});
	
	$('.services').find('.answer').hide().end().find('a').click(function() { 
						var k = $(this);
						var answer = $(this).next(); 
                        if (answer.is(':visible')) { 
                        answer.slideUp()
						k.removeClass("active");
						} else { 
                        $('.services').find('.answer').removeClass("selected").slideUp();
						$('.services').find('a').removeClass("active");
						k.addClass("active");
						answer.slideDown().addClass("selected");
						
						
                        } 
                }).removeClass("active");
				
	$("#advice_form, #contact-form").validationEngine({
		inlineValidation: true, 
		scroll:false,
		promptPosition: "topRight"
		
		});
	  $('#reset').click(function() {
       $.validationEngine.closePrompt(".formError",true);
    	 });			
				
		
	});
