$(window).resize(function(){
    footer();
});
$(document).ready(function() {

$('.level_1 li').hover(function(){
        $(this).addClass('over');
    }, function(){
        $(this).removeClass('over');
    });
$('.level_2 li').hover(function(){
        $(this).addClass('over');
    }, function(){
        $(this).removeClass('over');
    });

footer();
setTimeout(function(){
    $("a[rel=fancy_group]").fancybox({
        'transitionIn'	:	'fade',
        'transitionOut'	:	'fade',
        'speedIn'	:	600,
        'speedOut'	:       200,
        'width'         :       640,
        'height'        :       480,
        'overlayShow'	:	true,
        'overlayOpacity':       '0.8',
        'overlayColor'  :       '#333',
        'titleShow'     :       false,
        'type'          :       'image'

    });
    },0);
});

function footer(){
    var win = $(window).height();
    $('#footer_fix').hide();
    var other = $('#not_footer').height()+243;
    if(other < win)
    {
        $('#footer_fix').css('height', (win-other)+'px');
        $('#footer_fix').show();
    }
}
