Ext.onReady(function(){
Ext.namespace("SwitchGames","SwitchGames.GamerPage");
SwitchGames.GamerPage.getBuddyLink=function(_1,_2){
if(_2==undefined||_2==null||_2==0){
return ("");
}
if(_1==null||_1=="null"||_1==0){
return (" name=\"messages-addtobuddylist\" ");
}else{
return (" name=\"messages-removefrombuddylist\" ");
}
};
SwitchGames.GamerPage.getBuddyTooltip=function(_3,_4,_5){
if(_5==undefined||_5==null||_5==0){
return ("");
}
if(_3==null||_3=="null"||_3==0){
return ("ext:qtip=\"Add <b>"+decodeURIComponent(_4)+"</b> to your buddy list\" ext:qwidth=\"150\" ");
}else{
return ("ext:qtip=\"Remove <b>"+decodeURIComponent(_4)+"</b> from your buddy list\" ext:qwidth=\"150\" ");
}
};
SwitchGames.GamerPage.getBuddyIcon=function(_6,_7){
if(_7==undefined||_7==null||_7==0){
return (" src=\""+Ext.BLANK_IMAGE_URL+"\" ");
}
if(_6==null||_6=="null"||_6==0){
return (" src=\""+SwitchGames.imageUrl+"common/buttons/add-to-buddy-list-large.png\" ");
}else{
return (" src=\""+SwitchGames.imageUrl+"common/buttons/remove-from-buddy-list-small.png\" ");
}
};
SwitchGames.GamerPage.getMessageUserIcon=function(_8,_9){
if(_9==undefined||_9==null||_9==0){
return (" src=\""+Ext.BLANK_IMAGE_URL+"\" ");
}
return (" src=\""+SwitchGames.imageUrl+"common/buttons/message-user-large.png\" ");
};
SwitchGames.GamerPage.getMessageUserTooltip=function(_a,_b,_c){
if(_c==undefined||_c==null||_c==0){
return ("");
}
return ("ext:qtip=\"Send <b>"+decodeURIComponent(_b)+"</b> a message\" ext:qwidth=\"150\" ");
};
SwitchGames.GamerPage.getRatingClass=function(_d){
if(_d==1){
return ("com-gamer-rating-positive");
}else{
return ("com-gamer-rating-negative");
}
};
SwitchGames.GamerPage.getRatingString=function(_e){
if(_e==1){
return ("Positive");
}else{
return ("Negative");
}
};
SwitchGames.GamerPage.getScrollerItemDisplay=function(_f){
if(_f>1){
return (" style=\"display: none;\" ");
}else{
return ("");
}
};
SwitchGames.GamerPage.getBuyMarkup=function(_10,_11,_12){
var _13=["<span class=\"com-gamer-profile-game-btn-container\">","<img style=\"cursor: pointer;\" transaction-type=\"buy\" listing-id=\"",_12,"\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/game-btn-buy.gif\" width=\"50\" height=\"26\" alt=\"button buy\"/><br/>$"+_11,"</span>"];
if(_10==true||_10==1){
//return (_13.join(""));
return "";
}else{
return ("");
}
};
SwitchGames.GamerPage.getSafeBuyMarkup=function(_14,_15,_16){
var _17=["<span class=\"com-gamer-profile-game-btn-container safeBuyBtn\">","<img style=\"cursor: pointer;\" transaction-type=\"safebuy\" listing-id=\"",_16,"\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/game-btn-safeBuy.gif\" width=\"89\" height=\"26\" alt=\"button safe buy\"/><br/>$"+_15,"</span>"];
if(_14==true||_14==1){
return (_17.join(""));
}else{
return ("");
}
};
SwitchGames.GamerPage.getTradeMarkup=function(_18,_19){
var _1a=["<span class=\"com-gamer-profile-game-btn-container\">","<img style=\"cursor: pointer;\" transaction-type=\"trade\" listing-id=\"",_19,"\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/game-btn-trade.gif\" width=\"89\" height=\"26\" alt=\"button buy\"/><br/>Free","</span>"];
if(_18==true||_18==1){
return (_1a.join(""));
}else{
return ("");
}
};
SwitchGames.GamerPage.getSafeTradeMarkup=function(_1b,_1c){
var _1d=["<span class=\"com-gamer-profile-game-btn-container safeTradeBtn\">","<img style=\"cursor: pointer;\" transaction-type=\"safetrade\" listing-id=\"",_1c,"\" ext:qwidth=\"200\" ext:qheight=\"150\" style=\"padding-right: 6px;\" src=\""+SwitchGames.imageUrl+"common/buttons/transactions-safetrade.png\"","ext:qtip=\"SafeTrade guarantees full coverage in the event your game is lost or stolen in a trade.  $5.95 fee (only paid if your offer is accepted) includes a pre-paid USPS shipping label with free online package tracking.\"",">","<br />","<b>$5.95</b>","</span>"];
if(_1b==true||_1b==1){
return (_1d.join(""));
}else{
return ("");
}
};
SwitchGames.GamerPage.getImageOnload=function(_1e){
if(_1e==1){
return (" onload=\"SwitchGames.Utility.scaleAndCenterImageInParent(this);\" ");
}else{
return ("");
}
};
SwitchGames.GamerPage.emptyTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<div class=\"com-gamer-profile-game-name\" style=\"text-align: center; margin-top: 117px;\">No Items Found</div>","</div>");
SwitchGames.GamerPage.emptyGameTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<div name=\"mystuff-filters\" style=\"margin: 10px 0 30px 47px;\">","<div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Platform:</div>","<div style=\"float: left; padding-right: 10px;\" id=\"gp-platform-cb\"></div>","<div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Genre:</div>","<div style=\"float: left; padding-right: 20px;\" id=\"gp-genre-cb\"></div>","<div style=\"float: left;\"><input id=\"gp-for-trade-only\" name=\"gp-for-trade-only\" type=\"checkbox\"/> Only Items for Trade</div>","</div>","<div class=\"com-gamer-profile-game-name\" style=\"text-align: center; margin-top: 117px;\">No Items Found</div>","</div>");
SwitchGames.GamerPage.myStuffGameTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<div name=\"mystuff-filters\" style=\"margin-left: 47px; padding: 10px 0 20px 0;\">","<div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Platform:</div>","<div style=\"float: left; padding-right: 10px;\" id=\"gp-platform-cb\"></div>","<div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Genre:</div>","<div style=\"float: left; padding-right: 20px;\" id=\"gp-genre-cb\"></div>","<div style=\"float: left;\"><input id=\"gp-for-trade-only\" name=\"gp-for-trade-only\" type=\"checkbox\"/> Only Items for Trade</div>","</div>","<div name=\"element-counter\" class=\"com-gamer-profile-game-slider-counter\">1 of {[values.length]} games</div>","<div name=\"panel-scroller-root\" class=\"com-gamer-profile-game-slider-body\" style=\"position: relative; height: 225px;\">","<div class=\"com-gamer-profile-game-slider-body-left-col\" style=\"  \">","<img id=\"gamer-my-stuff-game-left-arrow\" name=\"panel-scroller-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-left.gif\" height=\"30\" width=\"31\" alt=\"button left\" style=\" \"/>","</div>","<div class=\"com-gamer-profile-game-slider-body-center-col\" style=\" \">","<div class=\"com-gamer-profile-game-slider-body\">","<div class=\"com-gamer-profile-game-roundbox-wrapper\">","<div class=\"com-gamer-profile-game-roundbox-top\"></div>","<div class=\"com-gamer-profile-game-roundbox-body\">","<div id=\"gamer-my-stuff-game-scroller-panel\" name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" style=\"height: 190px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div style=\"width: 100%; height: 190px;\">","<div style=\"width: 127px; height: 183px; float: left; overflow: hidden; margin-left: 15px;\">","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.game_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" scaled=\"0\" class=\"trade-offer-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{game_id}\" listingid=\"{listing_id}\" itemtype=\"game\" name=\"item-image\" {[SwitchGames.GamerPage.getImageOnload(xindex)]} src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" alt=\"game box\" />","</div>","<div class=\"com-gamer-profile-game-info-wrapper\" style=\"width: 600px; padding-top: 25px;\">","<div class=\"com-gamer-profile-game-name\">{game_name}</div>","<div class=\"com-gamer-profile-game-console\">{platform_name}</div>","<div class=\"com-gamer-profile-game-publish-info\">Released: {date_released}&nbsp;&nbsp;Publisher: {publisher}&nbsp;&nbsp;ESRB: {esrb}</div>","<div class=\"com-gamer-profile-game-purchase-options\">","{[SwitchGames.GamerPage.getBuyMarkup(values.for_sale, values.price, values.listing_id)]}","{[SwitchGames.GamerPage.getSafeBuyMarkup(values.safe_sale, values.price, values.listing_id)]}","{[SwitchGames.GamerPage.getTradeMarkup(values.for_trade, values.listing_id)]}","{[SwitchGames.GamerPage.getSafeTradeMarkup(values.safe_trade, values.listing_id)]}","</div>","</div>","</div>","</div>","</tpl>","</div>","</div>","<div class=\"com-gamer-profile-game-roundbox-bottom\"><div></div></div>","</div>","</div>","</div>","<div  class=\"com-gamer-profile-game-slider-body-right-col\" style=\" \">","<img id=\"gamer-my-stuff-game-right-arrow\" name=\"panel-scroller-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-right.gif\" height=\"30\" width=\"31\" alt=\"button left\"/>","</div>","</div>","</div>");
SwitchGames.GamerPage.myStuffConsoleTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<!-- start mystuff slider -->","<div name=\"element-counter\" class=\"com-gamer-profile-game-slider-counter\">1 of {[values.length]} games</div>","<div name=\"panel-scroller-root\" class=\"com-gamer-profile-game-slider-body\" style=\"position: relative; height: 225px;\">","<div class=\"com-gamer-profile-game-slider-body-left-col\" style=\"  \">","<img id=\"gamer-my-stuff-console-left-arrow\" name=\"panel-scroller-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-left.gif\" height=\"30\" width=\"31\" alt=\"button left\" style=\" \"/>","</div>","<div class=\"com-gamer-profile-game-slider-body-center-col\" style=\" \">","<div class=\"com-gamer-profile-game-slider-body\">","<div class=\"com-gamer-profile-game-roundbox-wrapper\">","<div class=\"com-gamer-profile-game-roundbox-top\"></div>","<div class=\"com-gamer-profile-game-roundbox-body\">","<div id=\"gamer-my-stuff-console-scroller-panel\" name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" style=\"height: 190px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div style=\"width: 100%; height: 190px;\">","<div style=\"width: 127px; height: 183px; float: left;margin-left:15px\">","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.platform_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" scaled=\"0\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{platform_id}\" itemtype=\"platform\" name=\"item-image\" {[SwitchGames.GamerPage.getImageOnload(xindex)]} src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" alt=\"game box\" />","</div>","<div class=\"com-gamer-profile-game-info-wrapper\" style=\"width: 600px; padding-top: 25px;\">","<div class=\"com-gamer-profile-game-name\">{platform_name}</div>","<div class=\"com-gamer-profile-game-console\">Manufacturer: {manufacturer}</div>","<div class=\"com-gamer-profile-game-publish-info\">Released: {date_released}</div>","<div class=\"com-gamer-profile-game-purchase-options\">","{[SwitchGames.GamerPage.getBuyMarkup(values.for_sale, values.price, values.listing_id)]}","{[SwitchGames.GamerPage.getSafeBuyMarkup(values.safe_sale, values.price, values.listing_id)]}","{[SwitchGames.GamerPage.getTradeMarkup(values.for_trade, values.listing_id)]}","{[SwitchGames.GamerPage.getSafeTradeMarkup(values.safe_trade, values.listing_id)]}","</div>","</div>","</div>","</div>","</tpl>","</div>","</div>","<div class=\"com-gamer-profile-game-roundbox-bottom\"><div></div></div>","</div>","</div>","</div>","<div  class=\"com-gamer-profile-game-slider-body-right-col\" style=\" \">","<img id=\"gamer-my-stuff-console-right-arrow\" name=\"panel-scroller-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-right.gif\" height=\"30\" width=\"31\" alt=\"button left\"/>","</div>","</div>","</div>");
SwitchGames.GamerPage.myStuffAccessoryTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<!-- start mystuff slider -->","<div name=\"element-counter\" class=\"com-gamer-profile-game-slider-counter\">1 of {[values.length]} games</div>","<div name=\"panel-scroller-root\" class=\"com-gamer-profile-game-slider-body\" style=\"position: relative; height: 225px;\">","<div class=\"com-gamer-profile-game-slider-body-left-col\" style=\"  \">","<img id=\"gamer-my-stuff-accessory-left-arrow\" name=\"panel-scroller-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-left.gif\" height=\"30\" width=\"31\" alt=\"button left\" style=\" \"/>","</div>","<div class=\"com-gamer-profile-game-slider-body-center-col\" style=\" \">","<div class=\"com-gamer-profile-game-slider-body\">","<div class=\"com-gamer-profile-game-roundbox-wrapper\">","<div class=\"com-gamer-profile-game-roundbox-top\"></div>","<div class=\"com-gamer-profile-game-roundbox-body\">","<div id=\"gamer-my-stuff-accessory-scroller-panel\" name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" style=\"height: 190px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div style=\"width: 100%; height: 190px;\">","<div style=\"width: 127px; height: 183px; float: left;margin-left:15px\">","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.accessory_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" scaled=\"0\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{accessory_id}\" itemtype=\"accessory\" name=\"item-image\" {[SwitchGames.GamerPage.getImageOnload(xindex)]} src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" alt=\"game box\" />","</div>","<div class=\"com-gamer-profile-game-info-wrapper\" style=\"width: 600px; padding-top: 25px;\">","<div class=\"com-gamer-profile-game-name\">{accessory_name}</div>","<div class=\"com-gamer-profile-game-console\">Manufacturer: {manufacturer}</div>","<div class=\"com-gamer-profile-game-console\">Platform: {platform_name}</div>","<div class=\"com-gamer-profile-game-publish-info\">Released: {date_released}</div>","<div class=\"com-gamer-profile-game-purchase-options\">","{[SwitchGames.GamerPage.getBuyMarkup(values.for_sale, values.price, values.listing_id)]}","{[SwitchGames.GamerPage.getSafeBuyMarkup(values.safe_sale, values.price, values.listing_id)]}","{[SwitchGames.GamerPage.getTradeMarkup(values.for_trade, values.listing_id)]}","{[SwitchGames.GamerPage.getSafeTradeMarkup(values.safe_trade, values.listing_id)]}","</div>","</div>","</div>","</div>","</tpl>","</div>","</div>","<div class=\"com-gamer-profile-game-roundbox-bottom\"><div></div></div>","</div>","</div>","</div>","<div  class=\"com-gamer-profile-game-slider-body-right-col\" style=\" \">","<img id=\"gamer-my-stuff-accessory-right-arrow\" name=\"panel-scroller-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-right.gif\" height=\"30\" width=\"31\" alt=\"button left\"/>","</div>","</div>","</div>");
SwitchGames.GamerPage.wishlistGameTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<div name=\"element-counter\" class=\"com-gamer-profile-game-slider-counter\">1 of {[values.length]} games</div>","<div name=\"panel-scroller-root\" class=\"com-gamer-profile-game-slider-body\" style=\"position: relative; height: 225px;\">","<div class=\"com-gamer-profile-game-slider-body-left-col\" style=\"  \">","<img id=\"gamer-wishlist-game-left-arrow\" name=\"panel-scroller-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-left.gif\" height=\"30\" width=\"31\" alt=\"button left\" style=\" \"/>","</div>","<div class=\"com-gamer-profile-game-slider-body-center-col\" style=\" \">","<div class=\"com-gamer-profile-game-slider-body\">","<div class=\"com-gamer-profile-game-roundbox-wrapper\">","<div class=\"com-gamer-profile-game-roundbox-top\"></div>","<div class=\"com-gamer-profile-game-roundbox-body\">","<div id=\"gamer-wishlist-game-scroller-panel\" name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" style=\"height: 190px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div style=\"width: 100%; height: 190px;\">","<div style=\"width: 127px; height: 183px; float: left;margin-left:15px\">","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.game_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" scaled=\"0\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{game_id}\" itemtype=\"game\" name=\"item-image\" {[SwitchGames.GamerPage.getImageOnload(xindex)]} src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" alt=\"game box\" />","</div>","<div class=\"com-gamer-profile-game-info-wrapper\" style=\"width: 600px; padding-top: 25px;\">","<div class=\"com-gamer-profile-game-name\">{game_name}</div>","<div class=\"com-gamer-profile-game-console\">{platform_name}</div>","<div class=\"com-gamer-profile-game-publish-info\">Released: {date_released}&nbsp;&nbsp;Publisher: {publisher}&nbsp;&nbsp;ESRB: {esrb}</div>","</div>","</div>","</div>","</tpl>","</div>","</div>","<div class=\"com-gamer-profile-game-roundbox-bottom\"><div></div></div>","</div>","</div>","</div>","<div  class=\"com-gamer-profile-game-slider-body-right-col\" style=\" \">","<img id=\"gamer-wishlist-game-right-arrow\" name=\"panel-scroller-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-right.gif\" height=\"30\" width=\"31\" alt=\"button left\"/>","</div>","</div>","</div>");
SwitchGames.GamerPage.wishlistConsoleTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<!-- start mystuff slider -->","<div name=\"element-counter\" class=\"com-gamer-profile-game-slider-counter\">1 of {[values.length]} games</div>","<div name=\"panel-scroller-root\" class=\"com-gamer-profile-game-slider-body\" style=\"position: relative; height: 225px;\">","<div class=\"com-gamer-profile-game-slider-body-left-col\" style=\"  \">","<img id=\"gamer-wishlist-console-left-arrow\" name=\"panel-scroller-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-left.gif\" height=\"30\" width=\"31\" alt=\"button left\" style=\" \"/>","</div>","<div class=\"com-gamer-profile-game-slider-body-center-col\" style=\" \">","<div class=\"com-gamer-profile-game-slider-body\">","<div class=\"com-gamer-profile-game-roundbox-wrapper\">","<div class=\"com-gamer-profile-game-roundbox-top\"></div>","<div class=\"com-gamer-profile-game-roundbox-body\">","<div id=\"gamer-wishlist-console-scroller-panel\" name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" style=\"height: 190px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div style=\"width: 100%; height: 190px;\">","<div style=\"width: 127px; height: 183px; float: left;margin-left:15px\">","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.platform_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" scaled=\"0\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{platform_id}\" itemtype=\"platform\" name=\"item-image\" {[SwitchGames.GamerPage.getImageOnload(xindex)]} src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" alt=\"game box\" />","</div>","<div class=\"com-gamer-profile-game-info-wrapper\" style=\"width: 600px; padding-top: 25px;\">","<div class=\"com-gamer-profile-game-name\">{platform_name}</div>","<div class=\"com-gamer-profile-game-console\">Manufacturer: {manufacturer}</div>","<div class=\"com-gamer-profile-game-publish-info\">Released: {date_released}</div>","</div>","</div>","</div>","</tpl>","</div>","</div>","<div class=\"com-gamer-profile-game-roundbox-bottom\"><div></div></div>","</div>","</div>","</div>","<div  class=\"com-gamer-profile-game-slider-body-right-col\" style=\" \">","<img id=\"gamer-wishlist-console-right-arrow\" name=\"panel-scroller-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-right.gif\" height=\"30\" width=\"31\" alt=\"button left\"/>","</div>","</div>","</div>");
SwitchGames.GamerPage.wishlistAccessoryTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-my-stuff-body\">","<!-- start mystuff slider -->","<div name=\"element-counter\" class=\"com-gamer-profile-game-slider-counter\">1 of {[values.length]} games</div>","<div name=\"panel-scroller-root\" class=\"com-gamer-profile-game-slider-body\" style=\"position: relative; height: 225px;\">","<div class=\"com-gamer-profile-game-slider-body-left-col\" style=\"  \">","<img id=\"gamer-wishlist-accessory-left-arrow\" name=\"panel-scroller-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-left.gif\" height=\"30\" width=\"31\" alt=\"button left\" style=\" \"/>","</div>","<div class=\"com-gamer-profile-game-slider-body-center-col\" style=\" \">","<div class=\"com-gamer-profile-game-slider-body\">","<div class=\"com-gamer-profile-game-roundbox-wrapper\">","<div class=\"com-gamer-profile-game-roundbox-top\"></div>","<div class=\"com-gamer-profile-game-roundbox-body\">","<div id=\"gamer-wishlist-accessory-scroller-panel\" name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" style=\"height: 190px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div style=\"width: 100%; height: 190px;\">","<div style=\"width: 127px; height: 183px; float: left;margin-left:15px;\">","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.accessory_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" scaled=\"0\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{accessory_id}\" itemtype=\"accessory\" name=\"item-image\" {[SwitchGames.GamerPage.getImageOnload(xindex)]} src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" alt=\"game box\" />","</div>","<div class=\"com-gamer-profile-game-info-wrapper\" style=\"width: 600px; padding-top: 25px;\">","<div class=\"com-gamer-profile-game-name\">{accessory_name}</div>","<div class=\"com-gamer-profile-game-console\">Manufacturer: {manufacturer}</div>","<div class=\"com-gamer-profile-game-console\">Platform: {platform_name}</div>","<div class=\"com-gamer-profile-game-publish-info\">Released: {date_released}</div>","</div>","</div>","</div>","</tpl>","</div>","</div>","<div class=\"com-gamer-profile-game-roundbox-bottom\"><div></div></div>","</div>","</div>","</div>","<div  class=\"com-gamer-profile-game-slider-body-right-col\" style=\" \">","<img id=\"gamer-wishlist-accessory-right-arrow\" name=\"panel-scroller-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/arrow-medium-right.gif\" height=\"30\" width=\"31\" alt=\"button left\"/>","</div>","</div>","</div>");
SwitchGames.GamerPage.emptyRatingsTpl=new Ext.XTemplate("<div style=\"width: 100%; text-align: center; margin-top: 20px; height: 42px;\">","<div class=\"com-gamer-profile-game-name\" style=\"font-size: 14px; text-transform: none;\">No Ratings Found</div>","</div>");
SwitchGames.GamerPage.ratingsTpl=new Ext.XTemplate("<div name=\"panel-scroller-root\" class=\"com-gamer-profile-hdr-scrolling-item-wrapper\">","<div class=\"com-gamer-profile-hdr-scrolling-items-left-col\">","<img name=\"panel-scroller-left-arrow\" id=\"ratings-left-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/btn-arrow-left.gif\" height=\"21\" width=\"21\" alt=\"Scroll Left\" class=\"com-gamer-profile-hdr-scrolling-left-arrow\"/>","</div>","<div name=\"panel-scroller-content-root\" totalpanels=\"{[values.length]}\" currentpanel=\"0\" id=\"ratings-panel\" class=\"com-gamer-profile-hdr-scrolling-items-center-col\" style=\"width:250px;\">","<tpl for=\".\">","<div name=\"panel-scroller-content\" {[SwitchGames.GamerPage.getScrollerItemDisplay(xindex)]}>","<div class=\"com-gamer-profile-hdr-scrolling-items-center-col-inner\">","<span class=\"com-gamer-rating-date\">{[SwitchGames.Utility.createVisibleDate(values.date_rated)]} - {screen_name} - </span>&nbsp;<span class=\"{[SwitchGames.GamerPage.getRatingClass(values.rating)]}\">{[SwitchGames.GamerPage.getRatingString(values.rating)]}</span><br/>","{[SwitchGames.Utility.createStringValue(values.comment, \"No comment provided by \" + values.screen_name)]}","</div>","</div>","</tpl>","</div>","<div class=\"com-gamer-profile-hdr-scrolling-items-right-col\">","<img name=\"panel-scroller-right-arrow\" id=\"ratings-right-arrow\" src=\""+SwitchGames.imageUrl+"community_gamer_profile/btn-arrow-right.gif\" height=\"21\" width=\"21\" alt=\"Scroll Right\" class=\"com-gamer-profile-hdr-scrolling-right-arrow\"/>","</div>","</div>");
SwitchGames.GamerPage.mainTpl=new Ext.XTemplate("<div class=\"com-gamer-profile-round-box-wrapper\">","<div class=\"com-gamer-profile-round-box-header\">","<div class=\"com-gamer-profile-round-box-header-inner\">","<span class=\"com-gamer-profile-header-screen-name\">{screen_name}</span>","<span class=\"com-gamer-profile-header-action-items\">","<img {[SwitchGames.GamerPage.getBuddyTooltip(values.isBuddy, values.screen_name, values.your_member_id)]} {[SwitchGames.GamerPage.getBuddyLink(values.isBuddy, values.your_member_id)]} style=\"cursor: pointer;\" screen-name=\"{screen_name}\" member-id=\"{member_id}\" {[SwitchGames.GamerPage.getBuddyIcon(values.isBuddy, values.your_member_id)]} width=\"25\" height=\"25\" />","<img {[SwitchGames.GamerPage.getMessageUserTooltip(values.isBuddy, values.screen_name, values.your_member_id)]} style=\"cursor: pointer;\" screen-name=\"{screen_name}\" member-id=\"{member_id}\" name=\"messageuser\" {[SwitchGames.GamerPage.getMessageUserIcon(values.isBuddy, values.your_member_id)]} width=\"31\" height=\"25\" />","</span>","<span class=\"com-gamer-profile-header-pos-ratings\">+ Ratings:<span>{ratings_positive}</span></span>","<span class=\"com-gamer-profile-header-neg-ratings\">- Ratings:<span>{ratings_negative}</span></span>","<span class=\"com-gamer-profile-header-member-since\">Member Since:<span>{[SwitchGames.Utility.createVisibleDate(values.date_signup)]}</span></span>","<span class=\"com-gamer-profile-header-last-login\">Last On:<span>{[SwitchGames.Utility.createVisibleDate(values.date_last_login)]}</span></span>","<span class=\"com-gamer-profile-header-state\">State:<span>{member_state}</span></span>","</div>","</div>","<div class=\"com-gamer-profile-round-box-body\">","<div class=\"com-gamer-profile-round-box-body-inner\" style=\"\">","<div class=\"com-gamer-profile-details-wrapper\">","<div style=\"float: left; width: 110px; height: 110px;\">","<img id=\"gamer-page-avatar\" src=\"{[SwitchGames.Utility.getAvatarValue(values.avatar)]}\" width=\"109\" height=\"109\" class=\"com-gamer-profile-avatar\"/>","</div>","<div class=\"sg-live-transactions-round-box-wrapper\" style=\"width:300px;float:left;margin-left:20px;\">","<div class=\"com-gamer-profile-hdr-round-box-header\">","<div class=\"com-gamer-profile-hdr-round-box-header-inner\">My Ratings</div>","</div>","<div class=\"com-gamer-profile-hdr-round-box-body\">","<div class=\"com-gamer-profile-hdr-round-box-body-inner\" style=\"\">","<div id=\"gamer-ratings-container\"></div>","</div>","</div>","<div class=\"com-gamer-profile-hdr-round-box-footer\">","<div class=\"com-gamer-profile-hdr-round-box-footer-inner\"></div>","</div>","</div>","<!-- End  my ratings Box -->","<!-- my badges Box -->","<div class=\"sg-live-transactions-round-box-wrapper\" style=\"width:130px;float:left;margin-left:20px;\">","<div class=\"com-gamer-profile-hdr-round-box-header\">","<div class=\"com-gamer-profile-hdr-round-box-header-inner\">My Badges</div>","</div>","<div class=\"com-gamer-profile-hdr-round-box-body\">","<div class=\"com-gamer-profile-hdr-round-box-body-inner\" style=\"\">","<!-- start badges -->","<div class=\"com-gamer-profile-badges-wraper\">","<div class=\"com-gamer-profile-badge-tenure-{tenure_badge}\" {[SwitchGames.Utility.getTenureTooltip(values.tenure_badge)]}></div>","<div class=\"com-gamer-profile-badge-transactions-{transaction_badge}\" {[SwitchGames.Utility.getTransactionTooltip(values.transaction_badge)]}></div>","<div class=\"com-gamer-profile-badge-philanthropy-{philanthropy_badge}\" {[SwitchGames.Utility.getPhilanthropyTooltip(values.philanthropy_badge)]}></div>","<br/>","<div class=\"com-gamer-profile-badge-rating-{ratings_star_badge}\" {[SwitchGames.Utility.getRatingsStarTooltip(values.ratings_star_badge)]}></div>","<div class=\"com-gamer-profile-badge-plus-member-{plus_badge}\" {[SwitchGames.Utility.getPlusTooltip(values.plus_badge)]}></div>","<div class=\"com-gamer-profile-badge-verified-{verified_badge}\" name=\"verified-badge\" verified=\"{verified_badge}\" memberVerified=\"{member_verified}\"></div>","</div>","<!-- end badges -->","<div class=\"clear\"></div>","</div>","</div>","<div class=\"com-gamer-profile-hdr-round-box-footer\">","<div class=\"com-gamer-profile-hdr-round-box-footer-inner\"></div>","</div>","</div>","<!-- end badges box -->","<!-- begin buddy list -->","<div style=\"float:left;margin-left:6px;\">","<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" width=\"307\" height=\"109\" id=\"gamer-profile-buddy-list\" align=\"middle\">","<param name=\"allowScriptAccess\" value=\"sameDomain\" />","<param name=\"allowFullScreen\" value=\"false\" />","<param name=\"movie\" value=\"../fla/gamer-profile-buddy-list.swf\" />","<param name=\"quality\" value=\"high\" />","<param name=\"wmode\" value=\"transparent\" />","<param name=\"FlashVars\" value=\"dataPath=../fla/gamer-profile-buddy-list.php?member_id={member_id}\" />","<embed src=\"../fla/gamer-profile-buddy-list.swf\" wmode=\"transparent\" quality=\"high\" width=\"307\" height=\"109\" name=\"gamer-profile-buddy-list\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" FlashVars=\"dataPath=../fla/gamer-profile-buddy-list.php?member_id={member_id}\" />","</object>","</div>","<!-- end buddy list -->","</div>","<!-- start gamer stats area -->","<div class=\"com-gamer-profile-stats\">","<div class=\"com-gamer-profile-stats-col1\">","<div class=\"com-gamer-profile-stats-rndbox_top\"><div></div></div>","<div class=\"com-gamer-profile-stats-rndbox_inner\">","<div class=\"stats-title\">The best game of all time:</div>","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.favorite_game_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{favorite_game_id}\" itemtype=\"game\" onload=\"SwitchGames.Utility.scaleAndCenterImageInParent(this);\" id=\"favorite-game-id\" gameid=\"{favorite_game_id}\" src=\"{[SwitchGames.Utility.getCoverValue(values.favorite_game_photo_cover)]}\" alt=\"gamebox image\"/>","</div>","<div class=\"com-gamer-profile-stats-rndbox_bottom\"><div></div></div>","</div>","<div class=\"com-gamer-profile-stats-col2\">","<div class=\"com-gamer-profile-stats-rndbox_top\"><div></div></div>","<div class=\"com-gamer-profile-stats-rndbox_inner\">","<div class=\"stats-title\">I'm currently playing a lot of:</div>","<img ext:qtip=\"Click for product details and screenshots of <b>{[unescape(values.now_playing_game_name).replace(/(\")/g, \"&quot;\")]}</b>\" ext:qwidth=\"300\" class=\"has-detail\" style=\"width: 0px; height: 0px;\" itemid=\"{now_playing_game_id}\" itemtype=\"game\" onload=\"SwitchGames.Utility.scaleAndCenterImageInParent(this);\" id=\"now-playing-id\" gameid=\"{now_playing_game_id}\" src=\"{[SwitchGames.Utility.getCoverValue(values.now_playing_game_photo_cover)]}\" alt=\"gamebox image\"/>","</div>","<div class=\"com-gamer-profile-stats-rndbox_bottom\"><div></div></div>","</div>","<div class=\"com-gamer-profile-stats-col3\">","<div class=\"com-gamer-profile-stats-rndbox_top\"><div></div></div>","<div class=\"com-gamer-profile-stats-rndbox_inner\">","<div class=\"stats-title\">Stats:</div>","<div class=\"stats-list\">","Total Items Traded:&nbsp;<span>{total_trades}</span><br/>","<b>GameSystems Owned:</b><br/><br/>","<span>","<tpl for=\"systems\">","{platform_name}<br/>","</tpl>","</span><br/><br/>","Favorite Genres:<br/>","<span>","#1: {favorite_genre_1}<br/>","#2: {favorite_genre_2}<br/>","#3: {favorite_genre_3}","</span><br/><br/>","</div>","</div>","<div class=\"com-gamer-profile-stats-rndbox_bottom\"><div></div></div>","</div>","</div>","<div class=\"com-gamer-profile-my-stuff-wrapper\">","<div class=\"com-gamer-profile-my-stuff-title\">","my stuff","</div>","<div id=\"gamer-my-stuff-tabs\">","</div>","</div>","<div class=\"com-gamer-profile-my-wishlist-wrapper\">","<div class=\"com-gamer-profile-my-wishlist-title\">my wishlist</div>","<div id=\"gamer-wishlist-tabs\"></div>","</div>","<div style=\"height:10px;\"></div>","</div>","</div>","<div class=\"com-gamer-profile-round-box-footer\">","<div class=\"com-gamer-profile-round-box-footer-inner\"></div>","</div>","</div>");
SwitchGames.GamerPage.renderComboBox=function(_1f,_20,_21){
var _22=_1f+"Name";
var _23="gp-"+_1f+"-cb";
var _24=_1f+"Store";
if(_21==null){
_21="All";
}
SwitchGames.GamerPage.comboBox=new Ext.form.ComboBox({typeAhead:false,triggerAction:"all",displayField:_22,store:SwitchGames.Search[_24],fieldClass:"sg-form-field",width:_20,listWidth:_20,pageSize:0,editable:false,lazyInit:false,lazyRender:true,listBaseClass:"sg-combo-list-item",selectedClass:"sg-combo-list-item-selected",forceSelection:true,value:_21,mode:"local",tpl:"<tpl for=\".\"><div class=\"sg-combo-list-item-item\">{"+_22+"}</div></tpl>",listeners:{"select":function(_25,_26,_27){
if(SwitchGames.GamerPage.filter==null){
SwitchGames.GamerPage.filter={};
}
SwitchGames.GamerPage.filter[_1f]=_26.data[_22];
SwitchGames.GamerPage.reloadGames();
},"expand":function(_28){
_28.list.on("mousedown",SwitchGames.Search.stopMouseDown);
},"collapse":function(_29){
_29.list.un("mousedown",SwitchGames.Search.stopMouseDown);
}}});
SwitchGames.GamerPage.comboBox.render(_23);
};
SwitchGames.GamerPage.checkForTrade=function(){
if(SwitchGames.GamerPage.filter==null){
SwitchGames.GamerPage.filter={};
}
if(Ext.fly("gp-for-trade-only").dom.checked==true){
SwitchGames.GamerPage.filter.forTrade=1;
}else{
SwitchGames.GamerPage.filter.forTrade=0;
}
SwitchGames.GamerPage.reloadGames();
};
SwitchGames.GamerPage.reloadGames=function(_2a){
var _2a={pane:"filter_items",other_member_id:_2b,screen_name:_2c,for_trade:SwitchGames.GamerPage.filter.forTrade,genre:SwitchGames.GamerPage.filter.genre,platform:SwitchGames.GamerPage.filter.platform};
Ext.Ajax.request({url:"data/common/gamer_page.php",params:_2a,success:function(_2d,_2e){
var _2f=Ext.util.JSON.decode(_2d.responseText);
if(_2f.error!=undefined){
SwitchGames.Dialogs.showErrorDialog(_2f.error);
}else{
if(_2f.length>0){
SwitchGames.GamerPage.myStuffGameTpl.overwrite(SwitchGames.GamerPage.msGamePanel.body,_2f);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-my-stuff-game-scroller-panel"),Ext.get("gamer-my-stuff-game-left-arrow"),Ext.get("gamer-my-stuff-game-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
}else{
SwitchGames.GamerPage.emptyGameTpl.overwrite(SwitchGames.GamerPage.msGamePanel.body,{});
}
SwitchGames.GamerPage.renderComboBox("platform",250,SwitchGames.GamerPage.filter.platform);
SwitchGames.GamerPage.renderComboBox("genre",100,SwitchGames.GamerPage.filter.genre);
if(SwitchGames.GamerPage.filter.forTrade==1){
Ext.fly("gp-for-trade-only").dom.checked=true;
}
}
},failure:function(_30,_31){
SwitchGames.Dialogs.showErrorDialog(_30);
}});
};
SwitchGames.GamerPage.afterScrollCallback=function(_32){
var _33=_32.select("img[@name=\"item-image\"]",true).elements[0];
if(_33.dom.getAttribute("scaled")=="0"){
SwitchGames.Utility.scaleAndCenterImageInParent(_33);
}
};
SwitchGames.GamerPage.shareOnFacebook=function(){
var u=location.href;
var t=document.title;
window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t),"sharer","toolbar=0,status=0,width=626,height=436");
};
SwitchGames.GamerPage.shareOnTwitter=function(){
var u=location.href;
var msg="Trade video games with people for free on SwitchGames.com! Check out "+_2c+"'s gamer page: "+u;
var _38=unescape("http://twitter.com/home?status="+msg);
window.open(_38,"Twit","status=0,width=780,height=500");
};
var _2c=SwitchGames.Utility.getUrlParam("screen_name");
var _2b=SwitchGames.Utility.getUrlParam("other_member_id");
var _39={pane:"get_gamer_page"};
if(_2c!=""){
_39.screen_name=_2c;
}else{
if(_2b!=""){
_39.other_member_id=_2b;
}else{
if(window.location.pathname.match("/gamer/")){
var _3a=window.location.pathname.split("/");
var _3b=_3a[_3a.length-1];
if(_3b=="gamer"){
SwitchGames.Dialogs.showErrorDialog("No gamer name entered");
return;
}else{
_39.screen_name=_3b;
_2c=_3b;
}
}
}
}
if(_2c!=""){
document.title="SwitchGames - "+_2c+"'s Gamer Page";
}
var _3c=Ext.get("gamer-page-header");
var _3d="mailto:?subject=Check out "+_2c+"'s Gamer Page on SwitchGames.com"+"&body=Hey,%0A%0A"+_2c+" is trading video games with people for free on SwitchGames.com.  Check%0A"+"out their Gamer Page here: "+location.href+"%0A%0A"+"If you're not a member, you can sign up for free too:  http://www.switchgames.com%0A%0A"+"Game On!";
_3c.dom.innerHTML="<span id=\"shareButtons\" style=\"position:relative; bottom:5px; font-size:18px;\">Share this Gamer Page: "+"<a href=\""+_3d+"\"><img name=\"share-email\" src=\""+SwitchGames.imageUrl+"/common/icons/email_16.png\" alt=\"\" /></a> "+"<img name=\"share-twitter\" src=\""+SwitchGames.imageUrl+"/common/icons/twitter_16.png\" alt=\"\" style=\"cursor:pointer;\" /> "+"<img name=\"share-facebook\" src=\"http://b.static.ak.fbcdn.net/rsrc.php/zAB5S/hash/4273uaqa.gif\" alt=\"\" style=\"cursor:pointer;\" />"+"</span>",Ext.Ajax.request({url:"data/common/gamer_page.php",params:_39,success:function(_3e,_3f){
var _40=Ext.util.JSON.decode(_3e.responseText);
if(_40.error!=undefined){
SwitchGames.Dialogs.showErrorDialog(_40.error);
}else{
SwitchGames.Utility.removeVerifiedTooltips(SwitchGames.GamerPage);
var _41=Ext.get("gamer-page-body");
SwitchGames.GamerPage.mainTpl.overwrite(_41,_40);
SwitchGames.Utility.createVerifiedBadgeTooltips(_41,SwitchGames.GamerPage,"SwitchGames.Utility.verifiedMemberCallback");
if(_40.ratings.length>0){
Ext.get("gamer-ratings-container").dom.innerHTML=SwitchGames.GamerPage.ratingsTpl.apply(_40.ratings);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("ratings-panel"),Ext.get("ratings-left-arrow"),Ext.get("ratings-right-arrow"),"slide",false,null,null);
}else{
Ext.get("gamer-ratings-container").dom.innerHTML=SwitchGames.GamerPage.emptyRatingsTpl.apply({});
}
SwitchGames.GamerPage.myStuffTabs=new Ext.TabPanel({renderTo:Ext.get("gamer-my-stuff-tabs"),activeTab:0,defaults:{autoScroll:false,layout:"fit"},frame:false,height:330,plain:true,deferredRender:false,items:[{title:"GAMES I OWN",id:"gamer-my-stuff-games",listeners:{"render":{fn:function(_42){
if(_40.listing_games.length>0){
SwitchGames.GamerPage.msGamePanel=_42;
SwitchGames.GamerPage.myStuffGameTpl.overwrite(_42.body,_40.listing_games);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-my-stuff-game-scroller-panel"),Ext.get("gamer-my-stuff-game-left-arrow"),Ext.get("gamer-my-stuff-game-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
SwitchGames.GamerPage.renderComboBox("platform",250);
SwitchGames.GamerPage.renderComboBox("genre",100);
_42.body.on("click",SwitchGames.GamerPage.tradeOfferDetailHandler,this,{delegate:"img.trade-offer-detail"});
}else{
SwitchGames.GamerPage.emptyGameTpl.overwrite(_42.body,{});
}
},options:{scope:this}}}},{title:"CONSOLES I OWN",id:"gamer-my-stuff-consoles",listeners:{"render":{fn:function(_43){
if(_40.listing_platforms.length>0){
SwitchGames.GamerPage.myStuffConsoleTpl.overwrite(_43.body,_40.listing_platforms);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-my-stuff-console-scroller-panel"),Ext.get("gamer-my-stuff-console-left-arrow"),Ext.get("gamer-my-stuff-console-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
}else{
SwitchGames.GamerPage.emptyTpl.overwrite(_43.body,{});
}
},options:{scope:this}},"show":{fn:function(_44){
var _45=_44.body.select("img.has-detail",true);
if(_45.elements.length>0){
SwitchGames.Utility.scaleAndCenterImageInParent(_45.elements[0].dom);
}
},options:{scope:this}}}},{title:"ACCESSORIES I OWN",id:"gamer-my-stuff-accessories",listeners:{"render":{fn:function(_46){
if(_40.listing_accessories.length>0){
SwitchGames.GamerPage.myStuffAccessoryTpl.overwrite(_46.body,_40.listing_accessories);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-my-stuff-accessory-scroller-panel"),Ext.get("gamer-my-stuff-accessory-left-arrow"),Ext.get("gamer-my-stuff-accessory-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
}else{
SwitchGames.GamerPage.emptyTpl.overwrite(_46.body,{});
}
},options:{scope:this}},"show":{fn:function(_47){
var _48=_47.body.select("img.has-detail",true);
if(_48.elements.length>0){
SwitchGames.Utility.scaleAndCenterImageInParent(_48.elements[0].dom);
}
},options:{scope:this}}}}]});
SwitchGames.GamerPage.wishlistTabs=new Ext.TabPanel({renderTo:Ext.get("gamer-wishlist-tabs"),activeTab:0,defaults:{autoScroll:false,layout:"fit"},frame:false,height:300,plain:true,deferredRender:false,items:[{title:"GAMES I WANT",id:"gamer-wishlist-games",listeners:{"render":{fn:function(_49){
if(_40.wishlist_games.length>0){
SwitchGames.GamerPage.wishlistGameTpl.overwrite(_49.body,_40.wishlist_games);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-wishlist-game-scroller-panel"),Ext.get("gamer-wishlist-game-left-arrow"),Ext.get("gamer-wishlist-game-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
}else{
SwitchGames.GamerPage.emptyTpl.overwrite(_49.body,{});
}
},options:{scope:this}}}},{title:"CONSOLES I WANT",id:"gamer-wishlist-consoles",listeners:{"render":{fn:function(_4a){
if(_40.wishlist_platforms.length>0){
SwitchGames.GamerPage.wishlistConsoleTpl.overwrite(_4a.body,_40.wishlist_platforms);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-wishlist-console-scroller-panel"),Ext.get("gamer-wishlist-console-left-arrow"),Ext.get("gamer-wishlist-console-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
}else{
SwitchGames.GamerPage.emptyTpl.overwrite(_4a.body,{});
}
},options:{scope:this}},"show":{fn:function(_4b){
var _4c=_4b.body.select("img.has-detail",true);
if(_4c.elements.length>0){
SwitchGames.Utility.scaleAndCenterImageInParent(_4c.elements[0].dom);
}
},options:{scope:this}}}},{title:"ACCESSORIES I WANT",id:"gamer-wishlist-accessories",listeners:{"render":{fn:function(_4d){
if(_40.wishlist_accessories.length>0){
SwitchGames.GamerPage.wishlistAccessoryTpl.overwrite(_4d.body,_40.wishlist_accessories);
SwitchGames.Utility.setupLeftRightScrolling(Ext.get("gamer-wishlist-accessory-scroller-panel"),Ext.get("gamer-wishlist-accessory-left-arrow"),Ext.get("gamer-wishlist-accessory-right-arrow"),"slide",false,null,null,SwitchGames.GamerPage.afterScrollCallback);
}else{
SwitchGames.GamerPage.emptyTpl.overwrite(_4d.body,{});
}
},options:{scope:this}},"show":{fn:function(_4e){
var _4f=_4e.body.select("img.has-detail",true);
if(_4f.elements.length>0){
SwitchGames.Utility.scaleAndCenterImageInParent(_4f.elements[0].dom);
}
},options:{scope:this}}}}]});
}
},failure:function(_50,_51){
SwitchGames.Dialogs.showErrorDialog(_50);
}});
SwitchGames.GamerPage.tradeOfferDetailHandler=function(e,t){
var _54=t.getAttribute("itemid");
var _55=t.getAttribute("itemtype");
var _56=t.getAttribute("listingid");
SwitchGames.Dialogs.showTradeOfferItemDetailDialog(_54,_55,_56);
};
Ext.fly(document.body).on("click",function(e,t){
var _59=t.getAttribute("transaction-type");
var _5a=t.getAttribute("listing-id");
switch(_59){
case "buy":
SwitchGames.TradeOffer.buy(_5a);
break;
case "safesale":
SwitchGames.TradeOffer.safeSale(_5a);
break;
case "safebuy":
SwitchGames.TradeOffer.safeBuy(_5a);
break;
case "trade":
case "safetrade":
SwitchGames.TradeOffer.safeTrade(_5a);
break;
}
},this,{delegate:"img[@transaction-type]"});
Ext.fly(document.body).on("click",function(e,t){
var _5d=t.getAttribute("screen-name");
var _5e=t.getAttribute("member-id");
SwitchGames.Buddy.add(_5e,_5d);
},this,{delegate:"img[@name=\"messages-addtobuddylist\"]"});
Ext.fly(document.body).on("click",function(e,t){
var _61=t.getAttribute("screen-name");
var _62=t.getAttribute("member-id");
SwitchGames.Buddy.remove(_62,_61);
},this,{delegate:"img[@name=\"messages-removefrombuddylist\"]"});
Ext.fly(document.body).on("click",function(e,t){
var _65=t.getAttribute("screen-name");
var _66=t.getAttribute("member-id");
SwitchGames.Member.messageMember(_66,_65,null,null);
},this,{delegate:"img[@name=\"messageuser\"]"});
Ext.fly(document.body).on("click",function(){
SwitchGames.GamerPage.shareOnFacebook();
},this,{delegate:"img[@name=\"share-facebook\"]"});
Ext.fly(document.body).on("click",function(){
SwitchGames.GamerPage.shareOnTwitter();
},this,{delegate:"img[@name=\"share-twitter\"]"});
Ext.fly(document.body).on("click",function(e,t){
SwitchGames.GamerPage.checkForTrade(t);
},this,{delegate:"input[@name=\"gp-for-trade-only\"]"});
});

