// Library release: v1.18.0.2, 06 November 2009
// Documentation: svn\Wiki\JavaScript\
Brand={version:"1.8.0",name:"TopMan",directory:6,activeSalesCatalogId:17551,isUSStore:false,storeCurrencySymbol:"&#163;",removeCategoryText:false,collapseCategories:true,basicSrollerConfig:{},cycleContentConfig:{underwear_cycle:{fx:"fade",delay:-2000,timeout:4500},homepage_cycle:{fx:"fade",delay:-2000,timeout:4500},homepage_blog_cycle:{fx:"fade",delay:-2000,timeout:7500},gallery:{fx:"fade",speed:"fast",timeout:0,next:"#next",prev:"#prev",nexttext:"Next",prevtext:"Previous",control_position:"before"},gallery2:{fx:"fade",speed:"fast",timeout:0,next:"#next2",prev:"#prev2",nexttext:"Next",prevtext:"Previous",control_position:"before"}},contentTabsConfig:{},newScrollerConfig:{antony_price_scroller:{orientation:"vertical",moveLeft:0,moveDown:152,speed:400,easing:"jswing",loop:false},design_scroller:{orientation:"horizontal",moveLeft:127,moveDown:0,speed:400,easing:"jswing",loop:false},homepage_scroller:{orientation:"horizontal",moveLeft:135,moveDown:0,speed:400,easing:"jswing",loop:false}},enableColourSwatchHelpers:true,enableProdListerFormatting:true,prodListSetHeight:true,prodListHeightPadding:10,switchProductInsertType:"after",switchProductInsertTarget:"#largerimage2",internationalTrackingUrl:"www.topman.com/international/index.html",addThisAccountName:"giddinb",addThisLocation:"",addThisLink:"<li><a href=\"http://www.addthis.com/bookmark.php\" id=\"add_this_link\" title=\"Bookmark this page\"><img src=\"http://s7.addthis.com/button1-bm.gif\" alt=\"Bookmark this page\" /></a></li>",ProductConfig:{cSizeAmmount:'13',cMdlOpacity:'90',cMdlSizeGuide:true,cSizeGuideHide:true,mOutOfStock:'<h2>Sorry, Item Out of Stock</h2>',mBasket:'My Bag: <span class="headercart-items"></span> item(s): &pound;<span class="headercart-total"></span>',mAJAXError:'We&lsquo;re sorry there was a problem, please try again.<br /><br /> If the problem continues please contact us.',mAJAXH2Error:'Error',mAJAXH2Success:'Item added to shopping bag',mAddingToBag:'Adding...',mErrorSize:'You need to select a size before you can add this item to your bag.',mErrorWishlist:'You need to select a size before you can add this item to your wishlist.'},enableMercadoFilters:true,mercadoFiltersH2:"Shop by...",googleAccounts:["UA-806703-1"],ajaxConfig:{antony_price:{root:"/ajax_content/antony_price/",effectSpeed:250,eventType:"click"},design:{root:"/ajax_content/design/",effectSpeed:250,eventType:"click"},cmsajax:{root:"/cms/pages/ajax/"}}};Template.initBrandMethods=function(){return;;};Behaviour.initBrandMethods=function(){Behaviour.CapitaliseField();Behaviour.initHeaderTerritoryDisplay();Behaviour.initHomeScroller();if($.browser.mozilla){$(window).load(function(){Behaviour.initSifr();});}else{Behaviour.initSifr();}Behaviour.XmasDays12();Behaviour.TabbedContent();};Behaviour.CapitaliseField=function(){if($("input.capitalise").length){$("input.capitalise").blur(function(){if($(this).val()!=""&&$(this).val().length>1){var rtn=$(this).val();var re=/\s/;var words=rtn.split(re);re=/(\S)(\S+)/;re.exec(words[0]);words[0]=RegExp.$1.toUpperCase()+RegExp.$2.toLowerCase();rtn=words.join(' ');$(this).val(rtn);}});}};Behaviour.initSifr=function(){if(typeof sIFR=="function"){sIFR.replaceElement(named({sSelector:"#staticcontent h1",sFlashSrc:"http://media.topman.com/flash_content/sifr/InterstateBlack.swf",sColor:"#FFFFFF",sLinkColor:"#FFFFFF",sBgColor:"#333333",sHoverColor:"#FFFFFF",sCase:"upper"}));sIFR.replaceElement(named({sSelector:"h1.sifr",sFlashSrc:"http://media.topman.com/flash_content/sifr/InterstateBlack.swf",sColor:"#FFFFFF",sLinkColor:"#FFFFFF",sBgColor:"#333333",sHoverColor:"#FFFFFF",sCase:"upper"}));sIFR.replaceElement(named({sSelector:"h2.sifr",sFlashSrc:"http://media.topman.com/flash_content/sifr/InterstateBlack.swf",sColor:"#FFFFFF",sLinkColor:"#FFFFFF",sBgColor:"#333333",sHoverColor:"#FFFFFF",sCase:"upper"}));}};Behaviour.initHeaderTerritoryDisplay=function(){$("a.toggle_territory_header").click(function(){$("#site_change_region").toggle();return false});};Behaviour.initHomeScroller=function(){Behaviour.homeScroller=$("#news_scroller ul");var el=Behaviour.homeScroller;el.parentHeight=el.parent().height(),el.content=el.html();el.animations=0;Behaviour.animateHomeScroller(58);};Behaviour.animateHomeScroller=function(move,speed){var move=move||22,speed=speed||900;var el=Behaviour.homeScroller;var top=move*(el.animations+1);if(el.height()-top<=el.parentHeight)el.append(el.content);var func=function(){el.animate({top:"-="+move+"px"},speed,Behaviour.animateHomeScroller);};setTimeout(func,1500);el.animations++};Behaviour.XmasDays12=function(){if($("#christmas_container").length){var divid="";$("#christmas_container #christmas_content li a.replace").click(function(){$("#christmas_container #christmas_panels div").hide();divid=$(this).parent("li").attr("id");$("#"+divid+"_panel").show();$(".close_christmas").click(function(){$("#christmas_container #christmas_panels div").hide();return false});return false});}};Behaviour.TabbedContent=function(){if($("#tabbed_content").length){$("#tabbed_panels div").hide();$("#tabbed_panels div#content_tab_1").show();$("#tabbed_buttons a").click(function(){$("#tabbed_panels div").hide();$("#tabbed_buttons a").removeClass("selected");$(this).addClass("selected");var $targetId="div#content_"+$(this).parent('li').attr('id');$($targetId).show();return false});}};