#= require jquery
#= require jquery_ujs
#= require_tree .


resize = () ->
  $(".electrolux_img .img").css("padding-top", ($(".electrolux_img").height() - $(".electrolux_img img").height())/ 2)
  $(".miele_img .img").css("padding-top", ($(".miele_img").height() - $(".miele_img img").height())/ 2)
  
  
  
  $(".electrolux").css("margin-left", ($(window).width() - ($(".electrolux").width()*2))/ 3)
  $(".miele").css("margin-right", ($(window).width() - ($(".electrolux").width()*2))/ 3)
  
  $(".row").css("top", ($(window).height() - $(".row").height())/ 2)
  
$ ->
  resize()
  $(window).bind "resize", ->
    resize()
  
  $(".electrolux, .miele").click (event) ->
    window.location.href = $(this).find("a:first").attr("href")
    