public function getParams($element, $returnRaw=false)
	{
		$params = null;

		if ($this->baseDb->tableExists('#__components'))
		{
			if (substr($element, 0, 4) == 'plg_')
			{
				$ext = explode('_', $element);
				$query = "SELECT `params` FROM `#__plugins` WHERE `folder` = " . $this->baseDb->quote($ext[1]) . " AND `element` = " . $this->baseDb->quote($ext[2]);
			}
			else
			{
				$query = "SELECT `params` FROM `#__components` WHERE `option` = " . $this->baseDb->quote($element);
			}

			$this->baseDb->setQuery($query);
			$params = $this->baseDb->loadResult();
		}
		elseif ($this->baseDb->tableExists('#__extensions'))
		{
			if (substr($element, 0, 4) == 'plg_')
			{
				$ext = explode('_', $element);
				$query = "SELECT `params` FROM `#__extensions` WHERE `folder` = " . $this->baseDb->quote($ext[1]) . " AND `element` = " . $this->baseDb->quote($ext[2]);
			}
			else
			{
				$query = "SELECT `params` FROM `#__extensions` WHERE `element` = " . $this->baseDb->quote($element);
			}

			$this->baseDb->setQuery($query);
			$params = $this->baseDb->loadResult();
		}
		else
		{
			$this->log(sprintf('Required table not found for retrieving "%s" params', $element), 'warning');
		}

		if (!$returnRaw)
		{
			if ($params)
			{
				$params = new Registry($params);
			}
			else
			{
				$params = new Registry();
			}
		}

		return $params;
	}