<?php
/**
 * @package     SP Soccer
 * @author      JoomShaper http://www.joomshaper.com
 * @copyright   Copyright (C) 2010 - 2016 JoomShaper. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die('Restricted access');

//include helper file
JLoader::register('SpsoccerHelper', JPATH_COMPONENT . '/helpers/helper.php');

//Joomla Component Helper & Get Soccer Params
jimport('joomla.application.component.helper');
$params = JComponentHelper::getParams('com_spsoccer');

//includes js and css
$doc = JFactory::getDocument();
$doc->addStylesheet( JURI::root(true) . '/components/com_spsoccer/assets/css/spsoccer-structure.css' );
$doc->addStylesheet( JURI::root(true) . '/components/com_spsoccer/assets/css/soccer-font.css' );

if ($params->get('load_style', 1)) {
	$doc->addStylesheet( JURI::root(true) . '/components/com_spsoccer/assets/css/spsoccer-style.css' );
}

// Load FOF
include_once JPATH_LIBRARIES.'/fof/include.php';
if(!defined('FOF_INCLUDED')) {
	JError::raiseError ('500', 'FOF is not installed');
	return;
}

FOFDispatcher::getTmpInstance('com_spsoccer')->dispatch();
