jQuery(document).ready(function($){ // START


jQuery('input[title], textarea[title]').each(function() {if($(this).val() === '') {$(this).val($(this).attr('title'));}
  $(this).focus(function() {if($(this).val() == $(this).attr('title')) {$(this).val('').addClass('focused');	}});
  $(this).blur(function() {if($(this).val() === '') {$(this).val($(this).attr('title')).removeClass('focused');}});
});


jQuery('.fade').hover(
  function() {$(this).fadeTo("fast", 0.7);},
  function() {$(this).fadeTo("fast", 1);}
);


jQuery('#menu ul, #container, #footer').corner('10px');
jQuery('.sidebox h3').corner('8px');
jQuery('ul.post-meta').corner('5px');


}); // END


Cufon.replace('h2.post-title, .sidebox h3, .header-title, .footer-block h4, .post h1, .post h2, .post h3', {fontFamily: 'grilledcheese'});
Cufon.replace('.side-menu', {fontFamily: 'Franklin Gothic'});


function showVideo(id) {
document.write("<div class=\"centered\">");
document.write("<object width=\"425\" height=\"325\">");
document.write("<param name=\"movie\" value=\"http://www.youtube.com/v/"+id+">&amp;hl=en&amp;fs=1\"></param>");
document.write("<param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param>");
document.write("<embed src=\"http://www.youtube.com/v/"+id+"&amp;hl=en&amp;fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"325\"></embed></object>");
document.write("</div>");
}


function addLink() {
	var body_element = document.getElementsByTagName('body')[0];
	var selection;
	selection = window.getSelection();
	var pagelink = "<br /><br />Read more at: <a href='"+document.location.href+"'>"+document.location.href+"</a>";
	var copytext = selection + pagelink;
	var newdiv = document.createElement('div');
	newdiv.style.position='absolute';
	newdiv.style.left='-99999px';
	body_element.appendChild(newdiv);
	newdiv.innerHTML = copytext;
	selection.selectAllChildren(newdiv);
	window.setTimeout(function() {
		body_element.removeChild(newdiv);
	},0);
}
document.oncopy = addLink;
