<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div id="calcprint" class="col-lg-12">
<div id="calculatorwrapper">
<div id="calculator">
<div id="left" class="col-lg-12">
<div class="row">
<form id="calc" role="form">
<fieldset>
<legend><h2>Prisindikator</h2></legend>
<h3>Detta är ingen utfästelse. Detta är en prisindikation.</h3>
<p class="">Skarp offert lämnas när Vulkan sett & godkänt filerna. Mejla <a href="mailto:info@vulkan.se">info@vulkan.se</a> eller använd vårt <a href="/kontaktformular/">kontaktformulär.</a></p>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><label for="sidor">Antal Sidor</label></h3>
</div>
<div class="panel-body">
<div class="input-group">
<span class="input-group-addon">$</span>
<input id="sidor" class="form-control" type="number" value="20" min="19" max="601" placeholder="Antal Sidor" required="" style="box-shadow: rgb(102, 255, 51) 0px 0px 5px; border: 1px solid rgb(102, 255, 51); background-color: rgb(239, 255, 234);">
<span class="input-group-addon">st</span>
</div>
<div class="varning"></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><label for="bocker">Antal böcker *(Ej Obligatoriskt)</label></h3>
</div>
<div class="panel-body">
<div class="input-group">
<span class="input-group-addon">$</span>
<input id="bocker" class="form-control" type="number" value="1" min="-1" max="501" placeholder="Antal Böcker" style="box-shadow: rgb(102, 255, 51) 0px 0px 5px; border: 1px solid rgb(102, 255, 51); background-color: rgb(239, 255, 234);">
<span class="input-group-addon">st</span>
</div>
<div class="varning"></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><label for="farg">Antal sidor i färg *(Ej Obligatoriskt)</label></h3>
</div>
<div class="panel-body">
<div class="input-group">
<span class="input-group-addon">$</span>
<input id="farg" class="form-control" type="number" value="0" min="-1" max="11" placeholder="Antal Sidor i färg" style="box-shadow: rgb(102, 255, 51) 0px 0px 5px; border: 1px solid rgb(102, 255, 51); background-color: rgb(239, 255, 234);">
<span class="input-group-addon">st</span>
</div>
<div class="varning"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<label for="boktyper">
<a href="http://www.vulkanmedia.se/bokformat/">Boktyper</a>
</label>
</h3>
</div>
<div class="panel-body">
<div class="btn-group btn-group-justified" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="boktyper" id="mparm" checked="checked"> Mjukpärm
</label>
<label class="btn btn-primary">
<input type="radio" name="boktyper" id="dabskb"> Danskt band
</label>
<label class="btn btn-primary">
<input type="radio" name="boktyper" id="hparm"> Hårdpärm
</label>
</div>
<div class="varning"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><label for="moms"><a href="http://www.vulkanmedia.se/bokmoms/">Bokmoms</a></label></h3>
</div>
<div class="panel-body">
<div class="btn-group btn-group-justified" data-toggle="buttons">
<label class="btn btn-primary">
<input id="moms2" name="moms" checked="checked" value="moms2" type="radio">Utan bokmoms </label>
<label class="btn btn-primary active">
<input id="moms1" name="moms" value="moms1" type="radio">Med bokmoms </label>
</div>
<div class="varning"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<label for="bokformat"><a href="http://www.vulkanmedia.se/bokformat/">Bokformat</a></label>
</h3>
</div>
<div class="panel-body">
<div class="btn-group btn-group-justified" data-toggle="buttons">
<label class="btn btn-primary">
<input id="bokformat1" name="bokformat" value="bokformat1" type="radio"><span>Vulkan Minipocket: </span>90×150 mm.
</label>
<label class="btn btn-primary">
<input id="bokformat2" name="bokformat" value="bokformat2" type="radio">
<span>A6:</span> 105×148 mm.
</label>
<label class="btn btn-primary">
<input id="bokformat3" name="bokformat" value="bokformat3" type="radio">
<span>A-pocket:</span> 110×180 mm.
</label>
<label class="btn btn-primary active">
<input id="bokformat4" name="bokformat" value="bokformat4" type="radio">
<span>Storpocket:</span> 128×210 mm.
</label>
<label class="btn btn-primary">
<input id="bokformat5" name="bokformat" checked="checked" value="bokformat5" type="radio">
<span>A5:</span> 148×210 mm.
</label>
<label class="btn btn-primary">
<input id="bokformat6" name="bokformat" value="bokformat6" type="radio">
<span>Vulkan Maxipocket:</span> 170×240 mm.
</label>
<label class="btn btn-primary">
<input id="bokformat7" name="bokformat" value="bokformat7" type="radio">
<span>A4:</span> 210×297 mm.
</label>
</div>
<div class="varning"></div>
</div>
</div>
</div>
<div class="calcinput calcsub">
</div>
</fieldset>
</form>
</div>
</div>
<div id="right" class="col-lg-12">
<div id="calcwrap">
<div id="skal6" class="calcparti">
<div id="skal5" class="calcparti">
<div id="skal4" class="calcparti">
<div id="skal3" class="calcparti">
<div id="skal2" class="calcparti">
<div id="skal1" class="calcparti">
<h2>Mjukpärm, och2Sidor i färg<br></h2><h2>Mjukpärm, och2Sidor i färg<br></h2></div><!-- skal1 -->
<div class="td utr col-xs-3">1-9</div>
<div class="td utr col-xs-3" id="bokPer1">96 Kr</div>
<div class="td utr col-xs-6" id="bokSumma1">864 Kr (Räknat på 9 böcker)</div>
<div class="bonus col-xs-12"></div>
</div><!-- skal2 -->
<div class="td utr col-xs-3">10-99</div>
<div class="td utr col-xs-3" id="bokPer2">67 Kr</div>
<div class="td utr col-xs-6" id="bokSumma2">6633 Kr (Räknat på 99 böcker)</div>
<div class="bonus col-xs-12"></div>
</div><!-- skal3 -->
<div class="td utr col-xs-3">100-299</div>
<div class="td utr col-xs-3" id="bokPer3">58 Kr</div>
<div class="td utr col-xs-6" id="bokSumma3">17342 Kr (Räknat på 299 böcker)</div>
<div class="bonus col-xs-12">Vid beställning av minst 100 ex. ingår gratis distribution, <a href="http://www.vulkanmedia.se/bokpaket/e-bok/">E-bok</a> samt formgivning.</div>
</div><!-- skal4 -->
<div class="td utr col-xs-3">300-499</div>
<div class="td utr col-xs-3" id="bokPer4">39 Kr</div>
<div class="td utr col-xs-6" id="bokSumma4">19461 Kr (Räknat på 499 böcker)</div>
<div class="bonus col-xs-12"></div>
</div><!-- skal5 -->
<div class="td utr col-xs-3">500+</div>
<div class="td utr col-xs-9" id="bokSumma5">Maila <a href="mailto:info@vulkan.se">info@vulkan.se</a> för offert</div>
<div class="bonus col-xs-12">Vid beställning av minst 500 ex. ingår gratis <a href="http://www.vulkanmedia.se/bokpaket/marknadsforingspaketet/">Marknadsföringspaket</a> & <a href="http://www.vulkanmedia.se/bokpaket/e-bok/">E-bok</a>.<div class="mest">Mest Bok för Pengarna</div></div>
</div><!-- skal6 -->
<div class="tfooter">
<div id="klausul">Alla Priser är Exklusive frakt. Vill Du ha Danskt band kostar det 10kr/bok.<span><div class="printomatic pom-small-black" id="printutr" alt="Skriv ut Prisuträknare" title="Skriv ut Prisuträknare"><input type="hidden" id="target-printutr" value="#right"><script>var pom_site_css = 'http://vulkan/wp-content/themes/vulkan/style.css';var pom_custom_css = '';
var pom_html_top = '';
var pom_html_bottom = '';
var pom_do_not_print = '';
</script></div> <div class="printomatictext" id="printutr" alt="Skriv ut Prisuträknare" title="Skriv ut Prisuträknare">Skriv ut Prisuträknare</div><div style="clear: both;"></div> </span></div>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<div class="tfoot">
<div class="tr">
<div class="thead"><h2>Pris/Bok</h2></div>
<div class="tr">
<div class="td col-xs-4">1-9</div>
<div class="td meter red"><span style="width: 100%"></span></div>
</div>
<div class="tr">
<div class="td col-xs-4">10-99</div>
<div class="td meter orange"><span style="width: 75%"></span></div>
</div>
<div class="tr">
<div class="td col-xs-4">100-299</div>
<div class="td meter orange"><span style="width: 55%"></span></div>
</div>
<div class="tr">
<div class="td col-xs-4">300 & fler</div>
<div class="td meter"><span style="width: 35%"></span></div>
<div class="mest">Mest Bok för pengarna</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
#calcwrap a{color:#000}
#calcwrap .calcparti{float:right;padding:5px 0 5px 5px;margin:3px 0 5px 5px;border-radius:5px;width:100%}
#calcwrap .skalinner{display:inline-block;vertical-align:top;zoom:1;*display:inline;min-width:100px}
#calcwrap #skal1{background-color:#fee9b3}
#calcwrap #skal2{background-color:#ffd798}
#calcwrap #skal3{background-color:#ffb74c}
#calcwrap #skal4{background-color:#ff864c}
#calcwrap #skal5{background-color:#ff674c}
#calcwrap #skal6{background-color:#ff5132;position:relative}
#calcprint{padding:10px;background-color:#fcf9f5;border-radius:5px;border:1px solid #000}
#calculatorwrapper{font-size:14px}
#calculatorwrapper .calcpart{display:block;clear:both;margin:0 0 10px 0}
#calculatorwrapper .varning{display:none;color:#f00;font-size:15px}
#calculatorwrapper input[type=number]{font-size:20px}
#calculatorwrapper input:focus{box-shadow:0 0 5px #000;border:1px solid #000}
#calculatorwrapper .calcsub{float:right}
#calculatorwrapper .calcbottominp{display:inline-block;vertical-align:top;zoom:1;*display:inline;}
#calculatorwrapper #middle{height:500px;margin:40px 2px;font-size:400px;float:left;font-family:arial;line-height:.8;letter-spacing:-17px;font-weight:normal}
#calculatorwrapper #right #summa .tr{border:2px solid #000;clear:both;border-radius:5px;clear:both}
#calculatorwrapper #right #summa .td{border-top:2px solid #000;border-right:1px dotted #000;float:left;padding:0 5px;width:140px}
#prisexempel{border:1px dotted #ccc;height:100%}#prisexempel #priswrapper{padding:5px}
#prisexempel .tr .td{vertical-align:middle}#prisexempel .tr .td:first-child{font-size:18px}
#prisexempel .tr{position:relative}
#prisexempel .thead{text-align:center}#prisexempel .thead h1{text-align:center}
#prisexempel .tbody .tpart{margin:0 0 10px 0}#prisexempel .tbody .tpart .tr:last-child{margin:0 0 10px 0}
#prisexempel .tbody .tr{clear:both;margin:0 0 2px 0}#prisexempel .tbody .tr:nth-child(1n+2) .td:nth-child(1n+2){font-size:12px;line-height:12px;background-color:#f42323;border-radius:0 0 0 10px;-webkit-border-radius:0 0 0 10px;-moz-border-radius:0 0 0 10px;-ms-border-radius:0 0 0 10px;-o-border-radius:0 0 0 10px;border-radius:0 0 0 10px}
#prisexempel .tbody .tr:nth-child(1n+2) .td:nth-child(1n+3){background-color:#f36d0a;border-radius:0 0 0 10px;-webkit-border-radius:0 0 0 10px;-moz-border-radius:0 0 0 10px;-ms-border-radius:0 0 0 10px;-o-border-radius:0 0 0 10px;border-radius:0 0 0 10px}
#prisexempel .tbody .tr:nth-child(1n+2) .td:nth-child(1n+4){background-color:#f36d0a;border-radius:0 0 0 10px;-webkit-border-radius:0 0 0 10px;-moz-border-radius:0 0 0 10px;-ms-border-radius:0 0 0 10px;-o-border-radius:0 0 0 10px;border-radius:0 0 0 10px}
#prisexempel .tbody .tr:nth-child(1n+2) .td:nth-child(1n+5){background-color:#2bc253;border-radius:0 0 10px 10px;-webkit-border-radius:0 0 10px 10px;-moz-border-radius:0 0 10px 10px;-ms-border-radius:0 0 10px 10px;-o-border-radius:0 0 10px 10px;border-radius:0 0 10px 10px}
#prisexempel .tbody .td{width:19%;height:30px border: 1px solid;padding:10px;line-height:30px;margin:0 0 0 0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;float:left;vertical-align:top;zoom:1;*display:inline;}#prisexempel .tbody .td:first-child{border:0;font-size:18px;padding:0 5px 0 5px;line-height:20px;text-align:right}
#prisexempel .tbody .td:nth-child(1n+2){font-size:12px;line-height:12px;background-color:#f42323;border-radius:10px 0 0 0;-webkit-border-radius:10px 0 0 0;-moz-border-radius:10px 0 0 0;-ms-border-radius:10px 0 0 0;-o-border-radius:10px 0 0 0;border-radius:10px 0 0 0}
#prisexempel .tbody .td:nth-child(1n+3){background-color:#f36d0a;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;-ms-border-radius:0 0 0 0;-o-border-radius:0 0 0 0;border-radius:0 0 0 0}
#prisexempel .tbody .td:nth-child(1n+4){background-color:#f36d0a;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;-ms-border-radius:0 0 0 0;-o-border-radius:0 0 0 0;border-radius:0 0 0 0}
#prisexempel .tbody .td:nth-child(1n+5){background-color:#2bc253;border-radius:0 10px 0 0;-webkit-border-radius:0 10px 0 0;-moz-border-radius:0 10px 0 0;-ms-border-radius:0 10px 0 0;-o-border-radius:0 10px 0 0;border-radius:0 10px 0 0}
.tfooter{clear:both;display:block;padding:5px 0 0 10px}
.tfoot{padding:10px 0 0 0}.tfoot .tr{clear:both;height:27px;position:relative}.tfoot .tr .mest{left:240px;bottom:-44px}
.tfoot .tr .td{padding:5px;width:80%;float:left}.tfoot .tr .td:first-child{width:70px;text-align:right}
.tfoot .tr .meter{height:20px;position:relative;-moz-border-radius:25px;-webkit-border-radius:25px;border-radius:25px}
.tfoot .tr .meter>span{display:block;height:100%;-webkit-border-top-right-radius:21px;-webkit-border-bottom-right-radius:21px;-moz-border-radius-topright:21px;-moz-border-radius-bottomright:21px;border-top-right-radius:21px;border-bottom-right-radius:21px;-webkit-border-top-left-radius:8px;-webkit-border-bottom-left-radius:8px;-moz-border-radius-topleft:8px;-moz-border-radius-bottomleft:8px;border-top-left-radius:8px;border-bottom-left-radius:8px;background-color:#2bc253;background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0, #2bc253), color-stop(1, #54f054));background-image:-moz-linear-gradient(center bottom, #2bc253 37%, #54f054 69%);-webkit-box-shadow:inset 0 2px 9px rgba(255,255,255,0.3),inset 0 -2px 6px rgba(0,0,0,0.4);-moz-box-shadow:inset 0 2px 9px rgba(255,255,255,0.3),inset 0 -2px 6px rgba(0,0,0,0.4);box-shadow:inset 0 2px 9px rgba(255,255,255,0.3),inset 0 -2px 6px rgba(0,0,0,0.4);position:relative;overflow:hidden}
.tfoot .tr .meter>span:after,.tfoot .tr .animate>span>span{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear, 0 0, 100% 100%, color-stop(.25, rgba(255,255,255,0.2)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,0.2)), color-stop(.75, rgba(255,255,255,0.2)), color-stop(.75, transparent), to(transparent));background-image:-moz-linear-gradient(-45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);z-index:1;-webkit-background-size:50px 50px;-moz-background-size:50px 50px;-webkit-animation:move 2s linear infinite;-webkit-border-top-right-radius:8px;-webkit-border-bottom-right-radius:8px;-moz-border-radius-topright:8px;-moz-border-radius-bottomright:8px;border-top-right-radius:8px;border-bottom-right-radius:8px;-webkit-border-top-left-radius:20px;-webkit-border-bottom-left-radius:20px;-moz-border-radius-topleft:20px;-moz-border-radius-bottomleft:20px;border-top-left-radius:20px;border-bottom-left-radius:20px;overflow:hidden}
.tfoot .tr .orange>span{background-color:#f1a165;background-image:-moz-linear-gradient(top, #f1a165, #f36d0a);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f1a165), color-stop(1, #f36d0a));background-image:-webkit-linear-gradient(#f1a165, #f36d0a)}
.tfoot .tr .red>span{background-color:#f0a3a3;background-image:-moz-linear-gradient(top, #f0a3a3, #f42323);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f0a3a3), color-stop(1, #f42323));background-image:-webkit-linear-gradient(#f0a3a3, #f42323)}
.tfoot .tr .nostripes>span>span,.tfoot .tr .nostripes>span:after{-webkit-animation:none;background-image:none}
.mest{transform:rotate(7deg);-ms-transform:rotate(7deg);-moz-transform:rotate(7deg);-webkit-transform:rotate(344deg);-o-transform:rotate(7deg);text-shadow:0 1px 1px #4d4d4d;color:#000;left:398px;bottom:-7px;position:absolute;width:90px;text-align:center;border:4px double #000;padding:34px 10px;border-radius:50%;font-size:14px;z-index:200}
jQuery(document).ready(function($) {
"use strict";
function status(div, state, svar) {
var divToSlide = $(div).parent().parent().find('.varning');
if (state === 'okej') {
$(div).css({
'box-shadow': "0 0 5px #66FF33",
'border': "1px solid #66FF33",
'background-color': '#efffea'
});
if (divToSlide.is(":visible")) {
divToSlide.slideUp("slow");
}
}
if (state === 'fel') {
$(div).css({
'box-shadow': '0 0 5px #ff0000',
'border': '1px solid #ff0000',
'background-color': '#ffe5e5'
});
if (divToSlide.is(":hidden")) {
divToSlide.html(svar);
divToSlide.slideDown("slow");
}
}
}
function calc() {
var sidor = $('#sidor').val(),
bocker = $('#bocker').val(),
farg = $('#farg').val(),
bokformat = $("input[name=bokformat]:radio:checked").val(),
bokmoms = $("input[name=moms]:radio:checked").val(),
typ = $("input[name=bokformat]:radio:checked").parent().find('label').text(),
momstyp = $("input[name=moms]:radio:checked").parent().find('label').text(),
bonus = false,
// Antal sidor
sidorPris = "",
sidorPris1 = 0.90, // 20-120
sidorPris2 = 1, // 121-300
sidorPris3 = 1.2, // 301 - 400
sidorPris4 = 1.5, // 401-500
sidorPris5 = 1.8, // 501-600
// Antal Böcker
bokpris1 = 99,
bokpris2 = 68,
bokpris3 = 59,
bokpris4 = 39,
// Antal sidor i färg
// Bokformat
bokformat1 = 0.82, //Vulkan Minipocket: 90×150 mm.
bokformat2 = 0.95, //A6: 105×148 mm.
bokformat3 = 1, //A-pocket: 110×180 mm.
bokformat4 = 1, //Storpocket: 128×210 mm.
bokformat5 = 1, //A5: 148×210 mm.
bokformat6 = 1.15, //Vulkan Maxipocket: 170×240 mm.
bokformat7 = 2, //A4: 210×297 mm.
// Bokmoms
// bokmoms = 1.06;
// Bonus
bonus1 = "", //gratis e-bok
bonus2 = Prisindikator.bonus2,
bonus3 = Prisindikator.bonus3,
bonus4 = "",
bonus5 = "",
// Hur felmeddelande ska se ut.
statusSvar1 = Prisindikator.statusSvar1,
statusSvar2 = Prisindikator.statusSvar2,
statusSvar3 = Prisindikator.statusSvar3,
statusSvar4 = Prisindikator.statusSvar4,
statusSvar5 = Prisindikator.statusSvar5,
statusSvar6 = Prisindikator.statusSvar6,
statusSvar7 = Prisindikator.statusSvar7,
statusSvar9 = Prisindikator.statusSvar9,
rabbatt = "";
// Kollar hur många sidor boken har om för många skriver fel
sidor = parseInt(sidor, 10);
if (sidor < 20) {
status('#sidor', 'fel', statusSvar1);
} else if (sidor >= 20 && sidor <= 119) {
sidorPris = sidorPris1;
status('#sidor', 'okej');
} else if (sidor >= 120 && sidor <= 299) {
sidorPris = sidorPris2;
status('#sidor', 'okej');
} else if (sidor >= 300 && sidor <= 399) {
sidorPris = sidorPris3;
status('#sidor', 'okej');
} else if (sidor >= 400 && sidor <= 499) {
sidorPris = sidorPris4;
status('#sidor', 'okej');
} else if (sidor >= 500 && sidor <= 600) {
sidorPris = sidorPris5;
status('#sidor', 'okej');
} else if (sidor > 600) {
status('#sidor', 'fel', statusSvar2);
} else {
status('#sidor', 'fel', statusSvar9);
}
// kolla hur många böcker
bocker = parseInt(bocker, 10);
if (bocker < 1) {
status('#bocker', 'fel', statusSvar3);
} else if (bocker >= 1 && bocker <= 9) {
rabbatt = bokpris1;
status('#bocker', 'okej');
} else if (bocker >= 10 && bocker <= 99) {
rabbatt = bokpris2;
status('#bocker', 'okej');
} else if (bocker > 99 && bocker <= 299) {
rabbatt = bokpris3;
status('#bocker', 'okej');
} else if (bocker >= 300 && bocker < 500) {
rabbatt = bokpris4;
bonus = bonus1;
status('#bocker', 'okej');
} else if (bocker >= 500) {
status('#bocker', 'fel', statusSvar4);
bonus = bonus2;
} else {
status('#bocker', 'fel', statusSvar9);
}
// Kolla hur många sidor i färg.
farg = parseInt(farg, 10);
if (farg < 0) {
status('#farg', 'fel', statusSvar5);
farg = 0;
} else if (farg >= 0 && farg <= 10) {
status('#farg', 'okej');
} else if (farg > 10) {
status('#farg', 'fel', statusSvar7);
} else {
status('#farg', 'fel', statusSvar9);
}
// Kollar bokformat
if (bokformat === 'bokformat1') {
bokformat = bokformat1;
} else if (bokformat === 'bokformat2') {
bokformat = bokformat2;
} else if (bokformat === 'bokformat3') {
bokformat = bokformat3;
} else if (bokformat === 'bokformat4') {
bokformat = bokformat4;
} else if (bokformat === 'bokformat5') {
bokformat = bokformat5;
} else if (bokformat === 'bokformat6') {
bokformat = bokformat6;
} else if (bokformat === 'bokformat7') {
bokformat = bokformat7;
}
// Kollar om det är inkl. moms
if (bokmoms === 'moms1') {
bokmoms = 1.06;
}
if (bokmoms === 'moms2') {
bokmoms = 1;
}
var bokPerDin = Math.round(bokformat * rabbatt * bokmoms * sidorPris + farg),
bokPer1 = Math.round(bokformat * bokpris1 * bokmoms * sidorPris + farg),
bokPer2 = Math.round(bokformat * bokpris2 * bokmoms * sidorPris + farg),
bokPer3 = Math.round(bokformat * bokpris3 * bokmoms * sidorPris + farg),
bokPer4 = Math.round(bokformat * bokpris4 * bokmoms * sidorPris + farg),
bokSummaDin = Math.round(bokPerDin * bocker),
bokSumma1 = Math.round(bokPer1 * 9),
bokSumma2 = Math.round(bokPer2 * 99),
bokSumma3 = Math.round(bokPer3 * 299),
bokSumma4 = Math.round(bokPer4 * 499);
$('#bokSumma1').html(bokSumma1 + ' Kr (' + Prisindikator.countedOn + ' 9 ' + Prisindikator.books + ')');
$('#bokSumma2').html(bokSumma2 + ' Kr (' + Prisindikator.countedOn + ' 99 ' + Prisindikator.books + ')');
$('#bokSumma3').html(bokSumma3 + ' Kr (' + Prisindikator.countedOn + ' 299 ' + Prisindikator.books + ')');
$('#bokSumma4').html(bokSumma4 + ' Kr (' + Prisindikator.countedOn + ' 499 ' + Prisindikator.books + ')');
$('#skal4 > .bonus').html(bonus3);
$('#skal5 > .bonus').html(bonus1);
$('#bokSumma5').html(Prisindikator.bokSumma5);
$('#skal6 > .bonus').html(bonus2 + '<div class="mest">' + Prisindikator.mestBok + '</div>');
$('#bokPer1').html(bokPer1 + ' Kr');
$('#bokPer2').html(bokPer2 + ' Kr');
$('#bokPer3').html(bokPer3 + ' Kr');
$('#bokPer4').html(bokPer4 + ' Kr');
if (bocker > 0) {
$('#dinSumma').html(bocker);
$('#bokSummaDin').html(bokSummaDin + ' Kr');
$('#bokPerDin').html(bokPerDin + ' Kr');
$('#skal1 > .bonus').html(bonus);
}
if (farg === 1) {
$('#skal1 h2').html(Prisindikator.mjukparm + ', ' + momstyp + Prisindikator.och + farg + Prisindikator.pageInColor + '<br>' + typ);
} else if (farg > 1 && farg < 11) {
$('#skal1 h2').html(Prisindikator.mjukparm + ', ' + momstyp + Prisindikator.och + farg + Prisindikator.pageInColor + '<br>' + typ);
} else {
$('#skal1 h2').html(Prisindikator.mjukparm + ', ' + momstyp + '<br>' + typ);
}
}
$("#calc input").bind("keyup change click", function() {
calc();
});
$('#calc input:submit').click(function() {
calc();
});
});