/**
 * Combined JS
 * /utilcave_com/middleton/js.php?js=/bs_cadem_ai/js/functions.js&ezcb=191-2
 */ 

/**
 ************************************************
 * /utilcave_com/middleton/js.php?js=/bs_cadem_ai/js/functions.js&ezcb=191-2
 ************************************************
 */
// If JavaScript is enabled remove 'no-js' class and give 'js' class
$ezJQuery('html').removeClass('no-js').addClass('js');

// Add .osx class to html if on Os/x
if ( navigator.appVersion.indexOf("Mac")!=-1 )
    $ezJQuery('html').addClass('osx');

// When DOM is fully loaded
$ezJQuery(function($) {

	/* --------------------------------------------------------
	 Tooltips
	 --------------------------------------------------------	*/

    (function () {
        $('body').tooltip({
            delay: {show: 300, hide: 0},
            selector: '[data-toggle=tooltip]:not([disabled])'
        });
    })();

	/* --------------------------------------------------------
	 Back To The Top Button
	 --------------------------------------------------------	*/

    (function () {
        $('<a id="back-to-the-top"></a>').appendTo($('body'));

        $(window).scroll(function () {
            if ($(this).scrollTop() != 0) {
                $('#back-to-the-top').fadeIn();
            } else {
                $('#back-to-the-top').fadeOut();
            }
        });

        $('#back-to-the-top').click(function () {
            $('body,html').animate({scrollTop: 0}, 800);
        });
    })();

});

