var invoice_active=false;var invoice_different_language=false;jQuery(document).ready(function(){klarna_invoiceReady();});function klarna_invoiceReady()
{var foundBox=false;currentMinHeight_invoice=jQuery('#klarna_box_invoice').height();jQuery('#box_active_language').live('click',function(){jQuery('.klarna_box_top_flag_list').slideToggle('fast',function(){if(jQuery(this).is(':visible'))
{jQuery('.klarna_box_top_flag').animate({opacity:1.0},'fast');}
else{jQuery('.klarna_box_top_flag').animate({opacity:0.4},'fast');}});});jQuery('.klarna_box_bottom_languageInfo').live('mousemove',function(e){showBlueBaloon(e.pageX,e.pageY,jQuery(this).find('img').attr("alt"));});jQuery('.klarna_box_bottom_languageInfo').live('mouseout',function(){hideBlueBaloon();});if(typeof invoice_ITId!="undefined"){jQuery('input[name="'+invoice_ITId+'"]').live('change',function(){var val=jQuery(this).val();if(val=="private")
{jQuery('#invoice_perOrg_title').text(lang_personNum);jQuery('#invoice_box_private').slideDown('fast');jQuery('#invoice_box_company').slideUp('fast');}
else if(val=="company")
{jQuery('#invoice_perOrg_title').text(lang_orgNum);jQuery('#invoice_box_company').slideDown('fast');jQuery('#invoice_box_private').slideUp('fast');}});}
if(typeof global_countryCode!='undefined'){if(global_countryCode=="de"||global_countryCode=="nl")
{if(typeof select_bday!='undefined'&&typeof select_bmonth!='undefined'&&typeof select_byear!="undefined"){jQuery('[name="payment[klarna_invoice_dob_day]').val(select_bday);jQuery('[name="payment[klarna_invoice_dob_month]').val(select_bmonth);var date=new Date();for(i=date.getFullYear();i>=1900;i--){jQuery('<option/>').val(i).text(i).appendTo('#klarna_box_invoice .selectBox_year');}
jQuery('[name="payment[klarna_invoice_dob_year]').val(select_byear);}}}}
function resetListBox(listBox)
{listBox.find('li').each(function(){if(jQuery(this).attr("id")=="click")
{jQuery(this).attr("id","");}
jQuery(this).find('div').find('img').remove();});};var part_active=false;var part_different_language=false;jQuery(document).ready(function(){klarna_partReady();});function klarna_partReady()
{var foundBox=false;currentMinHeight_part=jQuery('#klarna_box_part').height();jQuery('#box_active_language').live('click',function(){jQuery('.klarna_box_top_flag_list').slideToggle('fast',function(){if(jQuery(this).is(':visible'))
{jQuery('.klarna_box_top_flag').animate({opacity:1.0},'fast');}
else{jQuery('.klarna_box_top_flag').animate({opacity:0.4},'fast');}});});jQuery('.klarna_box_bottom_languageInfo').live('mousemove',function(e){showBlueBaloon(e.pageX,e.pageY,jQuery(this).find('img').attr("alt"));});jQuery('.klarna_box_bottom_languageInfo').live('mouseout',function(){hideBlueBaloon();});if(typeof global_countryCode!='undefined'){if(jQuery('#getAddressUpdater').val()!=""&&global_countryCode=="se")
{getAddress();}}
if(typeof global_countryCode!='undefined'){if(global_countryCode=="de"||global_countryCode=="nl")
{if(typeof select_part_bday!='undefined'&&typeof select_part_bmonth!='undefined'&&typeof select_part_byear!='undefined'){jQuery('[name="payment[klarna_partpayment_dob_day]').val(select_part_bday);jQuery('[name="payment[klarna_partpayment_dob_month]').val(select_part_bmonth);var date=new Date();for(i=date.getFullYear();i>=1900;i--){jQuery('<option/>').val(i).text(i).appendTo('#klarna_box_part .selectBox_part_year');}
jQuery('[name="payment[klarna_partpayment_dob_year]').val(select_part_byear);}}}}
function resetListBox(listBox)
{listBox.find('li').each(function(){if(jQuery(this).attr("id")=="click")
{jQuery(this).attr("id","");}
jQuery(this).find('div').find('img').remove();});};var spec_active=false;var spec_different_language=false;jQuery(document).ready(function(){klarna_specReady();});function klarna_specReady()
{var foundBox=false;currentMinHeight_spec=jQuery('#klarna_box_spec').height();jQuery('#box_active_language').live('click',function(){jQuery('.klarna_box_top_flag_list').slideToggle('fast',function(){if(jQuery(this).is(':visible'))
{jQuery('.klarna_box_top_flag').animate({opacity:1.0},'fast');}
else{jQuery('.klarna_box_top_flag').animate({opacity:0.4},'fast');}});});jQuery('.klarna_box_bottom_languageInfo').live('mousemove',function(e){showBlueBaloon(e.pageX,e.pageY,jQuery(this).find('img').attr("alt"));});jQuery('.klarna_box_bottom_languageInfo').live('mouseout',function(){hideBlueBaloon();});if(typeof global_countryCode!='undefined'){if(jQuery('#getAddressUpdater').val()!=""&&global_countryCode=="se")
{getAddress();}}
if(typeof global_countryCode!='undefined'){if(global_countryCode=="de"||global_countryCode=="nl")
{if(typeof select_spec_bday!='undefined'&&typeof select_spec_bmonth!='undefined'){jQuery('[name="payment[klarna_specpayment_dob_day]').val(select_spec_bday);jQuery('[name="payment[klarna_specpayment_dob_month]').val(select_spec_bmonth);}
if(typeof select_spec_byear!="undefined"){var date=new Date();for(i=date.getFullYear();i>=1900;i--){jQuery('<option/>').val(i).text(i).appendTo('#klarna_box_spec .selectBox_spec_year');}
jQuery('[name="payment[klarna_specpayment_dob_year]').val(select_spec_byear);alert("spec: "+select_spec_byear);}}}}
function resetListBox(listBox)
{listBox.find('li').each(function(){if(jQuery(this).attr("id")=="click")
{jQuery(this).attr("id","");}
jQuery(this).find('div').find('img').remove();});};var klarna_PPBoxOpen=false;jQuery(document).ready(function(){jQuery('.klarna_PPBox_pull').click(function(){if(klarna_PPBoxOpen==true)
{jQuery('.klarna_PPBox_bottom').slideUp('fast');klarna_PPBoxOpen=false;jQuery('#klarna_PPBox_pullUp').fadeOut('fast');jQuery('#klarna_PPBox_pullDown').fadeIn('fast');}
else{jQuery('.klarna_PPBox_bottom').slideDown('fast');klarna_PPBoxOpen=true;jQuery('#klarna_PPBox_pullUp').fadeIn('fast');jQuery('#klarna_PPBox_pullDown').fadeOut('fast');}});jQuery('.klarna_PPBox_top').click(function(){if(klarna_PPBoxOpen==true)
{jQuery('.klarna_PPBox_bottom').slideUp('fast');klarna_PPBoxOpen=false;jQuery('#klarna_PPBox_pullUp').fadeOut('fast');jQuery('#klarna_PPBox_pullDown').fadeIn('fast');}
else{jQuery('.klarna_PPBox_bottom').slideDown('fast');klarna_PPBoxOpen=true;jQuery('#klarna_PPBox_pullUp').fadeIn('fast');jQuery('#klarna_PPBox_pullDown').fadeOut('fast');}});});
