function smartweb_share(type){ if (type == 'facebook'){ window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)).concat('').concat('&t=').concat(encodeURIComponent(document.title))); } if (type == 'plurk'){ window.open('http://www.plurk.com/?qualifier=shares&status='.concat(encodeURIComponent(location.href)).concat(' ').concat('(').concat(encodeURIComponent(document.title)).concat(')')); } if (type == 'twitter'){ window.open('http://twitter.com/home/?status='.concat(encodeURIComponent(document.title)).concat(' ').concat(encodeURIComponent(location.href))); } if (type == 'bookmark'){ title = document.title; url = document.location; if (window.sidebar) {window.sidebar.addPanel(title, url,"");} else if(window.external ) {window.external.AddFavorite( url, title);} else if(window.opera && window.print) {return true;} } } function showMyCart(text){ $('#show_my_cart').hide(); // $('#show_my_cart').html(text).slideDown('slow'); $('#show_my_cart').html(text).fadeTo('fast',1); // $('#my_cart_sep').show(); } function updateMyCart(data){ if (data.url != undefined && data.url != null){ alert(data.msg); window.location=data.url; return false; } if (data.out != undefined && data.out != null){ $('#show_my_cart').show(); $('#show_my_cart').css('background-color','red'); $('#show_my_cart').css('color','white'); $('#show_my_cart').html(''); if (data.msg != undefined && data.msg != null){ alert(data.msg); } setTimeout(function(){ $('#show_my_cart').hide();$('#show_my_cart').css('background-color','#FFFFFF'); },500); setTimeout(function(){ showMyCart(data.out);},800); }else if (data.msg != undefined && data.msg != null){ alert(data.msg); } }