$(function () {
	
	var tabContainers = $('div#ajaxContent > div');
	tabContainers.hide().filter(':first').show();
	
	$('div#ajaxLinks ul li').click(function () {
		tabContainers.hide();
		tabContainers.filter("#" + $(this).attr("title")).show();
		$('div#ajaxLinks ul li').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
	
	var tabContainers2 = $('div#ajaxContent2 > div');
	tabContainers2.hide().filter(':first').show();
	
	$('div#ajaxLinks2 ul li').click(function () {
		tabContainers2.hide();
		tabContainers2.filter("#" + $(this).attr("title")).show();
		$('div#ajaxLinks2 ul li').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
			
	$('#wp-commentsbox ul li').filter(':last').css ("margin-bottom","0px");
			
	$('.prjList ul li').click(function () {
		$('.prjList ul li').removeClass('selected');
		$(this).addClass('selected');
		
		url   = $(this).find('.boxInfo h2 a').attr("href");
		title = $(this).find('.boxInfo h2 a').html()
		desc  = $(this).find('.boxInfo p.fdescription').html()
		auth  = $(this).find('.boxInfo p.fAuthor').html()
		img   = $(this).find('.boxInfo img').attr("src");
		
		output = '<h2 id="postHeading"><a href="' + url + '" title="' + title + '" rel="nofollow">' + title + '</a></h2>' +
		'<p id="postInfo">' + desc + '</p>' + 
		'<p id="postBy">' + auth + '</p>' + 
		'<p id="readMore"></p>';
		$("div#loadImageLoc").css({"background":'url(' + img +')', "background-position":"center bottom", "background-repeat":"no-repeat"});
		$("div#prjDesc").html(output);
		
		
	});
	
	
});
