﻿$(document).ready(function () {
    $(".box").corner();
    $(".contactboxfooter").corner("bottom");
    $(".contactbox").corner("top keep");

    $('ul.sf-menu').superfish({
        speed: 'normal',                          // faster animation speed 
        autoArrows: false,                           // disable generation of arrow mark-up 
        dropShadows: false                            // disable drop shadows 
    });

    
    $('.hidep p').hide();

    $('#passwordclear').show();
    $('#password').hide();
    
    
    $('#passwordclear').focus(function () {
        $('#passwordclear').hide();
        $('#password').show();
        $('#password').focus();
    });

    $('#password').blur(function () {
        if ($('#password').val() == '') {
            $('#passwordclear').show();
            $('#password').hide();
        }
    });

    $('div.faq p').hide();
    $('h6').next('p').hide();
    $('div.faq h2,h3,h6').click(function () {
        if ($(this).find("a").length <= 0) {
            $('div.faq p').hide();
            $(this).nextUntil('h2,h3').toggle();
        }
    });


    $('div.faq h2,h3,h6').hover(function () {
        $(this).css('cursor', 'pointer');
    }, function () {
        $(this).css('cursor', 'auto');
    });

    $('.default-value').each(function () {
        var default_value = this.value;
        $(this).focus(function () {
            if (this.value == default_value) {
                this.value = '';
            }
        });
        $(this).blur(function () {
            if (this.value == '') {
                this.value = default_value;
            }
        });
    });
    $('.slideshow').cycle({
        fx: 'fade',
        timeout: 9000,
           before: function(curr, next, opts) {
            var $next = $(next), src = $next.attr('src');
            $next.attr('src', src);
      },
    });

});
