var ACTION = 'webAction'; var PAIR_DELIMITER = '\016'; var ITEM_DELIMITER = '\017'; var ROW_DELIMITER = '\020'; var FIREFOX = 'FireFox'; var INTERNET_EXPLORER = 'Internet Explorer'; var CHROME = 'Chrome'; var OMNI_WEB = 'OmniWeb'; var SAFARI = 'Safari'; var OPERA = 'Opera'; var I_CAB = 'iCab'; var KONQUEROR = 'Konqueror'; var CAMINO = 'Camino'; var NETSCAPE = 'Netscape'; var MOZILLA = 'Mozilla'; var FILTER_SELECT_ORIGINAL = 'filterSelectOriginal'; var START_DELIMITER = '<<'; var END_DELIMITER = '>>'; var BODY_FRAME = 'body'; var processingRequest = false; var systemPopupTimeout; var menu = 0; var initOffsetTop = 0; var docked = 0; // open window variables var theNewWindow = null; var chasm = screen.availWidth; var mount = screen.availHeight; var nWidth = 0; var nHeight = 0; var browserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || 'An unknown browser'; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || 'an unknown version'; this.OS = this.searchString(this.dataOS) || 'an unknown OS'; }, searchString: function ( data ) { for (var i=0;i 0 ) // Somehow JavaScript returns reversed, ex. +360 should be -360 { timezone = 'GMT-' + hr + ':' + min; } else if ( offset == 0 ) { timezone = 'GMT'; } else { timezone = 'GMT+' + hr + ':' + min; } return timezone; } // Set timezone to session by using RemoteScripting function handleTimezone( remoteScriptingLocation, sessionId ) { //Array needs to be string parameters so add empty quotes around it var parameters = new Array( 2 ); parameters[0] = '' + jstz.determine().name() + ''; parameters[1] = '' + sessionId + ''; jsrsExecute( remoteScriptingLocation, null, 'handleTimezone', parameters ); } function show( object ) { document.getElementById( object ).style.visibility = 'visible'; } function hide( object ) { document.getElementById( object ).style.visibility = 'hidden'; } function disableAllButtons() { manipulateButtons( true ); } function enableAllButtons() { manipulateButtons( false ); } function manipulateButtons( isDisabled ) { var inputs = document.getElementsByTagName('input'); for ( var i=0; i < inputs.length; i++ ) { if ( inputs[i].id.substring( 0, 18 ) == 'inputButtonControl' ) { if ( $( inputs[i] ).data( 'permanent' ) != 'permanent' ) { //don't toggle buttons that are permanent inputs[i].disabled = isDisabled; } } } } function resetButtons() { var inputs = document.getElementsByTagName('input'); for ( var i=0; i < inputs.length; i++ ) { if ( inputs[i].id.substring( 0, 18 ) == 'inputButtonControl' ) { inputs[i].disabled = false; //reset the text (remove the 'Please Wait') if ( inputs[i].previousSibling.type == 'hidden' ) { inputs[i].value = inputs[i].previousSibling.value; } else if (inputs[i].previousSibling.previousSibling) { inputs[i].value = inputs[i].previousSibling.previousSibling.value; } } } } function bodyOnLoad() { runOnLoadActions(); enableAllButtons(); setFocus(); initializeDockingMenu(); } function setFocus() { var inputs = document.getElementsByName( 'webFormFocusElement' ); if ( inputs[0] && document.getElementById( inputs[0].value )) { document.getElementById( inputs[0].value ).focus(); } } function handleOnSubmit( form ) { if ( $('#' + ACTION,form).val() != null ) { if ( form.action != null ) { form.action = form.action + getParameterDelimiter( form.action ) + ACTION + '=' + $('#' + ACTION,form).val(); } } } var terminateActionStatus = 1; var cancelSubmitActionStatus = 2; function resetOnLoadActions() { onLoadActions = new Array(); } function addOnLoadAction( action ) { onLoadActions[ onLoadActions.length ] = action; } function runOnLoadActions() { if ( onLoadActions ) { var returnValue = true; for ( var i = 0; i < onLoadActions.length; i++ ) { eval( onLoadActions[i] ); } } } function refreshFooter() { hideFooterFrame(); if ( document.getElementById( 'footer' ) ) { showFooterFrame( document.getElementById( 'footer' ).value ); } } function value( key ) { if ( document.getElementById( key ) ) { return document.getElementById( key ).value; } else { alert( 'not found: ' + key ); } } function get( key ) { return document.getElementById( key ); } function getParameterDelimiter( url ) { if ( url.indexOf( '?' ) == -1 ) { return '?'; } return '&'; } function goToPage( select, hash ) { var select = $(select); var urlElement = $('#pagingURL' + hash); var url = urlElement.attr('value') + getParameterDelimiter( urlElement.attr('value') ) + 'pagingSelectedPage=' + select.val(); var target = $('#pagingTarget' + hash ).attr('value'); if ( target == '' ) { document.location = url; } else { eval( 'parent.' + target + '.location = \'' + url + '\'' ); } } function getSibling( element, siblingName ) { sibling = element.nextSibling; if ( sibling.name != siblingName ) { return getSibling( sibling, siblingName ); } return sibling; } //This method will return the next sibling isn't a text node function getSib( element ) { sibling = element.nextSibling; while ( sibling && sibling.nodeName == '#text' ) { //skip #text fields sibling = sibling.nextSibling; } return sibling; } function getPrevSib( element ) { sibling = element.previousSibling; while ( sibling && sibling.nodeName == '#text' ) { //skip #text fields sibling = sibling.previousSibling; } return sibling; } function setSelect( select, value ) { for ( var i = 0; i < select.options.length; i++ ) { if ( select.options[ i ].value == value ) { select.selectedIndex = i; break; } } } function findElement( element, type, name ) { var elementsOfType = element.getElementsByTagName( type ); for ( var i = 0; i < elementsOfType.length; i++ ) { if ( elementsOfType[i].getAttribute( 'name' ) == name ) { return elementsOfType[i]; } } } function confirmClick( id ) { if ( confirm( value( id ) ) ) { return true; } return false; } function populateForm() { var prepopulateElements = document.getElementsByName( 'prepopulateForm' ); var nameToLookFor = 'prepopulateForm_' + value( 'prepopulateFormFrom' ); var valueToReplaceWith; var prepopulateElementId; var elementToReplace; for ( var i = 0; i < prepopulateElements.length; i++ ) { //this is the name of the field to update prepopulateElementId = prepopulateElements[i].value; valueToReplaceWith = getSibling( prepopulateElements[i], nameToLookFor ).value; elementToReplace = document.getElementById( prepopulateElementId ); if ( elementToReplace.nodeName == 'SELECT' ) { setSelect( elementToReplace, valueToReplaceWith ); } else if ( elementToReplace.nodeName == 'INPUT' ) { elementToReplace.value = valueToReplaceWith; } } } function getControl( frame ) { if ( frame.control ) { return frame.control } else { return getControl( frame.parent ); } } function findElementById( element, type, id ) { var elementsOfType = element.getElementsByTagName( type ); for ( var i = 0; i < elementsOfType.length; i++ ) { if ( elementsOfType[i].getAttribute( 'id' ) == id ) { return elementsOfType[i]; } } } function getName( element ) { if ( element.name ) { return element.name; } if ( element.nodeName != '#text' && element.hasAttribute( 'name' ) ) { return element.getAttribute( 'name' ); } return ''; } function getId( element ) { if ( element.nodeName != '#text' ) { return element.id; } return ''; } function addOnLoadEvent( eventHandlingFunction ) { if ( window.addEventListener ) { window.addEventListener( 'load', eventHandlingFunction, false ); } else if ( window.attachEvent ) { window.attachEvent( 'onload', eventHandlingFunction ); } else { window.onload = eventHandlingFunction; } } function handleEnter( event ) { if ( !event ) { //retrieve the event for browser's (IE) that do not automatically pass it event = window.event; } //retrieve the key pressed, some browser's pass as keyCode (IE), others which (Mozilla) var pressedKey = event.keyCode?event.keyCode:event.which?event.which:null; if ( pressedKey == 13 ) { if ( event.preventDefault ) { //prevent the enter keys default behavior in browser's that support it (Mozilla) event.preventDefault(); } else if ( event.keyCode ) { //reset the keyCode in browser's (IE) that use keyCode //so that the default enter behavior does not happen (submitting the form) event.keyCode = 0; } return true; } return false; } function listenToEnter( element, method ) { //register the event with each input in the person search section if ( element.attachEvent ) { //attach event for IE element.attachEvent( 'onkeypress', method ); } else { //else addEventListener(...) for W3C element.addEventListener( 'keypress', method, false ); } } function submitAction( action ) { changeAction( document, action ); $( "#" + ACTION ).closest("form").submit(); } //This function inserts newNode after referenceNode function insertAfter( referenceNode, newNode ) { referenceNode.parentNode.insertBefore( newNode, referenceNode.nextSibling ); } function getPath() { var path = document.getElementById( 'contextPath' ).value; if ( !path || path == '/' ) { var href = window.location.href; var index = 0; var numSlashes = 3; if ( href.indexOf( 'ntouchweb' ) > 0 || href.indexOf( 'storefront' ) > 0 ) { numSlashes = 4; } for ( var i = 1; i <= numSlashes; i++ ) { index = href.indexOf( '/', index + 1 ); } path = href.substr( 0, index ); } return path; } //This function returns the rows of a table //(these are the immediate rows of the table, not a table that may be nested in this table) function getRowsOfTable( table ) { var tableChildren = table.childNodes; //find the TBODY for ( i = 0; i < tableChildren.length; i++ ) { if ( tableChildren[i].nodeName == 'TBODY' ) { return getChildren( tableChildren[i], 'TR' ); } } return new Array(); } function getChildren( ele, type ) { var children = new Array(); var allChildren = ele.childNodes; for ( i = 0; i < allChildren.length; i++ ) { if ( allChildren[i].nodeName == type ) { //this is the correct type children[ children.length ] = allChildren[i]; } } return children; } function busy() { document.body.style.cursor = 'wait'; } function submitForm( form ) { if ( !form ) { form = document.forms[0]; } handleOnSubmit( form ); var submit = true; if ( $.isFunction( form.onsubmit ) ) { submit = form.onsubmit(); } if ( submit != false ) { form.submit(); } } function getPairs( string ) { var aPairs = string.split( PAIR_DELIMITER ); //depending on browser, sometimes split(...) (IE 6.0 at least) //adds an extra value at the end, remove it here. //e.g. 1|Bob;2|Fred;3|Joe returns an array w/ length 4 and no final element if ( aPairs[ aPairs.length ] == null ) { aPairs.length--; } return aPairs; } function getItems( string ) { return string.split( ITEM_DELIMITER ); } function getRows( string ) { return string.split( ROW_DELIMITER ); } function getElementPosition( id, forMoving ) { var offsetTrail = get( id ); var offsetLeft = 0; var offsetTop = 0; while ( offsetTrail ) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; if ( forMoving && offsetTrail && getCssProperty( offsetTrail, 'position', 'position' ) != 'static' ) { //when calculating an element's position for moving, //we need to stop once we hit a bounding box that is not //static. This is because absolute positioning will //position the element based on the first non-static container break; } } if ( navigator.userAgent.indexOf( 'Mac' ) != -1 && typeof document.body.leftMargin != 'undefined' ) { offsetLeft += document.body.leftMargin; offsetTop += document.body.topMargin; } return { left:offsetLeft, top:offsetTop }; } function moveElement( element, id, left, top, adjustForScreen ) { var moveToPosition = getElementPosition( id, true ); //save where we are moving it, so any calling code can use it //and move the element element.movedTop = moveToPosition.top + top; element.style.top = element.movedTop + 'px'; //repeat for left element.movedLeft = moveToPosition.left + left; element.style.left = element.movedLeft + 'px'; if ( adjustForScreen ) { //cannot calculate positions if the element is hidden element.style.display = ''; fitToScreen( element ); } } function getElementHeight( element ) { return( element ? ( element.offsetHeight || element.style.pixelHeight || 0) : 0 ); } function getElementWidth( element ) { return( element ? ( element.offsetWidth || element.style.pixelWidth || 0) : 0 ); } function fitToScreen( element ) { var elementHeight = getElementHeight( element ); var elementWidth = getElementWidth( element ); var windowHeight = getWindowHeight(); var windowWidth = getWindowWidth(); var scrollTop = getScrollTop(); var scrollLeft = getScrollLeft(); if ( element.offsetTop + elementHeight > windowHeight + scrollTop ) { //element will go off the screen, reposition vertically according to its height //save the reposition, so any calling code can use it element.repositionedTop = windowHeight + scrollTop - elementHeight; element.style.top = element.repositionedTop + 'px'; } if ( element.offsetLeft + elementWidth > windowWidth + scrollLeft ) { //element will go off the screen, reposition vertically according to its height //save the reposition, so any calling code can use it element.repositionedLeft = windowWidth + scrollLeft - elementWidth; element.style.left = element.repositionedLeft + 'px'; } } function readOnlyCheckBox() { return false; } function getWindowWidth() { if ( window.innerWidth ) { return window.innerWidth; } else if ( document.documentElement && document.documentElement.clientWidth ) { return document.documentElement.clientWidth; } else if ( document.body ) { return document.body.clientWidth; } } function getWindowHeight() { if ( window.innerHeight ) { return window.innerHeight; } else if ( document.documentElement && document.documentElement.clientHeight ) { return document.documentElement.clientHeight; } else if ( document.body ) { return document.body.clientHeight; } } function getScrollLeft() { return window.pageXOffset || document.documentElement.scrollLeft || 0; } function getScrollTop() { return window.pageYOffset || document.documentElement.scrollTop || 0; } function changeHiddenCheckBox( hiddenField, value ) { get( hiddenField ).value = value; } function getUnique( name, uniqueIdentifier ) { if ( uniqueIdentifier && uniqueIdentifier != '' ) { return name + '_' + uniqueIdentifier; } return name; } function showMessage( element, message ) { if ( element.childNodes[0] ) { //remove any old message element.removeChild( element.childNodes[0] ); } //add new one element.appendChild( document.createTextNode( message ) ); } function getDocHeight( doc ) { var docHt = 0, sh, oh; if ( doc.height ) { docHt = doc.height; } else if ( doc.body ) { if ( doc.body.scrollHeight ) { docHt = sh = doc.body.scrollHeight; } if ( doc.body.offsetHeight ) { docHt = oh = doc.body.offsetHeight; } if ( sh && oh ) { docHt = Math.max(sh, oh); } } return docHt; } function filterSelect( filter, groupId, selectId ) { var groups = getPairs( value( groupId ) ); var group, values, select, original, parent, found; for ( var i = 0; i < groups.length; i++ ) { group = getItems( groups[i] ) //zero element is the group if ( group[0] == filter ) { //matches filter select = get( selectId ); original = get( selectId + FILTER_SELECT_ORIGINAL ); if ( !original ) { //no original filter select for this select, //create it and give it a new id original = select.cloneNode( true ); original.id = selectId + FILTER_SELECT_ORIGINAL; original.name = selectId + FILTER_SELECT_ORIGINAL; original.style.display = 'none'; //put in object model get( groupId ).parentNode.appendChild( original ); } else { //remove the existing select //and create a copy of the original in its place //that we can filter parent = select.parentNode; parent.removeChild( select ); select = original.cloneNode( true ); select.style.display = ''; select.id = selectId; parent.appendChild( select ); } //now filter select for ( var j = select.length - 1; j > 0; j-- ) { if ( select.options[j].value != '' ) { //compare the select value to those in the group //(if it's not the blank) //if not found, then remove it found = false; for ( var k = 1; k < group.length; k++ ) { if ( group[k] == select.options[j].value ) { found = true; break; } } if ( !found ) { select.remove( j ); } } } break; } } } function populateString( string, variables ) { if ( string.indexOf( START_DELIMITER ) < string.indexOf( END_DELIMITER ) ) { var i = 0, startPos, endPos, attributeName; while ( string.indexOf( START_DELIMITER, i ) >= 0 ) { startPos = string.indexOf( START_DELIMITER, i ); endPos = string.indexOf( END_DELIMITER, i ) + END_DELIMITER.length; if ( endPos > startPos && startPos >= 0 ) { attributeName = string.substring( startPos + END_DELIMITER.length, endPos - START_DELIMITER.length ).trim(); string = string.substring( 0, startPos ) + variables[ attributeName ] + string.substring( endPos ); } i = startPos; } } return string; } function getCssProperty( element, ieStyleName, cssStyleName ) { var property = ''; if ( element.currentStyle ) { property = element.currentStyle[ieStyleName]; } else if ( window.getComputedStyle ) { property = window.getComputedStyle( element, '' ).getPropertyValue( cssStyleName ); } return property; } function cancel() { if ( uploadManager ) { uploadManager.cancel(); } } function startsWith( string, starts ) { return string.length >= starts.length && string.substring( 0, starts.length ) == starts; } function initializeDockingMenu() { menu = document.getElementById('menu'); if ( menu ) { initOffsetTop = menu.offsetTop; docked = false; window.onscroll = function () { if (!docked && (menu.offsetTop - scrollTop() < 0)) { menu.className = 'navbar navbar-fixed-top'; docked = true; } else if (docked && scrollTop() <= initOffsetTop) { menu.className = menu.className.replace('navbar-fixed-top', ''); docked = false; } var notificationPopover = $('#notification + .popover'); var position = $('#notification-anchor').position(); if ( position ) { if ( position.top > scrollTop() ) { notificationPopover.css( 'top', ( position.top - scrollTop() + 15 ) + 'px' ); } else { notificationPopover.css( 'top', '0px' ); } } else { notificationPopover.css( 'top', '0px' ); } } } } function scrollTop() { return document.body.scrollTop || document.documentElement.scrollTop; } function systemPopUp( title, message, duration ) { // Don't do this if mobile ( there is no #notification or .popover in mobile) if ($('#notification').html() == null) { return; } $('#notification').attr( 'data-content', message ).attr( 'data-original-title', title ); $('#notification').popover('show'); var notificationPopover = $('#notification + .popover'); // hack, somehow the latest version of bootstrap doesn't overwrite the // contents of the div and title properly so we manipulate both using jquery dom notificationPopover.find('h3.popover-title').html( title ); notificationPopover.find('div.popover-content').html( message ); var position = $('#notification-anchor').position(); if ( position ) { if ( position.top > scrollTop() ) { notificationPopover.css( 'top', ( position.top - scrollTop() + 15 ) + 'px' ); } else { notificationPopover.css( 'top', '0px' ); //$('.popover').css( 'top', '0px' ); } notificationPopover.css( 'left', ( position.left - ( $('.popover').width() / 2 ) ) + 'px' ); } else { notificationPopover.css( 'top', '0px' ); } notificationPopover.css( 'z-index', '3000' ); notificationPopover.css( 'position', 'fixed' ); $('.popover').hover( function () { $('#notification').popover('hide'); } ); var hidePopup = function() { $('#notification').popover('hide'); $('#notification').attr( 'data-content', ' ' ).attr( 'data-original-title', ' ' ); } if ( systemPopupTimeout ) { clearTimeout( systemPopupTimeout ); } systemPopupTimeout = setTimeout( hidePopup, duration ); } function openWindow(cLocation, cWindowName, nWidth, nHeight) { return openWindowWithOpts( cLocation, cWindowName, nWidth, nHeight, 'status,scrollbars,dependent,resizable' ); } function openWindowMenu(cLocation, cWindowName, nWidth, nHeight) { return openWindowWithOpts( cLocation, cWindowName, nWidth, nHeight, 'menubar,status,scrollbars,dependent,resizable' ); } function openWindowWithOpts(cLocation, cWindowName, nWidth, nHeight, cOpts) { //IE 6 does not like dashes in the window name, remove them here if ( cWindowName.indexOf( '-' ) >= 0 ) { cWindowName = cWindowName.replace( '-', '' ); } theNewWindow = window.open(cLocation,cWindowName, cOpts + ',width=' + nWidth + ',height=' + nHeight + ',left=' + ((chasm - nWidth - 10) * .5) + ',top=' + ((mount - nHeight - 30) * .5)); if ( theNewWindow == null ) { alert( 'A pop-up window was blocked. To use this application correctly, please disable pop-up blockers for this site.'); } else { var control = getControl( parent ); if ( control.spawnedWindows ) { //add spawned window to collection, so that when application is exited, they can be closed as well control.spawnedWindows[ control.spawnedWindows.length ] = theNewWindow; } theNewWindow.focus(); } return theNewWindow; } function checkBoxControlChange( element ) { if ( element.checked ) { var name = element.name; var id = element.id; var elements = document.getElementsByName( name ); for ( i = 0; i < elements.length; i++ ) { if ( elements[i].id != id ) { elements[i].checked = false; } } } } //Mobile only - Show the body div which is initiall hidden so styles can be applied by jquery mobile. function showPage() { if ($("#bodyDiv").length) { $("#bodyDiv").css("display", "block"); } } // When the user clicks on the navBarHome li element... if (typeof jQuery != 'undefined' && $('#navBarHome')) { $('#navBarHome').click(function() { // we toggle the 'icon-white' class. I'm using toggle here rather // than removeClass because the user can opt to close the menu by // clicking directly on the element again. $('#navBarHomeButton i').toggleClass('icon-white'); // Register a new handler that fires whenever the user clicks within // the document. $(document).bind('click', addWhiteIconClass); }); function addWhiteIconClass() { if( !$('#navBarHomeButton').hasClass('icon-white') ) { // Re-add the white class for glyphicons. $('#navBarHomeButton i').addClass('icon-white'); } // We're done with this, so unbind the handler. $(document).unbind('click', addWhiteIconClass); } } function timeOutPopUp( popUp, timer, duration ) { var hidePopup = function() { $( popUp ).popover('hide'); $( popUp ).attr( 'data-content', ' ' ).attr( 'data-original-title', ' ' ); } if ( timer ) { clearTimeout( timer ); } if ( !duration ) { duration = 5000; } timer = setTimeout( hidePopup, duration ); } function addAlert( type, message, id ) { $("#alert-area").append($("
x

" + message + "

")); $(".alert-message").delay(5000).fadeOut("slow", function () { $(this).remove(); }); } function removeAlert( id ) { $( "#" + id ).remove(); } function resizeCarouselImages(innercarousel, maxwidth, maxheight) { if( null != innercarousel ) { var images = innercarousel.getElementsByTagName("img"); var biggestimgwidth=0, biggestimgheight=0; var sizes = new Array(); for (i = 0; i < images.length; i ++) { var img = images[i]; var size = getImgSize(img.src); sizes[i] = size; // resize the image if it's too big if (size.width > maxwidth || size.height > maxheight) { if (size.width/maxwidth >= size.height/maxheight) { var w = size.width; size.width = maxwidth; size.height = size.height*maxwidth/w; } else { var h = size.height; size.height = maxheight; size.width = size.width*maxheight/h; } } if (size.width > biggestimgwidth) biggestimgwidth = size.width; if (size.height > biggestimgheight) biggestimgheight = size.height; } if (biggestimgwidth > maxwidth) biggestimgwidth = maxwidth; if (biggestimgheight > maxheight) biggestimgheight = maxheight; var buffer = 10; innercarousel.style.width=""+(biggestimgwidth+buffer)+"px"; innercarousel.style.height=""+biggestimgheight+"px"; // add margins to each image so they fit in the same space for (i = 0; i < images.length; i ++) { var img = images[i]; var size = sizes[i]; img.style.width = ""+size.width+"px"; img.style.height = ""+size.height+"px"; var leftmargin = Math.floor((biggestimgwidth-size.width)/2); var topmargin = Math.floor((biggestimgheight-size.height)/2); var marginstyle = ""+topmargin+"px "+leftmargin+"px"; img.style.margin = marginstyle; } } } function getImgSize(imgSrc){ var newImg = new Image(); newImg.src = imgSrc; var height = newImg.height; var width = newImg.width; p = $(newImg).ready(function(){ return {width: newImg.width, height: newImg.height}; }); var size = new Object(); size.width = p[0]['width']; size.height = p[0]['height']; return size; } function confirmModal( heading, question, cancelButtonTxt, okButtonTxt, callback ) { var modal = $(''); modal.find('#okButton').click(function(event) { callback(); modal.modal('hide'); }); modal.modal('show'); }; function loadPopOvers() { $('.pop').each(function() { var $pElem= $(this); $pElem.attr( 'data-html', true ); $pElem.attr( 'data-original-title',getPopOverTitle( ( $pElem.attr('id') ) ) ); $pElem.attr( 'data-content', getPopOverContent( $pElem.attr( 'id' ) ) ); }); } function getPopOverTitle( target ) { return $( '#' + target + '_content > div.popTitle' ).html(); } function getPopOverContent(target) { return $('#' + target + '_content > div.popContent' ).html(); } function imageBackground( id, image, tooltip ) { var $bg = $( '#' + id ); var $img = $bg.find( 'img' ); //tooltip if ( tooltip ) { $img.data( 'toggle', 'tooltip' ); $img.data( 'title', tooltip ); $img.tooltip(); } $bg.css( 'backgroundImage', 'url(' + getPath() + '/images/' + image + ')' ); $img.stop().animate( {opacity: .5}, 'slow' ); } function imageBackgroundClear( id ) { var $bg = $( '#' + id ); var $img = $bg.find( 'img' ).eq( 0 ); $bg.css( 'backgroundImage', '' ); $img.stop().animate( {opacity: 1}, 'slow' ); } function loadClickOvers() { loadPopOvers(); $('[rel="clickover"]').clickover(); } // Uncheck all other checkboxes in the group when one is checked/unchecked. function uncheckOthers(obj, className) { // save the original checked state of the one we're clicking: var checked = $(obj).is(':checked'); $('.' + className).attr('checked', false); // uncheck all of the boxes $(obj).attr('checked', checked); // reset the original state of the current checkbox }