$(document).ready(function() {
  //upon load, sets the text in the searchbox

  var searchDefault = "search firdouss.com, click here!";
  $("#s").val(searchDefault);
  $("#search-tip").hide();

  //sets action if the searchbox input field is clicked
  $("#s").focus(function() {
    var curText = $(this).val();
    if(curText == searchDefault) {
      $(this).val('');
    }
    $("#search-tip").slideDown();
  });

  //sets back default text if searchbox is blurred and no inputs
  $("#s").blur(function() {
    var curText = $(this).val();
    if(curText == '') {
      $(this).val(searchDefault);
    }
    $("#search-tip").slideUp();
  });

  $(".scroll-top a").live('click', function(e) {
    e.preventDefault();
    $('html, body').animate({
      scrollTop: 0
    }, 1000);
  });


});


