﻿	$.fn.inputPlaceholder = function() {
		var placeholderText = $(this).val();
		$(this).bind('focus', function () {
			if($(this).val() == placeholderText) {
				$(this).val('');
			}
		});
		
		$(this).bind('blur', function () {
			if($(this).val() == '') {
				$(this).val(placeholderText);
			}
		});
	}
	$(document).ready(function() {
		$('#searchbox input').inputPlaceholder();
		
		
		//Set Footer



    setTimeout(setFooter, 0);


    function setFooter() {
        if ($(".footer").length > 0) {

            function onResizeHandler() {
                if ($(window).height() > ($("#page").outerHeight() + $(".footer").outerHeight()))
                    $(".footer").css("margin-top", $(window).height() - $("#page").outerHeight() - $(".footer").outerHeight() + "px").css('margin-bottom', '0px');
                else
                    $(".footer").css("margin-top", "0px");
            }
            onResizeHandler();
            $(".footer").css("display", "block");
            window.onresize = onResizeHandler;
        }
    }
		
		
	});
