/* **************************************************************************************
 *                                                                                      *
 *  jquery.jhu.js                                                                       *
 *  JQUERY PLUGINS FOR JHU MUSEUMS SITE                                                 *
 *                                                                                      *
 *  b. Creative Group                                                                   *
 *                                                                                      *
 *  REQUIREMENTS:                                                                       *
 *  jquery.timers.js                                                                    *
 *                                                                                      *
 **************************************************************************************** */

/* SPLITMENU PLUGIN ///////////////////////////////////////////////////////////////////// */

jQuery.fn.splitmenu = function() {
  return this.each(function(){
    elem = $(this);
		
		if($('ul.split', elem).size() > 0) {
    	$('ul.split', elem).css('opacity', 0).css('top', -100);
	
			elem.mouseover(function(){
				$('ul.split', this).stop().animate({
					opacity: 1,
					top: 0
				}, 300, 'easeOutQuad');
			});
			
			elem.mouseout(function(){
				$('ul.split', this).stop().animate({
					opacity: 0,
					top: -100
				}, 'normal', 'easeInQuad');
			});	
    } else elem.click(function(){
			window.location = $('a', elem).attr('href');
		});
	}); 
};

/* ////////////////////////////////////////////////////////////////////////////////// END */

/* IEALPHA PLUGIN /////////////////////////////////////////////////////////////////////// */

/*
jQuery.fn.iealpha = function() {
	return $("*", this).each(function(){
		var imgURL = $(this).css("background-image");
		var imgURLLength = imgURL.length;
		
		if(imgURL != 'none' && imgURL.substring(imgURLLength - 5, imgURLLength - 2) == 'png'){
			$(this).css({
				background: "",
				filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='" + imgURL.substring(5, imgURLLength  - 2) + "')"
			});
		}
		
		if($(this).is("img") && $(this).attr("src").substring(imgURLLength - 5, imgURLLength - 2) == "png"){
			
			var original = $(this);
			var element = $("<input></input>");
			
			$(element).attr("title", original.attr("alt")).attr("disabled", "true").css({
				filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='" + el.getProperty('src') + "')",
				position: "relative",
				background: "transparent",
				padding: $(original).css("padding"),
				margin: $(original).css("margin"),
				border: $(original).css("border"),
				height: $(original).css("height"),
				width: $(original).css("width")
			});
			
			$(this).remove().before(element);
		}
	});
};
*/

/* ////////////////////////////////////////////////////////////////////////////////// END */