$(document).ready(function() {
  jQuery.easing.def = 'easeOutBounce';
	$(".submenu").mouseenter(function(e){
		$(this).find("ul").slideDown(1000, function() {});
	});
	$(".submenu").mouseleave(function(e){
		$(this).find("ul").slideUp(500, function() {});
	});
	var boxen = [];
        //find all links w/ rel="lightbox[gallery_name]" or just rel="lightbox" it works both ways
        jQuery('a[rel*=lightbox]').each(function() {
        //push only unique lightbox[gallery_name] into boxen array
        if (jQuery.inArray(jQuery(this).attr('rel'),boxen)) boxen.push(jQuery(this).attr('rel'));
    });
    //for each unique lightbox group, apply the lightBox
    jQuery(boxen).each(function(i,val) { jQuery('a[rel='+val+']').lightBox(); });
});
