//Location of scripts and other files

var assetsdir = "chrome/v1/";


	//Detect if CSS is on
	function hasCSS() {
		var _d = document.createElement('div')
		_d.id = 'css_test'
		$('body').append(_d)
		$('#css_test').css({width:'1px',height:'1px',display:'none'})
		var _v = ($('#css_test').width() != 1) ? false : true
		$('#css_test').remove()
		return _v
   	 }

$(function(){

	
	//Apply styles that don't validate
	$('head').append('<link rel="stylesheet" href="http://christopherpjohnson.com/content/stylesheets/hacks/ " type="text/css" />');
	
	
	//IE PNG fix
	jQuery.ifixpng('http://christopherpjohnson.com/' + assetsdir + 'clear.gif');
	$('#nav-tabs a, img[@src$=png], .check-icon').ifixpng();




	if(hasCSS()){ //If CSS is on, do the following

		//Change form action to use iframe Google search instead of offsite Google search
		$(".google-search-form").attr("action","http://christopherpjohnson.com/content/search/");

		//Insert Email
		$(".insert-email").html('Or you can email me at <a href="mailto:chris@cjohnson.us">chris@cjohnson.us</a>.');

		//Animate the arrow under the nav tabs
		
		$('#nav-tabs a:not(.current)')
			
			.css( {backgroundPosition: "50% 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(50% -40px)"}, 
					{duration:200})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(50% 0)"}, 
					{duration:500})
				})
	
		//Set the width of the sitetitle h1 to the actual width of the Text
			//This will let you right align properly
	
		$("#sitetitle").width($("#myname").width()+1);
		
			//Align subtitle to right
			$("#subtitle").css("text-align","right");
			
		
		//Hide because javascript is running... obviously
		$(".js-hide").hide();
			
	}
			
	

}); 



//Shutter - Lightbox stuff

	shImgDir =  assetsdir;
	shImageCount = true;
	shTextBtns = true;
	shL10n = ['Previous','Next','Close','Full Size','Fit to Screen','Image','of','Loading...'];
	
	shutterOnload = function(){shutterReloaded.Init();}
	
