<?php

/**
 * Output development JavaScript.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @package fusionLib
 * @copyright Copyright (c) 2011 - 2016 fusionLib. All rights reserved.
 * @link http://fusionlib.com
 */

// Validation
if($this->requireValidator)
	$this->bodyJS->prepend('system/libs/js/src/fusionLib.validation.js');

// Core
if($this->requireCore) {
	if(!$this->useJQuery) {
		$this->headJS->prepend('system/libs/js/src/fusionLib.matchHeights.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.cookies.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.timers.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.utils.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.style.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.events.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.dom.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.ajax.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.js');
	} else {
		$this->headJS->prepend('system/libs/js/src/fusionLib.matchHeights.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.cookies.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.timers.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.utils.js');
		$this->headJS->prepend('system/libs/js/src/fusionLib.jQuery.js');
		$this->includeJQuery = true;
	}
}

if($this->includeJQuery)
	$this->headJS->prepend('system/app/js/jquery.min.js');
