jQuery(document).ready(function(){	
			
	$(document).ready(function(){
	$("#index #featured > ul").tabs({fx:
	 {opacity: "toggle"}}).tabs("rotate", 3000, true); });
		
	$(document).ready(function(){
	 $("div#thumbs img").click( function() {
		var thumburl = $(this).attr("src");
		var newurl = thumburl.replace("/thumbs", "");
		$("#colours").attr("src", newurl);
	 });
	});
	
	// Navigation
	
	$(document).ready(function(){
		$("#navigation li a.garage-a").css("background", "url(<?php bloginfo('template_url')?>/image/subnav_arrow.png) 95px 15px no-repeat");							   					   
		$("#subnav1").hide();
		
		$("#navigation li a").mouseover(function() {
			$("#subnav1").hide();
		});
			
		$("#navigation li a.garage-a").mouseover(function() {
			$("#subnav1").show();	
    	});
		
		$("#subnav1").mouseover(function() {
			$("#subnav1").show();	
    	});
		
		$("#navigation li a.garage-a").mouseout(function() {
			$("#subnav1").hide();	
    	});
		
		$("#subnav1").mouseout(function() {
			$("#subnav1").hide();	
    	});
	});

	$(document).ready(function(){
		$("#navigation li a.gates-a").css("background", "url(<?php bloginfo('template_url')?>/image/subnav_arrow.png) 52px 15px no-repeat");	
		$("#garage #navigation li a.garage-a").css("background", "url(<?php bloginfo('template_url')?>/image/navon.png) center no-repeat #2EBBCB");
		$("#gates #navigation li a.gates-a").css("background", "url(<?php bloginfo('template_url')?>/image/navon.png) center no-repeat #2EBBCB");				
				   
		$("#subnav2").hide();
		
		$("#navigation li a").mouseover(function() {
			$("#subnav2").hide();
		});
			
		$("#navigation li a.gates-a").mouseover(function() {
			$("#subnav2").show();	
    	});
		
		$("#subnav2").mouseover(function() {
			$("#subnav2").show();	
    	});
		
		$("#navigation li a.gates-a").mouseout(function() {
			$("#subnav2").hide();	
    	});
		
		$("#subnav2").mouseout(function() {
			$("#subnav2").hide();	
    	});
	});
	
	// Buckets
	
		$("#roller-door-bucket a").mouseover(function() {
			$("#roller-door-bucket").css("background", "url(<?php bloginfo('template_url')?>/image/roller-door-bucket-hover.jpg) no-repeat");
		});
		
		$("#roller-door-bucket a").mouseout(function() {
			$("#roller-door-bucket").css("background", "url(<?php bloginfo('template_url')?>/image/roller-door-bucket.jpg) no-repeat");
		});
		
		$("#awnings-bucket a").mouseover(function() {
			$("#awnings-bucket").css("background", "url(<?php bloginfo('template_url')?>/image/awnings-bucket-hover.jpg) no-repeat");
		});
		
		$("#awnings-bucket a").mouseout(function() {
			$("#awnings-bucket").css("background", "url(<?php bloginfo('template_url')?>/image/awnings-bucket.jpg) no-repeat");
		});
		
		$("#gate-bucket a").mouseover(function() {
			$("#gate-bucket").css("background", "url(<?php bloginfo('template_url')?>/image/gate-bucket-hover.jpg) no-repeat");
		});
		
		$("#gate-bucket a").mouseout(function() {
			$("#gate-bucket").css("background", "url(<?php bloginfo('template_url')?>/image/gate-bucket.jpg) no-repeat");
		});
	
		// Lightbox
		$(function() {
			$(".lightbox").lightbox();
		});
	
});
