$(document).ready( function(){ $("#headerSignup").hide(); $('#login-form-link').click(function(e) { $("#login-form").fadeIn(100); $("#headerSignin").fadeIn(100); $("#register-form").hide(); $("#headerSignup").hide(); $('#register-form-link').removeClass('active'); $(this).addClass('active'); e.preventDefault(); }); $('#register-form-link').click(function(e) { $("#register-form").fadeIn(100); $("#headerSignup").fadeIn(100); $("#login-form").hide(); $("#headerSignin").hide(); $('#login-form-link').removeClass('active'); $(this).addClass('active'); e.preventDefault(); }); $(".cb-enable").click(function(){ var parent = $(this).parents('.switch'); $('.cb-disable',parent).removeClass('selected'); $(this).addClass('selected'); $('.checkbox',parent).attr('checked', true); }); $(".cb-disable").click(function(){ var parent = $(this).parents('.switch'); $('.cb-enable',parent).removeClass('selected'); $(this).addClass('selected'); $('.checkbox',parent).attr('checked', false); }); $('ul.nav li.dropdown').hover(function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); }, function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); }); $('#RecalculatePremiumDiv').hide(); $("#btn-RecalculatePremium").on('click', function(){ $('#RecalculatePremiumDiv').show(400); }); $('#div-premium-breakup').hide(); $("#btn-PremiumBreakUp").on('click', function(){ $('#div-premium-breakup').show(400); }); $('#RN-premium-ifyes').hide(); //$('#RN-premium-Y').on('click', function(){ // if ( $('#RN-premium-Y').is(':checked') ) { // $('#RN-premium-ifyes').show(400); // } //}); $('#RN-premium-N').on('click', function(){ if ( $('#RN-premium-N').is(':checked') ) { $('#RN-premium-ifyes').hide(400); } }); $("#div-premium-breakup").hide(); $("#abc").click(function(){ alert("hgfj"); $("#div-premium-breakup").toggle('slow'); }); $("#FetchGeneratedQuotesDiv").hide(); $("input[name$='FetchGeneratedQuote']").click(function() { $("#FetchGeneratedQuotesDiv").show(400); }); $("#fetchQuote").hide(); $('#inputQuote').change(function(){ if(this.checked) $('#fetchQuote').fadeIn('400'); else $('#fetchQuote').fadeOut('400'); }); }); $(document).ready(function() { $('.panel-collapse').on('show.bs.collapse', function () { $(this).siblings('.panel-heading').addClass('active'); }); $('.panel-collapse').on('hide.bs.collapse', function () { $(this).siblings('.panel-heading').removeClass('active'); }); }); $(document).ready(function() { $("input[name$='optionsRadios']").click(function() { var test = $(this).val(); $("div.desc").hide(); $("#optionsRadios" + test).show(); }); }); $(document).ready(function () { $('.sub-product').hide(); $('#Motor-Product').show(); $('#slect-product').change(function () { $('.sub-product').hide(); $('#'+$(this).val()).show(); }); $('.slct-Grievances').hide(); $('#Licensing').show(); $('#slct-ServiceRequest').change(function () { $('.slct-Grievances').hide(); $('#'+$(this).val()).show(); }); var lastScroll = 0; $(window).scroll(function(event){ //Sets the current scroll position var st = $(this).scrollTop(); //Determines up-or-down scrolling if (st > lastScroll){ $("footer").css("position",'relative').fadeIn('slow'); $("#body-sec").css("margin-bottom",'0px'); } if(st == 0){ $("footer").css("position",'fixed').fadeIn('slow'); $("#body-sec").css("margin-bottom",'45px'); } //Updates scroll position lastScroll = st; }); /*********************left menu********************/ $("#menu-close").click(function(e) { e.preventDefault(); $("#sidebar-wrapper").toggleClass("active"); }); $("#menu-toggle").click(function(e) { e.preventDefault(); $("#sidebar-wrapper").toggleClass("active"); }); $("#menu-toggle").click(function(){ $('body').addClass('body_hidden'); $(".menu_overly").show(); $("#menu-toggle").fadeOut(); }); $("#menu-close").click(function(){ $(".menu_overly").fadeOut(); $('body').removeClass('body_hidden'); $("#menu-toggle").fadeIn(); }); /******************** Business Search **********************/ $("#BusinessSearch_close, #BusinessSearch_close_head").click(function(){ $('#search-details input[name="optionsRadios-stp"]').prop('checked', false); }); }); $( document ).ready(function() { Notify = function(text, callback, close_callback, style) { var time = '10000'; var $container = $('#notifications'); //var icon = ''; if (typeof style == 'undefined' ) style = 'warning' var html = $('
' + " " + text + '
'); $('',{ text: 'x', class: 'button close', style: 'padding-left: 10px;', href: '#', click: function(e){ e.preventDefault() close_callback && close_callback() remove_notice() } }).prependTo(html) $container.prepend(html) html.removeClass('hide').hide().fadeIn('slow') function remove_notice() { html.stop().fadeOut('slow').remove() } var timer = setInterval(remove_notice, time); $(html).hover(function(){ clearInterval(timer); }, function(){ timer = setInterval(remove_notice, time); }); html.on('click', function () { clearInterval(timer) callback && callback() remove_notice() }); } }); $(document).ready(function() { //alert ('script '+isMISPMd_var); if (isMISPMd_var=='MISP') { $('.hideMisp').hide(); } });