<?php

class Head_Libraries {

    protected static function _getView() {
        return new Zend_View();
    }

    public static function getFrontendCssLibs() {
	$bean = R::findOne('core', 'WHERE `attr` = \'template\'');
	
	    
        $view = static::_getView()->headLink()
		->appendStylesheet(Core_Module_Module::getInstance()->getAdminJSPath() . 'fancybox/jquery.fancybox.css')
		->appendStylesheet(Forms_Module_Module::getInstance()->getSiteCSSPath() . 'uniform.default.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getSiteCSSPath() . 'font-face.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getSiteCSSPath() . 'font-awesome.min.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getSiteCSSPath() . 'form.css')
                
                ->appendStylesheet(Core_Module_Module::getInstance()->getSiteCSSPath() . 'style.css');
	if($bean->value){
                $view->appendStylesheet(Core_Module_Module::getInstance()->getSiteCSSPath() . 'style-black.css');
	}
    }

    public static function getFrontendJsLibs() {
        static::_getView()->headScript()
                ->appendFile(Core_Module_Module::getInstance()->getSiteJSPath() . 'jquery-1.10.2.min.js')
                ->appendFile('https://maps.googleapis.com/maps/api/js?key=AIzaSyA1eKzYZkh8M-rRpB9On-t7Dv7uy8MFFyU&sensor=false')
		->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'fancybox/jquery.fancybox.pack.js')
		->appendFile(Forms_Module_Module::getInstance()->getSiteJSPath() . 'jquery.uniform.min.js')
		->appendFile(Forms_Module_Module::getInstance()->getSiteJSPath() . 'jquery.form.min.js')
                ->appendFile(Core_Module_Module::getInstance()->getSiteJSPath() . 'script.js');
    }

    public static function getBackendCssLibs() {
        static::_getView()->headLink()
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminCSSPath() . 'style.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminCSSPath() . 'skins/eppe.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminCSSPath() . 'uniform.default.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminCSSPath() . 'jquery.wysiwyg.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminCSSPath() . 'uniform.default.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminCSSPath() . 'blitzer/jquery-ui-1.10.3.custom.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminJSPath() . 'fancybox/jquery.fancybox.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminJSPath() . 'superfish/css/superfish.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminJSPath() . 'tree/themes/default/style.css')
                ->appendStylesheet(Core_Module_Module::getInstance()->getAdminFontfacePath() . 'fontface.css')
                ->appendStylesheet('https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css');
    }

    public static function getBackendJsLibs() {
        static::_getView()->headScript()
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'jquery-2.0.3.min.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'jquery-ui-1.10.3.custom.min.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'jquery.uniform.min.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'superfish/js/hoverIntent.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'superfish/js/superfish.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'floating-1.8.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'custom.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'ajax.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'spin.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'fancybox/jquery.fancybox.pack.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'messages.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'AjaxUpload.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'simple-ajax.js')
//                ->appendFile('/library/common/js/spin.js')
//                ->appendFile('/library/common/js/ajax.js')
                ->appendFile('/library/common/js/ajaxFormsClass.js')
//                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'jquery-sortable.js')
                ->appendFile(Core_Module_Module::getInstance()->getAdminJSPath() . 'plupload.full.min.js');
    }

}

?>
