






$(document).ready(function(){    		

	var showItem = $(".tabs").attr("id");
	//alert(showItem);
	
	var insert = $(".tx-mprtabs-pi1 h1").clone().appendTo(".tx-mprtabs-pi1 .tabs");
	
	insert.eq(0).attr("style","border-left: 1px solid #877;");
	
	insert.each(function (i) {
		
		
		// initially selected
		if (showItem == i){
			$(this).attr("class", "sel");
			
			$(".io").eq(i).attr("class", "io sel");
			var j = i+1;
			
			
			var cl = $(".io").eq(j).attr("class");
			
			if(cl == "io sec"){
			$(".io").eq(j).attr("class", "io sec sel");
			} else{
				$(".io").eq(j).attr("class", "io sel");	
			}
		
		
		}
		
		$(this).click(function(){
			
			$(".tabs h1").removeAttr("class");
			$(this).attr("class", "sel");
			
			$(".tc").hide();
			//$(".tc").eq(i).fadeIn("fast");
			$(".tc").eq(i).show();
		});
	});
	
	$(".tc.hide").hide();
	$(".tc .csc-header").hide();





	$(".long").hide();


	$(".openClose").click(function(){


		var attr = $(this).attr( "class" );

		if (attr == "openClose") {

			$(this).attr( "class", "openClose openCloseClose" );

			//$(this).parent().find(".long").slideDown("fast");
			$(this).parent().find(".long").show();

		} else {

			$(this).attr( "class", "openClose" );
			//$(this).parent().find(".long").slideUp("fast");
			$(this).parent().find(".long").hide();

		}

	});


});








