/*
$('.tooltip').jHelperTip({
	trigger: 'hover', 
	source: 'attribute',
	attrName: 'title',
	opacity: 0.9,
	autoClose: true
});
*/

/*
$().showMenu({
	opacity: 0.8,
	query: '#rightmenu'
});
*/

$('#topheader .button .content a').click(function () {
	$('#topheader .container').slideToggle(600);
	return false;
});

$('#footer')
	.css('margin-top', $('#weblog-content').height() > $('#weblog-navigation').height() ? $('#weblog-content').height() : $('#weblog-navigation').height() + 'px')
	.css('display', 'block');

	
if (jQuery.browser['msie'] == true && jQuery.browser.version == '6.0') {
	$('#footer').css('margin-top', '20px');	
}

$('a[rel=external]').attr('target', '_blank');

$('.link').hover(function () {
	//$(this).css('background', '#F3F7FB');
	$(this)
		.css('background', '#E6F3FF');
}, function () {
	$(this).css('background', '#fff');
});

$('.linkdump ~ .linkdump').css('margin-top', '20px');

$('.comment .header .author').each(function () {
	if ($(this).children(0).html() == 'مجتبی دشتی نژاد') {
		$(this).children(0).removeAttr('target');
		$(this).parent().parent().removeClass('blue').addClass('pink');
	}
});

if (jQuery.browser['msie'] == false) {
	$('.comment .header').css('position', 'relative');
	$('.comment .header .number').each(function () {
		var i = 0;
		return function () {
			$(this).css('display', 'block');
			$(this).html(++i);
		}
	}());
}

$('#blogrolling .link a').removeAttr('title');

//dp.SyntaxHighlighter.HighlightAll('code', true, false);

/*
function linkdump(blog) {
	if (!blog || !blog.items) return;
	for (var i = 0, l = blog.items.length, t = ''; i < l; i++) {
		t += '<div class="link"><a rel="external" href="' + blog.items[i].alternate.href + '">' + blog.items[i].title + '</a></div>';
	}
	
	$('#blogroll').html(t);
}
*/