(function() { function getScript(src,cb) { var head = document.getElementsByTagName("head")[0]; var script = document.createElement("script"); script.type = "text/javascript"; script.language = "javascript"; script.src = src; script.onload = script.onreadystatechange = function () { script.onload = script.onreadystatechange = null; setTimeout(cb,2000); } head.appendChild(script); } function run($) { function splitMessage(message) { var html = ''; $(message).each( function () { html += this.value; } ); return html; }; function comment(c) { if(!c || !c.from) return; var h = c.highlightTime ? 'On' : 'Off'; var isNew = c.isNew ? ' new' : ''; var html ='
'; html +='
' +'
' +'
' +'
'+c.from.nick+'' +''+c.time+'
' // commentheader +'
'+splitMessage(c.content)+'
' +'
' +'
' // commentmsg +'
'; // comment return html; } function shareSpark(sparkid) { var shareUrl = ""; shareUrl = document.location.href.split('#')[0] + "#showSpark_" + sparkid; shareUrlEncoded = encodeURIComponent(shareUrl); $('.sharebox').remove(); var sparkdiv = $('#showSpark_' + sparkid + ' .sparkshare'); var sharediv = '
'; sharediv += 'x'; //sharediv += '
'; sharediv += '

Share this spark

'; sharediv += '
Kopioi tämä linkki ja lähetä ystävällesi: '+shareUrl+'
'; //sharediv += '
From:
'; //sharediv += '
'; //sharediv += ''; //sharediv += '
'; //sharediv += '
To:
'; //sharediv += '
'; //sharediv += ''; //sharediv += ''; //sharediv += '
'; //sharediv += '
'; //sharediv += ''; //sharediv += '
'; sharediv += '
'; sharediv += 'Or share to: '; sharediv += 'Facebook'; sharediv += 'Twitter'; sharediv += '
'; // smshares sharediv += '
'; // sharebox sparkdiv.append(sharediv); } function addLink(input) { var name,size,link; if ( input.indexOf('http://') == 0) { //maybe LINK name = input; size = ''; link = input; } else if (input.indexOf('http://') != -1) { //possibly EMBED name = "EMBED"; size = ''; link = input; } else { alert('No link was found in entered text'); return; } $('
  • '+name+''+size+'Remove
  • ') .data('url',link) .appendTo('#_440345 ul.linkList'); }; function paging(url, pages, current) { if (pages <= 1) { return ''; } url += "&page="; var limit = 12; var prev = (current - 1) <= 0 ? 0 : current - 1; var next = (current + 1) >= pages ? pages : current + 1; var html = '
    '; var start = current - (limit/2); if (start < 0) start = 0; var end = current + (limit/2); if (end < limit) end = limit; if (limit > pages || end > pages) end = pages; if ((current - (limit/2) > 0) && pages > limit) { html += '...'; } for( var i = start; i < end; i++) { html += ''+(i+1)+''; } if (pages > end) { html += '...'; } html += '
    '; return html; } var colors = {"fontColor":"242424","linkColor":"","bgHeaderColor":"63aeeb","titleTextColor":"2e2e2e","width":"auto","pageSize":"10","titleColor":"aaaaaa","fontSize":"12px","sparking":false,"contentWidth":"auto","header":false,"bgColor":"ffffff","contentHeight":"auto","height":"auto","fontColorHeader":"","themeName":"Sparkbox blog","avatars":true,"titleLinkColor":"ffffff"}; var params = '?callback=list440345'; if (colors.pageSize) { params += '&pageSize='+colors.pageSize; } if (colors.contentWidth) { params += "&contentWidth="+colors.contentWidth; } if (colors.contentHeight) { params += "&contentHeight="+colors.contentHeight; } var anchor = document.location.href.split("#")[1]; if (anchor != undefined && anchor.substring(0,9) == "showSpark") { var sparkid = anchor.split("_")[1]; params += '&showSpark='+sparkid; url = 'http://www.sparkbox.biz:80/json/showSpark/13'+params; } else { url = 'http://www.sparkbox.biz:80/json/listGroup/13'+params; } var header = ''; if (colors.header) { header += '
    ' + '

    '+colors.themeName+'

    ' + '
    '; } var headerlinks = ''; if (colors.widgetMenu && colors.widgetMenu > 0) { headerlinks += ''; } var newspark = ''; $('script[src*=440345]').replaceWith('' + '