// JavaScript Document
$(document).ready(function()
{
	$("#pagecontent h2.heading").wrapInner("<span onmouseover='accordionHover(this);'></span>");
	$('#commentsform .textbox, #wpcf .textbox').focus(function()
    {
		//console.log($.trim($(this).val())+" "+$(this).attr('rel'));
		if($.trim($(this).val())==$.trim($(this).attr('rel')))
			$(this).val('');	
	});
	$('#commentsform .textbox, #wpcf .textbox').blur(function()
    {
		if($.trim($(this).val())=='')
			$(this).val($(this).attr('rel'));	
	});
	
	//for portfolio effects
	$('.portfoliorow a').hover(
    function()
	{
		var imgObj=$(this).children('img');
		imgObj.animate({opacity:0},350);		
	},
	function()
	{
		var imgObj=$(this).children('img');
		imgObj.animate({opacity:1},350);
		
	});
	
	//for the accordion of the post page
	
	$("p.acccontent:gt(0)").hide();
	$("#pagecontent h2.heading span").mouseover(function()
	{
   		$(this).next("p.acccontent").slideDown(500).siblings("p.acccontent").slideUp("slow");
	});
});

	function accordionHover(obj)
	{
   		//console.log($(obj));
		$(obj).parent('h2').next("p.acccontent").slideDown(500).siblings("p.acccontent").slideUp("slow");
	}