<?php
	class includes{
        static $fonts = array(
			'Arvo&v1' => 'http://fonts.googleapis.com/css?family=Arvo&v1',
			'Cousine&v1' => 'http://fonts.googleapis.com/css?family=Cousine&v1',
			'Quattrocento&v1' => 'http://fonts.googleapis.com/css?family=Quattrocento&v1',
			'Wire+One&v1' => 'http://fonts.googleapis.com/css?family=Wire+One&v1',
			'Forum&v1' => 'http://fonts.googleapis.com/css?family=Forum&v1',
			'Patrick+Hand&v1' => 'http://fonts.googleapis.com/css?family=Patrick+Hand&v1',
			'Love+Ya+Like+A+Sister&v1' => 'http://fonts.googleapis.com/css?family=Love+Ya+Like+A+Sister&v1',
			'Loved+by+the+King&v1' => 'http://fonts.googleapis.com/css?family=Loved+by+the+King&v1',
			'Bowlby+One+SC&v1' => 'http://fonts.googleapis.com/css?family=Bowlby+One+SC&v1',
			'Stardos+Stencil&v1' => 'http://fonts.googleapis.com/css?family=Stardos+Stencil&v1',
			'Varela&v1' => 'http://fonts.googleapis.com/css?family=Varela&v1',
			'Lobster+Two&v1' => 'http://fonts.googleapis.com/css?family=Lobster+Two&v1',
			'Hammersmith+One&v1' => 'http://fonts.googleapis.com/css?family=Hammersmith+One&v1',
			'Redressed&v1' => 'http://fonts.googleapis.com/css?family=Redressed&v1',
			'Lekton&v1' => 'http://fonts.googleapis.com/css?family=Lekton&v1',
			'Gravitas+One&v1' => 'http://fonts.googleapis.com/css?family=Gravitas+One&v1',
			'Asset&v1' => 'http://fonts.googleapis.com/css?family=Asset&v1',
			'Goblin+One&v1' => 'http://fonts.googleapis.com/css?family=Goblin+One&v1',
			'Aclonica&v1' => 'http://fonts.googleapis.com/css?family=Aclonica&v1',
			'Didact+Gothic&v1' => 'http://fonts.googleapis.com/css?family=Didact+Gothic&v1',
			'Maiden+Orange&v1' => 'http://fonts.googleapis.com/css?family=Maiden+Orange&v1',
			'Tenor+Sans&v1' => 'http://fonts.googleapis.com/css?family=Tenor+Sans&v1',
			'Jura&v1' => 'http://fonts.googleapis.com/css?family=Jura&v1',
			'Francois+One&v1' => 'http://fonts.googleapis.com/css?family=Francois+One&v1',
			'Paytone+One&v1' => 'http://fonts.googleapis.com/css?family=Paytone+One&v1',
			'Zeyada&v1' => 'http://fonts.googleapis.com/css?family=Zeyada&v1',
			'Monofett&v1' => 'http://fonts.googleapis.com/css?family=Monofett&v1',
			'Caudex&v1' => 'http://fonts.googleapis.com/css?family=Caudex&v1',
            /* 18.07.2011 */
			'Oswald&v1' => 'http://fonts.googleapis.com/css?family=Oswald&v1',
            'Sunshiney&v1' => 'http://fonts.googleapis.com/css?family=Sunshiney&v1',
            'Istok+Web&v1' => 'http://fonts.googleapis.com/css?family=Istok+Web&v1',
            'Bowlby+One&v1' => 'http://fonts.googleapis.com/css?family=Bowlby+One&v1',
            'Modern+Antiqua&v1' => 'http://fonts.googleapis.com/css?family=Modern+Antiqua&v1',
            'Give+You+Glory&v1' => 'http://fonts.googleapis.com/css?family=Give+You+Glory&v1',
            'Yeseva+One&v1' => 'http://fonts.googleapis.com/css?family=Yeseva+One&v1',
            'Carme&v1' => 'http://fonts.googleapis.com/css?family=Carme&v1',
            'Gentium+Basic&v1' => 'http://fonts.googleapis.com/css?family=Gentium+Basic&v1',
            'Black+Ops+One&v1' => 'http://fonts.googleapis.com/css?family=Black+Ops+One&v1',
            'Gloria+Hallelujah&v1' => 'http://fonts.googleapis.com/css?family=Gloria+Hallelujah&v1',
            'Delius&v1' => 'http://fonts.googleapis.com/css?family=Delius&v1',
            'Aubrey&v1' => 'http://fonts.googleapis.com/css?family=Aubrey&v1',
            'Ovo&v1' => 'http://fonts.googleapis.com/css?family=Ovo&v1',
            'Leckerli+One&v1' => 'http://fonts.googleapis.com/css?family=Leckerli+One&v1',
            'Modern+Antiqua&v1' => 'http://fonts.googleapis.com/css?family=Modern+Antiqua&v1',
            'Tienne&v1' => 'http://fonts.googleapis.com/css?family=Tienne&v1',
            'Istok+Web&v1' => 'http://fonts.googleapis.com/css?family=Istok+Web&v1',
            'Varela+Round&v1' => 'http://fonts.googleapis.com/css?family=Varela+Round&v1',
            'Annie+Use+Your+Telescope&v1' => 'http://fonts.googleapis.com/css?family=Annie+Use+Your+Telescope&v1',
            'Nothing+You+Could+Do&v1' => 'http://fonts.googleapis.com/css?family=Nothing+You+Could+Do&v1',
            'Swanky+and+Moo+Moo&v1' => 'http://fonts.googleapis.com/css?family=Swanky+and+Moo+Moo&v1',
            'Lora&v1' => 'http://fonts.googleapis.com/css?family=Lora&v1',
            'Give+You+Glory&v1' => 'http://fonts.googleapis.com/css?family=Give+You+Glory&v1',
            'Yeseva+One&v1' => 'http://fonts.googleapis.com/css?family=Yeseva+One&v1',
            'Podkova&v1' => 'http://fonts.googleapis.com/css?family=Podkova&v1',
            'Limelight&v1' => 'http://fonts.googleapis.com/css?family=Limelight&v1',
            'Maven+Pro&v1' => 'http://fonts.googleapis.com/css?family=Maven+Pro&v1',
            'Architects+Daughter&v1' => 'http://fonts.googleapis.com/css?family=Architects+Daughter&v1',
            'Open+Sans+Condensed&v1' => 'http://fonts.googleapis.com/css?family=Open+Sans+Condensed&v1',
            'Mako&v1' => 'http://fonts.googleapis.com/css?family=Mako&v1',
            'Muli&v1' => 'http://fonts.googleapis.com/css?family=Muli&v1',
            'Nova+Square&v1' => 'http://fonts.googleapis.com/css?family=Nova+Square&v1',
            'Ruslan+Display&v1' => 'http://fonts.googleapis.com/css?family=Ruslan+Display&v1',
            'Anton&v1' => 'http://fonts.googleapis.com/css?family=Anton&v1',
            'Miltonian&v1' => 'http://fonts.googleapis.com/css?family=Miltonian&v1',
            'Kreon&v1' => 'http://fonts.googleapis.com/css?family=Kreon&v1',
            'Nixie+One&v1' => 'http://fonts.googleapis.com/css?family=Nixie+One&v1',
            'Coda+Caption&v1' => 'http://fonts.googleapis.com/css?family=Coda+Caption&v1',
            'Play&v1' => 'http://fonts.googleapis.com/css?family=Play&v1',
            'Expletus+Sans&v1' => 'http://fonts.googleapis.com/css?family=Expletus+Sans&v1',
            'IM+Fell+French+Canon+SC&v1' => 'http://fonts.googleapis.com/css?family=IM+Fell+French+Canon+SC&v1',
            'Paytone+One&v1' => 'http://fonts.googleapis.com/css?family=Paytone+One&v1',
            'Brawler&v1' => 'http://fonts.googleapis.com/css?family=Brawler&v1',
            'Irish+Grover&v1' => 'http://fonts.googleapis.com/css?family=Irish+Grover&v1',
            'PT+Serif+Caption&v1' => 'http://fonts.googleapis.com/css?family=PT+Serif+Caption&v1',
            'PT+Serif&v1' => 'http://fonts.googleapis.com/css?family=PT+Serif&v1',
            'PT+Sans+Narrow&v1' => 'http://fonts.googleapis.com/css?family=PT+Sans+Narrow&v1',
            'Wallpoet&v1' => 'http://fonts.googleapis.com/css?family=Wallpoet&v1',
            'Cedarville+Cursive&v1' => 'http://fonts.googleapis.com/css?family=Cedarville+Cursive&v1',
            'IM+Fell+English+SC&v1' => 'http://fonts.googleapis.com/css?family=IM+Fell+English+SC&v1',
            'Lato&v1' => 'http://fonts.googleapis.com/css?family=Lato&v1',
            'Quattrocento+Sans&v1' => 'http://fonts.googleapis.com/css?family=Quattrocento+Sans&v1',
            'Sniglet&v1' => 'http://fonts.googleapis.com/css?family=Sniglet&v1',
            'Open+Sans&v1' => 'http://fonts.googleapis.com/css?family=Open+Sans&v1',
            'Geo&v1' => 'http://fonts.googleapis.com/css?family=Geo&v1',
            'Anonymous+Pro&v1' => 'http://fonts.googleapis.com/css?family=Anonymous+Pro&v1',
            'News+Cycle&v1' => 'http://fonts.googleapis.com/css?family=News+Cycle&v1',
            'Just+Another+Hand&v1' => 'http://fonts.googleapis.com/css?family=Just+Another+Hand&v1',
            'EB+Garamond&v1' => 'http://fonts.googleapis.com/css?family=EB+Garamond&v1',
            'Dancing+Script&v1' => 'http://fonts.googleapis.com/css?family=Dancing+Script&v1',
            'Shanti&v1' => 'http://fonts.googleapis.com/css?family=Shanti&v1',
            'Metrophobic&v1' => 'http://fonts.googleapis.com/css?family=Metrophobic&v1',
            'Syncopate&v1' => 'http://fonts.googleapis.com/css?family=Syncopate&v1',
            'Crimson+Text&v1' => 'http://fonts.googleapis.com/css?family=Crimson+Text&v1',
            'Orbitron&v1' => 'http://fonts.googleapis.com/css?family=Orbitron&v1',
            'Cuprum&v1' => 'http://fonts.googleapis.com/css?family=Cuprum&v1',
            'Cardo&v1' => 'http://fonts.googleapis.com/css?family=Cardo&v1',
            'Nobile&v1' => 'http://fonts.googleapis.com/css?family=Nobile&v1',
            'Inconsolata&v1' => 'http://fonts.googleapis.com/css?family=Inconsolata&v1',
            'IM+Fell+Double+Pica+SC&v1' => 'http://fonts.googleapis.com/css?family=IM+Fell+Double+Pica+SC&v1',
            'Neuton&v1' => 'http://fonts.googleapis.com/css?family=Neuton&v1',
            'Vollkorn&v1' => 'http://fonts.googleapis.com/css?family=Vollkorn&v1',
            'Indie+Flower&v1' => 'http://fonts.googleapis.com/css?family=Indie+Flower&v1',
            'Special+Elite&v1' => 'http://fonts.googleapis.com/css?family=Special+Elite&v1',
            'Fontdiner+Swanky&v1' => 'http://fonts.googleapis.com/css?family=Fontdiner+Swanky&v1',
            'Crushed&v1' => 'http://fonts.googleapis.com/css?family=Crushed&v1',
            'Bentham&v1' => 'http://fonts.googleapis.com/css?family=Bentham&v1',
            'IM+Fell+Great+Primer+SC&v1' => 'http://fonts.googleapis.com/css?family=IM+Fell+Great+Primer+SC&v1',
            'Coming+Soon&v1' => 'http://fonts.googleapis.com/css?family=Coming+Soon&v1',
            'Merriweather&v1' => 'http://fonts.googleapis.com/css?family=Merriweather&v1',
            'Cabin+Sketch&v1' => 'http://fonts.googleapis.com/css?family=Cabin+Sketch&v1',
            'Maiden+Orange&v1' => 'http://fonts.googleapis.com/css?family=Maiden+Orange&v1',
            'Tangerine&v1' => 'http://fonts.googleapis.com/css?family=Tangerine&v1',
            'UnifrakturMaguntia&v1' => 'http://fonts.googleapis.com/css?family=UnifrakturMaguntia&v1',
            'Homemade+Apple&v1' => 'http://fonts.googleapis.com/css?family=Homemade+Apple&v1',
            'Molengo&v1' => 'http://fonts.googleapis.com/css?family=Molengo&v1',
            'Walter+Turncoat&v1' => 'http://fonts.googleapis.com/css?family=Walter+Turncoat&v1',
            'Yanone+Kaffeesatz&v1' => 'http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz&v1',
            'Raleway&v1' => 'http://fonts.googleapis.com/css?family=Raleway&v1',
            'Bevan&v1' => 'http://fonts.googleapis.com/css?family=Bevan&v1',
            'PT+Sans+Caption&v1' => 'http://fonts.googleapis.com/css?family=PT+Sans+Caption&v1',
            'Josefin+Slab&v1' => 'http://fonts.googleapis.com/css?family=Josefin+Slab&v1',
            'Rock+Salt&v1' => 'http://fonts.googleapis.com/css?family=Rock+Salt&v1',
            'Kranky&v1' => 'http://fonts.googleapis.com/css?family=Kranky&v1',
            'Covered+By+Your+Grace&v1' => 'http://fonts.googleapis.com/css?family=Covered+By+Your+Grace&v1',
		);
		function load_css( ){
            /* admin panel ( options , meta-box ) */
            wp_register_style('settings', get_template_directory_uri() . '/lib/css/settings.css?v=0.2');
            
            wp_register_style('generic-fields', get_template_directory_uri() . '/lib/css/generic-fields.css?v=0.1');
            wp_register_style('meta-box', get_template_directory_uri() . '/lib/css/meta.box.css');
            wp_register_style('ui-slider', get_template_directory_uri() . '/lib/css/ui-slider.css');

            wp_register_style('font-awesome', get_template_directory_uri() . '/css/autoinclude/font-awesome.css');
            
            wp_enqueue_style( 'ui-lightness');
            wp_enqueue_style( 'ui-slider');
            wp_enqueue_style( 'settings' );
            wp_enqueue_style( 'generic-fields' );
            wp_enqueue_style( 'meta-box' );
            wp_enqueue_style('thickbox');
            wp_enqueue_style('font-awesome');
            

            /* shortcodes */
            wp_register_style('tabs', get_template_directory_uri() . '/lib/css/shcode/tabs.css' );
            wp_register_style('shcode_forms', get_template_directory_uri() . '/lib/css/shcode/style.css' );
            wp_register_style('columns', get_template_directory_uri() . '/lib/css/shcode/columns.css' );
            /* used in frontend / backend */
            wp_register_style('shortcode', get_template_directory_uri() . '/lib/css/shortcode.css' );

            wp_enqueue_style( 'tabs');
            wp_enqueue_style( 'shcode_forms');
            wp_enqueue_style( 'columns');
            wp_enqueue_style( 'shortcode');
            
            wp_enqueue_style( 'farbtastic' );
		}

        function load_js( ){

            if( is_admin() ){
                wp_register_script( 'extra' ,  get_template_directory_uri().'/lib/js/extra.js', array('jquery-ui-slider') );
                wp_enqueue_script( 'jquery-ui-sortable' );
                wp_enqueue_script( 'jquery-ui-slider' );
                wp_register_script( 'actions', get_template_directory_uri().'/lib/js/actions.js' , array( 'jquery' , 'media-upload' , 'thickbox' ) );
                wp_enqueue_script( 'jquery' );
                wp_enqueue_script('media-upload');
                wp_enqueue_script('thickbox');
                
                wp_register_script( 'autocomplete' ,  get_template_directory_uri().'/lib/js/jquery.autocomplete-min.js' );
                wp_enqueue_script( 'autocomplete' );
                
               	wp_register_script( 'meta' ,  get_template_directory_uri().'/lib/js/meta.js' );

                /* shorcodes */
                wp_register_script( 'button', get_template_directory_uri().'/lib/js/shcode/button.js');
                wp_register_script( 'tabs', get_template_directory_uri().'/lib/js/shcode/tabs.js');
				wp_register_script( 'columns_generator', get_template_directory_uri().'/lib/js/shcode/columns.js');

				wp_register_script( 'toggle', get_template_directory_uri().'/lib/js/shcode/toggle.js');

                wp_register_script( 'tabs_shcode', get_template_directory_uri().'/lib/js/shcode/tabs_shcode.js');
                wp_register_script( 'box', get_template_directory_uri().'/lib/js/shcode/box.js');
                wp_register_script( 'list', get_template_directory_uri().'/lib/js/shcode/list.js');
                wp_register_script( 'devider', get_template_directory_uri().'/lib/js/shcode/devider.js');
                wp_register_script( 'quote', get_template_directory_uri().'/lib/js/shcode/quote.js');
				wp_register_script( 'table' ,  get_template_directory_uri().'/lib/js/shcode/table.js' );
                

                $siteurl = get_option('siteurl');
                
                if( !empty($siteurl) ){
                    $farbtastic_url = rtrim( $siteurl , '/') . '/wp-admin/js/farbtastic.js' ;
                }else{
                    $farbtastic_url = home_url('/wp-admin/js/farbtastic.js');
                }

                wp_register_script( 'de_farbtastic' , $farbtastic_url);                
                wp_enqueue_script( 'de_farbtastic' );

				
                
                wp_enqueue_script( 'extra' );
                wp_enqueue_script( 'actions' );
				wp_enqueue_script( 'meta' );

                /* shortcodes */
                wp_enqueue_script( 'button' );
                wp_enqueue_script( 'tabs' );
				wp_enqueue_script( 'table' );
				wp_enqueue_script( 'columns_generator' );
				wp_enqueue_script( 'toggle' );

                wp_enqueue_script( 'tabs_shcode' );
                wp_enqueue_script( 'box' );
                wp_enqueue_script( 'list' );
                wp_enqueue_script( 'devider' );
                wp_enqueue_script( 'quote' );

            }
		}

        function fonts(){
			$result = array();
			foreach( self::$fonts as $title => $url ){
				$result[ $title ] = str_replace( '+' , ' ' , rtrim( $title , '&v1' ) );
			}

            ksort( $result );

			return $result;
		}
	}
?>