function test(pid)
{
	if(pid==30)
	{
		var slt = $("#ch1_30").is(':visible');
		if(slt)
		{
			var newid1 = "ch1_"+pid;
			var newid2 = "ch2_"+pid;
			$('#'+newid1).hide("slow");
			$('#'+newid2).hide("slow");
		}
		else
		{
			$('#ch1_45').hide("slow");
			var newid1 = "ch1_"+pid;
			var newid2 = "ch2_"+pid;
			$('#'+newid1).show("slow");
			$('#'+newid2).show("slow");
		}
		
	}
	else if(pid==45)
	{
		var slt = $("#ch1_45").is(':visible');
		if(slt)
		{
			
			$('#ch1_45').hide("slow");
		}
		else
		{
			var newid1 = "ch1_30";
			var newid2 = "ch2_30";
			$('#'+newid1).hide("slow");
			$('#'+newid2).hide("slow");
			$('#ch1_45').show("slow");
		}
	}
}
function testnext(pid)
{
	if(pid==30)
	{
		$('#ch1_45').hide("slow");
		var newid1 = "ch1_"+pid;
		var newid2 = "ch2_"+pid;
		$('#'+newid1).show("slow");
		$('#'+newid2).show("slow");
	}
	else if(pid==45)
	{
		var newid1 = "ch1_30";
		var newid2 = "ch2_30";
		$('#'+newid1).hide("slow");
		$('#'+newid2).hide("slow");
		$('#ch1_45').show("slow");
	}
}
$(document).ready(function() {

$(".wp-post-image").removeAttr('alt');
$(".wp-post-image").removeAttr('title');

/*$("li.open-child a").next("ul").hide();
$("li.open-child a").each(function(){
	$(this).click(function(){
						   alert("sfas");
   		//$("li.open-child a").valu();
		var tt = $(this).html();
		alert(tt);
		//if()
		$(this).next("ul").slideToggle();
	});
});*/


/*	$('li.open-child a').click(function() {


		
		  

	 	$(this).next("ul").slideUp('normal');
   

		if($(this).next().is(':hidden') == true) {

			$(this).next().slideDown('normal');
		 }
	 });

*/



// for blog visit
$(".widget-container ul li a").each(function(){
		if($(this).attr("href") == window.location){
		$(this).parent().addClass("active");
}
//middle 
$('.center-img > img').each(function(){
    //get img dimensions
    var h = $(this).height();
    var w = $(this).width();

    //get div dimensions
    var div_h =$('#imgContainer').height();
    var div_w =$('#imgContainer').width();

    //set img position
    this.style.top = Math.round((div_h - h) / 2) + 'px';
    this.style.left = '50%';
    this.style.marginLeft = Math.round(w/2) + 'px';
});
})


//	$("#image_rotate li:nth-child(7n)").addClass("na");
//	var imageLength = $("#image_rotate li").length;

//fadein

/*for(i=0; i<6; i++){
$('#image_rotate').innerfade({ 
		speed: 'slow', 
		timeout: 2000, 
		type: 'sequence', 

	});
}*/

//fadein 

$("#commentform input#author").focus(function(){
	if($(this).val()=="Name *"){
		$(this).val("");
	}
})

$("#commentform input#author").blur(function() {
		if($(this).val()==""){
		$(this).val("Name *");
	}
});


$("#commentform input#email").focus(function(){
	if($(this).val()=="Email *"){
		$(this).val("");
	}
})

$("#commentform input#email").blur(function() {
		if($(this).val()==""){
		$(this).val("Email *");
	}
});


$("#commentform textarea#comment").focus(function(){
	if($(this).val()=="Comment"){
		$(this).val("");
	}
})

$("#commentform textarea#comment").blur(function() {
		if($(this).val()==""){
		$(this).val("Comment");
	}
});


});
