(function (a) {
    function g(b, c) {
        var d = "";
        if (b.selectedIndex == 0) d = validatelang.Select.PleaseSelect + c + "\n";
        return d
    };

    if (typeof jambu === "undefined") jambu = {};
    if (typeof jambu.home === "undefined") jambu.home = {};
    if (typeof jambu.nav === "undefined") jambu.nav = {};
    if (typeof jambu.forms === "undefined") jambu.forms = {};
    if (typeof jambu.webapps === "undefined") jambu.webapps = {};
    if (typeof jambu.webapps.products === "undefined") jambu.webapps.products = {};
    if (typeof jambu.webapps.products.retailats === "undefined") jambu.webapps.products.retailats = {};
    if (typeof jambu.webapps.find_a_store === "undefined") jambu.webapps.find_a_store = {};
    if (typeof jambu.webapps.events === "undefined") jambu.webapps.events = {};
    if (typeof jambu.webapps.shoes === "undefined") jambu.webapps.shoes = {};
    if (typeof jambu.webapps.shoes.directory === "undefined") jambu.webapps.shoes.directory = {};
    if (typeof jambu.webapps.shoes.category === "undefined") jambu.webapps.shoes.category = {};
    if (typeof jambu.webapps.shoes.pano === "undefined") jambu.webapps.shoes.pano= {};
    if (typeof jambu.forms.prodeals === "undefined") jambu.forms.prodeals = {};
    if (typeof jambu.forms.contact_us === "undefined") jambu.forms.contact_us = {};

    //private utility methods 
    var setCookie, getCookie, deleteCookie, getParameterByName;
    setCookie = function (name, value, days) {
        if (days) {
            var date = new Date();
            date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
            var expires = "; expires=" + date.toGMTString();
        } else var expires = "";
        document.cookie = name + "=" + value + expires + "; path=/";
    };

    getCookie = function (name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    };

    deleteCookie = function (name) {
        setCookie(name, "", -1);
    };
    getParameterByName = function (name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results == null) {
            return "";
        }
        return decodeURIComponent(results[1].replace(/\+/g, " "));
    };
    jambu.nav.init = function () {
        a("li:odd", "#mainNav ul li").addClass("odd");
        a("#mainNav li ul").parent().addClass("dropdown");
        a(".dropdown,.dropdownactive").hover(function () {
            a(this).children("ul").show().end().removeClass("dropdown").addClass("dropdownactive")
        }, function () {
            a(this).children("ul").hide().end().removeClass("dropdownactive").addClass("dropdown")
        })
    };
	jambu.webapps.breadcrumbs = function(){
		var breadcrumbs,crumbs;
		breadcrumbs = $('#breadcrumbs');
		crumbs = [];
		if (window.location.pathname.search('Fall/') !== -1){
			if(window.location.pathname.search('Products/') !== -1){
				crumbs.push('<a href="/2011/Fall/Products/index.htm">Fall 2011 Products</a>');
				var products = window.location.pathname.split('Products/');
				if(products[1] !== ''){
					var section,sec_name,style_section;
					section = (Boolean(a("meta[name=section]").size()))?a("meta[name=section]").attr("content"):'';
					if(Boolean(a("meta[name=section]").size())){
						sec_name = section.replace('-',' ');
						crumbs.push('&gt; <a href="/2011/Fall/Products/'+ section +'/index.htm">'+ sec_name +'</a>');
						style_section = $('.style_section');
						if(Boolean(style_section.size())){
							crumbs.push('&gt; <span class="bold">'+ style_section.html() + '</span>');
						}	
					}
				}
			}
			crumbs = crumbs.join().replace(/,/g,'');
			breadcrumbs.empty().append(crumbs);
		}
	};
    jambu.webapps.find_a_store.data = {};
    jambu.webapps.find_a_store.init = function () {
        a("#catcustomcontentform10923").bind("submit", jambu.webapps.find_a_store.submit_search);
        a("#search").click(function () {
            a("#catcustomcontentform10923").trigger("submit")
        });
        if (typeof google !== "undefined" && typeof CMS !== "undefined") {
            CMS.Maps.Initialize();
            jambu.webapps.find_a_store.display_zip();
            jambu.webapps.find_a_store.update_search_data();
            jambu.webapps.find_a_store.display_map()
        }
    };
    jambu.webapps.find_a_store.display_zip = function () {
        var b = document.getElementById("catcustomcontentform10923"),
            c = getParam("zipCode") === "" ? "All Zip Codes" : decodeURI(getParam("zipCode"));
        if (getParam("distance") !== "") for (var d = getParam("distance"), f = 0; f < b.Distance_7815.length; f++)
        if (b.Distance_7815[f].value === d) b.Distance_7815.selectedIndex = f;
        a(".Results h1").append(' " ' + c + ' "')
    };
    jambu.webapps.find_a_store.submit_search = function (b) {
        b.preventDefault();
        b = b.target;
        var c = b.zipCode.value,
            d = b.Distance_7815[b.Distance_7815.selectedIndex].value;
        module_oid = a("#module_oid").val();
        formAction = "/Default.aspx?CCID=7815&FID=45562&ExcludeBoolFalse=True&PageID=" + module_oid;
        if (c.length > 4) {
            formAction += "&zipCode=" + encodeURI(c) + "&submit=true&distance=" + d;
            b.action = formAction;
            b.Postcode_7815.value = c;
            b.submit()
        } else {
            alert("You must enter a zipcode to proceed");
            return false
        }
        b.Postcode_7815.value = b.zipCode.value
    };
    jambu.webapps.find_a_store.update_search_data = function () {
        var b = document.getElementById("catcustomcontentform10923"),
            c = getParam("zipCode") == "" ? "" : decodeURI(getParam("zipCode"));
        b.zipCode.value = c
    };
    jambu.webapps.find_a_store.display_map = function () {
        if (a.trim(a("#Shops").html()).length > 0 && a("#Shops:contains('No results')").size() === 0) {
            a(".Results").show();
            a("#GoogleMaps").css("visibility", "visible")
        } else {
            a("div:contains('No results')", "#Shops").hide();
            getParam("zipCode") != "" && a(".noResults").css("visibility", "hidden");
            a("#GoogleMaps").hide()
        }
        if (a("#GoogleMaps").attr("style") == "display: none;" && Boolean(getParam("submit"))) {
            a(".noResults").show();
            a(".noResults").css("visibility", "visible")
        } else a(".webappsearchresults").show()
    };
    jambu.webapps.events.init = function () {
        var b = a("#Events"),
            c = a("meta[name=section]").attr("content"),
			d = a('#Events:contains("No items")'),
			e = a('#Promotions');
        if (a("#Events .eventlist").children().length > 0) b.show();
        else {
            b.hide();
            if (c === "Products") b.parents(".lowmodwrapper").css("height", 0);
            else c === "Home" && a("#retailerAds").parent().css("left", 0)
        }
		if(Boolean(d.size())){
			a('#Promotions').parent().animate({left:'0px', top:'-10px'}, 2500);
		}
    };
    jambu.webapps.shoes.category.init = function () {
        var b = jQuery("#prodList").children().not(".clrflt");
        jQuery.each(b, function (c) {
            c >= 2 && c % 2 == 0 && a(this).addClass("clear");
            c = "." + this.className.split(" ")[0];
            var d = jQuery(".prodthumbnails ul", this);
            jQuery.each(jQuery(c, "#showthumbs"), function () {
                d.append(this)
            });
            d.children().attr({
                style: ""
            })
        });
        a(".totalshoes").html(a(".prodthumbnails img", b).size());
       if(a("#list_all,.list_all").length > 0) {
	   	
		    a("#list_all, .list_all").colorbox({
            width: "535px",
            height: "525px",
            inline: true,
            href: "#all_shoes",
            onComplete: jambu.webapps.shoes.category.cbox_complete
        });
	   	
	   }

    };
    jambu.webapps.products.display = function () {
        var updateOGTags = function (img_url) {
                var style = a('.title:first').html();
                var section = a('.section:first').html();
                var title = 'Jambu.com: Jambu Adventure Designs - Footwear for Women ' + section + ' ' + style;
                var description = a('.description:visible').html();
                var jam_url = document.location.href;
                var url = 'http://services.jambu.com/apps/third_party/social/facebook/og_generator.php?';
                url += 'og_title=' + encodeURI(title);
                url += '&og_type=product';
                url += '&og_image=' + img_url;
                url += '&og_description=' + encodeURI(description);
                url += '&og_url=' + encodeURI(jam_url);
                a('meta[property*="og:title"]').attr('content', title);
                a('meta[property*="og:type"]').attr('content', 'product');
                a('meta[property*="og:url"]').attr('content', url);
                a('meta[property*="og:image"]').attr('content', img_url);
                a('meta[property*="og:description"]').attr('content', description);
                //a('meta[property*="jam:url"]').attr('content', document.location.href);
                a('.main:visible .addthis_button').attr('addthis:url', url);
                a('.main:visible .addthis_button').attr('addthis:image', img_url);
                a('.main:visible .addthis_button').attr('addthis:description', description);
                window.addthis_share['url'] = url;
                window.addthis_share['title'] = title;
                window.addthis_share['description'] = description;
                window.addthis_share['url_transforms'] = {
                    clean: true,
                    shorten: {
                        twitter: 'bitly',
                        facebook: 'bitly',
                        email: 'bitly'
                    }
                };
                window.addthis_share['shorteners'] = {
                    bitly: {
                        login: 'jambusocial',
                        apiKey: 'R_632995340a983d7bb039659bb585a628'
                    }
                };
                window.addthis_url = url;
                window.addthis_title = title;
                window.addthis_description = description;
                if (window.addthis) {
                    window.addthis.ost = 0;
                    window.addthis.ready();
                }
            };
        var b = window.location.pathname.split("index.htm")[0];
        a('.more a[href~="' + b + '"]').parent("li").hide();
        a("#popup").css("height", "401px");
        b = a('meta[name="section"]').attr("content");
        var c = "/Images/products/" + b + "/construction.jpg";
        var metaprop = a("meta[property]");
        a(".construction img").attr("src", c);
        c = document.location.hash;
        
        if (c === "" && document.location.href.split("product.htm").length == 2){
        	window.location.href = document.location.href.split("product.htm")[0] + "index.htm";
        }
        
        jQuery.each(jQuery("#prodList").children().not(".clrflt"), function () {
            var e = "." + this.className.split(" ")[0],
                h = jQuery(".prodthumbnails ul", this);
            jQuery.each(jQuery(e, "#showthumbs"), function () {
                h.append(this)
            });
            h.children().attr({
                style: ""
            })
        });
        if (b !== "product") a(".main_img_url").each(function () {
            var e = a(this).parents(".main").find(".prodthumbnails a:first").attr("href");
            a(this).attr("href", e)
        });
        else if (b === "product") {
            a(this).parents(".main").find(".prodthumbnails a:first").attr("href");
            a(this).attr("href", "")
        }
        a(".prodthumbnails").find("img:first").addClass("full_opacity");
        a("#prodWrapper").show();
        if (c !== "") {
            var d = c.replace("#", "");
            c = c.replace("#", ".");
            a("#prodList");
            a("div").find(c).show();
            a(c).show();
            c = "." + a(c).attr("class").split(" ")[0];
            a(c).show();
            a.each(a(c), function () {
                a(this).removeClass("clear")
            });
            a("#prodWrapper").show();
            if (b !== "index") {
                a(".prodthumbnails a").click(function (e) {
                    e.preventDefault();
                    e.stopPropagation();
                    e = a(this).attr("href");
                    a(".prodthumbnails img:visible").removeClass("full_opacity");
                    /**
                     * remove when Fall 2011 launches
                     */
                    e = "/2011/Fall/Products/Images/" + e.split("#")[1] + "--384x384.jpg";

                    a(a(this).parents(".main").find(".main_img_url img")).attr("src", e);
                    var alt = a(this).children('img').attr('alt').split(' ');
                    var color = alt[alt.length - 1];
                    a('.color', a(a('.prodItem:visible')[1])).html(color);
                    var title = a.trim(a('.retailats_wrapper:visible .title').html());
                    var spring2011 = jambu.webapps.products.retailats.dataO['spring2011'];
                    var shoeArray = [];
                    a.each(spring2011, function (i, v) {
                        var boolv = v.color.toUpperCase() === color.toUpperCase() && v.style.toUpperCase() === title.toUpperCase();
                        if (boolv) {
                            shoeArray.push(i);
                        }
                    });
                    jambu.webapps.products.retailats.dataO['avail_shoes'] = shoeArray;
                    var as = jambu.webapps.products.retailats.dataO.avail_shoes;
                    var ps = jambu.webapps.products.retailats.dataO.planetshoes;
                    var os = jambu.webapps.products.retailats.dataO.onlineshoes;
                    var ps_td = a('td', '.retailats_wrapper:visible .planetshoes').not('.onlinebrand').removeClass('yes').addClass('no').html('');
                    var os_td = a('td', '.retailats_wrapper:visible .onlineshoes').not('.onlinebrand').removeClass('yes').addClass('no').html('');
                    a.each(as, function (i, v) {
                        var url;
                        if (typeof (ps[v]) !== 'undefined' && Number(ps[v].qty) > 0) {
                            var cls = '.s_' + spring2011[v].size.replace('.0', '').replace('.5', '5');
                            url = '<a href="' + ps[v].url + '" target="_blank">X</a>';
                            a(cls, '.retailats_wrapper:visible .planetshoes').removeClass('no').addClass('yes').html(url);
                        }
                        if (typeof (os[v]) !== 'undefined' && Number(os[v].qty) > 0) {
                            url = '<a href="' + os[v].url + '" target="_blank">X</a>';
                            a(cls, '.retailats_wrapper:visible .onlineshoes').removeClass('no').addClass('yes').html(url);
                        }
                    });

                    //console.log({shoecat: shoeArray,planetshoes:planetshoes,onlineshoes:onlineshoes});
                    updateOGTags(e);
                    a(a(this).find("img")).addClass("full_opacity")
                });
                var f = false;
                a(".prodthumbnails img:visible").click(function () {
                    var e;
                    f = true;
                    a(".prodthumbnails").removeClass("activex");
                    a(".prodthumbnails img:visible").removeClass("full_opacity");
                    a(this).parent(".prodthumbnails").addClass("activex");
                    e = "/2011/Fall/Products/Images/" + a(this).parent("a").attr("href").split("#")[1] + "--384x384.jpg";


                    a(a(this).parents(".main").find(".main_img_url img")).attr("src", e);
                    var alt = a(this).attr('alt').split(' ');
                    var color = alt[alt.length - 1];
                    a('.color', a(a('.prodItem:visible')[1])).html(color);
                    var title = a.trim(a('.retailats_wrapper:visible .title').html());
                    var spring2011 = jambu.webapps.products.retailats.dataO['spring2011'];
                    var shoeArray = [];
                    a.each(spring2011, function (i, v) {
                        var boolv = v.color.toUpperCase() === color.toUpperCase() && v.style.toUpperCase() === title.toUpperCase();
                        if (boolv) {
                            shoeArray.push(i);
                        }
                    });
                    jambu.webapps.products.retailats.dataO['avail_shoes'] = shoeArray;
                    var as = jambu.webapps.products.retailats.dataO.avail_shoes;
                    var ps = jambu.webapps.products.retailats.dataO.planetshoes;
                    var os = jambu.webapps.products.retailats.dataO.onlineshoes;
                    var ps_td = a('td', '.retailats_wrapper:visible .planetshoes').not('.onlinebrand').removeClass('yes').addClass('no').html('');
                    var os_td = a('td', '.retailats_wrapper:visible .onlineshoes').not('.onlinebrand').removeClass('yes').addClass('no').html('');
                    a.each(as, function (i, v) {
                        var url;
                        if (typeof (ps[v]) !== 'undefined' && Number(ps[v].qty) > 0) {
                            var cls = '.s_' + spring2011[v].size.replace('.0', '').replace('.5', '5');
                            url = '<a href="' + ps[v].url + '" target="_blank">X</a>';
                            a(cls, '.retailats_wrapper:visible .planetshoes').removeClass('no').addClass('yes').html(url);
                        }
                        if (typeof (os[v]) !== 'undefined' && Number(os[v].qty) > 0) {
                            url = '<a href="' + os[v].url + '" target="_blank">X</a>';
                            a(cls, '.retailats_wrapper:visible .onlineshoes').removeClass('no').addClass('yes').html(url);
                        }
                    });

                    //console.log({shoecat: shoeArray,planetshoes:planetshoes,onlineshoes:onlineshoes});
                    updateOGTags(e);
                    a(a(this).find("img")).addClass("full_opacity");
                });
                a(".style_section").html(a.trim(a(".title:visible")[0].innerHTML))
            }
        }
        a(".prodthumbnails img").hover(function () {
            if (!f) {
                var e;
                a(this).parent(".prodthumbnails").addClass("activex");
                a(this).addClass("full_opacity");
                e = "/2011/Fall/Products/Images/" + a(this).parent("a").attr("href").split("#")[1] + "--384x384.jpg";
                a(a(this).parents(".prodthumbnails").find("img:first")).removeClass("full_opacity");
                a(a(this).parents(".main").find(".main_img_url img")).attr("src", e);
                updateOGTags(e);
            }
        }, function () {
            if (!f) {
                var e;
                a(this).parent(".prodthumbnails").removeClass("activex");
                a(this).removeClass("full_opacity");
                a(a(this).parents(".prodthumbnails").find("img:first")).addClass("full_opacity");
                e = a(a(this).parents(".prodthumbnails").find("img:first")).attr("src").split("70x50.jpg")[0] + "384x384.jpg";
                a(a(this).parents(".main").find(".main_img_url img")).attr("src", e)
            }
            f = false
        });
        b === "product" && a(a('.prodthumbnails a[href*="' + d + '"]').find("img")).trigger("click");
        var ploc = location.hash.replace('#','.');
        var visthumbs = jQuery(ploc,'.prodthumbnails:visible');
        if(b==="product"){
        	if(!Boolean(ploc.size())){
        		jQuery('a:first','.prodthumbnails:visible').click();
        	}else{
        		jQuery('a', visthumbs).click();
        	}
        }
        //setup lightbox
    	a('#pano').bind('click', function(e){
    		e.preventDefault();
    		var src, sec = $('.main_img_url img').attr('src').split('Images/')[1].split('--384x384.jpg')[0];
    		src = '/2011/Fall/360/' + sec + '/index.htm';
    		$('.tclose').trigger('click');
    		TINY.box.show({url:src,width:600,height:525});
    		var id = setInterval(function(){
    			if(Boolean($('#viewer:visible').length)){
    				$('#viewer').empty();
    				$('#viewer').append($('<iframe />').attr({src: src, height: 525, width: 600,align:'left',frameborder: 0,scrolling:'no'}));
    				clearInterval(id);
    			}
    		}, 100);
    	});
    };
    jambu.webapps.products.retailats.init = function () {
        jambu.webapps.products.retailats.dataO = {};
        var dataO = jambu.webapps.products.retailats.dataO;
        var data_url = '/2011/Spring/data/retail_ats/onlineshoes.json';
        a.getJSON(data_url, function (response) {
            var data = response.shoe || response.Shoe;
            dataO['onlineshoes'] = {};
            a.each(data, function (i, v) {
                var upc = v.UPC;
                var qty = v.Qty;
                var url = v.URL;
                dataO['onlineshoes'][upc] = {};
                dataO['onlineshoes'][upc].qty = qty;
                dataO['onlineshoes'][upc].url = url;
            });
        });
        data_url = '/2011/Spring/data/retail_ats/planetshoes.json';
        a.getJSON(data_url, function (response) {
            var data = response.shoe || response.Shoe;
            dataO['planetshoes'] = {};
            a.each(data, function (i, v) {
                var upc = v.UPC;
                var qty = v.Qty;
                var url = v.URL;
                dataO['planetshoes'][upc] = {};
                dataO['planetshoes'][upc].qty = qty;
                dataO['planetshoes'][upc].url = url;
            });
        });
        data_url = '/2011/Spring/data/retail_ats/spring2011.json';
        a.getJSON(data_url, function (response) {
            var data = response;
            dataO['spring2011'] = {};
            a.each(data, function (i, v) {
                var upc = v.upc;
                var style = v.style;
                var color = v.color;
                var size = v.size;
                dataO['spring2011'][upc] = {};
                dataO['spring2011'][upc].style = style;
                dataO['spring2011'][upc].color = color;
                dataO['spring2011'][upc].size = size;
            });
        });
    };
    jambu.webapps.shoes.category.cbox_complete = function () {
        a("#cboxClose").html("[X Close]");
        var b = a(a("#cboxLoadedContent h2.title").find("a"));
        a.each(b, function () {
            var c = a(a(this).parent("h2").siblings(".colors").find("a:first")).attr("href");
            a(this).attr("href", c)
        });
        a("#cboxLoadedContent .colors a").hover(function () {
            a(this).offset();
            a(this).siblings("img").width(250).height(250).show()
        }, function () {
            a(this).siblings("img").hide()
        });
        a("#cboxLoadedContent a").click(function (c) {
            c.preventDefault();
            c = a(this).attr("href");
            window.location.href = c
        })
    };
    jambu.webapps.shoes.directory.init = function () {};
    jambu.forms.prodeals.submit_order = function (b) {
        b.preventDefault();
        b = b.target;
        var c = "";
        if (b.FirstName) c += isEmpty(b.FirstName.value, "First Name");
        if (b.LastName) c += isEmpty(b.LastName.value, "Last Name");
        if (b.EmailAddress) c += checkEmail(b.EmailAddress.value);
        if (b.BillingAddress) c += isEmpty(b.BillingAddress.value, "Billing Address");
        if (b.BillingCity) c += isEmpty(b.BillingCity.value, "Billing City");
        if (b.BillingState) c += g(b.BillingState, "Billing State");
        if (b.BillingZip) c += isEmpty(b.BillingZip.value, "Billing Zipcode/Postcode");
        if (b.CellPhone) c += isEmpty(b.CellPhone.value, "Cell Phone Number");
        if (b.CAT_Custom_192456) c += isEmpty(b.CAT_Custom_192456.value, "Store or Retail Affiliation");
        if (b.CAT_Custom_192446) c += g(b.CAT_Custom_192446, "Shoe Choice");
        if (b.CAT_Custom_192453) c += g(b.CAT_Custom_192453, "Size 1");
        if (b.CAT_Custom_192454.selectedIndex > 0 || b.CAT_Custom_192455.selectedIndex > 0) {
            c += g(b.CAT_Custom_192454, "Optional Shoe Choice");
            c += g(b.CAT_Custom_192455, "Size 2")
        }
        if (b.ShippingAddress) c += isEmpty(b.ShippingAddress.value, "Shipping Address");
        if (b.ShippingCity) c += isEmpty(b.ShippingCity.value, "Shipping City");
        if (b.ShippingState) c += g(b.ShippingState, "Shipping State");
        if (b.ShippingZip) c += isEmpty(b.ShippingZip.value, "Shipping Zipcode/Postcode");
        if (b.ShippingInstructions) c += isEmpty(b.ShippingInstructions.value, "Shipping Instructions");
        if (!b.PaymentMethodType || getRadioSelected(b.PaymentMethodType) == 1) {
            if (b.CardName) c += isEmpty(b.CardName.value, "Name on Card");
            if (b.CardNumber) c += isNumeric(b.CardNumber.value, "Card Number");
            if (b.Amount) c += isCurrency(b.Amount.value, "Amount")
        }
        if (b.CaptchaV2) c += captchaIsInvalid(b, "Enter Word Verification in box below", "Please enter the correct Word Verification as seen in the image");
        if (c != "") {
            alert(c);
            return false
        }
        b.submit();
        return false
    };
    jambu.forms.prodeals.submit_login = function (b) {
        b.preventDefault();
        theForm = b.target;
        b = "";
        Boolean(theForm.Username.value) || (b += "Please enter your username \n");
        Boolean(theForm.Password.value) || (b += "Please enter your password");
        if (b !== "") {
            alert(b);
            return false
        } else {
            theForm.submit();
            return true
        }
    };
    jambu.forms.init = function () {
        jambu.forms.contact_us.init();
        jambu.forms.prodeals.init()
    };
    jambu.forms.contact_us.init = function () {
        a("#catwebformform95918").submit(jambu.forms.contact_us.submit_contact_us);
        a("#reset").click(function (b) {
            b.preventDefault();
            a("form")[0].reset()
        });
        a("#contact_submit", "#catwebformform95918").click(function (b) {
            b.preventDefault();
            a("#catwebformform95918").submit()
        })
    };
    jambu.forms.contact_us.submit_contact_us = function (b) {
        b.preventDefault();
        var c = "/FormProcessv2.aspx?WebFormID=10090&amp;OID=3723829&amp;OTYPE=1&amp;EID=0&amp;CID=0";
        b = b.target;
        var d = "";
        if (b.FirstName) d += isEmpty(b.FirstName.value, "First Name");
        if (b.LastName) d += isEmpty(b.LastName.value, "Last Name");
        if (b.EmailAddress) d += checkEmail(b.EmailAddress.value);
        if (b.CAT_Custom_116609) d += g(b.CAT_Custom_116609, "Subject");
        if (b.CAT_Custom_116609[b.CAT_Custom_116609.selectedIndex].value === "Other") d += isEmpty(b.CAT_Custom_116610.value, "Other");
        if (b.CAT_Custom_869) d += isEmpty(b.CAT_Custom_869.value, "Message");
        if (d != "") {
            alert(d);
            return false
        }
        a("#CAT_Custom_192838").attr("disabled", true);
        a("#CAT_Custom_192839").attr("disabled", true);
        a("#CAT_Custom_192840").attr("disabled", true);
        if (a("#CAT_Custom_116609 :selected").val() === "Site Issues") {
            c = "/FormProcessv2.aspx?WebFormID=37839&OID=3723829&OTYPE=1&EID=0&CID=0";
            a("#CAT_Custom_116609").attr("disabled", true);
            a("#CAT_Custom_116610").attr("disabled", true);
            a("#CAT_Custom_869").attr("disabled", true);
            a("#CAT_Custom_116610").val("");
            a("#CAT_Custom_192838").val(a("#CAT_Custom_869").html() || a("#CAT_Custom_869").val());
            a("#CAT_Custom_192839").val(a("#CAT_Custom_116609 :selected").val());
            a("#CAT_Custom_192840").val(a("#CAT_Custom_116610").val());
            a("#CAT_Custom_192838").attr("disabled", false);
            a("#CAT_Custom_192839").attr("disabled", false);
            a("#CAT_Custom_192840").attr("disabled", false)
        }
        b.action = c;
        b.submit();
        a("#CAT_Custom_116609").attr("disabled", false);
        a("#CAT_Custom_116610").attr("disabled", false);
        a("#CAT_Custom_869").attr("disabled", false);
        return false
    };
    jambu.forms.prodeals.init = function () {
        a("#catwebformform34221").submit(jambu.forms.prodeals.submit_order);
        a("#catseczoneform86355").submit(jambu.forms.prodeals.submit_login);
        a("#submit,#catwebformbutton").click(function (b) {
            b.preventDefault();
            a("#catseczoneform86355,#catwebformform34221").submit()
        });
        a("select").change(function () {
            var b = a(this).attr("id"),
                c = {
                    CAT_Custom_192446: "CAT_Custom_192453",
                    CAT_Custom_192453: "CAT_Custom_192446",
                    CAT_Custom_192454: "CAT_Custom_192455",
                    CAT_Custom_192455: "CAT_Custom_192454"
                };
            a(this).attr("selectedIndex") === 0 && b in c && a("#" + c[b]).attr("selectedIndex", 0);
            b = a("#CAT_Custom_192446").attr("selectedIndex") > 0 ? Number(a("#CAT_Custom_192446 option:selected").attr("value").split("$")[1]) : 0;
            c = a("#CAT_Custom_192454").attr("selectedIndex") > 0 ? Number(a("#CAT_Custom_192454 option:selected").attr("value").split("$")[1]) : 0;
            b += c;
            a("#Amount").val(b.toFixed(2))
        })
    };
    jambu.home.init = function () {
       /* a(".slide a[href='#']").css("cursor", "default").click(function (b) {
            b.preventDefault()
        })
        */
    };
    jambu.webapps.init = function () {
        var preview;
        jambu.home.init();
        jambu.webapps.shoes.category.init();
        jambu.nav.init();
        jambu.webapps.find_a_store.init();
        jambu.webapps.events.init();
        jambu.webapps.products.display();
        jambu.webapps.products.retailats.init();
        jambu.forms.init();
		jambu.webapps.breadcrumbs();
		$('#breadcrumbs').css({'visibility': 'visible'});
        a(".data").length > 0 && a(".colors a").hover(function () {
            a(this).siblings().show()
        }, function () {
            a(this).siblings().hide()
        })
		/*
        preview = getParameterByName('preview');
        if (preview === 'off') {
            jambu.preview = false;
            deleteCookie('preview');
        } else if (preview === 'on') {
            jambu.preview = true;
            setCookie('preview', 'on', 0.04166666666667);
        }
        previewCookie = getCookie('preview');
        if (previewCookie === 'on') {
            //change urls
            var prevseason, newseason, urlobjs, newurl;
            prevseason = '/2011/Spring/';
            newseason = '/2011/Fall/';
            urlobjs = a('a[href*="' + prevseason + '"]');
			$('#prodThermo,#prodDutch').removeClass('hide');
            a.each(urlobjs, function (i, v) {
                var obj;
                obj = a(v);
                newurl = obj.attr('href').replace(prevseason, newseason);
                obj.attr('href', newurl);
            });
        }
        */
		
    };
    a(document).ready(function () {
        jambu.webapps.init();
    })
})(jQuery);
