//Start Logo Animations
var domain = 'http://kneedeepincode.com/';
var blog_url = domain+'wp-content/themes/kneedeepincode';
$.getScript(domain+'cdn/secretAgent/secretAgent.js');

$.getScript(domain+'cdn/genPlainText/genPlainText-1.0.js',function(){
	$(function(){
		$('pre').genPlainText({fadeTime:250,originalText:'View With Syntax Coloring'});
	});
});
$.getScript(domain+'cdn/dynoBox/dynoBox-1.0.js',function(){
	$(function(){
		$('#header input').dynoBox({userTextFocus:'select',value:''});
	});
});


$(function(){
	$('a[href*=".zip"]').empty().append('<img src="'+blog_url+'/images/download.png" >').hover(
		function(){
			$(this).children().stop().animate({opacity:'0'});
		},
		function(){
			$(this).children().stop().animate({opacity:'1'});
		}
	);
	
//End Logo Animations
	
	//Fixes the 0.3em offset of the first anchor tag element so it lines up with the headline for the nav
	$('.main_category').each(function(){
		$(this).children().children(':first').children().css({marginLeft:'-0.3em'});
	});
	
	$('.sidebar_main:last').css({borderBottom:'0'});
	
	//To make my markup a little cleaner I'm taking the first word of #article_data and bolding it with jQuery
	$('#article_data p').each(function(){
		var theText = $(this).html();
		var replacement = theText.split(':')[0];
		var theReplacedText = theText.replace(replacement+':', '<strong>'+replacement+':</strong>');
		$(this).empty().prepend(theReplacedText);
	});
	
	//Keep my email safe
	$.get(blog_url+'/js/mailto.txt',function(email){
		$('.email').each(function(){
			$(this).append('<a href="mailto:'+email+'" class="contact"></a>');
		});
	});
});