jQuery.noConflict();
jQuery(document).ready(function() {
	
	/*jQuery('div#content div[id^=post]').each(function() { 
		var postId = jQuery(this).attr('id');
		jQuery('div#'+postId+' a[href$=".png"]').addClass('fancybox').attr('rel', postId);
		jQuery('div#'+postId+' a[href$=".gif"]').addClass('fancybox').attr('rel', postId);
		jQuery('div#'+postId+' a[href$=".jpg"]').addClass('fancybox').attr('rel', postId);
		jQuery('div#'+postId+' a[href$=".PNG"]').addClass('fancybox').attr('rel', postId);
		jQuery('div#'+postId+' a[href$=".GIF"]').addClass('fancybox').attr('rel', postId);
		jQuery('div#'+postId+' a[href$=".JPG"]').addClass('fancybox').attr('rel', postId)
	});
	
	jQuery('a.fancybox').fancybox({
		'overlayShow' : true,
		'hideOnContentClick': true
		});
	*/	
	jQuery('table tr').removeClass('odd even');
	jQuery('table tr:even').addClass('odd');
		
	jQuery('#comments-list .comment-meta').append(' <span class="meta-sep">|</span> <a class="reply" href="#reply">Reply</a>');
	
	jQuery('.reply').click(function() {
		var who = jQuery(this).parents('.comment').children('.comment-author').children('.fn').text();
		var where = jQuery(this).parents('.comment').attr('id');
		var replyTo = '<a href="#'+where+'">@'+who+':</a> ';
		var previousText = jQuery('textarea#comment').val();
		var previousTextLength = previousText.length;
		var newText = previousText + '\r\r' + replyTo;
		
		var commentForm = jQuery('form#commentform').clone(true);
		jQuery('div#respond, form#commentform').remove();
		commentForm.insertAfter(this);
		
		if ( previousTextLength != '0' ) { 
			jQuery('textarea#comment').focus().val(newText)
		} else {
			jQuery('textarea#comment').focus().val(replyTo)
		}
		
		return false;
	});

	jQuery('#menu ul li').each(function() {
		jQuery(this).hover(
			function() {
				jQuery(this).children('ul').slideDown(200).css('left', jQuery(this).position().left);
			},
			function() {
				jQuery(this).children('ul').hide();
			}
		);
	});
});
