<?php
/**
 * ------------------------------------------------------------------------
 * JA Megafilter Component
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2016 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 * ------------------------------------------------------------------------
 */
//No direct to access this file.
defined('_JEXEC') or die('Restricted access');

$input = JFactory::getApplication()->input;
$doc = JFactory::getDocument();
$currentLanguage = JFactory::getLanguage();
$isRTL = $currentLanguage->isRtl();

$doc->addStyleSheet(JUri::root(true) . '/components/com_jamegafilter/assets/css/jquery-ui.min.css');
if (!defined('T3_PLUGIN')) {
	$doc->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
}
JHtml::_('behavior.core');
JHtml::_('jquery.framework');

if (!version_compare(JVERSION, '4', 'ge')){
  JHtml::_('jquery.ui');
}

JHtml::_('formbehavior.chosen');

if ($input->get('sticky')) {
	$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/sticky-kit.min.js');
}
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/jquery-ui.range.min.js');

if ($isRTL) {
	$doc->addStyleSheet(JUri::root(true) . '/components/com_jamegafilter/assets/css/jquery.ui.slider-rtl.css');
	$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/jquery.ui.slider-rtl.min.js');
}

$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/jquery.ui.datepicker.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/jquery.ui.touch-punch.min.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/jquery.cookie.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/script.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/libs.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/megafilter.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/main.js');
$doc->addScript(JUri::root(true) . '/components/com_jamegafilter/assets/js/dust-helpers.min.js');

JText::script('COM_JAMEGAFILTER_FROM');
JText::script('COM_JAMEGAFILTER_LOADING');