jQuery(document).ready(function(){jQuery('#action_slider').jcarousel({scroll:1,auto:10,initCallback:mycarousel_initCallback,itemVisibleInCallback:animationStep,wrap:'circular'});jQuery('#favourite_magazine_slide').jcarousel({scroll:7,auto:14,animation:2000,wrap:'circular'});jQuery('.similar_products ul').jcarousel({scroll:5,auto:10,wrap:'circular'});jQuery(document).click(function(){jQuery("#shipping-condition-infobox").hide();});jQuery('input[name="billing[fastestdelivery]"]').change(function(){if(jQuery(this).attr('checked')=='checked'){jQuery('input[name="billing[billing-dayoffirstdelivery_day]"]').val('');jQuery('input[name="billing[billing-dayoffirstdelivery_month]"]').val('');jQuery('input[name="billing[billing-dayoffirstdelivery_year]"]').val('');jQuery('input[name="billing[billing-dayoffirstdelivery_day]"]').attr('disabled','disabled');jQuery('input[name="billing[billing-dayoffirstdelivery_month]"]').attr('disabled','disabled');jQuery('input[name="billing[billing-dayoffirstdelivery_year]"]').attr('disabled','disabled');jQuery('input[name="billing[billing-dayoffirstdelivery_day]"]').css('background-color','#eee');jQuery('input[name="billing[billing-dayoffirstdelivery_month]"]').css('background-color','#eee');jQuery('input[name="billing[billing-dayoffirstdelivery_year]"]').css('background-color','#eee');}else{jQuery('input[name="billing[billing-dayoffirstdelivery_day]"]').removeAttr('disabled');jQuery('input[name="billing[billing-dayoffirstdelivery_month]"]').removeAttr('disabled');jQuery('input[name="billing[billing-dayoffirstdelivery_year]"]').removeAttr('disabled');jQuery('input[name="billing[billing-dayoffirstdelivery_day]"]').css('background-color','#fff');jQuery('input[name="billing[billing-dayoffirstdelivery_month]"]').css('background-color','#fff');jQuery('input[name="billing[billing-dayoffirstdelivery_year]"]').css('background-color','#fff');}});jQuery('input[name="shipping[fastestdelivery]"]').change(function(){if(jQuery(this).attr('checked')=='checked'){jQuery('input[name="shipping[shipping-dayoffirstdelivery_day]"]').val('');jQuery('input[name="shipping[shipping-dayoffirstdelivery_month]"]').val('');jQuery('input[name="shipping[shipping-dayoffirstdelivery_year]"]').val('');jQuery('input[name="shipping[shipping-dayoffirstdelivery_day]"]').attr('disabled','disabled');jQuery('input[name="shipping[shipping-dayoffirstdelivery_month]"]').attr('disabled','disabled');jQuery('input[name="shipping[shipping-dayoffirstdelivery_year]"]').attr('disabled','disabled');jQuery('input[name="shipping[shipping-dayoffirstdelivery_day]"]').css('background-color','#eee');jQuery('input[name="shipping[shipping-dayoffirstdelivery_month]"]').css('background-color','#eee');jQuery('input[name="shipping[shipping-dayoffirstdelivery_year]"]').css('background-color','#eee');}else{jQuery('input[name="shipping[shipping-dayoffirstdelivery_day]"]').removeAttr('disabled');jQuery('input[name="shipping[shipping-dayoffirstdelivery_month]"]').removeAttr('disabled');jQuery('input[name="shipping[shipping-dayoffirstdelivery_year]"]').removeAttr('disabled');jQuery('input[name="shipping[shipping-dayoffirstdelivery_day]"]').css('background-color','#fff');jQuery('input[name="shipping[shipping-dayoffirstdelivery_month]"]').css('background-color','#fff');jQuery('input[name="shipping[shipping-dayoffirstdelivery_year]"]').css('background-color','#fff');}});if((jQuery("input[name='abotype']:checked").length>0)&&(jQuery('.step4.magazines').length>0)){globalBonusTypeName=jQuery("input[name='abotype']:checked").attr('rel');globalActualElement=jQuery("input[name='abotype']:checked");globalElement_temp=jQuery('.step3.magazines');jQuery('.step3.magazines').html(globalBonusTypeName+' ausw&auml;hlen');showOrHideStep3(globalBonusTypeName,globalActualElement);}
jQuery("input[name='abotype']").change(function(){if(jQuery(this).hasClass('multipleAbotype'))
{id=jQuery(this).attr('id');selectBox=jQuery('#multi'+id);value=selectBox.val().split('||');selectBoxHasBonus=value[2];bonusAvailableClass='abotype_check_no_premium';if(selectBoxHasBonus=='0')
{if(!jQuery(this).hasClass(bonusAvailableClass))
{jQuery(this).addClass(bonusAvailableClass);jQuery(this).attr('alt','disactive');}}
else
{jQuery(this).removeClass(bonusAvailableClass);}}
globalBonusTypeName=jQuery(this).attr('rel');showOrHideStep3(globalBonusTypeName,jQuery(this));});separateShippingform();initHolidayService();jQuery('input[name="billing[use_for_extrashipping]"]').change(function(){if(jQuery(this).is(':checked'))
{jQuery('input[name="billing[use_for_extrashipping_value]"]').val('on');jQuery('#extraShipping-container').slideUp('slow',function(){});removeRequiredFromShippingForm();}else{jQuery('input[name="billing[use_for_extrashipping_value]"]').val('off');jQuery('#extraShipping-container').slideDown('slow',function(){});addRequiredToShippingForm();}});});function showAndHideInfobox(id){if(jQuery('div#'+id).css('display')=='block'){jQuery('div#'+id).hide();}else{jQuery('div#'+id).show();}}
function showOrHideStep3(bonusTypeName,actualElement)
{active=actualElement.attr('alt');if(actualElement.hasClass('abotype_check_no_premium')&&active!='active'&&jQuery(".step3_bak").length==0)
{jQuery("input[name='abotype']").attr('disabled','disabled');jQuery('input[name="abotype"]').attr('alt','active');jQuery('.step3.magazines').animate({opacity:0},200,function(){jQuery('.buttonNext.Bonus').html('<span>Zur Kasse</span>');width=jQuery('.step3.magazines').width();jQuery('.step3.magazines').animate({width:0,paddingRight:0,paddingLeft:0},500,function(){element=jQuery('.step4.magazines').removeClass('step4');element_temp=jQuery('.step3.magazines').removeClass('step3');element_temp.addClass('step3_bak');element_temp.attr('alt',width);element.addClass('step3');jQuery("input[name='abotype']").removeAttr('disabled');});});}
else if(!actualElement.hasClass('abotype_check_no_premium')&&active=='active')
{jQuery("input[name='abotype']").attr('disabled','disabled');jQuery('input[name="abotype"]').attr('alt','disactive');jQuery('.buttonNext.Bonus').html('<span>Weiter zur '+((bonusTypeName=='Prämie')?'Prämienauswahl</span>':'Geschenkauswahl</span>'));jQuery('.step3_bak.magazines').animate({width:parseInt(globalElement_temp.attr('alt')),paddingLeft:28,paddingRight:28},500,function(){element=jQuery('.step3.magazines').removeClass('step3');element.addClass('step4');element.html('Kasse');element_temp=jQuery('.step3_bak.magazines').removeClass('step3_bak');element_temp.addClass('step3');element_temp.css('width','auto');jQuery('.step3.magazines').animate({opacity:1},200,function(){jQuery("input[name='abotype']").removeAttr('disabled');});if(jQuery('.step4.magazines').length>0){jQuery('.step3.magazines').html(((bonusTypeName=='Prämie')?'Prämie</span>':'Geschenk</span>')+' ausw&auml;hlen');}});}
if(!actualElement.hasClass('abotype_check_no_premium')&&active!='active')
{jQuery('.buttonNext.Bonus').html('<span>Weiter zur '+((bonusTypeName=='Prämie')?'Prämienauswahl</span>':'Geschenkauswahl</span>'));jQuery('.step3.magazines').html(((bonusTypeName=='Prämie')?'Prämie</span>':'Geschenk</span>')+' ausw&auml;hlen');}}
function mycarousel_initCallback(carousel){jQuery('.jcarousel-control a').bind('click',function(){carousel.scroll(jQuery.jcarousel.intval(jQuery(this).attr('id')));jQuery('.jcarousel-control a').removeClass('active');jQuery(this).addClass('active');return false;});jQuery('.jcarousel-scroll select').bind('change',function(){carousel.options.scroll=jQuery.jcarousel.intval(this.options[this.selectedIndex].value);return false;});};function getCorrectId(itemId){if(itemId<1){itemId=itemId+5;}
if(itemId<1){return getCorrectId(itemId);}else{return itemId;}}
function animationStep(item1,item2,item3,item4)
{if(item3<1){item3=getCorrectId(item3);}
if(item3>jQuery('.jcarousel-control a').length)
{value1=parseInt(item3/jQuery('.jcarousel-control a').length);value2=jQuery('.jcarousel-control a').length*parseInt(item3/jQuery('.jcarousel-control a').length);if(item3==value2)
{value2=jQuery('.jcarousel-control a').length*(parseInt(item3/jQuery('.jcarousel-control a').length)-1);}
item3=item3-value2;}
jQuery('.jcarousel-control a').removeClass('active');jQuery('.jcarousel-control a#'+item3).addClass('active');}
function showReviewForm()
{jQuery(".review_form").slideToggle();}
function saveReview()
{if(jQuery('input[name="agreement[x]"]').length!=0){if(jQuery('input[name="agreement[x]"]').attr('checked')!='checked'){if(jQuery('input[name="agreement[1]"]').attr('checked')=='checked'){jQuery('input[name="agreement[1]"]').removeAttr('checked');}}else{if(jQuery('input[name="agreement[1]"]').attr('checked')!='checked'){jQuery('input[name="agreement[1]"]').attr('checked','checked');}}}
review.save();}
Varien.DeliveryDateElement=Class.create();Varien.DeliveryDateElement.prototype={initialize:function(type,content,required,format){if(type=='id'){this.day=$(content+'day');this.month=$(content+'month');this.year=$(content+'year');this.full=$(content+'full');this.advice=$(content+'advice');}else if(type=='container'){this.day=content.day;this.month=content.month;this.year=content.year;this.full=content.full;this.advice=content.advice;}else{return;}
this.required=required;this.format=format;this.day.addClassName('validate-custom');this.day.validate=this.validate.bind(this);this.month.addClassName('validate-custom');this.month.validate=this.validate.bind(this);this.year.addClassName('validate-custom');this.year.validate=this.validate.bind(this);this.year.setAttribute('autocomplete','off');this.advice.hide();},validate:function(){var error=false,day=parseInt(this.day.value,10)||0,month=parseInt(this.month.value,10)||0,year=parseInt(this.year.value,10)||0;if(this.day.value==''&&this.month.value==''&&this.year.value=='')
{return true;}
if(!day&&!month&&!year&&(day!=0||month!=0||year!=0)){if(this.required){error='This date is a required value.';}else{this.full.value='';}}else if(!day||!month||!year){error='Please enter a valid date.';}else{var date=new Date;var curyear=date.getFullYear();var countDaysInMonth=0;var errorType=null;date.setYear(year);date.setMonth(month-1);date.setDate(32);countDaysInMonth=32-date.getDate();if(!countDaysInMonth||countDaysInMonth>31)countDaysInMonth=31;if(day<1||day>countDaysInMonth){errorType='day';error='Please enter a valid day (1-%d).';}else if(month<1||month>12){errorType='month';error='Please enter a valid month (1-12).';}else{var curDate=new Date;var curTime=curDate.getTime();var futureDateTime=curTime+(90*24*60*60*1000)+(61*60*1000);var futureDateObject=new Date;futureDateObject.setTime(futureDateTime)
curyear=futureDateObject.getFullYear();var testDate=new Date;testDate.setMonth(month-1);testDate.setDate(day);testDate.setFullYear(year);var inputDateTime=testDate.getTime();if(year<curDate.getFullYear()){errorType='year';error='Bitte geben sie einen Liefertermin an, der in der Zukunft liegt.';}else if(inputDateTime>futureDateTime){errorType='input';error='Bitte geben sie ein Datum an, welches den '+futureDateObject.getDate()+'.'+(futureDateObject.getMonth()+1)+'.'+futureDateObject.getFullYear()+' nicht &uuml;berschreitet.'}else if(inputDateTime<curDate.getTime()){errorType='input';error='Bitte geben sie einen Liefertermin an, der in der Zukunft liegt.'}else{if(day%10==day)this.day.value='0'+day;if(month%10==month)this.month.value='0'+month;this.full.value=this.format.replace(/%[mb]/i,this.month.value).replace(/%[de]/i,this.day.value).replace(/%y/i,this.year.value);var testFull=this.month.value+'/'+this.day.value+'/'+this.year.value;var test=new Date(testFull);if(isNaN(test)){error='Please enter a valid date.';}}}}
if(error!==false){try{error=Translator.translate(error);}
catch(e){}
this.advice.innerHTML=error.replace('%d',errorType=='day'?countDaysInMonth:curyear);this.advice.show();return false;}
this.day.removeClassName('validation-failed');this.month.removeClassName('validation-failed');this.year.removeClassName('validation-failed');this.advice.hide();return true;}};Varien.Firstdeliverydate=Class.create();Varien.Firstdeliverydate.prototype={initialize:function(selector,required,format){var el=$$(selector)[0];var container={};container.day=Element.select(el,'.dob-day input')[0];container.month=Element.select(el,'.dob-month input')[0];container.year=Element.select(el,'.dob-year input')[0];container.full=Element.select(el,'.dob-full input')[0];container.advice=Element.select(el,'.validation-advice')[0];new Varien.DeliveryDateElement('container',container,required,format);}};function checkForDebitPayment(excecute)
{paymentMethod=jQuery('input[name="payment[method]"]:checked"').val();extRessourceName=jQuery('input[name="ext_ressource_name"]').val();debitHintBack=jQuery(".debit_hint_back");debitHint=jQuery(".debit_hint");if(paymentMethod=='invoice')
{jQuery('#kontonummer').val('');jQuery('#kontoinhaber').val('');jQuery('#bankleitzahl').val('');jQuery("input[name='payment[cc_rhythm]']").each(function(){jQuery(this).removeAttr('checked');});checkInvoicePaymentRhythm=false;jQuery("input[name='payment[cc_rhythm_invoice]']").each(function(){if(jQuery(this).attr('checked')=='checked'){checkInvoicePaymentRhythm=true;}});if(checkInvoicePaymentRhythm==true){jQuery("input[name='payment[cc_rhythm_invoice]']").each(function(){if(jQuery(this).hasClass('required-entry')){jQuery(this).removeClass('required-entry');}});}
if(extRessourceName==''&&excecute!='none')
{debitHintBack.height(jQuery(document).height());debitHintBack.fadeIn();debitHint.css('margin-top',jQuery(document).scrollTop()+100);debitHint.fadeIn();_gaq.push(['_setAccount','UA-18342401-1']);_gaq.push(['_trackPageview','/checkout/offer/']);_gaq.push(['_gat._anonymizeIp']);}else{payment.save();}}
else
{checkDebitPaymentRhythm=false;jQuery("input[name='payment[cc_rhythm]']").each(function(){if(jQuery(this).attr('checked')=='checked'){checkDebitPaymentRhythm=true;}});if(checkDebitPaymentRhythm==true){jQuery("input[name='payment[cc_rhythm]']").each(function(){if(jQuery(this).hasClass('required-entry')){jQuery(this).removeClass('required-entry');}});}
jQuery("input[name='payment[cc_rhythm_invoice]']").each(function(){jQuery(this).removeAttr('checked');});payment.save();}
jQuery("input[name='payment[cc_rhythm_invoice]']").each(function(){if(jQuery(this).hasClass('validation-passed')){jQuery("div#advice-required-entry-paymentrhythm_invoice").remove();}});jQuery("input[name='payment[cc_rhythm]']").each(function(){if(jQuery(this).hasClass('validation-passed')){jQuery("div#advice-required-entry-zahlungsrhythmus").remove();}});}
function goPayment()
{debitHintBack.fadeOut(function()
{payment.save();});}
function paymentCancel()
{debitHintBack.fadeOut();jQuery('#p_method_debit').attr("checked",true);jQuery('#p_method_invoice').removeAttr('checked');jQuery('#p_method_debit').click();}
Varien.DateOfBirth=Class.create();Varien.DateOfBirth.prototype={initialize:function(selector,required,format){var el=$$(selector)[0];var container={};container.day=Element.select(el,'.dob-day input')[0];container.month=Element.select(el,'.dob-month input')[0];container.year=Element.select(el,'.dob-year input')[0];container.full=Element.select(el,'.dob-full input')[0];container.advice=Element.select(el,'.validation-advice')[0];new Varien.DateOfBirthElement('container',container,required,format);}};Varien.DateOfBirthElement=Class.create();Varien.DateOfBirthElement.prototype={initialize:function(type,content,required,format){if(type=='id'){this.day=$(content+'day');this.month=$(content+'month');this.year=$(content+'year');this.full=$(content+'full');this.advice=$(content+'date-advice');}else if(type=='container'){this.day=content.day;this.month=content.month;this.year=content.year;this.full=content.full;this.advice=content.advice;}else{return;}
this.required=required;this.format=format;this.day.addClassName('validate-custom');this.day.validate=this.validate.bind(this);this.month.addClassName('validate-custom');this.month.validate=this.validate.bind(this);this.year.addClassName('validate-custom');this.year.validate=this.validate.bind(this);this.setDateRange(false,false);this.year.setAttribute('autocomplete','off');this.advice.hide();},validate:function(){var error=false,day=parseInt(this.day.value,10)||0,month=parseInt(this.month.value,10)||0,year=parseInt(this.year.value,10)||0;if(year<1900&&year!=''&&year!=0)
{year=1111;}
if(!day&&!month&&!year&&this.day.value==''&&this.month.value==''&&this.year.value==''){if(this.required){error='This is a required field.';}else{this.full.value='';}}else if(!day||!month||!year){error='Bitte geben Sie ein korrektes Datum ein.';}else{var date=new Date,countDaysInMonth=0,errorType=null;date.setYear(year);date.setMonth(month-1);date.setDate(32);countDaysInMonth=32-date.getDate();if(!countDaysInMonth||countDaysInMonth>31)countDaysInMonth=31;if(day<1||day>countDaysInMonth){errorType='day';error='Please enter a valid day (1-%d).';}else if(month<1||month>12){errorType='month';error='Please enter a valid month (1-12).';}else{if(day%10==day)this.day.value='0'+day;if(month%10==month)this.month.value='0'+month;this.full.value=this.format.replace(/%[mb]/i,this.month.value).replace(/%[de]/i,this.day.value).replace(/%y/i,this.year.value);var testFull=month+'/'+day+'/'+year;var test=new Date(testFull);if(isNaN(test)){error='Please enter a valid date.';}else{this.setFullDate(test);}}
var valueError=false;if(!error&&!this.validateData()){errorType=this.validateDataErrorType;valueError=this.validateDataErrorText;error=valueError;}}
if(error!==false){try{error=Translator.translate(error);}
catch(e){}
if(!valueError){this.advice.innerHTML=error.replace('%d',countDaysInMonth);}else{this.advice.innerHTML=this.errorTextModifier(error);}
this.advice.show();return false;}
var curDate=new Date,checkDob=false;var curYear=curDate.getFullYear();var curMonth=curDate.getMonth()+1;var curDay=curDate.getDate();if(curYear-year>0){if(curYear-year==18){if(curMonth-month>0){checkDob=true;}else if(curMonth-month==0){if(curDay-day>=0){checkDob=true;}}}else if(curYear-year>18){checkDob=true;}}
if(checkDob===true){this.day.removeClassName('validation-failed');this.month.removeClassName('validation-failed');this.year.removeClassName('validation-failed');this.advice.hide();return true;}else{this.advice.innerHTML=this.errorTextModifier('Sie müssen mind. 18 Jahre alt sein!');this.advice.show();return false;}},validateData:function(){var year=this.fullDate.getFullYear();var date=new Date;this.curyear=date.getFullYear();return(year>=1900&&year<=this.curyear);},validateDataErrorType:'year',validateDataErrorText:'Please enter a valid year (1900-%d).',errorTextModifier:function(text){return text.replace('%d',this.curyear);},setDateRange:function(minDate,maxDate){this.minDate=minDate;this.maxDate=maxDate;},setFullDate:function(date){this.fullDate=date;}};Varien.NewsletterDob=Class.create();Varien.NewsletterDob.prototype={initialize:function(selector,required,format){var el=$$(selector)[0];var container={};container.day=Element.select(el,'.dob-day input')[0];container.month=Element.select(el,'.dob-month input')[0];container.year=Element.select(el,'.dob-year input')[0];container.full=Element.select(el,'.dob-full input')[0];container.advice=Element.select(el,'.validation-advice')[0];new Varien.NewsletterDobElement('container',container,required,format);}};Varien.NewsletterDobElement=Class.create();Varien.NewsletterDobElement.prototype={initialize:function(type,content,required,format){if(type=='id'){this.day=$(content+'day');this.month=$(content+'month');this.year=$(content+'year');this.full=$(content+'full');this.advice=$(content+'date-advice');}else if(type=='container'){this.day=content.day;this.month=content.month;this.year=content.year;this.full=content.full;this.advice=content.advice;}else{return;}
this.required=required;this.format=format;this.day.addClassName('validate-custom');this.day.validate=this.validate.bind(this);this.month.addClassName('validate-custom');this.month.validate=this.validate.bind(this);this.year.addClassName('validate-custom');this.year.validate=this.validate.bind(this);this.setDateRange(false,false);this.year.setAttribute('autocomplete','off');this.advice.hide();},validate:function(){var error=false,day=parseInt(this.day.value,10)||0,month=parseInt(this.month.value,10)||0,year=parseInt(this.year.value,10)||0;if(year<1900&&year!=''&&year!=0)
{year=1111;}
if(!day&&!month&&!year&&this.day.value==''&&this.month.value==''&&this.year.value==''){if(this.required){error='This date is a required value.';}else{this.full.value='';}}else if(!day||!month||!year){error='Bitte geben Sie ein korrektes Datum ein.';}else{var date=new Date,countDaysInMonth=0,errorType=null;date.setYear(year);date.setMonth(month-1);date.setDate(32);countDaysInMonth=32-date.getDate();if(!countDaysInMonth||countDaysInMonth>31)countDaysInMonth=31;if(day<1||day>countDaysInMonth){errorType='day';error='Please enter a valid day (1-%d).';}else if(month<1||month>12){errorType='month';error='Please enter a valid month (1-12).';}else{if(day%10==day)this.day.value='0'+day;if(month%10==month)this.month.value='0'+month;this.full.value=this.format.replace(/%[mb]/i,this.month.value).replace(/%[de]/i,this.day.value).replace(/%y/i,this.year.value);var testFull=month+'/'+day+'/'+year;var test=new Date(testFull);if(isNaN(test)){error='Please enter a valid date.';}else{this.setFullDate(test);}}
var valueError=false;if(!error&&!this.validateData()){errorType=this.validateDataErrorType;valueError=this.validateDataErrorText;error=valueError;}}
if(error!==false){try{error=Translator.translate(error);}
catch(e){}
if(!valueError){this.advice.innerHTML=error.replace('%d',countDaysInMonth);}else{this.advice.innerHTML=this.errorTextModifier(error);}
this.advice.show();return false;}
var curDate=new Date,checkDob=false;var curYear=curDate.getFullYear();var curMonth=curDate.getMonth()+1;var curDay=curDate.getDate();if(curYear-year>=0){checkDob=true;}
if(checkDob===true){this.day.removeClassName('validation-failed');this.month.removeClassName('validation-failed');this.year.removeClassName('validation-failed');this.advice.hide();return true;}else{this.advice.innerHTML=this.errorTextModifier('Bitte geben Sie ein korrektes Datum ein.');this.advice.show();return false;}},validateData:function(){var year=this.fullDate.getFullYear();var date=new Date;this.curyear=date.getFullYear();return(year>=1900&&year<=this.curyear);},validateDataErrorType:'year',validateDataErrorText:'Please enter a valid year (1900-%d).',errorTextModifier:function(text){return text.replace('%d',this.curyear);},setDateRange:function(minDate,maxDate){this.minDate=minDate;this.maxDate=maxDate;},setFullDate:function(date){this.fullDate=date;}};function separateShippingform()
{if(typeof(separateShipping)=='undefined'||separateShipping!=true)
{return;}
jQuery('#separateShippingForm').click(function(){if(jQuery(this).is(':checked'))
{jQuery('#separateShipping-container').slideUp('slow',function(){});removeRequiredFromShippingForm();}else{jQuery('#separateShipping-container').slideDown('slow',function(){});addRequiredToShippingForm();}})
removeRequiredFromShippingForm();}
function removeRequiredFromShippingForm()
{jQuery('#separateShipping-container input').each(function(){jQuery(this).removeClass('required-entry');});}
function addRequiredToShippingForm()
{jQuery("#separateShipping-container .customer-name-prefix input").each(function(){jQuery(this).addClass('required-entry');});jQuery("#separateShipping-container .street-inputs input").each(function(){jQuery(this).addClass('required-entry');});jQuery("#separateShipping-container .city-inputs input").each(function(){jQuery(this).addClass('required-entry');});}
function checkAdressesAndSave(){actualAdress=jQuery.trim(jQuery('input[name="billing[firstname]"]').val())+jQuery.trim(jQuery('input[name="billing[lastname]"]').val())+jQuery.trim(jQuery('input[name="billing[postcode]"]').val())+jQuery.trim(jQuery('input[name="billing[street][0]"]').val())+jQuery.trim(jQuery('input[name="billing[street][1]"]').val())+jQuery.trim(jQuery('input[name="billing[city]"]').val())+jQuery.trim(jQuery('input[name="billing[country_id]"]').val());newAdress=jQuery.trim(jQuery('input[name="shipping[firstname]"]').val())+jQuery.trim(jQuery('input[name="shipping[lastname]"]').val())+jQuery.trim(jQuery('input[name="shipping[postcode]"]').val())+jQuery.trim(jQuery('input[name="shipping[street][0]"]').val())+jQuery.trim(jQuery('input[name="shipping[street][1]"]').val())+jQuery.trim(jQuery('input[name="shipping[city]"]').val())+jQuery.trim(jQuery('input[shipping="billing[country_id]"]').val());if(actualAdress==newAdress){jQuery('#check_addresses_error').html("Die beiden eingegebenen Adressen dürfen nicht identisch sein!");jQuery('#check_addresses_error').slideDown();}
else{jQuery('#check_addresses_error').slideUp();billing.save();}}
function initHolidayService()
{jQuery('#shipment_pause').click(function(){if(jQuery(this).attr('checked')=='checked')
{jQuery('#shipment_pause_1').show();jQuery('#shipment_pause_2').show();jQuery('#shipment_redirect_1').hide();jQuery('#shipment_redirect_2').hide();}});jQuery('#shipment_redirect').click(function(){if(jQuery(this).attr('checked')=='checked')
{jQuery('#shipment_pause_1').hide();jQuery('#shipment_pause_2').hide();jQuery('#shipment_redirect_1').show();jQuery('#shipment_redirect_2').show();}});}
function checkForChosenAboDelay()
{if(jQuery('#geschenkabo_select').val()!='0')
{jQuery('#chosen_abo_error').slideUp();setLocation(jQuery('#geschenkabo_select').val());}
else
{jQuery('#chosen_abo_error').html("Bitte wählen Sie eine Laufzeit aus.");jQuery('#chosen_abo_error').slideDown();}}
