﻿$(document).ready(function () {
    $('.nav ul li').hover(
	function () {
	    $(this).children(':first-child').addClass('hover');
	    $(this).children('ul').show();
	},
	function () {
	    $(this).children(':first-child').removeClass('hover');
	    $(this).children('ul').hide();
	});
    (function ($) {
        $.fn.clearDefault = function () {
            return this.each(function () {
                var default_value = $(this).val();
                $(this).focus(function () {
                    if ($(this).val() == default_value) $(this).val("");
                });
                $(this).blur(function () {
                    if ($(this).val() == "") $(this).val(default_value);
                });
            });
        };
    })(jQuery);

    $('input[type="text"], textarea').clearDefault();

    $('a[href$="pdf"], a[href^="http://"], a[href^="https://"]').attr('target', '_blank');

});

