/* slidingTopPanel
 * Copyright (c) 2010 Olaf Bosch http://olaf-bosch.de/
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 07.01.2010 */
(function(jQuery){
  jQuery.fn.slidingTopPanel = function(params){
    var defaults = {
      width: "100%",
      height: "200px",
    }
    if(params) jQuery.extend(defaults, params);

    jQuery("#sl-content").css("height", "0px");
    jQuery("#sl-open").css("display","block");
    var divPanel = jQuery(this);
    jQuery(divPanel).css({"width": defaults.width,"left": (100 - parseInt(defaults.width))/2 + "%"});
    jQuery(".sl-button").click(function(){
      if(jQuery(this).attr("id") == "sl-close") {
        jQuery("#sl-content").animate({height: "0px"}, 1000);
      } else {
        jQuery("#sl-content").animate({height: defaults.height}, 1000);
      }
      jQuery(".sl-button").toggle();
    });
  };
})(jQuery);

  jQuery(document).ready(function(){
  //  jQuery("#bg-header-top").css("margin-top","44px");
    jQuery("#topslide").slidingTopPanel({width: "100%", height: "245px"});
  });
