function am_load_javascript()
{
    //Register external plugins
    wp_register_script('plugins', JSPATH . '/vendor/plugins.js', '', '1.0', true);
    // Register all scripts
    wp_register_script('main', JSPATH . '/main.js', array('jquery'), '1.0', true);
    // Google maps for maplace
    wp_register_script('google-maps', 'http://maps.google.com/maps/api/js?sensor=false&libraries=geometry&', array('jquery'), '3.7', true);
    // Localized Scripts
    // Slides Array
    wp_localize_script('main', 'am_slide_array', am_get_slides());
    // Pages data
    wp_localize_script('main', 'am_pages', am_get_post_data(am_get_post_ids('page')));
    // Testimonials
    wp_localize_script('main', 'am_testimonials', am_get_post_data(am_get_post_ids('testimonial')));
    // Ajax URL
    wp_localize_script('main', 'ajaxurl', admin_url('admin-ajax.php'));
    // Slider DOM
    wp_localize_script('main', 'am_files_variables', am_files_to_variables(array('content-slider.php', 'content-carousel.html')));
    // Enqueue wordpress js plugins
    wp_enqueue_script('underscore');
    wp_enqueue_script('google-maps');
    wp_enqueue_script('plugins');
    wp_enqueue_script('main');
}
echo esc_attr(get_bloginfo('name', 'display'));
?>
" rel="home"><?php 
bloginfo('name');
?>
</a> - Website by <a href="http://amayamedia.com" rel="external" title="Amaya Media">Amaya Media</a></p>
		</div>

	</footer>
	<!-- Dynamic scripts -->
	<script>
		<?php 
if (is_front_page()) {
    ?>
			// var slidesArray = JSON.parse('<?php 
    echo am_get_slides("json");
    ?>
');
		<?php 
}
?>
	</script>

	<?php 
wp_footer();
?>

	<script>
		
		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),