$(document).ready(function(){
	$('img#ONESTAT_TAG').attr("style","margin-left:6px;opacity:.1;filter:alpha(opacity:10);");

	$('abbr.published').each(function(){
		tijd=$(this).attr("title");
		$(this).html(tijd);
		contents=$(this).html();
		contents=contents.replace(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}).*/img, "geplaatst op $3-$2-$1 om $4:$5");
		$(this).html(contents);
	});
	
	$("a:not([href^='http://oompa'])").attr('target','_blank');
	
	
	$('.post-comment-link').attr("title","plaats een reactie");
	
	$("img[src='http://img1.blogblog.com/img/icon18_wrench_allbkg.png']").css({"width":"12px","height":"12px"});
	
	$("#LinkList1").find("div[class='clear']").removeClass("clear").css("display","inline");
	$("#LinkList1").find(".widget-item-control").css("display","inline!important");
	
	
	$('p,.post-body').each(function(){
		subject = $(this).html();
		// SMILIES
		subject = subject.replace(/(\|:\()/mg, '<img class="smile" src="http://i.fokzine.net/s/frusty.gif" width="30" height="15" />');
		subject = subject.replace(/(:\))/mg, '<img class="smile" src="http://i.fokzine.net/s/smile.gif" width="15" height="15" />');
		subject = subject.replace(/(:\-\))/mg, '<img class="smile" src="http://i.fokzine.net/s/smile.gif" width="15" height="15" />');
		subject = subject.replace(/(;\))/mg, '<img class="smile" src="http://i.fokzine.net/s/wink.gif" width="15" height="15" />');
		subject = subject.replace(/(;\-\))/mg, '<img class="smile" src="http://i.fokzine.net/s/wink.gif" width="15" height="15" />');
		subject = subject.replace(/(:\()/mg, '<img class="smile" src="http://i.fokzine.net/s/frown.gif" width="15" height="15" />');
		subject = subject.replace(/(:[D])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/biggrin.gif" width="15" height="15" />$2');
		subject = subject.replace(/(:'\()/mg, '<img class="smile" src="http://i.fokzine.net/s/cry.gif" width="15" height="15" />');
		subject = subject.replace(/(:[P])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/puh2.gif" width="15" height="15" />$2');
		subject = subject.replace(/(:\{)/mg, '<img class="smile" src="http://i.fokzine.net/s/nosmile.gif" width="15" height="15" />');
		subject = subject.replace(/(O\+)/mg, '<img class="smile" src="http://i.fokzine.net/s/heart.gif" width="15" height="15" />');
		subject = subject.replace(/(:\*)/mg, '<img class="smile" src="http://i.fokzine.net/s/puh.gif" width="15" height="15" />');
		subject = subject.replace(/(\*O\*)/mg, '<img class="smile" src="http://i.fokzine.net/s/static.gif" width="41" height="24" />');
		subject = subject.replace(/(:[N])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/nooo.gif" width="15" height="15" />$2');
		subject = subject.replace(/(:[Y])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/yes_new.gif" width="15" height="15" />$2');
		subject = subject.replace(/(:[X])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/shutup.gif" width="15" height="16" />$2');
		subject = subject.replace(/(:[O])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/yawnee.gif" width="15" height="15" />$2');
		subject = subject.replace(/(:[o])(\W)/mg, '<img class="smile" src="http://i.fok.nl/s/redface.gif" width="15" height="15" />$2');
		subject = subject.replace(/(:\@)/mg, '<img class="smile" src="http://i.fokzine.net/s/bloos.gif" width="15" height="15" />');
		subject = subject.replace(/(:\?)/mg, '<img class="smile" src="http://i.fokzine.net/s/confused.gif" width="19" height="15" />');
		subject = subject.replace(/(\_O\_)/mg, '<img class="smile" src="http://i.fokzine.net/s/worshippy.gif" width="29" height="15" />');
		subject = subject.replace(/(\_O\-)/mg, '<img class="smile" src="http://i.fokzine.net/s/worshippy.gif" width="29" height="15" />');
		subject = subject.replace(/(\^O\^)/mg, '<img class="smile" src="http://i.fokzine.net/s/thumbsup.gif" width="33" height="15" />');
		subject = subject.replace(/(:[W])(\W)/mg, '<img class="smile" src="http://i.fokzine.net/s/bye.gif" width="28" height="15" />$2');
		subject = subject.replace(/(O\-\))/mg, '<img class="smile" src="http://i.fokzine.net/s/hypocrite.gif" width="15" height="20" />');
		
		//alert(subject);
		$(this).html(subject);
	});
	
	$("#LinkList1").find("a").each(function(){
		var sourceurl=$(this).attr("href");
		targeturl=sourceurl.replace("http://mailto:jolanda@fok.nl/","mailto:jolanda@fok.nl?subject=oompaloompa");
		if(targeturl!=sourceurl){ $(this).removeAttr("target"); }
		$(this).attr("href",targeturl);
	});
	
});
 
