Cufon.replace('h1')('h2')('h3')('ul#nav li a')
Cufon.replace('p#info', {fontWeight: '500'});
Cufon.replace('h1 span', {fontWeight: '500'});
Cufon.replace('div.panel div.panel-block h3', {fontWeight: '500'})

$(document).ready(function() {
  // All pages
  searchBoxSetup();
  $("div.clickable").click( function(event) { window.location = $(this).attr("href"); event.preventDefault(); });
  
  // Home page
  $("#selector").scrollable({
    items: '#panels',
    size: 1,
    clickable: false
  }).circular().navigator();
  
  // Product page
  var api = $("#screenshot-container").scrollable({
      items: '#screenshots',
      size: 1,
      clickable: true,
      globalNav: true
  }).circular({api:true});
  api.setPage(0);
  $('#product-selector img').mouseover(function(event) {
    $('.select-list').hide();
    $('#'+this.id+'-selector').show();
  });
  $('.select-list').mouseleave(function(event) {
    setTimeout("$('.select-list').hide()", 1000)
  })
});

function searchBoxSetup() {
  var defaulttext = 'Enter search term...'
  $('#searchbox').focus(function(){ 
    if($(this).attr("value") == defaulttext) $(this).attr("value", "");  
  });
  $('#searchbox').blur(function(){
   if($(this).attr("value") == "") $(this).attr("value", defaulttext);  
  });
  $('#searchbox').blur();
}

