function showpopup(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } $(window).load(function() { $('.flexslider').flexslider({ animation: "slide", slideDirection: "horizontal", slideshow: true, slideshowSpeed: 4000, animationDuration: 600, directionNav: true, controlNav: false, keyboardNav: true, mousewheel: true, randomize: false, animationLoop: true, pauseOnAction: true, pauseOnHover: true, controlsContainer: ".flexslider-container" }); }); var format = function(num){ var str = num.toString().replace("€", ""), parts = false, output = [], i = 1, formatted = null; if(str.indexOf(".") > 0) { parts = str.split("."); str = parts[0]; } str = str.split("").reverse(); for(var j = 0, len = str.length; j < len; j++) { if(str[j] != ",") { output.push(str[j]); if(i%3 == 0 && j < (len - 1)) { output.push(","); } i++; } } formatted = output.reverse().join(""); return("€" +formatted + ((parts) ? "." + parts[1].substr(0, 2) : "")); }; $(document).ready(function() { $("#currency").change(function(){var pto=$(this).val();var pprice=$('#a').val();var pfrom=$('#from').val();var dataString='a='+pprice+'&from='+pfrom+'&to='+pto;$.ajax({type:"POST",url:"currency.asp",data:dataString,cache:false,success:function(html){$("#price").html(html)}})});$( "#currency" ).append(""); $(function(){ $(".currency input#a").keyup(function(e){ $(this).val(format($(this).val())); }); }); $().UItoTop({ easingType: 'linear' }); jQuery(".stbt select").select2({ minimumResultsForSearch: 300 }); $("form#formmail").submit(function(sf) { sf.preventDefault(); if ($("input#name").val() == "" || $("input#name").val().length < 1 || $("input#name").val().length > 50) { alert("check name entered"); return false} if ($("input#email").val() == "" || $("input#email").val().indexOf("@") < 0 || $("input#email").val().indexOf(".") < 0) { alert("check email entered"); return false} if ($("input#code").val()== '' || $("input#code").val().length <1 || $("input#code").val() != 0) { alert('please check your secure code.!' ); return false } $.ajax({ type: "POST", url: $(this).attr('action'), data: $(this).serialize(), success: function(ajaxcevap){ $('#sonuc').html(ajaxcevap + '').slideDown('slow'); } }); }); });