<?php

global $eptima_lite_themename;
global $eptima_lite_shortname;

/************************************************
*  ENQUQUE CSS AND JAVASCRIPT
************************************************/
//ENQUEUE STYLE FOR IE BROWSER
function eptima_lite_IE_enqueue_scripts() {
	global $is_IE;
	if($is_IE ) {
		if ( !is_admin() ) {
			wp_register_style( 'ie-style', get_template_directory_uri().'/css/ie-style.css', false, $theme->Version );
			wp_enqueue_style( 'ie-style' );
			wp_register_style( 'awesome-theme-stylesheet', get_template_directory_uri().'/css/font-awesome-ie7.css', false, $theme->Version );
			wp_enqueue_style( 'awesome-theme-stylesheet' );
		}
	}
}
add_action( 'wp_enqueue_scripts', 'eptima_lite_IE_enqueue_scripts' );


//ENQUEUE FRONT SCRIPTS
function eptima_lite_theme_stylesheet()
{
	global $eptima_lite_themename;
	global $eptima_lite_shortname;
	if ( !is_admin() ) 
	{
		$theme = wp_get_theme();
		wp_enqueue_script('eptima_lite_componentssimple_slide', get_template_directory_uri() .'/js/custom.js',array('jquery'),'1.0',1 );
		wp_enqueue_script("comment-reply");
		wp_enqueue_script('eptima_lite_hoverIntent', get_template_directory_uri().'/js/hoverIntent.js',array('jquery'),true,'1.0');
		wp_enqueue_script('eptima_lite_superfish', get_template_directory_uri().'/js/superfish.js',array('jquery'),true,'1.0');
		wp_enqueue_script('eptima_lite_AnimatedHeader', get_template_directory_uri().'/js/cbpAnimatedHeader.js',array('jquery'),true,'1.0');
		wp_enqueue_script('eptima_lite_waypoints',get_template_directory_uri().'/js/waypoints.js',array('jquery'),'1.0',true );
		
		wp_enqueue_style( 'eptima-lite-style', get_stylesheet_uri() );
		wp_enqueue_style('eptima-lite-animation-stylesheet', get_template_directory_uri().'/css/eptima-lite-animation.css', false, $theme->Version);
		wp_enqueue_style( 'eptima-lite-awesome-theme-stylesheet', get_template_directory_uri().'/css/font-awesome.css', false, $theme->Version);
		
		/*SUPERFISH*/
		wp_enqueue_style( 'eptima-lite-ddsmoothmenu-superfish-stylesheet', get_template_directory_uri().'/css/superfish.css', false, $theme->Version);
		wp_enqueue_style( 'eptima-lite-bootstrap-responsive-theme-stylesheet', get_template_directory_uri().'/css/bootstrap-responsive.css', false, $theme->Version);
		
		/*GOOGLE FONTS*/
		wp_enqueue_style( 'googleFontsopensans','//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700', false, $theme->Version);
		wp_enqueue_style( 'googleFontsgreatvibs','//fonts.googleapis.com/css?family=Great+Vibes', false, $theme->Version);
	}
}
add_action('wp_enqueue_scripts', 'eptima_lite_theme_stylesheet');

function eptima_lite_head() {
	global $eptima_lite_shortname;
	$eptima_lite_favicon = "";
	$eptima_lite_meta = '<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">'."\n";

	if(eptima_lite_get_option($eptima_lite_shortname.'_favicon')) {
		$eptima_lite_favicon = esc_url(eptima_lite_get_option($eptima_lite_shortname.'_favicon','bizstudio'));
		$eptima_lite_meta .= "<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"$eptima_lite_favicon\"/>\n";
	}
	echo $eptima_lite_meta;

	if(!is_admin()) {
		require_once(get_template_directory().'/includes/eptima-custom-css.php');
	} 
	}
	add_action('wp_head', 'eptima_lite_head');

//ENQUEUE FOOTER SCRIPT 
function eptima_lite_footer_script() {
	global $eptima_lite_shortname;
	
	?>
    <style type="text/css">
		#main{background:none;}
	</style>
    <?php
}
add_action('wp_footer', 'eptima_lite_footer_script');