$(document).ready(function() {
   // Start jQuery goodness
   
		$(".jqzoom").jqueryzoom(); 
 
		// Shows the range dropdown when hovering over the range link
		
		// Speed and easing options
		var easeOutMethod = 'easeinout';
		var easeOutSpeed = 400;
		var easeInMethod = 'easeinout';
		var easeInSpeed = 400;
		
		//Shouldn't need changing now
		
		$('li.range span.fallback').removeClass('fallback').hide();
		
		$('li.range').hover(
			function() {
				$('#range_dropdown').queue( [ ] ).stop().animate({top: 110, height: 117}, easeOutSpeed, easeOutMethod);
			},function() {
				$('#range_dropdown').queue( [ ] ).stop().animate({top: 10, height:90}, easeInSpeed, easeInMethod);
			}
		);
		
		$('#range_dropdown').mouseover(										
			function(){
				$(this).queue( [ ] ).stop().animate({top: 110, height: 117}, 100);
				$('li.range a').queue( [ ] ).stop().css({opacity:1});
			}
		);
		$('#range_dropdown').mouseout(										
			function(){
				$(this).animate({top: 10, height:90}, easeInSpeed, easeInMethod);
				$('li.range a').animate({opacity: 0});
			}
		);

		// Control the fading in of each of the primary navigation items

		$('ul#navigation li a').css({opacity:0});

		$('ul#navigation li a').hover(
			function() {
				$(this).queue( [ ] ).stop().addClass('hover').animate({opacity: 1});
			},function() {
				$(this).animate({opacity: 0});
			}
		);
		
		// End navigation //
		
		// Login button //
		
		$('#login div').css({width: 0,opacity:0});
		
		function toggleopen(){
			$(this).toggleClass('open');
		}
		
		$('#login a.login_show').toggle(
			function(){
				$(this).next('div').queue( [ ] ).stop().animate({width: 337}, easeOutSpeed, easeOutMethod, toggleopen).animate({opacity:1});
			},
			function(){
				$(this).next('div').queue( [ ] ).stop().animate({opacity:0}).animate({width: 0}, easeOutSpeed, easeOutMethod, toggleopen);
			}
		);
		
		// END //

		$('.panel_content li a').css({opacity:0});
		
		$('.panel_content li a').mouseover(
													
			function(){
				$(this).stop().animate({opacity: 1});
			}
	
		);
		
		$('.panel_content li a').mouseout(
													
			function(){
				$(this).stop().animate({opacity: 0});
			}
	
		);
		
		//Distributors
		
		$('ul.shop').hide();
		
		$('a.viewShops').click (
			function() {
				$(this).parent('li').parent('ul').next('ul.shop').slideToggle('fast').siblings('ul.shop').slideUp('fast');
			}
		);
		
		//TABLE BORDER
		
		$('.specification tr th:first').addClass('first');
		$('.specification tr td:first').addClass('first');
		

 // End jQuery goodness
});
