// JavaScript Document

$(document).ready(function(){
						   
			var checker = false;
			var ielocate = false;
			
			var theApp = new RegExp('MSIE 7');

			ietarget = navigator.appVersion.match(theApp);
			ietarget = navigator.appVersion.match(theApp);

			if (ietarget == 'MSIE 7' || ietarget == 'MSIE 6'){
				
				ielocate = true;
			
			}

			$('.account').find('h3').append('<img class="closeButton" src="/images/closejpg.jpg" alt="CLOSE"/>');	
			
			$('.closeButton').bind('click', accordian);
			$('.closeButton').css('cursor', 'pointer').css('bottom', '.4em');

			function accordian(){
				
				if(checker == false){
				
					$(this).parent().next().slideUp(250);
					$(this).attr('src', '/images/openjpg.jpg');
					
					if(ielocate == true){
						
						
						
						$(this).css('margin-top', '-1.6em');
				
					}else{
				
						$(this).css('margin-top', '.25em');
						
					}
					
					$(this).css('position', 'relative');
				
					checker = true;
				
				} else {
					
					$(this).parent().next().slideDown(250);
					$(this).parent().next().find('table').css('width', '100%');
					$(this).attr('src', '/images/closejpg.jpg');
					
					if(ielocate == true){
						
						$(this).css('margin-top', '-2em');
						
					}else{
						
						$(this).css('margin-top', '-.1em');
						
					}

					$(this).css('position', 'static');
					
					checker = false;
					
				}
				

			}
						   
						   
						   
						   
});