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("medium", 1);},
    function() {$(this).fadeTo("medium", 0.5);}
  );


  $(".accordion-content").hide();
  $('.accordion-title').click(function() {
    $('.accordion-content').slideUp('medium');	
    $(this).next().slideDown('medium');
  return false;
  });


  jQuery('.post-button, ul.pagination .current-page, ul.pagination a, a.author-button, a.youtube-button').corner('3px');
  jQuery('.post blockquote').corner();


  var divWrapper = $('.three-tabs > div');
  divWrapper.hide().filter(':first').show();
  $('ul.tabs li a').click(function () {
    if (this.className.indexOf('current') == -1){
    divWrapper.hide(); divWrapper.filter(this.hash).fadeIn('slow');
  $('ul.tabs li a').removeClass('current');
  $(this).addClass('current');
  }return false;
  });


  $("#slideshow").css("overflow", "hidden");
  $("ul#slides").cycle({
  fx: 'fade',
  pause: 0,
  prev: '#prev',
  next: '#next',
  });
  
}); // END


Cufon.replace('.sidebox h3, .sidebox h4, h2.post-title, .post-date, .post h1, .post h2, .post h3, .post h4, .post h5, .post h6, ul.tabs', {fontFamily: 'gotham-book'});


function showVideo(id) {
  document.write("<div class=\"centered\">");
  document.write("<object width=\"580\" height=\"326\">");
  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=\"580\" height=\"326\"></embed></object>");
  document.write("</div>");
}
