ual_app/app/assets/javascripts/public.js.coffee
2014-08-24 00:18:02 +02:00

33 lines
507 B
CoffeeScript

#= require jquery
#= require jquery_ujs
#= require ./jquery.superslides.js
#= require jquery.easing.1.3
resize = () ->
$("#large").css "min-height", ($(window).height()-30)+"px"
height = ($(window).height()-50)
optimal_height = $(window).width()/ 1.66
if optimal_height < height
height = optimal_height
$(".slider").css({"height": height+"px","width": $(window).width()+"px" })
$(window).load ->
resize()
$ ->
$(window).bind "resize", ->
resize()
resize()