<?php
/**
 * @version   $Id: rtl.php 5428 2012-11-26 17:17:41Z james $
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 *
 * Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
 *
 */

defined('JPATH_BASE') or die();

gantry_import('core.gantryfeature');

/**
 * @package     gantry
 * @subpackage  features
 */
class GantryFeatureRTL extends GantryFeature
{

	var $_feature_name = 'rtl';

	function isInPosition($position)
	{
		return false;
	}

	function isOrderable()
	{
		return false;
	}


	function init()
	{
		/** @var $gantry Gantry */
		global $gantry;
		$document =& $gantry->document;

		$g_direction = $gantry->get('direction');

		if ($g_direction != '') $document->direction = $g_direction;


		if ($document->direction == "rtl") {
			$gantry->addLess("template-rtl.less");
			$gantry->addBodyClass("rtl");
		}
	}
}