/*
Theme Name: PyWordPress Default
Theme URI: http://liguangming.com/
Description: The default PyWordPress theme.
Version: 1.0
Author: Ian Lee
Author URI: http://liguangming.com/
Tags: green, singel column

	Simple v1.0
	http://liguangming.com/

	This theme was designed and built by Ian Lee,
	whose blog you will find at http://liguangming.com/

	The CSS, XHTML and design is released under GPL:
	http://www.opensource.org/licenses/gpl-license.php

*/
$(document).ready(function(){
	$('a.reply-btn').click(function(){
		var id = this.id.replace('reply-btn-','');
		$('#comment-'+id).append($('#comment-form'));
		$('#comment_parent').val(id);
		return false;
	});

	$('.cancel-reply').click(function(){
		$('#comment-field').append($('#comment-form'));
		$('#comment_parent').val(0);
		return false;
	});

	$('a.to-reply').click(function(){
		$('.hightlight-reply').removeClass('hightlight-reply')
		var id = this.getAttribute('href').match(/#(.+?)$/);
		var d = document.getElementById(id[1]);
		d.scrollIntoView();
		d.className='comment-list hightlight-reply';
		return false;
	});

	if($.browser.msie && $.browser.version<7){
		$('.comment-title').hover(function(){
			$(this).find('span.reply').css('display','block');
		},function(){
			$(this).find('span.reply').css('display','none');
		});
	};

	window.setTimeout(function(){
		$('.message').hide('slow');
	},2000);
});