$(function() {
	// Define Lightbox Areas
	$('.gallery-scarves a').attr({"rel":"lightbox[scarves]"}).lightBox();
	$('.gallery-wraps a').attr({"rel":"lightbox[wraps]"}).lightBox();
	$('.gallery-capes a').attr({"rel":"lightbox[capes]"}).lightBox();
	$('.gallery-home a').attr({"rel":"lightbox[home]"}).lightBox();
	
	// Colour list
	// Places spans between list elements for easy coloured-dot effect
	$('ul.colourlist li').wrapInner('<span></span>');
	
	// Superfish Dropdown Menus
	$('ul.sf-menu').superfish({
		delay: 200, 
		animation: {opacity:'show',height:'show'}, 
		speed: 'fast', 
		autoArrows:  false,
		dropShadows: true
	}); 
	
	// JCaption for slide-up captions
	$('.jcaption img').jcaption({
		copyStyle: true,
		animate: true,
		show: {height: "show"},
		hide: {height: "hide"}
	}); 
	
	// JCaption Fix for IE7
	if ( $.browser.msie ) {
	  if( $.browser.version = "7.0") {
		  $('.jcaption a').addClass('ie7fix');
	  }
	}
	
	// ImageFader
	// Requires #image-fader to be a UL. Will fade between LIs.
	$('#image-fader').innerfade({ 
		speed: 'slow', 
		timeout: 4000, 
		type: 'sequence', 
		containerheight: '360px'
	}); 
	
	// Gallery Tabs
	if ($('#tabs').length) { // Supress Errors in IE7
		$('#tabs').tabs();
	}
	
	// Gallery Menu Links to Effect Tabs on Same Page
	$('.gallery-dummy1').click(function() {
	    $("#tabs").tabs('select', 0);
    	return false;
	});
	$('.gallery-dummy2').click(function() {
	    $("#tabs").tabs('select', 1);
    	return false;
	});
	$('.gallery-dummy3').click(function() {
	    $("#tabs").tabs('select', 2);
    	return false;
	});
	$('.gallery-dummy4').click(function() {
	    $("#tabs").tabs('select', 3);
    	return false;
	});
}); 
