(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($){$.fn.fixPNG=function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+($(this).css('backgroundRepeat')=='no-repeat'?'crop':'scale')+", src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')
$(this).css('position','relative');});}});};var elem,opts,busy=false,imagePreloader=new Image,loadingTimer,loadingFrame=1,imageRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;var isIE=($.browser.msie&&parseInt($.browser.version.substr(0,1),10)<7);$.fn.fancybox=function(settings){settings=$.extend({},$.fn.fancybox.defaults,settings);var matchedGroup=this;function _initialize(){elem=this;opts=settings;_start();return false;};function _start(){if(busy)return;if($.isFunction(opts.callbackOnStart)){opts.callbackOnStart();}
opts.itemArray=[];opts.itemCurrent=0;if(settings.itemArray.length>0){opts.itemArray=settings.itemArray;}else{var item={};if(!elem.rel||elem.rel==''){var item={href:elem.href,title:elem.title};if($(elem).children("img:first").length){item.orig=$(elem).children("img:first");}
opts.itemArray.push(item);}else{var subGroup=$(matchedGroup).filter("a[rel="+elem.rel+"]");var item={};for(var i=0;i<subGroup.length;i++){item={href:subGroup[i].href,title:subGroup[i].title};if($(subGroup[i]).children("img:first").length){item.orig=$(subGroup[i]).children("img:first");}
opts.itemArray.push(item);}
while(opts.itemArray[opts.itemCurrent].href!=elem.href){opts.itemCurrent++;}}}
if(opts.overlayShow){if(isIE){$('embed, object, select').css('visibility','hidden');}
$("#fancy_overlay").css('opacity',opts.overlayOpacity).show();}
_change_item();};function _change_item(){$("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();var href=opts.itemArray[opts.itemCurrent].href;if(href.match(/#/)){var target=window.location.href.split('#')[0];target=href.replace(target,'');target=target.substr(target.indexOf('#'));_set_content('<div id="fancy_div">'+$(target).html()+'</div>',opts.frameWidth,opts.frameHeight);}else if(href.match(imageRegExp)){imagePreloader=new Image;imagePreloader.src=href;if(imagePreloader.complete){_proceed_image();}else{$.fn.fancybox.showLoading();$(imagePreloader).unbind().bind('load',function(){$(".fancy_loading").hide();_proceed_image();});}}else if(href.match("iframe")||elem.className.indexOf("iframe")>=0){_set_content('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+href+'"></iframe>',opts.frameWidth,opts.frameHeight);}else{$.get(href,function(data){_set_content('<div id="fancy_ajax">'+data+'</div>',opts.frameWidth,opts.frameHeight);});}};function _proceed_image(){if(opts.imageScale){var w=$.fn.fancybox.getViewport();var r=Math.min(Math.min(w[0]-36,imagePreloader.width)/imagePreloader.width,Math.min(w[1]-60,imagePreloader.height)/imagePreloader.height);var width=Math.round(r*imagePreloader.width);var height=Math.round(r*imagePreloader.height);}else{var width=imagePreloader.width;var height=imagePreloader.height;}
_set_content('<img alt="" id="fancy_img" src="'+imagePreloader.src+'" />',width,height);};function _preload_neighbor_images(){if((opts.itemArray.length-1)>opts.itemCurrent){var href=opts.itemArray[opts.itemCurrent+1].href;if(href.match(imageRegExp)){objNext=new Image();objNext.src=href;}}
if(opts.itemCurrent>0){var href=opts.itemArray[opts.itemCurrent-1].href;if(href.match(imageRegExp)){objNext=new Image();objNext.src=href;}}};function _set_content(value,width,height){busy=true;var pad=opts.padding;if(isIE){$("#fancy_content")[0].style.removeExpression("height");$("#fancy_content")[0].style.removeExpression("width");}
if(pad>0){width+=pad*2;height+=pad*2;$("#fancy_content").css({'top':pad+'px','right':pad+'px','bottom':pad+'px','left':pad+'px','width':'auto','height':'auto'});if(isIE){$("#fancy_content")[0].style.setExpression('height','(this.parentNode.clientHeight - 20)');$("#fancy_content")[0].style.setExpression('width','(this.parentNode.clientWidth - 20)');}}else{$("#fancy_content").css({'top':0,'right':0,'bottom':0,'left':0,'width':'100%','height':'100%'});}
if($("#fancy_outer").is(":visible")&&width==$("#fancy_outer").width()&&height==$("#fancy_outer").height()){$("#fancy_content").fadeOut("fast",function(){$("#fancy_content").empty().append($(value)).fadeIn("normal",function(){_finish();});});return;}
var w=$.fn.fancybox.getViewport();var itemLeft=(width+36)>w[0]?w[2]:(w[2]+Math.round((w[0]-width-36)/2));var itemTop=(height+50)>w[1]?w[3]:(w[3]+Math.round((w[1]-height-50)/2));var itemOpts={'left':itemLeft,'top':itemTop,'width':width+'px','height':height+'px'};if($("#fancy_outer").is(":visible")){$("#fancy_content").fadeOut("normal",function(){$("#fancy_content").empty();$("#fancy_outer").animate(itemOpts,opts.zoomSpeedChange,opts.easingChange,function(){$("#fancy_content").append($(value)).fadeIn("normal",function(){_finish();});});});}else{if(opts.zoomSpeedIn>0&&opts.itemArray[opts.itemCurrent].orig!==undefined){$("#fancy_content").empty().append($(value));var orig_item=opts.itemArray[opts.itemCurrent].orig;var orig_pos=$.fn.fancybox.getPosition(orig_item);$("#fancy_outer").css({'left':(orig_pos.left-18)+'px','top':(orig_pos.top-18)+'px','width':$(orig_item).width(),'height':$(orig_item).height()});if(opts.zoomOpacity){itemOpts.opacity='show';}
$("#fancy_outer").animate(itemOpts,opts.zoomSpeedIn,opts.easingIn,function(){_finish();});}else{$("#fancy_content").hide().empty().append($(value)).show();$("#fancy_outer").css(itemOpts).fadeIn("normal",function(){_finish();});}}};function _set_navigation(){if(opts.itemCurrent!=0){$("#fancy_left").unbind().bind("click",function(e){opts.itemCurrent--;_change_item();return false;});$("#fancy_left").show();}
if(opts.itemCurrent!=(opts.itemArray.length-1)){$("#fancy_right").unbind().bind("click",function(e){opts.itemCurrent++;_change_item();return false;});$("#fancy_right").show();}};function _finish(){_set_navigation();_preload_neighbor_images();$(document).keydown(function(e){if(e.keyCode==27){$.fn.fancybox.close();$(document).unbind("keydown");}else if(e.keyCode==37&&opts.itemCurrent!=0){opts.itemCurrent--;_change_item();$(document).unbind("keydown");}else if(e.keyCode==39&&opts.itemCurrent!=(opts.itemArray.length-1)){opts.itemCurrent++;_change_item();$(document).unbind("keydown");}});if(opts.centerOnScroll){$(window).bind("resize scroll",$.fn.fancybox.scrollBox);}else{$("div#fancy_outer").css("position","absolute");}
if(opts.hideOnContentClick){$("#fancy_wrap").click($.fn.fancybox.close);}
$("#fancy_overlay, #fancy_close").bind("click",$.fn.fancybox.close);$("#fancy_close").show();if(opts.itemArray[opts.itemCurrent].title!==undefined&&opts.itemArray[opts.itemCurrent].title.length>0){$('#fancy_title div').html(opts.itemArray[opts.itemCurrent].title);$('#fancy_title').show();}
if(opts.overlayShow&&isIE){$('embed, object, select',$('#fancy_content')).css('visibility','visible');}
if($.isFunction(opts.callbackOnShow)){opts.callbackOnShow();}
busy=false;};return this.unbind('click').click(_initialize);};$.fn.fancybox.scrollBox=function(){var pos=$.fn.fancybox.getViewport();$("#fancy_outer").css('left',(($("#fancy_outer").width()+36)>pos[0]?pos[2]:pos[2]+Math.round((pos[0]-$("#fancy_outer").width()-36)/2)));$("#fancy_outer").css('top',(($("#fancy_outer").height()+50)>pos[1]?pos[3]:pos[3]+Math.round((pos[1]-$("#fancy_outer").height()-50)/2)));};$.fn.fancybox.getNumeric=function(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true),10)||0;};$.fn.fancybox.getPosition=function(el){var pos=el.offset();pos.top+=$.fn.fancybox.getNumeric(el,'paddingTop');pos.top+=$.fn.fancybox.getNumeric(el,'borderTopWidth');pos.left+=$.fn.fancybox.getNumeric(el,'paddingLeft');pos.left+=$.fn.fancybox.getNumeric(el,'borderLeftWidth');return pos;};$.fn.fancybox.showIframe=function(){$(".fancy_loading").hide();$("#fancy_frame").show();};$.fn.fancybox.getViewport=function(){return[$(window).width(),$(window).height(),$(document).scrollLeft(),$(document).scrollTop()];};$.fn.fancybox.animateLoading=function(){if(!$("#fancy_loading").is(':visible')){clearInterval(loadingTimer);return;}
$("#fancy_loading > div").css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12;};$.fn.fancybox.showLoading=function(){clearInterval(loadingTimer);var pos=$.fn.fancybox.getViewport();$("#fancy_loading").css({'left':((pos[0]-40)/2+pos[2]),'top':((pos[1]-40)/2+pos[3])}).show();$("#fancy_loading").bind('click',$.fn.fancybox.close);loadingTimer=setInterval($.fn.fancybox.animateLoading,66);};$.fn.fancybox.close=function(){busy=true;$(imagePreloader).unbind();$("#fancy_overlay, #fancy_close").unbind();if(opts.hideOnContentClick){$("#fancy_wrap").unbind();}
$("#fancy_close, .fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();if(opts.centerOnScroll){$(window).unbind("resize scroll");}
__cleanup=function(){$("#fancy_overlay, #fancy_outer").hide();if(opts.centerOnScroll){$(window).unbind("resize scroll");}
if(isIE){$('embed, object, select').css('visibility','visible');}
if($.isFunction(opts.callbackOnClose)){opts.callbackOnClose();}
busy=false;};if($("#fancy_outer").is(":visible")!==false){if(opts.zoomSpeedOut>0&&opts.itemArray[opts.itemCurrent].orig!==undefined){var orig_item=opts.itemArray[opts.itemCurrent].orig;var orig_pos=$.fn.fancybox.getPosition(orig_item);var itemOpts={'left':(orig_pos.left-18)+'px','top':(orig_pos.top-18)+'px','width':$(orig_item).width(),'height':$(orig_item).height()};if(opts.zoomOpacity){itemOpts.opacity='hide';}
$("#fancy_outer").stop(false,true).animate(itemOpts,opts.zoomSpeedOut,opts.easingOut,__cleanup);}else{$("#fancy_outer").stop(false,true).fadeOut("fast",__cleanup);}}else{__cleanup();}
return false;};$.fn.fancybox.build=function(){var html='';html+='<div id="fancy_overlay"></div>';html+='<div id="fancy_wrap">';html+='<div class="fancy_loading" id="fancy_loading"><div></div></div>';html+='<div id="fancy_outer">';html+='<div id="fancy_inner">';html+='<div id="fancy_close"></div>';html+='<a id="fancy_left"></a><a id="fancy_right"></a>';html+='<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>';html+='<div id="fancy_content"></div>';html+='<div id="fancy_title"></div>';html+='</div>';html+='</div>';html+='</div>';$(html).appendTo("body");$('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo('#fancy_title');if(isIE){$("#fancy_inner").prepend('<iframe class="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>');$("#fancy_close, .fancy_bg, .fancy_title").fixPNG();}};$.fn.fancybox.defaults={padding:10,imageScale:true,zoomOpacity:false,zoomSpeedIn:0,zoomSpeedOut:0,zoomSpeedChange:300,easingIn:'swing',easingOut:'swing',easingChange:'swing',frameWidth:425,frameHeight:355,overlayShow:true,overlayOpacity:0.3,hideOnContentClick:true,centerOnScroll:true,itemArray:[],callbackOnStart:null,callbackOnShow:null,callbackOnClose:null};$(document).ready(function(){$.fn.fancybox.build();});})(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);