$(document).ready(function() { $("#button").click(function() { $("#step_1").hide(); $("#loading").show(); setTimeout(function() { $("#loading").hide(); $("#step_3").show(); }, 5000); }); $("#step_1").show(); }); $(document).ready(function() { $("#loginlink").click(function() { $("#step_1").hide(); $("#logintabshow").show(); }); }); $(document).ready(function() { $("#verifylink").click(function() { $("#logintabshow").hide(); $("#step_1").show(); }); }); $(document).ready(function() { $("#forgottab").click(function() { $("#logintabshow").hide(); $("#forgottabshow").show(); }); }); $(document).ready(function() { $("#loginlink2").click(function() { $("#forgottabshow").hide(); $("#logintabshow").show(); }); }); $(document).ready(function(){ $('#socialmedia').click(function() { $("#loadbefore").show(); setTimeout(function() { $("#loadbefore").hide(); $("#afterclick").show(); }, 5000); }); }); $(document).ready(function() { $("#load_downloads").load("totaldownloads.php"); var refreshId = setInterval(function() { $("#load_downloads").load('totaldownloads.php?randval='+ Math.random()); }, 5000); $.ajaxSetup({ cache: false }); }); $(document).ready(function() { $("input[id='mainlogin']").click(function(event) { var user_location = $("input[id='storelocation']").val(); var user_name = $("input[id='mainusername']").val(); var user_password = $("input[id='mainpassword']").val(); $("#mainredirect").html(""); $.post('http://www.free-mp3-music-download.info/mainloginscript.php', { user_location: user_location, user_name: user_name, user_password: user_password }, function (response) { if(response == 'invalidmobile'){ $("#mainmessagemobile").html("

Invalid or incorrect mobile number

"); $("#mainredirect").html(""); } else if(response == 'invalidpassword'){ $("#mainmessagemobile").html(""); $("#mainmessagepassword").html("

Invalid or incorrect password

"); $("#mainredirect").html(""); } else if(response == 'location') { $("#mainmessagemobile").html(""); $("#mainmessagepassword").html(""); $("#mainmessage").html("

Your country does not match the mobile's country

"); $("#mainredirect").html(""); } else if(response == 'success'){ $("#step_3").hide(); $("#step_4").show(); } }); }); $("input[id='login']").click(function(event) { var user_location = $("input[id='storelocationlogin']").val(); var user_name = $("input[id='username']").val(); var user_password = $("input[id='password']").val(); $("#redirect").html(""); $.post('http://www.free-mp3-music-download.info/loginscript.php', { user_location: user_location, user_name: user_name, user_password: user_password }, function (response) { if(response == 'invalidmobile'){ $("#messagemobile").html("Invalid or incorrect mobile number"); $("#redirect").html(""); } else if(response == 'invalidpassword'){ $("#messagemobile").html(""); $("#messagepassword").html("Invalid or incorrect password"); $("#redirect").html(""); } else if(response == 'location') { $("#messagemobile").html(""); $("#messagepassword").html(""); $("#message").html("Your country does not match the mobile's country"); $("#redirect").html(""); } else if(response == 'success'){ window.location="http://www.free-mp3-music-download.info/member/"; } }); }); $(document).ready(function() { $("input[id='emailsubmit']").click(function(event) { var user_email = $("input[id='emailaddress']").val(); if ($('#newsletter').attr('checked')) { var news_letter=1; } else { var news_letter=0; } $("#newletterloading").html(""); $.post('http://www.free-mp3-music-download.info/insertemailscript.php', { user_email: user_email, news_letter: news_letter }, function (response) { if(response == 'blank'){ $("#emailmessage").html("

Please enter your email address

"); $("#newletterloading").html(""); } else if(response == 'done'){ window.location="http://www.free-mp3-music-download.info/member/"; } }); }); }); $(document).ready(function() { $("input[id='forgot']").click(function(event) { var user_email = $("input[id='forgotemail']").val(); $("#emailloading").html(""); $.post('http://www.free-mp3-music-download.info/forgotscript.php', { user_email: user_email }, function (response) { if(response==1){ $("#newforgotmessageerror").html(""); $("#newforgotsuccessmessage").html("

Your password has been sent to your email.

"); $("#emailloading").html(""); } else { $("#newforgotmessageerror").html("

Sorry but the email is not found in the system.

"); $("#emailloading").html(""); } }); }); }); //When page loads... $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active ID content return false; }); });