﻿$(document).ready(function () {

    if ($("#ff_map-canvas").length) {
        initializemap();
    }

    $(".ff_faq-shortAnswer").click(function () {
        $this = $(this);
        $this.hide();
        $(".ff_faq-Answer", $this.parent()).show();
    });

    $(".ff_faq-Answer").click(function () {
        $this = $(this);
        $this.hide();
        $(".ff_faq-shortAnswer", $this.parent()).show();
    });

    $('.ff_contactFormTB, ff_contactFormMultiTB').focus(function () {
        $this = $(this);
        if ($this.hasClass("ff_error")) {
            $this.removeClass("ff_error");
        }
        if ($this[0].value == $this.attr('title')) {
            $this[0].value = ''; /*this.select();*/
        }
    }).blur(function () {
        $this = $(this);
        if ($this[0].value.trim() == '') {
            $this[0].value = $this.attr('title');
        }
    });



});

String.prototype.trim = function () {
    return this.replace(/^\s+|\s+$/g, '');
};
