$(document).ready(function(){
  $('.img_box a').lightBox();
  $('.lightbox').lightBox();
  
  $("#query_popup_button").click(function () {
        $(".send_quary").show();
        $(".send_quary .goback").click(function () {
            $(".send_quary").hide();
        });
	});	
});


$(document).ready(function(){
	$("#switch_amount").html($("#switchingbox .wrapper").length);
	if ( $("#switchingbox .wrapper").length == 1 ) { $("#switch_nav").html("").css("height","13px"); }
	
	$("#switch_nav_prev").click ( function() {
	    if ( $("#switchingbox .on").prevAll().length == 0  ) {
			$("#switchingbox .on").fadeOut("slow").removeClass("on");
			$("#switchingbox .wrapper:last").fadeIn("slow").addClass("on");
			$("#switch_slide").html($("#switchingbox .wrapper").length);
		} else {
	    	$("#switchingbox .on").fadeOut("slow").removeClass("on").prev().fadeIn("slow").addClass("on");
			$("#switch_slide").html( ($("#switchingbox .on").prevAll().length)+1 );
		}
	});
	
	$("#switch_nav_next").click ( function() {
	    if ( $("#switchingbox .on").nextAll().length == 0  ) {
	        $("#switchingbox .on").fadeOut("slow").removeClass("on");
    			$("#switchingbox .wrapper:first").fadeIn("slow").addClass("on");
    			$("#switch_slide").html("1");
		} else {
          $("#switchingbox .on").fadeOut("slow").removeClass("on").next().fadeIn("slow").addClass("on");
          $("#switch_slide").html( ($("#switchingbox .on").prevAll().length)+1 );
		}
	});
});




