public function build($id = '', $class = '', $content = null, $title = 'Window Frame')
    {
        // Set basic properties
        $this->type(Popup::TP_PERSISTENT, false);
        $this->binding('on');

        // Create wFrame
        $id = 'wf_' . (empty($id) ? mt_rand() : $id);
        $this->wFrame = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', $id, 'window-frame');
        $this->wFrame->addClass($class);

        // Build parent element and append content to frame
        parent::build($id, $this->wFrame);

        // Create header
        $frameHeader = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', '', 'frame-header');
        $this->appendToFrame($frameHeader);

        // Header Title
        $frameTitle = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('span', $title, '', 'frame-title');
        $frameHeader->append($frameTitle);

        // Close button
        $closeBtn = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('span', '', '', 'button-close');
        $frameHeader->append($closeBtn);

        // Create body
        $this->body = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', '', 'frame-body');
        $this->appendToFrame($this->body);

        // Append given content to frame body, if any
        $this->appendToBody($content);

        return $this;
    }