jQuery(document).ready(function(){FORMALIZE.go();});var FORMALIZE=(function($,window,document,undefined){var PLACEHOLDER_SUPPORTED='placeholder'in document.createElement('input');var AUTOFOCUS_SUPPORTED='autofocus'in document.createElement('input');var WEBKIT='webkitAppearance'in document.createElement('select').style;var IE6=!!($.browser.msie&&parseInt($.browser.version,10)===6);var IE7=!!($.browser.msie&&parseInt($.browser.version,10)===7);return{go:function(){for(var i in FORMALIZE.init){FORMALIZE.init[i]();}},init:{detect_webkit:function(){if(!WEBKIT){return;}
$('html').addClass('is_webkit');},full_input_size:function(){if(!IE7||!$('textarea, input.input_full').length){return;}
$('textarea, input.input_full').wrap('<span class="input_full_wrap"></span>');},ie6_skin_inputs:function(){if(!IE6||!$('input, select, textarea').length){return;}
var button_regex=/button|submit|reset/;var type_regex=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$('input').each(function(){var el=$(this);if(this.getAttribute('type').match(button_regex)){el.addClass('ie6_button');if(this.disabled){el.addClass('ie6_button_disabled');}}
else if(this.getAttribute('type').match(type_regex)){el.addClass('ie6_input');if(this.disabled){el.addClass('ie6_input_disabled');}}});$('textarea, select').each(function(){if(this.disabled){$(this).addClass('ie6_input_disabled');}});},placeholder:function(){if(PLACEHOLDER_SUPPORTED||!$(':input[placeholder]').length){return;}
$(':input[placeholder]').each(function(){var el=$(this);var text=el.attr('placeholder');function add_placeholder(){if(!el.val()||el.val()===text){el.val(text).addClass('placeholder_text');}}
add_placeholder();el.focus(function(){if(el.val()===text){el.val('').removeClass('placeholder_text');;}}).blur(function(){add_placeholder();});el.closest('form').submit(function(){if(el.val()===text){el.val('');}}).bind('reset',function(){setTimeout(add_placeholder,50);});});},autofocus:function(){if(AUTOFOCUS_SUPPORTED||!$(':input[autofocus]').length){return;}
$(':input[autofocus]:visible:first').select();}}};})(jQuery,this,this.document);
(function($){$.fn.nmcDropDown=function(options){var opts=$.extend({},$.fn.nmcDropDown.defaults,options);return this.each(function(){var menu=$(this);submenus=menu.children(opts.menu_selector+':has('+opts.submenu_selector+')').addClass(opts.menu_class);if(opts.fix_IE){menu.css('z-index',51).parents().each(function(i){if($(this).css('position')=='relative'){$(this).css('z-index',(i+52));}});submenus.children(opts.submenu_selector).css('z-index',50);}
over=function(e){$(e).addClass(opts.active_class).children(opts.submenu_selector).animate(opts.show,opts.show_speed);return false;}
out=function(e){$(e).removeClass(opts.active_class).children(opts.submenu_selector).animate(opts.hide,opts.hide_speed);return false;}
if(opts.trigger=='click'){submenus.click(function(event){if($(event.target).parent().get(0)==this){event.preventDefault();$(this).hasClass(opts.active_class)?out(this):over(this);}}).children(opts.submenu_selector).hide();}else if($().hoverIntent){submenus.hoverIntent({interval:opts.show_delay,over:over,timeout:opts.hide_delay,out:out}).children(opts.submenu_selector).hide();}else{submenus.hover(over,out).children(opts.submenu_selector).hide();}});};$.fn.nmcDropDown.defaults={trigger:'hover',menu_class:'dropdown',active_class:'open',menu_selector:'li',submenu_selector:'ul',show:{opacity:'show'},show_speed:300,show_delay:50,hide:{opacity:'hide'},hide_speed:200,hide_delay:100,fix_IE:true};})(jQuery);
(function(window,$,undefined){var $event=$.event,resizeTimeout;$event.special.smartresize={setup:function(){$(this).bind("resize",$event.special.smartresize.handler);},teardown:function(){$(this).unbind("resize",$event.special.smartresize.handler);},handler:function(event,execAsap){var context=this,args=arguments;event.type="smartresize";if(resizeTimeout){clearTimeout(resizeTimeout);}
resizeTimeout=setTimeout(function(){jQuery.event.handle.apply(context,args);},execAsap==="execAsap"?0:100);}};$.fn.smartresize=function(fn){return fn?this.bind("smartresize",fn):this.trigger("smartresize",["execAsap"]);};$.Mason=function(options,element){this.element=$(element);this._create(options);this._init();};var masonryContainerStyles=['position','height'];$.Mason.settings={isResizable:true,isAnimated:false,animationOptions:{queue:false,duration:500},gutterWidth:0,isRTL:false,isFitWidth:false};$.Mason.prototype={_filterFindBricks:function($elems){var selector=this.options.itemSelector;return!selector?$elems:$elems.filter(selector).add($elems.find(selector));},_getBricks:function($elems){var $bricks=this._filterFindBricks($elems).css({position:'absolute'}).addClass('masonry-brick');return $bricks;},_create:function(options){this.options=$.extend(true,{},$.Mason.settings,options);this.styleQueue=[];this.reloadItems();var elemStyle=this.element[0].style;this.originalStyle={};for(var i=0,len=masonryContainerStyles.length;i<len;i++){var prop=masonryContainerStyles[i];this.originalStyle[prop]=elemStyle[prop]||'';}
this.element.css({position:'relative'});this.horizontalDirection=this.options.isRTL?'right':'left';this.offset={};var $cursor=$(document.createElement('div'));this.element.prepend($cursor);this.offset.y=Math.round($cursor.position().top);if(!this.options.isRTL){this.offset.x=Math.round($cursor.position().left);}else{$cursor.css({'float':'right',display:'inline-block'});this.offset.x=Math.round(this.element.outerWidth()-$cursor.position().left);}
$cursor.remove();var instance=this;setTimeout(function(){instance.element.addClass('masonry');},0);if(this.options.isResizable){$(window).bind('smartresize.masonry',function(){instance.resize();});}},_init:function(callback){this._getColumns('masonry');this._reLayout(callback);},option:function(key,value){if($.isPlainObject(key)){this.options=$.extend(true,this.options,key);}},layout:function($bricks,callback){var $brick,colSpan,groupCount,groupY,groupColY,j;for(var i=0,len=$bricks.length;i<len;i++){$brick=$($bricks[i]);colSpan=Math.ceil($brick.outerWidth(true)/this.columnWidth);colSpan=Math.min(colSpan,this.cols);if(colSpan===1){this._placeBrick($brick,this.colYs);}else{groupCount=this.cols+1-colSpan;groupY=[];for(j=0;j<groupCount;j++){groupColY=this.colYs.slice(j,j+colSpan);groupY[j]=Math.max.apply(Math,groupColY);}
this._placeBrick($brick,groupY);}}
var containerSize={};containerSize.height=Math.max.apply(Math,this.colYs)-this.offset.y;if(this.options.isFitWidth){var unusedCols=0,i=this.cols;while(--i){if(this.colYs[i]!==this.offset.y){break;}
unusedCols++;}
containerSize.width=(this.cols-unusedCols)*this.columnWidth-this.options.gutterWidth;}
this.styleQueue.push({$el:this.element,style:containerSize});var styleFn=!this.isLaidOut?'css':(this.options.isAnimated?'animate':'css'),animOpts=this.options.animationOptions;var obj;for(i=0,len=this.styleQueue.length;i<len;i++){obj=this.styleQueue[i];obj.$el[styleFn](obj.style,animOpts);}
this.styleQueue=[];if(callback){callback.call($bricks);}
this.isLaidOut=true;},_getColumns:function(){var container=this.options.isFitWidth?this.element.parent():this.element,containerWidth=container.width();this.columnWidth=this.options.columnWidth||this.$bricks.outerWidth(true)||containerWidth;this.columnWidth+=this.options.gutterWidth;this.cols=Math.floor((containerWidth+this.options.gutterWidth)/this.columnWidth);this.cols=Math.max(this.cols,1);},_placeBrick:function($brick,setY){var minimumY=Math.min.apply(Math,setY),shortCol=0;for(var i=0,len=setY.length;i<len;i++){if(setY[i]===minimumY){shortCol=i;break;}}
var position={top:minimumY};position[this.horizontalDirection]=this.columnWidth*shortCol+this.offset.x;this.styleQueue.push({$el:$brick,style:position});var setHeight=minimumY+$brick.outerHeight(true),setSpan=this.cols+1-len;for(i=0;i<setSpan;i++){this.colYs[shortCol+i]=setHeight;}},resize:function(){var prevColCount=this.cols;this._getColumns('masonry');if(this.cols!==prevColCount){this._reLayout();}},_reLayout:function(callback){var i=this.cols;this.colYs=[];while(i--){this.colYs.push(this.offset.y);}
this.layout(this.$bricks,callback);},reloadItems:function(){this.$bricks=this._getBricks(this.element.children());},reload:function(callback){this.reloadItems();this._init(callback);},appended:function($content,isAnimatedFromBottom,callback){if(isAnimatedFromBottom){this._filterFindBricks($content).css({top:this.element.height()});var instance=this;setTimeout(function(){instance._appended($content,callback);},1);}else{this._appended($content,callback);}},_appended:function($content,callback){var $newBricks=this._getBricks($content);this.$bricks=this.$bricks.add($newBricks);this.layout($newBricks,callback);},remove:function($content){this.$bricks=this.$bricks.not($content);$content.remove();},destroy:function(){this.$bricks.removeClass('masonry-brick').each(function(){this.style.position='';this.style.top='';this.style.left='';});var elemStyle=this.element[0].style;for(var i=0,len=masonryContainerStyles.length;i<len;i++){var prop=masonryContainerStyles[i];elemStyle[prop]=this.originalStyle[prop];}
this.element.unbind('.masonry').removeClass('masonry').removeData('masonry');$(window).unbind('.masonry');}};$.fn.imagesLoaded=function(callback){var $this=this,$images=$this.find('img').add($this.filter('img')),len=$images.length,blank='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';function triggerCallback(){callback.call($this,$images);}
function imgLoaded(){if(--len<=0&&this.src!==blank){setTimeout(triggerCallback);$images.unbind('load error',imgLoaded);}}
if(!len){triggerCallback();}
$images.bind('load error',imgLoaded).each(function(){if(this.complete||this.complete===undefined){var src=this.src;this.src=blank;this.src=src;}});return $this;};var logError=function(message){if(this.console){console.error(message);}};$.fn.masonry=function(options){if(typeof options==='string'){var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$.data(this,'masonry');if(!instance){logError("cannot call methods on masonry prior to initialization; "+"attempted to call method '"+options+"'");return;}
if(!$.isFunction(instance[options])||options.charAt(0)==="_"){logError("no such method '"+options+"' for masonry instance");return;}
instance[options].apply(instance,args);});}else{this.each(function(){var instance=$.data(this,'masonry');if(instance){instance.option(options||{});instance._init();}else{$.data(this,'masonry',new $.Mason(options,this));}});}
return this;};})(window,jQuery);
(function($){$.fn.lightbox_me=function(options){return this.each(function(){var
opts=$.extend({},$.fn.lightbox_me.defaults,options),$overlay=$(),$self=$(this),$iframe=$('<iframe id="foo" style="z-index: '+(opts.zIndex+1)+';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/>'),ie6=($.browser.msie&&$.browser.version<7);if(opts.showOverlay){var $currentOverlays=$(".js_lb_overlay:visible");if($currentOverlays.length>0){$overlay=$('<div class="lb_overlay_clear js_lb_overlay"/>');}else{$overlay=$('<div class="'+opts.classPrefix+'_overlay js_lb_overlay"/>');}}
if(ie6){var src=/^https/i.test(window.location.href||'')?'javascript:false':'about:blank';$iframe.attr('src',src);$('body').append($iframe);}
$('body').append($self.hide()).append($overlay);if(opts.showOverlay){setOverlayHeight();$overlay.css({position:'absolute',width:'100%',top:0,left:0,right:0,bottom:0,zIndex:(opts.zIndex+2),display:'none'});if(!$overlay.hasClass('lb_overlay_clear')){$overlay.css(opts.overlayCSS);}}
if(opts.showOverlay){$overlay.fadeIn(opts.overlaySpeed,function(){setSelfPosition();$self[opts.appearEffect](opts.lightboxSpeed,function(){setOverlayHeight();setSelfPosition();opts.onLoad()});});}else{setSelfPosition();$self[opts.appearEffect](opts.lightboxSpeed,function(){opts.onLoad()});}
if(opts.parentLightbox){opts.parentLightbox.fadeOut(200);}
$(window).resize(setOverlayHeight).resize(setSelfPosition).scroll(setSelfPosition).keyup(observeKeyPress);if(opts.closeClick){$overlay.click(function(e){closeLightbox();e.preventDefault;});}
$self.delegate(opts.closeSelector,"click",function(e){closeLightbox();e.preventDefault();});$self.bind('close',closeLightbox);$self.bind('reposition',setSelfPosition);function closeLightbox(){var s=$self[0].style;if(opts.destroyOnClose){$self.add($overlay).remove();}else{$self.add($overlay).hide();}
if(opts.parentLightbox){opts.parentLightbox.fadeIn(200);}
$iframe.remove();$self.undelegate(opts.closeSelector,"click");$(window).unbind('reposition',setOverlayHeight);$(window).unbind('reposition',setSelfPosition);$(window).unbind('scroll',setSelfPosition);$(document).unbind('keyup',observeKeyPress);if(ie6)
s.removeExpression('top');opts.onClose();}
function observeKeyPress(e){if((e.keyCode==27||(e.DOM_VK_ESCAPE==27&&e.which==0))&&opts.closeEsc)closeLightbox();}
function setOverlayHeight(){if($(window).height()<$(document).height()){$overlay.css({height:$(document).height()+'px'});$iframe.css({height:$(document).height()+'px'});}else{$overlay.css({height:'100%'});if(ie6){$('html,body').css('height','100%');$iframe.css('height','100%');}}}
function setSelfPosition(){var s=$self[0].style;$self.css({zIndex:(opts.zIndex+3)});if(($self.height()+80>=$(window).height())&&($self.css('position')!='absolute'||ie6)){var topOffset=$(document).scrollTop()+40;$self.css({position:'absolute',top:topOffset+'px',marginTop:0})
if(ie6){s.removeExpression('top');}}else if($self.height()+80<$(window).height()){if(ie6){s.position='absolute';if(opts.centered){s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
s.marginTop=0;}else{var top=(opts.modalCSS&&opts.modalCSS.top)?parseInt(opts.modalCSS.top):0;s.setExpression('top','((blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"')}}else{if(opts.centered){$self.css({position:'fixed',top:'50%',marginTop:($self.outerHeight()/2)*-1})}else{$self.css({position:'fixed'}).css(opts.modalCSS);}}}}});};$.fn.lightbox_me.defaults={appearEffect:"fadeIn",appearEase:"",overlaySpeed:250,lightboxSpeed:300,closeSelector:".close",closeClick:true,closeEsc:true,destroyOnClose:false,showOverlay:true,parentLightbox:false,onLoad:function(){},onClose:function(){},classPrefix:'lb',zIndex:999,centered:false,modalCSS:{top:'40px'},overlayCSS:{background:'black',opacity:.3}}})(jQuery);
(function($){var rootElement=("onorientationchange"in window)?$(document):$(window);var methods={init:function(options){return this.each(function(){var $container=$(this),data=$container.data('fullphoto'),opts=$.extend(defaultOpts,options);var $photos=$('img',$container);if($photos.length){var current=0,count=$photos.length,$current_photo=$photos.first();$photos.css({position:'absolute'});$photos.wrap('<div style="opacity: 0; position:absolute; width:100%; height:100%; top:0; left:0; background:'+opts.maskColor+'; z-index: -999999;" />');if(Modernizr.csstransitions){var transition='opacity '+(opts.speed/1000)+'s ease-in-out';$photos.parent().css({'-moz-transition':transition,'-o-transition':transition,'-webkit-transition':transition,'transition':transition});}
$container.data('fullphoto',{opts:opts,current:0,count:count});if($current_photo.height){methods._resize($container,function(){methods.goto.apply($container,[0]);});}else{$current_photo.load(function(){methods._resize($container,function(){methods.goto.apply($container,[0]);});});}
$photos.not($current_photo).load(function(){methods._resize($container);});if(opts.resizable){$(window).resize(function(){methods._resize($container);});}
if(opts.delay){methods.start.apply($container);}}});},start:function(){return this.each(function(){var $container=$(this),data=$container.data('fullphoto');data.timer=setInterval(function(){methods.next.apply($container);},data.opts.delay);$container.data('fullphoto',data);});},pause:function(){return this.each(function(){var $container=$(this),data=$container.data('fullphoto');clearTimeout(data.timer);});},next:function(){return this.each(function(){var $container=$(this),data=$container.data('fullphoto'),index=(data.current>=data.count-1)?0:data.current+1;methods.goto.apply($container,[index]);});},previous:function(){return this.each(function(){var $container=$(this),data=$container.data('fullphoto'),index=(data.current<=0)?data.count-1:data.current-1;methods.goto.apply($container,[index]);});},goto:function(index){return this.each(function(){var $container=$(this);var data=$container.data('fullphoto'),$photos=$('div',$container);if(typeof(data.opts.beforeChange)=="function"){data.opts.beforeChange(data.current,index);}
$current_photo=$photos.eq(index).css('z-index','-999997');if(Modernizr.csstransitions){$current_photo.css({'visibility':'visible','opacity':1});}else{$current_photo.css('visibility','visible').fadeTo(data.opts.speed,1);}
window.setTimeout(function(){$photos.not($current_photo).css({'visibility':'hidden','opacity':0});$photos.css('z-index','-999999');if(typeof(data.opts.afterChange)=="function"){data.opts.afterChange(index);}},data.opts.speed);data.current=index;$container.data('fullphoto',data);});},_resize:function($container,callback){var data=$container.data('fullphoto');var container={width:$container.width(),height:$container.height()};container.aspect=container.width/container.height;$('img',$container).each(function(){var $image=$(this);var image_aspect=$.data($image,'aspect_ratio');var style=$image.data('size-method')||data.opts.style;if(!image_aspect){image_aspect=($image.attr('width')||$image.width())/($image.attr('height')||$image.height());$.data($image,'aspect_ratio',image_aspect);}
if((style!=='contain'&&container.aspect>image_aspect)||(style==='contain'&&container.aspect<image_aspect)){var image_height=container.width/image_aspect,adjustment=(container.height-image_height)/2,css={height:image_height,width:container.width,top:adjustment,left:0};}else{var image_width=container.height*image_aspect,adjustment=(container.width-image_width)/2,css={height:container.height,width:image_width,top:0,left:adjustment};}
$image.css(css);$image.next().css(css);});if(typeof(callback)=="function"){callback();}}};var defaultOpts={style:'cover',delay:4000,speed:1000,resizable:true,maskColor:'#fff',beforeChange:false,afterChange:false};$.fn.fullphoto=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.fullphoto');}};})(jQuery);
jQuery(document).ready(function($){$('#mainNav, .collateral').nmcDropDown({trigger:'click',menu_selector:'li:not(.active, .current)',show:{opacity:'show',height:'show'},hide:{opacity:'hide',height:'hide'}});$('#products').masonry({itemSelector:'li'});$('#photos').fullphoto();if($('#product').length){var $captions=$('ol.captions li').hide(),$counter=$('.photo_current'),$photos=$('#productPhotos');$('.photo_total').text($captions.length);$photos.fullphoto({style:'contain',delay:0,beforeChange:function(old,next){$captions.eq(old).fadeOut(300,function(){$captions.eq(next).fadeIn(500);});$counter.text(next+1);}});$('.photo_prev').click(function(){$photos.fullphoto('previous');return false;});$('.photo_next').click(function(){$photos.fullphoto('next');return false;});$('a[rel="external"]').attr('target','_blank');$(window).load(function(){var $photos=$('#productPhotos img'),length=$photos.length;var createBlurred=function(index){window.setTimeout(function(){var $photo=$photos.eq(index);$photo.clone().pixastic("blurfast",{amount:1}).hide().insertAfter($photo);index++;if(index<length)createBlurred(index);},1000);};createBlurred(0);});$('<a href="#" class="close">&times;</a>').appendTo('.overlay');$('.show_overlay').click(function(){var $blurred=$('#productPhotos img:visible').next().fadeIn(300);$($(this).attr('href')).lightbox_me({centered:false,modalCSS:{},overlayCSS:{background:'black',opacity:0.7},onClose:function(){$blurred.hide();$('#material').remove();}});return false;});$('#materials ul a').click(function(){$('#material').remove();$.get(this.href,function(data){var $material=$("<div>").append(data.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")).find('#material');$material.hide().appendTo('#materials').append('<a href="#" class="closeMaterial">&times;</a>').fadeIn(300);$('.closeMaterial').click(function(){$material.fadeOut(300,function(){$material.remove();});return false;});});return false;});}});
