var C4=C4||{};
C4.Controller=(function stransDetailControllerInit(C){var H="@%_#",I;
var L={buildStrandData:function G(){return{title:C("h1.strandName").text(),heroImage:{alt:C("#heroImage").attr("alt"),src:C("#heroImage").attr("src")},synopsis:L.getSynopsisParagraphs(),productionCompany:undefined,officialURL:undefined,officialURL_lbl:undefined,awards:undefined,categories:undefined,castAndCrew:{cast:undefined,crew:undefined},tags:undefined,clips:undefined,pictures:undefined,announcement:undefined}
},initialiseStrandFlash:function E(P){var R={salign:"top",allowFullScreen:"true",bgcolor:"#FFFFFF",allowScriptAccess:"always",wmode:"opaque"},Q={id:"clipsPlayer"},O={strQuotesEscapeChar:H,brand:encodeURIComponent(C.toJSON(P)),strSeeAllClipsUrl:undefined,strSeeAllClipsLabel:undefined,strSeeAllPicsUrl:undefined,strSeeAllPicsLabel:undefined,primaryColor:C.getCssFromClass("flashPrimaryColor","color",true),secondaryColor:C.getCssFromClass("flashSecondaryColor","color",true),invertSkin:C("body").hasClass("invert-skin")};
I=352;
O.pinRequestCallback="C4.PinController.doPinChecks";
swfobject.embedSWF(swfRoot+"asset/flash/swf/brandhub.swf","flashContainer","625",I,"9.0.115",swfRoot+"asset/flash/swf/expressInstall.swf",O,R,Q);
C4.PinController.setFlashPlayer("clipsPlayer")
},enhanceStrandInfo:function J(){C("#flashContainer").prepend('<p class="info">For more content and an enhanced view of this page <a href="http://get.adobe.com/flashplayer/">click here to install or upgrade Flash</a>. </p>');
if(swfobject.hasFlashPlayerVersion("9.0.115")){swfobject.addDomLoadEvent(C4.Controller.moveStrandPOSH);
swfobject.addDomLoadEvent(C4.Controller.addFlashAccessibilityMessage)
}if(C.browser.safari&&navigator.platform=="Win32"){C(document).ready(function(){L.initialiseStrandFlash(L.buildStrandData())
})
}else{L.initialiseStrandFlash(L.buildStrandData())
}},getSynopsisParagraphs:function A(){var O="";
C("#synopsis p").each(function(){O+=C(this).text()+"\r\r"
});
O=O.replace(/\r\r$/,"");
return O
},enhanceCatJumpPoints:function K(){C(".jumpPoints").each(function(){if(C(this).find("li").length===1&&C(this).find("li.catchUp").length===0){C(this).find("li").css("margin-top","10px")
}})
}};
var N={};
return{init:function B(){C4.OO.insistRequired({object:C,names:["metadata","poshTabsLite","setadata","toJSON","getCssFromClass","outerHtml"]},{object:swfobject,names:["embedSWF"]},{object:C4.Brand.Views,names:["buildPocketsAndTabs","enhanceSponsorship"]});
L.enhanceStrandInfo();
L.enhanceCatJumpPoints();
C4.Brand.Views.buildPocketsAndTabs();
C4.Brand.Views.enhanceSponsorship();
C4.Brand.Views.enhanceJumpPointLinks();
C4.Brand.Views.enhanceBrandPageAds()
},moveStrandPOSH:function F(){C("#flashHubWrapper").css({minHeight:I});
C("h1").addClass("accessibility");
C("#heroImage").addClass("accessibility");
C("#Category").addClass("accessibility");
C("#Watch").addClass("accessibility");
C("#MerchandiseLinks").addClass("accessibility");
C("#synopsis").parent().addClass("accessibility")
},addFlashAccessibilityMessage:function D(){C("#flashHubWrapper").before('<div class="accessibility">Flash content: <a href="#Watch">skip to accessible alternative</a></div>').addClass("flashEnabled")
},openOutFlash:function(){C("#clipsPlayer").height(484);
var P=(C("#clipsPlayer").offset().top)-42;
var O=C("#clipsPlayer").offset().left;
window.scrollTo(O,P);
return true
},closeInFlash:function(){C("#clipsPlayer").height(110);
return true
},_getOmnitureVars:function M(){return"s_prop22="+c4props("vertical")+"|s_account="+s_account+"|mypage="+document.location.href
},_set$:function(O){C=O
},_setViews:function(O){L=O
},_getViews:function(){return L
},_reset:(function(){var O=C,P=L;
return function(){C=O;
L=P
}
})()}
})(jQuery);