$(function() { $.fn.clearForm = function() { return this.each(function() { var type = this.type, tag = this.tagName.toLowerCase(); if (tag == 'form') return $(':input',this).clearForm(); if (type == 'text' || type == 'password' || tag == 'textarea') this.value = ''; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); }; }); $().ready(function() { // $('#coda-slider-1').codaSlider({dynamicTabs:0,dynamicArrows:0, autoHeight:0,panelTitleSelector:"div"}); $('#menu li') .css( {backgroundPosition: "0px -34px"} ) .mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:300}) }) .mouseout(function(){ $(this).stop().animate({backgroundPosition:"(0px 68px)"}, {duration:300, complete:function(){ $(this).css({backgroundPosition: "0px -34px"}); }}) }) }); $(function() { $("#megrendel_cont").toggle(0); $("#megrendel_cont > .termekvalaszto").hover(function(){ $(this).addClass('hatter'); }, function() { $(this).removeClass('hatter'); }); $('.termekdb').hide(); // $('.orszaginfo').hide(); }); function ujraszamol(ar) { var osszesen = 0; var kivalasztott_id = $('#mit').val(); var kivalasztott_ar = $('#termek'+kivalasztott_id+' .ar').html(); osszesen = parseInt($('#db').val())*parseInt(kivalasztott_ar )+1000; $('#ossz').html(osszesen+'.- Ft'); } function megrendel(mit,ar) { $('#'+mit+' .kosar a').html('kiválasztva'); $('#mit').val(mit).change(); $('.termekdb').hide(); $('#dbszam'+mit).parent().show(); ujraszamol(); return; } function armodosit() { if ($("#orszag").val() != "Magyarorszag" ) { if ($('.orszaginfo').is(':hidden')) { $('.orszaginfo').slideDown(); } $('#termek1 .ar').html('2990.- Ft/db'); $('#termek2 .ar').html('2990.- Ft/db'); $('#termek3 .ar').html('4490.- Ft/db'); } else { if ($('.orszaginfo').is(':hidden') === false) { $('.orszaginfo').slideUp(); } $('#termek1 .ar').html('1990.- Ft/db'); $('#termek2 .ar').html('1990.- Ft/db'); $('#termek3 .ar').html('4490.- Ft/db'); } ujraszamol(); } $(document).ready(function(){ $('#db').live('change blur focusout',function(){ ujraszamol(); }); $('.dbszam').live('change blur focusout',function(){ switch($('#mit').val()) { case 'cd': $('#db').val($('#dbszam1').val()).change(); break; case 'dvd': $('#db').val($('#dbszam2').val()).change();break; case 'cddvd':$('#db').val($('#dbszam3').val()).change() ;break; } ujraszamol(); }); $('#mit').live('change blur focusout',function(){ switch($('#mit').val()) { case 'cd': $('#db').val($('#dbszam1').val()).change(); break; case 'dvd': $('#db').val($('#dbszam2').val()).change();break; case 'cddvd':$('#db').val($('#dbszam3').val()).change() ;break; } ujraszamol(); }); $('#slider1').bxSlider({ auto: true, controls:false, pager: false, mode: 'horizontal', speed:500, pause:5000 }); }); function bevitel_csakszam(e) { var Key = e.keyCode; if (Key == 0) {Key = e.which} if ((Key >= 48 && Key <= 57) || Key == 8 || Key == 9 || Key == 37 || Key == 38 || Key == 39 || Key == 11 || Key == 12 || Key == 46) return true; return false; }