﻿$(function(){$('a.blank').attr('target','_blank');$('.navMenu > li:not(.active)').hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')});$('.fcktext table>tbody>tr:odd, table.data>tbody>tr:odd, table.group>tbody>tr:odd, table.result>tbody>tr:even, table.spec tr:even').addClass('even');$('.faqList>li:nth-child(3n), .productList > li:nth-child(3n)').after('<li class="separator"></li>');$('#localNav a:not(.title)').each(function(){if(this.href.toLowerCase()==String(window.location.href).toLowerCase()){return!$(this).addClass('active')}});$('#tabNav li a').each(function(){if(this.href.toLowerCase()==String(window.location.href).toLowerCase()){return!$(this).parent().addClass('active')}});$('#repairItem').change(function(){$('.note.r').removeClass('r');$('.hidden').hide();$('#'+$('#repairItem').val()).show()});var a='請輸入產品型號';var b='onfocus';$('input.prod-search').focus(function(){var j=$(this);j.val()==a&&j.val('').addClass(b)}).blur(function(){var j=$(this);var v=$.trim(j.val());j.val(v);(v==a||v=='')&&j.val(a).removeClass(b)}).keyup(function(e){if(e.which==13)$(this).next().click()}).val(a).next().click(function(){var j=$(this).prev();if(!j.is('.'+b))return!!alert(a);var v=j.val();if(v.length<3)return j.focus()&&!!alert('請至少輸入三個字');location.href='/search/'+encodeURIComponent(v)});if(!$.boxModel)try{document.execCommand('BackgroundImageCache',!1,!0);}catch(e){}});