$(document).ready(function() { 
    $('ul.sf-menu').superfish({
    	 	pathClass:     'bCrumb',
            delay:         500,                // the delay in milliseconds
												// that the mouse can remain
												// outside a submenu without it
												// closing
            animation:     {opacity:'show'},   // an object equivalent to first
												// parameter of jQuery’s
												// .animate() method
            speed:         'fast',
            autoArrows:    false  
    }); 
    $("ul.sf-menu a").removeAttr("title");
    $("div.images a").removeAttr("title");
	var slideFirst = true;
	var isIE = $.browser.msie;
    $('.slides .images').cycle({
		fx: 'fade',
	    timeout: 3500,
	    speed:   750,
	    pager:  '.tabs',
	    pause: true,
	    pagerAnchorBuilder: function(index, DOMelement) { return '<a href="#"></a>';},
	    before: function(currSlideElement, nextSlideElement, options, forwardFlag) {
	    	var text = $(currSlideElement).is("a")? $(currSlideElement).children('img').attr('alt'):currSlideElement.alt;
			if(!isIE && !slideFirst && text) $('#current_caption').html(text).fadeOut(750);
			else {
				$('#current_caption').html(text);
				slideFirst=false;
			}
	    },
	    after: function(currSlideElement, nextSlideElement, options, forwardFlag) {
	    	var text= $(nextSlideElement).is("a")? $(nextSlideElement).children('img').attr('alt'):nextSlideElement.alt;
	    	if(!slideFirst) {
	    		if(text && !isIE) $('#current_caption').html(text).fadeIn(500);
	    		else $('#current_caption').html(text);
	    	}
	    }
	});
    
    $('a[rel="lightbox"]').colorbox({
    	maxWidth: "95%",
    	maxHeight: "95%",
    	scalePhotos: true
    });
});
