jQuery.fn.extend({

	guys_and_girls :

		function(){

			var thisID = $(this).attr("id");

			$("#products div:eq(0)").addClass("on")

			$("#"+thisID+" #nav li a").click(
				function(){

					var productType = $(this).parent().attr("class");

					$("#"+thisID+" #nav li a").removeClass("on");
					$(this).addClass("on");

					$("#products div.on").fadeOut("fast",function(){
						$(this).removeClass("on");
						$("#products div."+productType+"").slideDown("slow").addClass("on");
						
					});

				}
			);


			$("#"+thisID+" #products table tbody tr th a").hover(
				function(){
				
					var productType = $(this).parent().parent().parent().parent().parent().attr("class").replace(" on" , "");
					var numOfRows = $("#"+thisID+" #products div."+productType+" table tbody tr").size();

					for ( var i = 0; i <= numOfRows; i++){
						$("#"+thisID+" #products div."+productType+" table tbody tr:eq("+i+")").addClass("row"+i+"")
					}

					var getClass = parseFloat( $(this).parent().parent().attr("class").replace("row", "") )

					$("#"+thisID+" div.quotes blockquote").fadeOut("fast");
					$("#"+thisID+" div.quotes blockquote.item0"+(getClass+1)+"").fadeIn()

					playSound(getClass+1);

				},
				
				function(){

					$("#"+thisID+" div.quotes blockquote").css({ "display" : "none" });
					$("#"+thisID+" div.quotes blockquote:eq(0)").show(100)

					$("#"+thisID+" #products div table tbody tr").attr("class", "")

				}
			);




		}

});
