// JavaScript Document toddpardy.com

$(function(){	
	//$.ansible.navigation();
	$.ansible.forms();
	$.ansible.tooltip();
	$.ansible.popup();
	//$.ansible.rotate();
	//$.ansible.showhide();
	//$.ansible.jump();
	$('.btn').append($('<span />').addClass('helper'));

});



$(document).ready(function() {
	
$('#logoutBox').hide();

$('.modalWin').hide();
	//Default Action
	
	var contactPos = 0;

	$("#contact").click(function(e) {
		//alert("clicked!");
		e.preventDefault();
		$("#contactMe").animate({ left: contactPos }, 300, 'swing', function() {
			if(contactPos == 0) { contactPos = -400; }
			else { contactPos = 0; }
		});
	});
	
	$(".topMenuAction").click( function() {
		if ($("#openCloseIdentifier").is(":hidden")) {
			$("#slider").animate({ 
				marginTop: "-300px"
				}, 500 );
			$("#topMenuImage").html('<img src="open.png" alt="open" />');
			$("#openCloseIdentifier").show();
		} else {
			$("#slider").animate({ 
				marginTop: "0px"
				}, 500 );
			$("#topMenuImage").html('<img src="close.png" alt="close" />');
			$("#openCloseIdentifier").hide();
		}
	});
	
	
	
	
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});



});


// Google Analytics

var _gaq = _gaq || [];
  	_gaq.push(['_setAccount', 'UA-22431601-1']);
  	_gaq.push(['_setDomainName', '.toddpardy.com']);
  	_gaq.push(['_trackPageview']);

(function() {
   	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
