2017-09-21 12:37:53 +02:00

104 lines
1.6 KiB
CoffeeScript

#= require jquery
#= require jquery_ujs
#= require ./vendor/jquery.flexslider
#= require ./vendor/markerclusterer
#= require ./vendor/jquery.mask
$ ->
top = 150
scroll_ajust = () ->
var_scroll = $(window).scrollTop()
#alert rp_top_start
#menu
if var_scroll > top
$("#top_menu").addClass("move_top")
else
$("#top_menu").removeClass("move_top")
#top_link
if var_scroll > 100
$(".top_link").css
"opacity" : 1
else
$(".top_link").css
"opacity" : 0
resize = () ->
#top = $("#menu_top_container").outerHeight()
scroll_ajust()
#$(".bxslider li").each ->
# width = $(this).parent().width()
# $(this).css("width",$(this).parent().width()+"px")
$("#main").css
"min-height" :$(window).height()+"px"
#$(this).closes
$(".menu_itemlink_content").css("height", "auto");
$("#photos .left img").each ->
ratio = 0.56
height = $(this).width()*ratio
$(this).css("height",height+"px")
$("#top_block .inner").each ->
ratio = 0.65
height = $(this).width()*ratio
$(this).css("min-height",height+"px")
test = 10
#$("#home_slider").css("height", ($("#main").width()*(640 / 1200))+"px")
$(window).on "resize", ->
resize()
resize()
$(".flashs .remove").click ->
$(this).parent().remove()
$(document).on "scroll", ->
scroll_ajust()
$(document).on "touchmove", ->
scroll_ajust()
$(".top_link").click ->
$('html,body').animate({scrollTop: 0},'slow');