// JavaScript Document
$(document).ready(function(){
	$("#slider").easySlider({
	speed: 800,
	auto: true,
	pause: 3000,
	continuous: false
	});
	/*
	$("#slider").easySlider({
		controlsBefore:	'<p id="controls">',
	controlsAfter:	'</p>',
		prevId: 'prevBtn2',
		nextId: 'nextBtn2'
	});
	*/
	$("#view_map").hide();
	$("#products-cat").hide();
	$("#view").click(function(){
		if($("#view_map").is(":visible")) {
		$("#view_map").slideUp("slow");
		} else {
		$("#view_map").slideDown("slow");
		}
	return false;
	});

	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	$("a.group").fancybox({
		'zoomSpeedIn':		300, 
		'zoomSpeedOut':	300, 
		'overlayShow':		false
	});
	
	
	
	$("dt.question a").click(function(){
	      		if($(this).parent().next().is(":hidden")){
			$(this).parent().next().show();
			$(this).parent().css({backgroundImage: "url('images/arrow-d.png')", fontWeight: "bold" });
			} else {
			$(this).parent().next().hide();
			$(this).parent().css({backgroundImage: "url('images/arrow-r.png')", fontWeight: "normal"});

			}
			
			return false
	
		});
	
	$("#tab-dog a").click(function(){
		if($("#products-dog").is(":visible")) {
		//null
		} else {
				$("#products-dog").show();
				$("#products-cat").hide();
				$(this).parent().css('backgroundPosition', '0px -1px');
				$("#tab-cat").css('backgroundPosition', '0px -78px');
		}
		return false
	});


	$("#tab-cat a").click(function(){
		if($("#products-cat").is(":visible")) {
		//null
		} else {
				$("#products-cat").show();
$("#products-dog").hide();
			$(this).parent().css('backgroundPosition', '0px 3px');
			$("#tab-dog").css('backgroundPosition', '0px -71px');
		}
		return false
	});

});