(function($){$.fn.defaulttext=function(options){var elText={title:function(input){return $(input).attr('title');},label:function(input){return $('label[for='+input.id+']').text();}},delay=50,loadDelay=100,selector=this.selector,$form=this.parents('form:first');$form.bind('blurText.dt',function(event){var $tgt=$(event.target),prevClass=$tgt.data('dtInfo')&&$tgt.data('dtInfo').prevClass||'';if($.trim($tgt.val())===''){$tgt.prev(prevClass).show();}else{$tgt.prev(prevClass).hide();}}).bind('focusText.dt',function(event,el){var tgt=event.target;$(tgt).prev().hide();if(!$(el).is(':dtinput')){tgt.focus();}}).bind('keyupText.dt',function(event){});this.filter(':dtinput').each(function(){var $input=$(this);var opts=$.extend({},$.fn.defaulttext.defaults,options||{},$.metadata?$input.metadata():$.meta?$input.data():{});if(opts.text.constructor===Function){$input.data('defaultText',opts.text(this));}else if(opts.text&&opts.text.constructor===String){$input.data('dtInfo',{text:((/(title|label)/).test(opts.text)?elText[opts.text](this):opts.text)});if(opts.text==='label'){$('label[for= '+this.id+']').css({position:'absolute',left:'-4000em'});}}
if(!$input.data('dtInfo').text){return $input.removeData('dtInfo');}
$input.data('dtinfo',{prevClass:opts.defaultClass?'.'+opts.defaultClass:''});if($input.parent().css('position')=='static'){$input.parent().css({position:'relative'});}
$(opts.tag).html($input.data('dtInfo').text).addClass(opts.defaultClass).css({position:'absolute',top:$input.position().top,left:$input.position().left,display:'none'}).insertBefore($input);var focused;$input.bind('focus',function(event){$input.trigger('focusText.dt',event.target);focused=setTimeout(function(){$input.trigger('focusText.dt',event.target);},delay);});$input.prev($input.data('dtInfo').prevClass).bind('click',function(event){$input.trigger('focusText.dt',event.target);});$input.bind('blur',function(event){clearTimeout(focused);$form.find(':dtinput').trigger('blurText.dt');}).bind('keyup',function(event){if(event.which!=9){setTimeout(function(){$form.find(':dtinput').filter(function(){return $.data(event.target)!=$.data(this);}).trigger('blurText.dt');},delay);}});$(window).bind('load',function(){setTimeout(function(){$input.trigger('focusText.dt',$input);$input.trigger('blurText.dt');},delay+loadDelay);});});function dtHide(el){el.prev().hide();}
return this;};$.fn.defaulttext.defaults={tag:'<span></span>',defaultClass:'default-text',text:'label'};$.extend($.expr[':'],{dtinput:function(element,index,matches,set){return(/text|password/i).test(element.type)||element.nodeName.toLowerCase()==='textarea';}});})(jQuery);;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
if(p==this){return false;}
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);;(function($){$.superfish={};$.superfish.o=[];$.superfish.op={};$.superfish.defaults={ul:'ul',hoverClass:'sfHover',pathClass:'overideThisToUse',delay:800,animation:{opacity:'show'},speed:'normal',oldJquery:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.superfish=function(op){var o=$.extend({},$.superfish.defaults,op);var bcClass='sfbreadcrumb',over=function(){var $$=$(this),menu=getMenu($$);getOpts(menu,true);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$);var o=getOpts(menu,true);clearTimeout(menu.sfTimer);if(!$$.is('.'+bcClass)){menu.sfTimer=setTimeout(function(){$$.hideSuperfishUl();if(o.$path.length){over.call(o.$path);}},o.delay);}},getMenu=function($el){return $el.parents('ul.superfish:first')[0];},getOpts=function(el,menuFound){el=menuFound?el:getMenu(el);return $.superfish.op=$.superfish.o[el.serial];},hasUl=function(){return $.superfish.op.oldJquery?'li[ul]':'li:has('+o.ul+')';};return this.each(function(){var s=this.serial=$.superfish.o.length;o.$path=$('li.'+o.pathClass,this).each(function(){$(this).addClass(o.hoverClass+' '+bcClass).filter(hasUl()).removeClass(o.pathClass);});$.superfish.o[s]=$.superfish.op=o;$(hasUl(),this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).not('.'+bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).addClass('superfish');};$.fn.extend({hideSuperfishUl:function(){var o=$.superfish.op,$ul=$('li.'+o.hoverClass,this).add(this).removeClass(o.hoverClass).children(o.ul).hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=$.superfish.op,$ul=this.addClass(o.hoverClass).children(o.ul+':hidden').css('visibility','visible');o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){o.onShow.call(this);});return this;}});$(window).unload(function(){$('ul.superfish').each(function(){$('li',this).unbind('mouseover','mouseout','mouseenter','mouseleave');});});})(jQuery);;(function($){function searchSubmit(){document.getElementById('q').value=document.forms.srchglobal.s.value;document.getElementById('srch-global').submit();return false;}
$('#srch-global').submit(searchSubmit);if(document.getElementById('detail-carousel')||document.getElementById('feat-carousel')){$.getScript('/javascripts/jquery.jcarousellite.js',function(){$(document).ready(function(){var carousels=($('#feat-carousel .feat-carousel').length?'.feat-carousel':'#feat-carousel')+', #detail-carousel';$(carousels).each(function(index){var thisId=this.id,numberVisible=5,$carousel=$(this),$prev=$carousel.find('.previous_button').addClass('previous_button_disabled'),$next=$carousel.find('.next_button');var carouselOptions={visible:numberVisible,circular:false,scroll:thisId=='detail-carousel'?1:numberVisible,btnPrev:'#'+thisId+' .previous_button',btnNext:'#'+thisId+' .next_button',afterEnd:function(vis){if(vis.filter(':last').next().length){$next.removeClass('next_button_disabled');}else{$next.addClass('next_button_disabled');}
if(vis.filter(':first').prev().length){$prev.removeClass('previous_button_disabled');}else{$prev.addClass('previous_button_disabled');}}};if($carousel.find('li').length>numberVisible){$prev.show();$next.show();}
$carousel.find('.container').jCarouselLite(carouselOptions);});$('.js-vis-hidden').removeClass('js-vis-hidden');});});}else{$('#product-images .js-vis-hidden').removeClass('js-vis-hidden');}
$(document).ready(function(jQuery){if(typeof $.fn.cycle!='undefined'){$('.slideshow .slides').after('<ul id="slideshow-pager" class="nav"></ul>').cycle({pause:1,speed:500,timeout:6000,pager:'#slideshow-pager',pagerAnchorBuilder:function(idx,slide){return'<li><a href="#">'+(+idx+1)+'</a></li>';}});}
$('#nav').superfish({animation:{height:'show'},delay:400,speed:300,ul:'div'});if(document.getElementById('ideas-gallery')){$.getScript('/javascripts/ideas.js');}
$('#srch-global-input').defaulttext({text:'title'});if(location.pathname.indexOf('/products/')>-1){var merchant_id=1917;$.getScript('http://reporting.singlefeed.com/z/track.js?v=1.1');}
if(typeof $.fn.fancybox!='undefined'){$('a.fancybox').fancybox();}
if(FM.validate){$.getScript('/javascripts/jquery.tinyvalidate.js',function(){$('#btnAddToCart').show();});}
$(window).bind('load',function(event){var $tipLinks=$('.tooltip');if($tipLinks.length){var $tooltip=$(['<div class="ui-tooltip ui-widget ui-widget-content ui-corner-all"><div class="sc-tip">','<div class="ui-tooltip-content ui-widget-content"></div>','</div></div>'].join(''));var delayTip,delayTime=200,leftAdjust=20;$tooltip.hide().appendTo('body');$tipContent=$tooltip.find('.ui-tooltip-content');$tipLinks.bind('mouseenter',function(){var tipTop=$(this).offset().top+$(this).height(),tipLeft=$(this).offset().left+leftAdjust,tipText=this.rel;clearTimeout(delayTip);if($tooltip.is(':hidden')){delayTip=setTimeout(function(){$tipContent.html(tipText);$tooltip.css({top:tipTop,left:tipLeft}).show();},delayTime);}}).bind('mouseleave',function(){clearTimeout(delayTip);$tooltip.hide();});}
$('#admin-bar-log-out').click(function(){return confirm('Are you sure you want to log out?');});});});$(document).ready(function(){if($('.domtabs').length){return;}
var $tabLinks=$('.tabs a');$tabLinks.click(function(){$(this).addClass('active').siblings().removeClass('active');var thisHash=this.hash;$(thisHash).show().css({left:0}).siblings().hide();return false;});});$(document).ready(function(){var $videoLinks=$('.walkstation-contest .video a[href*=youtube]');if(!$videoLinks.length){return;}
var mediaOptions={type:'swf',width:276,height:230};$videoLinks.each(function(index){var $clonedLink=$(this).clone().text('Rate this video');$(this).parent().find('p:last').append(' ').append($clonedLink);});$videoLinks.attr('href',function(){return'http://'+this.hostname+'/v/'+this.href.split('v=')[1];});$.getScript('/javascripts/jquery.media.js',function(){var loadVideo=window.setInterval(function(){if($.fn.media!='undefined'){$videoLinks.media(mediaOptions);clearInterval(loadVideo);}},40);});});})(jQuery);