Libera Informazione TV: le notizie più viste delle settimana

Primo Piano
img

Flogosi acute delle alte vie respiratorie

img

Valutazione e trattamento del dolore nel bambino

img

Parto gemellare

Caricando...
jQuery(window).scroll(function() { /* var $h1 = jQuery("#post-307"); var window_offset = $h1.offset().top - jQuery(window).scrollTop(); */ /* var hT = jQuery('.post').offset().top, hH = jQuery('.post').outerHeight(), wH = jQuery(window).height(), wS = jQuery(this).scrollTop(); if (wS > (hT+hH-wH)){ jQuery("#current_element").val(jQuery('.post').index()); console.log(jQuery('.post').index()); // alert('you have scrolled to the h1!'); } */ /* if(jQuery(window).scrollTop() + jQuery(window).height() == jQuery(document).height()) { //alert(jQuery(".mainContent[loaded='false']").length); if(jQuery(".progressing").val() == "false" ) { if(jQuery(".mainContent[loaded='false']").length != 0) { jQuery(".progressing").val("true"); if(jQuery("#is_newuser").val() == "yes") { jQuery(".loader").css("display","block"); setTimeout(function(){ jQuery(".loader").css("display","none"); console.log(jQuery(".mainContent[loaded='false']:first").length + "First length"); if(jQuery(".mainContent[loaded='false']:first").length != 0) { jQuery(".mainContent[loaded='false']:first").css("display:block"); refElement1 = jQuery(".mainContent[loaded='false']:first"); refElement1.attr("loaded","true"); refElement1.css("display","block"); ChangeUrl('', refElement1.find(".hdn_post").attr("data-redirect")); console.log(refElement1.attr("id")); jQuery("#current_element").val(refElement1.attr("id")); refElement1.find(".hdn_post").attr("data-redirect"); jQuery(".progressing").val("false"); } }, 5000); } else{ //setTimeout(function(){ jQuery(".loader").css("display","none"); console.log(jQuery(".mainContent[loaded='false']:first").length + "First length"); if(jQuery(".mainContent[loaded='false']:first").length != 0) { jQuery(".mainContent[loaded='false']:first").css("display:block"); refElement1 = jQuery(".mainContent[loaded='false']:first"); refElement1.attr("loaded","true"); refElement1.css("display","block"); ChangeUrl('', refElement1.find(".hdn_post").attr("data-redirect")); console.log(refElement1.attr("id")); jQuery("#current_element").val(refElement1.attr("id")); refElement1.find(".hdn_post").attr("data-redirect"); jQuery(".progressing").val("false"); } //}, 2000); } } } } else{ var scrollPos = jQuery(document).scrollTop(); jQuery(".mainContent").each(function(){ refElement = jQuery(this); if(refElement.attr("loaded") == "true" ) { if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) { if(jQuery("#current_element").val() == refElement.attr("id") ) { } else{ ChangeUrl('', refElement.find(".hdn_post").attr("data-redirect")); jQuery("#current_element").val(refElement.attr("id")); refElement.find(".hdn_post").attr("data-redirect"); } } } }); } */ if(jQuery(window).scrollTop() + jQuery(window).height() == jQuery(document).height()) { } else{ var scrollPos = jQuery(document).scrollTop(); jQuery(".mainContent").each(function(){ refElement = jQuery(this); if(refElement.attr("loaded") == "true" ) { if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) { if(jQuery("#current_element").val() == refElement.attr("id") ) { } else{ ChangeUrl('', refElement.find(".hdn_post").attr("data-redirect")); jQuery("#current_element").val(refElement.attr("id")); refElement.find(".hdn_post").attr("data-redirect"); } } } }); } }); function ChangeUrl(page, url) { if (typeof (history.pushState) != "undefined") { var obj = { Page: page, Url: url }; history.pushState("", obj.Page, obj.Url); } else { alert("Browser does not support HTML5."); } } function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function checkCookie() { var user = getCookie("siteloaded"); if (user != "") { jQuery("#is_newuser").val("no"); } else { jQuery("#is_newuser").val("yes"); setCookie("siteloaded", "yes", 365); } }