/** productdetail - Mon 06/07/2010  1:45:57.39 */
$(document).ready(function(){if(bAz==1){var $icount=0;$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_amazonreviews.php",data:"iProductUnq="+iP+"&sUPC="+sUPC+"&sA="+sA+"&sISBN="+sISBN+"&iGenrePrimary="+iGP,success:function(xml){$("response>sData>datanode",xml).each(function(){var $sValue=$("value",this).text();var $sValue2=$("value2",this).text();if($sValue2!="-1"){$("#AmazonAvg").html("Average Amazon.com rating for this item: "+$sValue2)}if($sValue=="-1"){$("#ARImg").toggle()}else{var $iAmazonReviewCacheUnq=$("fieldname",this).text();$("#AmazonReviews"+$icount).html($sValue);$(".AR"+$icount).bind("click",function(){$sARCU=$(this).attr("ARCU");$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_amazonRevDetail.php",data:"iX="+$(this).attr("id")+"&iAmazonReviewCacheUnq="+$sARCU,success:function(xml){$("response>sData>datanode",xml).each(function(){var $sValue=$("value",this).text();$("#ARCUtd"+$sARCU).html($sValue)})},beforeSend:function(xml){$("#stat"+$sARCU).attr({src:"/images/stat.gif"})},complete:function(xml){$("#stat"+$sARCU).attr({src:"/images/blank.gif"})}})})}$icount++})}});$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_related.php",data:"iProductUnq="+iP+"&sUPC="+sUPC+"&sA="+sA+"&sISBN="+sISBN+"&iGenrePrimary="+iGP,success:function(xml){$("response>sData>datanode",xml).each(function(){var $iValue=$("value",this).text();if($iValue!=""){$("#SimilarItems").html($("value",this).text()).show()}})}})}$(".EDITInfo").cluetip({showTitle:false,local:true,cursor:"pointer",width:"200px",clickThrough:true});$(".VAUREVS").cluetip({showTitle:false,local:true,cursor:"pointer",width:"150px",clickThrough:true});if(bAcIv==1){$("#AddLink").click(function(){$.ajax({type:"GET",dataType:"json",url:"/ap/add_gproduct2.php",data:"iP="+iP,success:function(json){$("#AddToInventory").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Added");$.each(json.results,function(k,iAU){if(iAU!="0"){jQuery.noticeAdd({iAU:iAU})}})},beforeSend:function(xml){$("#AddToInventory").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Adding...")}})})}if(bAc==1){$(".WISH").cluetip({activation:"click",showTitle:false,cursor:"pointer",width:"300px",arrows:true,closePosition:"top",sticky:true,ajaxCache:false,closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".saveandcloseWL").click(function(){$("#cluetip-close").click()});$(".savewishlistandclose").click(function(){$iProductUnq=$("#iWLProductUnq").val();$iWishlistUnq=$(this).val();if($iWishlistUnq!=""){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/wish_addto.php",data:"iWishlistUnq="+$iWishlistUnq+"&iProductUnq="+$iProductUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){if($("value",this).text()=="1"){$("#AddToWishlist_"+$iProductUnq).hide();$("#AddToWishlist_"+$iProductUnq+"b").show()}});$("#cluetip-close").click()},beforeSend:function(xml){$("#WLStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#WLStat").attr({src:"/images/blank.gif"})}})}$("#cluetip-close").click()})}})}if(bIm==1){$(".DEL").cluetip({showTitle:false,local:true,cursor:"pointer",width:"100px"}).click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/del.php",data:"sAction=D&iProductUnq="+iP+"&iCS=0&iVAU="+iVAU,success:function(xml){$("response>sData>datanode",xml).each(function(){$sValue=$("value",this).text();if($sValue!="-1"){$("#OverallRating").html($sValue)}})},beforeSend:function(xml){$("#DelInventory_"+iP).html("<img src='/images/redX.gif' border=0 align=absmiddle style='margin-right:10px;' id='statDel"+iP+"'>Removing...");$("#statDel"+iP).attr({src:"/images/stat.gif"})},complete:function(xml){$("#DelInventory_"+iP).hide();$("#AddCLSpan, #manageLoan, #showEdit, .OUTLOANLAUIcon, #initiateLOAN3, #initiateLOAN2, #PUP, #sYourPriceDiv, #USTORE, #UserStoreDiv, #UQTY, #iQuantityDiv, #showUploadImage, #uploadImageDIV").hide();$("#sPersonalIDDiv, #AdminChatter, #sNoteDiv, #detailImage, #userNameDisp, #showReviewForm, #showReviewForm2, #viewUserReview, #reviewAddEdit, #reviewsDisplay, #yourRating1, #yourRating2, #iSaleStatusDiv, #iBookStatusDiv, #iOwnershipStatusDiv, #iMusicStatusDiv, #iMovieStatusDiv, #iWineStatusDiv, #iSoftwareStatusDiv").hide();$("#MakePrivate_"+iP).hide();$("#MakePrivate_"+iP+"b").hide();$("#MakePublic_"+iP).hide();$("#MakePublic_"+iP+"b").hide();$("#statDel"+iP).attr({src:"/images/tick.gif"});$("#DelInventory_"+iP+"b").show()}})}).confirm({dialogShow:"fadeIn",dialogSpeed:"slow",msg:'<span style="	font: bold 11px/14px verdana, geneva, arial;color: #218ecd;text-decoration: none;">Are you sure?&nbsp;</span>',buttons:{cancel:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[No]</span>',ok:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[Yes]</span>',separator:"&nbsp;"}})}if((bIm==1)&&(bIv==1)){$("#FavCatSubmit").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_favcatimage.php",data:"iProductUnq="+iP+"&bP="+bP,success:function(xml){},beforeSend:function(xml){$("#FCStat").attr({src:"/images/stat.gif"});$("#FavCatSubmit").hide();$("#FavCatStat").show()},complete:function(xml){$("#FavCatStat").hide();$("#FavCatThx").show();$("#FCStat").attr({src:"/images/blank.gif"})}})});$(".FAVCAT").cluetip({showTitle:false,local:true,cursor:"pointer",width:"150px"})}$("#openWarning").click(function(event){event.preventDefault();$("#curWarning").hide("slow");$("#revWarning").show("slow");$("#openWarning").hide("slow")});$("#closeWarning").click(function(event){event.preventDefault();$("#curWarning").show("slow");$("#revWarning").hide("slow");$("#openWarning").show("slow")});$("#warningSubmit").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_warning.php",data:"iProductUnq="+iP+"&sWarning="+encodeURIComponent($("#sWarning").val()),success:function(xml){$("response>sData>datanode",xml).each(function(){var $sValue=$("value",this).text();if($sValue=="1"){$("#curWarning").hide("slow");$("#revWarning").hide("slow");$("#openWarning").hide("slow");$("#WarningThx").show()}else{$("#warningError").html($sValue)}})},beforeSend:function(xml){$("#WStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#WStat").attr({src:"/images/blank.gif"})}})});$(".WARN").cluetip({showTitle:false,local:true,cursor:"pointer",width:"100px"});if(bIm==1){$("#showEdit").click(function(){$("#editItemDIV").toggle("slow")});$("#editItem").click(function(){var $sData="iProductUnq="+iP+"&dOP="+dP+"&dP="+$("#sYourPriceF").val()+"&iQ="+$("#iQuantityF").val()+"&sPID="+encodeURIComponent($("#sPersonalIDF").val())+"&iGS="+$("#iGStoreUnqF").val()+"&sUS="+encodeURIComponent($("#sUserStoreF").val())+"&iT="+$("#iTypeF").val()+"&iR="+$("#iRatingF").val()+"&sN="+encodeURIComponent($("#sNoteF").val())+"&iBS="+$("#iBookStatusF").val()+"&iSS="+$("#iSaleStatusF").val()+"&iOS="+$("#iOwnershipStatusF").val()+"&iMUS="+$("#iMusicStatusF").val()+"&iMOS="+$("#iMovieStatusF").val()+"&iWS="+$("#iWineStatusF").val()+"&iSoftS="+$("#iSoftwareStatusF").val();$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/edititem.php",data:$sData,success:function(xml){$("response>sData>datanode",xml).each(function(){$("#UserStoreDiv").html($("value",this).text());$("#sGenreStringDiv").html($("value2",this).text());if($("value3",this).text()!=""){$("#yourRating2").html($("value3",this).text());$("#OverallRating").html($("value4",this).text())}});if(iGP==C_BOOK){switch($("#iBookStatusF").val()){case"0":$("#iBookStatusDiv").html("You have read this book.");break;case"1":$("#iBookStatusDiv").html("You are reading this book now.");break;case"2":$("#iBookStatusDiv").html("You have not read this yet.");break}}if(iGP==C_MUSIC){switch($("#iMusicStatusF").val()){case"0":$("#iMusicStatusDiv").html("You have heard this before.");break;case"1":$("#iMusicStatusDiv").html("You have not heard this yet.");break;case"2":$("#iMusicStatusDiv").html("This is in your playlist.");break}}if(iGP==C_MOVIE){switch($("#iMovieStatusF").val()){case"0":$("#iMovieStatusDiv").html("You have seen this movie.");break;case"1":$("#iMovieStatusDiv").html("You have not seen this movie.");break}}if(iGP==C_WINE){switch($("#iWineStatusF").val()){case"0":$("#iWineStatusDiv").html("You have not tasted this.");break;case"1":$("#iWineStatusDiv").html("You have tasted this.");break}}if(iGP==C_SOFTWARE){switch($("#iSoftwareStatusF").val()){case"0":$("#iSoftwareStatusDiv").html("You have played/used this.");break;case"1":$("#iSoftwareStatusDiv").html("You have not played/used this.");break;case"2":$("#iSoftwareStatusDiv").html("You have beat/learned this.");break;case"3":$("#iSoftwareStatusDiv").html("You have mastered this.");break}}switch($("#iSaleStatusF").val()){case"0":$("#iSaleStatusDiv").html("");break;case"1":$("#iSaleStatusDiv").html("This item is for sale.");break;case"2":$("#iSaleStatusDiv").html("This item is flagged to be donated.");break;case"3":$("#iSaleStatusDiv").html("This item has been sold.");break}switch($("#iOwnershipStatusF").val()){case"0":$("#iOwnershipStatusDiv").html("");break;case"1":$("#iOwnershipStatusDiv").html("You used to own this item.");break;case"2":$("#iOwnershipStatusDiv").html("You do not own this item.");break;case"3":$("#iOwnershipStatusDiv").html("You want to get this item.");break}},beforeSend:function(xml){$("#editItem").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Saving...")},complete:function(xml){$("#editItem").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Saved");$("#editItemDIV").hide("slow",changeSB);$sVal=$("#sNoteF").val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />").replace(/\n\n+/g,"<br /><br />");$("#sNoteDiv").html($sVal);$("#sYourPriceDiv").html("$"+$("#sYourPriceF").val());$("#iQuantityDiv").text($("#iQuantityF").val());$sVal=$("#sPersonalIDF").val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />").replace(/\n\n+/g,"<br /><br />");$("#sPersonalIDDiv").html($sVal)}})});function changeSB(){$("#editItem").html("<img src='/images/blank.gif' border=0 align=absmiddle style='padding-right:10px;'><img src='/images/buttonSMSave.png'>")}$("#sYourPriceF").maskMoney();$("#iQuantityF").numeric();wordCount(document.editForm.sNote,document.editForm.bodywords,1000)}jQuery.fn.openGL=function(iProductUnq){$("#modalGIFT"+iProductUnq).unbind();$("#modalGIFT"+iProductUnq).attr({rel:"/userarea/lists/giftlistmodal.php?iProductUnq="+iProductUnq+"&iVAU="+iVAU});$("#modalGIFT"+iProductUnq).bgiframe().cluetip({activation:"focus",showTitle:false,cursor:"pointer",width:"300px",arrows:false,closePosition:"top",leftOffset:-50,topOffset:-50,sticky:true,ajaxCache:false,positionBy:"auto",closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".saveandcloseGL").click(function(){$("#cluetip-close").click()});$(".glAddAUnqW").click(function(){$iProductUnq=$("#iProductUnq").val();$iAccountUnq=$(this).attr("iAccountUnq");$objInput=$(this).children(".glAddAUnq");if($objInput.attr("src").indexOf("/images/checkOn.png")>-1){$objInput.attr({src:"/images/checkOff.png"})}else{$objInput.attr({src:"/images/checkOn.png"})}$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/gift_addto.php",data:"iAccountUnq="+$iAccountUnq+"&iProductUnq="+$iProductUnq,beforeSend:function(xml){$("#GLStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#GLStat").attr({src:"/images/blank.gif"})}})})}});if($.browser.msie){var modalGIFT=document.getElementById("modalGIFT"+iProductUnq);modalGIFT.focus()}else{$("#modalGIFT"+iProductUnq).focus()}};jQuery.fn.openCL=function(iProductUnq){$("#modalCUSTOM"+iProductUnq).unbind();$("#modalCUSTOM"+iProductUnq).attr({rel:"/userarea/lists/customlistmodal.php?iProductUnq="+iProductUnq+"&iVAU="+iVAU});$("#modalCUSTOM"+iProductUnq).bgiframe().cluetip({activation:"focus",showTitle:false,cursor:"pointer",width:"300px",arrows:false,closePosition:"top",leftOffset:-50,topOffset:-50,sticky:true,ajaxCache:false,positionBy:"auto",closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".saveandcloseCL").click(function(){$("#cluetip-close").click()});$(".clAddAUnqW").click(function(){$iProductUnq=$("#iProductUnq").val();$iSubCollectionUnq=$(this).attr("iSubCollectionUnq");$objInput=$(this).children(".clAddAUnq");if($objInput.attr("src").indexOf("/images/checkOn.png")>-1){$objInput.attr({src:"/images/checkOff.png"})}else{$objInput.attr({src:"/images/checkOn.png"})}$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/customlist_addto.php",data:"iSubCollectionUnq="+$iSubCollectionUnq+"&iProductUnq="+$iProductUnq,beforeSend:function(xml){$("#CLStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#CLStat").attr({src:"/images/blank.gif"})}})})}});if($.browser.msie){var modalCUSTOM=document.getElementById("modalCUSTOM"+iProductUnq);modalCUSTOM.focus()}else{$("#modalCUSTOM"+iProductUnq).focus()}};$("#showBorrow").click(function(){$("#borrowRequestDIV").toggle("slow")});$("#borrowRequest").click(function(){var $sData="iVAU="+iVAU+"&iProductUnq="+iP+"&sM="+encodeURIComponent($("#sBMessageF").val());$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/borrowrequest.php",data:$sData,success:function(xml){$("response>sData>datanode",xml).each(function(){})},beforeSend:function(xml){$("#borrowRequest").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Sending...")},complete:function(xml){$("#borrowLink").html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Request sent!");$("#borrowRequestDIV").hide("slow");$("#showBorrow").hide("slow")}})});$(".OUTLOANLAUIcon").cluetip({showTitle:false,local:true,cursor:"pointer",width:"250px",clickThrough:true});jQuery.fn.openInitiateLOAN=function(){$("#initiateLOAN").unbind();$("#initiateLOAN").attr({rel:"/userarea/lists/borrowed/initiateloan.php?iProductUnq="+iP});$("#initiateLOAN").bgiframe().cluetip({activation:"focus",showTitle:false,cursor:"pointer",width:"350px",arrows:false,closePosition:"top",leftOffset:-50,topOffset:-50,sticky:true,ajaxCache:false,positionBy:"auto",closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$iAccountUnq=0;$(".closeIL").click(function(){$("#cluetip-close").click()});$(".ilClickFriend").click(function(){if($iAccountUnq>0){$("#ilClickFriend"+$iAccountUnq).children(".ilFriend").attr({src:"/images/checkOff.png"})}$iAccountUnq=$(this).attr("iAccountUnq");$(this).children(".ilFriend").attr({src:"/images/checkOn.png"});$("#sNonMemberF").val("")});$("#sNonMemberF").keydown(function(e){$("#ilClickFriend"+$iAccountUnq).children(".ilFriend").attr({src:"/images/checkOff.png"});$iAccountUnq=0});$(".sendandcloseIL").click(function(){$sNonMember=$("#sNonMemberF").val();$sStipulations=$("#sStipulationsF").val();$sDDDay=$("#sDDDay").val();$sDDMonth=$("#sDDMonth").val();$sDDYear=$("#sDDYear").val();$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/borrowed/initiateloan.php",data:"iProductUnq="+iP+"&iAccountUnq="+$iAccountUnq+"&sDDDay="+$sDDDay+"&sDDMonth="+$sDDMonth+"&sDDYear="+$sDDYear+"&sStipulations="+encodeURIComponent($sStipulations)+"&sNonMember="+encodeURIComponent($sNonMember),success:function(xml){$("response>sData>datanode",xml).each(function(){$("#initiateLOAN3").hide();$("#initiateLOAN2").show()});$("#cluetip-close").click()},beforeSend:function(xml){$("#LStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#LStat").attr({src:"/images/blank.gif"})}});$("#cluetip-close").click()})}});if($.browser.msie){var initiateLOAN=document.getElementById("initiateLOAN");initiateLOAN.focus()}else{$("#initiateLOAN").focus()}};$("#MakePrivate_"+iP).click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_makeprivate.php",data:"iProductUnq="+iP,success:function(xml){$("#MakePrivate_"+iP).hide();$("#MakePrivate_"+iP+"b, #showReviewForm2").show();$("#showReviewForm").hide()}})});$("#MakePublic_"+iP).click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_makepublic.php",data:"iProductUnq="+iP,success:function(xml){$("#MakePublic_"+iP+", #showReviewForm2").hide();$("#MakePublic_"+iP+"b").show();$("#showReviewForm").show()}})});$(".nonmmbr").cluetip({showTitle:false,local:true,cursor:"pointer",width:"250px",clickThrough:true});$("#RateDD").change(function(){$iRating=$(this).val();$iProductUnq=$(this).attr("iProductUnq");$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/rate.php",data:"iProductUnq="+iP+"&iRating="+$iRating+"&iCS=0",success:function(xml){$("response>sData>datanode",xml).each(function(){$("#RDropDown_"+iP).html($("value",this).text());$("#OverallRating").html($("value2",this).text())})},beforeSend:function(xml){$("#rateStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#rateStat").attr({src:"/images/blank.gif"})}})});jQuery.fn.openTrustedRated=function(){$("#trustedRated").unbind();$("#trustedRated").attr({rel:"/userarea/lists/products/trustedratingmodal.php?iProductUnq="+iP});$("#trustedRated").cluetip({activation:"focus",showTitle:false,cursor:"pointer",width:"300px",arrows:false,leftOffset:-50,topOffset:-50,closePosition:"top",sticky:true,ajaxCache:false,closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".closeTR").click(function(){$("#cluetip-close").click()})}});if($.browser.msie){var objTR=document.getElementById("trustedRated");objTR.focus()}else{$("#trustedRated").focus()}};jQuery.fn.nextPGTR=function(iDirection){$iPNTR=eval($("#iPNTR").val())+iDirection;$iMaxPageTR=$("#iMaxPageTR").val();$iTNITR=$("#iTNITR").val();$.ajax({type:"POST",dataType:"html",url:"/ap/userarea/lists/products/trustedratingmodal.php",data:"iProductUnq="+iP+"&iPNTR="+$iPNTR+"&iTNITR="+$iTNITR,success:function(sHTML){$("#modalTRBody").html(sHTML);$("#iPNTR").val($iPNTR);if($iMaxPageTR>=$iPNTR){$("#modalTRpage").html("<span class='bodyCopyBold'>"+$iPNTR+"</span>")}if($iMaxPageTR>$iPNTR){$("#modalTRNextOn").show();$("#modalTRNextOff").hide()}else{$("#modalTRNextOn").hide();$("#modalTRNextOff").show()}if($iPNTR>1){$("#modalTRBackOn").show();$("#modalTRBackOff").hide()}else{$("#modalTRBackOn").hide();$("#modalTRBackOff").show()}},beforeSend:function(xml){$("#TRStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#TRStat").attr({src:"/images/blank.gif"});$(".closeTR").click(function(){$("#cluetip-close").click()})}})};jQuery.fn.openFriendsRated=function(){$("#friendsRated").unbind();$("#friendsRated").attr({rel:"/userarea/lists/products/friendsratingmodal.php?iProductUnq="+iP});$("#friendsRated").cluetip({activation:"focus",showTitle:false,cursor:"pointer",width:"300px",arrows:false,leftOffset:-50,topOffset:-50,closePosition:"top",sticky:true,ajaxCache:false,closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".closeF").click(function(){$("#cluetip-close").click()})}});if($.browser.msie){var objF=document.getElementById("friendsRated");objF.focus()}else{$("#friendsRated").focus()}};jQuery.fn.nextPGF=function(iDirection){$iPNF=eval($("#iPNF").val())+iDirection;$iMaxPageF=$("#iMaxPageF").val();$iTNIF=$("#iTNIF").val();$.ajax({type:"POST",dataType:"html",url:"/ap/userarea/lists/products/friendsratingmodal.php",data:"iProductUnq="+iP+"&iPNF="+$iPNF+"&iTNIF="+$iTNIF,success:function(sHTML){$("#modalFBody").html(sHTML);$("#iPNF").val($iPNF);if($iMaxPageF>=$iPNF){$("#modalFpage").html("<span class='bodyCopyBold'>"+$iPNF+"</span>")}if($iMaxPageF>$iPNF){$("#modalFNextOn").show();$("#modalFNextOff").hide()}else{$("#modalFNextOn").hide();$("#modalFNextOff").show()}if($iPNF>1){$("#modalFBackOn").show();$("#modalFBackOff").hide()}else{$("#modalFBackOn").hide();$("#modalFBackOff").show()}},beforeSend:function(xml){$("#FStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#FStat").attr({src:"/images/blank.gif"});$(".closeF").click(function(){$("#cluetip-close").click()})}})};$("#showUploadImage").click(function(){$("#uploadImageDIV").toggle("slow")});$("#DelImage").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/modaledit_upload.php",data:"iProductUnq="+iP+"&iUPS="+iRand+"&bDel=T",complete:function(xml){$("#detailImage").attr({src:"/images/blank.gif"});$("#DelImage").hide();$("#DelImageb").show()}})});$(".jqUploader").jqUploader({params:{menu:false},hideSubmit:false,width:400,height:70});$("#showSendMsg").click(function(){$("#SendMsgDIV").toggle("slow")});$("#SendMsg").click(function(){var result="";$(".iQuery:checked").each(function(){result=result+$(this).val()+","});var $sData="iVAU="+iVAU+"&iProductUnq="+iP+"&sM="+encodeURIComponent($("#sSMMessageF").val())+"&iQuery="+result;$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/sendmessage.php",data:$sData,success:function(xml){$("response>sData>datanode",xml).each(function(){})},beforeSend:function(xml){$("#SendMsg").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Sending...")},complete:function(xml){$("#SendMsg").html("");$("#SendMsgDIV").hide("slow");$("#showSendMsg").hide("slow");$("#SendMsgDIV2").show().html("<img src='/images/tick.gif' border=0 align=absmiddle style='padding-right:10px;'>Message Sent!")}})});$("#openComments").click(function(event){$("#revComments").toggle("slow");$("#revEComments").hide("slow")});$("#commentSubmit").click(function(){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_postcomment.php",data:"iVAU="+iVAU+"&iProductUnq="+iP+"&iReviewsUnq="+iRUnq+"&sComment="+encodeURIComponent($("#sComment").val()),success:function(xml){$("response>sData>datanode",xml).each(function(){var $sValue=$("value",this).text();if($sValue=="1"){$("#newComment").fadeIn("slow").html("<table cellpadding=1 cellspacing=0 border=0 width=90%><tr><td><a href='/publicfriendpage.php?iVAU="+iLAU+"'>"+sUN+"</a><br>"+sDate+"<br>"+$("#sComment").val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />").replace(/\n\n+/g,"<br /><br />")+"</td></tr></table>");$("#revComments").hide("slow");$("#openComments").hide("slow")}else{$("#commentError").html($sValue)}})},beforeSend:function(xml){$("#itemRevComStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#itemRevComStat").attr({src:"/images/blank.gif"})}})});$(".EDITComment").click(function(event){$iAccountUnq=$(this).attr("iAccountUnq");$iReviewsUnq=$(this).attr("iReviewsUnq");$("#revComments, #openComments").hide("slow");$("#revEComments").toggle("slow");$("#iEReviewsUnq").val($iReviewsUnq);$("#iEAccountUnq").val($iAccountUnq);if($.browser.msie){$("#sEComment").val($("#RCbody"+$iAccountUnq+"_"+$iReviewsUnq).html().replace(/<BR>/g,"\n").replace(/<br>/g,"\n"))}else{$("#sEComment").val($("#RCbody"+$iAccountUnq+"_"+$iReviewsUnq).text())}});$("#commentESubmit").click(function(){$iAccountUnq=$("#iEAccountUnq").val();$iReviewsUnq=$("#iEReviewsUnq").val();$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_editcomment.php",data:"iVAU="+iVAU+"&iProductUnq="+iP+"&iReviewsUnq="+$iReviewsUnq+"&iAccountUnq="+$iAccountUnq+"&sComment="+encodeURIComponent($("#sEComment").val()),success:function(xml){$("response>sData>datanode",xml).each(function(){var $sValue=$("value",this).text();if($sValue=="1"){$("#RCbody"+$iAccountUnq+"_"+$iReviewsUnq).fadeIn("slow").html($("#sEComment").val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />").replace(/\n\n+/g,"<br /><br />"));$("#RCdate"+$iAccountUnq+"_"+$iReviewsUnq).fadeIn("slow").html(sDate);$("#revEComments").hide("slow")}else{$("#commentError").html($sValue)}})},beforeSend:function(xml){$("#itemRevComStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#itemRevComStat").attr({src:"/images/blank.gif"})}})});$(".DELComment").click(function(){$iAccountUnq=$(this).attr("iAccountUnq");$iReviewsUnq=$(this).attr("iReviewsUnq");$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/products/productdetail_delcomment.php",data:"iVAU="+iVAU+"&iProductUnq="+iP+"&iReviewsUnq="+$iReviewsUnq+"&iAccountUnq="+$iAccountUnq,success:function(xml){$("response>sData>datanode",xml).each(function(){var $sValue=$("value",this).text();if($sValue=="1"){$("#RC"+$iAccountUnq+"_"+$iReviewsUnq).html("[comment deleted]");$("#revComments").hide("slow");$("#openComments").hide("slow")}else{$("#commentError").html($sValue)}})},beforeSend:function(xml){$("#itemRevComStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#itemRevComStat").attr({src:"/images/blank.gif"})}})}).confirm({dialogShow:"fadeIn",dialogSpeed:"slow",msg:"Are you sure? ",buttons:{cancel:"[No]",ok:"[Yes]",separator:" | "}});if(bIm==1){$("#showReviewForm").click(function(){$("#reviewAddEdit").toggle("slow");if(iRUnq==0){$("#ratingArea").toggle("slow")}});$("#editReview").click(function(){var $sData="iProductUnq="+iP+"&sReview="+encodeURIComponent($("#sReviewF").val());$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/addeditreview.php",data:$sData,success:function(xml){},beforeSend:function(xml){$("#editReview").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Saving...")},complete:function(xml){$("#editReview").html("Saved");$("#reviewAddEdit").toggle("slow");if(iRUnq==0){$("#ratingArea").toggle("slow");$("#showReviewForm").html("Review saved")}else{$("#reviewContent").html($("#sReviewF").val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />").replace(/\n\n+/g,"<br /><br />"))}changeRSB();$("#deleteReview").html("<img src='/images/blank.gif' border=0 align=absmiddle style='padding-right:10px;'><img src='/images/buttonSMDelete.png'>")}})});if(iRUnq>0){$("#deleteReview").click(function(){var $sData="iProductUnq="+iP+"&sReview=";$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/addeditreview.php",data:$sData,success:function(xml){},beforeSend:function(xml){$("#deleteReview").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Deleting...")},complete:function(xml){$("#reviewsDisplay").toggle("slow")}})})}function changeRSB(){$("#editReview").html("<img src='/images/buttonSMSave.png'><img src='/images/blank.gif' border=0 align=absmiddle style='padding-left:10px;'>")}wordCount(document.reviewForm.sReview,document.reviewForm.bodywordsR,5000)}$("#modalFBShare").click(function(){jQuery.noticeAdd({iP:iP,stay:true})})});