var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = window.location.search.substring(1), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); } } }; jQuery(document).ready(function ($) { if (jQuery('.finnish input').length) { jQuery('.finnish input[name=username]').attr('placeholder','Tunnus'); jQuery('.finnish input[name=password]').attr('placeholder','Salasana'); jQuery('.finnish input[name=remember]').parent().html(jQuery('.finnish input[name=remember]').parent().html().replace('Remember Me','Muista minut')); jQuery('.finnish button[name=Submit]').text('Kirjaudu'); jQuery('.finnish li:first a').text('Unohditko salasanasi?'); jQuery('.finnish li:last a').text('Unohditko tunnuksesi?'); } if( window.history && window.history.pushState ){ history.pushState( "nohb", null, "" ); jQuery(window).on( "popstate", function(event){ if( !event.originalEvent.state ){ history.pushState( "nohb", null, "" ); if (jQuery(".stage3").is(":visible")) { if (cSel==1) { jQuery(".stage2").show(); } else { jQuery(".stage1").show(); } jQuery(".stage3").hide(); jQuery(".stage4").hide(); jQuery(".stage5").hide(); } else if (jQuery(".stage2").is(":visible")) { jQuery(".stage1").show(); jQuery(".stage2").hide(); jQuery(".stage3").hide(); jQuery(".stage4").hide(); jQuery(".stage5").hide(); } return; } }); } if (jQuery("#welcome_user").length>0) { jQuery("#welcome_user").text( jQuery("#welcome_user").text() + '' ); } if (jQuery("#quotes").length>0) { jQuery(".svg-icon").click(function() { jQuery(this).parent().hide(300); var archive = jQuery(this).attr('archive'); $.post( "/api/index.php?cmd=archive", { archive: archive }).done(function( data ) { }); }); } });