(function($){$.extend($.fn,{validate:function(options){if(!this.length){if(options&&options.debug&&window.console){console.warn("nothing selected, can't validate, returning nothing");} return;} var validator=$.data(this[0],'validator');if(validator){return validator;} this.attr('novalidate','novalidate');validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.validateDelegate(":submit","click",function(ev){if(validator.settings.submitHandler){validator.submitButton=ev.target;} if($(ev.target).hasClass('cancel')){validator.cancelSubmit=true;}});this.submit(function(event){if(validator.settings.debug){event.preventDefault();} function handle(){var hidden;if(validator.settings.submitHandler){if(validator.submitButton){hidden=$("").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);} validator.settings.submitHandler.call(validator,validator.currentForm,event);if(validator.submitButton){hidden.remove();} return false;} return true;} if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();} if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;} return handle();}else{validator.focusInvalid();return false;}});} return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);} break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;} var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}} var data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.metadataRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);} return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+a.value);},filled:function(a){return!!$.trim(""+a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};} if(arguments.length>2&¶ms.constructor!==Array){params=$.makeArray(arguments).slice(1);} if(params.constructor!==Array){params=[params];} $.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element,event){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);} this.addWrapper(this.errorsFor(element)).hide();}},onfocusout:function(element,event){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element,event){if(event.which===9&&this.elementValue(element)===''){return;}else if(element.name in this.submitted||element===this.lastElement){this.element(element);}},onclick:function(element,event){if(element.name in this.submitted){this.element(element);} else if(element.parentNode.name in this.submitted){this.element(element.parentNode);}},highlight:function(element,errorClass,validClass){if(element.type==='radio'){this.findByName(element.name).addClass(errorClass).removeClass(validClass);}else{$(element).addClass(errorClass).removeClass(validClass);}},unhighlight:function(element,errorClass,validClass){if(element.type==='radio'){this.findByName(element.name).removeClass(errorClass).addClass(validClass);}else{$(element).removeClass(errorClass).addClass(validClass);}}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"To pole jest wymagane.",remote:"Proszę o wypełnienie tego pola.",email:"Proszę o podanie prawidłowego adresu email.",url:"Proszę o podanie prawidłowego URL.",date:"Proszę o podanie prawidłowej daty.",dateISO:"Proszę o podanie prawidłowej daty (ISO).",number:"Proszę o podanie prawidłowej liczby.",digits:"Wartość musi być liczbą całkowitą",creditcard:"Proszę o podanie prawidłowej karty kredytowej.",equalTo:"Proszę o podanie tej samej wartości ponownie.",accept:"Proszę o podanie wartości z prawidłowym rozszerzeniem.",maxlength:$.validator.format("Proszę o podanie nie więcej niż {0} znaków."),minlength:$.validator.format("Proszę o podanie przynajmniej {0} znaków."),rangelength:$.validator.format("Proszę o podanie wartości o długości od {0} do {1} znaków."),range:$.validator.format("Proszę o podanie wartości z przedziału od {0} do {1}."),max:$.validator.format("Proszę o podanie wartości mniejszej bądź równej {0}."),min:$.validator.format("Proszę o podanie wartości większej bądź równej {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");if(validator.settings[eventType]){validator.settings[eventType].call(validator,this[0],event);}} $(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'] ","focusin focusout keyup",delegate).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this]);} this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);} return this.valid();},element:function(element){element=this.validationTargetFor(this.clean(element));this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element)!==false;if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;} if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);} this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});} this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});} if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList);}else{this.defaultShowErrors();}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm();} this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue");},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj){count++;} return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()===0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name;}).length===1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){if(!this.name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this);} if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false;} rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){var errorClass=this.settings.errorClass.replace(' ','.');return $(this.settings.errorElement+"."+errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},elementValue:function(element){var type=$(element).attr('type'),val=$(element).val();if(type==='radio'||type==='checkbox'){return $('input[name="'+$(element).attr('name')+'"]:checked').val();} if(typeof val==='string'){return val.replace(/\r/g,"");} return val;},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules();var dependencyMismatch=false;var val=this.elementValue(element);var result;for(var method in rules){var rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"){dependencyMismatch=true;continue;} dependencyMismatch=false;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;} if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){if(this.settings.debug&&window.console){console.log("exception occured when checking element "+element.id+", check the '"+rule.method+"' method",e);} throw e;}} if(dependencyMismatch){return;} if(this.objectLength(rules)){this.successList.push(element);} return true;},customMetaMessage:function(element,method){if(!$.metadata){return;} var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customDataMessage:function(element,method){return $(element).data('msg-'+method.toLowerCase())||(element.attributes&&$(element).attr('data-msg-'+method.toLowerCase()));},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method]);},findDefined:function(){for(var i=0;iWarning: No message defined for "+element.name+"");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=$.validator.format(message.replace(theregex,'{$1}'),rule.parameters);} this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));} return toToggle;},defaultShowErrors:function(){var i,elements;for(i=0;this.errorList[i];i++){var error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);} this.showLabel(error.element,error.message);} if(this.errorList.length){this.toShow=this.toShow.add(this.containers);} if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}} if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}} this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass(this.settings.validClass).addClass(this.settings.errorClass);if(label.attr("generated")){label.html(message);}}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();} if(!this.labelContainer.append(label).length){if(this.settings.errorPlacement){this.settings.errorPlacement(label,$(element));}else{label.insertAfter(element);}}} if(!message&&this.settings.success){label.text("");if(typeof this.settings.success==="string"){label.addClass(this.settings.success);}else{this.settings.success(label,element);}} this.toShow=this.toShow.add(label);},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr('for')===name;});},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name).not(this.settings.ignore)[0];} return element;},checkable:function(element){return(/radio|checkbox/i).test(element.type);},findByName:function(name){return $(this.currentForm).find('[name="'+name+'"]');},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element)){return this.findByName(element.name).filter(':checked').length;}} return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){var val=this.elementValue(element);return!$.validator.methods.required.call(this,val,element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0;} delete this.pending[element.name];if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules;}else{$.extend(this.classRuleSettings,className);}},classRules:function(element){var rules={};var classes=$(element).attr('class');if(classes){$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});} return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(var method in $.validator.methods){var value;if(method==='required'){value=$element.get(0).getAttribute(method);if(value===""){value=true;} value=!!value;}else{value=$element.attr(method);} if(value){rules[method]=value;}else if($element[0].getAttribute("type")===method){rules[method]=true;}} if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;} return rules;},metadataRules:function(element){if(!$.metadata){return{};} var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};} return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;} if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;} if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;} if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}} if(rules.messages){delete rules.messages;} return rules;},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;} return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch";} if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0;} if(this.checkable(element)){return this.getLength(value,element)>0;} return $.trim(value).length>0;},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch";} var previous=this.previousValue(element);if(!this.settings.messages[element.name]){this.settings.messages[element.name]={};} previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param==="string"&&{url:param}||param;if(this.pending[element.name]){return"pending";} if(previous.old===value){return previous.valid;} previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true||response==="true";if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);delete validator.invalid[element.name];validator.showErrors();}else{var errors={};var message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.invalid[element.name]=true;validator.showErrors(errors);} previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||length>=param;},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||length<=param;},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch";} if(/[^0-9 \-]+/.test(value)){return false;} var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9;}} nCheck+=nDigit;bEven=!bEven;} return(nCheck%10)===0;},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout){target.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});} return value===target.val();}}});$.format=$.validator.format;}(jQuery));(function($){var pendingRequests={};if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();} pendingRequests[port]=xhr;}});}else{var ajax=$.ajax;$.ajax=function(settings){var mode=("mode"in settings?settings:$.ajaxSettings).mode,port=("port"in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();} return(pendingRequests[port]=ajax.apply(this,arguments));} return ajax.apply(this,arguments);};}}(jQuery));(function($){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){this.addEventListener(original,handler,true);},teardown:function(){this.removeEventListener(original,handler,true);},handler:function(e){var args=arguments;args[0]=$.event.fix(e);args[0].type=fix;return $.event.handle.apply(this,args);}};function handler(e){e=$.event.fix(e);e.type=fix;return $.event.handle.call(this,e);}});} $.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});}(jQuery));(function($){$.ZaladujObrazki=function(ikony){$(".Reload").css({opacity:0.3});setTimeout(function(){$.ZaladujObrazkiAkcja(ikony)},200);} $.ZaladujObrazkiAkcja=function(ikony){var ct=screen.height;if(ikony==false){$(".IkonkiProduktu").hide();} $.PokazWidoczneObrazki(ct+$(window).scrollTop()+300);$(window).scroll(function(){var ak=ct+$(this).scrollTop();$.PokazWidoczneObrazki(ak);});if(TypRWD()){$(window).resize(function(){var ak=ct+$(this).scrollTop();$.PokazWidoczneObrazki(ak);});}} $.PokazWidoczneObrazki=function(ctd){$(".Reload").each(function(){var pol=$(this).offset().top;if(pol-1){$(a[0]).show();}}}}})(jQuery);$(document).ready(function(){if(pokazCookie('scroll')!=''&&parseInt(pokazCookie('scroll'))>0){$('body').scrollTo(parseInt(pokazCookie('scroll')));}else{$('body').scrollTo(0);} usunCookie('scroll');$('body').prepend('
');if(!TypPrzegladarki()){$('body').prepend('
');$('body').prepend('
');if($(window).width()>$('#Strona').width()+160){if($(document).height()>$(window).height()){$('#doDolu').show();}} $(window).scroll(function(){if($(window).width()>$('#Strona').width()+160){if($(this).scrollTop()>100){$('#doGory').fadeIn();}else{$('#doGory').fadeOut();} if($(document).height()-$(this).scrollTop()==$(window).height()){$('#doDolu').fadeOut();}else{$('#doDolu').fadeIn();}}});$(window).resize(function(){if($(window).width()>$('#Strona').width()+160){$('#doGory').show();$('#doDolu').show();}else{$('#doGory').hide();$('#doDolu').hide();}});$('#doGory').click(function(){$.scrollTo(0,400);});$('#doDolu').click(function(){$.scrollTo('100%',400);});$.AutoUzupelnienie('InSzukaj','Podpowiedzi','inne/autouzupelnienie.php?tok=6ey8ydc9k4l1x3caf8',50,270,'Wyszukiwanie');} $("form input:radio").css({border:0,borderRadius:0,padding:0,height:'auto'});$("form input:checkbox").css({border:0,borderRadius:0,padding:0,height:'auto'});$('.okno, #PodzielSie a').click(function(){$(this).target="_blank";window.open($(this).prop('href'));return false;});$(".formCzysc").submit(function(){Formularz=$(this);if(Formularz.attr("method")=='get'){Formularz.find('input').each(function(){if($(this).val()==''){$(this).attr('disabled',true);}});}});$(".ulamek").change(function(){var wart=$(this).val();if(wart!=''){regexp=eval("/,/g");wart=wart.replace(regexp,".");if(isNaN(wart)){$(this).val('');}else{wart=parseFloat(wart);$(this).val(wart);}}});$('.Flaga').click(function(){PreloadWlacz();$.post("inne/zmien_jezyk.php?tok=58se28ody9r4w1b3",{jezyk:TylkoLiczba($(this).attr("id"))},function(){window.location.reload();});});$('#WybierzWalute').change(function(){PreloadWlacz();$.post("inne/zmien_walute.php?tok=p844c4t5m92f1f",{waluta:$('#WybierzWalute').val()},function(){window.location.reload();});});$('#WybierzProducenta').change(function(){PreloadWlacz();document.location=$(this).val();});textZastap($('#InSzukaj'));textZastap($('#InBoxSzukaj'));textZastap($('#emailNewsletter'));textZastap($('#emailNewsletterModul'));$(".BoxKategorieRozwijane .Rozwin").click(function(){var ido=$(this).attr("id");if($("#r"+ido).css('display')=='none'){$(this).removeClass('Plus');$(this).addClass('Minus');$("#r"+ido).slideDown("fast");}else{$("#r"+ido).slideUp("fast",function(){$("#"+ido).removeClass('Minus');$("#"+ido).addClass('Plus');});}});var ukryjWysuwane=false;sprawdzEkranBoxWysuwane();$(window).resize(function(){sprawdzEkranBoxWysuwane();});if($('#BrakProduktow').length){$(".ListingNawigacja").hide();if($('.Multi .Wlaczony').length==0){$(".ListingFiltry").hide();if($('#boxFiltry').length){$('#boxFiltry').hide();}}} $("#PlatnoscInformacjaPodsumowanie").filter(function(){return this.childNodes.length===0;}).hide();$("#PlatnoscElektronicznaPodsumowanie").filter(function(){return this.childNodes.length===0;}).hide();$("#PlatnoscBladTresc").filter(function(){return this.childNodes.length===0;}).hide();$("#PlatnoscBladInfo").filter(function(){return document.getElementById('PlatnoscBladTresc').childNodes.length===0;}).hide();$("#WysylkaLokalizacjaPotwierdzenie").filter(function(){return this.childNodes.length===0;}).remove();$("#WysylkaInformacjaPotwierdzenie").filter(function(){return this.childNodes.length===0;}).remove();$("#SkryptyAfiliacja").filter(function(){return this.childNodes.length===0;}).remove();$('#submitSzukaj').removeAttr('disabled');$("#submitSzukaj").attr('class','przycisk');var ukryjInput='tak';if(ukryjInput=='nie'){$('.Zakup input').hide();$('.Zakup em').hide();} if(!TypPrzegladarki()){var lupa='nie';if(lupa=='tak'){$(".Zoom").hover(function(){var szerImg=$(this).width();var wysImg=$(this).height();if(parseInt(szerImg)>50&&parseInt(wysImg)>50){$('#ZoomChwilowe').remove();$(this).prepend('');$('#ZoomChwilowe').hide();$('#ZoomChwilowe').css('margin-left',(szerImg/2)-18);$('#ZoomChwilowe').css('margin-top',(wysImg/2)-18);$('#ZoomChwilowe').fadeIn('fast');}},function(){if($('#ZoomChwilowe').length){$('#ZoomChwilowe').fadeOut('fast');}});}} var cookieEnabled=(navigator.cookieEnabled)?true:false;if(typeof navigator.cookieEnabled=="undefined"&&!cookieEnabled){document.cookie="testCookie";cookieEnabled=(document.cookie.indexOf("testCookie")!=-1)?true:false;} if(cookieEnabled==false){$('.DoKoszyka, .DoKoszykaKartaProduktu, #PrzyciskSchowek span, .Schowek').removeAttr('onclick');} PrzeskalujColorbox();});function PreloadWylacz(){$("#StatusTlo").fadeOut('fast');$("#Preload").delay(300).fadeOut('fast');} function PreloadWylaczSzybko(){$("#StatusTlo").hide();$("#Preload").hide();} function PreloadWlacz(){$("#StatusTlo").show();$("#Preload").show();} function lista(id){$('#wyswietlanie').val(id);$('#sposobwyswietlania').submit();} function sortow(id){$('#sortowanie').val(id);$('#sposobsortowania').submit();} function str_prod(ile,miejsce){$('#ilosc_na_stronie').val(ile);$('#iloscprodstrony').submit();} function TylkoLiczba(str){objReg=/^\d+(\.\d+)?$/;var arr=str.split("");var str_return="";for(var i=0;iMinimalna ilość znaków w polu wyszukiwania to: 2',initialWidth:50,initialHeight:50,maxWidth:'90%',maxHeight:'90%'});Formularz.find(':input').attr('disabled',false);$('#'+pole).focus();return false;} return true;} function textZastap(input){var oryginalyCiag=input.val();input.focus(function(){if($.trim(input.val())==oryginalyCiag){input.val('');}});input.blur(function(){if($.trim(input.val())==''){input.val(oryginalyCiag);}});} function SprIlosc(pole,min,ulamki){var zaokraglenie=0;if(ulamki==0){zaokraglenie=2;} var wynik=pole.value;regexp=eval("/,/g");wynik=wynik.replace(regexp,".");if(isNaN(wynik)){if(min>0){wynik=min;}else{wynik=1;} pole.value=wynik.toFixed(zaokraglenie);return;} if(parseFloat(wynik)<=0){if(min>0){wynik=min;}else{wynik=1;} pole.value=wynik.toFixed(zaokraglenie);return;} wynik=parseFloat(wynik);pole.value=wynik.toFixed(zaokraglenie);return;} function DoSchowka(id){var akcjaKoszyka='pozostań na stronie';PreloadWlacz();$.post("inne/do_schowka.php?tok=7ar8x4o4o5q9",{id:id},function(data){if(akcjaKoszyka=='okno popup'){PreloadWylaczSzybko();$.colorbox({html:data,maxWidth:'90%',maxHeight:'90%',open:true,initialWidth:50,initialHeight:50,overlayClose:false,escKey:false,onLoad:function(){$('#cboxClose').hide();}});} if(akcjaKoszyka=='przejdź do schowka'){document.location='schowek.html';} if(akcjaKoszyka=='pozostań na stronie'){window.location.reload();}});} function UsunZeSchowka(id){var akcjaKoszyka='pozostań na stronie';PreloadWlacz();$.post("inne/do_schowka.php?tok=i3yec9o8kel86dw9k4l1",{id:id,akcja:'usun'},function(data){if(akcjaKoszyka=='okno popup'){PreloadWylaczSzybko();$.colorbox({html:data,maxWidth:'90%',maxHeight:'90%',open:true,initialWidth:50,initialHeight:50,overlayClose:false,escKey:false,onLoad:function(){$('#cboxClose').hide();}});}else{window.location.reload();}});} function UsunCalySchowek(){PreloadWlacz();$.post("inne/schowek_usun.php?tok=i3yec9o8kel86dw9k4l1",{},function(){window.location.reload();});} function DoKoszyka(id,przelicz,iloscCech,miejsce){var koszykAnimacja='tak';if(przelicz=='dodaj'&&koszykAnimacja=='tak'&&!TypPrzegladarki()&&iloscCech==0){var element='';var elem_byl=false;if($('.Wyswietlane img').length){element=$('.Wyswietlane img');elem_byl=true;} if($('#fot_'+id).length){element=$('#fot_'+id);elem_byl=true;} if(elem_byl==true&&$('#BrakAnimacjiKoszyka').length==0){var fotoProduktu=$(element).attr('src');var produktX=$(element).offset().left;var produktY=$(element).offset().top;$('body').prepend('');var koszykX=$('#Koszyk').offset().left;var koszykY=$('#Koszyk').offset().top;$('#AnimacjaKoszyka').stop().animate({opacity:0,left:koszykX,top:koszykY,width:50,height:50},1200,function(){$('#AnimacjaKoszyka').remove();DodajDoKoszyka(id,przelicz,miejsce);});}else{DodajDoKoszyka(id,przelicz,miejsce);}}else{DodajDoKoszyka(id,przelicz);} return false;} function DodajDoKoszyka(id,przelicz,miejsce){var zakladka='';if($('#z_akcesoria').length){if($('#z_akcesoria').attr('class')=='aktywna'){var zakladka='akcesoria';}} var ilosc=1;if(parseFloat($('#ilosc_'+id).val())>0){ilosc=$('#ilosc_'+id).val();} PreloadWlacz();var podzielId=id.split('_');var ciagCech='';if($('#InputWybraneCechy_'+id).length){var ciagCech=$('#InputWybraneCechy_'+id).val();} var komentarz='';if($('#FormKartaProduktu #komentarz_'+id).length){var komentarz=$('#FormKartaProduktu #komentarz_'+id).val();} var polaTxt='';if($('#PoleTekstoweProduktu span').length&&$('#PoleTekstoweProduktu').attr('data-id')=='PoleId_'+id){$('#PoleTekstoweProduktu span').each(function(){idTxt=TylkoLiczba($(this).attr("id"));if($('#pole_txt_'+idTxt).attr('class')!='UsunTekst'||($('#pole_txt_'+idTxt).attr('class')=='UsunTekst'&&$('#pole_txt_'+idTxt).attr('data-text')!='')){if($('#pole_txt_'+idTxt).val()!=''){polaTxt+='{#{'+$(this).html()+'|*|'+$('#pole_txt_'+idTxt).val();if($('#plik_'+idTxt).length){polaTxt+='|*|plik';}else{polaTxt+='|*|txt';} polaTxt+='}#}';}}});} $.post("inne/do_koszyka_ilosc.php?tok=b3nax8y434",{id:podzielId[1],ilosc:ilosc,cechy:ciagCech,akcja:przelicz},function(data){if(data[0].ilosc!=''){$('#ilosc_'+id).val(data[0].ilosc);PreloadWylaczSzybko();$.colorbox({html:'
'+data[0].komunikat+'
',maxWidth:'90%',maxHeight:'90%',open:true,initialWidth:50,initialHeight:50});}else{if(przelicz=='dodaj'){$.post("inne/do_koszyka.php?tok=idg964m1e3lab8l4",{id:podzielId[1],ilosc:ilosc,cechy:ciagCech,komentarz:komentarz,txt:polaTxt,wroc:zakladka,miejsce:miejsce},function(data){akcjaKoszyka(data);});} if(przelicz=='przelicz'){$.post("inne/koszyk_przelicz.php?tok=e1d3ca3814f4",{id:podzielId[1],ilosc:ilosc,cechy:ciagCech},function(data){akcjaKoszyka(data);});} if(przelicz=='gratis'){$.post("inne/do_koszyka.php?tok=21m3sa383444n5",{id:podzielId[1],ilosc:ilosc,cechy:'',komentarz:'',txt:'',wroc:'',akcja:'gratis',cena:$('#produkt_cena_'+id).val()},function(data){akcjaKoszyka(data);});}}},"json");return false;} function akcjaKoszyka(tekst){var akcjaKoszyka='pozostań na stronie';var saCechy=tekst.indexOf('KonieczneCechy');var jestGratis=tekst.indexOf('TylkoGratis');if(akcjaKoszyka=='okno popup'||saCechy>0||jestGratis>0){PreloadWylaczSzybko();$.colorbox({html:tekst,maxWidth:'90%',maxHeight:'90%',open:true,initialWidth:50,initialHeight:50,overlayClose:false,escKey:false,onLoad:function(){$('#cboxClose').hide();}});} if(akcjaKoszyka=='przejdź do koszyka'&&saCechy<0){document.location='koszyk.html';} if(akcjaKoszyka=='pozostań na stronie'&&saCechy<0){ustawScroll();window.location.reload();}} function klikSWFBanner(id){var banner=id;var url="reklama.php?id="+banner;$(location).attr('href',url);} function SantanderRegulamin(){var adres='https://www.santanderconsumer.pl/zakupy-na-raty/raty-w-sklepie-internetowym,1.html';window.open(adres);} function LukasProcedura(id_sklepu){var identyfikatorSklepu=id_sklepu;var adres='https://ewniosek.credit-agricole.pl/eWniosek/procedure.jsp?PARAM_TYPE=RAT&PARAM_PROFILE='+identyfikatorSklepu+'';$.colorbox({innerWidth:"850px",innerHeight:"550px",iframe:true,transition:"elastic",open:true,href:adres,fastIframe:false});} function MbankProcedura(id_sklepu){var identyfikatorSklepu=id_sklepu;var adres='http://mbank.net.pl/mraty_1/?sprzedawca='+identyfikatorSklepu+'';window.open(adres,'directories=0,location=1,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');} function PayURatyProcedura(){var adres='programy/PayUraty/index.html';$.colorbox({innerWidth:"920px",innerHeight:"90%",iframe:true,transition:"elastic",open:true,href:adres,fastIframe:false});} function PokazTip(klasaCss){$(klasaCss).hover(function(){$(".tip").hide();tip=$(this).find('.tip');tip.show();},function(){tip.hide();$(".tip").hide();});$(klasaCss).mousemove(function(e){var mousex=e.clientX-20;var mousey=e.clientY-31-tip.height();var tipWidth=tip.width();var tipHeight=tip.height();var tipVisX=$(window).width()-(mousex+tipWidth);var tipVisY=$(window).height()-(mousey+tipHeight);if(tipVisX<10){mousex=e.clientX-tipWidth-10;}if(tipVisY<10){mousey=e.clientY-tipHeight-10;} tip.css({top:mousey,left:mousex});});} function TypPrzegladarki(){if($('#MobileWersja').length){return true;}else{return false;}} function TypRWD(){if($('#RwdWersja').length){return true;}else{return false;}} function WeryfikacjaCaptcha(value){$.get("inne/captcha_odswiez.php",{weryfikacja:value},function(data){if(data=='OK'){$('#submitButton').removeAttr('disabled');$('#submitButton').attr('class','przycisk');}else{$('#submitButton').attr('disabled','disabled');$('#submitButton').attr('class','przyciskWylaczony');}});} function OdswiezCaptcha(){$('#weryfikacjaImg').attr('src',"inne/captcha.php?"+Math.random());$('#weryfikacja').focus();$('#weryfikacja').val('');$('#submitButton').attr('disabled','disabled');$('#submitButton').attr('class','przyciskWylaczony');} function PrzeskalujColorbox(){if(TypPrzegladarki()||TypRWD()){var czasResize;$(window).resize(function(){if(czasResize){clearTimeout(czasResize)};czasResize=setTimeout(function(){var mojaSzerokosc=($('#Strona').width()*0.9),procentowaSzerokosc=.90;if($('#cboxOverlay').is(':visible')){$.colorbox.resize({width:($(window).width()>(mojaSzerokosc+20))?mojaSzerokosc:Math.round($(window).width()*procentowaSzerokosc)});$('.cboxPhoto').css({width:$('#cboxLoadedContent').innerWidth(),height:'auto'});$('#cboxLoadedContent').height($('.cboxPhoto').height());$.colorbox.resize();}},300);});}} function sprawdzEkranBoxWysuwane(){if($('#Strona').length){if($('#Strona').outerWidth()<799&&TypRWD()){ukryjWysuwane=true;}else{ukryjWysuwane=false;}} var SzerLewejKol=$('#LewaKolumnaPrzerwa').width();$(".BoxKategorieWysuwane .Pokaz").hover(function(){var ido=$(this).attr("id");if($("#r"+ido).css('display')=='none'&&ukryjWysuwane==false){$("#r"+ido).css({marginLeft:SzerLewejKol-60,width:SzerLewejKol});$("#r"+ido).slideDown("fast");};},function(){var ido=$(this).attr("id");if($("#r"+ido).css('display')=='block'&&ukryjWysuwane==false){$("#r"+ido).slideUp("fast");}});} function ustawScroll(akcja){var aktualnyScroll=$(document).scrollTop();ustawCookie('scroll',aktualnyScroll,1);} function stronaReload(){ustawScroll();window.location.reload();} function ustawCookie(nazwa,wartosc,dni){if(dni){var data=new Date();data.setTime(data.getTime()+(dni*24*60*60*1000));var expires="; expires="+data.toGMTString();}else{var expires="";} document.cookie=nazwa+"="+wartosc+expires+"; path=/";} function pokazCookie(nazwa){if(document.cookie!=""){var cookies=document.cookie.split("; ");for(i=0;i=f[g]?0:Math.min(f[g],n));!a&&11){var pozycja=pole.offset();var wysokoscInput=pole.outerHeight();$('#'+nazwaOkna).remove();$('body').append('');$('#'+nazwaOkna).fadeIn('fast');$('#'+nazwaOkna).html('
');$('#'+nazwaOkna).css({width:szerokoscPola,position:'absolute',top:(pozycja.top+wysokoscInput+8),left:pozycja.left});$('#'+nazwaOkna).hover(function(){clearTimeout(oknoPodpowiedzi);},function(){oknoPodpowiedzi=setTimeout('$.skasujPodpowiedz()',czasZamknieciaOkna*1000);});$.post(nazwaSkryptu,{pole:pole.val(),limit:maksymalnaIloscWynikow},function(data){if(data!=''){$('#'+nazwaOkna).html('');$('#'+nazwaOkna).fadeIn('fast');$('#'+nazwaOkna).html(data);oknoPodpowiedzi=setTimeout('$.skasujPodpowiedz()',czasZamknieciaOkna*1000);}else{$('#'+nazwaOkna).remove();}});}},700);$.pobierzAutoodpowiedz=function(id){var wartoscPobrana=$('#auto_'+id).val();$("#"+nazwaPolaSzukania).val(wartoscPobrana);$('#'+nazwaOkna).remove();$('#'+nazwaFormularza).submit();} $.pobierzAutoodpowiedzProdukt=function(url){document.location=url;} $.skasujPodpowiedz=function(){$('#'+nazwaOkna).remove();clearTimeout(oknoPodpowiedzi);}};})(jQuery);var czasy=new Array();var czasOpoznienia=200;(function($){$.ProducenciAnimacje=function(suma,szerokosc){var SzerNadrzedna=0;var IloscLogotypow=0;if(suma=0){$('#ProducenciAnimacjaStrzalkaLewa').hide();}else{$('#ProducenciAnimacjaStrzalkaLewa').show();} $('#ProducenciAnimacjaStrzalkaPrawa').show();});}});$('#ProducenciAnimacjaStrzalkaPrawa').off('click').click(function(){var JakiMargines=parseInt($('#ProducenciAnimacjaSrodek').css('marginLeft'));if((CalaSzerokosc+JakiMargines)>=(SzerokoscPola+SzerProducenta)){$('#ProducenciAnimacjaStrzalkaPrawa').hide();$('#ProducenciAnimacjaSrodek').stop().animate({marginLeft:JakiMargines+(SzerProducenta*-1)},500,"CofniecieOut",function(){if((CalaSzerokosc+(JakiMargines+(SzerProducenta*-1)))<=(SzerokoscPola+SzerProducenta)){$('#ProducenciAnimacjaStrzalkaPrawa').hide();$('#ProducenciAnimacjaStrzalkaLewa').show();}else{$('#ProducenciAnimacjaStrzalkaPrawa').show();$('#ProducenciAnimacjaStrzalkaLewa').show();}});}});function ProducenciAnimacjePrzelicz(suma,szerokosc){SzerNadrzedna=$('#ProducenciAnimacja').parent().width();IloscLogotypow=parseInt(parseInt(SzerNadrzedna)/(parseInt(szerokosc)+30));SzerProducenta=parseInt((SzerNadrzedna-60)/IloscLogotypow);SzerokoscPola=SzerProducenta*IloscLogotypow;$('#ProducenciAnimacjaSrodek').width(SzerProducenta*suma);CalaSzerokosc=$('#ProducenciAnimacjaSrodek').width();$('#ProducenciAnimacja').css({width:SzerokoscPola+'px'});$('#ProducenciAnimacjaSrodek li').css({width:SzerProducenta+'px'});$('#ProducenciAnimacjaSrodek').css({marginLeft:0});if(suma-1<=IloscLogotypow){$('#ProducenciAnimacjaStrzalkaPrawa').hide();$('#ProducenciAnimacjaStrzalkaLewa').hide();}else{$('#ProducenciAnimacjaStrzalkaPrawa').show();}}}})(jQuery);(function($){var opcje;$.fn.BoxAnimacje=function(opcje){return this.each(function(){$.BoxAnimacje(opcje);});};$.BoxAnimacje=function(opcje){var minPx=0;var szePx=0;var wysImg=parseInt($('#'+opcje.id+'1 .Zdjecie').height());setTimeout(function(){BoxAnimacjePrzelicz(opcje)},czasOpoznienia);if(TypRWD()){$(window).resize(function(){BoxAnimacjePrzelicz(opcje);});} function BoxAnimacjePrzelicz(opcje){var boxTresc=$('#'+opcje.modul).parent('.BoxTresc');var ukryj=false;if(boxTresc.length){if(boxTresc.css('display')=='none'){boxTresc.css({'display':'block'});ukryj=true;}} $('#'+opcje.modul+' '+opcje.html).css({margin:0});$('#'+opcje.modul+' '+opcje.html).show();var modul=$('#'+opcje.modul+' h3');minPx=0;szePx=$('#'+opcje.modul).width();for(t=1;t<=modul.length;t++){$('#'+opcje.id+t).width(szePx);var el=$('#'+opcje.id+t).outerHeight();if(minPx1){$('#'+opcje.id+t).hide();}} if(ukryj==true){boxTresc.css({'display':'none'});} $('#'+opcje.modul).height((parseInt(minPx)+10)+'px');clearTimeout(czasy[opcje.id]);if(opcje.typ=='fade'){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.Fade(2,opcje)},opcje.czas);} if(opcje.typ=='slide'){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.Slide(2,opcje)},opcje.czas);} if(opcje.typ=='scrolldown'){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollVert(2,opcje,'dol')},opcje.czas);} if(opcje.typ=='scrollup'){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollVert(2,opcje,'gora')},opcje.czas);} if(opcje.typ=='scrollleft'){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollHoriz(2,opcje,'lewo')},opcje.czas);} if(opcje.typ=='scrollright'){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollHoriz(2,opcje,'prawo')},opcje.czas);}}} $.BoxAnimacje.ScrollHoriz=function(elementId,opcje,kierunek){if(kierunek=='prawo'){var pomnoz=1;}else{var pomnoz=-1;} var przesuw=parseInt($('#'+opcje.modul).width());var suma=$('#'+opcje.modul+' '+opcje.html).length;var elk=0;if(elementId-1==0){var elk=suma;}else{var elk=elementId-1;} $('#'+opcje.id+elk).stop().animate({marginLeft:(przesuw+10)*pomnoz},opcje.szybkosc/2,function(){$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+elementId).css({'margin-left':(przesuw+10)*pomnoz,'display':'block'});$('#'+opcje.id+elementId).stop().animate({marginLeft:'0px'},opcje.szybkosc,"CofniecieOut",function(){clearTimeout(czasy[opcje.id]);if(elementId+1>suma){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollHoriz(1,opcje,kierunek)},opcje.czas);}else{czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollHoriz(elementId+1,opcje,kierunek)},opcje.czas);}});});};$.BoxAnimacje.ScrollVert=function(elementId,opcje,kierunek){if(kierunek=='dol'){var pomnoz=1;}else{var pomnoz=-1;} var przesuw=parseInt($('#'+opcje.modul).height());var suma=$('#'+opcje.modul+' '+opcje.html).length;var elk=0;if(elementId-1==0){var elk=suma;}else{var elk=elementId-1;} $('#'+opcje.id+elk).stop().animate({marginTop:(przesuw+10)*pomnoz},opcje.szybkosc/2,function(){$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+elementId).css({'margin-top':(przesuw+10)*pomnoz,'display':'block'});$('#'+opcje.id+elementId).stop().animate({marginTop:'0px'},opcje.szybkosc,"CofniecieOut",function(){clearTimeout(czasy[opcje.id]);if(elementId+1>suma){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollVert(1,opcje,kierunek)},opcje.czas);}else{czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.ScrollVert(elementId+1,opcje,kierunek)},opcje.czas);}});});};$.BoxAnimacje.Slide=function(elementId,opcje){var suma=$('#'+opcje.modul+' '+opcje.html).length;if(elementId-1==0){$('#'+opcje.id+suma).stop().slideUp(opcje.szybkosc);}else{$('#'+opcje.id+(elementId-1)).stop().slideUp(opcje.szybkosc);} $('#'+opcje.id+elementId).stop().slideDown(opcje.szybkosc,function(){clearTimeout(czasy[opcje.id]);if(elementId+1>$('#'+opcje.modul+' '+opcje.html).length){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.Slide(1,opcje)},opcje.czas);}else{czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.Slide(elementId+1,opcje)},opcje.czas);}});};$.BoxAnimacje.Fade=function(elementId,opcje){$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+elementId).fadeIn(opcje.szybkosc,function(){clearTimeout(czasy[opcje.id]);if(elementId+1>$('#'+opcje.modul+' '+opcje.html).length){czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.Fade(1,opcje)},opcje.czas);}else{czasy[opcje.id]=setTimeout(function(){$.BoxAnimacje.Fade(elementId+1,opcje)},opcje.czas);}});};})(jQuery);(function($){var opcje;$.fn.BoxPrzewijanie=function(opcje){return this.each(function(){$.BoxPrzewijanie(opcje);});};$.BoxPrzewijanie=function(opcje){var minPx=0;var szePx=0;var wysImg=parseInt($('#'+opcje.id+'1 .Zdjecie').height());setTimeout(function(){BoxPrzewijaniePrzelicz(opcje)},czasOpoznienia);var suma=parseInt($('#'+opcje.modul+' '+opcje.html).length);$('#'+opcje.modul+' .strzalkaPrawa').off('click').click(function(){var liOut=$('#'+opcje.modul+' .AktLicz').html();var li=$('#'+opcje.modul+' .AktLicz');var it=parseInt(li.html());if(it==suma){li.html(1);}else{li.html(it+1);} $.BoxPrzewijanie.Animuj(opcje,szePx,wysImg,li,liOut,'prawa');});$('#'+opcje.modul+' .strzalkaLewa').off('click').click(function(){var liOut=$('#'+opcje.modul+' .AktLicz').html();var li=$('#'+opcje.modul+' .AktLicz');var it=parseInt(li.html());if(it==1){li.html(suma);}else{li.html(it-1);} $.BoxPrzewijanie.Animuj(opcje,szePx,wysImg,li,liOut,'lewa');});if(TypRWD()){$(window).resize(function(){BoxPrzewijaniePrzelicz(opcje);});} function BoxPrzewijaniePrzelicz(opcje){var boxTresc=$('#'+opcje.modul).parent('.BoxTresc');var ukryj=false;if(boxTresc.length){if(boxTresc.css('display')=='none'){boxTresc.css({'display':'block'});ukryj=true;}} $('#'+opcje.modul+' '+opcje.html).css({margin:0});$('#'+opcje.modul+' .AktLicz').html(1);$('#'+opcje.modul+' '+opcje.html).show();var modul=$('#'+opcje.modul+' h3');minPx=0;szePx=$('#'+opcje.modul).width();for(t=1;t<=modul.length;t++){$('#'+opcje.id+t).width(szePx);var el=$('#'+opcje.id+t).outerHeight();if(minPx1){$('#'+opcje.id+t).hide();}} if(ukryj==true){boxTresc.css({'display':'none'});} $('#'+opcje.modul).height((parseInt(minPx)+10)+'px');$.BoxPrzewijanie.Strzalki(opcje,szePx,wysImg,'pokaz');}} $.BoxPrzewijanie.Strzalki=function(opcje,szePx,wysImg,akcja){var lewa=$('#'+opcje.modul+' .strzalkaLewa');var prawa=$('#'+opcje.modul+' .strzalkaPrawa');if(akcja=='pokaz'){lewa.css({'margin-top':(wysImg/2)+'px'});prawa.css({'margin-top':(wysImg/2)+'px','margin-left':(szePx-24)+'px'});lewa.fadeIn('fast');prawa.fadeIn('fast');}else{lewa.hide();prawa.hide();}};$.BoxPrzewijanie.Animuj=function(opcje,szePx,wysImg,li,liOut,strona){$.BoxPrzewijanie.Strzalki(opcje,szePx,wysImg,'ukryj');$('#'+opcje.id+liOut).stop().animate({marginLeft:(szePx+10)*((strona=='prawa')?-1:1)},300,function(){$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+li.html()).css({'margin-left':(szePx+10)*((strona=='prawa')?1:-1),'display':'block'});$('#'+opcje.id+li.html()).stop().animate({marginLeft:'0px'},600,"CofniecieOut",function(){$.BoxPrzewijanie.Strzalki(opcje,szePx,wysImg,'pokaz');});});};})(jQuery);(function($){var opcje;$.fn.BoxPrzyciski=function(opcje){return this.each(function(){$.BoxPrzyciski(opcje);});};$.BoxPrzyciski=function(opcje){var minPx=0;var szePx=0;setTimeout(function(){BoxPrzyciskiPrzelicz(opcje)},czasOpoznienia);$('#'+opcje.przyciski+' b').off('click').click(function(){var Poprzedni=TylkoLiczba($('#'+opcje.przyciski).find('.On').attr("id"));var Aktywny=TylkoLiczba($(this).attr("id"));if(Poprzedni!=Aktywny){$('#'+opcje.przyciski+' b').removeClass('On');$(this).addClass('On');$('#'+opcje.id+'op'+Poprzedni).stop().animate({marginLeft:(szePx+10)*-1},300,function(){$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+'op'+Aktywny).css({'margin-left':(szePx+10)*1,'display':'block'});$('#'+opcje.id+'op'+Aktywny).stop().animate({marginLeft:'0px'},600,"CofniecieOut");});}});if(TypRWD()){$(window).resize(function(){BoxPrzyciskiPrzelicz(opcje);});} function BoxPrzyciskiPrzelicz(opcje){var boxTresc=$('#'+opcje.modul).parent('.BoxTresc');var ukryj=false;if(boxTresc.length){if(boxTresc.css('display')=='none'){boxTresc.css({'display':'block'});ukryj=true;}} $('#'+opcje.przyciski+' b').removeClass('On');$('#'+opcje.przyciski+' b:first-child').addClass('On');$('#'+opcje.modul+' '+opcje.html).css({margin:0});$('#'+opcje.modul+' '+opcje.html).show();var modul=$('#'+opcje.modul+' h3');minPx=0;szePx=$('#'+opcje.modul).width();for(t=1;t<=modul.length;t++){$('#'+opcje.id+'op'+t).width(szePx);var el=$('#'+opcje.id+'op'+t).outerHeight();if(minPx1){$('#'+opcje.id+'op'+t).hide();}} if(ukryj==true){boxTresc.css({'display':'none'});} $('#'+opcje.modul).height((parseInt(minPx)+10)+'px');}}})(jQuery);(function($){var opcje;$.fn.ModulPrzewijanie=function(opcje){return this.each(function(){$.ModulPrzewijanie(opcje);});};$.ModulPrzewijanie=function(opcje){var SzerModulu=0;var IloscMod=0;var WysModulu=0;var SzerokoscElementu=0;if($('#'+opcje.modul).find('.StronyAnim').length){opcje.rodzajnawigacja='przyciski';}else{opcje.rodzajnawigacja='strzalki';} setTimeout(function(){ModulPrzewijanePrzelicz(opcje)},czasOpoznienia);if(TypRWD()){$(window).resize(function(){if(opcje.animacja=='tak'){clearTimeout(czasy[opcje.id]);} ModulPrzewijanePrzelicz(opcje);if(opcje.animacja=='tak'){czasy[opcje.id]=setTimeout(function(){$.ModulPrzewijanie.Animacja(SzerModulu,WysModulu,opcje,IloscMod)},opcje.czas);}});} function ModulPrzewijanePrzelicz(opcje){if(opcje.rodzajnawigacja=='strzalki'){SzerModulu=$('#'+opcje.modul).find('.StronyStrzalki').outerWidth();}else{SzerModulu=$('#'+opcje.modul).outerWidth();} SzerokoscElementu=SzerModulu/opcje.kolumny;var IloscKolumn=opcje.kolumny;if(TypRWD()){for(h=1;h<4;h++){if(SzerokoscElementu<((opcje.rodzajnawigacja=='strzalki')?205:225)){IloscKolumn-=1;SzerokoscElementu=SzerModulu/IloscKolumn;}} var IloscPrzyciskow=parseInt($('#'+opcje.modul+' li article').length/IloscKolumn);if(IloscPrzyciskow!=$('#'+opcje.modul+' li article').length/IloscKolumn){IloscPrzyciskow++;} if(opcje.rodzajnawigacja=='przyciski'){if(IloscPrzyciskow!=$('#'+opcje.modul+' .StronyAnim b').length){$('#'+opcje.modul+' .StronyAnim').html('');IloscMod=0;for(t=1;t<=IloscPrzyciskow;t++){$('#'+opcje.modul+' .StronyAnim').append(''+t+'');IloscMod++;}}else{IloscMod=IloscPrzyciskow;}} if(opcje.rodzajnawigacja=='strzalki'){IloscMod=IloscPrzyciskow;if($('#'+opcje.modul).find('.IloscStron').length==0){$('#'+opcje.modul+' .StronyStrzalki').before('');$('#'+opcje.modul+' .StronyStrzalki').before('');}else{$('#'+opcje.modul+' .IloscStron').html(IloscMod);}}}else{if(opcje.rodzajnawigacja=='przyciski'){IloscMod=$('#'+opcje.modul+' .StronyAnim b').length;} if(opcje.rodzajnawigacja=='strzalki'){IloscMod=parseInt($('#'+opcje.modul+' li article').length/IloscKolumn);if(IloscMod!=$('#'+opcje.modul+' li article').length/IloscKolumn){IloscMod++;} if($('#'+opcje.modul).find('.IloscStron').length==0){$('#'+opcje.modul+' .StronyStrzalki').before('');$('#'+opcje.modul+' .StronyStrzalki').before('');}else{$('#'+opcje.modul+' .IloscStron').html(IloscMod);}}} ModulPrzewijanePrzeliczElement(opcje,SzerokoscElementu);} function ModulPrzewijanePrzeliczElement(opcje){$('#'+opcje.modul+' li article').css({width:SzerokoscElementu});if(!TypRWD()){SzerokoscPadding=parseInt($('#'+opcje.modul+' li article').outerWidth())-parseInt($('#'+opcje.modul+' li article').width());$('#'+opcje.modul+' li article').css({width:SzerokoscElementu-SzerokoscPadding});delete SzerokoscPadding;} $('#'+opcje.modul+' li').css({width:($('#'+opcje.modul+' li article').length*SzerokoscElementu)+50,opacity:1});$('#'+opcje.modul+' li article').css({height:'auto'});var minPx=0;$('#'+opcje.modul+' li article').each(function(){var elr=$(this).outerHeight();if(minPxparseInt($('#'+opcje.modul+' .IloscStron').html())){$('#'+opcje.modul+' .AktualnaStrona').html(1);}else{$('#'+opcje.modul+' .AktualnaStrona').html(AktywnyNumer);} var AktywnyClick=$('#'+opcje.modul+' .AktualnaStrona').html();$.ModulPrzewijanie.Animacja(SzerModulu,WysModulu,opcje,IloscMod,AktywnyClick);});$('#'+opcje.modul+' .LewaStrzalka').off('click').click(function(){var AktywnyNumer=parseInt($('#'+opcje.modul+' .AktualnaStrona').html())-1;if(AktywnyNumer<1){$('#'+opcje.modul+' .AktualnaStrona').html(parseInt($('#'+opcje.modul+' .IloscStron').html()));}else{$('#'+opcje.modul+' .AktualnaStrona').html(AktywnyNumer);} var AktywnyClick=$('#'+opcje.modul+' .AktualnaStrona').html();$.ModulPrzewijanie.Animacja(SzerModulu,WysModulu,opcje,IloscMod,AktywnyClick);});}} if(opcje.animacja=='tak'){czasy[opcje.id]=setTimeout(function(){$.ModulPrzewijanie.Animacja(SzerModulu,WysModulu,opcje,IloscMod)},opcje.czas);$('#'+opcje.modul+' li').hover(function(){clearTimeout(czasy[opcje.id]);},function(){czasy[opcje.id]=setTimeout(function(){$.ModulPrzewijanie.Animacja(SzerModulu,WysModulu,opcje,IloscMod)},opcje.czas);});}} $.ModulPrzewijanie.Animacja=function(SzerModulu,WysModulu,opcje,IloscMod,AktywnyClick){if(opcje.animacja=='tak'){clearTimeout(czasy[opcje.id]);} if(AktywnyClick==undefined){if(opcje.rodzajnawigacja=='przyciski'){var Aktywny=$('#'+opcje.modul+' .StronyAnim').find('.On').html();} if(opcje.rodzajnawigacja=='strzalki'){var Aktywny=$('#'+opcje.modul+' .AktualnaStrona').html();} var NowyAktywny=parseInt(TylkoLiczba(Aktywny))+1;if(NowyAktywny>IloscMod){NowyAktywny=1;}}else{NowyAktywny=TylkoLiczba(AktywnyClick);} if(opcje.rodzajnawigacja=='przyciski'){$('#'+opcje.modul+' .StronyAnim b').removeClass('On');$('#'+opcje.modul+' .StronyAnim b').each(function(){if($(this).html()==NowyAktywny){$(this).addClass('On');}})} if(opcje.rodzajnawigacja=='strzalki'){$('#'+opcje.modul+' .AktualnaStrona').html(NowyAktywny);} if(opcje.typ=='fade'){$('#'+opcje.modul+' li').hide();$('#'+opcje.modul+' li').css({marginLeft:((NowyAktywny-1)*SzerModulu)*-1});$('#'+opcje.modul+' li').stop().fadeIn();} if(opcje.typ=='scrollleft'){$('#'+opcje.modul+' li').stop().animate({marginLeft:((NowyAktywny-1)*SzerModulu)*-1},600,"SzybkoOut");} if(opcje.typ=='scrolltop'){$('#'+opcje.modul+' li').css({marginLeft:((NowyAktywny-1)*SzerModulu)*-1});$('#'+opcje.modul+' li .ElementyAnimacji').css({marginTop:(WysModulu+10)*-1});$('#'+opcje.modul+' li .ElementyAnimacji').stop().animate({marginTop:'0px'},700,"CofniecieOut");} if(opcje.animacja=='tak'){czasy[opcje.id]=setTimeout(function(){$.ModulPrzewijanie.Animacja(SzerModulu,WysModulu,opcje,IloscMod)},opcje.czas);}};})(jQuery);(function($){var opcje;$.fn.ModulAnimacja=function(opcje){return this.each(function(){$.ModulAnimacja(opcje);});};$.ModulAnimacja=function(opcje){var iloscMod=$('#'+opcje.przyciski+' b').length;setTimeout(function(){ModulAnimacjaPrzelicz(opcje)},czasOpoznienia);if(TypRWD()){$(window).resize(function(){ModulAnimacjaPrzelicz(opcje);if(opcje.animacja=='tak'){czasy[opcje.id]=setTimeout(function(){$.ModulAnimacja.Animacja(opcje,'#p_'+opcje.id+'2',iloscMod)},opcje.czas);}});} $('#'+opcje.przyciski+' b').off('click').click(function(){$.ModulAnimacja.Animacja(opcje,this,iloscMod);});if(opcje.animacja=='tak'){$('#'+opcje.modul+' ul').hover(function(){clearTimeout(czasy[opcje.id]);},function(){var Zaznacz=parseInt(TylkoLiczba($('#'+opcje.przyciski).find('.On').attr("id")))+1;if(Zaznacz>iloscMod){Zaznacz='1';} clearTimeout(czasy[opcje.id]);czasy[opcje.id]=setTimeout(function(){$.ModulAnimacja.Animacja(opcje,'#p_'+opcje.id+Zaznacz,iloscMod)},opcje.czas);});} function ModulAnimacjaPrzelicz(opcje){$('#'+opcje.modul).find('ul').css({width:$('#'+opcje.modul).outerWidth(),opacity:1});$('#'+opcje.modul).find('li').css({'float':'none'});var danaWysokosc=0;if(opcje.animacja=='tak'){clearTimeout(czasy[opcje.id]);} $('#'+opcje.modul+' '+opcje.html).css("min-height","inherit");$('#'+opcje.modul+' '+opcje.html).show();$('#'+opcje.modul+' '+opcje.html).each(function(){if($(this).outerHeight()>danaWysokosc){danaWysokosc=$(this).outerHeight();}});$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.przyciski+' b').removeClass('On');$('#p_'+opcje.id+'1').addClass('On');$('#'+opcje.id+'1').show();$('#'+opcje.modul+' '+opcje.html).css("min-height",danaWysokosc);if(opcje.animacja=='tak'){czasy[opcje.id]=setTimeout(function(){$.ModulAnimacja.Animacja(opcje,'#p_'+opcje.id+'2',iloscMod)},opcje.czas);}}};$.ModulAnimacja.Animacja=function(opcje,elem,iloscMod){if(opcje.animacja=='tak'){clearTimeout(czasy[opcje.id]);} var Aktywny=TylkoLiczba($(elem).attr("id"));if($(elem).attr('class')!='On'){$('#'+opcje.przyciski+' b').removeClass('On');$(elem).addClass('On');$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+Aktywny).fadeIn('slow');if(opcje.animacja=='tak'){if(Aktywny==iloscMod){var Pokaz='#p_'+opcje.id+'1';}else{var Pokaz='#p_'+opcje.id+(parseInt(Aktywny)+1);} czasy[opcje.id]=setTimeout(function(){$.ModulAnimacja.Animacja(opcje,Pokaz,iloscMod)},opcje.czas);}}};})(jQuery);(function($){var opcje;$.fn.ModulAnimacjaSpadanie=function(opcje){return this.each(function(){$.ModulAnimacjaSpadanie(opcje);});};$.ModulAnimacjaSpadanie=function(opcje){var iloscMod=$('#'+opcje.przyciski+' b').length;setTimeout(function(){ModulAnimacjaSpadaniePrzelicz(opcje)},czasOpoznienia);if(TypRWD()){$(window).resize(function(){ModulAnimacjaSpadaniePrzelicz(opcje);if(opcje.animacja=='tak'){clearTimeout(czasy[opcje.id]);czasy[opcje.id]=setTimeout(function(){$.ModulAnimacjaSpadanie.Animacja(opcje,'#p_'+opcje.id+'2',iloscMod)},opcje.czas);}});} function ModulAnimacjaSpadaniePrzelicz(opcje){$('#'+opcje.modul).find('ul').css({width:$('#'+opcje.modul).outerWidth(),opacity:1});$('#'+opcje.modul).find('li').css({'float':'none'});$('#'+opcje.modul+' '+opcje.html).show();$('#'+opcje.modul+' '+opcje.html+' .Znikanie').css({height:'auto',width:'auto',margin:0});$('#'+opcje.modul+' '+opcje.html+' .Skakanie').css({height:'auto',width:'auto',margin:0});var minPx=0;$('#'+opcje.modul+' '+opcje.html).each(function(){var min1=$(this).find('.Znikanie').outerHeight();var min2=$(this).find('.Skakanie').outerHeight();minPxTmp=min2;if(min1>min2){minPxTmp=min1;} if(minPxiloscMod){Zaznacz='1';} clearTimeout(czasy[opcje.id]);czasy[opcje.id]=setTimeout(function(){$.ModulAnimacjaSpadanie.Animacja(opcje,'#p_'+opcje.id+Zaznacz,iloscMod)},opcje.czas);});czasy[opcje.id]=setTimeout(function(){$.ModulAnimacjaSpadanie.Animacja(opcje,'#p_'+opcje.id+'2',iloscMod)},opcje.czas);}};$.ModulAnimacjaSpadanie.Animacja=function(opcje,elem,iloscMod){if(opcje.animacja=='tak'){clearTimeout(czasy[opcje.id]);} var Aktywny=TylkoLiczba($(elem).attr("id"));if($(elem).attr('class')!='On'){$('#'+opcje.przyciski+' b').removeClass('On');$(elem).addClass('On');$('#'+opcje.modul+' '+opcje.html).hide();$('#'+opcje.id+Aktywny).show();var SzerokoscElementu=$('#'+opcje.id+Aktywny+' .Znikanie').width();var WysokoscElementu=$('#'+opcje.id+Aktywny+' .FotoPrawe').height();$('#'+opcje.id+Aktywny+' .Skakanie').css({'margin-top':(WysokoscElementu+20)*-1});$('#'+opcje.id+Aktywny+' .Znikanie').width(SzerokoscElementu);$('#'+opcje.id+Aktywny+' .Znikanie').css({'margin-left':(SzerokoscElementu+50)*-1,opacity:0});$('#'+opcje.id+Aktywny+' .Znikanie').stop().animate({marginLeft:0,opacity:1},700,"SzybkoOut");$('#'+opcje.id+Aktywny+' .Skakanie').stop().animate({marginTop:0},900,"SkakanieWolneOut");if(opcje.animacja=='tak'){if(Aktywny==iloscMod){var Pokaz='#p_'+opcje.id+'1';}else{var Pokaz='#p_'+opcje.id+(parseInt(Aktywny)+1);} czasy[opcje.id]=setTimeout(function(){$.ModulAnimacjaSpadanie.Animacja(opcje,Pokaz,iloscMod)},opcje.czas);}}};})(jQuery);(function($){$.WszystkieProdukty=function(szablon,rwd_kontenter,rwd_pozycje,rwd_css_bok,rwd_css_dol){if(szablon==undefined){szablon='moduly/produkty_okna.php';} if(rwd_kontenter==undefined){rwd_kontenter='.OknaRwd';} if(rwd_pozycje==undefined){rwd_pozycje='.OknoRwd';} if(rwd_css_bok==undefined){rwd_css_bok='LiniaPrawaBrak';} if(rwd_css_dol==undefined){rwd_css_dol='LiniaDolnaBrak';} $('#WszystkieProduktyGlowne .ModulPrzyciski b').off('click').click(function(){$('#WszystkieProduktyGlowne').css({opacity:0.2});$('#LadowanieWszystkie').width($('#WszystkieProdukty').width());$('#LadowanieWszystkie').height($('#WszystkieProdukty').height()-50);$('#LadowanieWszystkie').show();var Aktywny=TylkoLiczba($(this).attr("id"));$.post(szablon,{nr:Aktywny},function(data){$('#LadowanieWszystkie').hide();$('#WszystkieProduktyGlowne').css({opacity:0});$('#WszystkieProduktyGlowne').html(data);var ukryjInput='tak';if(ukryjInput=='nie'){$('.Zakup input').hide();$('.Zakup em').hide();} if(TypRWD()){$('#WszystkieProdukty').hide();$('#WszystkieProdukty').fadeIn(500,function(){RWD_Skalowanie({kontener:rwd_kontenter,pozycje:rwd_pozycje,cssDol:rwd_css_dol});});} var powiekszanieZdjecia='nie';if(powiekszanieZdjecia=='tak'){pokazOkno();} $('#WszystkieProduktyGlowne').animate({opacity:1},700);$.scrollTo('#WszystkieProduktyGlowne',400,{offset:-90});});});};})(jQuery);jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{SzybkoIn:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},SzybkoOut:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},SkakanieIn:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a
MENU
');$(kontener+' ul').hide();} $('.RozwinMenu').off('click').click(function(){if($(this).parent().find('ul:first').css('display')=='none'){$(this).parent().find('ul:first').stop().slideDown('fast');}else{$(this).parent().find('ul:first').stop().slideUp('fast');}});if(klasaCssSubmenu!=''){$(kontener+' '+element).each(function(){if($(this).find('ul').length>0){if($(this).find('.'+klasaCssSubmenu).length==0){$(this).find('ul').before('');}}});$(kontener).find('ul:first '+element).off('mouseenter').off('mouseleave');$('.'+klasaCssSubmenu).off('click').click(function(){$(kontener+' '+element+' ul').stop().slideUp('fast');if($(this).parent().find('ul').css('display')=='none'){$(this).parent().find('ul').stop().slideDown('fast');}else{$(this).parent().find('ul').stop().slideUp('fast');}});}}else{$(kontener).removeClass('Zwiniete').addClass('Rozwiniete');$(kontener).find('ul:first').show();if($('.'+klasaCss).length>0){$('.'+klasaCss).remove();if(klasaCssSubmenu!=''){$('.'+klasaCssSubmenu).remove();}} $(kontener).find('ul:first '+element).hover(function(){if($(this).find('ul').length>0){if($(this).find('ul').css('display')=='none'){$(this).find('ul').stop().slideDown('fast');}}},function(){$(this).find('ul').stop().slideUp('fast');});}} function RWD_SzerokoscKolumn(){if($('#Strona').length){var szerokoscStrony=$('#Strona').outerWidth();if($('#LewaKolumna').length){szerokoscStrony-=$('#LewaKolumna').outerWidth();} if($('#PrawaKolumna').length){szerokoscStrony-=$('#PrawaKolumna').outerWidth();} if(szerokoscStrony>0){$('#SrodekKolumna').width(szerokoscStrony);}}} function RWD_ZwiniecieStopki(kontener,element){if($(kontener+' '+element).css('cursor')=='pointer'){$(kontener+' ul').hide();$(kontener+' div').hide();$(kontener+' '+element).find('span').removeClass('StopkaZwin').addClass('StopkaRozwin');}else{$(kontener+' ul').show();$(kontener+' div').css({'height':'auto'}).show();} $(kontener+' '+element).off('click').click(function(){if($(kontener+' '+element).css('cursor')=='pointer'){$(kontener+' ul').stop().slideUp('fast');$(kontener+' div').stop().slideUp('fast');$(kontener+' '+element).find('span').removeClass('StopkaZwin').addClass('StopkaRozwin');if($(this).parent().find('ul').css('display')=='none'){$(this).parent().find('ul').stop().slideDown('fast');$(this).parent().find('div').stop().slideDown('fast');$(this).find('span').removeClass('StopkaRozwin').addClass('StopkaZwin');}else{$(this).parent().find('ul').stop().slideUp('fast');$(this).parent().find('div').stop().slideUp('fast');}}});} function RWD_ZwiniecieBoxu(){$(window).resize(function(){if(szerokoscEkranu!=$(window).width()){if($('#Strona').length){var szerokoscStrony=$('#Strona').outerWidth();} $('.BoxRwd').each(function(){if($(this).find('.BoxZawartosc').length){if(szerokoscStrony<980){$(this).find('.BoxZawartosc').css('display','none');}else{$(this).find('.BoxZawartosc').css('display','block');} if($(this).find('.BoxZawartosc').css('display')=='none'){$(this).find('.BoxRozwinZwin').addClass('BoxRozwin').removeClass('BoxZwin');}}});}});$('.BoxRwd').find('.BoxRozwinZwin').bind('click',function(event){var elemBox=$(event.target).parent().parent().find('.BoxZawartosc');var elemNaglowek=$(event.target).parent().parent().find('.BoxRozwinZwin');if(elemBox.length){if(elemBox.css('display')=='block'){elemBox.stop().slideUp();if(elemNaglowek.length){elemNaglowek.addClass('BoxRozwin').removeClass('BoxZwin');}}else{elemBox.stop().slideDown();if(elemNaglowek.length){elemNaglowek.removeClass('BoxRozwin').addClass('BoxZwin');}}}});} function RWD_Skalowanie(opcje){$(opcje.kontener).each(function(){$pozycje=$(this).find(opcje.pozycje);$pozycje.css('height','auto');if(opcje.cssDol!=''){$pozycje.removeClass(opcje.cssDol);} var iloscPozycjiKolumna=Math.floor($(this).width()/$pozycje.width());if((iloscPozycjiKolumna==null||iloscPozycjiKolumna<2)&&(opcje.cssDol!='')){ostatni=$pozycje[$pozycje.length-1];$(ostatni).addClass(opcje.cssDol);delete ostatni;} if(iloscPozycjiKolumna==null||iloscPozycjiKolumna<2)return true;var wiersze=1;for(var i=0,j=$pozycje.length;imaxWysokosc)maxWysokosc=wysokoscElementu;});$row.css('height',maxWysokosc);} if(opcje.cssDol!=''){ile=parseInt($pozycje.length-(parseInt($pozycje.length/iloscPozycjiKolumna)*iloscPozycjiKolumna));if(ile==0){ile=iloscPozycjiKolumna;} for(var y=1;y<=ile;y++){rowm=$pozycje[$pozycje.length-y];$(rowm).addClass(opcje.cssDol);delete rowm;} delete ile;}});} var BylModulStaly=false;var BylModulDolny=false;$(document).ready(function(){filtryObsluga();});(function($){$.OstatnioOgladane=function(){$(document).ready(function(){if(BylModulStaly==true||BylModulDolny==true){$('#PrzyklejOstatnieProd').hide();}});$('#PrzyklejOstatnieProd').click(function(){if($('#PrzyklejOstatnieProd ul').css('display')=='none'){$('#PrzyklejOstatnieProd ul').stop().slideDown(function(){$('#PrzyklejOstatnieProd').fadeTo('fast',0.9);$('#PrzyklejOstatnieProd .Rozwiniecie').fadeTo('fast',0.1);});}else{$('#PrzyklejOstatnieProd ul').stop().slideUp(function(){$('#PrzyklejOstatnieProd').fadeTo('fast',0.5);$('#PrzyklejOstatnieProd .Rozwiniecie').fadeTo('fast',1);});}});$('#PrzyklejOstatnieProd .Zamknij').click(function(){document.cookie='oknoPoprzednie="nie"';$('#PrzyklejOstatnieProd').stop().slideUp(function(){$('#PrzyklejOstatnieProd').remove();});});}})(jQuery);(function($){$.Blokada18plus=function(){$('.BlokadaPrzyciski .wejdz').click(function(){document.cookie='akcept18plus=tak';$('#BlokadaOkno').stop().slideUp('fast',function(){$('#Blokada18').fadeOut(function(){window.location.reload();});});});$('.BlokadaPrzyciski .zrezygnuj').click(function(){history.back(1);});BylModulStaly=true;}})(jQuery);(function($){$.InfoCookie=function(){if(!$('#InfoCookie').length){$('body').append('
'+infoCookieTekst+'
');$('#InfoCookie').append(''+infoCookieAkcept+'');BylModulDolny=true;} $('#InfoAkcept').click(function(){var data=new Date();data.setTime(data.getTime()+(999*24*60*60*1000));document.cookie='akceptCookie=tak;expires="'+data.toGMTString()+'";path=/';$('#InfoCookie').stop().slideUp(function(){$('#InfoCookie').remove();});});}})(jQuery);(function($){$.ProduktyListaZdjecie=function(idModulu){$('#'+idModulu+' h3:first-child a').addClass('wyswietlany');$('#'+idModulu+' h3').hover(function(){var idm=$(this).attr("id");$('#'+idModulu+' li').css({'display':'none'});$('#'+idModulu+' .NazwyProduktow a').removeClass('wyswietlany');$('#f'+idm).css({'display':'block'});$('#'+idm+' a').addClass('wyswietlany');});}})(jQuery);function odliczaj(o,sek,slowo_dni){var dni=parseInt(sek/86400);var godziny=parseInt(sek/3600)%24;var minuty=parseInt(sek/60)%60;var sekundy=sek%60;var wynDni='';if(dni>0){wynDni=dni+' '+slowo_dni+' ';} var wynik=wynDni+(godziny<10?"0"+godziny:godziny)+":"+(minuty<10?"0"+minuty:minuty)+" "+(sekundy<10?"0"+sekundy:sekundy);var wyn='';for(r=0;r-1){wyn=wyn+''+wynik.charAt(r)+'';}else{wyn=wyn+wynik.charAt(r);}} $("#"+o).html(wyn);if(sek>0){setTimeout(function(){odliczaj(o,--sek,slowo_dni)},1e3);}else{window.location.reload();}} function wyswietlTagi(ilosc){$.getJSON("inne/chmura.php?ilosc="+ilosc+"&powrot=?",function(data){$('#tagCloud').html('');var suma=0;$.each(data.tags,function(i,val){suma=parseInt(suma)+parseInt(val.freq);});var link='';var cssProcent=[0,3,5,10,15,20,50];var cssFade=[60,70,70,80,80,90,100];$.each(data.tags,function(i,val){var CssKlasa="";var Procent=parseInt((val.freq/suma)*100);for(i=Procent;i<=100;i++){if(jQuery.inArray(i,cssProcent)>-1){CssKlasa='tag_'+i;break;}} link=link+''+val.tag+'';});$("#tagCloud").append(link);for(i=0;i<7;i++){$("#tagCloud .tag_"+cssProcent[i]).css({opacity:(cssFade[i]/100)});}});} function filtryBox(){if($('#filtr').length){wyswietlFiltrBox();sposobWyswietlaniaFiltrow();filtryObsluga();if(TypRWD()){$(window).resize(function(){sposobWyswietlaniaFiltrow();});}}else{$('#boxFiltry').remove();}} function sposobWyswietlaniaFiltrow(){if($('#Strona').outerWidth()<760){wyswietlFiltrModul();filtryObsluga();}else{wyswietlFiltrBox();filtryObsluga();}} function wyswietlFiltrBox(){if($('.ListingFiltry').css('display')=='block'){var filtry=$('#filtr').html();$('.ListingFiltry').hide();$('#filtryBox').html(filtry);$('#filtryBox .Lf strong').remove();$('#filtryBox .Lf').hide();$('#filtryBox').append('
');$('#filtryWyswietl').html($('#filtryBox .Rg').html());$('#filtryBox .Rg').remove();$('#boxFiltry').show();$(".Multi").find('.Wybor').show();if($('#PrawaKolumna #boxFiltry').length){$('#filtr').find('input').each(function(){nazwa_tmp=$(this).attr('name');id_tmp=$(this).attr('id');if(nazwa_tmp!=undefined){$(this).attr('name','tmp_'+nazwa_tmp);} if(id_tmp!=undefined){$(this).attr('id','tmp_'+id_tmp);}});}}} function wyswietlFiltrModul(){var filtryBox=$('#filtryBox').html();$('#filtryBox').html('');$('#boxFiltry').hide();$('.ListingFiltry').show();if($('#PrawaKolumna #boxFiltry').length){$('#filtr').find('input').each(function(){nazwa_tmp=$(this).attr('name');id_tmp=$(this).attr('id');if(nazwa_tmp!=undefined){$(this).attr('name',nazwa_tmp.replace('tmp_',''));} if(id_tmp!=undefined){$(this).attr('id',id_tmp.replace('tmp_',''));}});} $(".Multi").find('.Wybor').hide();} function filtryObsluga(){$(".Multi span").off('click').click(function(){if($(this).parent().find('.Wybor').css('display')=='none'){$(this).parent().find('.Wybor').stop().slideDown("fast");}else{$(this).parent().find('.Wybor').stop().slideUp("fast");}});$(".Multi").off('click').click(function(){wlaczonyFiltr=false;$(this).find('label').each(function(){if($(this).attr('class')=='Wlaczony'){wlaczonyFiltr=true;}});if(wlaczonyFiltr==true){$(this).find('b').addClass('Wlaczony');}else{$(this).find('b').removeClass('Wlaczony');}});$('.Wybor label').off('click').click(function(){if($(this).attr('class')=='Wlaczony'){$(this).removeClass('Wlaczony');}else{$(this).addClass('Wlaczony');}});$('.Wybor label a').off('click').click(function(){var idelem=$(this).attr('data-id');if($('#label_'+idelem).attr('class')=='Wlaczony'){$('#label_'+idelem).removeClass('Wlaczony');$('#'+idelem).prop('checked',false);}else{$('#label_'+idelem).addClass('Wlaczony');$('#'+idelem).prop('checked',true);} ustawScroll();if($('#boxFiltry').length&&$('#filtryBox').html()!=''){$('#filtrBox').submit();}else{$('#filtr').submit();}});$(".Multi").hover(function(){if($(this).find('.Wybor').css('position')=='absolute'){$(this).find('.Wybor').stop().slideDown("fast");}},function(){if($(this).find('.Wybor').css('position')=='absolute'){$(this).find('.Wybor').stop().slideUp("fast");}});if(TypRWD()){$(window).resize(function(){if(!$('#filtryBox').length){$(".Multi").find('.Wybor').hide();}});}} (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(z+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in y[0]&&!y[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),y.focus())}function c(t){c.str!==t&&(y.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){z=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),z=W.index(_.el),-1===z&&(W=W.add(_.el),z=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),y.css({visibility:"hidden",display:"block",opacity:""}),L=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(L),D=T.height()+k.height()+b.outerHeight(!0)-b.height(),j=C.width()+H.width()+b.outerWidth(!0)-b.width(),A=L.outerHeight(!0),N=L.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=(l!==!1?Math.min(h,a(l,"x")):h)-N-j,_.h=(f!==!1?Math.min(s,a(f,"y")):s)-A-D,L.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),y.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("
"),w()}}function p(){y||(V=!1,E=t(i),y=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),S=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),x=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),I=n(se,"Current"),P=t('