<?php
function mobile_default_add_scripts()
	{
		global $themeid;
		
		//Add support for 2.9 and 3.0 functions and setup jQuery for theme
		wp_enqueue_script("jquery");
		wp_enqueue_script( 'jquery-ui-draggable' );
				
		wp_enqueue_script( "jquery-touch", get_bloginfo("template_directory")."/scripts/jqtouch.js", array( "jquery" ) );
		
		wp_enqueue_script( "webb-app", OCMXMOBILEURL."/functions/web-app.js", array( "jquery" ) );		
		wp_enqueue_script( $themeid."-jquery", get_bloginfo("template_directory")."/scripts/".$themeid."_jquery.js", array( "jquery" ) );

		//Theme AJAX
		wp_localize_script( $themeid."-jquery", "ThemeAjax", array( "ajaxurl" => WP_PLUGIN_URL."/obox-mobile/admin-ajax.php" ) );
		wp_localize_script( "ocmx-jquery", "ThemeAjax", array( "ajaxurl" => WP_PLUGIN_URL."/obox-mobile/admin-ajax.php" ) );
		
		//AJAX Functions
		add_action( 'wp_ajax_nopriv_ocmx_comment-post', 'ocmx_comment_post'  );
		add_action( 'wp_ajax_ocmx_comment-post', 'ocmx_comment_post' );
		
		add_action( 'wp_ajax_nopriv_ocmx_load-posts', 'ocmx_load_more_posts');
		add_action( 'wp_ajax_ocmx_load-posts', 'ocmx_load_more_posts');
	}
?>