(function(){var a;var b=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function a(a){this.add_a_close_button=b(this.add_a_close_button,this);this.remove_resize_events=b(this.remove_resize_events,this);this.add_resize_events=b(this.add_resize_events,this);this.add_to_container=b(this.add_to_container,this);this.resize=b(this.resize,this);this.remove=b(this.remove,this);this.on_hide_complete=b(this.on_hide_complete,this);this.handle_close_click=b(this.handle_close_click,this);this.close=b(this.close,this);this.hide=b(this.hide,this);this.show=b(this.show,this);this.build=b(this.build,this);this.init=b(this.init,this);this.el=$(a);if(_.isUndefined(this.remove_on_close)){this.remove_on_close=true}this.init()}a.el;a.container;a.bg;a.remove_on_close;a.prototype.init=function(){if(!this.container){this.container=$("body").children("#overlay")}if(!this.container||this.container.length===0){this.container=$('<div id="overlay" />').appendTo($("body"))}this.add_resize_events();return this.build()};a.prototype.build=function(){this.container.css({display:"none",opacity:0});this.el.css("display","none");this.container.html(this.el);this.el=this.container.children().first();return _.defer(b(function(){var a;a=$('<div class="content" />');this.el.children().wrapAll(a);this.bg=$('<div class="bg" />');this.el.prepend(this.bg);this.bg.width(parseInt(this.el.width())-(parseInt(this.bg.css("border-left-width"))+parseInt(this.bg.css("border-right-width"))));this.bg.height(parseInt(this.el.height())-(parseInt(this.bg.css("border-top-width"))+parseInt(this.bg.css("border-bottom-width"))));return this.resize()},this))};a.prototype.show=function(){if(!this.el.parent().is(this.container)){this.add_to_container}this.resize();this.container.css("display","block");this.el.css("display","block");this.resize();this.container.animate({opacity:1},500,"easeOutQuad",b(function(){return this.container.css("filter","none!important")},this));return $(".close",this.el).bind("click",this.handle_close_click)};a.prototype.hide=function(){var a;a=$.proxy(this.on_hide_complete,this);this.container.animate({opacity:0},{complete:a});return $(".close",this.el).unbind("click",this.handle_close_click)};a.prototype.close=function(){return this.hide()};a.prototype.handle_close_click=function(a){a.preventDefault();return this.hide()};a.prototype.on_hide_complete=function(){this.container.css("display","none");if(this.remove_on_close){return this.remove()}};a.prototype.remove=function(){this.el.remove();return this.remove_resize_events()};a.prototype.resize=function(){var a;a=(this.container.height()-this.el.height())/2;return this.el.css({top:a,position:"relative"})};a.prototype.add_to_container=function(){return this.container.html(this.el)};a.prototype.add_resize_events=function(){return $(window).bind("resize",this.resize)};a.prototype.remove_resize_events=function(){return $(window).unbind("resize",this.resize)};a.prototype.add_a_close_button=function(){return this.el.prepend('<a href="#" class="close" />')};return a}();window.Overlay=a}).call(this);$("header hgroup").hover(function(){log("hello",this);$(this).addClass("hover")},function(){$(this).removeClass("hover")}).click(function(a){var b=$("header nav a.home");b.click();window.location=b.attr("href")});(function(){var a;window.Nav={};$(document).ready(function(){return window.nav=new Nav.Base("header nav")});a=$(".alternate_locales_dropdown select");a.change(function(){var a;a=$(this)[0].value;if(a&&a!==""){return window.location=a}})}).call(this);(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};Nav.Base=function(){function b(b){this.handle_primary_out=a(this.handle_primary_out,this);this.handle_primary_over=a(this.handle_primary_over,this);this.handle_mouse_move=a(this.handle_mouse_move,this);this.handleResize=a(this.handleResize,this);this.el=$(b);this.init()}b.el;b.flyout_container;b.flyout;b.primaries;b.prototype.init=function(){var a,b,c,d,e,f,g,h;this.primaries=[];g=this.el.children("ul").children();for(c=0,e=g.length;c<e;c++){a=g[c];b=new Nav.Primary(a);b.el.bind("nav:mouseover",$.proxy(this.handle_primary_over,this,b));b.el.bind("nav:mouseout",$.proxy(this.handle_primary_out,this,b));this.primaries.push(b)}if(window.mobile){return false}this.flyout_container=$("<div />").attr("id","flyout-container");this.el.after(this.flyout_container);this.flyout=new Nav.Flyout;this.flyout_container.append(this.flyout.el);this.flyout.el.bind("nav:current",$.proxy(this.handle_flyout_current,this));h=this.primaries;for(d=0,f=h.length;d<f;d++){b=h[d];this.flyout.add(b,b.is_complex)}new Nav.Search;$(window).resize(this.handleResize);this.handleResize();return $("html").mousemove(this.handle_mouse_move)};b.prototype.handleResize=function(a){var b;b=this.el.parent().width();this.el.width(b);this.flyout_container.width(b);return this.flyout.resize(b)};b.prototype.handle_mouse_move=function(a){var b,c,d;b=this.el.offset();c=a.pageX-b.left;d=a.pageY-b.top;return this.flyout.mouse(c,d)};b.prototype.debug=function(){return this.primaries[2].handle_over()};b.prototype.handle_primary_over=function(a){var b;a.display_over();return(b=this.flyout)!=null?b.open(a.name):void 0};b.prototype.handle_primary_out=function(a){var b;return(b=this.flyout)!=null?b.close():void 0};b.prototype.handle_flyout_current=function(a,b){var c,d,e,f,g;f=this.primaries;g=[];for(d=0,e=f.length;d<e;d++){c=f[d];g.push(c.name===b?c.display_over():c.display_out())}return g};return b}()}).call(this);(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};Nav.Flyout=function(){function b(){this.mouse=a(this.mouse,this);this.close_complete=a(this.close_complete,this);this.close_start=a(this.close_start,this);this.open_complete=a(this.open_complete,this);this.open_start=a(this.open_start,this);this.is_open=a(this.is_open,this);this.resize=a(this.resize,this);this._do_close=a(this._do_close,this);this.close=a(this.close,this);this.open=a(this.open,this);this.add=a(this.add,this);this.init=a(this.init,this);this.el=$('<div id="flyout" />');this.init()}b.el;b.bg;b.open_class;b.groups;b.max_height;b.current_group;b.animation_timeout;b.is_mouse_over;b.w;b.h;b.prototype.init=function(){this.open_class="open";this.bg=$('<div class="bg" />');this.max_height=255;this.el.prepend(this.bg);this.groups=[];return _.defer(a(function(){return this.el.css("margin-top",-this.max_height)},this))};b.prototype.add=function(a,b){var c;if(b==null){b=false}c=new Nav.FlyoutGroup(a.subnav,b);this.groups[a.name]=c;return this.el.append(c.el)};b.prototype.open=function(a,b){var c,d,e;if(b==null){b={}}clearTimeout(this.animation_timeout);b=$.extend({easing:"easeInOutQuad"},b);c=0;if(this.current_group){this.current_group.hide(c);this.current_group=null;this.current=null;c+=100}this.current_group=this.groups[a];this.current=a;this.el.trigger("nav:current",this.current);e=-Math.min(this.max_height-this.current_group.height(),this.max_height);d=Math.abs(parseInt(this.el.css("margin-top"))-e);if(!d||d===Infinity){d=0}b.duration=Math.max(500*(d/this.max_height),200);this.open_start();this.el.stop(true,false).delay(c).animate({"margin-top":e},b.duration||0,b.easing,this.open_complete);c+=200;return this.current_group.show(c)};b.prototype.close=function(a){clearTimeout(this.animation_timeout);return this.animation_timeout=setTimeout(this._do_close,150)};b.prototype._do_close=function(a){if(this.is_mouse_over&&!Modernizr.touch){return}a=$.extend({duration:300,easing:"easeInOutQuad"},a);this.close_start();this.el.stop(true,false).delay(150).animate({"margin-top":-this.el.height()},a.duration||0,a.easing,this.close_complete);return this.el.trigger("nav:current",null)};b.prototype.resize=function(a){var b,c,d,e;e=this.groups;for(c=0,d=e.length;c<d;c++){b=e[c];b.resize()}this.w=this.el.width();return this.h=this.el.height()};b.prototype.is_open=function(){return this.el.hasClass(this.open_class)};b.prototype.open_start=function(){this.el.show();return this.el.addClass(this.open_class)};b.prototype.open_complete=function(){};b.prototype.close_start=function(){return this.el.removeClass(this.open_class)};b.prototype.close_complete=function(){return this.el.hide()};b.prototype.mouse=function(a,b){var c,d;if(!this.w){this.w=this.el.width()}if(!this.h){this.h=this.el.height()}if(a<this.w&&a>0&&b>0&&b<this.h){d=true}else{d=false}if(d===!this.is_mouse_over){this.is_mouse_over=d;c="nav:mouseout";if(d){c="nav:mouseover"}this.el.trigger(c);return this.close()}};return b}();Nav.FlyoutGroup=function(){function b(b,c){this.hide_complete=a(this.hide_complete,this);this.hide_start=a(this.hide_start,this);this.show_complete=a(this.show_complete,this);this.show_start=a(this.show_start,this);this.is_open=a(this.is_open,this);this.height=a(this.height,this);this.show=a(this.show,this);this.hide=a(this.hide,this);this.build_secondary=a(this.build_secondary,this);this.resize=a(this.resize,this);this.init=a(this.init,this);this.el=$(b);this.is_complex=c;this.init()}b.el;b.wrap;b.slide;b.is_complex;b.secondaries;b.open_class;b.prototype.init=function(){var b,c,d,e,f;this.open_class="showing";c=$("li",this.el);c.wrapAll('<div class="wrap" />');this.wrap=$(".wrap",this.el);if(this.is_complex){this.el.addClass("complex");c.wrapAll('<div class="slide" />');d=215;this.slide=new Nav.Flyout.SlideController($(".slide",this.el),$(".arrows",this.el),c.length,d)}this.secondaries=[];for(e=0,f=c.length;e<f;e++){b=c[e];this.secondaries.push(this.build_secondary(b))}_.defer(a(function(){this.resize();this.hide(0,0);return this.el.height(this.el.height())},this));this.el.show();return this.el.animate({opacity:0},0)};b.prototype.resize=function(){var a,b,c;if(this.secondaries.length===0){return}if(this.is_complex){a=this.secondaries[0].el.width();c=Math.floor(this.wrap.parent().innerWidth()/a);return this.wrap.width(Math.min(a*c,this.wrap.parent().innerWidth()))}else{b=!this.el.is(":hidden");this.el.show();this.wrap.css("float","left");this.wrap.width("auto");this.wrap.width(this.wrap.width()+5);this.wrap.css("float","none");if(!b){return this.el.hide()}}};b.prototype.build_secondary=function(a){var b;if(this.is_complex){b=new Nav.ComplexSecondary(a)}else{b=new Nav.Secondary(a)}return b};b.prototype.hide=function(a,b){var c,d,e,f,g;if(b==null){b=250}this.hide_start();this.el.stop(true,false).delay(a).animate({opacity:0},{duration:b,easing:"easeOutQuad",complete:this.hide_complete});f=this.secondaries;g=[];for(d=0,e=f.length;d<e;d++){c=f[d];g.push(c.out())}return g};b.prototype.show=function(a){this.show_start();return this.el.stop(true,false).delay(a).animate({opacity:1},{duration:350,easing:"easeInOutQuad",complete:this.show_complete})};b.prototype.height=function(){return this.el.height()};b.prototype.is_open=function(){return this.el.hasClass(this.open_class)};b.prototype.show_start=function(){this.el.show();return this.el.addClass(this.open_class)};b.prototype.show_complete=function(){};b.prototype.hide_start=function(){return this.el.removeClass(this.open_class)};b.prototype.hide_complete=function(){return this.el.hide()};return b}()}).call(this);(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};Nav.Flyout.SlideController=function(){function b(b,c,d,e){this.redraw_arrows=a(this.redraw_arrows,this);this.can_slide_right=a(this.can_slide_right,this);this.can_slide_left=a(this.can_slide_left,this);this.slide=a(this.slide,this);this.slide_right=a(this.slide_right,this);this.slide_left=a(this.slide_left,this);this.init_arrow_nav=a(this.init_arrow_nav,this);this.init=a(this.init,this);this.quantize=4;this.el=$(b);this.item_count=d;this.width_per_item=e;this.init();if($(c).length>0){this.init_arrow_nav(c)}}b.el=null;b.current_index=null;b.width_per_item=null;b.item_count=null;b.quantize=null;b.prototype.init=function(){return this.current_index=0};b.prototype.init_arrow_nav=function(a){this.arrow_nav=new Nav.Flyout.ArrowNav($(a));this.arrow_nav.el.bind("left",this.slide_right);this.arrow_nav.el.bind("right",this.slide_left);return this.redraw_arrows()};b.prototype.slide_left=function(){if(this.can_slide_right()){return this.slide(this.quantize)}};b.prototype.slide_right=function(){if(this.can_slide_left()){return this.slide(-this.quantize)}};b.prototype.slide=function(a){var b;this.current_index+=a;this.current_index=Math.min(this.current_index,this.item_count-this.quantize);this.current_index=Math.max(this.current_index,0);b=-(this.current_index*this.width_per_item);this.el.stop(true,false);this.el.animate({"margin-left":b},{duration:600,queue:false,easing:"easeInOutExpo"});if(this.arrow_nav){return this.redraw_arrows()}};b.prototype.can_slide_left=function(){return this.current_index>0};b.prototype.can_slide_right=function(){return this.current_index+this.quantize<this.item_count};b.prototype.redraw_arrows=function(){if(this.can_slide_left()){this.arrow_nav.enable("left")}else{this.arrow_nav.disable("left")}if(this.can_slide_right()){return this.arrow_nav.enable("right")}else{return this.arrow_nav.disable("right")}};return b}();Nav.Flyout.ArrowNav=function(){function b(b){this.disable=a(this.disable,this);this.enable=a(this.enable,this);this.handleRightClick=a(this.handleRightClick,this);this.handleLeftClick=a(this.handleLeftClick,this);this.init=a(this.init,this);this.el=$(b);this.init()}b.el=null;b.left=null;b.right=null;b.prototype.init=function(){this.left=$(".left",this.el);this.right=$(".right",this.el);this.left.click(this.handleLeftClick);return this.right.click(this.handleRightClick)};b.prototype.handleLeftClick=function(){this.el.trigger("left");return false};b.prototype.handleRightClick=function(){this.el.trigger("right");return false};b.prototype.enable=function(a){if(a==null){a=null}switch(a.toLowerCase()){case"left":a=this.left;break;case"right":a=this.right}return a.removeClass("disabled")};b.prototype.disable=function(a){if(a==null){a=null}switch(a.toLowerCase()){case"left":a=this.left;break;case"right":a=this.right}return a.addClass("disabled")};return b}()}).call(this);(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};Nav.Primary=function(){function b(b){this.display_out=a(this.display_out,this);this.display_over=a(this.display_over,this);this.handle_click=a(this.handle_click,this);this.handle_out=a(this.handle_out,this);this.handle_over=a(this.handle_over,this);this.init=a(this.init,this);this.el=$(b);this.init()}b.el;b.subnav;b.animation_delay;b.name;b.is_complex;b.prototype.init=function(){this.name=$("a:first",this.el).text();$("a:first",this.el).click(this.handle_click);if(!window.mobile){this.el.hover(this.handle_over,this.handle_out);this.el.focusin(this.handle_over);this.el.focusout(this.handle_out)}this.subnav=$("ul",this.el);return this.is_complex=this.subnav.hasClass("collections")||this.subnav.hasClass("complications")||this.subnav.hasClass("movements")};b.prototype.handle_over=function(){return _.defer(a(function(){return this.el.trigger("nav:mouseover")},this))};b.prototype.handle_out=function(){return _.defer(a(function(){return this.el.trigger("nav:mouseout")},this))};b.prototype.handle_click=function(a){if(Modernizr.touch&&!window.mobile){a.preventDefault();if(this.el.hasClass("open")){this.display_out();this.handle_out();$("li.open",this.el.parent()).removeClass("open")}else{$("li.open",this.el.parent()).removeClass("open");this.display_over();this.handle_over()}return false}if(this.el.hasClass("mobile-ready")&&Modernizr.touch){a.preventDefault();if(this.el.hasClass("open")){this.display_out()}else{if(window.mobile){$("li.open",this.el.parent()).height(50)}$("li.open",this.el.parent()).removeClass("open");this.display_over()}return false}};b.prototype.display_over=function(){var a;this.el.addClass("open");if(this.el.hasClass("mobile-ready")&&window.mobile){a=$("ul",this.el).height()+50;return this.el.height(a)}};b.prototype.display_out=function(){this.el.removeClass("open");if(this.el.hasClass("mobile-ready")&&window.mobile){return this.el.height(50)}};return b}()}).call(this);(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};Nav.Search=function(){function b(b){this.out=a(this.out,this);this.over=a(this.over,this);this.init=a(this.init,this);this.el=$("#search-form");this.submit=$("input[type=submit]",this.el);this.text=$("input[type=text]",this.el);this.init()}b.prototype.init=function(){return this.el.hover(this.over,this.out)};b.prototype.over=function(){this.text.css("display","block");return this.text.animate({opacity:1},{duration:250,queue:false,easing:"easeOutQuad"})};b.prototype.out=function(){return this.text.animate({opacity:0},{duration:250,easing:"easeOutQuad",queue:false,complete:a(function(){return this.text.css("display","none")},this)})};return b}()}).call(this);(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c){if(b.call(c,d))a[d]=c[d]}e.prototype=c.prototype;a.prototype=new e;a.__super__=c.prototype;return a};Nav.Secondary=function(){function b(b){this.out=a(this.out,this);this.over=a(this.over,this);this.handle_click=a(this.handle_click,this);this.handle_out=a(this.handle_out,this);this.handle_over=a(this.handle_over,this);this.init=a(this.init,this);this.el=$(b);this.init()}b.el=null;b.prototype.init=function(){this.el.hover(this.handle_over,this.handle_out);return this.el.click(this.handle_click)};b.prototype.handle_over=function(){return this.over()};b.prototype.handle_out=function(){return this.out()};b.prototype.handle_click=function(a){var b;b=$(".link a",this.el);if(a.target===b[0]){return true}return window.location=b.attr("href")};b.prototype.over=function(){return this.el.addClass("over")};b.prototype.out=function(){return this.el.removeClass("over")};return b}();Nav.ComplexSecondary=function(){function b(){this.out=a(this.out,this);this.over=a(this.over,this);this.set_count_div_height=a(this.set_count_div_height,this);this.init=a(this.init,this);b.__super__.constructor.apply(this,arguments)}c(b,Nav.Secondary);b.image_div=null;b.count_div=null;b.count_div_height=0;b.prototype.init=function(){this.image_div=$(".image",this.el);this.count_div=$(".count",this.el);this.count_div.slideUp(0);this.el.children().wrapAll('<div class="valign" />');this.el.hover(this.handle_over,this.handle_out);return this.el.click(this.handle_click)};b.prototype.set_count_div_height=function(){var a;a=this.count_div.height();this.count_div.height("auto");this.count_div_height=this.count_div.height();return this.count_div.height(a)};b.prototype.over=function(){b.__super__.over.apply(this,arguments);this.set_count_div_height();this.count_div.stop(true,false).animate({height:this.count_div_height},200);return this.count_div.animate({opacity:1},{duration:200,easing:"easeInQuad",queue:false})};b.prototype.out=function(){b.__super__.out.apply(this,arguments);this.count_div.stop(true,false).animate({height:0},300);return this.count_div.animate({opacity:0},{duration:200,easing:"easeOutQuad",queue:false})};return b}()}).call(this);(function(){var a;a=function(){function n(a){this.initialize(resp)}var a,b,c,d,e,f,g,h,i,j,k,l,m;d=$("#product-carousel");e=$("select",d);c=$(".mask",d);f=$(".wrapper",d);g=$("#carousel-zoom",d).css({opacity:0}).detach();a=$(".previous, .next",d);b=$("#fixed-collection-logo",d);k=[];h=0;i=0;l=c.outerWidth();j=void 0;m=150;n.prototype.initialize=function(a){k=a;n.prototype.render.select();n.prototype.bind.select();n.prototype.render.collection();n.prototype.bind.arrows();return n.prototype.render.logo(k[0])};n.prototype.scroll=function(a){$(".watch",d).unbind("mouseenter");return c.stop().animate({scrollLeft:i},{duration:a||800,easing:"easeInOutExpo",step:function(a){return n.prototype.render.controls()},complete:function(a){n.prototype.bind.zoom();return n.prototype.render.controls()}})};n.prototype.reset=function(){i=0;c.scrollLeft(i);return g.remove()};n.prototype.bind={arrows:function(){n.prototype.reset();return a.unbind("click").bind({click:function(a){g.remove();switch($(this).hasClass("next")){case true:i+=l;break;default:i-=l}if(i<=0){i=0}else{if(i>j){i=j}}return n.prototype.scroll()}})},zoom:function(){return $(".watch",d).unbind("mouseenter").bind({mouseenter:function(a){var b,c;c=$(this).attr("data-index");b=k[h];return n.prototype.render.zoom(b,b.watches[c],$(this).offset())}})},select:function(a){return e.bind({change:function(a){h=parseInt($("option:selected",this).val(),10)||0;f.animate({opacity:0},{duration:400,easing:"easeOutQuad",complete:function(){n.prototype.render.collection(h);n.prototype.bind.arrows();return $(this).animate({opacity:1},{duration:400})}});return b.animate({opacity:0},{duration:400,easing:"easeOutQuad",complete:function(){n.prototype.render.logo(k[h]);return $(this).animate({opacity:1})}})}})}};n.prototype.render={select:function(){var a;a="";_.each(k,function(b,c){return a+=n.prototype.view.option({option:b,i:c})});e.append($(a));return e.trigger("liszt:updated")},logo:function(a){b.removeAttr("class").addClass("logo").addClass(a.slug).html(a.title);if(a.product_carousel_image){return b.attr("style","background-image: url("+a.product_carousel_image+");")}},collection:function(a){var b,c,d,e;i=0;d=k[a||0];b=$(n.prototype.view.collection());n.prototype.render.logo(d.slug,d.title);c=$(".watches",b);_.each(d.watches,function(a,b){var e,f,g;f=$(n.prototype.view.watch({collection:{slug:d.slug},watch:a,i:b}));if(!_.isUndefined(a.watch_image)){g=$(".image",f);e=$("<span/>").load(a.watch_image.urls.carousel,function(){return $(this).trigger("show")}).one({show:function(){return $(this).replaceWith("<img/>").attr({src:a.watch_image.urls.carousel}).appendTo(g).css({opacity:0}).animate({opacity:1},{duration:200})}});if(!e[0].complete){e.trigger("show")}}return c.append(f)});f.width(m*d.watches.length);f.empty().append(b);e=f.width();if(e>l){j=e-l}else{j=0}n.prototype.render.controls();return n.prototype.bind.zoom()},controls:function(){if(i&&i>0){$(a[0]).removeClass("inactive")}else{$(a[0]).addClass("inactive").unbind("hover")}if(i<j){return $(a[1]).removeClass("inactive")}else{return $(a[1]).addClass("inactive").unbind("hover")}},zoom:function(a,b,c){var e,f;e=$(n.prototype.view.zoom({collection:{slug:a.slug},watch:b}));if(!_.isUndefined(b.watch_image)){$("<img/>",{src:b.watch_image.urls.carousel}).appendTo($(".image",e))}g.css({left:c.left}).empty().append(e).prependTo(d).stop().animate({opacity:1},{duration:150,easing:"easeOutQuad"}).one("mouseleave",function(a){return $(this).stop().animate({opacity:0},{duration:150,complete:function(a){return $(this).remove()}})});f=g.outerHeight();if(f>310){return g.css("margin-top",-29)}else if(f<290){return g.css("margin-top",-7)}else{return g.css("margin-top",-17)}}};n.prototype.view={option:_.template('      <option value="<%=i%>"><%= option.title %></option>    '),collection:_.template('      <div class="collection">        <ul class="watches"></ul>      </div>    '),watch:_.template('      <li class="watch" data-index="<%=i%>">        <a href="/collections/<%= collection.slug %>/watches/<%= watch.slug %>">          <div class="image"></div>          <h1 class="reference"><%= watch.reference %></h1>          <h2 class="production"><%= watch.production_as_string %></h2>        </a>        </li>    '),zoom:_.template('      <a href="/collections/<%= collection.slug %>/watches/<%= watch.slug %>">        <ul>          <li class="title"><%= watch.title %></li>          <li class="image"></li>          <li class="reference"><%= watch.reference %></li>          <li class="production"><%= watch.production_as_string %></li>        </ul>      </a>    ')};return n}();new a({})}).call(this);(function(){var a,b,c,d;var e=function(a,b){return function(){return a.apply(b,arguments)}},f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b){if(f.call(b,c))a[c]=b[c]}d.prototype=b.prototype;a.prototype=new d;a.__super__=b.prototype;return a};a=function(){function a(a){this.el=$(a)}a.el;a.prototype.fade=function(a){var b,c,d,e,f,g;g=this.el.offset().top;c=this.el.height();e=g+c-c/3;d=g+c/4;if(e<a.topBound){b=(e-a.topWindow)/a.height;f=b}else if(d>a.botBound){b=(d-a.botBound)/a.height;f=1-b}else{f=1}return this.el.css("opacity",f)};return a}();d=function(){function a(){this.checkScroll=e(this.checkScroll,this);this.init()}a.didScroll;a.features;a.numFeatures;a.prototype.init=function(){var a,c,d,e,f,g,h;if(window.degrade){return}this.features=[];a=$(".trackable");e=0;f=a.length;for(g=0,h=a.length;g<h;g++){d=a[g];c=new b(d,f-e);this.features.push(c);e++}this.numFeatures=this.features.length;if(this.numFeatures>0){return this.startup()}};a.prototype.checkScroll=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;h=$(window).scrollTop();k=$(window).height();d=k/4;a=h+k;j=a-k/2;b=a-j;e=h+k/2;c={height:d,topWindow:h,botWindow:h+k,topBound:h+d,botBound:h+k-d};n=this.features;o=[];for(l=0,m=n.length;l<m;l++){f=n[l];i=f.el.offset().top;g=i-e+300;if(i>h+k||i+f.el.height()<h){f.inFocus=false;f.el.css("visibility","hidden");continue}else{if(f.inFocus===false){f.el.css("visibility","visible")}f.inFocus=true}o.push(f.setOffset(g,i,c))}return o};a.prototype.startup=function(){var a,b,c,d,f;this.checkScroll();b=_.throttle(this.checkScroll,60);$(window).scroll(e(function(){return b()},this));f=this.features;for(c=0,d=f.length;c<d;c++){a=f[c];a.start()}$(window).resize(e(function(){return b()},this));return $(window).bind("refreshScroll",b)};return a}();b=function(){function b(a,c){b.__super__.constructor.call(this,a);this.index=c;this.init()}g(b,a);b.elHeight;b.inFocus;b.index;b.planes;b.prototype.init=function(){this.elHeight=this.el.height();this.planes=[];this.createPlane(".plane",-.1);this.createPlane(".background",.1);this.createPlane(".foreground",.2);this.createPlane(".content",.4);this.el.css("opacity",0);return this.el.css("z-index",this.index)};b.prototype.createPlane=function(a,b){var d,e,f,g,h,i;f=$(a,this.el);if(f.length>0){i=[];for(g=0,h=f.length;g<h;g++){e=f[g];d=new c(e,b);i.push(this.planes.push(d))}return i}};b.prototype.setOffset=function(a,b,c){var d,e,f,g;g=this.planes;for(e=0,f=g.length;e<f;e++){d=g[e];d.scroll(a);if(d.shouldFade){d.fade(c)}}return this.fade(c)};b.prototype.showImg=function(a){if(this.inFocus){return a.animate({opacity:1},500)}else{return a.css("opacity",1)}};b.prototype.start=function(){return this.trackLoad()};b.prototype.trackLoad=function(){var a,b,c,d,e,f,g;c=$("img",this.el);d=this;g=[];for(e=0,f=c.length;e<f;e++){b=c[e];a=$(b);if(_.isUndefined(a.attr("src"))){continue}if(a.attr("data-track-load")==="false"){continue}else if(b.complete){this.showImg(a)}else{a.load(function(){return d.showImg($(this))});a.attr("src",a.attr("src"))}}return g};return b}();c=function(){function b(a,c){b.__super__.constructor.call(this,a);this.offset=parseFloat(this.el.attr("data-offset"));if(_.isNaN(this.offset)){this.offset=c}this.shouldFade=this.el.hasClass("fade-plane")?true:false;this.init()}g(b,a);b.el;b.halfHeight;b.offset;b.shouldFade;b.top;b.prototype.init=function(){this.halfHeight=this.el.height()/2;this.top=parseFloat(this.el.css("top"));if(_.isNaN(this.top)){return this.top=0}};b.prototype.scroll=function(a){return this.el.css("top",a*this.offset+this.top+"px")};return b}();$(document).ready(function(){var a;return a=new d})}).call(this);(function(){var a,b;var c=function(a,b){return function(){return a.apply(b,arguments)}},d=Object.prototype.hasOwnProperty,e=function(a,b){function e(){this.constructor=a}for(var c in b){if(d.call(b,c))a[c]=b[c]}e.prototype=b.prototype;a.prototype=new e;a.__super__=b.prototype;return a};b=function(){function a(){this.init=c(this.init,this);this.init()}a.shortenedURL;a.fbShareURL;a.link;a.twitterURL;a.prototype.init=function(){this.link="http://rogerdubuis.com";this.fbShareURL="http://www.facebook.com/share.php";this.twitterURL="http://twitter.com/share";this.shortenedURL="http://bit.ly/rogerdubuis";$("a#fb-share}").bind("click",c(function(a){a.preventDefault();_gaq.push(["_trackEvent","Share","Facebook"]);return this.facebook(window.location.href)},this));return $("a.twitter","#container").bind("click",c(function(a){a.preventDefault();_gaq.push(["_trackEvent","Share","Twitter"]);return this.twitter(window.location.href,"Check out them fancy watches.")},this))};a.prototype.data=function(a,b,c){var d;d={};d.message=_.isUndefined(b)?"Roger Dubuis | Manufacture of Fine Watches":b;d.title=_.isUndefined(c)?"Roger Dubuis | Manufacture of Fine Watches":c;d.link=_.isUndefined(a)?this.link:a;return d};a.prototype.facebook=function(a,b,c){var d,e;b=!_.isUndefined(b)?b:"An exciting look into the realm of Manufacture Roger Dubuis, where style and innovation combine in the form of stunning, exuberant, and daring timepieces. This is a world defined by excellence, with a Hallmark of Geneva borne on every movement.";d=this.data(a,b,c);e=this.fbShareURL;e+="?t="+d.title;e+="&u="+escape(d.link);return this.openWindow(e,d.title,985,500)};a.prototype.openWindow=function(a,b,c,d){var e,f,g,h,i,j,k;k=c||560;e=d||300;g="scrollbars=yes,resizable=yes,toolbar=no,location=yes";h=screen.height;i=screen.width;f=Math.round(i/2-k/2);j=0;if(h>e){j=Math.round(h/2-e/2)}b=$.browser.msie?"Roger Dubuis":b;return window.open(a,b,g+",width="+k+",height="+e+",left="+f+",top="+j)};a.prototype.twitter=function(a,b,c){var d,e;e=this.twitterURL;a=_.isUndefined(a)?this.shortenedURL:a;d=this.data(a,b,c);e+="?url="+escape(d.link);e+="&related="+"roger_dubuis";return this.openWindow(e,d.title)};return a}();a=function(){function a(){this.invalid=c(this.invalid,this);this.sent=c(this.sent,this);this.init=c(this.init,this);a.__super__.constructor.apply(this,arguments)}e(a,Overlay);a.form;a.prototype.init=function(){this.container=$('<div id="stf-overlay" />').appendTo($("body"));a.__super__.init.apply(this,arguments);this.remove_on_close=false;this.form=$("form",this.el).data("structured_form");this.form.el.bind(this.form.success_event,this.sent);return this.form.el.bind(this.form.invalid_event,this.invalid)};a.prototype.sent=function(){return setTimeout(this.close,200)};a.prototype.invalid=function(){};return a}();$(document).ready(function(){var c;new b;c=new a($("section#send_to_friend"));return $("a.email").click(function(a){a.preventDefault();_gaq.push(["_trackEvent","Share","Email"]);return c.show()})})}).call(this);(function(){var a,b;var c=function(a,b){return function(){return a.apply(b,arguments)}},d=Object.prototype.hasOwnProperty,e=function(a,b){function e(){this.constructor=a}for(var c in b){if(d.call(b,c))a[c]=b[c]}e.prototype=b.prototype;a.prototype=new e;a.__super__=b.prototype;return a};a=function(){function a(){this.show=c(this.show,this);this.init=c(this.init,this);a.__super__.constructor.apply(this,arguments)}e(a,Overlay);a.prototype.init=function(){this.add_a_close_button();return a.__super__.init.apply(this,arguments)};a.prototype.show=function(){a.__super__.show.apply(this,arguments);this.el.height("auto");return this.el.height(this.el.height())};return a}();b=function(){function b(a){this.ajax_complete=c(this.ajax_complete,this);this.el=$(a);this.el.attr("data-remote","true");this.el.bind("ajax:complete",this.ajax_complete)}b.el;b.prototype.ajax_complete=function(b,c,d){return(new a(c.responseText)).show()};return b}();window.ContactOverlayButton=b}).call(this);(function(){var a,b;b=function(){function b(){this.init()}b.prototype.init=function(){var b,c,d,e,f,g;f=$(".arrow-btn");g=[];for(d=0,e=f.length;d<e;d++){c=f[d];g.push(b=new a(c))}return g};return b}();a=function(){function a(a){this.el=$(a);this.init()}a.prototype.init=function(){this.el.html('<span class="norm"/><span class="over"/>');if($("html").hasClass("touch")){this.sml()}else if(this.el.attr("data-size")==="lrg"&&$("html").hasClass("touch")===false){this.lrg()}else if(this.el.attr("data-size")==="sml"){this.sml()}else{return}return this.el.hover(_.bind(this.over,this),_.bind(this.out,this))};a.prototype.lrg=function(){$(".norm",this.el).addClass("lrg");return $(".over",this.el).addClass("lrg")};a.prototype.sml=function(){$(".norm",this.el).addClass("sml");return $(".over",this.el).addClass("sml")};a.prototype.over=function(){if(this.el.hasClass("disabled")===true){return}return $(".over",this.el).stop(true,true).animate({opacity:1,duration:300,easing:"easeOutQuad"})};a.prototype.out=function(){if(this.el.hasClass("disabled")===true){return}return $(".over",this.el).stop(true,true).animate({opacity:0,duration:1e3,easing:"easeOutQuad"})};return a}();$(function(){return new b})}).call(this);(function(){var a;a=function(){function a(){this.init()}a.prototype.init=function(){if(!Modernizr.csscolumns){return $(".two-column").columnize({columns
:2})}};return a}();$(document).ready(function(){return new a})}).call(this);(function(){var a,b,c,d;var e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b){if(e.call(b,c))a[c]=b[c]}d.prototype=b.prototype;a.prototype=new d;a.__super__=b.prototype;return a};d=function(){function a(){this.init()}a.prototype.init=function(){var a,b,d,e,f,g;f=$(".tick-btn");g=[];for(d=0,e=f.length;d<e;d++){a=f[d];g.push(b=new c(a))}return g};return a}();c=function(){function a(a){this.el=$(a);this.init()}a.el;a.hoverSpan;a.span;a.wrapper;a.elHeight;a.prototype.init=function(){if(!this.el.hasClass("tick-btn")){this.el.addClass("tick-btn")}this.elHeight=this.el.height();this.elWidth=this.el.width()+5;this.span=$("<span/>").text(this.el.text());this.hoverSpan=this.span.clone();this.hoverSpan.css({color:"#FFF",top:-this.elHeight,display:"block"});this.el.empty();this.el.css({height:this.elHeight,display:"block",overflow:"hidden"});this.el.append(this.hoverSpan).append(this.span);this.el.width(this.elWidth);return this.el.hover(_.bind(this.over,this),_.bind(this.out,this))};a.prototype.out=function(){this.span.animate({top:0},{duration:200,easing:"easeInQuad",queue:false});return this.hoverSpan.animate({top:-this.elHeight},{duration:200,easing:"easeInQuad",queue:false})};a.prototype.over=function(){this.hoverSpan.animate({top:0},{duration:200,easing:"easeOutQuad",queue:false});return this.span.animate({top:this.elHeight},{duration:200,easing:"easeOutQuad",queue:false})};return a}();window.TickBtn=c;$(document).ready(function(){return new d});b=function(){function b(){this.init()}f(b,d);b.prototype.init=function(){var b,c,d,e,f,g;f=$(".activate-tick");g=[];for(d=0,e=f.length;d<e;d++){c=f[d];g.push(b=new a(c))}return g};return b}();a=function(){function a(a){this.el=$(a);this.init()}f(a,c);a.prototype.init=function(){return $(".tick-flag",this.el).hover(function(){$(this).nextAll(".tick-btn").mouseover();return $(this).nextAll().contents(".tick-btn").mouseover()},function(){$(this).nextAll(".tick-btn").mouseleave();return $(this).nextAll().contents(".tick-btn").mouseleave()})};return a}();$(function(){return new b})}).call(this);(function(){var a;var b=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function a(a){this.init=b(this.init,this);this.el=$(a);this.init()}a.el;a.prototype.init=function(){return equal_heights($("li",this.el))};return a}();$(function(){var b,c,d,e,f;e=$("#breadcrumb");f=[];for(c=0,d=e.length;c<d;c++){b=e[c];f.push(new a(b))}return f})}).call(this);
