$(function(){$(document).on('click','.feed-ajax-next, .feed-ajax-back',function(e){e.preventDefault();var htmlData=null;$.get($(this).attr('data-href'),function(data){htmlData=data;$('#feed-ajax-div').fadeOut(500,function(){$('#feed-ajax-div').html($(htmlData).html());updateThumbTitle();$('.feed-ajax-next, .feed-ajax-back').show();$('#feed-ajax-div').fadeIn(500);if(typeof imgFix!=='undefined'){imgFix();}});});});$(document).on('click','.channel-ajax-next, .channel-ajax-back',function(e){e.preventDefault();var htmlData=null;$.get($(this).attr('data-href'),function(data){htmlData=data;$('#channel-ajax-div').fadeOut(500,function(){$('#channel-ajax-div').html($(htmlData).html());updateThumbTitle();$('.channel-ajax-next, .channel-ajax-back').show();$('#channel-ajax-div').fadeIn(500);if(typeof imgFix!=='undefined'){imgFix();}});});});$(document).on('click','.channel-grid-next, .channel-grid-back',function(e){e.preventDefault();var htmlData=null;var parentDiv='.'+$(this).attr('data-parent');$.get($(this).attr('data-href'),function(data){htmlData=data;$(parentDiv+' .container').fadeOut(500,function(){$(parentDiv+' .container').html($(htmlData+' .container').html());updateThumbTitle();$(parentDiv+' .channel-grid-next, '+parentDiv+' .channel-grid-back').show();$(parentDiv+' .container').fadeIn(500);if(typeof imgFix!=='undefined'){imgFix();}});});});$(document).on('click','.feed-pagination a',function(e){e.preventDefault();var mainContainer=$(this).parent().parent();var htmlData=null;$.get($(this).attr('href'),function(data){htmlData=data;$(mainContainer).fadeOut(500,function(){$(mainContainer).html($(htmlData).html());updateThumbTitle();$(mainContainer).fadeIn(500);});});});$(document).on('mouseenter','.fbshare',function(e){var pos=$(this).offset();var width=$(this).outerWidth();$('#share-tooltip').css({top:(pos.top-$(window).scrollTop()-10)+'px',left:(pos.left-$('#share-tooltip').outerWidth())+'px'});$('#share-tooltip').fadeIn(250);}).on('mouseleave','.fbshare',function(e){$('#share-tooltip').fadeOut(250);});});var cntI=6;var nextItem=function(){if(typeof window.parent.postMessage!=='undefined'){parent.postMessage("encaction","*");}
if(typeof nextItemUrl!='undefined'){setInterval(function(){cntI-=1;$('.next-item-countdown').html('Starting in '+cntI+' seconds')
if(cntI==0){window.location=nextItemUrl;}},1000);}};var loadingComplete=function(){$('#item-loading').remove();}
var updateThumbTitle=function(){$('.thumb-title, .thumb-description').each(function(e){var title=$(this).html();if(title.length>150){title=title.substring(0,150)+'...';}
$(this).html(title);});}
var updateTitle=function(){}
$(function(){setInterval(function(){var i=0;$('img[ll-src]').each(function(e){i++;$(this).hide();$(this).attr('src',$(this).attr('ll-src'));$(this).removeAttr('ll-src');var ele=$(this);setTimeout(function(){ele.fadeIn(1000);},100*i);});},100);});updateThumbTitle();updateTitle();