(function(window,document,$,URL,undefined)
{
	var i = {

		android	: navigator.userAgent.toLowerCase().indexOf('android')!=-1,
		ipod	: navigator.userAgent.toLowerCase().indexOf('ipod')!=-1,
		ipad 	: navigator.userAgent.toLowerCase().indexOf('ipad')!=-1,
		iphone 	: navigator.userAgent.toLowerCase().indexOf('iphone')!=-1,
		isMobile: this.android || this.ipod || this.iphone,

		cargaAjax : function(datos)
		{
			/*
				data.url = url
				data.cFunction(c) = callbackFunctions,
				data.eFunction(e) = errorFunctions,
				data.datos 	   = all data
			*/
			$.ajax(datos.url, 
			{
				dataType: 'json',
				data: datos.datos,
				type: 'post',
				success: function(n) { datos.cFunction(n); },
				error: function(e) { datos.eFunction(e); } 
			});
		},
		
		initRAF: function()
		{
			window.requestAnimFrame = (function(){
			  return  window.requestAnimationFrame       ||
			          window.webkitRequestAnimationFrame ||
			          window.mozRequestAnimationFrame    ||
			          function( callback ){
			            window.setTimeout(callback, 1000 / 60);
			          };
			})();
		},

		init : function()
		{
			this.initRAF();	
		}
	};
	
	i.init();
})(window,document,jQuery,URL);