(function(a){
	a(document).ready(function(){		
		function g(){
			switch(window.orientation){
				case 0:l=320;j=50;i=270;break;
				case -90:l=480;j=100;i=200;break;
				case 90:l=480;j=100;i=415;break;
				case 180:l=320;j=50;i=100;break
			}
			
		}																																																																																																																																																																																																																																																																																																																																																																																		 function q(b){window.location.assign(b)}
		function o() {
		   var b=window.innerHeight+window.pageYOffset+"px",r=window.innerHeight+ window.pageYOffset-45+"px";
		   a("#footer").css("top",b).show();
		   a("#footer").animate({top:r});
		}
		function s() {
			a("#footer").hide()
		}
		function p() {
			var b=window.innerHeight+window.pageYOffset+"px";
			a("#footer").animate({top:b});
			setTimeout(function(){a("#footer").remove()},200);
		}
		if((navigator.userAgent.toLowerCase().match("iphone")||navigator.userAgent.toLowerCase().match("ipod"))&& navigator.userAgent.toLowerCase().match("safari")){
			a("body").append('<div id="footer"> <div class="content"><a href="/iphone/index.html" id="noticias">Noticias </a><a href="/iphone/galerias.html" id="galeria">Galeria </a><a href="http://www.3tv.cl/iphone/" id="videos">Videos</a><a href="/iphone/blogs.html" id="blogs">Blogs</a><a href="/iphone/diario.html" id="papel">Papel Digital</a><a href="/iphone/indices.html" id="servicios">Servicios</a></div></div>');
			document.body.ontouchmove=function(){s()};
			document.body.ontouchend=function(){setTimeout(function(){o()},300)};
			setTimeout(function(){o()},2E3);
//			setTimeout(function(){p()},2E4);
		}
	})
}
)(jQuery);


window.addEventListener('load', function(){setTimeout(scrollTo, 0, 0, 1);}, false);
window.onload = function() {setTimeout(function(){window.scrollTo(0, 1);}, 100);}

