'; });	var title, imageUrl, description, author, shortName, identifier, timestamp, summary, newsID, nextnews; var previousScroll = 0; $(window).scroll(function() { 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($(this).attr('data-title')); stitle = $(this).attr('data-title'); _sf_async_config.sections= $(this).attr('data-section'); _sf_async_config.authors= $(this).attr('data-author'); pSUPERFLY.virtualPage(prevLoc,$(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){ $('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');	_c = $(this).attr('data-status');	$('html head').find('title').text($(this).attr('data-title')); stitle = $(this).attr('data-title'); _sf_async_config.sections= 'gallery'; _sf_async_config.authors= ''; pSUPERFLY.virtualPage(prevLoc,$(this).attr('data-title')); //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"); stitle = nxtTitle; vimg = $(next_selector).attr("img"); 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);