function addToCompare(a){$.ajax({url:"index.php?route=product/compare/update",type:"post",data:"product_id="+a,dataType:"json",success:function(a){$(".success, .warning, .attention, .information").remove();if(a["success"]){$("#notification").html('<div class="attention" style="display: none;">'+a["success"]+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');$(".attention").fadeIn("slow");$("#compare_total").html(a["total"]);$("html, body").animate({scrollTop:0},"slow")}}})}function addToWishList(a){$.ajax({url:"index.php?route=account/wishlist/update",type:"post",data:"product_id="+a,dataType:"json",success:function(a){$(".success, .warning, .attention, .information").remove();if(a["success"]){$("#notification").html('<div class="attention" style="display: none;">'+a["success"]+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');$(".attention").fadeIn("slow");$("#wishlist_total").html(a["total"]);$("html, body").animate({scrollTop:0},"slow")}}})}function removeVoucher(a){$.ajax({url:"index.php?route=checkout/cart/update",type:"post",data:"voucher="+a,dataType:"json",success:function(a){$(".success, .warning, .attention, .information").remove();if(a["output"]){$("#cart_total").html(a["total"]);$("#cart .content").html(a["output"])}}})}function removeCart(a){$.ajax({url:"index.php?route=checkout/cart/update",type:"post",data:"remove="+a,dataType:"json",success:function(a){$(".success, .warning, .attention, .information").remove();if(a["output"]){$("#cart_total").html(a["total"]);$("#cart .content").html(a["output"])}}})}function addToCart(a){$.ajax({url:"index.php?route=checkout/cart/update",type:"post",data:"product_id="+a,dataType:"json",success:function(a){$(".success, .warning, .attention, .information, .error").remove();if(a["redirect"]){location=a["redirect"]}if(a["error"]){if(a["error"]["warning"]){$("#notification").html('<div class="warning" style="display: none;">'+a["error"]["warning"]+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>')}}if(a["success"]){$("#notification").html('<div class="attention" style="display: none;">'+a["success"]+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');$(".attention").fadeIn("slow");$("#cart_total").html(a["total"]);$("html, body").animate({scrollTop:0},"slow")}}})}$(document).ready(function(){$(".button-search").bind("click",function(){url="index.php?route=product/search";var a=$("input[name='filter_name']").attr("value");if(a){url+="&filter_name="+encodeURIComponent(a)}location=url});$("#header input[name='filter_name']").keydown(function(a){if(a.keyCode==13){url="index.php?route=product/search";var b=$("input[name='filter_name']").attr("value");if(b){url+="&filter_name="+encodeURIComponent(b)}location=url}});$("#cart > .heading a").bind("click",function(){$("#cart").addClass("active");$.ajax({url:"index.php?route=checkout/cart/update",dataType:"json",success:function(a){if(a["output"]){$("#cart .content").html(a["output"])}}});$("#cart").bind("mouseleave",function(){$(this).removeClass("active")})});$("#menu ul > li > a + div").each(function(a,b){if($.browser.msie&&($.browser.version==7||$.browser.version==6)){var c=$(b).find("a");var d=$(b).find("ul").length;$(b).css("width",d*143+"px");$(b).find("ul").css("float","left")}var e=$("#menu").offset();var f=$(this).parent().offset();i=f.left+$(this).outerWidth()-(e.left+$("#menu").outerWidth());if(i>0){$(this).css("margin-left","-"+(i+5)+"px")}});if($.browser.msie){if($.browser.version<=6){$("#column-left + #column-right + #content, #column-left + #content").css("margin-left","195px");$("#column-right + #content").css("margin-right","195px");$(".box-category ul li a.active + ul").css("display","block")}if($.browser.version<=7){$("#menu > ul > li").bind("mouseover",function(){$(this).addClass("active")});$("#menu > ul > li").bind("mouseout",function(){$(this).removeClass("active")})}}});$(".success img, .warning img, .attention img, .information img").live("click",function(){$(this).parent().fadeOut("slow",function(){$(this).remove()})})
