$(document).ready(function() {
            $('#iWantTo ul').hide();
			$('#content p a img').parent().addClass('img');
	   		$("#container a[href$='pdf'], #container a.pdf").append(' <img class="ext" src="/SandySprings/media/layout/pdf.png" alt="PDF Document | Download Viewer Below"/>');
			$("#container a[href$='doc'],#container a[href$='aspx.doc'],#container a[href$='docx'],#container a[href$='aspx.docx']").append(' <img class="ext" src="/SandySprings/media/layout/doc.png" alt="DOC Document | Download Viewer Below"/>');
			$("#container a[href$='rtf']").append(' <img class="ext" src="/SandySprings/media/layout/rtf.png" alt="RTF Document | Download Viewer Below"/>');
			$("#container a[href$='txt']").append(' <img class="ext" src="/SandySprings/media/layout/txt.png" alt="TXT Document | Download Viewer Below"/>');
			$("#container a[href$='xls'],#container a[href$='aspx.xls'],#container a[href$='xlsx'],#container a[href$='aspx.xlsx']").append(' <img class="ext" src="/SandySprings/media/layout/xls.png" alt="XLS Document | Download Viewer Below"/>');
			$("#container a[href$='ppt'],#container a[href$='aspx.ppt'],#container a[href$='pptx'],#container a[href$='aspx.pptx']").append(' <img class="ext" src="/SandySprings/media/layout/ppt.png" alt="PPT Document | Download Viewer Below"/>');
			$("#container a[href^='mailto:']").append(' <img class="ext" src="/SandySprings/media/layout/email.png" alt="E-Mail"/>');
			$('.accordionForm div').hide();
			$('.accordionForm h3 a').click(function(){
			$('.accordionForm div').slideUp();
			$(this).parent().next().slideDown();
			return false;
		});

	   });

$(function(){
     $("#iWantTo li:first").hover(function(){
			$('ul:first',this).slideDown('slow');
		}, function(){
			$('ul:first',this).slideUp('slow');
		});
     $("#iWantTo li ul li:has(ul)").find("a:first").append("...");
	$("#iWantTo li:first li").hover(function(){
			$('ul:first',this).fadeIn();
		}, function(){
			$('ul:first',this).fadeOut();
			});
	});


$(function() {
		$(".accordion").accordion({
			active: false, autoHeight: false, collapsible: true
		});
	});



 $(document).ready(function() {    
   
     //select all the a tag with name equal to modal  
     $('a[name=modal]').click(function(e) {  
         //Cancel the link behavior  
         e.preventDefault();  
         //Get the A tag  
         var id = $(this).attr('href');  
       
         //Get the screen height and width  
         var maskHeight = $(document).height();  
         var maskWidth = $(window).width();  
       
         //Set height and width to mask to fill up the whole screen  
         $('#mask').css({'width':maskWidth,'height':maskHeight});  
           
         //transition effect       
         $('#mask').fadeIn(1000);      
         $('#mask').fadeTo("slow",0.6);    
       
         //Get the window height and width  
         var winH = $(window).height();  
         var winW = $(window).width();  
                 
         //Set the popup window to center  
         $(id).css('top',  winH/2-$(id).height()/2);  
         $(id).css('left', winW/2-$(id).width()/2);  
       
         //transition effect  
         $(id).fadeIn(2000);   
       
     });  
       
     //if close button is clicked  
     $('.window .close').click(function (e) {  
         //Cancel the link behavior  
         e.preventDefault();  
         $('#mask, .window').hide();  
     });       
       
     //if mask is clicked  
     $('#mask').click(function () {  
         $(this).hide();  
         $('.window').hide();  
     });           
       
 });  