

$(document).ready(				  
	function() {
	RenderShowHide();	
}
);


function RenderShowHide(){
		i = 0;
		$("div[content = 'oppener']").each(											
			function()
			{ 			  
				i = i+1;
				$(this).children('a').css("cursor", "pointer");
				aText = $(this).children('a').html();

				if (aText)
				{	
				aText = aText.replace("[+] ", "");

				$(this).children('a').remove();
				$(this).children('div').attr("class", "PlusMinusContent");	
				$(this).children('div').children('br').remove();
				Content = $(this).children('div').html();		

				$(this).children('div').html('');
				$(this).children('div').append("<img src=\"/img/bg_plusminus_top.gif\"/>");
				$(this).children('div').append("<div class=\"PlusMinusContentInner\">"+Content+"</div>");
				$(this).children('div').append("<img src=\"/img/bg_plusminus_bottom.gif\"/>");				
				
				$(this).children('div').attr("rel", i);							
				$(this).before("<div class=Switch rev="+i+" onclick=Swither(this)><a>"+aText+"</a></div>");				
				$(this).children('a').html(aText);				
				}
			}
		);
		$("div[content = 'oppener']>div[class = 'PlusMinusContent']").hide();	
		$("div[class = 'PlusMinusContent']>br:first").remove();

		
		i = 0;
		$("div[content = 'oppenerPrice']").each(											
			function()
			{ 			  
				i = i+1;
				$(this).children('a').css("cursor", "pointer");
				aText = $(this).children('a').html();
				aText = aText.replace("[+] ", "");
				PriceText = $(this).children('p').html();
				
				$(this).children('p').remove();				
				$(this).children('a').remove();
				$(this).children('div').attr("class", "PlusMinusContent");	
				
				Content = $(this).children('div').html();				
				$(this).children('div').html('');
				$(this).children('div').append("<img src=\"/img/bg_plusminus_top.gif\"/>");
				$(this).children('div').append("<div class=\"PlusMinusContentInner\">"+Content+"</div>");
				$(this).children('div').append("<img src=\"/img/bg_plusminus_bottom.gif\"/>");				
				
				$(this).children('div').attr("rel", i);							
				$(this).before("<div class=\"Switch leftz\"  rev="+i+" onclick=Swither(this)><a>"+aText+"</a></div><div class=\"Price\"><span>"+PriceText+"</span></div>");				
				$(this).children('a').html(aText);				
			}
		);
		
	
		$("div[content = 'oppenerPrice']>div[class = 'PlusMinusContent']").hide();	
				$("div[content = 'oppenerPrice']").append('<div class=\"priceBorder\"></div>');	
		
		
}

function Swither(obj)
{
				
				c = $(obj).attr('rev');				
				if($("div[rel = '"+c+"']").css("display") == 'none')
				{
					$("div[rel = '"+c+"']").show();
					$(obj).css("background-position", "0px 0px");												
				}	
				else
				{
					
					$("div[rel = '"+c+"']").hide();
					$(obj).css("background-position", "0px -13px");		
					
				}
		

}



