I'm trying to make a new design for a friend's Summer Cart system. The system usually has appearing/disappearing subcategory menus, but then I downloaded a javascript plugin called "lightbox" that shows an image in the current window while it keeps the page, instead of opening up a new window where to show the image. Now the problem is that this "lightbox" plugin has a file called "prototype.js" which causes the subcategories not to work...
Prototype.js: http://www.mediafire.com/?sj3xzdw2gchmca0
The code that makes the submenus appear/disappear:
$(function () {
var stepOver = 20; // The number of pixels of the upper box that are going to cover its parent.
$("#DropdownCategories ul li").hover(
function () {
var firstUls = $(this).find('ul:first');
firstUls.show();
var positionLeft = $(this).position().left - stepOver + $(this).outerWidth();
var offsetLeft = $(this).offset().left - stepOver + $(this).outerWidth();
// Find the position that the box is going to end in.
var wouldEnd = offsetLeft + firstUls.outerWidth();
// If the box ends out of the body we move the box on the left side.
if (wouldEnd > $('body').innerWidth()) {
positionLeft = $(this).position().left - firstUls.outerWidth() + stepOver;
}
firstUls.css('position', 'absolute')
.css('top', $(this).position().top + 'px')
.css('left', positionLeft + 'px');
},
function () {
$(this).find('ul:first').hide();
}
);
});
The actual website: http://www.sladurko.com/product/277/bluza-kas-rakav.html