Drupal.behaviors.showToolTips = function(context) { if ($("html").hasClass("no-touch")) { $('body').append('
'); var tooltip = $('#ghh-tooltip'); var tooltip_text = tooltip.find('.text-content'); tooltip.css({ position: 'absolute', zIndex: 9999, top: 0, left: 0, maxWidth: 220 }); tooltip.find('.text-content').css({ color: '#222', fontSize: '14px' }); tooltip.find('.box').css({ background: '#FAFAFA', border: '1px solid #ccc', position: 'relative', height: '100%', width: '100%', padding: 10, zIndex: 10, boxShadow: '4px 4px 5px rgba(0,0,0,0.3)' }); tooltip.hide(); /** * Function to create tool tips. * @param cssSelector * The css selector for the item to show the tool tip for. * @param message * Message to show as tool tip. */ var createToolTip = function(cssSelector, placement, message, extraMargin) { $(cssSelector).hover( function(){ var tooltip = $('#ghh-tooltip'); var tooltip_text = tooltip.find('.text-content'); var target_position = $(this).offset(); tooltip_text.text(message); tooltip.show(); if (placement === 'right') { tooltip.css({ top: (target_position.top), left: ( target_position.left + (tooltip.width() + 160 + extraMargin) ) }); } else { tooltip.css({ top: target_position.top, left: ( target_position.left - (tooltip.width() + 36) ) }); } },function(){ var tooltip = $('#ghh-tooltip'); tooltip.hide(); }); }; // Tootip for Register Button. createToolTip('#register-button', 'left','Start sharing your own healthy information with the GHH community', 0); // Tool Tip for Add Stuff Button. createToolTip('#add-stuff', 'left', 'Once you join you can add content to GHH', 0); // Tool Tip for Add Stuff - Video. createToolTip('#add-stuff .Video', 'left', 'Upload a video', 0); // Tool Tip for Add Stuff - Place. createToolTip('#add-stuff .Place', 'left', 'Add information about a place in the community', 0); // Tool Tip for Add Stuff - File. createToolTip('#add-stuff .File', 'left', 'Upload a file like a PDF flyer', 0); // Tool Tip for Add Stuff - Event. createToolTip('#add-stuff .Event span.ico-add-stuff.ico-event + .add-stuff-name', 'left', 'Upload info about your event', 0); // Tool Tip for Add Stuff - Article. createToolTip('#add-stuff .Article', 'left', 'Upload an article', 0); // Tool Tip for Add Stuff - Audio. createToolTip('#add-stuff .Audio', 'left', 'Upload a podcast or audio file', 0); // Tool Tip for Add Stuff - Company. createToolTip('#add-stuff .Company', 'left', 'Upload information about your health-related community business ', 0); // Tool Tip for Add Stuff - Group. createToolTip('#add-stuff .Community', 'left', 'Add a free community microsite to GHH', 0); // Tool Tip for Add Stuff - Slideshow-content createToolTip('#add-stuff .Slide.Shows.Content', 'left', 'Upload visual content as a slideshow presentation'), 0; // Tool Tip for adding/editing title for content types createToolTip('#edit-title', 'right', "Use descriptive words to make it clear what is most important about your new content", 0); // Tool Tip for Selecting a Group for content types createToolTip('.fieldset-content #edit-og-groups-wrapper', 'right', "Show the community you are part of", 110); // Tool tip for content body field createToolTip('#edit-body-wrapper', 'right', "Fill in the details here", 0); // Tool tip for content images createToolTip('#field-list-image-items .tableHeader-processed', 'right', "PLEASE add a picture with this Content", 0); // Tool tip for Field related content createToolTip('#field_related_values .tableHeader-processed', 'right', "See if there are other related articles on GetHealthyHarlem.org by typing in a keyword!", 0); // Tool tip for topic taxonomy createToolTip('#edit-taxonomy-2-wrapper', 'right', "Tag this content to let your users know what it is about", 0); // Tool tip for latest stuff home page createToolTip('#quicktabs-tab-home_tabs-0', 'right', "The most recent additions to GHH", 0); // Tool tip for Topic Tab createToolTip('#quicktabs-tab-browse_by-0', 'left', "What do you want to read about?", 0); // Tool ip for type Tab createToolTip('#quicktabs-tab-browse_by-1', 'left', "What kind of article are you looking for?", 0); // Tool ip for type Tab createToolTip('#quicktabs-tab-home_tabs-1', 'right', "Articles we think you'll like", 0); // Tool ip for healthopedia createToolTip('.view-id-mc_page_menu.view-display-id-block_1 ul.menu li.leaf a[href*="/about/healthopedia"]', 'right', "Having trouble understanding some health-related words? Look them up here!", 0); // Tool ip for type Tab createToolTip('.view-id-mc_page_menu.view-display-id-block_1 ul.menu li.leaf a[href*="/about/pharmapedia"]', 'right', "Need more information about medicines and other pharmacy-related terms? Look them up in here!", 0); // Tool ip for type Tab createToolTip('.view-id-mc_page_menu.view-display-id-block_1 ul.menu li.leaf a[href*="/about/certifications"]', 'right', "We are certified by Health on the Net, which means that we provide quality health information.", 0); // Tool ip for type Tab createToolTip('.view-id-mc_page_menu.view-display-id-block_1 ul.menu li.leaf a[href*="/about/health-advisory-board"]', 'right', "All of our technical content is reviewed by our Health Advisory Board", 0); }; }