var ImageHtml = '';
function showBlock(className,obj) {
		$('.block').hide();
		$('#' + obj).siblings('a').removeClass('FatblackLink');
		$('#' + obj).addClass('FatblackLink');
		$('.' + className + ' span[rel=newtitle]').wrap('<strong></strong>').css({'font-size': '16px'});
		$('.' + className).show();
}

	$(function() {
		if($('[rel=blockmarker]').length > 0) {
			$.get("/wp-content/themes/chefer_std/dynamiskasidor.php", function(htmlData) {
				$('[rel=blockmarker]').replaceWith(htmlData);
				$('[rel=pretext]').replaceWith($('.block1').clone().end().remove());
			});
		}
		
		if($('.wp-caption').length > 0) {
			$('.wp-caption a').bind('click', function() {
/*
				var himg = new Image();
				himg.src = $(this).attr('href');
				$.modal('<img src="'+ $(this).attr('href') +'" border="0" />', {
					'onOpen': function(dialog) {
						dialog.overlay.fadeIn(function() {
							dialog.container.css({ 'height': himg.height + 'px','width': himg.width + 'px', 'margin-left': '-' + eval(himg.width / 2) + 'px', 'margin-top': '-' + eval(himg.height / 2) + 'px'});
							dialog.container.fadeIn(function() {
								dialog.data.show();
							});
						});
					},
					'onClose': function() { $.modal.close(); }
				});
*/
				return false;
			});
			$('.wp-caption').each(function() {
				$('.wp-caption-text', this).remove();
				$(this).clone(true).appendTo($('.images'));
				$(this).remove();
			});
		} else {
			$('.images').remove();
			$('.entry').addClass('entry2');
		}
	});
