jQuery(document).ready(function() {
        jQuery("#SearchString").attr("value", "I'm looking for...");

        var text = "I'm looking for...";

        jQuery("#SearchString").focus(function() {
                jQuery(this).addClass("active");
                if(jQuery(this).attr("value") == text) jQuery(this).attr("value", "");
        });

        jQuery("#SearchString").blur(function() {
                jQuery(this).removeClass("active");
                if(jQuery(this).attr("value") == "") jQuery(this).attr("value", text);
        });
});

jQuery(document).ready(function() {
        var result = jQuery('#SearchResult').attr("value");
        jQuery("#SearchResult").attr("value", result);

        var text = result;

        jQuery("#SearchResult").focus(function() {
                jQuery(this).addClass("active");
                if(jQuery(this).attr("value") == text) jQuery(this).attr("value", "");
        });

        jQuery("#SearchResult").blur(function() {
                jQuery(this).removeClass("active");
                if(jQuery(this).attr("value") == "") jQuery(this).attr("value", text);
        });
});

document.observe('dom:loaded', function() {
        $('ajaxForm').observe('submit', submitAjaxFormDemonstration);
});

function submitAjaxFormDemonstration(event) {
  Event.stop(event);

  var text1 = $('ajaxForm').down('input',0).value.strip();
  var text2 = $('ajaxForm').down('input',1).value.strip();
  var text3 = $('ajaxForm').down('input',2).value.strip();
  var text4 = $('ajaxForm').down('input',3).value.strip();

  var gogo = 'form.php?cx=' + text1 + '&cof=' + text2 + '&ie=' + text3 + '&q=' + text4;
  
  Lightview.show({
    href: gogo,
    rel: 'iframe',
    title: 'Paradise Search Results (Powered by Google)'
  });
}
