 //Requires JQuery
 //By Chris Johnson 
 //http://www.cjohnson.us
 
 var themepath = "/wp-content/themes/quicksand/";

  $(document).ready(function(){
    
	//Put "Search" in the search box
	$("#searchform .text-input").val("Search");
	
	//Get rid of the "Search" text inside the search form when someone clicks in there
    $("#searchform .text-input").focus(function () {
         if ( $(this).val() == "Search"){
        	$(this).val('');
        };
    });
	
	//Bring back the "Search" text if they don't type anything and click away
	 $("#searchform .text-input").blur(function () {
         if ( $(this).val() == ""){
        	$(this).val('Search');
        };
    });
	 
	 
	//Add "Home" to the menu across the top
	$("div#menu ul").prepend('<li><a href="/">Home</a></li>');

	//Make "Chris Johnson" in blog tagline click through to portfolio
	tagline = $("#blog-description:contains('Chris')").html();
	newtagline = tagline.replace(/chris johnson/i, '<a href="http://cjohnson.us" title="Visit Chris Johnson&#8217;s portfolio">Chris Johnson</a>');
	$("#blog-description:contains('Chris')").html(newtagline);
	

	//sifr'ize titles
	// $('h2.entry-title').sifr({path: themepath + 'scripts/', font: 'gotham'});
	
	
	//Move the second sidebar to the top of the page
	$("#sidebars #secondary").clone().prependTo("#content");
	$("#sidebars #secondary").remove();
	$("#content #secondary").attr("id","topwidgets");
		
		//Separate the widgets into separate unordered lists
		$("#topwidgets ul.xoxo").children("li").wrap("<ul></ul>");
		
	//Trim the recent comments so they fit on one line
	//$("#topwidgets ul.xoxo li ul li a").truncate(30);
	//$("#topwidgets ul.xoxo li ul li:first").truncate(30);
	
	$("#topwidgets ul.xoxo li ul li").addClass("truncate");
	
	//$(".truncate").truncate(30);
	
	

  });
 
 
 