// JavaScript Document


$(document).ready(function() {
			
	$("#subs").addClass("hidden"); // hide dropdown list.
		
		$('#portal').mouseover(function() {
			
				$("#subs").removeClass('hidden');	
					
		});	
		
		$('#portal').mouseout(function() {
			
				$("#subs").addClass('hidden');					
		});
								
		$('ul.tabsNav li:first').addClass('active');		
		$('#tabs-1').siblings().addClass('hidden');
		
		//click funtion
		$("ul.tabsNav li").click(function() {

		$("ul.tabsNav li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tabContent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

		
	
	
		
		
						   
		$('#footer li a, .services li a').mouseover(function() {
				$(this).stop() .animate( {	"paddingLeft" : "10px", "paddingRight" : "10px"});	
		});
		$('#footer li a, .services li a').mouseout(function() {
				$(this).stop() .animate( {"paddingLeft" : "0px", "paddingRight" : "0px"});	
		});
		

// cycle through list for blurb
		$('#cycle').cycle({ 
			fx:'uncover', 
			sync:0,
			timeout:5000,
			speed:3000,
			pause:1,
			autostop:1, 
    		next:   '#next', 
    		prev:   '#prev'
			});
		
		//clearform
		
		$('form').clearForm();
		
		
		
// submit

$('#jform').bind('submit', function() {
            $(this).ajaxSubmit({
				target: '#response', 
				success: function() { 
            $('#response').fadeIn('1500');
			
			
        } 
            });
            return false; // <-- important!
        });

	

	});


