function getURLVar(t){var e=[],s=String(document.location).split("?");if(s[1]){var o=s[1].split("&");for(i=0;i<o.length;i++){var a=o[i].split("=");a[0]&&a[1]&&(e[a[0]]=a[1])}return e[t]?e[t]:""}}function addToCart(t,e){e=void 0!==e?e:1,$.ajax({url:"index.php?route=checkout/cart/add",type:"post",data:"product_id="+t+"&quantity="+e,dataType:"json",success:function(t){$(".success, .warning, .attention, .information, .error").remove(),t.redirect&&(location=t.redirect),t.success&&($("#notification").html('<div class="success" style="display: none;">'+t.success+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'),$(".success").fadeIn("slow"),$("#cart-total").html(t.total),$("html, body").animate({scrollTop:0},"slow"))}})}function addToWishList(t){$.ajax({url:"index.php?route=account/wishlist/add",type:"post",data:"product_id="+t,dataType:"json",success:function(t){$(".success, .warning, .attention, .information").remove(),t.success&&($("#notification").html('<div class="success" style="display: none;">'+t.success+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'),$(".success").fadeIn("slow"),$("#wishlist-total").html(t.total),$("html, body").animate({scrollTop:0},"slow"))}})}function addToCompare(t){$.ajax({url:"index.php?route=product/compare/add",type:"post",data:"product_id="+t,dataType:"json",success:function(t){$(".success, .warning, .attention, .information").remove(),t.success&&($("#notification").html('<div class="success" style="display: none;">'+t.success+'<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'),$(".success").fadeIn("slow"),$("#compare-total").html(t.total),$("html, body").animate({scrollTop:0},"slow"))}})}$(document).ready(function(){$(".button-search").bind("click",function(){url=$("base").attr("href")+"index.php?route=product/search";var t=$("input[name='search']").attr("value");t&&(url+="&search="+encodeURIComponent(t)),location=url}),$("#button-search").bind("click",function(){url=$("base").attr("href")+"index.php?route=product/search";var t=$(".content > p >input[name='search']").attr("value");t&&(url+="&search="+encodeURIComponent(t)),location=url}),$("#search input[name='search'], input[name='search']").bind("keydown",function(t){if(13==t.keyCode){url=$("base").attr("href")+"index.php?route=product/search";var e=$(this).attr("value");e&&(url+="&search="+encodeURIComponent(e)),location=url}}),$("#cart > .heading a").live("click",function(){$("#cart").addClass("active"),$("#cart").load("index.php?route=module/cart #cart > *"),$("#cart").live("mouseleave",function(){$(this).removeClass("active")})}),$("#menu ul > li > a + div").each(function(t,e){if($.browser.msie&&(7==$.browser.version||6==$.browser.version)){$(e).find("a");var s=$(e).find("ul").length;$(e).css("width",143*s+"px"),$(e).find("ul").css("float","left")}var o=$("#menu").offset(),a=$(this).parent().offset();i=a.left+$(this).outerWidth()-(o.left+$("#menu").outerWidth()),i>0&&$(this).css("margin-left","-"+(i+5)+"px")}),$.browser.msie&&($.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")),$.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()})})});