<?php
/**
* @package   ZOO Component
* @file      zoo.php
* @version   2.4.10 June 2011
* @author    YOOtheme http://www.yootheme.com
* @copyright Copyright (C) 2007 - 2011 YOOtheme GmbH
* @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

// load config
require_once(JPATH_ADMINISTRATOR.'/components/com_zoo/config.php');

// get ZOO app
$zoo = App::getInstance('zoo');

// init vars
$path = dirname(__FILE__);

// register paths
$zoo->path->register($path.'/assets', 'assets');
$zoo->path->register($path.'/controllers', 'controllers');

// add default js
$zoo->document->addScript('component.site:assets/js/default.js');

try {

	// load and dispatch application
	if ($application = $zoo->zoo->getApplication()) {
		$application->dispatch();
	}

} catch (AppException $e) {
	$zoo->error->raiseError(500, $e);
}