
$(document).ready(function() {

//	$('#cycle').cycle({
//		fx: 'fade'
//	});
	
	$('figure.gallery-item a').attr('rel','gallery');
	$('figure.gallery-item a[rel="gallery"]').fancybox();
	
	$(".ngg-gallery-thumbnail a").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false,
		'titlePosition' : 'over'
	});
	
	// Remove .slideshowlink generated by NextGen Gallery
	$('.slideshowlink').remove();

});


$(function() {
	$("ul.tabs").tabs(".panes > div");
});

$(function() {
	$(".home_scrollable").scrollable({vertical: true,circular:true}).autoscroll({interval:5000, autopause:false}).navigator();
});

$(function() {
	var accordiontabindex = 0;
	
	// STREET FURNITURE
    if ($("body").hasClass("page-id-28") || $("body").hasClass("parent-pageid-28")){accordiontabindex = 1;}
    // SMOKING SHELTERS
    else if ($("body").hasClass("page-id-30") || $("body").hasClass("parent-pageid-30")){accordiontabindex = 2;}
    // CANOPY STRUCTURES
    else if ($("body").hasClass("page-id-33") || $("body").hasClass("parent-pageid-33")){accordiontabindex = 3;}
    // RECYCLED PRODUCTS
    else if ($("body").hasClass("page-id-35") || $("body").hasClass("parent-pageid-35")){accordiontabindex = 4;}
    // BOLLARDS
    else {tmptabindex = 0;}
	
	$("#accordion").tabs("#accordion div.pane", {tabs: 'h3', effect: 'slide', initialIndex: accordiontabindex});
});
