var msgIsActive=false;var msgVersion="old";var msETSHandle=null;ETSService.prototype=new Ajax();var thisURL=location.href;var npCookie={sliver:"brkNewPlayerSliver",sliverOptions:{path:"/",expires:1}};function ETSService(){this.method="POST";this.headerName="Content-Type";this.headerValue="application/x-www-form-urlencoded; charset=UTF-8";this.content="";this.url="";this.registry=new Array();msETSHandle=this}ETSService.prototype.handleflagETS=function(){if(msETSHandle.xmlHttp.readyState==4){if(msETSHandle.xmlHttp.responseXML!=null){msETSHandle.registry[0](msETSHandle.xmlHttp.responseXML,msETSHandle.xmlHttp.status==200)}msETSHandle.registry[0]=null}};ETSService.prototype.flagETS=function(a,b){this.registry[0]=b;this.content="sEtsEventXml="+a;this.url="/WebAPI/InvokeCMS/CMSWebETSAPI/SubmitETSEventXML";this.send(this.method,this.url,this.headerName,this.headerValue,null,null,this.content,this.handleflagETS)};function ETSResponse(b,a){}function SendETSRequest(b){var a=new ETSService();a.flagETS(b,ETSResponse)}function ETSBase(a){this.etsKey=a;this.controls=new Array()}ETSBase.prototype.addControl=function(a){this.controls.push(a)};ETSBase.prototype.execute=function(){var a='<?xml version="1.0" encoding="utf-8" ?><Ets key="'+escape(this.etsKey)+'">';var b=false;for(var d=0;d<this.controls.length;d++){var c=getctrlval(this.controls[d]);if(this.controls[d]=="ctl_search_tb_master"){this.controls[d]="ctl_search_tb"}if(c!="Videos and More"&&c.length>0){b=true}c=c.replace(/</g,"");c=c.replace(/>/g,"");c=c.replace(/\"/g,"");c=c.replace(/\'/g,"");a+='<EtsControl key="'+escape(this.controls[d])+'">'+encodeURI(c)+"</EtsControl>"}a+="</Ets>";if(b){SendETSRequest(a)}};function replacestr(b){var a=/\</g;b=b.replace(a,"");var c=/\>/g;b=b.replace(c,"");return""}function getctrlval(a){if(a=="ctl_search_tb"){return GenerateSearchString()}if(a=="ctl_search_tb_master"){return""}if(a=="ctl_advanced_tb"){if(document.getElementById("txtSearchString").type="text"){return document.getElementById("txtSearchString").value}}if(a=="Share"){return document.getElementById("hdnContentId").value}return"error"}var pageNumber=1;var MAX_SIZE=15;var Featured_Max_Size=6;function conditional_RenderGoogleReferrerModules(){var h="googleRefer";var c="uml_wrap";var f="uml_wrap_fix";var b="video_misc_published";if(referrer_IsSearchReferrer()){var d=new Array("sex","xxx","hot girls","kama sutra","sex videos","brianna frost","kamasutra","strip","young girls","tila tequilla","sex video","tila tequila naked","girls kissing","2 girls 1 cup","tila tequila nude","tila tequila video","kamasutra video","playboy video","playboy","hot chicks","karma sutra","strip tease","kama sutra video","strip video","vida guerra","break.com spicy","pictures","girls gone wild video","big boobs","video sex","large breasts","lingerie");var g="q";if(sendingURL.match("yahoo.com")){g="p"}var a=getReferrerQueryString(g);var j="";if(a!=null){j=a.split("+").join(" ");j=unescape(j)}var k=false;for(var l=0;l<d.length;l++){if(j.toLowerCase()==d[l]){k=true}}if(k){if(document.getElementById("uml_nsfw")){document.getElementById("uml_nsfw").innerHTML='<a class="fea_rgt_title" style="padding-right: 0pt;" href="javascript:memberMoviesEnter();">More NSFW Videos Here</a>'}GetYouMightLikeNSFW();jQuery("#"+h).addClass("googleReferNoBackGround");if(document.getElementById(h)){document.getElementById(h).innerHTML=RenderReferrerGoogleNSFW(a,j);document.getElementById(h).style.display="block"}if(document.getElementById(c)){document.getElementById(c).style.display="block"}if(document.getElementById(f)){document.getElementById(f).style.display="block";document.getElementById(f).style.display="block"}if(document.getElementById(b)){document.getElementById(b).style.display="none"}}else{GetYouMightLike();jQuery("#"+h).addClass("googleReferNoBackGround");if(document.getElementById(h)){document.getElementById(h).innerHTML=RenderReferrerGoogle(a,j);document.getElementById(h).style.display="block"}if(document.getElementById(c)){document.getElementById(c).style.display="block"}if(document.getElementById(f)){document.getElementById(f).style.display="block";document.getElementById(f).style.display="block"}if(document.getElementById(b)){document.getElementById(b).style.display="none"}}}}function RenderReferrerGoogle(b,a){var c="";c+="After watching, check out more ";c+='<a href="http://www.break.com/surfacevideo/'+b+'">'+a;c+="</a> videos.";return c}function RenderReferrerGoogleNSFW(b,a){var c="";c+="Looking for ";c+='<a href="http://my.break.com/Content/Search/Search.aspx?SEARCH1=Search&s='+b+'&SearchType=Main">'+a;c+='</a>? Check out our <a href="javascript:memberMoviesEnter();">NSFW Videos</a> ';c+='and <a href="javascript:memberPicturesEnter();">NSFW Galleries</a>.';return c}function GetRecommendations(){GetMemberRecommendationsASHX(getCookieValue("MemberID"),pageNumber,MAX_SIZE,"renderRecommendations")}function GetMoreVideos(){GetMoreVideosFromUser(sGlobalContentID,pageNumber,MAX_SIZE,"renderMoreVideos")}function GetMoreVideosTVShows(){GetMoreVideosFromUserTVShows(sGlobalContentID,pageNumber,MAX_SIZE,"renderMoreVideosTVShows")}function GetFeatured(){GetPremiumVideos(Featured_Max_Size,"renderPremium")}function GetFeaturedCDPModule(){GetPremiumVideos(MAX_SIZE,"renderFeaturedCDPModule")}function GetRelated(){GetRelatedVideos(sGlobalContentID,"renderRelated")}function GetDugg(){GetMostDugg("renderMostDugg")}function GetYouMightLike(){GetYouMightLikeVideos(sGlobalContentID,"renderYouMightLike")}function GetYouMightLikeNSFW(){GetYouMightLikeNSFWVideos(sGlobalContentID,"renderYouMightLike")}function GetMemberRecommendationsASHX(b,f,d,a){var c=new BreakJSON();c.sendBegin("http://websvc.break.com/cms/handlers/ratings/ratingsandrecommendationshandler.ashx?invoke=getrecommendations&memberid="+b+"&page="+f+"&pagesize="+d+"&req=1",a)}function GetMoreVideosFromUser(f,d,c,a){if(f.length>0){var b=new BreakJSON();b.sendBegin("http://websvc.break.com/membership/handlers/profile/morefromthisuser/morefromthisuserhandler.ashx?invoke=getmorefromthisuser&cid="+f,a)}}function GetMoreVideosFromUserTVShows(f,d,c,a){if(f>0){var b=new BreakJSON();b.sendBegin("http://websvc.break.com/membership/handlers/profile/morefromthisuser/morefromthisuserhandler.ashx?invoke=getmorefromthishuluuser&cid="+f,a)}}function GetPremiumVideos(c,b){var a=new BreakJSON();a.sendBegin("http://websvc.break.com/cms/Handlers/PremiumVideo/PremiumVideoHandler.ashx?invoke=getpremiumvideos&numResults="+c,b)}function GetRelatedVideos(a,b){var c=new BreakJSON();c.sendBegin("http://websvc.break.com/cms/Handlers/Content/ConditionalCDPHandler.ashx?invoke=getrelatedvideos&cid="+a,b)}function GetMostDugg(b){var a=new BreakJSON();a.sendBegin("http://websvc.break.com/cms/Handlers/Digg/Digghandler.ashx?invoke=getmostdugg",b)}function GetYouMightLikeVideos(a,b){var c=new BreakJSON();c.sendBegin("http://websvc.break.com/cms/Handlers/Content/ConditionalCDPHandler.ashx?invoke=getyoumightlike&numResults=2&cid="+a,b)}function GetYouMightLikeNSFWVideos(a,b){var c=new BreakJSON();c.sendBegin("http://websvc.break.com/cms/Handlers/Content/ConditionalCDPHandler.ashx?invoke=getyoumightlikensfw&numResults=2&cid="+a,b)}function renderRecommendations(a){var b=jQuery("#thumbstrip_rec");if((a.Response.Code==0)&&(a.Response.Contents.MemberRecommendations)&&(a.Response.Contents.MemberRecommendations.Recommendation.length>0)){fillThumbnailsRec(b,a.Response.Contents.MemberRecommendations.Recommendation)}else{displayThumbError(b,3)}tooltip.init();initThumbScroller(b)}function renderMoreVideos(a){var b=jQuery("#sidebar-morefromuser");if((a.Response.Code==0)&&(a.Response.MoreVideo)){fillSidebarMore(b,a.Response.MoreVideo)}else{displayThumbError(b,3)}tooltip.init();var b=jQuery("#thumbstrip_partner");if((a.Response.Code==0)&&(a.Response.MoreVideo)){fillThumbnailsMore(b,a.Response.MoreVideo)}else{displayThumbError(b,3)}tooltip.init();initThumbScroller(b)}function renderMoreVideosTVShows(a){var b=jQuery("#thumbstrip_ads");if((a.Response.Code==0)&&(a.Response.MoreVideo)){fillThumbnailsMoreTvShows(b,a.Response.MoreVideo)}else{displayThumbError(b,3)}tooltip.init();initThumbScroller(b)}function renderPremium(a){var b=jQuery("#side_featured");if((a.premiumvideos)&&(a.premiumvideos.length)){fillThumbnailsPremium(b,a.premiumvideos)}else{displayThumbError(b,6)}tooltip.init()}function renderRelated(a){var b=jQuery("#thumbstrip_related");if((a.ContentRelatedVideos.Content)&&(a.ContentRelatedVideos.Content.length)){fillThumbnailsRelated(b,a.ContentRelatedVideos.Content)}else{displayThumbError(b,3)}tooltip.init()}function renderFeaturedCDPModule(a){var b=jQuery("#thumbstrip_featured");if((a.premiumvideos)&&(a.premiumvideos.length)){fillThumbnailsFeatured(b,a.premiumvideos)}else{displayThumbError(b,3)}tooltip.init();initThumbScroller(b)}function renderMostDugg(a){var b=jQuery("#thumbstrip_dugg");if(a.ContentList&&a.ContentList.Content){fillThumbnailsMostDugg(b,a.ContentList.Content)}else{displayThumbError(b,3)}tooltip.init();jQuery(function(c){c("#sidebar-module-digg").show();c("#sidebar-module-morevideoslikethis").removeClass("side-top-noad")})}function renderYouMightLike(a){var b=jQuery("#thumbstrip_alsolike");if(a.ContentYouMightLikeVideos&&a.ContentYouMightLikeVideos.Content){fillThumbnailsYouMightLike(b,a.ContentYouMightLikeVideos.Content)}else{displayThumbError(b,2)}tooltip.init()}function displayThumbError(b,a){var c="";if(!((typeof(newCdp)=="undefined")?false:newCdp)){for(i=0;i<a;i++){c+='<div class="rgt_fea_item"><img src="http://media1.break.com/static/live/v1/img/site/img_na.gif" border="0" width="125" alt="Video not available"  class="module_thumb_fea" /></div>'}b.html(c);b.parent().next().addClass("disabled");b.parent().siblings(".navi").css("visibility","hidden")}else{for(i=0;i<3;i++){c+='<div class="related-videos-wrap"><a href="" class="break-link-img"><img src="http://media1.break.com/static/live/v1/img/site/img_na.gif" border="0" width="75" height="56" alt="Video not available" /></a></div>'}b.html(c)}}function fillThumbnailsFeatured(b,a){b.empty();if(a.length){var c=MAX_SIZE;if(a.length<c){c=a.length}for(var d=0;d<c;d++){b.append(sidebarModuleRenderItem(tempFixThumbnailUrl(a[d].ThumbnailURL),a[d].ContentURL,a[d].ContentName,a[d].ContentDescription,a[d].ViewCount,a[d].CommentCount))}}else{b.append(sidebarModuleRenderItem(tempFixThumbnailUrl(a.ThumbnailURL),a.ContentURL,a.ContentName,a.ContentDescription,a.ViewCount,a.CommentCount))}}function fillThumbnailsRec(b,a){b.empty();if(a.length){for(var c=0;c<a.length;c++){b.append(thumbstripRenderItem(a[c].ThumbnailURL,a[c].ContentURL,a[c].ContentName,a[c].ContentDescription))}}else{b.append(thumbstripRenderItem(a.ThumbnailURL,a.ContentURL,a.ContentName,a.ContentDescription))}}function fillSidebarMore(b,a){b.empty();if(a.length>7){for(var c=0;c<a.length;c++){b.append(sidebarModuleRenderItem(a[c].ThumbnailURL,a[c].StaticURL,a[c].ContentName,a[c].ContentDescription,a[c].viewcount,a[c].commentcount))}jQuery("#sidebar-module-morefromuser").show()}else{jQuery("#sidebar-module-morefromuser").hide()}}function fillThumbnailsMore(b,a){b.empty();if(a.length){for(var c=0;c<a.length;c++){b.append(thumbstripRenderItem(a[c].ThumbnailURL,a[c].StaticURL,a[c].ContentName,a[c].ContentDescription))}}else{if(parseInt(a.ContentId)==parseInt(sGlobalContentID)){jQuery("#partnervids").hide()}else{b.append(thumbstripRenderItem(a.ThumbnailURL,a.StaticURL,a.ContentName,a.ContentDescription))}}}function fillThumbnailsMoreTvShows(b,a){b.empty();if(a.length){for(var c=0;c<a.length;c++){b.append(thumbstripRenderItemTvShow(a[c].ThumbnailURL,a[c].StaticURL,a[c].ContentName,a[c].ContentDescription,a[c].Season,a[c].Episode))}}else{if(parseInt(a.ContentId)==parseInt(sGlobalContentID)){jQuery("#hulu").hide()}else{b.append(thumbstripRenderItemTvShow(a.ThumbnailURL,a.StaticURL,a.ContentName,a.ContentDescription,a.Season,a.Episode))}}}function fillThumbnailsPremium(b,a){b.empty();b.append('<div class="rgt_featured_title">More Hot Videos</div>');if(a.length){for(var c=0;c<a.length;c++){b.append(sideBarRenderItem(tempFixThumbnailUrl(a[c].ThumbnailURL),a[c].ContentURL,a[c].ContentName,a[c].ContentDescription))}}else{b.append(sideBarRenderItem(tempFixThumbnailUrl(a.ThumbnailURL),a.ContentURL,a.ContentName,a.ContentDescription))}}function tempFixThumbnailUrl(b){var a=b.lastIndexOf("http");var c=b;if(a>0){c=b.substr(b.lastIndexOf("http"),b.length)}return c}function fillThumbnailsRelated(b,a){b.empty();if(a.length){var c=MAX_SIZE;if(a.length<c){c=a.length}for(var d=0;d<c;d++){b.append(thumbstripRenderItem(a[d].ThumbnailURL,a[d].ContentPageURL,a[d].ContentName,a[d].ContentDescription))}}else{b.append(thumbstripRenderItem(a.ThumbnailURL,a.ContentPageURL,a.ContentName,a.ContentDescription))}}function fillThumbnailsYouMightLike(b,a){b.empty();if(a.length){if(a.length>=2){var c=2;for(var d=0;d<c;d++){b.append(thumbstripRenderItem(a[d].ThumbNailURL,a[d].StaticURL,a[d].ContentName,a[d].ContentDescription))}}}else{b.append(thumbstripRenderItem(a.ThumbNailURL,a.StaticURL,a.ContentName,a.ContentDescription))}}function fillThumbnailsMostDugg(b,a){b.empty();if(a.length){var c=MAX_SIZE;if(a.length<c){c=a.length}for(var d=0;d<c;d++){b.append(sidebarModuleRenderItem(a[d].ThumbnailURL,a[d].StaticURL,a[d].ContentName,a[d].ContentDescription))}}else{b.append(sidebarModuleRenderItem(a.ThumbnailURL,a.StaticURL,a.ContentName,a.ContentDescription))}}function thumbStrip_html_entity_decode(b){try{var a=document.createElement("textarea");a.innerHTML=b;return a.value;a.parentNode.removeChild(a)}catch(d){document.getElementById("htmlconverter").innerHTML='<textarea id="innerConverter">'+b+"</textarea>";var c=document.getElementById("innerConverter").value;document.getElementById("htmlconverter").innerHTML="";return c}}function sidebarModuleRenderItem(f,d,j,c,b,a){var h=/<\S[^><]*>/g;var g="";if(j.length>57){j=j.substring(0,57)+"..."}if(f==""){f="http://media1.break.com/static/live/v1/img/notavailable.gif"}g+='<div class="related-videos-wrap"><div class="related-videos-thumb">';g+='<a class="break-link-img" target="_top" href="'+d+'" title="'+thumbStrip_html_entity_decode(c).replace(h,"").replace('"',"'").replace(/'&gt;/,"")+'">';g+='<img src="'+f+'" border="0" width="75" height="56" onError="thumberror(this);"/></a>';g+="</a></div>";g+='<h2><a class="break-link" target="_top" href="'+d+'">'+j+"</a></h2>";g+='<div class="related-videos-views">';g+='<span>Views: </span><span class="related-videos-viewscount">'+b+"</span>";g+="</div>";g+="</div>";return g}function thumbstripRenderItem(c,b,g,a){var f=/<\S[^><]*>/g;var d="";if(c==""){c="http://media1.break.com/static/live/v1/img/notavailable.gif"}d+='<div class="rgt_fea_item">';d+='<a href="'+b+'" title="'+thumbStrip_html_entity_decode(a).replace(f,"").replace('"',"'").replace(/'&gt;/,"")+'">';d+='<img src="'+c+'" border="0" width="125" height="92" class="module_thumb_fea" onError="thumberror(this);"/></a><br />';d+='<div style="padding-right:5px;">';d+='<a href="'+b+'" class="fea_rgt_title">'+g+"</a><br />";d+="</div></div>";return d}function thumbstripRenderItemTvShow(f,d,a,c,b,g){var j=/<\S[^><]*>/g;var h="";if(a.length>20){a=a.substring(0,20)+"..."}if(f==""){f="http://media1.break.com/static/live/v1/img/notavailable.gif"}h+='<div class="rgt_fea_item">';h+='<div style="padding-right:5px;">';h+='<a href="'+d+'" class="fea_rgt_title">'+a+"</a><br />";h+="</div>";h+='<a href="'+d+'" title="'+thumbStrip_html_entity_decode(c).replace(j,"").replace('"',"'").replace(/'&gt;/,"")+'">';h+='<img src="'+f+'" border="0" width="125" height="92" class="module_thumb_fea" onError="thumberror(this);"/></a><br />';h+='<div style="padding-right:5px;">';if(b!=null&&b>0&&g!=null&&g>0){h+='<a href="'+d+'" class="fea_rgt_title"> Season '+b+" : Episode "+g+"</a><br /></div>"}h+="</div>";return h}function sideBarRenderItem(c,b,g,a){var f=/<\S[^><]*>/g;var d="";if(c==""){c="http://media1.break.com/static/live/v1/img/notavailable.gif"}d+='<div class="rgt_fea_item">';d+='<a href="'+b+'" title="'+thumbStrip_html_entity_decode(a).replace(f,"").replace('"',"'").replace(/'&gt;/,"")+'">';d+='<img src="'+c+'" width="125" class="module_thumb_fea" border="0" />';d+="</a><br />";d+='<div style="padding-right:5px;">';d+='<a href="'+b+'" class="fea_rgt_title">'+g+"</a><br /></div></div>";return d}function thumberror(a){a.src="http://media1.break.com/static/live/v1/img/notavailable.gif"}function isUserLoggedIn(){if(GetCookie(loginstatus_ckMemberAuthentication)!=""){var a=GetCookie("MemberData");if(a==""){return false}else{}}else{return false}}function handlePostLink(a){if(!IsLoggedIn()){return}toggleBox("comment_bot",1);toggleBox("disable_comment_box",0);toggleBox("post_box",1);return false}function setCommentsCookie(b){var a=new Date();set_cookie("showcommentsalltime",b,a.getFullYear()+2,a.getMonth(),a.getDate(),"/","break.com",false)}function changeCommentsCookie(a){if(a.checked){setCommentsCookie("1")}else{setCommentsCookie("0")}}function setFeaThumbsCookie(b){var a=new Date();set_cookie("showfeathumbs",b,a.getFullYear()+2,a.getMonth(),a.getDate(),"/","break.com",false)}function changeFeaThumbsCookie(){var a=getCookie("showfeathumbs");if(a==1){setFeaThumbsCookie("0")}else{setFeaThumbsCookie("1")}}function setRecThumbsCookie(b){var a=new Date();set_cookie("showrecthumbs",b,a.getFullYear()+2,a.getMonth(),a.getDate(),"/","break.com",false)}function changeRecThumbsCookie(){var a=getCookie("showrecthumbs");if(a==1){setRecThumbsCookie("0")}else{setRecThumbsCookie("1")}}function adjustModuleCounter(a,b){switch(a){case"rec":counterRecommended+=b;break;case"partner":counterPartner+=b;break;case"related":counterRelated+=b;break;case"ads":counterAds+=b;break;case"dugg":counterDugg+=b;break;case"featured":counterFeatured+=b;break;case"channel":counterChannel+=b;break}}function getCurrentCounter(b){var a;switch(b){case"rec":a=counterRecommended;break;case"partner":a=counterPartner;break;case"related":a=counterRelated;break;case"ads":a=counterAds;break;case"dugg":a=counterDugg;break;case"featured":a=counterFeatured;break;case"channel":a=counterChannel;break}return a}function animateThumbs_gt(a,f){var g=jQuery("#thumbstrip_"+a);var b=g.children().length;var d=getCurrentCounter(a);var c=d*140;if(f=="1"){if(d<b-5){c=(c+420);adjustModuleCounter(a,3)}else{if(d==b-5){c=(c+280);adjustModuleCounter(a,2)}else{if(d==b-4){c=(c+140);adjustModuleCounter(a,1)}}}}else{if(d>2){c=(c-420);adjustModuleCounter(a,-3)}else{if(d==2){c=(c-280);adjustModuleCounter(a,-2)}else{if(d==1){c=(c-140);adjustModuleCounter(a,-1)}else{c=0}}}}c=c*-1;g.animate({left:c},350)}function animateThumbs(a,f){var g=jQuery("#thumbstrip_"+a);var b=g.children().length;var d=getCurrentCounter(a);var c=d*170;if(f=="1"){if(d<b-5){c=(c+510);adjustModuleCounter(a,3)}else{if(d==b-5){c=(c+340);adjustModuleCounter(a,2)}else{if(d==b-4){c=(c+170);adjustModuleCounter(a,1)}}}}else{if(d>2){c=(c-510);adjustModuleCounter(a,-3)}else{if(d==2){c=(c-340);adjustModuleCounter(a,-2)}else{if(d==1){c=(c-170);adjustModuleCounter(a,-1)}else{c=0}}}}c=c*-1;g.animate({left:c},350)}var sendingURL=document.referrer;var googleRefTest=sendingURL.match(/google.com/);var diggRefTest=sendingURL.match(/digg.com/);var whichReferrer;if(googleRefTest){whichReferrer="google"}else{if(diggRefTest){whichReferrer="digg"}else{whichReferrer="none"}}function referrer_IsSearchReferrer(){var a=document.referrer;var b=a.match("google.com")||a.match("bing.com")||a.match("yahoo.com");return b}function ETSTrackSearchButtonEvent(){var a=new ETSBase("B_SEARCH_EVNT");a.addControl("ctl_search_tb");a.execute()}function validateSearch(){var a=document.getElementById("SearchTextbox1");var b="";if(a==null){return false}b=a.value;b=b.replace(/^\s*|\s*$/g,"");return b.length!=0}function ageInit(){var a=-1;a=age.search(/uav=/gi);if(a!=-1){age=age.substr(a+4,age.length);a=age.search(/&/gi);if(a!=-1){age=age.substr(0,a)}}}function getCookieValue(b){var a=new RegExp(escape(b)+"=([^;]+)");if(a.test(document.cookie+";")){a.exec(document.cookie+";");return unescape(RegExp.$1)}else{return false}}function openWidget(a){window.open("http://break.transpera.com/users/new?content_id="+a,"","width=320,height=250,left=500,top=350")}function getQueryString(a){var c=window.location.search.substring(1);var d=c.split("&");for(var b=0;b<d.length;b++){var f=d[b].split("=");if(f[0]==a){return f[1]}}return""}function getReferrerQueryString(d){var g=document.referrer;var c=g.split("?");var a="";if(c[1]!=null){a=c[1].split("&")}for(var f=0;f<a.length;f++){var b=a[f].split("=");if(b[0]==d){return b[1]}}return""}function showHideComments(){obj=document.getElementById("alwaysShowComments");if(obj.checked==true){alert("show comments, set cookie")}else{alert("hide comments, set cookie")}}function hideFlashPlayerDiv(){if(document.getElementById){document.getElementById("defaultDiv").style.visibility="hidden"}else{if(document.layers){document.defaultDiv.visibility="hidden"}else{document.all.defaultDiv.style.visibility="hidden"}}}function showFlashPlayerDiv(){if(document.getElementById){document.getElementById("defaultDiv").style.visibility="visible"}else{if(document.layers){document.defaultDiv.visibility="visible"}else{document.all.defaultDiv.style.visibility="visible"}}}function hideHPVSDiv(){if(document.getElementById){document.getElementById("videoplayer").style.visibility="hidden"}else{if(document.layers){document.videoplayer.visibility="hidden"}else{document.all.videoplayer.style.visibility="hidden"}}}function showHPVSDiv(){if(document.getElementById){document.getElementById("videoplayer").style.visibility="visible"}else{if(document.layers){document.videoplayer.visibility="visible"}else{document.all.videoplayer.style.visibility="visible"}}}function memberEnterGotm(){if((memberCookie||memberRememberCookie)!=null){window.location="http://www.break.com/gotm/gotm.html"}else{window.location="http://info.break.com/static/live/v1/pages/ageverification_gotm.html"}}function openWidget(a){window.open("http://break.transpera.com/users/new?content_id="+a,"","width=335,height=250,left=500,top=350,scrollbars=1")}var inappropriateJson=new BreakJSON();var promoteJson=new BreakJSON();var contentId="";var thePopUpDiv="addtofavspop";function markInappropriateResponse(a){inappropriateJson.sendEnd();if(a.Response.Code==0){displayResponse(thePopUpDiv,"This video has been marked as inappropriate.")}else{displayResponse(thePopUpDiv,a.Response.Message)}}function markSpamResponse(a){inappropriateJson.sendEnd();if(a.Response.Code==0){displayResponse(thePopUpDiv,"This video has been marked as spam.")}else{displayResponse(thePopUpDiv,a.Response.Message)}}function closeSpamMsg(){document.getElementById("SpamMsgSpan").innerHTML="";document.getElementById("SpamMsgAnchor").innerHTML=""}function promoteToHomePageResponse(a){promoteJson.sendEnd();if(a.Response.Code==0){displayResponse(thePopUpDiv,"Thank you for voting.")}else{displayResponse(thePopUpDiv,a.Response.Message)}}function markSpam(d,c,f,b){var g=true;var a=getCookie("spamid");var h="";if(a!=null&&a.indexOf(c)!=-1){g=false}if(g){setCookie("spamid",c,10);inappropriateJson.sendBegin("http://websvc.break.com/CMS/Handlers/ContentFeedback/ContentFeedbackHandler.ashx?invoke=markspam&memberId="+d+"&contentId="+c+"&feedbackType="+f+"&feedbackValue="+b+"&siteId=1","markSpamResponse")}else{displayResponse(thePopUpDiv,"This video has already been marked as spam.")}}function markInappropriate(d,c,f,b){var g=true;var a=getCookie("ids");var h="";if(a!=null&&a.indexOf(c)!=-1){g=false}if(g){setCookie("ids",c,10);h=getCookie("USERIP");if(h==null){h=""}inappropriateJson.sendBegin("http://websvc.break.com/CMS/Handlers/ContentFeedback/ContentFeedbackHandler.ashx?invoke=markinappropriate&memberId="+d+"&contentId="+c+"&ip="+h+"&feedbackType="+f+"&feedbackValue="+b+"&siteId=1","markInappropriateResponse")}else{displayResponse(thePopUpDiv,"This video has already been marked as inappropriate.")}}function promoteToHomePage(d,c,f,b){var g=true;var a=getCookie("promotids");var h="";if(a!=null&&a.indexOf(c)!=-1){g=false}if(g){setCookie("promotids",c,10);h=getCookie("USERIP");if(h==null){h=""}inappropriateJson.sendBegin("http://websvc.break.com/CMS/Handlers/ContentFeedback/ContentFeedbackHandler.ashx?invoke=promotehomepage&memberId="+d+"&contentId="+c+"&ip="+h+"&feedbackType="+f+"&feedbackValue="+b+"&siteId=1","promoteToHomePageResponse")}else{displayResponse(thePopUpDiv,"You have already voted on this content.")}}function displayResponse(a,b){if(msgVersion=="new"){displayInfoDiv(b)}else{document.getElementById("addtofavspop").innerHTML=b;toggleBox(a,1)}}var versionFlash=8;var versionWMV=9;var agt=navigator.userAgent.toLowerCase();var ie=(agt.indexOf("msie")!=-1);var ns=(navigator.appName.indexOf("Netscape")!=-1);var win=((agt.indexOf("win")!=-1)||(agt.indexOf("32bit")!=-1));var mac=(agt.indexOf("mac")!=-1);var opera=(agt.indexOf("Opera")!=-1);var pluginlist="";if(ie){if(detectIEFlash("ShockwaveFlash.ShockwaveFlash")){pluginlist+="Flash"}}else{if(ns){if(detectNSFlash("Shockwave Flash")){pluginlist+="Flash"}}else{nse="";for(var i=0;i<navigator.mimeTypes.length;i++){nse+=navigator.mimeTypes[i].type.toLowerCase()}pluginlist=otherDetect("application/x-shockwave-flash","Flash");pluginlist=pluginlist.substring(0,pluginlist.length-1)}}function detectIEFlash(b){result=false;var f;try{var a=new ActiveXObject(b);f=a.GetVariable("$version")}catch(d){}if(f){version=f.substring(3,f.length-7);var c=f.split(" ");if(c.length>1){version=c[1]}c=version.split(",");if(c.length>0){version=c[0]}if(!isNaN(version)){if(version>=versionFlash){result=true}}}return result}function detectIEWMV(a){v_mediaplayer=0;result=false;document.write("<SCRIPT LANGUAGE=VBScript> \n");document.write("on error resume next \n");document.write('set myObject = CreateObject("'+a+'")\n');document.write("result = ( IsObject(myObject))\n");document.write("v_mediaplayer = myObject.versionInfo\n");document.write("</SCRIPT> \n");if(v_mediaplayer>=9){}result=true;return false}function detectNSFlash(a){result=false;var c=0;var b=navigator.plugins[a];if(b){if(b.description){c=parseInt(b.description.replace(/^[^\d]*/,""))}}if(c>=versionFlash){result=true}return result}function detectNSWMV(b){result=false;var a=navigator.plugins[b];if(a){if(a.description){result=true}}return false}function otherDetect(b,a){n="";if(nse.indexOf(b)!=-1){if(navigator.mimeTypes[b].enabledPlugin!=null){n=a+","}return n}}function cookieDetect(){if(navigator.userAgent.toLowerCase().indexOf("iphone")!=-1){var a='<div id="brk-iphone-pic"><img SRC="'+sGlobalThumbnailURL+'" width="608" style="width:608px;height:'+sGlobalPlayerHeight+'px;">';a+='<a class="iphone-overlay" HREF="'+sGlobalFileName+".mp4?"+sGlobalToken+'" style="width:608px;height:'+sGlobalPlayerHeight+'px;">';a+="&nbsp;</a></div>";var b=document.getElementById("playerwrap");b.innerHTML=a}else{if(pluginlist){if((pluginlist.indexOf("Flash")!=-1)){flashOutPut();hideVideoSettingDiv()}else{nothingActivate()}}else{flashOutPut()}}}function nothingActivate(){obj=document.getElementById("defaultDiv");obj.innerHTML='<div style="float;left;width:464px;"><a href="http://www.adobe.com/products/flashplayer/" target="_blank" style="text-decoration:none;"><img src="http://media1.break.com/static/live/v1/img/getflash/flash_icon_lrg.gif" border="0"/><br/>Get Flash</a><br/><br/><br/><br/></div>';hideVideoSettingDiv()}function hideVideoSettingDiv(){var a=document.getElementById("videoSettingDiv");if(a!=null){a.style.display="none"}}function getCookie(a){var b=document.cookie.indexOf(a+"=");var c=b+a.length+1;if((!b)&&(a!=document.cookie.substring(0,a.length))){return null}if(b==-1){return null}var d=document.cookie.indexOf(";",c);if(d==-1){d=document.cookie.length}return unescape(document.cookie.substring(c,d))}function setCookie(j,b,g,f,a,d){var h=new Date();h.setTime(h.getTime());if(g){g=g*10000*60*60*24}var c=new Date(h.getTime()+(g));document.cookie=j+"="+escape(b)+((g)?";expires="+c.toGMTString():"")+((f)?";path="+f:"")+((a)?";domain="+a:".break.com")+((d)?";secure":"")}var mcsHandle=null;DynamicStatsServices.prototype=new Ajax();function DynamicStatsServices(){this.method="POST";this.headerName="Content-Type";this.headerValue="application/x-www-form-urlencoded; charset=UTF-8";this.url="";this.content="";this.registry=new Array();mcsHandle=this}DynamicStatsServices.prototype.handlePostGetDynamicStats=function(){if(mcsHandle.xmlHttp.readyState==4){mcsHandle.registry[0](mcsHandle.xmlHttp.responseXML,mcsHandle.xmlHttp.status==200);mcsHandle.registry[0]=null}};DynamicStatsServices.prototype.handlePostContentComment=function(){if(mcsHandle.xmlHttp.readyState==4){mcsHandle.registry[1](mcsHandle.xmlHttp.responseXML,mcsHandle.xmlHttp.status==200)}else{mcsHandle.registry[1]("Yo Man Yo",true)}};DynamicStatsServices.prototype.handleThirdPartyComment=function(){if(mcsHandle.xmlHttp.readyState==4){mcsHandle.registry[2](mcsHandle.xmlHttp.responseText,mcsHandle.xmlHttp.status==200);mcsHandle.registry[2]=null}};DynamicStatsServices.prototype.postGetDynamicStats=function(b,a){this.registry[0]=a;this.url="/WebAPI/InvokeCMS/CMSWebDynamicStatsAPI/GetDynamicStats";this.content="rType=JSON";this.content+="&siteKey=break";this.content+="&contentId="+b;this.send(this.method,this.url,this.headerName,this.headerValue,null,null,this.content,this.handlePostGetDynamicStats)};DynamicStatsServices.prototype.postContentComment=function(h,f,g,d,a,c,b){this.registry[1]=b;this.url="/WebAPI/InvokeCMS/CMSWebCommentsAPI/PostContentComment";this.content="siteId=1&encryptedMemberId="+f+"&encryptedContentId="+g+"&commentId="+escape(d)+"&title="+encodeURIComponent(a)+"&comment="+encodeURIComponent(c);this.send(this.method,this.url,this.headerName,this.headerValue,null,null,this.content,this.handlePostContentComment)};DynamicStatsServices.prototype.postCommentToThirdParty=function(f,a,j,k,g,l,c,b,h,d){this.registry[2]=d;this.url="/WebAPI/InvokeCMS/CMSWebCommentsAPI/PostCommentToThirdParty";this.content="postTitle="+encodeURIComponent(f)+"&postCaption="+encodeURIComponent(a)+"&thirdPartyName="+j+"&comment="+k+"&pageUrl="+g+"&videoDesc="+encodeURIComponent(l)+"&videoUrl="+c+"&videoThumbNail="+b+"&videoTitle="+encodeURIComponent(h);this.send(this.method,this.url,this.headerName,this.headerValue,null,null,this.content,this.handleThirdPartyComment)};var mcs=new DynamicStatsServices();var postReply=true;var postedPopUpMessage='<span style="font-family:verdana;font-size:10px;color:#000;">Your comment has been received.<br>It will be posted shortly.</span>';var xpos=0;var ypos=0;var TimeoutID;var lastsubject="";var lastcomment="";var lastcommentreplyid;var openReplies=-1;var fromId=document.cookie;var spamJson=new BreakJSON();function ShowLinkbackBox(){var a=document.getElementById("linkback_box");if(a.style.display=="none"){a.style.display="block"}else{a.style.display="none"}}function getDynamicStats(a){BrowserDetect.init();mcs.postGetDynamicStats(a,postDynamicStatsCallback)}function postDynamicStatsCallback(XmlDoc,isOk){if(!isOk&&!((typeof(newCdp)=="undefined")?false:newCdp)){documentWriter("comment_bot",renderDefultComments());return}if(!((typeof(newCdp)=="undefined")?false:newCdp)){document.getElementById("comment_bot").innerHTML=""}var error="parsing JSON.";try{if(BrowserDetect.browser=="Firefox"){XmlDoc.normalize()}var messageNode=XmlDoc.getElementsByTagName("Message");var jsonDoc;jsonDoc=messageNode[0].firstChild.nodeValue;var objResp=eval("("+jsonDoc+")");error="processing renderPosted";if(undefined!=objResp.DynamicStats.Stats){documentWriter("posted_box",renderPosted(objResp.DynamicStats.Stats))}error="processing renderViews";if(undefined!=objResp.DynamicStats.Stats){documentWriter("stats_views",renderViews(objResp.DynamicStats.Stats))}error="processing renderCommentCount";if(undefined!=objResp.DynamicStats.Stats){var commentsDiv="stats_comments_uml";if(isUGC==false&&whichReferrer!="google"){commentsDiv="stats_comments"}documentWriter(commentsDiv,renderCommentCount(objResp.DynamicStats.Stats))}if(!((typeof(newCdp)=="undefined")?false:newCdp)){error="processing renderLowerCommentCount";if(undefined!=objResp.DynamicStats.Stats){documentWriter("comments_count",renderLowerCommentCount(objResp.DynamicStats.Stats))}error="processing renderComments";if(undefined!=objResp.DynamicStats.CommentsDetail){currentComments=objResp.DynamicStats.CommentsDetail.Comment;renderComments(currentComments)}else{documentWriter("comment_bot",renderDefultComments())}var showComments=getCookie("showcommentsalltime");if(showComments==1){document.getElementById("chk_comments").checked=true;toggleBox("disable_comment_box",0);toggleBox("comment_bot",1)}var feaThumbsCookie=getCookie("showfeathumbs");if(feaThumbsCookie==1){toggleBox("featured_hide",0);toggleBox("featured_bot",0);toggleBox("featured_show",1)}var recThumbsCookie=getCookie("showrecthumbs");if(recThumbsCookie==1){toggleBox("recommended_hide",0);toggleBox("recommended_bot",0);toggleBox("recommended_show",1)}}error="processing linkbacks";if(undefined!=objResp.DynamicStats.Linkbacks){renderLinkbacks(objResp.DynamicStats.Linkbacks.Linkback)}else{renderDefaultLinkbacks()}}catch(e){}return}function renderDefultComments(){var a="";a+="No Comments.";return a}function renderViews(b){var a="";a+=placeCommasInNumber(b.Views);return a}function renderCommentCount(b){var a="";a+=b.Comments;return a}function renderLowerCommentCount(a){if(parseInt(a.Comments)==0){return"0 Comments"}if(parseInt(a.Comments)<11){return"1 - "+parseInt(a.Comments)+" of "+parseInt(a.Comments)+" Comments"}else{return"1 - 10 of "+parseInt(a.Comments)+" Comments"}}function renderPosted(b){var a="";a+=b.Posted;return a}function renderDefaultLinkbacks(){if(document.getElementById("linkback_box_nocontent")){document.getElementById("linkback_box_nocontent").style.display="block"}else{document.getElementById("whoslinking-module-wrap").style.display="block";document.getElementById("whoslinking-nocontent").style.display="block"}}function renderLinkbacks(d){if(document.getElementById("linkback_box_nocontent")){document.getElementById("linkback_box_content").style.display="block"}else{document.getElementById("whoslinking-module-wrap").style.display="block";document.getElementById("whoslinking-linkback-content").style.display="block"}if(document.getElementById("linkback_box_content_div")){var b=document.getElementById("linkback_box_content_div");b.innerHTML=""}else{var b=document.getElementById("linkbacks-content-wrap");b.innerHTML=""}var c=new Array();if(typeof(d.length)=="undefined"){c[0]=d}else{c=d}if(c.length>0){for(i=0;i<c.length;i++){var a=c[i].ReferrerURL;if(a.length>55){a=a.substring(0,55)+"..."}b.innerHTML+="<div><span>"+c[i].Views+'</span> views via <a class="break-link" href="'+c[i].ReferrerURL+'">'+a+"</a></div>"}}}function renderComments(k){var d=false;var f=false;var c;var g=new Array();if(k.length>0){var h=document.getElementById("comment_bot");for(i=0;i<k.length;i++){d=(k[i].ContentCommentID==k[i].ParentContentCommentID)?false:true;node=document.createElement("div");if(d){node.innerHTML=buildReplyComment(k[i].ContentCommentID,k[i].DateCreated,k[i].ByNickName,k[i].ByAvatarURL,k[i].Title,k[i].DiscussionText);c=document.getElementById("comment"+k[i].ParentContentCommentID);if(c!=null){document.getElementById("container"+k[i].ParentContentCommentID).appendChild(node)}else{if(typeof(g[k[i].ParentContentCommentID])=="undefined"){g[k[i].ParentContentCommentID]=new Array()}g[k[i].ParentContentCommentID].push(node)}}else{node.innerHTML=buildComment(k[i].ContentCommentID,k[i].DateCreated,k[i].ByNickName,k[i].ByAvatarURL,k[i].Title,k[i].DiscussionText);if(f){h.insertBefore(node,h.firstChild)}else{h.appendChild(node)}}}var j=document.createElement("div");j.setAttribute("class","module_comment_ctrl");j.setAttribute("className","module_comment_ctrl");j.innerHTML='<a href="http://my.break.com/Content/Comment/ContentComment.aspx?ContentID='+sGlobalContentID+'">View All</a>';h.appendChild(j);for(var b in g){try{if(document.getElementById("container"+b)!=null){for(i=0;i<g[b].length;i++){document.getElementById("container"+b).appendChild(g[b][i])}}}catch(a){continue}}}else{if(k.ContentCommentID){var h=document.getElementById("comment_bot");node=document.createElement("div");node.innerHTML=buildComment(k.ContentCommentID,k.DateCreated,k.ByNickName,k.ByAvatarURL,k.Title,k.DiscussionText);h.appendChild(node)}}}function documentWriter(c,a){var b=document.getElementById(c);if(b){b.innerHTML=a}}function buildComment(h,f,a,d,c,b){var g="";c=unescape(c);b=unescape(b);g+='<div class="comment_entry" id="comment'+h+'">';g+='<div class="comment_avatar"><a href="http://www.break.com/user/'+a+'"><img src="'+d+'" border="0" width="50" height="50" class="comment_avatar" onerror="onMissingAvatar(this)" /></a></div>';g+='<div class="comment_nonavatar">';g+='<div class="comment_entry_top">';g+='<div class="comment_entry_date">';g+=GetSpamLink(h)+f;if(canPost){g+=writeReplyLink(h)}g+="</div>";g+='<a href="http://www.break.com/user/'+a+'" class="comment_entry_link">'+a+"</a> says:";g+="</div>";g+='<div class="comment_entry_bot">';g+='<div class="comment_quote_lft">';g+='<img src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif" border="0" />';g+="</div>";g+='<div class="comment_quote">'+b+"</div>";g+='<div class="comment_quote_rgt"><img src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif" border="0" /></div>';g+="</div>";g+="</div>";g+="</div>";g+="<!-- COMMENT REPLY start -->";g+='<div id="newPopup_post_reply'+h+'" class="post_box">';g+='<div class="post_box_wrap">';g+="<a href=\"javascript:toggleBox('newPopup_post_reply"+h+'\',0);" class="comment_entry_link_sml">Close</a><br /><br />';g+='<input type="button" value="Post" onclick="javascript:submitReplyComment('+h+',false);" /><br />';g+="</div>";g+='<textarea class="post_text" id="post_text'+h+'"></textarea><div id="commentReplyBodyError'+h+'"></div>';g+="</div>";g+="<!-- COMMENT REPLY end -->";g+='<div id="container'+h+'" style="padding-top:0;margin-top:0;">';return g}function writeReplyLink(b){var a="";a+=' <a id="reply'+b+'" href="javascript:toggleBox(\'newPopup_post_reply'+b+"', 1);javascript:toggleBox('post_box', 0); closeOpenReplies("+b+');">REPLY</a>';return a}function noCallBack(a){}function buildReplyComment(j,d,k,a,b,c,h,g){var f="";b=unescape(b);c=unescape(c);f+='<div class="comment_entry_sml" id="comment'+j+'">';f+='<div class="comment_avatar"><a href="#"><img src="'+a+'" border="0" width="50" height="50" class="comment_avatar" onerror="onMissingAvatar(this)" /></a></div>';f+='<div class="comment_nonavatar2">';f+='<div class="comment_entry_top_sml">';f+='<div class="comment_entry_date"> '+GetSpamLink(j)+d+" </div>";f+='<a href="http://www.break.com/user/'+k+'" class="comment_entry_link">'+k+"</a> says:";f+="</div>";f+='<div class="comment_entry_bot_sml">';f+='<div class="comment_quote_lft"><img src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif" border="0" /></div>';f+='<div class="comment_quote_sml">';f+=c;f+="</div>";f+='<div class="comment_quote_rgt"><img src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif" border="0" /></div>';f+="</div>";f+="</div>";f+="</div>";return f}function GetSpamLink(a){var b="";if(canPost!=""){b="[ <a href='javascript:SentSpam("+a+");'>spam</a> ] "}return b}function SentSpam(b){if(IsLoggedIn()){var a=getEncodedMemberID();spamJson.sendBegin("http://websvc.break.com/cms/Handlers/Spam/SpamHandler.ashx?invoke=reportcomment&memberId="+a+"&commentId="+b,"updateCommentSpam")}else{openLoginOverlay()}}function updateCommentSpam(a){alert("Thank you for Marking as Spam.")}function closeOpenReplies(a){if(openReplies>-1&&openReplies!=a){toggleBox("newPopup_post_reply"+openReplies,0)}openReplies=a}function onMissingAvatar(a){a.src="http://media1.break.com/static/live/v1/img/site/avatar_mini.gif"}function IsMeaningless(b){var a=b.split(" ");for(i=0;i<a.length;i++){if(a[i]!=""){return false}}return true}function submitReplyComment(f,c){var b="";var d="";var a=false;var j=getEncodedMemberID();var g="post_text"+f;if(c==true){g="toprated_"+g}d=document.getElementById(g).value;if(d==""||IsMeaningless(d)){displayMessage("commentReplyBodyError"+f,"You must specify a comment.");a=true}if(a){return}hideReplyMessage(f,c);var h="newPopup_post_reply"+f;if(c==true){h="toprated_"+h}toggleBox(h,0);mcs.postContentComment(siteId,j,sGlobalContentID,f,b,d,postContentCommentCallback);_gaq.push(["_trackEvent","user","post_reply",thisURL]);lastcomment=d;lastcommentreplyid=f;lastsubject=b}function submitComment(){var a="";var b="";var d=false;var c=getEncodedMemberID();b=document.getElementById("taReplyComments").value||document.getElementById("taReplyCommentsVideoDetails").value;if(b==""||IsMeaningless(b)){displayMessage("commentBodyReplyError","You must specify a comment.");d=true}if(!((typeof(newCdp)=="undefined")?false:newCdp)){if(c==null){d=true}if(d){return}hideMessage();toggleBox("post_box",0)}_gaq.push(["_trackEvent","user","post_comment",thisURL]);mcs.postContentComment(siteId,c,sGlobalContentID,0,a,b,postContentCommentCallback);lastcomment=b;lastcommentreplyid=0;lastsubject=a}function submitCommentToThirdPartySite(a){if(a!==null){if(a.toString()==="0"||a.toString()==="false"){return}ThirdPartyMember.getName(function(b){var h=b[0];var d=lastcomment;if(d===""||d===null){return}var f=h.first_name+" commented on the "+getMetaDataByName("embed_video_title")+" video";var g={name:f,href:window.location.href,description:getMetaDataByName("embed_video_description"),media:[{type:"video",video_src:getMetaDataByName("embed_video_url"),preview_img:getMetaDataByName("embed_video_thumb_url"),video_title:getMetaDataByName("embed_video_title")}]};var c=[{text:"Watch Video",href:window.location.href}];mcs.postCommentToThirdParty(f,"",ThirdPartyMember.getThirdPartyName(),d,window.location.href,getMetaDataByName("embed_video_description"),getMetaDataByName("embed_video_url"),getMetaDataByName("embed_video_thumb_url"),getMetaDataByName("embed_video_title"),thirdPartyCommentSent)})}}function thirdPartyCommentSent(a,b){}function insertComment(h,o,p,r,a){if(a==""){a="You"}var k;if(r==""){r="http://media1.break.com/dnet/media/AVATARS/NeutralAvatar.jpg"}var b=new Date();var c=(b.getMonth()+1)+"/"+b.getDate()+"/"+b.getFullYear();var m=b.getHours();var f=m<12?"AM":"PM";if(m>12){m=m-12}c+=" "+m+":"+b.getMinutes()+":"+b.getSeconds()+" "+f;if(h==0){if(typeof(canPost)=="undefined"){canPost=IsLoggedIn()}var d=canPost;canPost=false;if(!((typeof(newCdp)=="undefined")?false:newCdp)){k=buildComment(0,c,a,r,o,p)}else{k=RenderReplyComment(0,c,a,r,o,p)}canPost=d;var j=document.getElementById("comment_bot").innerHTML;j=k+j;document.getElementById("comment_bot").innerHTML=j}else{if(!((typeof(newCdp)=="undefined")?false:newCdp)){k=buildReplyComment(1,c,a,r,o,p)}else{k=RenderReplyComment(1,c,a,r,o,p)}var s="container"+h;if(isTopRatedSelectedTab()==true){s="toprated_"+s}var g=document.getElementById(s);var q=k+g.innerHTML;g.innerHTML=q}var l=document.getElementById("comments_divider_bottom");l.style.visibility="visible"}function isTopRatedSelectedTab(){if(jQuery("#tab-header-videodetails").is(".tab-header-active")){return true}else{if(jQuery("#tab-header-galleryphotodetails").is(".tab-header-active")){return true}else{return false}}}function closeAllotherBoxes(){try{hideBox("popup_box_share",0)}catch(a){}try{hideBox("popup_box_embed",0)}catch(a){}try{hideBox("popup_box_add",0)}catch(a){}}function displayMessage(a,b){document.getElementById(a).innerHTML=b;document.getElementById(a).style.display="block"}function hideMessage(){document.getElementById("commentBodyReplyError").style.display="none"}function hideReplyMessage(c,a){var b="commentReplyBodyError"+c;if(a==true){b="toprated_"+b}document.getElementById(b).style.display="none"}function postContentCommentCallback(a,d){if(!d){return}try{var g=a.documentElement;if(g.getAttribute("Code")<0){if(g.getAttribute("Code")<-2){displayMessage("genericError",g.getAttribute("Message"))}}else{document.getElementById("taReplyComments").value="";document.getElementById("taReplyCommentsVideoDetails").value="";var f;var c;var h=a.documentElement;for(i=0;i<h.childNodes.length;i++){if(h.childNodes[i].nodeName=="avatarURL"){f=h.childNodes[i].firstChild.nodeValue}else{if(h.childNodes[i].nodeName=="memberNickname"){c=h.childNodes[i].firstChild.nodeValue}}}clearDefaultComment();insertComment(lastcommentreplyid,lastsubject,lastcomment,f,c)}return}catch(b){document.getElementById("taReplyComments").value="";document.getElementById("taReplyCommentsVideoDetails").value=""}}jQuery(document).ready(function(){if(IsLoggedIn()){jQuery("#vdPostCommentButton").bind("click",function(){jQuery("#tab-header-comments").click()})}});function getEncodedMemberID(){var a=getCookie("MemberID");if(a!=null){return a}else{return null}}function placeCommasInNumber(b){b=""+b;if(b.length>3){var a=b.length%3;var c=(a>0?(b.substring(0,a)):"");for(i=0;i<Math.floor(b.length/3);i++){if((a==0)&&(i==0)){c+=b.substring(a+3*i,a+3*i+3)}else{c+=","+b.substring(a+3*i,a+3*i+3)}}return(c)}else{return b}}function isThisFirstComment(a){if(a.text()=="No Comments."){return true}else{return false}}function clearDefaultComment(){var a=jQuery("#comment_bot");if(isThisFirstComment(a)){a.empty()}}var memberId=document.cookie;try{var contentId=sGlobalContentID}catch(e){}var siteId=1;var index=memberId.search(/MemberId=/gi);var isAjaxLoggedIn=false;if(index!=-1){memberId=memberId.substr(index+9,memberId.length);index=memberId.search(/;/gi);if(index!=-1){memberId=memberId.substr(0,index)}isAjaxLoggedIn=true}else{isAjaxLoggedIn=false}function addToFavoritesCallback(a,c){if(!c){return}try{var d=a.documentElement;if(d.getAttribute("Code")<0){if(d.getAttribute("Code")==-3){displayInfoDiv("This content is already in your Favorites.");return}if(d.getAttribute("Message")!=""){displayInfoDiv(d.getAttribute("Message"))}else{displayInfoDiv("This content has been added to your Favorites.")}}else{if(d.getAttribute("Message")!=""){displayInfoDiv(d.getAttribute("Message"))}else{displayInfoDiv("This content has been added to your Favorites.")}}}catch(b){}}function addToFavorites(){ms.saveToFavorites(1,getEncodedMemberID(),sGlobalContentID,addToFavoritesCallback)}jQuery(document).ready(generateSurveyHref);function generateSurveyHref(){jQuery.extend({random:function(c){return Math.floor(c*(Math.random()%1))},randomBetween:function(d,c){return d+jQuery.random(c-d+1)}});var b=null;var a=jQuery.randomBetween(1,1);switch(a){case 1:b="http://www.breakmediapanel.com/";break;default:b="http://www.surveymonkey.com/s.aspx?sm=Z6TPogdTANQ_2fqdtk20GcIA_3d_3d"}jQuery("#cdpSurveyLink").attr("href",b);return}jQuery(function(a){if(a(".scroll-static").length){a(".scroll-static").scrollable({size:3,speed:500,items:".thumbstrip"});adjNaviOffset()}});function initThumbScroller(a){jQuery(function(b){b(a).parent().scrollable({size:3,speed:500,items:".thumbstrip"})});adjNaviOffset()}function adjNaviOffset(){jQuery(function(b){var a=b(".navi");if(a.length){a.each(function(g){var c=a.eq(g);var f=c.children().length;var d=295-((f-1)*8);if(b(this).hasClass("gt-navi")){d-=34}if(f>1){c.css("margin-left",d+"px")}})}})}function toggleModule(){jQuery(function(a){a(document).ready(function(){if(a(".toggle-module").length){a(".toggle-module").each(function(){var b=a(this).attr("id");var c=a.cookie(b);a(".toggle-button",this).addClass("toggle-button-open");if(a(this).hasClass("toggle-moduleopen")||(c==1)){a(".toggle-modulecontent",this).show();a(".toggle-button",this).addClass("toggle-button-close");a(".toggle-button",this).removeClass("toggle-button-open");if(!a(this).hasClass("toggle-moduleopen")){a(this).addClass("toggle-moduleopen")}}if(c==0){a(".toggle-modulecontent",this).hide();a(".toggle-button",this).removeClass("toggle-button-close");a(".toggle-button",this).addClass("toggle-button-open");if(a(this).hasClass("toggle-moduleopen")){a(this).removeClass("toggle-moduleopen")}}})}});a(".toggle-module-hotspot",this).click(function(){if(a(this).parents(".toggle-module").hasClass("toggle-moduleopen")){var b=a(this).parents(".toggle-module").attr("id");a.cookie(b,"0",{path:"/",expires:10});a(this).parents(".toggle-module").removeClass("toggle-moduleopen");a(this).parents(".toggle-module").find(".toggle-button").addClass("toggle-button-open");a(this).parents(".toggle-module").find(".toggle-button").removeClass("toggle-button-close");a(this).parents(".toggle-module").find(".toggle-modulecontent").hide()}else{var b=a(this).parents(".toggle-module").attr("id");a.cookie(b,"1",{path:"/",expires:10});a(this).parents(".toggle-module").addClass("toggle-moduleopen");a(this).parents(".toggle-module").find(".toggle-button").addClass("toggle-button-close");a(this).parents(".toggle-module").find(".toggle-button").removeClass("toggle-button-open");a(this).parents(".toggle-module").find(".toggle-modulecontent").show()}})})}function tabToggleModule(a){jQuery(function(b){b(document).ready(function(){if(b(".tab-header").length){function f(g){b(".tab-header").each(function(){b(".tab-header").removeClass("tab-header-active")});b("#tab-header-comments").removeClass("tab-header-inactive");b("#tab-header-comments").addClass("tab-header-active");if(g){}c(this)}if(typeof(a)!="undefined"){switch(a){case"comments":f();loadCommentsIntoTab();break}}else{var d=getQueryString("comments");if(d==1){f();loadCommentsIntoTab()}}b(".tab-header").each(function(){if(b(this).hasClass("tab-header-active")){var g=b(".tab-header").index(this);b(".tab-content").eq(g).show()}else{b(this).addClass("tab-header-inactive")}});if(b(".tab-header:first").hasClass("tab-header-active")){b("#tab-header-left").removeClass("tab-header-left-inactive");b("#tab-header-left").addClass("tab-header-left-active")}else{b("#tab-header-left").addClass("tab-header-left-inactive")}if(b(".tab-header:last").hasClass("tab-header-active")){b("#tab-header-right").removeClass("tab-header-right-inactive");b("#tab-header-right").addClass("tab-header-right-active")}else{b("#tab-header-right").addClass("tab-header-right-inactive")}}b(".tab-header").click(function(){b(".tab-header").each(function(){b(".tab-header").removeClass("tab-header-active");b("#tab-header-left").removeClass("tab-header-left-active");b("#tab-header-left").addClass("tab-header-left-inactive");b("#tab-header-right").removeClass("tab-header-right-active");b("#tab-header-right").addClass("tab-header-right-inactive");b(".tab-header").addClass("tab-header-inactive")});b(this).removeClass("tab-header-inactive");b(this).addClass("tab-header-active");if(b(".tab-header:first").hasClass("tab-header-active")){b("#tab-header-left").removeClass("tab-header-left-inactive");b("#tab-header-left").addClass("tab-header-left-active")}if(b(".tab-header:last").hasClass("tab-header-active")){b("#tab-header-right").removeClass("tab-header-right-inactive");b("#tab-header-right").addClass("tab-header-right-active")}c(this)});function c(h){var g=b(".tab-header").index(h);b(".tab-content").each(function(){b(".tab-content").hide()});b(".tab-content").eq(g).show()}});b(".tab-header").click(function(){updateGtUnderline()});updateGtUnderline()})}function updateGtUnderline(){jQuery(function(a){var d=a("body").attr("id");var c=a("#tab-header-comments").hasClass("tab-header-active");var b=a(".tab-underline");if(d=="game-trailers"&&c){b.addClass("comments-underline")}else{b.removeClass("comments-underline")}})}var globalCommentsLoaded=false;var globalCommentClick=false;function loadCommentsIntoTab(){globalCommentsLoaded=true;globalCommentClick=true;if(jQuery("body").attr("id")=="game-trailers"){DisplayComments("date",sGlobalContentID,1,"game-trailers")}else{DisplayComments("date",sGlobalContentID,1)}}jQuery(document).ready(function(){if(jQuery("#tab-header-comments").hasClass("tab-header-active")){}jQuery("#tab-header-comments").click(function(){if(globalCommentsLoaded!=true){loadCommentsIntoTab()}})});function writeSpamButton(){var a;if((memberCookie||memberRememberCookie)!=null){a='<div id="marks" class="st-msg-trigger"><span>Mark as Spam</span></div>'}else{a='<div class="checkLogin" id="marks"><span>Mark as Spam</span></div>'}document.write(a)}function writeInappropriateButton(){var a;if((memberCookie||memberRememberCookie)!=null){a='<div id="marki" class="st-msg-trigger"><span>Mark as Inappropriate</span></div>'}else{a='<div class="checkLogin" id="marki"><span>Mark as Inappropriate</span></div>'}document.write(a)}function writeVoteToHomeButton(){var a;if((memberCookie||memberRememberCookie)!=null){a='<div id="vote" class="st-msg-trigger"><span>Vote to Homepage</span></div>'}else{a='<div class="checkLogin" id="vote"><span>Vote to Homepage</span></div>'}document.write(a)}function writeAddToFavsButton(){var a;var b="Add to Favorites";if(IsLoggedIn()){a='<div id="addtofavs" class="st-msg-trigger"><span>'+b+"</span></div>"}else{a='<div id="addtofavs" class="checkLogin"><span>'+b+"</span></div>"}document.write(a)}function displayInfoDiv(a){msgIsActive=true;jQuery("#addtofavspop").find(".text").html(a).parent().css("min-width","150px").slideDown(250)}jQuery(function(j){var c=j("#social-tools-email-msg");var d=j("#addtofavspop");var g=false;var b=getCookie("MemberID");if(j(".st-msg-trigger").length){msgVersion="new"}if(navigator.appName!="Microsoft Internet Explorer"){j("#social-tools-wrap div").add(".soc-ico-btn").hover(function(){if(!msgIsActive){j(this).find("> span").stop().animate({opacity:1},"fast").css({display:"block"})}},function(){if(!msgIsActive){j(this).find("> span").stop().animate({opacity:0},"fast").css({display:"none"})}})}j(".st-msg-trigger").bind("click",function(){a(j(this))});function a(o){var m=o.attr("id");if(m=="social-tools-email"){k();if(c.css("display")=="none"){msgIsActive=true;g=false;o.find("span").css({opacity:0,display:"none"});c.css("white-space","nowrap").slideDown(250)}else{msgIsActive=false;c.slideUp(250)}}else{l();if(m==g){msgIsActive=false;k()}else{g=m;o.find("span").css({opacity:0,display:"none"});switch(m){case"marks":markSpam(b,sGlobalContentID,"4","1");break;case"marki":markInappropriate(b,sGlobalContentID,"0","1");break;case"vote":promoteToHomePage(b,sGlobalContentID,"2","1");break;case"addtofavs":addToFavorites();break}}}}function k(){g=false;if(d.css("display")!="none"){d.slideUp(250)}}function l(){if(c.css("display")!="none"){c.slideUp(250)}}j("#email-msg-send").click(function(m){m.preventDefault()});j(".st-msg-close").click(function(){k();l();msgIsActive=false});j("#social-tools-email-send").click(function(){j("#social-tools-email-wrap").hide()});j("#social-tools-email").click(function(){j("#social-tools-email-wrap").toggle()});j(".s-icon-closebox").click(function(m){m.preventDefault();j(this).parent().hide()});j(".soc-ico-fb").click(function(){return fbs_click()});j(".soc-ico-th-up").click(function(m){m.preventDefault();rate(1)});j(".soc-ico-th-dn").click(function(m){m.preventDefault();rate(-1)});var h=j("#st-twttr");if(h.length){var f='<iframe scrolling="no" height="20" frameborder="0" width="90" src="http://api.tweetmeme.com/button.js?url='+escape(location.href)+'&amp;style=compact&amp;source=breakcom&amp;service=brk.to">&nbsp;</iframe>';h.html(f)}});function writeMarkAsSpam(b){var c;if((memberCookie||memberRememberCookie)!=null){var a=getCookie("MemberID");c="<div onclick=\"markSpam('"+a+"','"+b+"','4','1');\" id=\"marks\"><span>Mark as Spam</span></div>"}else{c='<div class="checkLogin" id="marks"><span>Mark as Spam</span></div>'}document.write(c)}function writeMarkAsInappropriate(b){var c;if((memberCookie||memberRememberCookie)!=null){var a=getCookie("MemberID");c="<div onclick=\"markInappropriate('"+a+"','"+b+"','0','1');\" id=\"marki\"><span>Mark as Inappropriate</span></div>"}else{c='<div class="checkLogin" id="marki"><span>Mark as Inappropriate</span></div>'}document.write(c)}function writeVoteToHomepage(b){var c;if((memberCookie||memberRememberCookie)!=null){var a=getCookie("MemberID");c="<div onclick=\"promoteToHomePage('"+a+"','"+b+"','2','1');\" id=\"vote\"><span>Vote to Homepage</span></div>"}else{c='<div class="checkLogin" id="vote"><span>Vote to Homepage</span></div>'}document.write(c)}function writeAddToFavs(){var a;if(IsLoggedIn()){a='<a id="add" href="javascript:toggleBox(\'newPopup_add\', 1);addToFavorites();"><b>Add to Favs</b></a>'}else{a='<a id="add" class="checkLogin" href=""><b>Add to Favs</b></a>'}document.write(a)}function writeAddToFavorites(){var a;var b="Add to Favorites";if(IsLoggedIn()){a='<div id="addtofavs" class="bk-ga" brkga="favorite_content" onclick="addToFavorites();"><span>'+b+"</span></div>"}else{a='<div id="addtofavs" class="checkLogin bk-ga" brkga="favorite_content"><span>'+b+"</span></div>"}document.write(a)}function fbs_click(){u=location.href;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");return false}function diggRefer(){var a=document.referrer;var c=a.match(/digg.com/);var b=a.match("google.com")||a.match("bing.com")||a.match("yahoo.com");if(c){jQuery(document).ready(GetDugg)}else{if(b){conditional_RenderGoogleReferrerModules()}}}var currentDisplayCriteria="date";var currentPageNumber=1;var TotalRowCount=1;var commentsPerPage=10;function CheckLoginComments(){openLoginOverlay()}function myDateFormatter(c){var d=new Date(+c.replace(/\D/g,""));var g=d.getFullYear();var b=d.getMonth()+1<10?"0"+(d.getMonth()+1):d.getMonth();var f=d.getDay()<10?"0"+d.getDay():d.getDay();var a=f+"/"+b+"/"+g;return a}function DisplayTopRatedWhenPublishedEmpty(a){jQuery("#toprated-comments-module-wrap").html('<div id="comment_bot" style="display:block">Loading Comments . . .</div>');jQuery.getJSON("http://service.break.com/comment/toprated/"+a+"?callback=?",function(b){if(b.length<=0){jQuery("#toprated-comments-module-wrap").html('<div id="comments-noratings">There are no rated comments for this video. <a href="?comments=1">Rate a comment now.</a></div>')}else{var c="";jQuery.each(b,function(d,f){c+=RenderParentCommentForTopRated(f)});jQuery("#toprated-comments-module-wrap").html(c)}})}function DisplayChildrenOfParentComment(b){var a=jQuery("#comment_children"+b).html();if(a==""||a.indexOf("commentChildrenNotLoaded")>-1){jQuery("#comment_children"+b).html('<div id="comment_bot" style="display:block">Loading Comments . . .</div>');jQuery.getJSON("http://service.break.com/comment/childrencomments/"+b+"?callback=?",function(c){var d='<div id="comment_bot" style="display:block"></div>';jQuery.each(c,function(f,g){d+=RenderChildCommentForTopRated(g)});jQuery("#comment_children"+b).html(d);jQuery("#toprated_ViewReplies"+b).remove()})}}function GetUpdatedRatingsInfo(a){jQuery.getJSON("http://service.break.com/comment/ratingcounts/"+a+"?callback=?",function(b){jQuery.each(b,function(c,d){jQuery("#toprated_up_rating_display"+d.ContentCommentID).html(d.UpRatingCount);jQuery("#toprated_down_rating_display"+d.ContentCommentID).html(d.DownRatingCount);jQuery("#toprated_rating_display"+d.ContentCommentID).html(d.RatingTotalCount)})})}function DisplayComments(b,a,d,c){if(!globalCommentClick){return}currentDisplayCriteria=b;currentPageNumber=d;jQuery("#comments-module-wrap").html('<div id="comment_bot" style="display:block">Loading Comments . . .</div>');jQuery.getJSON("http://service.break.com/comment/detail/"+b+"/"+a+"/"+d+"/"+commentsPerPage+"?callback=?",function(f){var g='<div id="comment_bot" style="display:block"></div>';jQuery.each(f,function(h,j){if(h==0){g="";TotalRowCount=j.RowCount;g+=RenderCommentHeader(f.length,j.RowCount);g+='<div id="comment_bot" style="display:block">'}if(j.ContentCommentID==j.ParentContentCommentID){g+=RenderParentComment(j,c)}else{g+=RenderChildComment(j,c)}if(h==f.length-1){g+=RenderCommentFooter(TotalRowCount);g+="</div>"}});jQuery("#comments-module-wrap").html(g)})}function RenderCommentHeader(c,a){var h=!(jQuery("body").attr("id")=="game-trailers")?"":", 'game-trailers'";var f=new Array();var d=parseInt(Math.ceil(a/commentsPerPage));var b=(currentPageNumber==1)?1:parseInt((currentPageNumber-1)*commentsPerPage+1);var g=((currentPageNumber-1)*commentsPerPage+c);f.push('<div class="clearboth"/>');f.push('<div class="comments-header" style="float: left;">'+b+"-"+g+" of "+a+" Comments</div>");f.push('<div class="comments-header" style="float: right;"> sort by: ');if(currentDisplayCriteria=="date"){f.push('<a href="" onclick="DisplayComments(\'rating\','+sGlobalContentID+",1"+h+');return false;">rating</a> | date')}else{f.push('rating | <a href="" onclick="DisplayComments(\'date\','+sGlobalContentID+", 1"+h+');return false;">date</a>')}f.push("</div>");return f.join("")}function RenderCommentFooter(b){var a=!(jQuery("body").attr("id")=="game-trailers")?"":", 'game-trailers'";var d=parseInt(Math.ceil(b/commentsPerPage));var c=new Array();c.push('<div id="comments-footer" style="float: right;">');if(d<=1){return""}if(currentPageNumber>1){c.push('<a class="break-link" href="" onclick="DisplayComments(\''+currentDisplayCriteria+"',"+sGlobalContentID+", 1"+a+');return false;">&lt;&lt; First</a>')}else{}if(currentPageNumber>1&&currentPageNumber<=d){c.push('<a class="break-link" href="" onclick="DisplayComments(\''+currentDisplayCriteria+"',"+sGlobalContentID+","+(currentPageNumber-1)+a+');return false;"> &lt; Previous</a>')}else{}if(currentPageNumber>=1&&currentPageNumber<d){c.push(' <a class="break-link" href="" onclick="DisplayComments(\''+currentDisplayCriteria+"',"+sGlobalContentID+","+(currentPageNumber+1)+a+');return false;">Next &gt; </a>')}else{}if(currentPageNumber>=1&&currentPageNumber<d){c.push('<a class="break-link" href="" onclick="DisplayComments(\''+currentDisplayCriteria+"',"+sGlobalContentID+","+d+a+');return false;">Last &gt;&gt;</a>')}else{}c.push("</div>");return c.join("")}function RateComment(c,g){if(IsLoggedIn()){var b=jQuery.cookie("MemberID");var d="http://service.break.com/comment/rate/"+c+"/"+g+"/?callback=?";jQuery.getJSON(d,function(j){if(j.ContentCommentID>0){if(parseInt(j.Result)!="NaN"&&(parseInt(j.Result)==-1||parseInt(j.Result)==1)){var q=isTopRatedSelectedTab();var l="rating_display"+j.ContentCommentID;var p="";if(q==true){p=l;l="toprated_"+l}var o=parseInt(jQuery("#"+l).text());o+=parseInt(j.Result);jQuery("#"+l).text(o);if(q==true){jQuery("#"+p).text(o)}else{jQuery("#toprated_"+l).text(o)}if(parseInt(j.Result)==1){var h="up_rating_display"+j.ContentCommentID;var s="";if(q==true){s=h;h="toprated_"+h}var k=parseInt(jQuery("#"+h).text());k+=1;jQuery("#"+h).text(k);if(q==true){jQuery("#"+s).text(k)}else{jQuery("#toprated_"+h).text(k)}_gaq.push(["_trackEvent","click","rate_comment_up",thisURL])}else{if(parseInt(j.Result)==-1){var r="down_rating_display"+j.ContentCommentID;var m="";if(q==true){m=r;r="toprated_"+r}var v=parseInt(jQuery("#"+r).text());v+=1;jQuery("#"+r).text(v);if(q==true){jQuery("#"+m).text(v)}else{jQuery("#toprated_"+r).text(v)}_gaq.push(["_trackEvent","click","rate_comment_down",thisURL])}}}if(j.Result=="permanentban"){alert("We have determined that you were abusing our Comments Rating System, so we are permanently banning you from using it.  You really need to take a good, long look in a mirror.")}if(j.Result==0){alert("You have already rated for this comment.")}}})}else{var a=BRK.api.session,f=false;if(a!="undefined"){if(a!=null){f=true}}else{if(getCookie("brk_net_13")!=null){f=true}}if(!f){if(a!="undefined"){BRK.hat.showLoginModal();return false}}}}function CommentReply(b,a){if(IsLoggedIn()){var c="newPopup_post_reply"+b;if(a==true){c="toprated_"+c;DisplayChildrenOfParentComment(b)}toggleBox(c,1);closeOpenReplies(b)}else{openLoginOverlay()}}function RenderReplyComment(h,g,a,f,c,b){var d=new Array();if(h==0){d.push('<div class="comment_entry" id="comment'+h+'">');d.push('<div class="comment_avatar">');d.push('<a href="http://www.break.com/user/'+a+'"><img width="50" height="50" border="0" src="'+f+'" class="comment_avatar" onerror="onMissingAvatar(this)"/></a>');d.push("</div>");d.push('<div class="comment_nonavatar">');d.push('<div class="comment_entry_top"><div class="comment_entry_date"> '+g+' </div><a href="http://www.break.com/user/'+a+'" class="comment_entry_link">'+a+"</a> says:");d.push("</div>");d.push('<div class="comment_entry_bot">');d.push('<div class="comment_quote_lft"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif"/></div>');d.push('<div class="comment_quote">'+b+"</div>");d.push('<div class="comment_quote_rgt"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif"/></div>');d.push("</div>");d.push("</div>");d.push("</div>")}else{d.push('<div class="comment_entry_sml" id="comment'+h+'">');d.push('<div class="comment_avatar"><a href="http://www.break.com/user/'+a+'"><img width="50" height="50" border="0" src="'+f+'" class="comment_avatar" onerror="onMissingAvatar(this)"/></a>');d.push("</div>");d.push('<div class="comment_nonavatar2">');d.push('<div class="comment_entry_top_sml"><div class="comment_entry_date"> '+g+' </div><a href="http://www.break.com/user/'+a+'" class="comment_entry_link">'+a+"</a> says:</div>");d.push('<div class="comment_entry_bot_sml">');d.push('<div class="comment_quote_lft"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif"/></div>');d.push('<div class="comment_quote_sml">'+b+"</div>");d.push('<div class="comment_quote_rgt"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif" /></div>');d.push("</div>");d.push("</div>");d.push("</div>")}return d.join("")}function RenderParentCommentForTopRated(b,h){var c=false;var a=b.CommentEntryDate;if(a==null){a=myDateFormatter(b.DateCreated);c=true}var g="http://media1.break.com/static/live/v1/img/site/comments-ratings-up.gif";var f="http://media1.break.com/static/live/v1/img/site/comments-ratings-down.gif";if(h=="game-trailers"){g="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-up.png";f="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-down.png"}var d=new Array();d.push('<div class="comment_entry" id="toprated_comment'+b.ContentCommentID+'">');d.push('<div class="comment_avatar">');d.push('<a href="http://www.break.com/user/'+b.ByNickName+'"><img width="50" height="50" border="0" src="'+b.ByAvatarURL+'" class="comment_avatar" onerror="onMissingAvatar(this)"/></a>');d.push("</div>");d.push('<div class="comment_nonavatar">');d.push('<div class="comment_entry_top"><div class="comment_entry_date"> [<a href="javascript:void(0)"  onclick="SentSpam('+b.ContentCommentID+');return false;">spam</a>] '+a+' <a id="toprated_reply'+b.ContentCommentID+'" href="javascript:void(0)" onclick="CommentReply('+b.ContentCommentID+',true);return false;">REPLY</a> </div><a href="http://www.break.com/user/'+b.ByNickName+'" class="comment_entry_link">'+b.ByNickName+"</a> says:");d.push("</div>");d.push('<div class="comment_entry_bot">');d.push('<div class="comment_quote_lft"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif"/>');d.push("</div>");d.push('<div class="comment_quote">'+b.DiscussionText+"</div>");d.push('<div class="comment_quote_rgt"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif"/></div>');d.push('<div class="comment_rate">');if(c==true){d.push('&nbsp;&nbsp;<a class="break-link" id="toprated_ViewReplies'+b.ContentCommentID+'" href="javascript:void(0)" onclick="DisplayChildrenOfParentComment('+b.ContentCommentID+');return false;">VIEW REPLIES</a>&nbsp;&nbsp;')}d.push('Rate this comment: <a href="javascript:void(0)" class="checkLogin" border="0" onclick="RateComment('+b.ContentCommentID+',1);return false;"><img border="0" src="'+g+'"/></a><span id="toprated_up_rating_display'+b.ContentCommentID+'">'+b.UpRatingCount+'</span><a href="javascript:void(0)" border="0" onclick="RateComment('+b.ContentCommentID+',-1);return false;"><img border="0"  src="'+f+'"/></a><span id="toprated_down_rating_display'+b.ContentCommentID+'">'+b.DownRatingCount+'</span> Comment Rating: <span id="toprated_rating_display'+b.ContentCommentID+'">'+b.RatingTotalCount+"</span></div>");d.push("</div>");d.push("</div>");d.push("</div>");d.push('<div class="post_box" id="toprated_newPopup_post_reply'+b.ContentCommentID+'"><div class="post_box_wrap"><a class="comment_entry_link_sml" href="javascript:void(0)" onclick="toggleBox(\'toprated_newPopup_post_reply'+b.ContentCommentID+'\',0);return false;">Close</a><br/><br/><input type="button" onclick="javascript:submitReplyComment('+b.ContentCommentID+',true);" value="Post"/><br/></div><textarea id="toprated_post_text'+b.ContentCommentID+'" class="post_text"/><div id="toprated_commentReplyBodyError'+b.ContentCommentID+'"/></div>');d.push('<div id="comment_children'+b.ContentCommentID+'"></div>');d.push('<div id="toprated_container'+b.ContentCommentID+'" style="padding-top: 0pt; margin-top: 0pt;"></div>');return d.join("")}function RenderParentComment(f,d){var c="http://media1.break.com/static/live/v1/img/site/comments-ratings-up.gif";var b="http://media1.break.com/static/live/v1/img/site/comments-ratings-down.gif";if(d=="game-trailers"){c="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-up.png";b="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-down.png"}var a=new Array();a.push('<div class="comment_entry" id="comment'+f.ContentCommentID+'">');a.push('<div class="comment_avatar">');a.push('<a href="http://www.break.com/user/'+f.ByNickName+'"><img width="50" height="50" border="0" src="'+f.ByAvatarURL+'" class="comment_avatar" onerror="onMissingAvatar(this)"/></a>');a.push("</div>");a.push('<div class="comment_nonavatar">');a.push('<div class="comment_entry_top"><div class="comment_entry_date"> [<a href="javascript:void(0)"  onclick="SentSpam('+f.ContentCommentID+');return false;">spam</a>] '+f.CommentEntryDate+' <a id="reply'+f.ContentCommentID+'" href="javascript:void(0)" onclick="CommentReply('+f.ContentCommentID+');return false;">REPLY</a> </div><a href="http://www.break.com/user/'+f.ByNickName+'" class="comment_entry_link">'+f.ByNickName+"</a> says:");a.push("</div>");a.push('<div class="comment_entry_bot">');a.push('<div class="comment_quote_lft"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif"/>');a.push("</div>");a.push('<div class="comment_quote">'+f.DiscussionText+"</div>");a.push('<div class="comment_quote_rgt"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif"/></div>');a.push('<div class="comment_rate">');a.push('Rate this comment: <a href="javascript:void(0)" class="checkLogin" border="0" onclick="RateComment('+f.ContentCommentID+',1);return false;"><img border="0" src="'+c+'"/></a><span id="up_rating_display'+f.ContentCommentID+'">'+f.UpRatingCount+'</span><a class="checkLogin" href="javascript:void(0)" border="0" onclick="RateComment('+f.ContentCommentID+',-1);return false;"><img border="0"  src="'+b+'"/></a><span id="down_rating_display'+f.ContentCommentID+'">'+f.DownRatingCount+'</span> Comment Rating: <span id="rating_display'+f.ContentCommentID+'">'+f.RatingTotalCount+"</span></div>");a.push("</div>");a.push("</div>");a.push("</div>");a.push('<div class="post_box" id="newPopup_post_reply'+f.ContentCommentID+'"><div class="post_box_wrap"><a class="comment_entry_link_sml" href="javascript:void(0)" onclick="toggleBox(\'newPopup_post_reply'+f.ContentCommentID+'\',0);return false;">Close</a><br/><br/><input type="button" onclick="javascript:submitReplyComment('+f.ContentCommentID+');" value="Post"/><br/></div><textarea id="post_text'+f.ContentCommentID+'" class="post_text"/><div id="commentReplyBodyError'+f.ContentCommentID+'"/></div>');a.push('<div id="container'+f.ContentCommentID+'" style="padding-top: 0pt; margin-top: 0pt;"></div>');return a.join("")}function RenderChildCommentForTopRated(f,d){var c="http://media1.break.com/static/live/v1/img/site/comments-ratings-up.gif";var b="http://media1.break.com/static/live/v1/img/site/comments-ratings-down.gif";if(d=="game-trailers"){c="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-up.png";b="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-down.png"}var a=new Array();a.push('<div class="comment_entry_sml" id="comment'+f.ContentCommentID+'">');a.push('<div class="comment_avatar"><a href="http://www.break.com/user/'+f.ByNickName+'"><img width="50" height="50" border="0" src="'+f.ByAvatarURL+'" class="comment_avatar" onerror="onMissingAvatar(this)"/></a>');a.push("</div>");a.push('<div class="comment_nonavatar2">');a.push('<div class="comment_entry_top_sml"><div class="comment_entry_date"> [<a href="javascript:void(0)" class="checkLogin" onclick="SentSpam('+f.ContentCommentID+');return false;">spam</a>] '+f.CommentEntryDate+' </div><a href="http://www.break.com/user/'+f.ByNickName+'" class="comment_entry_link">'+f.ByNickName+"</a> says:</div>");a.push('<div class="comment_entry_bot_sml">');a.push('<div class="comment_quote_lft"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif"/></div>');a.push('<div class="comment_quote_sml">'+f.DiscussionText+"</div>");a.push('<div class="comment_quote_rgt"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif" /></div>');a.push('<div class="comment_rate">');a.push('Rate this comment: <a href="javascript:void(0)" class="checkLogin" border="0" onclick="RateComment('+f.ContentCommentID+',1);return false;"><img border="0" return false;" src="'+c+'"/></a><span id="toprated_up_rating_display'+f.ContentCommentID+'">'+f.UpRatingCount+'</span><a href="javascript:void(0)" class="checkLogin" border="0" onclick="RateComment('+f.ContentCommentID+',-1);return false;"><img border="0" src="'+b+'"/></a> <span id="toprated_down_rating_display'+f.ContentCommentID+'">'+f.DownRatingCount+'</span> Comment Rating: <span id="toprated_rating_display'+f.ContentCommentID+'">'+f.RatingTotalCount+"</span></div>");a.push("</div>");a.push("</div>");a.push("</div>");return a.join("")}function RenderChildComment(f,d){var c="http://media1.break.com/static/live/v1/img/site/comments-ratings-up.gif";var b="http://media1.break.com/static/live/v1/img/site/comments-ratings-down.gif";if(d=="game-trailers"){c="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-up.png";b="http://media1.break.com/static/live/v1/img/game-trailers/cmnt-rate-arrow-gt-down.png"}var a=new Array();a.push('<div class="comment_entry_sml" id="comment'+f.ContentCommentID+'">');a.push('<div class="comment_avatar"><a href="http://www.break.com/user/'+f.ByNickName+'"><img width="50" height="50" border="0" src="'+f.ByAvatarURL+'" class="comment_avatar" onerror="onMissingAvatar(this)"/></a>');a.push("</div>");a.push('<div class="comment_nonavatar2">');a.push('<div class="comment_entry_top_sml"><div class="comment_entry_date"> [<a href="javascript:void(0)" class="checkLogin" onclick="SentSpam('+f.ContentCommentID+');return false;">spam</a>] '+f.CommentEntryDate+' </div><a href="http://www.break.com/user/'+f.ByNickName+'" class="comment_entry_link">'+f.ByNickName+"</a> says:</div>");a.push('<div class="comment_entry_bot_sml">');a.push('<div class="comment_quote_lft"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_lft.gif"/></div>');a.push('<div class="comment_quote_sml">'+f.DiscussionText+"</div>");a.push('<div class="comment_quote_rgt"><img border="0" src="http://media1.break.com/static/live/v1/img/site/quote_gray_rgt.gif" /></div>');a.push('<div class="comment_rate">');a.push('Rate this comment: <a href="javascript:void(0)" class="checkLogin" border="0" onclick="RateComment('+f.ContentCommentID+',1);return false;"><img border="0" return false;" src="'+c+'"/></a><span id="up_rating_display'+f.ContentCommentID+'">'+f.UpRatingCount+'</span><a href="javascript:void(0)" class="checkLogin" border="0" onclick="RateComment('+f.ContentCommentID+',-1);return false;"><img border="0" src="'+b+'"/></a> <span id="down_rating_display'+f.ContentCommentID+'">'+f.DownRatingCount+'</span> Comment Rating: <span id="rating_display'+f.ContentCommentID+'">'+f.RatingTotalCount+"</span></div>");a.push("</div>");a.push("</div>");a.push("</div>");return a.join("")}function createSidebarModuleMarkup(a){var b=new Array();var c="";c=(a.ContentPageURL==undefined)?a.StaticURL:a.ContentPageURL;b.push('<div class="related-videos-wrap">');b.push('<div class="related-videos-thumb">');b.push('<a class="break-link-img" target="_top" href="'+c+'"><img border="0" height="56" width="75" onerror="SwapImage(this, ImgNotAvailable);return true;" src="'+a.ThumbnailURL+'" /></a>');b.push("</div>");b.push("<h2>");b.push('<a class="break-link" target="_top" href="'+c+'">'+a.ContentName+"</a>");b.push("</h2>");b.push('<div class="related-videos-views">');b.push("<span>Views: </span>");b.push('<span class="related-videos-viewscount">'+a.ViewCount+"</span>");b.push("</div>");b.push("</div>");return b.join("")}function sidebarMoreVideosLikeThis(a){jQuery.getJSON("http://service.break.com/api/content/video/"+a+"/related/10?callback=?",function(b){if(b.length<=0){var c="";c=('<div style="text-align:center; "><img src="http://media1.break.com/static/live/v1/img/site/break-loading.gif" alt="Loading"></div>');jQuery("#sidebar-module-morevideoslikethis-content").html(c)}else{var c="";jQuery.each(b,function(d,f){c+=createSidebarModuleMarkup(f);jQuery("#sidebar-module-morevideoslikethis-content").html(c)})}})}function sidebarRelatedVideosFromUsers(a){jQuery.getJSON("http://service.break.com/api/content/video/"+a+"/user-related/10?callback=?",function(b){if(b.length<=0){var c="";c=('<div style="text-align:center; "><img src="http://media1.break.com/static/live/v1/img/site/break-loading.gif" alt="Loading"></div>');jQuery("#sidebar-module-relatedvideosfromusers-content").html(c)}else{var c="";jQuery.each(b,function(d,f){c+=createSidebarModuleMarkup(f);jQuery("#sidebar-module-relatedvideosfromusers-content").html(c)})}})}function sidebarMoreInGenre(a){jQuery.getJSON("http://service.break.com/content/morefromthis/"+a+"?callback=?",function(b){if(b.length<=0){var c="";c=('<div style="text-align:center; "><img src="http://media1.break.com/static/live/v1/img/site/break-loading.gif" alt="Loading"></div>');jQuery("#sidebar-module-moreingenre-content").html(c)}else{var c="";jQuery.each(b,function(d,f){c+=createSidebarModuleMarkup(f);jQuery("#sidebar-module-moreingenre-content").html(c)})}})}function ShowSocialBox(){var a=document.getElementById("social_box");if(a.style.display=="none"){a.style.display="block"}else{a.style.display="none"}}function ShareMail(f,a){var d;if(a){d=document.getElementById(a).value}else{d=(document.ShareBtb.BtbChange.value=document.ShareBtb.BodyTextBox.value)}var c=new RegExp('#|%|"|&',"g");d=d.replace(c,"");var b=new ETSBase("B_SHARE_EVNT");b.addControl("Share");b.execute();parent.location="mailto:?subject=You need to watch this video!!!&body="+d+" %0D"+f}function hasCustomEmbed(){var b=getCookie("EncStyleID");var a;if(b!=null){a=true}else{a=false}return a}function episodeCheck(){var a=getQueryVariable("res");if(a==1){toggleHiRes(1)}else{if(a==2){toggleHiRes(2)}}}function writeRatingButtons(b){var c;var a=(b==1)?"thumb_up":"thumb_down";if(IsLoggedIn()){c='<a href="javascript:rate('+b+');" id="'+a+'" onmouseover="javascript:ShowRateIt();" onmouseout="javascript:HideRateIt();">'}else{c='<a class="checkLogin" href="" id="'+a+'" onmouseover="javascript:ShowRateIt();" onmouseout="javascript:HideRateIt();">'}c+='<img src="http://media1.break.com/static/live/v1/img/site/shim.gif" width="23" height="23" border="0"></a>';document.write(c)}function expandVideo(b,a){jQuery("#defaultDiv").css("width",(b)+"px");jQuery("#defaultDiv").css("height",(a)+"px")}function subscribecontent(){var a=getCookie("MemberID");var b=IsLoggedIn();subscribestaticcontent(sSubmittedBY,a,b)}function GetPageNumber(f,a,b){var h=0;var j;var d;var k;j=a.indexOf(f);if(j==-1){return h}else{d=j+f.length}k=a.indexOf("&",d);if(k==-1){k=a.length}try{var c=parseInt(a.substring(d,k))}catch(g){return h}if(isNaN(c)){return h}if(b==1){h=(c/10)+1}else{if(b==2){h=((c-1)/10)+1}}return h}jQuery(document).ready(function(){jQuery(".span-link").click(function(){var a=jQuery(this).attr("dest-url");window.location=a});jQuery("span#np-scoop").click(function(){showNewPlayerLightbox()});jQuery("#np-sliver-close-btn").click(function(){closeNewPlayerSliver()});if(jQuery.cookie(npCookie.sliver)=="open"){showNewPlayerSliver()}jQuery("#next-video-arrow").click(function(){_gaq.push(["_trackEvent","click","new_red_next_video_arrow"]);jQuery.getJSON("http://service.break.com/content/getnextvideo/?channelId="+sGlobalChannelID+"&contentId="+sGlobalContentID+"&callback=?",function(a){if(a.StaticURL!=null){window.location=a.StaticURL}})});insertAltText()});(function(){function a(g){var f=document.referrer;var l=f.split("?");var k="";if(l[1]!=null){k=l[1].split("&")}for(var h=0;h<k.length;h++){var j=k[h].split("=");if(j[0]==g){return j[1]}}return""}var d=a("qclid");var b=a("brkref");var c="";if(d!=""){c="adwords"}if(b!=""){c=b}if(c!=""){jQuery.cookie("brkref",c,{expires:30})}})();function showNewPlayerLightbox(){var a="<style>#bmn-overlay{width:801px;} .bmn-cr-account-form{padding:0;}</style><div id='np-lightbox'><span id='np-msg'>If you encounter any hiccups or have<br /> any problems, send an email to:<br /> <a class='np-mail-to' href='mailto:player@break.com?subject=Player%20Feedback'>player@break.com</a></span></div>";BRK.overlay.onClose(function(){jQuery("#bmn-overlay").css("width","695px");jQuery(".bmn-cr-account-form").css("padding","15px")});BRK.overlay.show(a)}function showNewPlayerSliver(){jQuery("#np-sliver").css("display","block");jQuery("#sidebar-wrap").css("margin-top","70px")}function closeNewPlayerSliver(){jQuery("#np-sliver").css("display","none");jQuery("#sidebar-wrap").css("margin-top","30px");jQuery.cookie(npCookie.sliver,"close",npCookie.sliverOptions)}function initNewPlayerCookies(){if(jQuery.cookie(npCookie.sliver)==null){jQuery.cookie(npCookie.sliver,"open",npCookie.sliverOptions)}}function insertAltText(){jQuery(".altText").each(function(a){jQuery(this).children().attr("alt",extractName(jQuery(this).attr("href")));jQuery(this).children().attr("title",extractName(jQuery(this).attr("href")))})}function extractName(b){var a=b.replace(".html","");a=a.split("/");a=a[a.length-1];a=a.split("-").join(" ");a=a.split("_").join(" ");return a};
