
var InputTextReplacer=function(args)
{if($jQ(args.inputs).size()>0)
{this.init(args);}}
InputTextReplacer.prototype={init:function(args)
{var self=this;this.inputs=$jQ(args.inputs).filter(':text, textarea');$jQ(this.inputs).each(function(i,elem)
{var label=$jQ('label[for="'+$jQ(this).attr('id')+'"]');if(args.hideLabels)
$jQ(label).hide();var labelText=$jQ(label).text();$jQ(this).val(labelText).focus(function()
{if($jQ(this).val()==labelText)
{$jQ(this).val('');}}).blur(function()
{if(($jQ(this).val()!=labelText)&&($jQ(this).val()==''))
{$jQ(this).val(labelText);}});});}};$jQ(function()
{var GulvspesialistenInputTextReplacer=new InputTextReplacer({inputs:'input.ireplace, textarea.ireplace',hideLabels:false});});$jQ(function()
{var focusables='#product-search input';$jQ(focusables).blur(function()
{$jQ(this).removeClass('focus');}).focus(function()
{$jQ(this).addClass('focus');});var hoverables='#product #buy .submit';$jQ(hoverables).hover(function()
{$jQ(this).addClass('hover');},function()
{$jQ(this).removeClass('hover');});$jQ('#show-long-desc').click(function()
{if($jQ('#long-desc').css('height')=='0px')
{$jQ('#long-desc').css('height','auto');$jQ(this).html('<strong>&#150;</strong> Færre detaljer');}
else if($jQ('#long-desc').css('height')=='auto')
{$jQ('#long-desc').css('height','0px');$jQ(this).html('<strong>+</strong> Flere detaljer');}});$jQ('#pbuttons a').click(function(){$jQ('#fraktboks').slideDown();return false;});});function updateProductCost()
{var cost=$jQ('#packagePrice').html();cost=cost.replace(",",".");var ant=$jQ('#productcount').val();if(cost!=''&&ant!=''&&!isNaN(cost)&&!isNaN(ant))
{var newCost=cost*ant;newCost=newCost.toFixed(2);$jQ('#totCost').html(newCost+' kr');}}