var slideTimer;$(document).ready(function(){$(".dk-cart-nav-button").livequery("click",getCartItems);$("#dkp-shopping-cart-list").click(function(){$("#showCartList").toggle()});$("#dkp-recent-view-list").click(function(){getRecentViewItems()});getCartItems()});function getCartItems(){url=(this.href)?this.href:"/shopping/cart/?view=lightbox";arg="";$.ajax({url:url,type:"GET",data:arg,beforeSend:function(){$("#showCartList").html('<b><img src="/images/animation/loading.gif" /></b>')},success:function(a){$("#showCartList").html(a);return false}});return false}function getRecentViewItems(){url=(this.href)?this.href:"/design/recentView";arg="";$.ajax({url:url,type:"GET",data:arg,beforeSend:function(){$("#showRecentView").html('<b><img src="/images/animation/loading.gif" /></b>')},success:function(a){$("#showRecentView").html(a);$("#showRecentView").toggle();return false}});return false}function getCartCountItems(){url=(this.href)?this.href:"/shopping/totalitems";arg="";$.ajax({url:url,type:"GET",data:arg,success:function(a){$("#footerShowTotalItems").html(a);if(parseInt(a)!=0){$("#dkp-cart-image").attr("src","/images/cart-items.gif")}else{$("#dkp-cart-image").attr("src","/images/cart.gif")}$("#headerShowTotalItems").html(a)}})}function showList(a){a=(a)?a:400;$("#showCartList").slideDown(a);if($("#content a[rel]")){$("#content a[rel]").qtip("hide")}if($(".browsePopUp")){$(".browsePopUp").qtip("hide")}if(a>500){slideTimer=setTimeout("hideList()",6000)}return false}function hideList(){if($("#hello").val()=="stores"){$("#showCartList").hide("slow")}else{$("#showCartList").slideUp(2000)}}function hideViewList(){$("#showRecentView").slideUp(2000)}function delItemInSlider(a){if(confirm("Are you sure you want to delete\n this Item from the Cart?")){$.ajax({url:"/shopping/cart/removeItem/"+a,type:"GET",success:function(c){$("#dkp-cart-item-slider-"+a).remove();var b=getCartItems();getCartCountItems()}})}return false};