function replace(search, replace, subject){ var ra = replace instanceof Array, sa = subject instanceof Array, l = (search = [].concat(search)).length, replace = [].concat(replace), i = (subject = [].concat(subject)).length; while(j = 0, i--) while(subject[i] = subject[i].split(search[j]).join(ra ? replace[j] || "" : replace[0]), ++j < l); return sa ? subject : subject[0]; } var bnzi = {"2":"
<\/div>new adriver(\"adriver_banner_1307045812\", {sid:201443, bt:52, bn:27});<\/scr'+'ipt>","4":"
<\/div>new adriver(\"adriver_banner_1307045812\", {sid:201443, bt:52, bn:27});<\/scr'+'ipt>"}; $(".scadv").each(function(){ var ThID = this.id.split("-")[1]; if (bnzi[ThID] !== undefined) { $(this).html(replace(["'+'", "\'"], ["", "'"], bnzi[ThID])); if (!$(this).is(":visible")) { $(this).css("display", ""); } if (!$("#bindpar-"+ThID).is(":visible")) { $("#bindpar-"+ThID).css("display", ""); } } });