function setNotification( type, text, id, seconds ) { $('.notify').remove(); id = (typeof id == "undefined") ? "notify" : id; seconds = (typeof seconds == "undefined") ? 5 : seconds; switch (type) { case "error": icon = "fa fa-times-circle"; break; case "warning": icon = "fa fa-info-circle"; break; case "lock": icon = "fa fa-lock"; break; case "success": icon = "fa fa-check"; break; default: icon = "fa fa-lock"; break; } $('.page').prepend('
'+text+'
'); if (seconds != -1) { setTimeout(function () { $('.notify').hide("drop", { direction: "up" }, function () { $(this).remove(); }); }, seconds * 1000); } } function LoginNotification(type, text) { $('.login-notification').remove(); switch (type) { case "error": icon = "fa fa-times-circle"; break; case "warning": icon = "fa fa-info-circle"; break; case "lock": icon = "fa fa-lock"; break; case "success": icon = "fa fa-check"; break; default: icon = "fa fa-lock"; break; } $('.login-box h1').after('
'); $('.login-notification').append(text).addClass(type); } function showPopup( html, widthSetting ) { if ($('#popup').size()) { $('#popup').hide("drop", { direction: "up" }, 400, function () { $(this).remove(); }); $('#popup-back').fadeOut(function () { $(this).remove(); }); return false; } $('body').append(''); $('#popup, #popup-back').hide(); if (widthSetting == "contain") { $('#popup').css({'width': '460px', 'min-width':'0px'}); } $('#popup').css('top', $(window).scrollTop() + $(window).height()*0.2 ); $('#popup').html(html); $('#popup h1').append('
'); $('#popup-back').fadeIn(); $('#popup').show("drop", { direction: "up" }, 400); $('#popup-back').click(function () { showPopup(); }); } $(function () { $('.tooltip-trigger').hover(activateTooltip, removeTooltip); $('.tooltip-trigger').click(function () { if ($(this).next().hasClass('tooltip-text')) { removeTooltip.call($(this)); } else { activateTooltip.call($(this)); } }); }); function activateTooltip() { if (!$(this).next().hasClass('tooltip-text')) { txt = $(this).data('text'); $(this).after('
' + txt + '
'); $(this).next('.tooltip-text').css('margin-left', parseInt($(this).position().left)); $(this).next('.tooltip-text').css('margin-top', parseInt($(this).position().top)); } } function removeTooltip() { $(this).next('.tooltip-text').remove(); } function browserRadioButtons() { /* * If the browser doesn't support the 'appearance' property in CSS, * make some changes to the radio buttons */ if (typeof document.createElement("detect").style["webkitAppearance"] == "undefined") { $('.tt-radio').css({ 'width': '13px', 'height': '13px', 'margin': '0 5px 12px', 'vertical-align': '-2px' }); } } $(document).ready(function () { browserRadioButtons(); });