/* CUSTOM SCRIPTS */

$(function(){
  
  $('#name').val('Name');
  wireUpFieldCleaner('#name', "Name");
});

function wireUpFieldCleaner(fieldId, defaultValue) {
  $(fieldId).focus(function(){
    if ($(this).val() == defaultValue)
      $(this).val("");
  }).blur(function(){
    if ($(this).val() == "") {
      $(this).val(defaultValue);
    }
  });
}


$(document).ready(function() {
  $('#screenshots')
    .cycle({ 
      fx:    'scrollUp',
      speed:  1000, 
      timeout:  20850,
      pager:  '#pager',
      pagerEvent: 'mouseover',
      pauseOnPagerHover: true,
      height:      'auto',
      containerResize: 1
    });
  
  $("#pikame").PikaChoose({auto_play:true,transition:[0],show_captions:false,thumb_width:100});
  
  $('div.panel a.sub').click(function() {
    $(this).parent().children("h3").html($(this).attr("title"));
    $(this).parent().children("a.img").attr("href",$(this).attr("href"));
    $(this).parent().children("a.img").children("img").attr("src",$(this).attr("rel"));
    $(this).parent().children("a.goto").attr("href",$(this).attr("href"));
    return false;
  });
  
  
});
