protected function _beforeSave(&$args, $event) {
        $data = &$args[1];
        if (!empty($data['url'])) {
            $url = $data['url'];
            if ($this->_isYouTubeUrl($url)) {
                // check for YouTube
                $behavior = new Garp_Model_Behavior_YouTubeable($this->_config['youtube']);
                $data['type'] = 'youtube';
            } elseif ($this->_isVimeoUrl($url)) {
                // check for Vimeo
                $behavior = new Garp_Model_Behavior_Vimeoable($this->_config['vimeo']);
                $data['type'] = 'vimeo';
            } else {
                $error = sprintf(self::ERROR_INVALID_VIDEO_URL, $url);
                throw new Garp_Model_Behavior_Videoable_Exception_InvalidUrl($error);
            }
            $behavior->{$event}($args);
        }
    }