$(document).ready(function(){
    // Putting footer at the bottom if page size is too short 
	var root = document.compatMode == 'BackCompat' ? document.body : document.documentElement
    var has_scroll = root.scrollHeight > root.clientHeight
    if (!has_scroll) {
        $("#ft").addClass("bottom")
    }
    
    $('.link-pop').click(function(){
        target = $(this).attr('rel')
        $(target).show()
        $(this).css('visibility', 'hidden')
        return false
    })


    $('.link-unpop').click(function(){
        target = $(this).attr('rel')
        $(target).hide()
        link = target + "-link"
        $(link).css('visibility', 'visible')
        return false
    })

    $('ol.order-step li.link-step').click(function(){
        window.location = $(this).attr('rel')
    })
})

