var jkUt;if(!jkUt)throw new Error("jkUt has not been loaded!");var joeEndeca;if(!joeEndeca)joeEndeca={};else if(typeof joeEndeca!="object")throw new Error("joeEndeca already exists and is not an object");function compare_items(){f=document.getElementById('form_01');list=f['comparison_skus[]'];num=0;for(i=0;i<list.length;++i){if(list[i].checked)++num;}if(num>1){f.submit();return true;}else{alert('Please check off 2 or more products to compare.');return false;}}jkUt.evt.add(window,"load",onload_01);jkUt.evt.add(window,"load",function(){var t,i;t=$('c32').getElementsByTagName('a');for(i=0;i<t.length;i++)t[i].onmouseover=joeEndeca.rO;t=$('c32B').getElementsByTagName('a');for(i=0;i<t.length;i++)t[i].onmouseover=joeEndeca.rO;});joeEndeca.rO=function(){var t,t2;t=jkUt.pos.get((Element.up(this).id=='c32B')?($('filterBySavings2')):($('filterBySavings')));t2=$('endFDD');t2.style.top=(t.top+15)+'px';t2.style.left=(t.left-6)+'px';t2.style.display='block';jkLib.cT(joeEndeca.time);t2.onmouseover=function(){jkLib.cT(joeEndeca.time);};t2.onmouseout=function(){joeEndeca.time=jkLib.sT({f:function(){$('endFDD').style.display='none';},t:400});};};
jQuery.noConflict();
jQuery(document).ready(function(){
  jQuery("#layoutWrapper .content .msContent .content_01 span.more").hide();
  jQuery("#layoutWrapper .content .msContent .content_01 .link").click(function(event){
    var snippet_element_display = "none";
		var more_element_display = "inline";
		if(jQuery("#layoutWrapper .content .msContent .content_01 .more").css("display") == "inline"){
		  var snippet_element_display = "inline";
			var more_element_display = "none";
	  }
		jQuery("#layoutWrapper .content .msContent .content_01 .snippet.link").css("display", snippet_element_display);
		jQuery("#layoutWrapper .content .msContent .content_01 .snippet.ellipsis").css("display", snippet_element_display);
		jQuery("#layoutWrapper .content .msContent .content_01 .more").css("display", more_element_display);
  });
	jQuery("#layoutWrapper .content .msContent .multiSelect td .brandList li.uncommon_switch a").click(function(){
    var parent_li = jQuery(this).closest("li")[0];
		temp = parent_li.id.split('_');
		dim_id = temp[1];
		var uncommon_li_list = jQuery("#layoutWrapper .content .msContent .multiSelect td .brandList li.uncommon").filter(function(){temp = this.id.split('_'); return dim_id == temp[1];});
		if(uncommon_li_list.length == 0){
		  this.blur();
			return false;
	  }
		var uncommon_hidden_li_list = jQuery("#layoutWrapper .content .msContent .multiSelect td .brandList li.uncommon.hide").filter(function(){temp = this.id.split('_'); return dim_id == temp[1];});
		if(uncommon_hidden_li_list.length){
		  jQuery(this).removeClass("expand").addClass("collapse");
			jQuery(uncommon_li_list).removeClass("hide");
		}else{
			jQuery(this).removeClass("collapse").addClass("expand");
			jQuery(uncommon_li_list).addClass("hide");
	  }
		this.blur();
		return false;
  });
  jQuery("#c-filters-zone-3-link").click(function(event){
    if(jQuery("#c-filters-zone-3-dropdown").is(":hidden")){
		  jQuery("#c-filters-zone-3-dropdown").show();
		  jQuery(this).css("border-bottom", "0");
	  }else{
		  jQuery("#c-filters-zone-3-dropdown").hide();
		  jQuery(this).css("border-bottom", "1px #174189 solid");
		}
	});
	jQuery(document).click(function(event){
    if(jQuery(event.target).closest("#c-filters-zone-3").length == 0){
		  jQuery("#c-filters-zone-3-dropdown").hide();
		  jQuery("#c-filters-zone-3-link").css("border-bottom", "1px #174189 solid");
		}
	});
  jQuery("#c-filters-zone-3-dropdown span.d_a").click(function(event){
	  temp = this.id.split("^^");
		jQuery("#c-filters-zone-3-dropdown-li\\^\\^" + temp[1]).toggleClass("checked");
	});
  jQuery("#c-filters-zone-3-show-products li").click(function(event){
		var _url_ = '/templates/endeca/xt/xt-zone-3-make-url.php?url=' + encodeURIComponent(_ENDECA_UNFRIENDLY_CLEAN_UP_01_URL_);
		jQuery("#c-filters-zone-3-dropdown li.checked").each(function(){
  	  temp = this.id.split("^^");
			_url_ += "&values[]=" + temp[1];
		});
		window.location = _url_;
	});
});
function writeCmEndecaCode(e){return true;}
