/*
<script language="javascript" type="text/javascript" src="/js/jquery.superfish.js"></script>
*/
;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl()},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path)}},o.delay)},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone())};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass)});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this))}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li)}).blur(function(){out.call($li)})});o.onInit.call(this)}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '))})};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)this.toggleClass(sf.c.shadowClass+'-off')};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul)});return this}})})(jQuery);
/*
<script language="javascript" type="text/javascript" src="/js/jquery.galleria.js"></script>	
*/
(function(jQuery){var jQueryjQuery;jQueryjQuery=jQuery.fn.galleria=function(jQueryoptions){if(!jQueryjQuery.hasCSS()){return false}jQuery.historyInit(jQueryjQuery.onPageLoad);var jQuerydefaults={insert:'.galleria_container',history:true,clickNext:true,onImage:function(image,caption,thumb){},onThumb:function(thumb){},onEnd:function(src){}};var jQueryopts=jQuery.extend(jQuerydefaults,jQueryoptions);for(var i in jQueryopts){if(i){jQuery.galleria[i]=jQueryopts[i]}}var _insert=(jQuery(jQueryopts.insert).is(jQueryopts.insert))?jQuery(jQueryopts.insert):jQuery(document.createElement('div')).insertBefore(this);var _div=jQuery(document.createElement('div')).addClass('galleria_wrapper');var _span=jQuery(document.createElement('span')).addClass('caption');_insert.addClass('galleria_container').append(_div).append(_span);this.each(function(){jQuery(this).addClass('galleria');jQuery(this).children('li').each(function(i){var _container=jQuery(this);var _o=jQuery.meta?jQuery.extend({},jQueryopts,_container.data()):jQueryopts;_o.clickNext=jQuery(this).is(':only-child')?false:_o.clickNext;var _a=jQuery(this).find('a').is('a')?jQuery(this).find('a'):false;var _img=jQuery(this).children('img').css('display','none');var _src=_a?_a.attr('href'):_img.attr('src');var _title=_a?_a.attr('title'):_img.attr('title');var _loader=new Image();if(_o.history&&(window.location.hash&&window.location.hash.replace(/\#/,'')==_src)){_container.siblings('.active').removeClass('active');_container.addClass('active')}jQuery(_loader).load(function(){jQuery(this).attr('alt',_img.attr('alt'));var _thumb=_a?_a.find('img').addClass('thumb noscale').css('display','none'):_img.clone(true).addClass('thumb').css('display','none');if(_a){_a.replaceWith(_thumb)}if(!_thumb.hasClass('noscale')){var w=Math.ceil(_img.width()/_img.height()*_container.height());var h=Math.ceil(_img.height()/_img.width()*_container.width());if(w<h){_thumb.css({height:'auto',width:_container.width(),marginTop:-(h-_container.height())/2})}else{_thumb.css({width:'auto',height:_container.height(),marginLeft:-(w-_container.width())/2})}}else{window.setTimeout(function(){},1)}_thumb.attr('rel',_src);_thumb.attr('title',_title);_thumb.click(function(){jQuery.galleria.activate(_src)});_thumb.hover(function(){jQuery(this).addClass('hover')},function(){jQuery(this).removeClass('hover')});_container.hover(function(){_container.addClass('hover')},function(){_container.removeClass('hover')});_container.prepend(_thumb);_thumb.css('display','block');_o.onThumb(jQuery(_thumb));if(_container.hasClass('active')){jQuery.galleria.activate(_src)}_img.remove()}).error(function(){_container.html('<span class="error" style="color:red">Error loading image: '+_src+'</span>')}).attr('src',_src)})})};jQueryjQuery.nextSelector=function(selector){return jQuery(selector).is(':last-child')?jQuery(selector).siblings(':first-child'):jQuery(selector).next()};jQueryjQuery.previousSelector=function(selector){return jQuery(selector).is(':first-child')?jQuery(selector).siblings(':last-child'):jQuery(selector).prev()};jQueryjQuery.hasCSS=function(){jQuery('body').append(jQuery(document.createElement('div')).attr('id','css_test').css({width:'1px',height:'1px',display:'none'}));var _v=(jQuery('#css_test').width()!=1)?false:true;jQuery('#css_test').remove();return _v};jQueryjQuery.onPageLoad=function(_src){var _wrapper=jQuery('.galleria_wrapper');var _thumb=jQuery('.galleria img[rel="'+_src+'"]');if(_src){if(jQuery.galleria.history){window.location=window.location.href.replace(/\#.*/,'')+'#'+_src}_thumb.parents('li').siblings('.active').removeClass('active');_thumb.parents('li').addClass('active');var url='/fotoalbumTrans/'+_thumb.parents('li').attr('id')+'/';jQuery.get(url,function(data){data=data.split(" | ");jQuery('#image-blok #beschrijving').html(data[0]);jQuery('.breadcrumbs').html(data[1])});var _img=jQuery(new Image()).attr('src',_src).addClass('replaced');_wrapper.empty().append(_img);_wrapper.siblings('.caption').text(_thumb.attr('title'));jQuery.galleria.onImage(_img,_wrapper.siblings('.caption'),_thumb);if(jQuery.galleria.clickNext){_img.css('cursor','pointer').click(function(){jQuery.galleria.next()})}}else{_wrapper.siblings().andSelf().empty();jQuery('.galleria li.active').removeClass('active')}jQuery.galleria.current=_src;jQuery.galleria.onEnd(jQuery.galleria.current)};jQuery.extend({galleria:{current:'',onImage:function(){},activate:function(_src){if(jQuery.galleria.history){jQuery.historyLoad(_src)}else{jQueryjQuery.onPageLoad(_src)}},next:function(){var _next=jQuery(jQueryjQuery.nextSelector(jQuery('.galleria img[rel="'+jQuery.galleria.current+'"]').parents('li'))).find('img').attr('rel');jQuery.galleria.activate(_next)},prev:function(){var _prev=jQuery(jQueryjQuery.previousSelector(jQuery('.galleria img[rel="'+jQuery.galleria.current+'"]').parents('li'))).find('img').attr('rel');jQuery.galleria.activate(_prev)},onEnd:function(src){}}})})(jQuery);jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyInit:function(callback){jQuery.historyCallback=callback;var current_hash=location.hash;jQuery.historyCurrentHash=current_hash;if(jQuery.browser.msie){if(jQuery.historyCurrentHash===''){jQuery.historyCurrentHash='#'}jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=current_hash}else if(jQuery.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.isFirst=true}jQuery.historyCallback(current_hash.replace(/^#/,''));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(hash){jQuery.historyBackStack.push(hash);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentDocument||ihistory.contentWindow.document;var current_hash=iframe.location.hash;if(current_hash!=jQuery.historyCurrentHash){location.hash=current_hash;jQuery.historyCurrentHash=current_hash;jQuery.historyCallback(current_hash.replace(/^#/,''))}}else if(jQuery.browser.safari){if(!jQuery.dontCheck){var historyDelta=history.length-jQuery.historyBackStack.length;if(historyDelta){jQuery.isFirst=false;var i;if(historyDelta<0){for(i=0;i<Math.abs(historyDelta);i++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(i=0;i<historyDelta;i++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var cachedHash=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(cachedHash!==undefined){jQuery.historyCurrentHash=location.hash;jQuery.historyCallback(cachedHash)}}else if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]===undefined&&!jQuery.isFirst){if(document.URL.indexOf('#')>=0){jQuery.historyCallback(document.URL.split('#')[1])}else{current_hash=location.hash;jQuery.historyCallback('')}jQuery.isFirst=true}}}else{current_hash=location.hash;if(current_hash!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=current_hash;jQuery.historyCallback(current_hash.replace(/^#/,''))}}},historyLoad:function(hash){var newhash;if(jQuery.browser.safari){newhash=hash}else{newhash='#'+hash;location.hash=newhash}jQuery.historyCurrentHash=newhash;if(jQuery.browser.msie){var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=newhash;jQuery.historyCallback(hash)}else if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(hash);var fn=function(){jQuery.dontCheck=false};window.setTimeout(fn,200);jQuery.historyCallback(hash);location.hash=newhash}else{jQuery.historyCallback(hash)}}});
/*
<script type="text/javascript" src="/js/iepngfix_tilebg.js"></script>
*/
var IEPNGFix=window.IEPNGFix||{};IEPNGFix.tileBG=function(elm,pngSrc,ready){var data=this.data[elm.uniqueID],elmW=Math.max(elm.clientWidth,elm.scrollWidth),elmH=Math.max(elm.clientHeight,elm.scrollHeight),bgX=elm.currentStyle.backgroundPositionX,bgY=elm.currentStyle.backgroundPositionY,bgR=elm.currentStyle.backgroundRepeat;if(!data.tiles){data.tiles={elm:elm,src:'',cache:[],img:new Image(),old:{}}}var tiles=data.tiles,pngW=tiles.img.width,pngH=tiles.img.height;if(pngSrc){if(!ready&&pngSrc!=tiles.src){tiles.img.onload=function(){this.onload=null;IEPNGFix.tileBG(elm,pngSrc,1)};return tiles.img.src=pngSrc}}else{if(tiles.src)ready=1;pngW=pngH=0}tiles.src=pngSrc;if(!ready&&elmW==tiles.old.w&&elmH==tiles.old.h&&bgX==tiles.old.x&&bgY==tiles.old.y&&bgR==tiles.old.r){return}var pos={top:'0%',left:'0%',center:'50%',bottom:'100%',right:'100%'},x,y,pc;x=pos[bgX]||bgX;y=pos[bgY]||bgY;if(pc=x.match(/(\d+)%/)){x=Math.round((elmW-pngW)*(parseInt(pc[1])/100))}if(pc=y.match(/(\d+)%/)){y=Math.round((elmH-pngH)*(parseInt(pc[1])/100))}x=parseInt(x);y=parseInt(y);var repeatX={'repeat':1,'repeat-x':1}[bgR],repeatY={'repeat':1,'repeat-y':1}[bgR];if(repeatX){x%=pngW;if(x>0)x-=pngW}if(repeatY){y%=pngH;if(y>0)y-=pngH}this.hook.enabled=0;if(!({relative:1,absolute:1}[elm.currentStyle.position])){elm.style.position='relative'}var count=0,xPos,maxX=repeatX?elmW:x+0.1,yPos,maxY=repeatY?elmH:y+0.1,d,s,isNew;if(pngW&&pngH){for(xPos=x;xPos<maxX;xPos+=pngW){for(yPos=y;yPos<maxY;yPos+=pngH){isNew=0;if(!tiles.cache[count]){tiles.cache[count]=document.createElement('div');isNew=1}var clipR=Math.max(0,xPos+pngW>elmW?elmW-xPos:pngW),clipB=Math.max(0,yPos+pngH>elmH?elmH-yPos:pngH);d=tiles.cache[count];s=d.style;s.behavior='none';s.left=(xPos-parseInt(elm.currentStyle.paddingLeft))+'px';s.top=yPos+'px';s.width=clipR+'px';s.height=clipB+'px';s.clip='rect('+(yPos<0?0-yPos:0)+'px,'+clipR+'px,'+clipB+'px,'+(xPos<0?0-xPos:0)+'px)';s.display='block';if(isNew){s.position='absolute';s.zIndex=-999;if(elm.firstChild){elm.insertBefore(d,elm.firstChild)}else{elm.appendChild(d)}}this.fix(d,pngSrc,0);count++}}}while(count<tiles.cache.length){this.fix(tiles.cache[count],'',0);tiles.cache[count++].style.display='none'}this.hook.enabled=1;tiles.old={w:elmW,h:elmH,x:bgX,y:bgY,r:bgR}};IEPNGFix.update=function(){for(var i in IEPNGFix.data){var t=IEPNGFix.data[i].tiles;if(t&&t.elm&&t.src){IEPNGFix.tileBG(t.elm,t.src)}}};IEPNGFix.update.timer=0;if(window.attachEvent&&!window.opera){window.attachEvent('onresize',function(){clearTimeout(IEPNGFix.update.timer);IEPNGFix.update.timer=setTimeout(IEPNGFix.update,100)})}
/*
<script language="javascript" type="text/javascript" src="/js/functies.js"></script>
*/
function check(which,verplicht,error,emailerror){var empty=false;for(i=0;i<which.length;i++){var veld=which.elements[i];if(veld.type=="text"){veld.className=veld.className.replace('error',"");}
for(j=0;j<verplicht.length;j++){if(veld.type=="text"&&veld.name==verplicht[j][0]&&veld.value==''){veld.className="error";empty=true;}
if(veld.type=="textarea"&&veld.name==verplicht[j][0]&&veld.value==''){veld.className="error";empty=true;}
if(veld.type=="checkbox"&&veld.name==verplicht[j][0]&&!veld.checked&&verplicht[j][1]=='voorwaarden'){veld.className="error";alert("U moet wel akkoord gaan met de voorwaarden");return false;}
if(veld.type=="text"&&veld.value!=''&&veld.name=='postcode'&&verplicht[j][1]=='postcode'){postcode=veld.value.toUpperCase();veld.value=postcode;rExp=/^[1-9]{1}[0-9]{3}[A-Z]{2}$/;if(!rExp.exec(postcode)){alert('U heeft het veld postcode niet juist ingevuld.\nVul de postcode in met notatie 1234AB');return false;}}
if(veld.type=="text"&&veld.value!=''&&veld.name=='email'&&verplicht[j][1]=='email'){var email=/^[_\.0-9a-z-]+\@([0-9a-z][0-9a-z-]*\.)+([a-z]{2,4})+$/i
if(!(email.test(veld.value))){veld.className="error";alert("Geen geldig emailadres");return false;}}}}
if(empty){alert("Niet alle velden zijn ingevuld.");return false;}else{which.spamchecker.value="GEEN_SPAM";return true;}}
function sendForm(id,verplicht,error,emailerror){if(check(document.getElementById(id),verplicht,error,emailerror)){document.getElementById(id).submit();}}
function changeProductBlok(jQuerythis,currentBlok){jQuery('#productblok .productblok h3').not(jQuery(jQuerythis)).parent().find('div').hide();jQuery('#productblok .productblok h3').not(jQuery(jQuerythis)).parent().parent().removeClass('active');jQuery(jQuerythis).next().show();jQuery(jQuerythis).next().parent().parent().addClass('active');var currentId=jQuery(currentBlok).attr('id');var id=jQuery(jQuerythis).attr('id');jQuery('#foto_'+currentId).fadeOut("slow");jQuery('#foto_'+id).fadeIn("slow");clearTimeout(t);t=setTimeout("nextProductblok()",6000);}
function nextProductblok(){clearTimeout(t);var index=jQuery('#productblok .productblok.active').index();if(jQuery('#productblok .productblok h3').size()-1<=index){index=-1;}
changeProductBlok(jQuery('#productblok .productblok h3').get(index+1),jQuery('#productblok .productblok h3').get(index));}
function previousProduct(){clearTimeout(t);var index=jQuery('#productblok .productblok.active').index();if(0>=index){index=jQuery('#productblok .productblok h3').size();}
changeProductBlok(jQuery('#productblok .productblok h3').get(index-1),jQuery('#productblok .productblok h3').get(index));}
function checkAantalFotos(jQuerythis){var aantal=jQuerythis.val();var parent=jQuerythis.parent().parent();var soort=parent.attr('id');if(aantal==0){parent.find(".fotoblok").hide();}else{parent.find(".fotoblok").show();parent.find(".fotoframe").remove();for(i=0;i<aantal;i++){if(parent.find(".fotoframe-"+i).length==0){jQuery.get('/fotoframe/'+soort+'/'+i+'/',function(data){parent.find('.fotoframes').append(data);});}else{parent.find(".fotoframe-"+i).show();}}}}
function checkOpdrachtFormulier(id){x_form_id=id;var f1=document.getElementById(id);var uploadFile=false;var error=false;for(var i=0;i<f1.length;i++)
{current=f1.elements[i];current.className=current.className.replace('error',"");if(current.type=='file'&&current.value!='')
{uploadFile=true;}
else if(current.className.search('check')>=0){if(current.value==''||current.value==' '||current.value==0){error=true;current.className=current.className+" error";}}}
if(!error){if(uploadFile){StartUpload(f1);f1.submit();}else{f1.action='/opdrachtformulier/1/';f1.submit();}}else{alert('U heeft niet alle gegevens correct ingevoerd.');return false;}}
function gegevensFormulier(id){document.getElementById("debiteurnummer").style.display='none';document.getElementById("gegevens").style.display='none';document.getElementById("debiteurnummerbutton").style.display='none';document.getElementById("gegevensbutton").style.display='none';if(id){document.getElementById(id).style.display='block';if(id=='gegevens'){document.getElementById("debiteurnummerbutton").style.display='block';}else{document.getElementById("gegevensbutton").style.display='block';}}}
$.noConflict();jQuery(document).ready(function(){jQuery('#nav .hasSubmenu').click(function(){jQuery('#nav .hasSubmenu').parent().find('submenu').not(this).slideUp();jQuery('#nav .hasSubmenu').removeClass('selected opened closed').addClass('closed');jQuery('#nav .selected').removeClass('selected');jQuery(this).parent().find('.hasSubmenu').removeClass('selected opened closed');jQuery(this).parent().find('.hasSubmenu').addClass('selected');jQuery(this).parent().find('.submenu').slideToggle('slow',function(){if(jQuery(this).is(":visible")==true){jQuery(this).parent().find('.hasSubmenu').addClass('opened');}else{jQuery(this).parent().find('.hasSubmenu').addClass('closed');}});return false;});jQuery('#nav .submenu').hide();jQuery('#nav .hasSubmenu.selected').parent().find('.submenu').show();jQuery('ul.sf-menu').superfish({autoArrows:false,dropShadows:false});jQuery('#productblok .productblok h3').click(function(){}).next().hide();jQuery("#productblok #next").click(function(){clearTimeout(t);nextProductblok();return false;});jQuery("#productblok #previous").click(function(){clearTimeout(t);previousProduct();return false;});jQuery('#productblok .productblok.active .border h3').parent().find('div').show();jQuery("#opdrachtformulier .menuleft").tabs();jQuery(".aantalfotos").change(function(){checkAantalFotos(jQuery(this));});jQuery('ul.gallery').galleria({insert:'#main_image',onImage:function(image,caption,thumb){if(!(jQuery.browser.mozilla&&navigator.appVersion.indexOf("Win")!=-1)){image.css('display','none').fadeIn(1000);}
caption.css('display','none').fadeIn(1000);var _li=thumb.parents('li');_li.siblings().children('img.selected').fadeTo(500,0.3);_li.children('span').fadeTo(500,0.3);thumb.fadeTo('fast',1).addClass('selected');thumb.parent().children('span').fadeTo('fast',1);image.attr('title','Next image >>');},onThumb:function(thumb){var _li=thumb.parents('li');var margintop=(93-thumb.attr('height'))+10;_li.append('<span class="title" style="margin-top:'+margintop+'px">'+thumb.attr('alt')+'</span>');thumb.hover(function(){thumb.fadeTo('fast',1);_li.children('span').fadeTo('fast',1);},function(){_li.not('.active').children('img').fadeTo('fast',0.3);_li.not('.active').children('span').fadeTo('fast',0.3);})},onEnd:function(_src){jQuery('ul.gallery li').css({display:'none'});jQuery('ul.gallery li img').css({opacity:'0.3'});var length=(jQuery('ul.gallery li').length-1);var _li=parseInt(jQuery('.galleria img[rel="'+_src+'"]').parent().attr("id"));var url='/fotoalbumTrans/'+_li+'/';jQuery.get(url,function(data){data=data.split(" | ");jQuery('#image-blok #beschrijving').html(data[0]);jQuery('.breadcrumbs').html(data[1]);});jQuery('#'+_li).css({display:'block'});jQuery('#'+_li+' img').css({opacity:'1'});_li=jQuery('.galleria img[rel="'+_src+'"]').parent().attr("class");_li=_li.replace(' active','');_li=parseInt(_li.replace(' ',''));for(a=_li;a<(_li+3);a++){if(a>length){if((a-length)==1){jQuery('.0').css({display:'block'});jQuery('.0 img').css({opacity:'0.3'});}
else if((a-length)==2){jQuery('.1').css({display:'block'});jQuery('.1 img').css({opacity:'0.3'});}
else{jQuery('.2').css({display:'block'});jQuery('.2 img').css({opacity:'0.3'});}}else{jQuery('.'+a).css({display:'block'});jQuery('.'+a+' img').css({opacity:'0.3'});}}
for(a=_li;a>(_li-3);a--){if(a<0){if(a==-1){jQuery('.'+length).css({display:'block'});jQuery('.'+length+' img').css({opacity:'0.3'});}else{jQuery('.'+(length-1)).css({display:'block'});jQuery('.'+(length-1)+' img').css({opacity:'0.3'});}}else{jQuery('.'+a).css({display:'block'});jQuery('.'+a+' img').css({opacity:'0.3'});}}}});});var t=setTimeout("nextProductblok()",5000);jQuery(document).ready(function(){var productitem=jQuery('#productitem');var currentIndex=0;function toggleProductImg()
{var image=productitem.find('.productimage img')[currentIndex];jQuery(image).fadeOut('slow',function(){currentIndex=((currentIndex+1)>1)?0:currentIndex+1;var nextImage=productitem.find('.productimage img')[currentIndex];jQuery(nextImage).fadeIn('slow');setTimeout(toggleProductImg,3000);});}
if(productitem.find('img').size()==2)
{currentIndex=1;productitem.find('.productimage img:first').css({display:'none'});setTimeout(toggleProductImg,3000);}});
