jQuery(document).ready(function(){    	


	//login pop down
	/*			 						
		  jQuery(".popup").prepend(
				'<div class="loginlayer">'				
					+'<form name="aspnetForm" method="post" action="http://test.nursetesting.com:8000/esigtek/Default.aspx" id="aspnetForm">'
					+'<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />'
					+'<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />'
					+'<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTM5MzQ3ODY0MQ8WAh4LU2lnbmVyRW1haWxkZGR/SO/sVm/KoTAirXiv9NQWsr2G2w==" />'
					+'<span id="ctl00_mainContentPlaceHolder_lbError" style="color:Red;"></span>'
					+'<label for="ctl00_mainContentPlaceHolder_txtLogin" id="ctl00_mainContentPlaceHolder_lbLogin">E-Mail:</label>'
					+'<input name="ctl00$mainContentPlaceHolder$txtLogin" type="text" id="ctl00_mainContentPlaceHolder_txtLogin" class="text" />'
					+'<label for="ctl00_mainContentPlaceHolder_txtPassword" id="ctl00_mainContentPlaceHolder_lbPassword">Password:</label>'
					+'<input name="ctl00$mainContentPlaceHolder$txtPassword" type="password" id="ctl00_mainContentPlaceHolder_txtPassword" class="text" />'
					+'<input type="submit" name="ctl00$mainContentPlaceHolder$btnSubmit" value="Login" id="ctl00_mainContentPlaceHolder_btnSubmit" class="button" />'
					+'<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBQLikveuBAKglITGBALq0Lp0Aqfm8OYOAqKy44UCu7eeR1zScv5JCidjJe3G+S1Wc2Q=" />'
					+'</form>'														
				+'</div>'
				);
			
			jQuery(".logintoggle").append(
				'<span class="close loginclose">'
					+'<img src="/images/login-small.png" alt="login"/> '
					+'close'
				+'</span>'
			);
			jQuery(".logintoggle").append(
				'<span class="open">'
					+'<img src="/images/login-small.png" alt="login"/> '
					+'login'
				+'</span>'
			);
			jQuery(".loginlayer").hide();
			jQuery(".logintoggle .default").hide();
			jQuery(".logintoggle .close").hide();
									
				jQuery(".logintoggle .open").click(function(event){		
					jQuery(".loginlayer").slideDown(200);
					jQuery(".logintoggle .close").show();
					jQuery(".logintoggle .open").hide();      
					return false;
				});	 				
				
				jQuery(".loginclose").click(function(event){		
					jQuery(".loginlayer").slideUp(200);  
					jQuery(".logintoggle .open").show();
					jQuery(".logintoggle .close").hide();     
					return false;
				});	
				
				jQuery(".logintoggle").click(function(event){		    
					return false;
				});	
	   */
	   
	   //article / faq js
		var el = null;
		
		el = $(".article .thebody");
		if (el) el.hide();
		
		el = $("#container .article .toggle");
		if (el) el.append("<span class='bodytoggle'> <a class='show' href='' title='read the full answer'>[more &raquo;]</a> <a class='hide' href='' title='hide this answer'>[hide]</a></span>");
		
		el = $("#container");
		if (el) el.prepend("<a class='showall' href=''>show all answers</a> <a class='hideall' href=''>hide all answers</a>");
		
		el = $(".showall");
		if (el) el.show();
		
		el = $(".hideall");
		if (el) el.hide();
		
		el = $(".hide");
		if (el) el.hide();
		
		el = $("a.showall");
		if (el) el.click(function(event){
			$(this).hide();
			$("a.hideall").show();
			$("a.show").hide();
			$("a.hide").show();	
			$("#container .article .thebody").show();				          
			return false;
		});	 
			
		el = $("a.hideall");
		if (el) el.click(function(event){	
			$(this).hide();	
			$("a.showall").show();	
			$("a.show").show();
			$("a.hide").hide();	
			$("#container .article .thebody").hide();							          
			return false;
		});	
				
		el = $(".bodytoggle a");
		if (el) el.click(function(event){	
		  $(this).parents("span").children("a").show();
			$(this).hide();		
			$(this).parents(".article").children(".thebody").toggle();       
			return false;
		});	 
});
