//open jquery function showStudy(){ $("#shown-study").slideDown("fast"); } function hideStudy(){ $("#shown-study").slideUp("fast"); } $(function() { // REGISTRATION FORM if ( $('textarea.limited').length > 0 ) { $('textarea.limited').before('
0 of 255 characters
'); // attach character limit to 'my story' registration and profile edit form fields $('textarea.limited').maxlength({ 'feedback' : '.charsLeft', 'useInput' : true }); } // TRACKING HELPERS // impressions on community registration form if(window.location.href.indexOf("/community/HERStory/registration.jsp") > -1 ) { doLinkEvent('','eVar1='+omniLocation+'|reg-start|;event3=true'); } if(window.location.href.indexOf("/community/HERStory/registration.jsp") > -1 ) { doLinkEvent('','eVar1='+omniLocation+'|reg-comp|;event3=true'); } //impressions on event registration form if(window.location.href.indexOf("/community/HERStory/event-registration.jsp") > -1 ) { doLinkEvent('','eVar1='+omniLocation+'|reg-start|;event3=true'); } if(window.location.href.indexOf("/community/HERStory/event-registration-confirm.jsp") > -1 ) { doLinkEvent('','eVar1='+omniLocation+'|reg-comp|;event3=true'); } //impressions on opinion board signup if(window.location.href.indexOf("/your-thoughts/sign-up/") > -1 ) { doLinkEvent('','eVar1='+omniLocation+'|reg-start|;event3=true'); } if(window.location.href.indexOf("/your-thoughts/sign-up/thank-you.jsp") > -1 ) { doLinkEvent('','eVar1='+omniLocation+'|reg-comp|;event3=true'); } // external links $("a[href^='http://'][href!='http://www.gene.com/gene/products/information/pdf/herceptin-prescribing.pdf'],a[href^='https://']").click(function(){ var outgoingLink = $(this).attr('href'); var omniLinkName = outgoingLink.substring(0,99); // Google Analytics if( $(this).attr('href').indexOf("herconnection.com") > -1 ) { // check for HERconnection outgoing link for (index in pageTrackers) { pageTrackers[index]._trackPageview('/outgoing/herconnection/' + outgoingLink); } } else { for (index in pageTrackers) { pageTrackers[index]._trackPageview('/outgoing/' + outgoingLink); } } // Omniture doLinkEvent(omniLinkName,'eVar1='+ omniLocation +'|ext-link|'+ omniLinkName +';event3=true'); }); // downloads // track links to doc, eps, svg, xls, ppt, pdf, xls, zip, vsd, vxd, rar, exe, wma, mov, avi, wmv, mp3, mp4 $("a[href$='.doc'],a[href$='.eps'],a[href$='.svg'],a[href$='.xls'],a[href$='.ppt'],a[href$='.pdf'],a[href$='.xls'],a[href$='.zip'],a[href$='.vsd'],a[href$='.vxd'],a[href$='.rar'],a[href$='.exe'],a[href$='.wma'],a[href$='.mov'],a[href$='.avi'],a[href$='.wmv'],a[href$='.mp3'],a[href$='.mp4']").click(function(){ var downloadLink = $(this).attr('href'); var downloadFilename = downloadLink.substring(downloadLink.lastIndexOf("/")+1); // Google Analytics for (index in pageTrackers) { pageTrackers[index]._trackPageview('/download/' + $(this).attr('href')); } // Omniture doLinkEvent('download:' + downloadFilename,'eVar1='+ omniLocation +'|cont-dnld|'+ downloadFilename +';event3=true'); }); // downloads // open PI for all PDFs on the site $("a[href$='.pdf']").click(function(){ window.open($(this).attr('href'),'herceptin','width=700,height=500,top=0,left=0'); window.open('http://www.gene.com/gene/products/information/pdf/herceptin-prescribing.pdf','pi','width=700,height=500,top=16,left=16'); return false; }); // spotlight links $(".spotlight-element a").click(function(){ var spotlightID = $(this).closest('div.spotlight-element').attr('id'); s.prop4="spltclk|"+omniLocation+"|||"+spotlightID; }); $("#logo").css("outline", "none"); //share this page: open and close $("#btn-share").click(function(){ $("#btn-share").css("outline", "none"); $("div#share-page").css("left", "547px"); $("div#share-page").css("top", "133px"); $("div#share-page").slideDown() return false; }); $("#close-share").click(function(){ $("div#share-page").slideUp("slow"); return false; }); $("#btn-explanation").click(function(){ $("#btn-explanation").css("outline", "none"); $("div#explanation").css("left", "232px"); $("div#explanation").css("top", "50px"); $("div#explanation").slideDown("fast"); doLinkEvent('define-button-open','eVar1=Pat-hp|click|define-button-open;event3=true'); return false; }); $("#close-explanation").click(function(){ $("div#explanation").slideUp("fast"); doLinkEvent('define-button-close','eVar1=Pat-hp|click|define-button-close;event3=true'); return false; }); //share this page popup links $("#share-content li a").click(function(){ hrefString = $(this).attr("href"); offsiteWin = window.open(hrefString,"offsiteLink",'height=450, width=800, status=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no, location=no'); offsiteWin.focus() return false; }); //mod tracker //$('#mod-tracker-input').datepicker(); //quick link $("#quicklink-link").click(function(){ $('#quicklink-progress').css("display","block"); $("#quicklink-form").submit(); return false; }); $("#quicklink-form").submit(function() { var inputs = []; $(':input', this).each(function() { inputs.push(this.name + '=' + escape(this.value)); }); var now = new Date(); inputs.push('cachekiller=' + now.valueOf()); jQuery.ajax({ data: inputs.join('&'), url: this.action, timeout: 10000, error: function(req, desc, ex) { $('#quicklink-progress').css("display","none"); $('#quicklink-notes').css("display","block"); $('#quicklink-notes-content').html("There was an error processing your request"); }, success: function(rdata, status) { $('#quicklink-progress').css("display","none"); if(rdata == "success"){ $('#quicklink-notes').css("display","block"); $('#quicklink-notes-content').html("Quicklink successfully added."); $('#quicklink-contained').css("display","block"); $('#quicklink-notcontained').css("display","none"); }else{ $('#quicklink-notes').css("display","block"); $('#quicklink-notes-content').html(rdata); } } }); return false; }); //share this page $('#share-page-form').submit(function() { $('#share-page-notes').css("display","none"); $('#share-page-progress').css("display","block"); var inputs = []; $(':input', this).each(function() { inputs.push(this.name + '=' + escape(this.value)); }); jQuery.ajax({ data: inputs.join('&'), url: this.action, timeout: 10000, error: function(req, desc, ex) { $('#share-page-progress').css("display","none"); $('#share-page-notes-content').css("color","red"); $('#share-page-notes-content .errors').css("border","0"); $('#share-page-notes-content .errors').css("margin","0"); $('#share-page-notes-content').text("there was an error processing your request"); $('#share-page-notes').css("display","block"); }, success: function(rdata, status) { $('#share-page-progress').css("display","none"); if(rdata == "success"){ $('#share-page-notes-content').css("color","red"); $('#share-page-notes-content').css("width","100%"); $('#share-page-notes-content').text("Your message was sent."); $('#share-content input#to-email').val(""); $('#share-content input#to-name').val(""); $('#share-content textarea').val(""); }else{ $('#share-page-notes-content').css("color","red"); $('#share-page-notes-content .errors').css("border","0"); $('#share-page-notes-content .errors').css("margin","0"); $('#share-page-notes-content').html(rdata); } $('#share-page-notes').css("overflow","hidden") $('#share-page-notes').css("display","block"); $('#share-page-notes').css("margin-bottom","10px"); $('#share-page-notes ').css("width","180px"); $('#share-page-notes').css("position","relative"); $('#share-page-notes').css("z-index","101"); } }); return false; }); $("#show-study").click(function(){ showStudy(); return false; }); $("#hide-study").click(function(){ hideStudy(); return false; }); $('.links-list li a').tooltip({showURL: false, showBody: " - "}); $('.tool-tip').tooltip({showURL: false, showBody: " - "}); $('#events-table span.topic').tooltip({showURL: false, showBody: " - ", extraClass: "event-topic", top: 0, left: 0,fixPNG: true}); //webcast page popup links $('a[rel="webcast"]').click(function(){ hrefString = $(this).attr("href"); offsiteWin = window.open(hrefString,"offsiteLink",'height=768, width=1024, status=yes, menubar=no, resizable=yes, scrollbars=yes, toolbar=no, location=yes'); offsiteWin.focus(); return false; }); if($(".hcp-fma-container").length > 0) { // HCP homepage FMA rotation var hcpRotation = $(".hcp-fma-container").scrollable({size:1,loop:true,clickable:false}).navigator(".navi").autoscroll({api:true,autoplay: true,autopause:true,interval:5000}); // stop the autorotation if someone uses the navigation $('.navi a').click(function(){ hcpRotation.stop(); }); } }); /*$("#nurseSignupForm").submit(function(){ dataString = $("#nurseSignupForm").serialize(); $.ajax({ type: "POST", url: "/hcp/nurses/nurseSignup", data: dataString, cache: false, dataType: "html", success: function(data){ $('#sign-up').html(data); } }); return false; });*/ $(document).ready(function(){ $.ajax({ type: "GET", url: "/hcp/nurses/your-thoughts/sign-up2.jsp?cachekiller=" + new Date().valueOf(), cache: false, dataType: "html", success: function(data){ $('#sign-up').html(data); } }); }); $(document).ready(function(){ $.ajax({ type: "GET", url: "/hcp/nurses/your-thoughts/nurses-poll.jsp?cachekiller=" + new Date().valueOf(), cache: false, dataType: "html", success: function(data){ $('#nurses-poll').html(data); } }); });