
  function big_cookie(set) {
    document.cookie="big_cookie="+set+";path=/";
  }

jQuery(document).ready(function($) {

  // superfish menus
  $('ul#nav').superfish(
    { 
      delay:       1000,                           
      animation:   {opacity:'show'}, 
      speed:       'fast',                         
      autoArrows:  false,                          
      hoverClass	: 'sfHover',
      dropShadows: true
    }
  );

  // homepage media box tabs
  $("#media-box").tabs();

  // colorbox (http://colorpowered.com/colorbox/)
  $("a.colorbox").colorbox();
  $("a.gallery_photo-link").colorbox({rel:'photo_gallery', photo:true,
    onOpen: function(){
      var photo_url = $.fn.colorbox.element();
      var current_gallery_photo_link = $("a[href="+photo_url+"]");
      $("div#cboxContent div#cboxDesc").remove();
      if (current_gallery_photo_link.attr("desc")) {
        $("div#cboxContent").append("<div id='cboxDesc'>"+current_gallery_photo_link.attr("desc")+"</div>");
      }
      $("div#cboxContent div#cboxAuthor").remove();
      if (current_gallery_photo_link.attr("author")) {
        $("div#cboxContent").append("<div id='cboxAuthor'>"+current_gallery_photo_link.attr("author")+"</div>");
      }
    }
  });
  $("a.weather_photo-link").colorbox({width:'750px', height:'700px', iframe:true});
    // privacy popup uses iframe
  $("a[href*='privacy_policy-popup']").colorbox({width:'550px', height:'700px', iframe:true});
  $("a[target='iframe-colorbox']").colorbox({width:'700px', height:'700px', iframe:true});
  $().bind("cbox_open", function() {
    $("div#content, div#sidebar, div#footer").hide();
  });
  $().bind("cbox_closed", function() {
    $("div#content, div#sidebar, div#footer").show();
  });

  // bg cookie
  $("#bg_thumbs-gallery img").click(function(e){
    big_cookie($(this).attr("bg"));
    document.location=document.location;
  });

  // form placeholders
  function title_to_value() {
    input_field = $(this);
    if (input_field.attr("value") == input_field.attr("title")) {
      input_field.attr("value", '');
    }
  }

  function reset_to_value() {
    input_field = $(this);
    if (!input_field.attr("value")) {
      input_field.attr("value", input_field.attr("title"));
    }
  }

  // set the value from the title
  $.fn.placeholder = function() {
    return this.each(function() {
      var input_field = $(this);
      // empty the field on click if it has default value
      input_field.bind("focus", title_to_value);
      // reset the field to default value on blur if it is empty
      input_field.bind("blur", reset_to_value);
      // empty the field if the same value as title before submitting
      $("form:has(input[name='"+input_field.attr("name")+"'])").bind('submit', title_to_value);
      // reset the field to the title
      $("form:has(input[name='"+input_field.attr("name")+"'])").bind('reset', function() {
        input_field.attr("value", input_field.attr("title"));
        return false;
      });
      input_field.attr("value", input_field.attr("title"));
    });
  };

  // placeholder for form
  $("input#park_n_pipe_hype").placeholder();

});

$(window).load(function() {
//
});
