/*
function toggle( targetId, ports ){

	port = 'p_' + targetId;
	link = 'p_link' + targetId;

	for (var i = 1; i <= ports; i++) {
		
		p_div = 'p_' + i;
		p_link = 'p_link' + i;
	
		if (document.getElementById){
			target = document.getElementById( p_div );
			target.style.display = "none";
			
			target = document.getElementById( p_link );
			target.style.color = "#857A7A";
		}
	}
	
	
	if (document.getElementById){
	
		target = document.getElementById(port);
		target.style.display = "";

		target = document.getElementById(link);
		target.style.color = "#C30404";
	}
}
*/

function toggle_comments( targetId ) 
{
	if ($('#comment_box_'+targetId).is(":visible") == true)
	{
		// hide the box
		$('#comment_box_'+targetId).slideUp();
		$('.comment_toggle_link_'+targetId).text("View Comments");
		$('.comment_toggle_link_'+targetId).addClass("plus");
		$('.comment_toggle_link_'+targetId).removeClass("minus");

	}
	else
	{
		// show the box
		$('#comment_box_'+targetId).slideDown();
		$('.comment_toggle_link_'+targetId).text("Hide Comments");
		$('.comment_toggle_link_'+targetId).addClass("minus");
		$('.comment_toggle_link_'+targetId).removeClass("plus");
	}
	
}

function blog_archive_toggle()
{
	if ($('#blog_archive').is(":visible") == true)
	{
		// hide the box
		$('#blog_archive').slideUp();
		$('.blog_archive_toggle_link').text("Show more posts");
		$('.blog_archive_toggle_link').addClass("plus");
		$('.blog_archive_toggle_link').removeClass("minus");

	}
	else
	{
		// show the box
		$('#blog_archive').slideDown();
		$('.blog_archive_toggle_link').text("Hide posts");
		$('.blog_archive_toggle_link').addClass("minus");
		$('.blog_archive_toggle_link').removeClass("plus");
	}
}


$(document).ready(function() {
	$("#portfolio_scrollable").scrollable({size: 1}).navigator();
	$("#blog_archive").hide();
});