	//jquery wonderment goes here
$(document).ready(function(){
	//default active status
	$("div#bike_part_nav_left").addClass("bike_part_nav_active");
    $("div#bike_part_nav_right").addClass("bike_part_nav_not_active");
	$("div#bike_part_photo").empty().append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_bike.jpg\" />");
	//makes left main nav active
	$("#bike_part_nav_left").click(function () { 
      $(this).removeClass("bike_part_nav_not_active");
	  $(this).addClass("bike_part_nav_active");
      $("div#bike_part_nav_right").removeClass("bike_part_nav_active");
      $("div#bike_part_nav_right").addClass("bike_part_nav_not_active");
	  $("div#bike_part_parts_nav_road").css("display","block");
	  $("div#bike_part_parts_nav_mtn").css("display","none");
	  $("div#bike_part_photo").empty().append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_bike.jpg\" />");
    });
	//makes right main nav active
	$("#bike_part_nav_right").click(function () { 
      $("div#bike_part_nav_left").removeClass("bike_part_nav_active");
      $("div#bike_part_nav_left").addClass("bike_part_nav_not_active");
      $(this).removeClass("bike_part_nav_not_active");
      $(this).addClass("bike_part_nav_active");
	  $("div#bike_part_parts_nav_mtn").css("display","block");
	  $("div#bike_part_parts_nav_road").css("display","none");
	  $("div#bike_part_photo").empty().append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_bike.jpg\" />");
    });
	//road bike function
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Top Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_top_tube.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Down Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_down_tube.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Seat Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_seat_tube.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Saddle'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_saddle.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Seat Rails'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_seat_rails.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Seat Post'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_seat_post.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Chain Stay'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_chain_stay.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Seat Stay'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_seat_stay.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Rear Brake'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_rear_brake.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Tire'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_tire.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Rim'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_rim.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Hub'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_hub.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Spoke'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_spoke.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Valve'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_valve.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Rear Derailleur'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_rear_derail.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Front Derailleur'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_front_derail.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Crankset'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_crankset.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Crank Arm'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_crank_arm.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Water Bottle Mounts'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_water_mnts.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Fork'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_fork.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Head Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_head_tube.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Stem'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_stem.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Handle Bars'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_handle_bars.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Shifter/Brake Levers'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_shifters.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Front Brake'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_front_brake.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Cassette'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_cassette.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Chain'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_chain.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Headset'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_headset.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Chainrings'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_chainrings.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Spacers'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_spacers.jpg\" />");});
	$("div#bike_part_parts_nav_road a").filter(function() { return $(this).html() == 'Cables'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_road_cables.jpg\" />");});

	//mtn bike function
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Top Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_top_tube.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Down Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_down_tube.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Seat Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_seat_tube.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Saddle'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_saddle.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Seat Rails'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_seat_rails.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Seat Post'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_seat_post.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Chain Stay'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_chain_stay.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Seat Stay'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_seat_stay.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Rear Brake'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_rear_brake.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Tire'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_tire.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Rim'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_rim.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Hub'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_hub.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Spoke'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_spoke.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Valve'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_valve.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Rear Derailleur'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_rear_derail.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Front Derailleur'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_front_derail.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Crankset'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_crankset.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Crank Arm'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_crank_arm.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Water Bottle Mounts'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_water_mnts.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Fork'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_fork.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Shock'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_shock.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Head Tube'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_head_tube.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Stem'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_stem.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Handle Bars'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_handle_bars.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Shifter/Brake Levers'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_shifters.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Disc Brake Rotor'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_disc_brake.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Front Brake'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_front_brake.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Cassette'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_cassette.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Chain'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_chain.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Headset'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_headset.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Chainrings'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_chainrings.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Spacers'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_spacers.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Pedal'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_pedal.jpg\" />");});
	$("div#bike_part_parts_nav_mtn a").filter(function() { return $(this).html() == 'Cables'; }).click(function () {$("div#bike_part_photo img").css("display","none");$("div#bike_part_photo").append("<img src=\"http://www.sierratradingpost.com/assets/images/ppam/ad_images/bike_anat_mtn_cables.jpg\" />");});
	
});