// Javascript Document
// Developed By ramahost.com

		$(function(){
		         //Setting Contact table rows color
				$("section table#contact tr:odd").css({background:'#fff'});
				$("section table#contact tr:even").css({background:'#ddd'});
				$("section table#contact2 tr:odd").css({background:'#fff'});
				$("section table#contact2 tr:even").css({background:'#ddd'});
				//Handling Quotation Ajax Request
				$('#send').click(function(){
				$("form table").css('marginBottom','10px');
		$('section div#ajax').slideDown('fast');
		$('section div#ajax').html('<span class="send">SENDING ....</span><img src="images/loading.gif" style="border:none;" alt="loading"/>');
		$.ajax ({
			url: 'process.php',			
			data:{ Name: $('#name').val(),
			Company: $('input#company').val() ,
		     Email: $('#email').val(),
			Address: $('#address').val(),
			Phone: $('#phone').val(),
			Note: $('textarea#note').val() 
			},
			type: 'post',
			dataType: 'html',
			success: function (data){
			$("section div#ajax").show("slow");
		    $("section div#ajax").html(data);},
			error:function (){
			$("section div#ajax").html("<span class='error'>Error</span>");								
							}
								});
									});
									
								// Handling Menus

										$("li a.sub").mouseover(function(){
										$(this).parent().find("ul.subnav").slideToggle('slow');
										//$(this).parent().find("ul li:first").css({paddingTop:'10px'});
										
										});
									
									
									
									
				//Handling Tabs

			$('#tabs div').hide(); // Hide all divs
			$('#tabs div:first').show(); // Show the first div
			$('#tabs ul li:first').addClass('active'); // Set the class of the first link to active
			$('#tabs ul li a').click(function(){ //When any link is clicked
			$('#tabs ul li').removeClass('active'); // Remove active class from all links
			$(this).parent().addClass('active'); //Set clicked link class to active
			var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
			$('#tabs div').hide(); // Hide all divs
			$(currentTab).show(); // Show div with id equal to variable currentTab
			return false;
			});
			
			
			});


		
