');
nnr++;
/* STARTSIDA + PORTALSIDOR - HELA YTAN XX */
$('#primaryBlocks div.teaser').each(function(forekomst) {
var innehall='';
var newcontent='';
var innehall=$(this).html();
$(this).addClass('lyssna'+nnr);
$(this).before('
');
nnr++;
});
// LÄGG TILL SPELARE PÅ SIDOSPALT PÅ INBÄDDADE TJÄNSTER
$('.externalContent #secondaryBlocks').each(function(sidospalt) {
$(this).addClass('lyssna'+nnr);
$(this).prepend('
');
nnr++;
});
/* ARTIKELSIDOR - HELA YTAN XX */
$('#article').each(function() {
var innehall='';
var newcontent='';
//OM SIDAN ÄR INBÄDDAD TJÄNST => LÄGG INTE TILL NÅGON SPELARE
// var classes = $(this).closest('div').attr('class');
// if(classes.match(/externalContent/)){}
// else {
// MEN ANNARS...
$(this).prepend('
');
/* DÖLJ VID UPPSTART / AKTIVERA OM DET VAR DET */
$('.block.rs_preserve').toggle();
}
//------------------------
/*
// Create a Cookie for one week
createCookie('lyssna', 'aktiverad', 7);
// Read the cookie (note this will only work on the page loads after the cookie is created)
var myCookie = readCookie('lyssna');
console.log(myCookie); // Outputs: "The value of my cookie..."
// Erase the cookie (only works on page loads after the cookie was created)
eraseCookie('lyssna')
*/
//------------------------
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
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,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
// Read the cookie (note this will only work on the page loads after the cookie is created)
var myCookie = readCookie('lyssna');
if (myCookie == null) {
// do cookie doesn't exist stuff;
}
else {
$('a.lyssnaknapp').html("Stäng av Lyssna");
$('.rs_preserve').toggle();
// do cookie exists stuff
}
//console.log(myCookie); // Outputs: "The value of my cookie..."
$('#footer a.rsbtn_play span').attr('style','color:#000');
});
//]]>