$('input[title!=""]').mtrackWatermark();
- // Arrange for the footer to sink to the bottom of the window, if the window
- // contents are not very tall
- var last_dh = 0;
- var last_wh = 0;
- function mtrack_footer_position(force) {
- var ele = $('#footer');
- if (!force &&
- (last_dh != $(document).height() || last_wh != $(window).height)) {
- force = true;
- }
- if (force) {
- // Force a from-scratch layout assessment; put the footer back in
- // it's natural location in the doc
- ele.css({
- position: "relative",
- "margin-top": "3em",
- top: 0
- });
- }
- if ($(document).height() <= $(window).height()) {
- ele.css({
- position: "absolute",
- "margin-top": "0",
- top: (
- $(window).scrollTop() +
- $(window).height() -
- ele.height() - 1
- )+"px"
- });
- } else {
- ele.css({
- position: "relative",
- "margin-top": "3em"
- });
- }
- last_dh = $(document).height();
- last_wh = $(window).height();
- }
- window.mtrack_footer_position = mtrack_footer_position;
- $(window)
- .scroll(mtrack_footer_position)
- .resize(mtrack_footer_position);
- function mtrack_footer_set_and_wait() {
- mtrack_footer_position();
- setTimeout(function () {
- mtrack_footer_set_and_wait();
- }, 1500);
- }
- mtrack_footer_set_and_wait();
+
});