$(document).ready(function () {

    if (typeof initActivity == 'function') {
        initActivity();
    }

    $('a.help-icon[title]').qtip({
        style: {
            name: 'cream',
            tip: true
        },
        position: {
            corner: {
                target: 'center',
                tooltip: 'bottomLeft'
            }
        }
    });

    $('a.help-icon-2[title]').qtip({
        style: {
            name: 'cream',
            tip: true
        },
        position: {
            corner: {
                target: 'center',
                tooltip: 'bottomLeft'
            }
        }
    });

    $('.activity').hover(function () {
        $(this).addClass('touch');
    }, function () {
        $(this).removeClass('touch');
    });

    $('.user-name').click(function () {
        $('.profile-main').toggleClass('hello')
    });

    $('.profile-main').click(function () {
        $('.profile-drop').toggle();
        return false;
    });

    $('.clearinput').focus(function () {
        if (this.value == this.defaultValue) {
            this.value = '';
        }
        if (this.value != this.defaultValue) {
            this.select();
        }
    });
    $('.clearinput').blur(function () {
        if ($.trim(this.value) == '') {
            this.value = (this.defaultValue ? this.defaultValue : '');
        }
    });

    $('.fsection .head').click(function () {
        $(this).toggleClass("bing");
        $(this).next().toggle();
        return false;
    }).next().hide();

    $('.head').toggle(function () {
        $(this).find('span').text('-');
    }, function () {
        $(this).find('span').text('+');
    });


    $('#placegallery').bxGallery({
        maxheight: 350,
        thumbwidth: 75,
        thumbplacement: 'left',
        thumbcontainer: 90
    });

});


// Google + button script
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

