$(document).ready( function(){

	$('.quoteImg').toggle( function(){	
		$('.freeQuote').animate({width:'400px'},1000);
		$('body').append('<div class="on"></div>');
		$('.on').css('opacity', 0.5);
		$('.on').fadeIn('slow');
		
	},function(){
		
		$('.freeQuote').animate({width:'61px'},1000);		
		$('.on').fadeOut('slow', function(){ $('.on').remove() });
		
		})
	$('.quotepanImg img').css('opacity', 0.7);
	$('.quotepanImg span.tip').css('opacity', 0.9);
	$('.quotepanImg a').hover( function(){
									  
			$(this).find('span.tip').animate({width:'200px'}, 500);						  
			$(this).find('img').animate({'opacity': 1},500);					  
	}, function(){
		$(this).find('span.tip').animate({width:'0'}, 300);	
		$(this).find('img').animate({'opacity': 0.7},500);
		
		})
	
	/* left nav inside */
	
	$('.leftNav li').toggle(function(){		
		$(this).children('ul').slideDown('slow');
		$(this).find('.arrow').addClass('up');
	},function(){
		
		$(this).children('ul').slideUp('fast');
		$(this).find('.arrow').removeClass('up');
		})
	/* tabs */
	
	$('.topTabs li').click( function(){
			$('.topTabs li').removeClass('active');
			$(this).addClass('active');
			
			var x = $(this).prevAll('li').length;
			$('.tabs .tabCon').removeClass('active');
			$('.tabs').find('.tabCon').eq(x).addClass('active');
	})
	
})


function form_post(){
	var dt=document.frm1;
	if(dt.name.value==""){
		alert("Please enter name.");
		dt.name.focus();
		return false;	
	}
	if(dt.email.value==""){
		alert("Please Enter Email.");
		dt.email.focus();
		return false;	
	}
	if(dt.service.value==""){
		alert("Please select service.");
		dt.service.focus();
		return false;	
	}
	if(dt.message.value==""){
		alert("Please enter your message.");
		dt.message.focus();
		return false;	
	}
	$(".right").slideDown("slow", function(){
	
		$('.freeQuote').animate({width:'61px'},1000);		
		$('.on').fadeOut('slow', function(){ $('.on').remove() });
	
	});
	return true;
	
		
}
