
/* /globalmedia/jquery/autocomplete/jquery.autocomplete.min.js */
/*
 * jQuery Autocomplete plugin 1.1
 *
 * Copyright (c) 2009 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
 */;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){hasFocus=1;lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return false;}progress+=seperator;});words[wordAt]=v;v=words.join(options.multipleSeparator);}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value)return[""];if(!options.multiple)return[$.trim(value)];return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null;});}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);if(words.length==1)return words[0];var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""));}return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else{$input.val("");$input.trigger("result",null);}}});}};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase());}if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else
if(data[q]){return data[q];}else
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select();}else{selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}}else if(this.setSelectionRange){this.setSelectionRange(start,end);}else if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end;}});}var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}};})(jQuery);

/* /globalmedia/jquery/cookie/jquery.cookie.js */
/**
 * 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
 * @patched  Cookie are case innsensetive, patched by Peter Schulz
 */
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.toUpperCase(), '=', 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).toUpperCase() == (name.toUpperCase() + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

/* /globalmedia/jquery/cluetip/1.1.3/jquery.cluetip.js */
/*!
 * jQuery clueTip plugin v1.1.3
 *
 * Date: Mon Apr 11 20:31:15 2011 EDT
 * Requires: jQuery v1.3+
 *
 * Copyright 2011, Karl Swedberg
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Full list of options/settings can be found at the bottom of this file and at http://plugins.learningjquery.com/cluetip/
 * Examples can be found at http://plugins.learningjquery.com/cluetip/demo/
 *
*/

(function($) {


  $.cluetip = {
    version: '1.1.3',

    /* clueTip setup
     *  the setup options are applied each time .cluetip() is called,
     *  BUT only if <div id="cluetip"> is not already in the document
    */
    setup: {
      // method to be used for inserting the clueTip into the DOM.
      // Permitted values are 'appendTo', 'prependTo', 'insertBefore', and 'insertAfter'
      insertionType: 'appendTo',
      // element in the DOM the plugin will reference when inserting the clueTip.
      insertionElement: 'body'
    },

    /*
     * clueTip options
     *
     * each one can be explicitly overridden by changing its value.
     * for example: $.cluetip.defaults.width = 200;
     *         or: $.fn.cluetip.defaults.width = 200; // for compatibility with previous clueTip versions
     * would change the default width for all clueTips to 200.
     *
     * each one can also be overridden by passing an options map to the cluetip method.
     * for example: $('a.example').cluetip({width: 200});
     * would change the default width to 200 for clueTips invoked by a link with class of "example"
     *
    */
    defaults: {
      width:            275,      // The width of the clueTip
      height:           'auto',   // The height of the clueTip
      cluezIndex:       97,       // Sets the z-index style property of the clueTip
      positionBy:       'auto',   // Sets the type of positioning: 'auto', 'mouse','bottomTop', 'fixed'
      topOffset:        15,       // Number of px to offset clueTip from top of invoking element
      leftOffset:       15,       // Number of px to offset clueTip from left of invoking element
      local:            false,    // Whether to use content from the same page for the clueTip's body
      localPrefix:      null,     // string to be prepended to the tip attribute if local is true
      localIdSuffix:    null,     // string to be appended to the cluetip content element's id if local is true
      hideLocal:        true,     // If local option is set to true, this determines whether local content
                                  // to be shown in clueTip should be hidden at its original location
      attribute:        'rel',    // the attribute to be used for fetching the clueTip's body content
      titleAttribute:   'title',  // the attribute to be used for fetching the clueTip's title
      splitTitle:       '',       // A character used to split the title attribute into the clueTip title and divs
                                  // within the clueTip body. more info below [6]
      escapeTitle:      false,    // whether to html escape the title attribute
      showTitle:        true,     // show title bar of the clueTip, even if title attribute not set
      cluetipClass:     'default',// class added to outermost clueTip div in the form of 'cluetip-' + clueTipClass.
      hoverClass:       '',       // class applied to the invoking element onmouseover and removed onmouseout
      waitImage:        true,     // whether to show a "loading" img, which is set in jquery.cluetip.css
      cursor:           'help',
      arrows:           false,    // if true, displays arrow on appropriate side of clueTip
      dropShadow:       true,     // set to false if you don't want the drop-shadow effect on the clueTip
      dropShadowSteps:  6,        // adjusts the size of the drop shadow
      sticky:           false,    // keep visible until manually closed
      mouseOutClose:    false,    // close when clueTip is moused out
      activation:       'hover',  // set to 'click' to force user to click to show clueTip
                                  // set to 'focus' to show on focus of a form element and hide on blur
      clickThrough:     true,    // if true, and activation is not 'click', then clicking on link will take user to the link's href,
                                  // even if href and tipAttribute are equal
      tracking:         false,    // if true, clueTip will track mouse movement (experimental)
      delayedClose:     0,        // close clueTip on a timed delay (experimental)
      closePosition:    'top',    // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title'
      closeText:        'Close',  // text (or HTML) to to be clicked to close sticky clueTips
      truncate:         0,        // number of characters to truncate clueTip's contents. if 0, no truncation occurs

      // effect and speed for opening clueTips
      fx: {
                        open:       'show', // can be 'show' or 'slideDown' or 'fadeIn'
                        openSpeed:  ''
      },

      // settings for when hoverIntent plugin is used
      hoverIntent: {
                        sensitivity:  3,
                        interval:     50,
                        timeout:      0
      },

      // short-circuit function to run just before clueTip is shown.
      onActivate:       function(e) {return true;},
      // function to run just after clueTip is shown.
      onShow:           function(ct, ci){},
      // function to run just after clueTip is hidden.
      onHide:           function(ct, ci){},
      // whether to cache results of ajax request to avoid unnecessary hits to server
      ajaxCache:        true,

      // process data retrieved via xhr before it's displayed
      ajaxProcess:      function(data) {
                          data = data.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm, '').replace(/<(link|meta)[^>]+>/g,'');
                          return data;
      },

      // can pass in standard $.ajax() parameters. Callback functions, such as beforeSend,
      // will be queued first within the default callbacks.
      // The only exception is error, which overrides the default
      ajaxSettings: {
                        // error: function(ct, ci) { /* override default error callback */ },
                        // beforeSend: function(ct, ci) { /* called first within default beforeSend callback */ },
                        dataType: 'html'
      },
      debug: false

    }
  };
  var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $cluetipWait, $dropShadow, imgCount,
      standardClasses = 'ui-widget ui-widget-content ui-cluetip';


  $.fn.cluetip = function(js, options) {
    if (typeof js == 'object') {
      options = js;
      js = null;
    }
    if (js == 'destroy') {
      $(document).unbind('.cluetip');
      $('#cluetip').remove();
      $.removeData(this, 'title');
      $.removeData(this, 'cluetip');
      return this.unbind('.cluetip');
    }

    // merge per-call options with defaults
    options = $.extend(true, {}, $.cluetip.defaults, options || {});

    /** =create cluetip divs **/
    var insertionType = (/appendTo|prependTo|insertBefore|insertAfter/).test(options.insertionType) ? options.insertionType : 'appendTo',
        insertionElement = options.insertionElement || 'body';

    if (!$('#cluetip').length) {
      $(['<div id="cluetip">',
        '<div id="cluetip-outer" class="ui-cluetip-outer">',
          '<h3 id="cluetip-title" class="ui-widget-header ui-cluetip-header"></h3>',
          '<div id="cluetip-inner" class="ui-widget-content ui-cluetip-content"></div>',
        '</div>',
        '<div id="cluetip-extra"></div>',
        '<div id="cluetip-arrows" class="cluetip-arrows"></div>',
      '</div>'].join(''))
      [insertionType](insertionElement).hide();

      var cluezIndex = +options.cluezIndex;

      $cluetip = $('#cluetip').css({position: 'absolute'});
      $cluetipOuter = $('#cluetip-outer').css({position: 'relative', zIndex: cluezIndex});
      $cluetipInner = $('#cluetip-inner');
      $cluetipTitle = $('#cluetip-title');
      $cluetipArrows = $('#cluetip-arrows');
      $cluetipWait = $('<div id="cluetip-waitimage"></div>')
        .css({position: 'absolute'}).insertBefore($cluetip).hide();
    }
    var cluetipPadding = (parseInt($cluetip.css('paddingLeft'),10)||0) + (parseInt($cluetip.css('paddingRight'),10)||0);


    this.each(function(index) {
      var link = this,
          $link = $(this),
          // support metadata plugin (v1.0 and 2.0)
          opts = $.extend(true, {}, options, $.metadata ? $link.metadata() : $.meta ? $link.data() : {}),
          // start out with no contents (for ajax activation)
          cluetipContents = false,
          isActive = false,
          closeOnDelay = 0,
          tipAttribute = $link.attr(opts.attribute),
          ctClass = opts.cluetipClass;

      cluezIndex = +opts.cluezIndex;
      $link.data('cluetip', {title: link.title, zIndex: cluezIndex});

      if (!tipAttribute && !opts.splitTitle && !js) {
        return true;
      }
      // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip
      if (opts.local && opts.localPrefix) {tipAttribute = opts.localPrefix + tipAttribute;}
      if (opts.local && opts.hideLocal && tipAttribute) { $(tipAttribute + ':first').hide(); }
      var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10);
      // vertical measurement variables
      var tipHeight, wHeight,
          defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px';
      var sTop, linkTop, posY, tipY, mouseY, baseline;
      // horizontal measurement variables
      var tipInnerWidth = parseInt(opts.width, 10) || 275,
          tipWidth = tipInnerWidth + cluetipPadding + opts.dropShadowSteps,
          linkWidth = this.offsetWidth,
          linkLeft, posX, tipX, mouseX, winWidth;

      // parse the title
      var tipParts;
      var tipTitle = (opts.attribute != 'title') ? $link.attr(opts.titleAttribute) : '';
      if (opts.splitTitle) {
        if (tipTitle == undefined) {tipTitle = '';}
        tipParts = tipTitle.split(opts.splitTitle);
        tipTitle = tipParts.shift();
      }
      if (opts.escapeTitle) {
        tipTitle = tipTitle.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;');
      }

      var localContent;
      function returnFalse() { return false; }

/***************************************
* ACTIVATION
****************************************/

//activate clueTip
    var activate = function(event) {
      var continueOn = opts.onActivate($link);
      if (continueOn === false) {
        return false;
      }
      isActive = true;
      $cluetip.removeClass().css({width: tipInnerWidth});
      if (tipAttribute == $link.attr('href')) {
        $link.css('cursor', opts.cursor);
      }
      if (opts.hoverClass) {
        $link.addClass(opts.hoverClass);
      }
      linkTop = posY = $link.offset().top;
      linkLeft = $link.offset().left;
      mouseX = event.pageX;
      mouseY = event.pageY;
      if (link.tagName.toLowerCase() != 'area') {
        sTop = $(document).scrollTop();
        winWidth = $(window).width();
      }
// position clueTip horizontally
      if (opts.positionBy == 'fixed') {
        posX = linkWidth + linkLeft + lOffset;
        $cluetip.css({left: posX});
      } else {
        posX = (linkWidth > linkLeft && linkLeft > tipWidth)
          || linkLeft + linkWidth + tipWidth + lOffset > winWidth
          ? linkLeft - tipWidth - lOffset
          : linkWidth + linkLeft + lOffset;
        if (link.tagName.toLowerCase() == 'area' || opts.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse
          if (mouseX + 20 + tipWidth > winWidth) {
            $cluetip.addClass(' cluetip-' + ctClass);
            posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'),10) + parseInt($cluetipInner.css('marginRight'),10) :  mouseX - (tipWidth/2);
          } else {
            posX = mouseX + lOffset;
          }
        }
        var pY = posX < 0 ? event.pageY + tOffset : event.pageY;
        $cluetip.css({
          left: (posX > 0 && opts.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0),
          zIndex: $link.data('cluetip').zIndex
        });
        $cluetipArrows.css({zIndex: $link.data('cluetip').zIndex+1});
      }
        wHeight = $(window).height();

/***************************************
* load a string from cluetip method's first argument
***************************************/
      if (js) {
        if (typeof js == 'function') {
          js = js.call(link);
        }
        $cluetipInner.html(js);
        cluetipShow(pY);
      }
/***************************************
* load the title attribute only (or user-selected attribute).
* clueTip title is the string before the first delimiter
* subsequent delimiters place clueTip body text on separate lines
***************************************/

      else if (tipParts) {
        var tpl = tipParts.length;
        $cluetipInner.html(tpl ? tipParts[0] : '');
        if (tpl > 1) {
          for (var i=1; i < tpl; i++){
            $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>');
          }
        }
        cluetipShow(pY);
      }
/***************************************
* load external file via ajax
***************************************/

      else if (!opts.local && tipAttribute.indexOf('#') !== 0) {
        if (/\.(jpe?g|tiff?|gif|png)(?:\?.*)?$/i.test(tipAttribute)) {
          $cluetipInner.html('<img src="' + tipAttribute + '" alt="' + tipTitle + '" />');
          cluetipShow(pY);
        } else {
          var optionBeforeSend = opts.ajaxSettings.beforeSend,
              optionError = opts.ajaxSettings.error,
              optionSuccess = opts.ajaxSettings.success,
              optionComplete = opts.ajaxSettings.complete;
          var ajaxSettings = {
            cache: opts.ajaxCache, // force requested page not to be cached by browser
            url: tipAttribute,
            beforeSend: function(xhr) {
              if (optionBeforeSend) {optionBeforeSend.call(link, xhr, $cluetip, $cluetipInner);}
              $cluetipOuter.children().empty();
              if (opts.waitImage) {
                $cluetipWait
                .css({top: mouseY+20, left: mouseX+20, zIndex: $link.data('cluetip').zIndex-1})
                .show();
              }
            },
            error: function(xhr, textStatus) {
              if (isActive) {
                if (optionError) {
                  optionError.call(link, xhr, textStatus, $cluetip, $cluetipInner);
                } else {
                  $cluetipInner.html('<i>sorry, the contents could not be loaded</i>');
                }
              }
            },
            success: function(data, textStatus) {
              cluetipContents = opts.ajaxProcess.call(link, data);
              if (isActive) {
                if (optionSuccess) {optionSuccess.call(link, data, textStatus, $cluetip, $cluetipInner);}
                $cluetipInner.html(cluetipContents);
              }
            },
            complete: function(xhr, textStatus) {
              if (optionComplete) {optionComplete.call(link, xhr, textStatus, $cluetip, $cluetipInner);}
              var imgs = $cluetipInner[0].getElementsByTagName('img');
              imgCount = imgs.length;
              for (var i=0, l = imgs.length; i < l; i++) {
                if (imgs[i].complete) {
                  imgCount--;
                }
              }
              if (imgCount && !$.browser.opera) {
                $(imgs).bind('load error', function() {
                  imgCount--;
                  if (imgCount<1) {
                    $cluetipWait.hide();
                    if (isActive) { cluetipShow(pY); }
                  }
                });
              } else {
                $cluetipWait.hide();
                if (isActive) { cluetipShow(pY); }
              }
            }
          };
          var ajaxMergedSettings = $.extend(true, {}, opts.ajaxSettings, ajaxSettings);

          $.ajax(ajaxMergedSettings);
        }

/***************************************
* load an element from the same page
***************************************/
      } else if (opts.local) {

        var $localContent = $(tipAttribute + (/#\S+$/.test(tipAttribute) ? '' : ':eq(' + index + ')')).clone(true).show();
        if (opts.localIdSuffix) {
          $localContent.attr('id', $localContent[0].id + opts.localIdSuffix);
        }
        $cluetipInner.html($localContent);
        cluetipShow(pY);
      }
    };

// get dimensions and options for cluetip and prepare it to be shown
    var cluetipShow = function(bpY) {
      $cluetip.addClass('cluetip-' + ctClass);
      if (opts.truncate) {
        var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...';
        $cluetipInner.html($truncloaded);
      }

      function doNothing() {}; //empty function

      tipTitle ? $cluetipTitle.show().html(tipTitle) : (opts.showTitle) ? $cluetipTitle.show().html('&nbsp;') : $cluetipTitle.hide();
      if (opts.sticky) {
        var $closeLink = $('<div id="cluetip-close"><a href="#">' + opts.closeText + '</a></div>');
        (opts.closePosition == 'bottom') ? $closeLink.appendTo($cluetipInner) : (opts.closePosition == 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner);
        $closeLink.bind('click.cluetip', function() {
          cluetipClose();
          return false;
        });
        if (opts.mouseOutClose) {
          $cluetip.bind('mouseleave.cluetip', function() {
            cluetipClose();
          });
        } else {
          $cluetip.unbind('mouseleave.cluetip');
        }
      }
// now that content is loaded, finish the positioning
      var direction = '';
      $cluetipOuter.css({zIndex: $link.data('cluetip').zIndex, overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight});
      tipHeight = defHeight == 'auto' ? Math.max($cluetip.outerHeight(),$cluetip.height()) : parseInt(defHeight,10);
      tipY = posY;
      baseline = sTop + wHeight;
      if (opts.positionBy == 'fixed') {
        tipY = posY - opts.dropShadowSteps + tOffset;
      } else if ( (posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || opts.positionBy == 'bottomTop') {
        if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) {
          tipY = mouseY - tipHeight - tOffset;
          direction = 'top';
        } else {
          tipY = mouseY + tOffset;
          direction = 'bottom';
        }
      } else if ( posY + tipHeight + tOffset > baseline ) {
        tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset;
      } else if ($link.css('display') == 'block' || link.tagName.toLowerCase() == 'area' || opts.positionBy == "mouse") {
        tipY = bpY - tOffset;
      } else {
        tipY = posY - opts.dropShadowSteps;
      }
      if (direction == '') {
        posX < linkLeft ? direction = 'left' : direction = 'right';
      }
      // add classes
      var dynamicClasses = ' clue-' + direction + '-' + ctClass + ' cluetip-' + ctClass;
      if (ctClass == 'rounded') {
        dynamicClasses += ' ui-corner-all';
      }
      $cluetip.css({top: tipY + 'px'}).attr({'className': standardClasses + dynamicClasses});
      // set up arrow positioning to align with element
      if (opts.arrows) {
        var bgY = (posY - tipY - opts.dropShadowSteps);
        $cluetipArrows.css({top: (/(left|right)/.test(direction) && posX >=0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : ''}).show();
      } else {
        $cluetipArrows.hide();
      }

// (first hide, then) ***SHOW THE CLUETIP***
      // handle dropshadow divs first
      $dropShadow = createDropShadows(opts);
      if ($dropShadow && $dropShadow.length) {
        $dropShadow.hide().css({height: tipHeight, width: tipInnerWidth, zIndex: $link.data('cluetip').zIndex-1}).show();
      }

      $cluetip.hide()[opts.fx.open](opts.fx.openSpeed || 0);
      if ($.fn.bgiframe) { $cluetip.bgiframe(); }
      // delayed close (not fully tested)
      if (opts.delayedClose > 0) {
        closeOnDelay = setTimeout(cluetipClose, opts.delayedClose);
      }
      // trigger the optional onShow function
      opts.onShow.call(link, $cluetip, $cluetipInner);
    };

/***************************************
   =INACTIVATION
-------------------------------------- */
    var inactivate = function(event) {
      isActive = false;
      $cluetipWait.hide();
      if (!opts.sticky || (/click|toggle/).test(opts.activation) ) {
        cluetipClose();
        clearTimeout(closeOnDelay);
      }
      if (opts.hoverClass) {
        $link.removeClass(opts.hoverClass);
      }
    };
// close cluetip and reset some things
    var cluetipClose = function() {
      $cluetipOuter
      .parent().hide().removeClass();
      opts.onHide.call(link, $cluetip, $cluetipInner);
      $link.removeClass('cluetip-clicked');
      if (tipTitle) {
        $link.attr(opts.titleAttribute, tipTitle);
      }
      $link.css('cursor','');
      if (opts.arrows) {
        $cluetipArrows.css({top: ''});
      }
    };

    $(document).bind('hideCluetip', function(e) {
      cluetipClose();
    });
/***************************************
   =BIND EVENTS
-------------------------------------- */
  // activate by click
      if ( (/click|toggle/).test(opts.activation) ) {
        $link.bind('click.cluetip', function(event) {
          if ($cluetip.is(':hidden') || !$link.is('.cluetip-clicked')) {
            activate(event);
            $('.cluetip-clicked').removeClass('cluetip-clicked');
            $link.addClass('cluetip-clicked');
          } else {
            inactivate(event);
          }
          return false;
        });
  // activate by focus; inactivate by blur
      } else if (opts.activation == 'focus') {
        $link.bind('focus.cluetip', function(event) {
          $link.attr('title','');
          activate(event);
        });
        $link.bind('blur.cluetip', function(event) {
          $link.attr('title', $link.data('thisInfo').title);
          inactivate(event);
        });
  // activate by hover
      } else {
        // clicking is returned false if clickThrough option is set to false
        $link[opts.clickThrough ? 'unbind' : 'bind']('click.cluetip', returnFalse);
        //set up mouse tracking
        var mouseTracks = function(evt) {
          if (opts.tracking == true) {
            var trackX = posX - evt.pageX;
            var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY;
            $link.bind('mousemove.cluetip', function(evt) {
              $cluetip.css({left: evt.pageX + trackX, top: evt.pageY + trackY });
            });
          }
        };
        if ($.fn.hoverIntent && opts.hoverIntent) {
          $link.hoverIntent({
            sensitivity: opts.hoverIntent.sensitivity,
            interval: opts.hoverIntent.interval,
            over: function(event) {
              activate(event);
              mouseTracks(event);
            },
            timeout: opts.hoverIntent.timeout,
            out: function(event) {inactivate(event); $link.unbind('mousemove.cluetip');}
          });
        } else {
          $link.bind('mouseenter.cluetip', function(event) {
            activate(event);
            mouseTracks(event);
          })
          .bind('mouseleave.cluetip', function(event) {
            inactivate(event);
            $link.unbind('mousemove.cluetip');
          });
        }

        $link.bind('mouseover.cluetip', function(event) {
          $link.attr('title','');
        }).bind('mouseleave.cluetip', function(event) {
          $link.attr('title', $link.data('cluetip').title);
        });
      }
    });

    /** =private functions
    ************************************************************/
    /** =create dropshadow divs **/

    function createDropShadows(options, newDropShadow) {
      var dropShadowSteps = (options.dropShadow && options.dropShadowSteps) ? +options.dropShadowSteps : 0;
      if ($.support.boxShadow) {
        var dsOffsets = dropShadowSteps === 0 ? '0 0 ' : '1px 1px ';
        $('#cluetip').css($.support.boxShadow, dsOffsets + dropShadowSteps + 'px rgba(0,0,0,0.5)');
        return false;
      }
      var oldDropShadow = $('#cluetip .cluetip-drop-shadow');
      if (dropShadowSteps == oldDropShadow.length) {
        return oldDropShadow;
      }
      oldDropShadow.remove();
      var dropShadows = [];
      for (var i=0; i < dropShadowSteps;) {
        dropShadows[i++] = '<div style="top:' + i + 'px;left:' + i + 'px;"></div>';
      }

      newDropShadow = $(dropShadows.join(''))
      .css({
        position: 'absolute',
        backgroundColor: '#000',
        zIndex: cluezIndex -1,
        opacity: 0.1
      })
      .addClass('cluetip-drop-shadow')
      .prependTo('#cluetip');
      return newDropShadow;

    }

    return this;
  };

  (function() {
    $.support = $.support || {};
    // check support for CSS3 properties (currently only boxShadow)
    var div = document.createElement('div'),
        divStyle = div.style,
        styleProps = ['boxShadow'],
        prefixes = ['moz', 'Moz', 'webkit', 'o'];

    for (var i=0, sl = styleProps.length; i < sl; i++) {
      var prop = styleProps[i],
          uProp = prop.charAt(0).toUpperCase() + prop.slice(1);

      if ( typeof divStyle[ prop ] !== 'undefined' ) {
        $.support[ prop ] = prop;
      } else {
        for (var j=0, pl = prefixes.length; j < pl; j++) {

          if (typeof divStyle[ prefixes[j] + uProp ] !== 'undefined') {
            $.support[ prop ] = prefixes[j] + uProp;
            break;
          }
        }
      }
    }
    div = null;
  })();

  $.fn.cluetip.defaults = $.cluetip.defaults;

})(jQuery);

/* /globalmedia/jquery/colorbox/1.3.18/colorbox/jquery.colorbox-min.js */
// ColorBox v1.3.18 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function Y(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function Z(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function $(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function _(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function ba(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bb(b,c){a.event.trigger(b),c&&c.call(P)}function bc(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop)a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function bd(b){if(!U){P=b,ba(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1));if(!S){S=T=!0,r.show();if(K.returnFocus)try{P.blur(),a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=$(K.initialWidth,"x"),K.h=$(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bb(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}W.load(!0)}}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div";W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},W.init();if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}return c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bd(f[0]),f},W.init=function(){if(!r){if(!a("body")[0]){a(W.init);return}z=a(c),r=Y(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y(X,"Overlay",o?"position:absolute":"").hide(),s=Y(X,"Wrapper"),t=Y(X,"Content").append(A=Y(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Y(X,"LoadingOverlay").add(Y(X,"LoadingGraphic")),D=Y(X,"Title"),E=Y(X,"Current"),G=Y(X,"Next"),H=Y(X,"Previous"),F=Y(X,"Slideshow").bind(h,bc),I=Y(X,"Close")),s.append(Y(X).append(Y(X,"TopLeft"),u=Y(X,"TopCenter"),Y(X,"TopRight")),Y(X,!1,"clear:left").append(v=Y(X,"MiddleLeft"),t,w=Y(X,"MiddleRight")),Y(X,!1,"clear:left").append(Y(X,"BottomLeft"),x=Y(X,"BottomCenter"),Y(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Y(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),J=G.add(H).add(E).add(F),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})}},W.remove=function(){r.add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g)},W.position=function(a,b){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset();z.unbind("resize."+f),r.css({top:-99999,left:-99999}),K.fixed&&!o?r.css({position:"fixed"}):(c=z.scrollTop(),d=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-$(K.right,"x"),0):K.left!==!1?d+=$(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-$(K.bottom,"y"),0):K.top!==!1?c+=$(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",b&&b(),setTimeout(function(){z.bind("resize."+f,W.position)},1)},step:function(){g(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=$(a.width,"x")-O-M),a.innerWidth&&(K.w=$(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=$(a.height,"y")-N-L),a.innerHeight&&(K.h=$(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bb(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[Z(-1),Z(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),_(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Y("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||ba(),bb(m),bb(i,K.onLoad),K.h=K.height?$(K.height,"y")-N-L:K.innerHeight&&$(K.innerHeight,"y"),K.w=K.width?$(K.width,"x")-O-M:K.innerWidth&&$(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=$(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=$(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Y(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):_(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Y(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q<y.length-1||K.loop)&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Y(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Z(1),W.load())},W.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Z(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bb(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bb(m),A.remove(),setTimeout(function(){U=!1,bb(l,K.onClosed)},1)}))},W.element=function(){return a(P)},W.settings=d,a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),bd(this))}),W.init()})(jQuery,document,this);

/* /globalmedia/jquery/ajaxed/1.0.0/jquery.ajaxed.js */
/*
 * Entwickler: Peter Schulz , e-domizil
 */

(function($) {

	$.fn.ajaxed = function(opt){
		var options = $.extend({
			overlay: true
		},opt)
		
		var selector = $(this).selector;

		$(selector).live('click',function(){
			var a_self = this;
			var a_href = $(this).attr("href");
			var a_target = $(this).attr("target");			
			var a_data = $(this).attr("data");			
			//alert(a_target)
			var postdata = '';
			if(a_data) postdata = $('input,select,textarea',$(a_data)).serialize();
			
			var target = a_target.split(':')[0];
			var method = a_target.split(':')[1];
			
			$(a_self).removeClass("success error").addClass("loading");
			$(target).removeClass("success error").addClass("loading").addClass("ajaxed-content");
			if(options.overlay){
				var offset = $(target).offset();
				var overlayTop = offset.top;
				var overlayLeft = offset.left;
				var overlayHeight = $(target).outerHeight();
				var overlayWidth = $(target).outerWidth();
				$(target).after('<div class="ajaxed-overlay" style="width:'+overlayWidth+'px;height:'+overlayHeight+'px; position:absolute;top:'+overlayTop+'px;left:'+overlayLeft+'px"></div>')
			}

			$.ajax({
				type: "POST",
				url: $(a_self).attr('href'),
				data: postdata,
				success: function(response){
					
					$(a_self).removeClass("loading").addClass("success");
					$(target).removeClass("loading").addClass("success");
					$(target).next('.ajaxed-overlay').remove();
					
					if(target){
						if(method == 'replace'){
							$(target).replaceWith(response);
						}else if(method == 'prepend'){
							$(target).prepend(response);
						}else if(method == 'append'){
							$(target).append(response);
						}else if(method == 'after'){
							$(target).after(response);
						}else if(method == 'dialog'){
							$(target).html(response).dialog({autoOpen:false, modal: true});
							$(target).dialog('open');
						}else{
							//alert(target)
							$(target).html(response);
						}
						//$(target).fadeTo(1, 1);
						return true;
						
					}
				},
				error: function(response){
					$(a_self).removeClass("loading").addClass("error");
					//$("#jsdebug").html(response.responseText);
					return false;
				}
			});
			
			
			this.blur();
			return false;

		});
		return this;
	}
	
	

})(jQuery);

/* /globalmedia/jquery/slides/Standard/js/slides.min.jquery.js */
/*
* Slides, A Slideshow Plugin for jQuery
* Intructions: http://slidesjs.com
* By: Nathan Searles, http://nathansearles.com
* Version: 1.1.9
* Updated: September 5th, 2011
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('<div class="slides_control"/>');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('<a href="#" class="'+b.prev+'">Prev</a>'),a("."+b.prev,c).after('<a href="#" class="'+b.next+'">Next</a>')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("<ul class="+b.paginationClass+"></ul>"):c.append("<ul class="+b.paginationClass+"></ul>"),d.children().each(function(){a("."+b.paginationClass,c).append('<li><a href="#'+m+'">'+(m+1)+"</a></li>"),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i<f;i++)g[g.length]=i;g=g.sort(c),a.each(g,function(a,c){var f=e.eq(c),g=f.clone(!0);g.show().appendTo(d),b!==undefined&&b(f,g),f.remove()})}})}})(jQuery);

/* /media/js/main.js */
var msgEinenMoment = "Einen Moment bitte - Inhalt wird geladen";
	
$(document).ready(function() {
	
	
	
	$('.stern_tip').cluetip({
		splitTitle: '|'    
	});

	/*** ajaxed ***/

	if($.fn.ajaxed){
		$('a.ajax').ajaxed();
	}
	
	/*** colorbox ***/
	if($.fn.colorbox){
		$('a.colorbox-big').live('mouseover',function(){
			$(this).colorbox({
				width:'900px', 
				height:'90%', 
				fixed: true,
				onOpen: function(){$('body').css('overflow', 'hidden')},
				onCleanup:function(){$('body').css('overflow', 'visible')}
			});
		});
		$('a.colorbox').live('mouseover',function(){
			$(this).colorbox({
				width:'auto', 
				height:'auto', 
				maxWidth:'900px', 
				maxHeight:'90%', 
				fixed: true
			});
		});
		$('a.colorbox-iframe').live('mouseover',function(){
			$(this).colorbox({
				width:'90%', 
				maxWidth:'90%', 
				height:'90%', 
				fixed: true,
				iframe: true,
				onOpen: function(){$('body').css('overflow', 'hidden')},
				onCleanup:function(){$('body').css('overflow', 'visible')}
			});
		});
	}
	
	
	/*** scroll-to (ui.tabs supported) ***/
	$('a.scroll-to').live('click',function(event){
		var tab,tabs,offset;
		var target = $(this).attr('href');
		if( $(target).hasClass('ui-tabs-panel') ){
			tab = $(target);
		}else if($(target).parents('ui-tabs-panel').length){
			tab = $(target).parent('.ui-tabs-panel');
		}
		
		if(tab){
			tabs = $(target).parent('.ui-tabs');
			tabs.tabs('select',$(target).attr('id'));
			offset = $(tabs).offset();
		}else{
			offset = $(target).offset();
		}
		if(offset){
			$('html,body').animate({scrollTop: offset.top});
			event.preventDefault();
		}
	});
  
	
	/*** ui-tabs ***/

	if($.fn.tabs){
		$('div.tabs').tabs({
			spinner: '',
			cache: true,
			select: function(event, ui){
				var tabs = $(ui.panel).parent();
				var offset = tabs.offset();
				var top = offset.top;
				var left = offset.left;
				var height = tabs.outerHeight();
				var width = tabs.outerWidth();
				//tabs.append('<div class="ui-tabs-overlay loading" style="width:'+width+'px;height:'+height+'px; position:absolute;top:'+top+'px;left:'+left+'px"><div class="loading"></div></div>');
				//$(ui.panel).append('<div class="ui-tabs-overlay loading" style="width:'+width+'px;height:'+height+'px;"><div class="loading"></div></div>');
				if($(ui.panel).html() == ''){
					//console.log(ui)
					$(ui.panel).append('<div class="ui-tabs-overlay loading"><div class="loading"></div></div>');
				}
			},
			load: function(event, ui) {
				$('.ui-tabs-overlay',ui.panel).remove(); //remove loading overlay
			},
			show: function(event, ui){
				var tabs = $(event.target);
				var lis = $('.ui-tabs-nav li',tabs);
				var cur = tabs.tabs('option', 'selected');
				//check tab-radio-button
				setTimeout(function(){$('input',lis.get(cur)).attr('checked',true)},100); 
				//remove overlay
				//$('.ui-tabs-overlay',$(ui.panel).parent()).remove();

			}
			
		}); //.append($('.ui-tabs-nav', this).clone(true));
		

	}


});

function openWindow(theURL,winName,features) { 
  help = window.open(theURL,winName,features);
}

function NeuesFenster(Url) {
  msgWindow = open(Url, 'auswahl', 'status=no,resizable=no,width=800,height=500,scrollbars=yes,menubar=no,titlebar=no,toolbar=no,location=no');
}

function ajaxLoad(id,uri,waiter,callback) {

	if (typeof(waiter) == "undefined" || waiter == true)
		setWaiter(id);
	
	$.ajax({
		type: "GET",
		url: ajaxUri(uri),
		error: function(data){
			
			start = data.responseText.search(/<h1[^>]*>/);
			end = data.responseText.search(/<\/h1>/);
			anz = end - start + 5;
			errmsg = data.responseText.substr(start, anz);
			
			$("#" + id).html(errmsg);
			$("#debug").html(data.responseText);
		},
		success: function(data){
					  
		  $("#" + id).html(data);
			
			// 2-er Tab (Häfen) auf der Destination (+ ShipInShop, + Reederei) Seite. Es wurde leider keine bessere Möglichkeit gefunden, den Waiter in allen Tabs einheitlich  anzuzeigen.
			if($("#" + id).hasClass('list_2')){
			  $("#" + id).removeClass('container');$("#" + id).removeClass('padding');
			}
			  
			
			if (typeof(callback) != "undefined")
				jQuery( callback );
		}
	});
	 
}

function showGlobalWaiter(bezug, offs) {
  $(bezug).before('<div id="globalwaiter"><img src="/media/image/ajax-loader.gif" /></div>');
  Offset = $(bezug).offset().top;
  $("div#globalwaiter").css("top",Offset + offs).show();
}

function hideGlobalWaiter() {
  $("div#globalwaiter").remove();
}

function setWaiter(id) {
	$("#"+id).html('<div class="center waiter"><img id="waiter" src="/media/image/wait.gif" /><div>' + msgEinenMoment + '</div></div>');
}

function ajaxUri(uri) {
	// and den uri wird eine eindeutige ID angehaengt
	newuri = uri.replace(/&amp;/g,'&');
	newuri = newuri.concat(/\?/.test(uri)?"&":"?","avoidCache=",(new Date).getTime(),".",Math.random()*1234567); 
	// wenn das urltoken nicht schon im uri enthalten ist, wird es hinzugefuegt
	// newuri = newuri.concat(/CFTOKEN/i.test(uri)?"":"&" + urltoken);
	
	return newuri; 
}

function validateInput(formid) {

	NoErros = 0;
	msg = bitte_vervollstaendigen;

	$("#" + formid + " .msgcontainer").html("").hide(1);

	$("#" + formid +" .revise").each(function(i){
    $(this).removeClass("revise");
  });

  $("#" + formid + " :input.mandatory").each(function(i){
	   if($(this).val() == "" || $(this).val() == " ") {
	     $(this).addClass("revise");
	     NoErros++;
	   }
	});	
	

	$("#" + formid + " .email").each(function(i){
	   email = $(this).val();
	   //if (!email.match(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|biz|info|name|aero|biz|info|jobs|museum|name|travel)$/gi)) {
	   if (!email.match(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i)) {
		   $(this).addClass("revise");
		   NoErros++;
		 }
	});
	
	$("#" + formid + " .date").each(function(i){
	   date = $(this).val();
	   if (!checkDate(date)) {
		   $(this).addClass("revise");
		   NoErros++;
		 }
	});
	
	$("#" + formid + " .integer").each(function(i){
	   number = $(this).val();
	   if (isNaN(number)) {
		   $(this).addClass("revise");
		   NoErros++;
		 }
	});

	if (NoErros > 0) {
		showErrorMsg(formid,msg);
		return false;
	}

	return true;
}

function showErrorMsg(formid,msg) {
    
	$("#" + formid + " .msgcontainer").fadeIn(500).html('<div class="feedback">' + msg + '</div>');
	$("#" + formid + " .msgcontainer")[0].scrollIntoView(false);
}

function toggle(newSlide, oldSlide) {
  $('#' + oldSlide).slideUp();
  $('#' + newSlide).slideDown();
}

function showTab(id, which) {
    
	if( $('#tabsTop_' + id + ' .button_tab_' + which + ' a').attr("rel") != "" ){
		ajaxLoad('tabs_' + id + ' .tab_' + which, $('#tabsTop_' + id + ' .button_tab_' + which + ' a').attr("rel"), true);
		$('#tabsTop_' + id + ' .button_tab_' + which + ' a').attr("rel","");
	}
  
	$('#tabsTop_' + id + ' .button_tab').removeClass('current');
	$('#tabsTop_' + id + ' .button_tab').removeClass('first_current');
	$('#tabsTop_' + id + ' .button_tab').removeClass('last_current');
	$('#tabs_' + id + ' .tab').hide();

	$('#tabsTop_' + id + ' .button_tab_' + which).addClass('current');
	if($('#tabsTop_' + id + ' .button_tab_' + which).hasClass('first')) {
		$('#tabsTop_' + id + ' .button_tab_' + which).addClass('first_current');
	}
	if($('#tabsTop_' + id + ' .button_tab_' + which).hasClass('last')) {
		$('#tabsTop_' + id + ' .button_tab_' + which).addClass('last_current');
	}

	$('#tabs_' + id + ' .tab_' + which).show();
}

function machScroll(outer,inner,callback) {
	if(navigator.userAgent.indexOf("Safari") >= 0 && outer == "html")
		outer = "body";	

	if (typeof $(inner).offset() != "undefined" && $(inner).offset() != null) {
		OuterOffset = $(outer).offset().top;
	  InnerOffset = $(inner).offset().top;
   	pScroll = InnerOffset - OuterOffset;
		$(outer).animate({scrollTop: pScroll},'slow','linear',callback);
	}	

}

function showTuevPopup() {
	openWindow('http://www.safer-shopping.de/index.php?id=62&no_cache=1&showUID=113','T&Uuml;V','status=no,resizable=no,width=1024,height=900,scrollbars=no,menubar=no,titlebar=no,toolbar=no,location=no');
};

function ajaxSwapImg(id, source, target, effect, speed) {
	
	if(speed == undefined) {
		var speed = '';
	};
	
	$(id).each(function() {
		if(effect != undefined) {
			$(this).hide();
		};
		if(target == 'style') {
			$(this).attr(target, $(this).attr(target) + ';' + $(this).attr(source));
		}
		else {
			$(this).attr(target, $(this).attr(source));
		};
		$(this).attr(source, '');
		$(this).removeClass('ajaxSwapImg');
		if(effect == 'fadeIn') {
			$(this).fadeIn(speed);
		};
	});
};

/* /media/partners/ehoi/2.0.2/js/calendar.js */
function initCalendar() {
	  
	  $('.datepicker').attr('readonly', 'readonly');
	  
	  $(".datepicker").datepicker({
	    showAnim: "slide", 
	    showOptions: { 
	    direction: "up" 
	    }, 
	    showOn: "both", 
	    buttonImage: "/media/image/calendar.png", 
	    buttonImageOnly: true,
	    buttonText: '',
	    
	    changeFirstDay: false,
	    changeMonth: true,
	    changeYear: true,
	    firstDay: 1,
	    minDate: +4,
	    maxDate: '+0M +0D +3Y',
	    
	    onChangeMonthYear: function(year, month, inst) {
	      
	      $(this).val(inst.currentDay + "." + month + "." + year);
	      //inst.input.datepicker('setDate', newDate);
	      
	      /*var now = new Date($(this).val());	      
	      alert($(this).val());
	      if (now) {
	          var max = new Date(year, month, 0).getDate();
	          var day = now.getDate() > max? 
	                      max : now.getDate();       
	          var newDate = new Date(year, month -1, day);
	           
	      }*/    
	    }
	    
	      
	  });
	  jQuery(function($){		
		  $.datepicker.regional[sprache] = {		    
		    monthNamesShort: [monthNamesShort[0],monthNamesShort[1],monthNamesShort[2],monthNamesShort[3],monthNamesShort[4],monthNamesShort[5],monthNamesShort[6],monthNamesShort[7],monthNamesShort[8],monthNamesShort[9],monthNamesShort[10],monthNamesShort[11]],   
		    dayNamesMin: [dayNamesMin[0], dayNamesMin[1], dayNamesMin[2], dayNamesMin[3], dayNamesMin[4], dayNamesMin[5], dayNamesMin[6]],    
		    dateFormat: dateFormat, prevText:prevText, nextText:nextText};
		  $.datepicker.setDefaults($.datepicker.regional[sprache]);
		});
	  
};

/* /media/partners/ehoi/2.0.2/js/teaser.js */
// teaser = Array();
// teaser[0] = Array(15, 'teaser_main_1');
// teaser[1] = Array(10, 'teaser_main_2');
// teaser[2] = Array(5, 'teaser_main_3');

var time_current = 0;
var teaser_frames = 25;
var teaser_current = 0;


function showTeaser(array_id) {
  time_current = 0;
  teaser_current = array_id;
  
  $('#teaser_main .topics').removeClass('timer_hide'); 
  $('#teaser_main .topics').removeClass('dark'); 
  
  if(teaser[teaser_current][2] == "dark") {
    $('#teaser_main .topics').addClass('dark'); 
  } else if(teaser[teaser_current][2] == "timer_hide") {
    $('#teaser_main .topics').addClass('timer_hide'); 
  }
  
  ajaxSwapImg('#' + teaser[array_id][1] + '.ajaxSwapImg', 'title', 'style');
  $('#teaser_main .topics .topic').fadeOut(3000);
  $('#' + teaser[array_id][1]).css('display', 'none');
  $('#' + teaser[array_id][1]).removeClass('hideme');
  $('#' + teaser[array_id][1]).fadeIn(3000);
  $('#teaser_main ul.nav li a').removeClass('current');
  $('li#' + 'teaser_main_btn_' + teaser_current + ' a').addClass('current');
  $('li#' + 'teaser_main_btn_' + teaser_current + ' a').blur();
}


function teaserSlideshow() {
  
  time_current += teaser_frames;
  time_total = teaser[teaser_current][0] * 1000;
  width = time_current / time_total * 100;
  
  //$('#teaser_main #timer span').css('width', width + '%');
  
  if(time_current >= time_total) {
    time_current = 0;
    if(teaser_current + 1 < teaser.length) {
      teaser_current++;
    } else {
      teaser_current = 0;
    }
    showTeaser(teaser_current);
    teaser_old = teaser_current;
  }
}


function initTeaserSlideshow() {
  $('#teaser_main').mouseover(function() {
    //$('#teaser_main #timer').hide();
    //$('#teaser_main #timer').addClass('opacity_50');

    window.clearInterval(teaserInterval);
  });    
  
  $('#teaser_main').mouseout(function() {
    //$('#teaser_main #timer').show();
    //$('#teaser_main #timer').removeClass('opacity_50');
    teaserInterval = window.setInterval("teaserSlideshow()", teaser_frames);
  });
      
  //init teaserSlideshow
  teaserInterval = window.setInterval("teaserSlideshow()", 1000 / teaser_frames);
  $('li#' + 'teaser_main_btn_' + teaser_current + ' a').addClass('current');
  
}


/*$(document).ready(function() {
  
  // teaser slideshow init
  duration_max = 30;
  //duration_default = 1;
  duration_default = 15;
  
  teaser = Array();
  $('#teaser_main .topics').children('.topic').each(function(index) {
    getDuration: for(i=0; i <= duration_max; i++) {
      if($(this).hasClass('duration_' + i)) {
        duration = i;
        break getDuration;
      } else {
        duration = duration_default;
      }
    }
    var style = "";
    
    if($(this).hasClass('dark') || $(this).hasClass('timer_dark')) {
      style = "dark";
    }
    if($(this).hasClass('timer_hide')) {
      style = "timer_hide";
    }
    teaser.push(Array(duration, this.id, style));
  });
  initTeaserSlideshow();

  
  
});*/;

/* /media/js/virtualSession.js */
jQuery(function($) {

	$(document).ajaxError(function() {
		 	smenuInit();		
		 	$("select[id='reederei1']").change();
		 	$("select[id='destination_1']").change();
	}); 

	
	$.extend({
		  getUrlVars: function(){
		    var vars = [], hash;
		    var thepath = window.location.href;
		    thepath = thepath.toLowerCase();
		    var hashes = thepath.slice(window.location.href.indexOf('?') + 1).split('&');
		    for(var i = 0; i < hashes.length; i++)
		    {
		      hash = hashes[i].split('=');
		      vars.push(hash[0]);
		      vars[hash[0]] = hash[1];
		    }
		    return vars;
		  },
		  getUrlVar: function(name){
		  	var thevalue = $.getUrlVars()[name.toLowerCase()];
		    return thevalue;
		  }
		});

// virtual session block

			var partneridtosave="";
			var menuloaded = 0;
			var callbackexecuted = 0;
			if($.getUrlVar('partner'))
			{partneridtosave="&partnerid="+$.getUrlVar('partner')+"";}
			if($.getUrlVar('partnerid'))
			{partneridtosave="&partnerid="+$.getUrlVar('partnerid')+"";}
			
					
			$.getJSON("SessionLink.jsp?varname=searchmask"+partneridtosave,
			
			        function(data){
						callbackexecuted = 1;
						if(!data){
							data = '';	//because the callback shows data as undefined and throws and error when the session does not exist
						}
						else {
							menuloaded = 1;
						}	
						//set cruising area
						var filter_cruisingarea = getNum(data.CRUISINGAREATYP);
						//set reederei
						var filter_reederei2=0;
						var filter_reederei=0;
						if(filter_cruisingarea == 2)
						{filter_reederei2		= getNum(data.ORGANIZERID);}
						else
						{filter_reederei		= getNum(data.ORGANIZERID);}
						//set ship						
						var filter_ship			= 0;
						var filter_ship2		= 0;
						if(filter_cruisingarea == 2)
						{filter_ship2		= getNum(data.SHIPID);}
						else
						{filter_ship		= getNum(data.SHIPID);}
						//set destination
						var filter_dest			= 0;
						var filter_dest2		= 0;
						if(filter_cruisingarea == 2)
						{filter_dest2		= getNum(data.CRUISINGAREAID);}
						else
						{filter_dest		= getNum(data.CRUISINGAREAID);}
						//set start and end dates
						var filter_datumvon		= data.DATUMVON;
						var filter_datumbis		= data.DATUMBIS;
						//set duration
						var filter_duration		= getNum(data.REISEDAUER);
						//set the ship size
						var filter_groesse = getNum(data.GROESSE);
						//set the kategorie
						var filter_kategorie = getNum(data.KATEGORIE);
						//set the bordsprache
						var filter_bordsprache = getNum(data.BORDSPRACHE);
						//set the price
						var filter_preis = getNum(data.PREIS);
						//set the Themenreise
						var filter_theme = getNum(data.BESONDEREREISEN);
						//set the port
						var filter_port = getNum(data.PORTID);
						//set the package
						var filter_package = getNum(data.PACKAGEONLY);
						var filter_flug = getNum(data.FLUGONLY);
						var filter_hotel = getNum(data.HOTELONLY);
						//start and end port
						var filter_startport = data.STARTPORTID;
						var filter_endport = data.ENDPORTID;
						//set freetext
						var filter_freetext = data.FREETEXT;
										

					//reloads the ship list on basis of reederei selection
				$(document).ready(function() {
	
	
					//init the menu and listeners
					smenuInit();
					
					//virtual session block			
					//Now the select boxes are loaded from the values in the filter
						if(filter_cruisingarea == 1){
							if(filter_reederei > 0){
								$("select[id='reederei1']").val(filter_reederei);
								}
							$("#HochseeButton").click();
							if(filter_ship > 0){
								$("select[id='reederei1']").change();
								$("select[id='shipselect']  option[value="+filter_ship+"]").attr('selected','selected').change();
							}							
							if(filter_dest > 0){$("select[name='destination'] option[value="+filter_dest+"]").attr('selected','selected').change();}
							$("select[name='portid']").val(filter_port);
						}
						if(filter_cruisingarea == 2){
							if(filter_reederei2 > 0){
								$("select[id='reederei2']").val(filter_reederei2);
								}
							$("#FlussButton").click();
							if(filter_ship2 > 0){
								$("select[id='reederei2']").change();
								$("select[id='shipselect2']  option[value="+filter_ship2+"]").attr('selected','selected').change();
							}
							if(filter_dest2 > 0){$("select[name='destination2']  option[value="+filter_dest2+"]").attr('selected','selected').change();}
							$("select[name='portid2']").val(filter_port);
						}

						$("input[name='datum_von']").val(filter_datumvon);
						$("input[name='datum_bis']").val(filter_datumbis);
			
						$("select[name='reisedauer']").val(filter_duration);
						$("select[name='groesse']").val(filter_groesse);
						$("select[name='sterne']").val(filter_kategorie);	
						$("select[name='kategorie']").val(filter_kategorie); //sometimes sterne and sometimes kategorie?
						$("select[name='besondereReisen']").val(filter_theme);
						$("select[name='preis']").val(filter_preis);
						$("select[name='bordsprache']").val(filter_bordsprache);
						$("input[name='freetext']").val(filter_freetext);
						if(filter_startport == 'on'){$("#startPort").attr('checked','checked');}
						if(filter_endport == 'on'){$("#endPort").attr('checked','checked');}
						if(filter_package == 1) {$("#search_paket").attr('checked','checked');}
						if(filter_flug == 1) {$("#search_flug").attr('checked','checked');}
						if(filter_hotel == 1) {$("#search_hotel").attr('checked','checked');}
			        });


					//because the callback function will not be executed if the data is null, we need to force the ship menu to initialize if necessary
					if(menuloaded==0) {
					$("select[id='reederei1']").change();
					$("select[id='destination']").change();
					}
					
					doPPSTracking();

			//end of virtual session block
	});
	

	
	function smenuInit() {

		//controls hiding and showing of hochsee fluss. 06/2011: document.ready disabled due to bug with ship menu not initializing. Due to nested calls? This function is already called inside of document.ready.
		//$(document).ready(function() {
				var $searchForm = $("form[id='searchform']");		
				
				$("#HochseeButton").click( function() {
					$(".fluss").hide();
					$(".hochsee").show();
					$("select[name='reederei2']", $searchForm).val(0);				
					$("select[name='ship2']", $searchForm).val(0);
					$("select[name='destination2']", $searchForm).val(0);
					$("select[name='portid2']", $searchForm).val(0);
					$("select[name='reederei2']", $searchForm).change();				
					$("select[name='reederei']", $searchForm).change();
					$("select[name='destination']", $searchForm).change();									
				});
				$("#FlussButton").click( function() {
					$(".hochsee").hide();
					$(".fluss").show();
					$("select[name='reederei']", $searchForm).val(0);
					$("select[name='ship']", $searchForm).val(0);
					$("select[name='destination']", $searchForm).val(0);	
					$("select[name='portid']", $searchForm).val(0);								
					$("select[name='reederei']", $searchForm).change();									
					$("select[name='reederei2']", $searchForm).change();				
					$("select[name='destination2']", $searchForm).change();
				});


				var $searchForm = $("form[id='searchform']");		
				$("#reederei1").change( function() {
					var reederei1 = $(this).val();
					
					//first remove all options from the select
					//$("#shipselect").find('option').remove();
					$("#shipselect").html('');
					//loop through options in hidden, and extact options belonging to this reederei
					if(getNum(reederei1) > 0) {
						$("#hiddenshipfield").find("option:first, option[class='r"+reederei1+"'] ").each(function (i) {
								var theval = $(this).val();
								var thetxt = $(this).html();
								$('#shipselect').append(
							        $('<option></option>').val(theval).html(thetxt)
							    );
						})
					}
					else { 
						$('#shipselect').html($("#hiddenshipfield").html());
						$('#shipselect').find("option").each(function (i) {
							//alert('' + $(this).val() + ' is ' + $(this).prev().val());
							if($(this).val() == $(this).prev().val()) {
								$(this).remove();
							}
						});
					};
				});					
				$("#reederei2").change( function() {
					var reederei2 = $(this).val();
					//retrieve data, write it to display
					/*
					$("#shipselect2 > option").hide();
					$("#shipselect2").val('0');
					if(getNum(reederei2) > 0)
						{$("#shipselect2 > option[class='r"+reederei2+"']").show(); }
					else
						{$("#shipselect2 > option").show();}				
					*/ 				
					//first remove all options from the select
					//$("#shipselect2").find('option').remove();
					$("#shipselect2").html('');
					//loop through options in hidden, and extact options belonging to this reederei
					if(getNum(reederei2) > 0) {
						$("#hiddenshipfield2").find("option:first, option[class='r"+reederei2+"']").each(function (i) {
								var theval = $(this).val();
								var thetxt = $(this).html();
								$('#shipselect2').append(
							        $('<option></option>').val(theval).html(thetxt)
							    );
						})
					}
					else {
						$('#shipselect2').html($("#hiddenshipfield2").html());
						$('#shipselect2').find("option").each(function (i) {
							if($(this).val() == $(this).prev().val())
								$(this).remove();
						});
					};
	
				});
				
				$("#destination_1").change( function() {		
					var dest1 = $(this).val();
					//first remove all options from the select
					$("#portidselect1").html('');													
					//loop through options in hidden, and extact options belonging to this reederei
					if(getNum(dest1) > 0) {

                        $("#hiddenhafenfield").find("optgroup[class*='ca"+dest1+"']").each(function (i) {
                                var thetxt = $(this).attr('label');
                                var theiso = $(this).attr('data-isocode');

                                $('#portidselect1').append(
                                    $('<optgroup data-isocode="'+theiso+'" class="ca'+dest1+'" label="'+thetxt+'"></optgroup>')
                                );

                        })        
   
                        $("#hiddenhafenfield").find("option:first,  option[class*='ca"+dest1+"']").each(function (i) {
                                var theval = $(this).val();
                                var thetxt = $(this).html();
                                var theiso = $(this).attr('data-isocode');
                            if(theiso != null)
                                {
                                    $('#portidselect1').find("optgroup[data-isocode='"+theiso+"']").append(
                                        $('<option></option>').val(theval).html(thetxt)
                                    );
                                }
                             else
                                 {
                                    $('#portidselect1').prepend(
                                        $('<option></option>').val(theval).html(thetxt)
                                    );                                 
                                 } 

                        })        

					}
					else {
						$('#portidselect1').html($("#hiddenhafenfield").html());
						$('#portidselect1').find("option").each(function (i) {
							if($(this).val() == $(this).prev().val())
								$(this).remove();
						});
					};

				});


				$("#destination_2").change( function() {		
					var dest2 = $(this).val();
					//first remove all options from the select
					$("#portidselect2").html('');													
					//loop through options in hidden, and extact options belonging to this reederei
					if(getNum(dest2) > 0) {

                        $("#hiddenhafenfield2").find("optgroup[class*='ca"+dest2+"']").each(function (i) {
                                var thetxt = $(this).attr('label');
                                var theiso = $(this).attr('data-isocode');

                                $('#portidselect2').append(
                                    $('<optgroup data-isocode="'+theiso+'" class="ca'+dest2+'" label="'+thetxt+'"></optgroup>')
                                );

                        })        
   
                        $("#hiddenhafenfield2").find("option:first,  option[class*='ca"+dest2+"']").each(function (i) {
                                var theval = $(this).val();
                                var thetxt = $(this).html();
                                var theiso = $(this).attr('data-isocode');
                            if(theiso != null)
                                {
                                    $('#portidselect2').find("optgroup[data-isocode='"+theiso+"']").append(
                                        $('<option></option>').val(theval).html(thetxt)
                                    );
                                }
                             else
                                 {
                                    $('#portidselect2').prepend(
                                        $('<option></option>').val(theval).html(thetxt)
                                    );                                 
                                 } 

                        })        

					}
					else {
						$('#portidselect2').html($("#hiddenhafenfield2").html());
						$('#portidselect2').find("option").each(function (i) {
							if($(this).val() == $(this).prev().val())
								$(this).remove();
						});
					};

				});


				
		//});		
		
	} //end of menuInit()

	
	function getNum(thevalue) {
		  if( isNaN( parseInt(thevalue))) {
		    return "";
		  }
		  else {
		    return parseInt(thevalue);
		  }			
	} //end of getNum	


	function Get_Cookie( check_name ) {
		// first we'll split this cookie up into name/value pairs
		// note: document.cookie only returns name=value, not the other components
		var a_all_cookies = document.cookie.split( ';' );
		var a_temp_cookie = '';
		var cookie_name = '';
		var cookie_value = '';
		var b_cookie_found = false; // set boolean t/f default f
	
		for ( i = 0; i < a_all_cookies.length; i++ )
		{
			// now we'll split apart each name=value pair
			a_temp_cookie = a_all_cookies[i].split( '=' );
		
			// and trim left/right whitespace while we're at it
			cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
	
			// if the extracted name matches passed check_name
			if ( cookie_name == check_name )
			{
				b_cookie_found = true;
				// we need to handle case where cookie has no value but exists (no = sign, that is):
				if ( a_temp_cookie.length > 1 )
				{
					cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
				}
				// note that in cases where cookie is initialized but no value, null is returned
				return cookie_value;
				break;
			}
			a_temp_cookie = null;
			cookie_name = '';
		}
		if ( !b_cookie_found )
		{
			return null;
		}
	} //end of Get_Cookie

	//it is now possible to do all pps tracking through this function for applications using this js file.
	//Expand the list of allowed hostnames when replacing the old pps tracking logic with this.	
	function doPPSTracking() {	
		if(    window.location.hostname == "www.e-hoi.de" 
			|| window.location.hostname == "www.e-hoi.ch"
			//future hostnames here
		)
		{
			if(Get_Cookie('cached_PartnerID') != null){
				var cached_partnerID_for_tracking = Get_Cookie('cached_PartnerID');			
				var edTrackURL = (("https:" == document.location.protocol) ? "https://partner.e-hoi.de" : "http://partner.e-hoi.de");		
				$("body").append(unescape("%3Cimg src='" + edTrackURL + "/partner/pps.cfm?partner=" + cached_partnerID_for_tracking + "\x26amp;type=null\x26amp;avoidCache=" + Math.random()*Math.random() + "' alt='' height='1' width='1' /%3E"));									 
			}
		}		
	}
	
});

/* /media/partners/ehoi/2.0.2/js/js_lang_DE.js */
sprache='de';
myself = '/index.cfm?fuseaction=';
msgErrorGlobal = "Entschuldigung, leider ist ein Fehler aufgetreten.";
msgBitteergaenzen = "Bitte ergänzen Sie Ihre Angaben um";
msgBittewaehlen = "Bitte wählen Sie";
msgBittewarten = "Bitte warten";
beliebig = "- beliebig -";
waehlen_suchkriterium = "Bitte wählen Sie zunächst Ihr gewünschtes Land aus.";
bitte_vervollstaendigen = "Bitte vervollständigen Sie die rot markierten Felder";
bitte_waehlen = "Bitte wählen Sie";
msgEinenMoment = "Einen Moment bitte - Inhalt wird geladen";

prevText='zurück';
nextText='vor';
monthNames = ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];
monthNamesShort = ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'];   
dayNamesMin = ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'];    
dateFormat = 'dd.mm.yy';


