$(document).ready(function() {
      function writeObj(obj, message) {
        if (!message) { message = obj; }
        var details = "*****************" + "\n" + message + "\n";
        var fieldContents;
        for (var field in obj) {
          fieldContents = obj[field];
          if (typeof(fieldContents) == "function") {
            fieldContents = "(function)";
          }
          details += "  " + field + ": " + fieldContents + "\n";
        }
        console.log(details);
      }

        var objectId = '#fireAccordion';
        var objectWidth = $(objectId).width();

        //$('#debuggg').text(objectWidth+' x '+$(objectId).height());

        var slicesTag = 'li';
        var slices = $(objectId+' '+slicesTag);

        var finalObjectWidth = 754;
        var duration = 1000;
        var sliceWidth = Math.floor((objectWidth - finalObjectWidth)/(slices.size()-1));

        var opened = $(slices).first()[0];

        $(slices).each(function(){
          $(this).width(sliceWidth);
        })

        $(opened).width(finalObjectWidth);

        $(slices).mouseover(function(){
          if (this != opened)
          {
            $(slices).not(this).animate({width: sliceWidth}, {duration: duration, queue: false, easing: "swing" });
            $(this).animate({width: finalObjectWidth}, {duration: duration, queue: false, easing: "swing" });
            opened = this;
          }
        });
});
