/*  /// WILL WORK PERFECT BUT NEED TO LOOK UP HOW TO SET WIDTH AND HEIGHT TO DOCUMENT
		/// && !important need to create a close button icon / link */
jQuery(document).ready(function() {
	jQuery(".1 p iframe").hide();
	jQuery(".1 a").click( function(e){
		jQuery(".1 p iframe").hide();
		jQuery(this).parent().parent().children('p').children('iframe').show();
		e.preventDefault();
	});
	jQuery("a.exit-overlay").click(function() {
	    jQuery("#exposeMask, #find-it").fadeOut();
	    jQuery("#exposeMask").remove();
	    return false;  
	});
	jQuery("#degrees, .degrees").hide();
	jQuery("a.degree-search").click( function () {
		jQuery("#find-it").addClass('overlay');
		jQuery('<div id="exposeMask" style="position: absolute; top: 0px; left: 0px; z-index: 9998; background-color: #fff; display: none; opacity: 0.8; "></div>').appendTo('body');
		var docHeight = jQuery(document).height();
		var docWidth = jQuery(document).width();
		jQuery(window).resize(function() {
		  docHeight = jQuery(document).height() + 'px';
		  docWidth = jQuery(document).width() + 'px';
		  jQuery('#exposeMask').css( { 'width' : docWidth, 'height' : docHeight} )
		});		  
		jQuery('#exposeMask').css( { 'width' : docWidth, 'height' : docHeight} );
		jQuery("#find-it, #exposeMask").fadeIn();
	
		
		return false;
	    });

/* /// Original Overlay plugin stuff

jQuery(document).ready(function() {
	jQuery("#exposeMask").click(function() {
	    jQuery("#exposeMask").fadeOut();
	    jQuery("#find-it").fadeOut();	  
	    jQuery("#exposeMask").remove();  
	});
	jQuery("#degrees, .degrees").hide();
	jQuery("a.degree-search").click( function () {
		jQuery("#find-it").overlay({
		
			// custom top position
			top: 260,
		
			// some mask tweaks suitable for facebox-looking dialogs
			mask: {
		
				// you might also consider a "transparent" color for the mask
				color: '#000',
		
				// load mask a little faster
				loadSpeed: 200,
		
				// very transparent
				opacity: 0.8
			},
		
			// load it immediately after the construction
			load: true
		
		});
		jQuery("#exposeMask").fadeIn();
		jQuery("#find-it").fadeIn();
		
		return false;
	    });
	  
	  */
			 
	jQuery("div.radio-grad").click( function () {
		jQuery(this).prop("checked", true);
		jQuery("input:radio[value='BA']").prop("checked", false);
		jQuery("#degrees, .degrees").fadeIn();
		
		});	
	jQuery("div.radio-undergrad").click( function () {
		jQuery(this).prop("checked", true);
		jQuery("input:radio[value='graduate']").prop("checked", false);
		jQuery("#degrees, .degrees").fadeOut();
		});
	
	jQuery("#au-la.twitter").tweet({
	  count: 1,
	  join_text: "auto",
	  username: "antiochla",
	  loading_text: "searching twitter...",
	  auto_join_text_default: "@AntiochLA said",
	  auto_join_text_ed: "@AntiochLA said",
    auto_join_text_ing: "@AntiochLA said",
    auto_join_text_reply: "@AntiochLA said",
    auto_join_text_url: "@AntiochLA said"
	});
	jQuery("#au-mw.twitter").tweet({
	  count: 1,
	  join_text: "auto",
	  username: "antiochmidwest",
	  loading_text: "searching twitter...",
	  auto_join_text_default: "@AntiochMidwest said",
	  auto_join_text_ed: "@AntiochMidwest said",
	  auto_join_text_ing: "@AntiochMidwest said",
	  auto_join_text_reply: "@AntiochMidwest said",
	  auto_join_text_url: "@AntiochMidwest said"
	});
	jQuery("#au-ne.twitter").tweet({
	  count: 1,
	  join_text: "auto",
	  username: "antiochneweng",
	  loading_text: "searching twitter...",
	  auto_join_text_default: "@AntiochNewEng said",
	  auto_join_text_ed: "@AntiochNewEng said",
	  auto_join_text_ing: "@AntiochNewEng said",
	  auto_join_text_reply: "@AntiochNewEng said",
	  auto_join_text_url: "@AntiochNewEng said"
	});
	jQuery("#au-sb.twitter").tweet({
	  count: 1,
	  join_text: "auto",
	  username: "antiochsb",
	  loading_text: "searching twitter...",
	  auto_join_text_default: "@AntiochSB said",
	  auto_join_text_ed: "@AntiochSB said",
	  auto_join_text_ing: "@AntiochSB said",
	  auto_join_text_reply: "@AntiochSB said",
	  auto_join_text_url: "@AntiochSB said"
	});
	jQuery("#au-se.twitter").tweet({
	  count: 1,
	  join_text: "auto",
	  username: "antiochseattle",
	  loading_text: "searching twitter...",
	  auto_join_text_default: "@AntiochSeattle said",
	  auto_join_text_ed: "@AntiochSeattle said",
	  auto_join_text_ing: "@AntiochSeattle said",
	  auto_join_text_reply: "@AntiochSeattle said",
	  auto_join_text_url: "@AntiochSeattle said"
	});
 	//aea programs
	jQuery("ul#aea-slider li#aea-programs").hover( function () {
		jQuery(this).children("div.slider-content").children(".caption").clearQueue().stop(true, true).delay(500).animate({ height: "125px", width: "620px" }, 1000 ).children(".info").clearQueue().stop(true, true).delay(1200).fadeIn();
	}, function () {
		jQuery(this).children("div.slider-content").children(".caption").clearQueue().stop(true, true).delay(500).animate({ height: "", width : "190px" }, 1000 ).children(".info").clearQueue().stop(true, true).fadeOut();
	});
	//aea fields of study
	jQuery("ul#aea-slider li#fields-of-study").hover( function () {
		jQuery(this).children("div.slider-content").children(".caption").clearQueue().stop(true, true).delay(500).animate({ height: "50px", width: "620px" }, 1000 ).children(".info").clearQueue().stop(true, true).delay(1200).fadeIn();
	}, function () {
		jQuery(this).children("div.slider-content").children(".caption").clearQueue().stop(true, true).delay(500).animate({ height: "", width : "190px" }, 1000 ).children(".info").clearQueue().stop(true, true).fadeOut();
	});
	
	//aea locations
	jQuery("ul#aea-slider li#aea-locations").hover( function () {
		jQuery(this).children("div.slider-content").children(".caption").clearQueue().stop(true, true).delay(500).animate({ height: "105px", width: "620px" }, 1000 ).children(".info").clearQueue().stop(true, true).delay(1000).fadeIn();
	}, function () {
		jQuery(this).children("div.slider-content").children(".caption").clearQueue().stop(true, true).delay(500).animate({ height: "", width : "190px" }, 1000 ).children(".info").clearQueue().stop(true, true).fadeOut();
	});
//  jQuery(".menu-header2 ul#menu-main-navigation li #mega-menu div.mega-container").hide();
  jQuery(".menu-header2 ul#menu-main-navigation > li").hover( function () {
    jQuery(this).children("#mega-menu").css("z-index","500");
    jQuery(this).children("#mega-menu").clearQueue().stop(true, true).delay(400).slideDown(800, function () { 
   // jQuery(this).children("div.mega-container").fadeIn("fast");  
    });    
  }, function () {
    jQuery(this).children("#mega-menu").css("z-index","200");
    jQuery(this).children("#mega-menu").clearQueue().stop(true, true).slideUp();
  //  jQuery(".menu-header2 ul#menu-main-navigation li #mega-menu div.mega-container").clearQueue().stop(true, true).fadeOut("fast");
     });


  jQuery("#hidden-navigation").hide();
  jQuery(".navi").hide();
  jQuery("#hidden-navigation .close-this a").hide();
  jQuery("#open-close a").click(function () {
   jQuery("#open-close a").fadeToggle();
   jQuery("#hidden-navigation .close-this a").fadeToggle(); 
  	jQuery("#hidden-navigation").slideToggle("fast", function () {
  	  jQuery(".navi").fadeToggle();
  	});
  	
  	return false;
  });
  jQuery('#hidden-navigation .close-this a').click(function () {
    
    jQuery(".navi").fadeToggle(function () {
      jQuery("#hidden-navigation").slideToggle("fast");
       jQuery("#open-close a").fadeToggle(); 
    });
    jQuery("#hidden-navigation .close-this a").fadeToggle();
   
    return false;
  });
  
  jQuery('#aea-slider').kwicks({
  	min: 160,
  	spacing: 0,
  	duration: 1500,
  	easing: 'easeOutQuart'
  });
  jQuery('div.radio-grad, div.radio-undergrad').click( function () {
  	jQuery('select.degreeSelect option[selected]').removeAttr("selected");
  	jQuery("select.degreeSelect option[value='blank']").attr("selected", "selected");
  });
  jQuery('.slider-controls a').click(function () {
  	jQuery(this).add('a.active').removeClass('active').end();
  	jQuery(this).addClass('active');
  	sliderNum = jQuery(this).attr('rel');
 		sliderDiv = ".content-"+sliderNum;
		jQuery('.content-sliders div').hide();
  	jQuery(sliderDiv).fadeIn("slow");
  	return false;
  });
});
function log()
{ 
    if(arguments.length > 0)
    {

        // join for graceful degregation
        var args = (arguments.length > 1) ? Array.prototype.join.call(arguments, " ") : arguments[0];

        // this is the standard; firebug and newer webkit browsers support this
        try { 
            console.log(args);
            return true;
        } catch(e) {        
            // newer opera browsers support posting erros to their consoles
            try { 
                opera.postError(args); 
                return true;
            } catch(e) { }
        }

        // catch all; a good old alert box
        alert(args);
        return false;
    }
}
