$("img.op0").one('load',function(){$(this).addClass('op1')}).each(function(){if(this.complete)$(this).load()});function vscroll(selector){e=$(selector);$("html, body").animate({scrollTop:$(e).offset().top},1000)} function get_hash(param){return param.split("#")[1]} function col(selector,cols){e=$(selector);$(e).filter(function(index){return!(index%cols)}).addClass('first')} function goTop(e){var elem=$(e.target).closest(".boton-loader");if(elem.is(".noticia")){var pos=$('#main').position().top;$("html, body").animate({scrollTop:pos},"slow");return!1}else{$("html, body").animate({scrollTop:0},"slow");return!1}} function actualizarContenido(){$(".boton-loader").click(function(e){e.preventDefault();url_loader=$(this).attr('href');is_seccion=$(this).attr("data-menu");$.get(url_loader,function(data){$("#container > div").empty();window.history.pushState(null,null,url_loader);var content=$(data).contents().filter("#container > div");$("#container > div").html(content);actualizarContenido();goTop(e)}).fail(function(){window.location.href=url_loader})});window.onpopstate=function(event){event.preventDefault();var url_loader=window.location.href;$.get(url_loader,function(data){$("#container > div").empty();window.history.pushState(null,null,url_loader);var content=$(data).contents().filter("#container > div");$("#container > div").html(content);actualizarContenido()}).fail(function(){window.location.reload()})}};$(document).ready(function(){actualizarContenido()})