//Expand right toolbar (social media or qr for login) $(function () { //On click event check action $('#TGC_info').click(function () { if ($('#need-assist').hasClass('close_n')) { $('#need-assist').slideToggle('slow', function () { $('#need-assist').removeClass('close_n').addClass('open_n'); }); } //if element has class close remove it and replace it with open else if ($('#need-assist').hasClass('open_n')) { $('#need-assist').slideToggle('slow', function () { $('#need-assist').removeClass('open_n').addClass('close_n'); }); } //if element has class open remove it and replace it with close if ($(this).hasClass('open')) { //Enable Social event $.get('/ajax/cmd.php', { ajax_contact_social_contact: '1' }, //Set Javascript Expander function (data, status) { $('#expander1').append(data); var container = document.querySelector('#expander1'); js_support_exec_script(container); }); $(this).removeClass('open').addClass('close'); } //if element has class close remove it and replace it with open else if ($(this).hasClass('close')) { $(this).removeClass('close').addClass('open'); } }); //On click event check action $('#expander').click(function () { //if element has class open remove it and replace it with close if ($(this).hasClass('open')) { $(this).removeClass('open').addClass('close'); //Enable Social event?> $.get('/ajax/cmd.php', { ajax_contact_social_event: '1' }, function (data, status) { $('#expander').append(data); var container = document.querySelector('#expander'); js_support_exec_script(container); }) } //if element has class close remove it and replace it with open else if ($(this).hasClass('close')) { $(this).removeClass('close').addClass('open'); } //Toggle between slideUp() and slideDown() $('#Social').slideToggle(); }); // On Click event of #expander1 $('#expander1').click(function () { //Check if qr-hook id is not set if (!document.getElementById('qr-hook_wdgt')) { //If id Mobile is set then print out loading message until response if (document.getElementById('Mobile')) { //Brings up the loader document.getElementById('Mobile').innerHTML = '

Loading

'; } //Calls ajax url on click and check result $.get('/ajax/cmd.php', { ajax_client_qr_login: '1' }, function (data, status) { $('.toggler_mobile').html(data); }); } //if element has class open remove it and replace it with close if ($(this).hasClass('open')) { $(this).removeClass('open').addClass('close'); } //if element has class close remove it and replace it with open else if ($(this).hasClass('close')) { //Check if has class close $(this).removeClass('close').addClass('open'); } //Toggle mobile $('#Mobile').slideToggle(); }); }); $(window).load(function () { // will fade out the whole DIV that covers the website. $('#preloadercontent').fadeOut('slow'); //will first fade out the loading animation $('#loader').fadeOut('slow', function () { // will fade out the whole DIV that covers the website. $('#preloader').delay(300).fadeOut('slow'); }); });