$(function() {
	
	// This will toggle the content under li's
	$("ol.faq a[href='#']").click(function() {
		$(this).siblings().slideToggle('fast');
		return false;
	});
	
	//Apply CSS class to all A links that end in .pdf
	$('a[href$=".pdf"]').addClass("pdf");
	
	//Add external link icon (http://www.learningjquery.com/2008/08/quick-tip-dynamically-add-an-icon-for-external-links)
	$('.extlinks a').filter(function() {
	return this.hostname && this.hostname !== location.hostname;
	}).after(' <img src="http://www.kansas.gov/businesscenter/img/icons/external.png" alt=""> ').attr('target','_blank').attr('title','opens in a new window');
	
	
		
		 
	

});
		 
	//Add external link icon (http://www.learningjquery.com/2008/08/quick-tip-dynamically-add-an-icon-for-external-links)
	//$('.extlinks a').filter(function() {
	//	return this.hostname && this.hostname !== location.hostname;
	//}).addClass('external').attr('target','_blank');

	// From Ed Bynum
	//$('#extlinks a').filter(function() {
	//($(this).attr('href').indexOf('http://www.kansas.gov') != -0) && ($(this).attr('href').indexOf('kansas.gov') != -0)
	//});

//	This is stuff from my header that I brought over from there to here.


//
//    $(document).ready(function()
//    {
//    $("li:has(ul)").hover(function()
//        {
//        $(this).children("ul").css("display", "none");
//        $(this).children("ul").slideDown("normal");
//        },
//     function()
//     {
//        $(this).children("ul").slideUp("fast");
//     });
//    })
// 
//
//
//
//    
//   $(function(){
//        $("li:has(ul)").hover(function(){
//            var ul = $(this).children("ul");   
//            
//            if(ul.is(":animated")){
//                ul.stop()
//                   .css("height", "auto")
//                   .slideDown("normal");
//            }
//            else{
//                ul.css("display", "none");
//                ul.slideDown("normal");}},
//        function(){
//            var ul = $(this).children("ul"); 
//            
//            if(ul.is(":animated")){
//              ul.stop()
//                .css("height", "auto")
//                .fadeOut("fast");
//            }
//            else{
//             ul.slideUp("fast");
//            }
//           
//        });
//   });



