$(document).ready(function(){
var counter=0;

 $("a#featured-arrow-right").click(function (){
    if(counter<3){
        $("div#index-featured-items ul").animate({"left": "-=944px"});
        counter=counter+1;
    }
    });

    $("a#featured-arrow-left").click(function (){
    if(counter>0) {
        $("div#index-featured-items ul").animate({"left": "+=944px"});
        counter=counter-1;
    }
    });

  
   $("a#next-hp-featured-item").click(function (){
    if(counter<3){
        $("div#hp-featured-items ul").animate({"left": "-=876px"});
        counter=counter+1;
    }
    });

    $("a#previous-hp-featured-item").click(function (){
    if(counter>0) {
        $("div#hp-featured-items ul").animate({"left": "+=876px"});
        counter=counter-1;
    }
    });
	
	
	$("a#cat-arrow-right").click(function (){
    if(counter<3){
        $("div#landing-page-container ul").animate({"left": "-=743px"});
        counter=counter+1;
    }
    });

    $("a#cat-arrow-left").click(function (){
    if(counter>0) {
        $("div#landing-page-container ul").animate({"left": "+=743px"});
        counter=counter-1;
    }
    });
	

	
	  $("a#products-featured-arrow-right").click(function (){
    if(counter<3){
        $("div#products-featured-items ul").animate({"left": "-=945px"});
        counter=counter+1;
    }
    });

    $("a#products-featured-arrow-left").click(function (){
    if(counter>0) {
        $("div#products-featured-items ul").animate({"left": "+=945px"});
        counter=counter-1;
    }
    });
	
	
   
    $("a#next-landing-featured-item").click(function (){
    if(counter<3){
        $("div#landing-featured-items ul").animate({"left": "-=876px"});
        counter=counter+1;
    }
    });

    $("a#previous-landing-featured-item").click(function (){
    if(counter>0) {
        $("div#landing-featured-items ul").animate({"left": "+=876px"});
        counter=counter-1;
    }
    });


    $("a.next-alt-view").click(function (){
    if(counter<3){
        $("div#products2-alt-views-container ul").animate({"left": "-=120px"});
        counter=counter+1;
    }
    });

    $("a.previous-alt-view").click(function (){
    if(counter>0) {
        $("div#products2-alt-views-container ul").animate({"left": "+=120px"});
        counter=counter-1;
    }
    });
   
   
    $("a.next-you-may-also-like").click(function (){
    if(counter<3){
        $("div#products2-you-may-also-like ul").animate({"left": "-=579px"});
        counter=counter+1;
    }
    });

    $("a.previous-you-may-also-like").click(function (){
    if(counter>0) {
            $("div#products2-you-may-also-like ul").animate({"left": "+=579px"});
        counter=counter-1;
    }
    });
	
	
	 $("a#arrow-right").click(function (){
    if(counter<10){
        $("div.photo-scoller-holder ul").animate({"left": "-=103px"});
        counter=counter+1;
    }
    });

    $("a#arrow-left").click(function (){
    if(counter>0) {
        $("div.photo-scoller-holder ul").animate({"left": "+=103px"});
        counter=counter-1;
    }
    });
	
	 $("a#alt-arrow-right").click(function (){
    if(counter<10){
        $("div#products2-alt-views-container ul").animate({"left": "-=76px"});
        counter=counter+1;
    }
    });

    $("a#alt-arrow-left").click(function (){
    if(counter>0) {
        $("div#products2-alt-views-container ul").animate({"left": "+=76px"});
        counter=counter-1;
    }
    });
	
	
	 $("a#descroptoin_hide").click(function (){
    if(counter == 0){
        $("div#landing-dept-name a img").attr('src', '/images/landing_TYP_arrow_down.gif');
		 $("h2#landing-dept-long-desc").hide('slow');
        counter=counter+1;
    }
	  else if(counter == 1){
        $("div#landing-dept-name a img").attr('src', '/images/landing_TYP_arrow_up.gif');
		 $("h2#landing-dept-long-desc").show('slow');
        counter=counter-1;
    }
    });
	 
	 	 $("a#cat_descroptoin_hide").click(function (){
    if(counter == 0){
        $("div#category-dept-name a img").attr('src', '/images/cat_TYP_arrow_down.gif');
		 $("h2#category-dept-long-desc").hide('slow');
        counter=counter+1;
    }
	  else if(counter == 1){
        $("div#category-dept-name a img").attr('src', '/images/cat_TYP_arrow_up.gif');
		 $("h2#category-dept-long-desc").show('slow');
        counter=counter-1;
    }
    });
	
	
		 	 $("a#hide_show").click(function (){
    if(counter == 0){
     $("ul#hide_show_ul").css("visibility", "visible");
	 $("ul#hide_show_ul").css("height", "auto");
	$("a#hide_show").removeClass().addClass("side-nav-shop-by-active");
        counter=counter+1;
    }
	  else if(counter == 1){
		  $("ul#hide_show_ul").css("visibility", "hidden");
		   $("ul#hide_show_ul").css("height", "0");
   $("a#hide_show").removeClass().addClass("side-nav-shop-by");
        counter=counter-1;
    }
    });
			
			 		 	 $("a#show_hide_brand").click(function (){
    if(counter == 0){
    $("a#show_hide_brand").removeClass().addClass("side-nav-shop-by-active");
	 $("ul#show_hide_brand_ul").css("height", "auto");
	   $("ul#show_hide_brand_ul").css("visibility", "visible");
	
        counter=counter+1;
    }
	  else if(counter == 1){
   $("a#show_hide_brand").removeClass().addClass("side-nav-shop-by");
 $("ul#show_hide_brand_ul").css("height", "0");
	   $("ul#show_hide_brand_ul").css("visibility", "hidden");
        counter=counter-1;
    }
    });
						 
				 		 	 $("a#show_hide_pricerange").click(function (){
    if(counter == 0){
    $("a#show_hide_pricerange").removeClass().addClass("side-nav-shop-by-active");
	   $("ul#show_hide_pricerange_ul").css("visibility", "visible");
	 $("ul#show_hide_pricerange_ul").css("height", "auto");
	
        counter=counter+1;
    }
	  else if(counter == 1){
   $("a#show_hide_pricerange").removeClass().addClass("side-nav-shop-by");
	   $("ul#show_hide_pricerange_ul").css("visibility", "hidden");
	 $("ul#show_hide_pricerange_ul").css("height", "0");
        counter=counter-1;
    }
    });
							 
							 
//$("input[type='text'][name!=kword][id!=email-addy][id!=qty-input1][id!=shipping_zip][id!=shipping_address2][id!=billing_zip][id!=billing_address2][id!=GCAMOUNT][id!=cart-zip][id!=zip-coupen], input[type='password']").css({'background':'url(/images/field_l.gif) 0 0px no-repeat','font-size': '12px','color': '#6C6C6C','width':'228px','z-index':'50','height':'30px','display':'block','float':'left','border':'0px','padding':'2px 5px 0px 2px'});

		//$("#login").validate();
		//$("#create_account").validate({
//		rules: {
//		    passwrd: {required: true,minlength: 6},
//			confirm_password: {required: true,minlength: 6,equalTo: "#passwrd"}
//		  },
//		messages: {
//
//			passwrd: {
//				required: "<img src='/images/invalid.gif' alt='error' style='width: 13px; height: 7px; vertical-align: middle;' /> Please provide a password",
//				minlength: jQuery.format(" <img src='/images/invalid.gif' alt='error' style='width: 13px; height: 7px; vertical-align: middle;' /> Password must be {0} characters or more")
//			},
//			confirm_password: {
//				required: "<img src='/images/invalid.gif' alt='error' style='width: 13px; height: 7px; vertical-align: middle;' /> Repeat your password",
//				minlength: jQuery.format("<img src='/images/invalid.gif' alt='error' style='width: 13px; height: 7px; vertical-align: middle;' /> Password must be {0} characters or more"),
//				equalTo: "<img src='/images/invalid.gif' alt='error' style='width: 13px; height: 7px; vertical-align: middle;' /> Your passwords do not match!"
//			}
//		}
	//	});						   
							 
 });
