'; });	var title, imageUrl, description, author, shortName, identifier, timestamp, summary, newsID, nextnews; var previousScroll = 0; $(window).scroll(function() { var scrolled = $(document).scrollTop(); var last = $(pager_selector).filter(':last');	var lastHeight = last.offset().top ;	st = $(layout).scrollTop(); //console.log("st:" + st); var currentScroll = $(this).scrollTop(); if (currentScroll > previousScroll){ _up = false; } else { _up = true; } previousScroll = currentScroll; //console.log("_up" + _up); var cutoff = $(window).scrollTop() + 64; //console.log(cutoff + "**"); $('div[id^="ar"]').each(function(){	//console.log($(this).attr("id") + "&&");	if($(this).offset().top + $(this).height() > cutoff){ //console.log(prevLoc + "##" + $(this).attr('data-url')); if(prevLoc != $(this).attr('data-url')){ //console.log("condition Match"); prevLoc = $(this).attr('data-url'); _p =$(this).attr("data-play"); _c = $(this).attr('data-status'); $('html head').find('title').text($(this).attr('data-title'));	//console.log(prevLoc); //history.pushState('' ,'', prevLoc); loadshare(prevLoc, 'V', _c); } return false; // stops the iteration after the first one on screen } }); if($('div[id^="jsp"]').length>0){ if(scrolled == scroll) { $('html head').find('title').text(headTitle); } $('div[id^="jsp"]').each(function(){	//console.log($(this).attr("id") + "&&");	if($(this).offset().top + $(this).height() > cutoff){ //console.log(prevSlide + "##" + $(this).attr('data-url')); if(prevSlide != $(this).attr('data-url')){ //console.log("condition Match"); prevSlide = $(this).attr('data-url'); var datatitleval = $.trim($(this).find("img").attr('data-title')); if(datatitleval !== null && datatitleval !== undefined && datatitleval!='') { $('html head').find('title').text(datatitleval); } else { var datatitlevalh = $.trim($('h1.photo-h').text()); $('html head').find('title').text(datatitlevalh); } //console.log(prevSlide); //history.pushState('' ,'', prevSlide); loadshare(prevSlide, 'G', _c); } return false; // stops the iteration after the first one on screen } }); } if(lastHeight + last.height() < $(document).scrollTop() + $(window).height()){ //console.log("**get"); url = $(next_selector).attr('href'); x=$(next_selector).attr('id'); nxtTitle = $(next_selector).attr("title"); nxtHead = $(next_selector).attr("head"); stats = $(next_selector).attr("status"); ////console.log("x:" + x + " stats:" + stats + " nxtTitle:" + nxtTitle); //handle.autopager('load'); } //lastoff = last.offset(); //console.log("**" + lastoff + "**");	}); var prev_content_height = $(content_selector).height(); //$(function() { var layout = $(content_selector);	var st = 0;	///}); } } }); /*} };*/ })(jQuery);