<!--//---------------------------------+
//  Developed by Roshan Bhattarai - Visit http://roshanbh.com.np for this script and more.
// --------------------------------->
$(document).ready(function(){
	//hide the all div except first one
	$('.msg_body:not(:first)').hide();
	//when the anchor is clicked      
	
	$("a.linkclass").click(function(){
		$('ul #filter li #firstCurrent').removeClass("current"); 
		$('ul #filter li').removeClass("current") ;
		//check weather the visible block and clicked link's block is same or different
		if($(this).attr("href")!="#"+$(".msg_body:visible").attr("id")){  
		  $($(this).parent().addClass('current')); 
          //$($(this).attr("href")).addClass('current');
		  //reduces the z-index and margin of left side increased and decreased by 400px and hide
		  $(".msg_body:visible").css("z-index","0").animate({marginLeft: "-=400px"},"200").animate({marginLeft: "+=400px"},"200").hide();
		  //increase the z-index of the new visible block 
		  $($(this).attr("href")).css("z-index","10").fadeIn(400);
	    };
	});
	
}); 

/*
$(document).ready(function()
{
	//hide the all div except first one
	$('.msg_body:not(:first)').hide();
	//when the anchor is clicked 
	$("a.linkclass").click(function()
    {
		//check weather the visible block and clicked link's block is same or different
		if($(this).attr("href")!="#"+$(".msg_body:visible").attr("id"))
		{
          //reduces the z-index and margin of left side increased and decreased by 400px and hide
		  $(".msg_body:visible").css("z-index","0").animate({marginLeft: "-=400px"},"200").animate({marginLeft: "+=400px"},"200").hide();
		  //increase the z-index of the new visible block 
		  $($(this).attr("href")).css("z-index","10").fadeIn(400);
	    }
	});
	
});
*/
