function limitCheckInGroup(form,selObj,grpName){selObjCheckStatus=selObj.checked;$('input:checkbox[name='+grpName+']').each(function(index,e){e.checked=false;});selObj.checked=selObjCheckStatus;}
function changeDirectSearchType(form,action,onBtn,offBtn){form.attr("action",action);onBtn.addClass('active');onBtn.removeClass('inactive');offBtn.removeClass('active');offBtn.addClass('inactive');}
function BPictureZoom(newWidth,newHeight,origWidth,origHeight){$(".BPictureZoom").hover(function(){$(this).css({'z-index':'1000'});$(this).find('img').addClass("hover").stop().animate({marginTop:'-73px',marginLeft:'-97px',top:'50%',left:'50%',width:newWidth+'px',height:newHeight+'px'},200);},function(){$(this).css({'z-index':'0'});$(this).find('img').removeClass("hover").stop().animate({marginTop:'0',marginLeft:'0',top:'0',left:'0',width:origWidth+'px',height:origHeight+'px'},400);});}
jQuery.fn.center=function(absolute){return this.each(function () {var t = jQuery(this);t.css({position:	absolute ? 'absolute' : 'fixed',left:'50%',top:'50%',zIndex:'99'}).css({marginLeft:	'-' + (t.outerWidth() / 2) + 'px',marginTop:	'-' + (t.outerHeight() / 2) + 'px'});if (absolute) {t.css({marginTop:	parseInt(t.css('marginTop'), 10) + jQuery(window).scrollTop(), marginLeft:	parseInt(t.css('marginLeft'), 10) + jQuery(window).scrollLeft()});}});};
function pageHeaderRenderAutoComplete(){var reEscape=new RegExp('(\\'+['/','.','*','+','?','|','(',')','[',']','{','}','\\'].join('|\\')+')','g');$('#freeText').data("autocomplete")._renderItem=function(ul,items){ul.css('z-index',10000);if(items.label){ul.append('<li class="headerSearchBoxCategory">'+items.label+'</li>');}var term=this.term;$.each(items.data,function(index,item){var pattern='('+term.replace(reEscape,'\\$1')+')';text=item.label.replace(new RegExp(pattern,'gi'),'<strong class="empf">$1<\/strong>');if(item.img){return $("<li></li>").data("item.autocomplete",item).append($("<a></a>").append('<div class="column"><img src="'+item.img+'"/></div>'+text+'<br/>'+item.price+'<br/>&nbsp;')).appendTo(ul);}else{return $("<li></li>").data("item.autocomplete",item).append($("<a></a>").html(text)).appendTo(ul);}});};}
