jQuery.noConflict();

jQuery(function ($) {
	
	// Main menu	
	
	jQuery('#mainmenu ul.sf-menu').superfish({ 
		delay: 200,
		animation: {opacity:'show', height:'show'},
		speed: 'fast'
	});
	
	// Tabs
	
	jQuery(".tabs").tabs({ 
		fx: { opacity: 'toggle' } 
	});
    
    // jCarousel slider
	
	jQuery('#carousel-horiz').jcarousel({		
        scroll: 1
    });
    
    function mycarousel_initCallback(carousel) {
	    jQuery('#carousel-vert-next').bind('click', function() {
	        carousel.next();
	        return false;
	    });
	 
	    jQuery('#carousel-vert-prev').bind('click', function() {
	        carousel.prev();
	        return false;
	    });
	};
	
	jQuery('#carousel-vert').jcarousel({
        vertical: true,
        wrap: 'circular',
        scroll: 1,
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });
    
    // FancyBox
    
    jQuery('a[href$="jpg"], a[href$="png"], a[href$="gif"]').fancybox({		
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	
	// Grid Archive tooltips
	
	jQuery('#thumbgrid a, #featuredposts a').poshytip({
		className: 'tooltip',
		showTimeout: 5,
		hideAniDuration: 0,		
		alignTo: 'target',
		alignX: 'center',
		offsetY: 70,
		allowTipHover: true,
		fade: true,
		slide: true		
	});
	
});
