jQuery.url=function(){var segments={};var parsed={};var options={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var parseUri=function(){str=decodeURI(options.url);var m=options.parser[options.strictMode?"strict":"loose"].exec(str);var uri={};var i=14;while(i--){uri[options.key[i]]=m[i]||""}uri[options.q.name]={};uri[options.key[12]].replace(options.q.parser,function($0,$1,$2){if($1){uri[options.q.name][$1]=$2}});return uri};var key=function(key){if(!parsed.length){setUp()}if(key=="base"){if(parsed.port!==null&&parsed.port!==""){return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/"}else{return parsed.protocol+"://"+parsed.host+"/"}}return(parsed[key]==="")?null:parsed[key]};var param=function(item){if(!parsed.length){setUp()}return(parsed.queryKey[item]===null)?null:parsed.queryKey[item]};var setUp=function(){parsed=parseUri();getSegments()};var getSegments=function(){var p=parsed.path;segments=[];segments=parsed.path.length==1?{}:(p.charAt(p.length-1)=="/"?p.substring(1,p.length-1):path=p.substring(1)).split("/")};return{setMode:function(mode){strictMode=mode=="strict"?true:false;return this},setUrl:function(newUri){options.url=newUri===undefined?window.location:newUri;setUp();return this},segment:function(pos){if(!parsed.length){setUp()}if(pos===undefined){return segments.length}return(segments[pos]===""||segments[pos]===undefined)?null:segments[pos]},attr:key,param:param}}();



/**

 * jQuery Cookie plugin

 *

 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)

 * Dual licensed under the MIT and GPL licenses:

 * http://www.opensource.org/licenses/mit-license.php

 * http://www.gnu.org/licenses/gpl.html

 *

 */



/**

 * Create a cookie with the given name and value and other optional parameters.

 *

 * @example $.cookie('the_cookie', 'the_value');

 * @desc Set the value of a cookie.

 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });

 * @desc Create a cookie with all available options.

 * @example $.cookie('the_cookie', 'the_value');

 * @desc Create a session cookie.

 * @example $.cookie('the_cookie', null);

 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain

 *       used when the cookie was set.

 *

 * @param String name The name of the cookie.

 * @param String value The value of the cookie.

 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.

 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.

 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.

 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained

 *                             when the the browser exits.

 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).

 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).

 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will

 *                        require a secure protocol (like HTTPS).

 * @type undefined

 *

 * @name $.cookie

 * @cat Plugins/Cookie

 * @author Klaus Hartl/klaus.hartl@stilbuero.de

 */



/**

 * Get the value of a cookie with the given name.

 *

 * @example $.cookie('the_cookie');

 * @desc Get the value of a cookie.

 *

 * @param String name The name of the cookie.

 * @return The value of the cookie.

 * @type String

 *

 * @name $.cookie

 * @cat Plugins/Cookie

 * @author Klaus Hartl/klaus.hartl@stilbuero.de

 */

jQuery.cookie = function(name, value, options) {

    if (typeof value != 'undefined') { // name and value given, set cookie

        options = options || {};

        if (value === null) {

            value = '';

            options.expires = -1;

        }

        var expires = '';

        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {

            var date;

            if (typeof options.expires == 'number') {

                date = new Date();

                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));

            } else {

                date = options.expires;

            }

            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE

        }

        // CAUTION: Needed to parenthesize options.path and options.domain

        // in the following expressions, otherwise they evaluate to undefined

        // in the packed version for some reason...

        var path = options.path ? '; path=' + (options.path) : '';

        var domain = options.domain ? '; domain=' + (options.domain) : '';

        var secure = options.secure ? '; secure' : '';

        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');

    } else { // only name given, get cookie

        var cookieValue = null;

        if (document.cookie && document.cookie != '') {

            var cookies = document.cookie.split(';');

            for (var i = 0; i < cookies.length; i++) {

                var cookie = jQuery.trim(cookies[i]);

                // Does this cookie string begin with the name we want?

                if (cookie.substring(0, name.length + 1) == (name + '=')) {

                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));

                    break;

                }

            }

        }

        return cookieValue;

    }

};

// end of jQuery.cookie





$(document).ready(function() {



// Send button image rollover

	$('input.send-button').mouseover( function() {

		this.src='http://www.medtronic.com/wcm/fragments/ss_frag_mdt_css/buttons/send-active.png';

	});

	$('input.send-button').mouseout( function() {

		this.src='http://www.medtronic.com/wcm/fragments/ss_frag_mdt_css/buttons/send.png';

	});

// end Send button enhancement





// Close button image rollover

	$('input.close-button').mouseover( function() {

		this.src='http://www.medtronic.com/wcm/fragments/ss_frag_mdt_css/buttons/close-active.png';

	});

	$('input.close-button').mouseout( function() {

		this.src='http://www.medtronic.com/wcm/fragments/ss_frag_mdt_css/buttons/close.png';

	});

// end Close button enhancement





// External link pop-ups

	$("a[rel='external']").mouseover(function(){

		var original_href = $(this).attr("href");

		var thickbox_href = "/assets/utils/leaving-ext.htm?TB_iframe=true&height=320&width=460";

		$.cookie('HCPurlCookie', original_href, { path: '/' });

		$(this).attr('href', thickbox_href);

	}).mouseout(function(){

		var myCookie = $.cookie('HCPurlCookie');

		$(this).attr('href', myCookie);

	});



// end external link pop-ups

if(window.location.host == 'professional.medtronic.com'){
		var report_suite_id ="medtronicprofessionalprod"
	};
	if(window.location.host == 'professional-test.medtronic.com'){
		var report_suite_id ="medtronicprofessionaldev"
	};

	var pageName = document.title;

	

	$("a[@rel='email-page']").click(function() {

		var obj = $(this).attr('href');

		var emailPageName = "Email this page: " + pageName;

		var s = s_gi(report_suite_id);

		s.linkTrackVars='events';

		s.linkTrackEvents='event18';

		s.events='event18';

		s.tl(obj,'e',emailPageName);

	});

	

	$("li.printControl a").click(function() {

		var obj = $(this).attr('href');

		var printPageName = "Print Page: " + pageName;

		var s=s_gi(report_suite_id);

		s.linkTrackVars='events';

		s.linkTrackEvents='event17';

		s.events='event17';

		s.tl(obj,'e',printPageName);

						  

	});

	

	$('a[@href$=".pdf"], a[@href$=".gif"], a[@href$=".jpg"], a[@href$=".doc"], a[@href$=".ppt"], a[@href$=".pps"]').click(function() {

		var obj = $(this).attr('href');

		var s=s_gi(report_suite_id);

		var fileName = $(this).html();

		s.linkTrackVars='events';

		s.linkTrackEvents='event10';

		s.events='event10';

		s.tl(obj,'d',fileName);

	});



// end Omniture Tracking codes



}); //end of main document.ready



